Commit graph

5607 commits

Author SHA1 Message Date
kim
dfcd513122 Pass PKG_SYSCONFDIR to configure 2020-07-09 10:46:24 +00:00
rillig
dcd4b12bb3 pkgtools/pkglint: update to 20.2.1
Changes since 20.2.0:

Don't warn about a possibly redundant PKGNAME=${DISTNAME} assignment if
PKGNAME is defined somewhere else in the package Makefile.

Warn if NO_CONFIGURE=yes and REPLACE_* are combined.

Suggest to replace ${VAR:@l@-l${l}@} with the simpler ${VAR:S,^,-l,},
as well as ${VAR:@l@${l}suffix@} with the simpler ${VAR:=suffix}.

Allow lua in CATEGORIES.
2020-07-01 13:17:41 +00:00
jperkin
185902296e pkg_install: Update version to 20200701.
Includes fixes to +REQUIRED_BY generation, performance improvements,
build fixes against newer libnetpgpverify, and better error messages.

When combined with newer pkgin releases, this should now eliminate the
various "pkg_add: Can't open +CONTENTS of depending package ..." errors
that users had frequently observed during upgrades (joyent/pkgsrc#158,
joyent/pkgsrc#190, joyent/pkgsrc#256, and many IRC logs).
2020-07-01 10:15:19 +00:00
jperkin
278ac9777e pkg_install: Fix and speed up "pkg_admin rebuild-tree".
In the pkg_admin front end, instead of adding +REQUIRED_BY entries as they
are found, which previously led to duplicate entries, cache the results and
write out the files at the end.

Underneath, add a caching version of iterate_pkg_db() that avoids the same
pkgdb directory lookup for every installed package, but is only suitable for
reads.  Also add a cache for best_match lookups to avoid expensive matches
each time.

For all caches, use a simple hashing function to improve lookup performance.

In summary, as well as fixing +REQUIRED_BY files, these patches reduce the
wall/user/system time of "pkg_admin rebuild-tree" on a system with 12,762
packages installed down from 13m52s/11m20s/2m32s to just 1m4s/1m3s/0m1s.
2020-07-01 10:03:19 +00:00
jperkin
2f10b39a2d pkg_install: Handle recursive upgrades correctly.
The list of dependencies held by packages during recursive upgrades was not
refreshed after dependencies were themselves upgraded, leading to failures
attempting to read +REQUIRED_BY files in package directories that no longer
exist ("registration is incomplete!").  We now only perform the package
match after the upgrades have completed.

While here, hide the warning about dependencies not being fulfilled behind
ForceDepending, as the whole point of using that mode is to ignore such
issues with the assumption that the final state after updating will be
correct.
2020-07-01 09:46:04 +00:00
rillig
afd6858802 pkgtools/url2pkg: update version to 20.2.0
No code changes.  This is just to align the url2pkg version number with
the upcoming branch name.
2020-06-28 10:20:59 +00:00
rillig
5f853e37e2 pkgtools/pkglint: update version to 20.2.0
No code changes.  This is just to align the pkglint version number with
the upcoming branch name.
2020-06-28 10:19:11 +00:00
rillig
342924562e pkgtools/pkglint: update to 20.1.19
Changes since 20.1.18:

Fixed a wrong warning about unknown buildlink identifier "lua" in
mail/neomutt, reported by wiz.
2020-06-22 06:35:02 +00:00
rillig
e7b358e8ec pkgtools/pkglint: update to 20.1.18
Changes since 20.1.17:

Fixed the algorithm for checking whether two patterns overlap, such as
MACHINE_PLATFORM:MNetBSD-[0-9].*-*.

Fixed wrong warning about foreign variable in SUBST block, as seen in
geography/qgis.
2020-06-20 07:00:44 +00:00
bsiegert
121a05e61b Revbump Go packages after Go 1.14.4 update. 2020-06-17 09:54:00 +00:00
rillig
5a7f0a09bb pkgtools/pkglint: update to 20.1.17
Changes since 20.1.16:

Conditions that contradict each other in the same file are reported as
errors.  Inspired by lang/rust/Makefile r1.174.
2020-06-14 11:35:54 +00:00
rillig
d49fa456d8 pkgtools/pkglint: update to 20.1.16
Changes since 20.1.15:

When a package adds an additional version requirement for another
package, it must do so using BUILDLINK_API_DEPENDS instead of
BUILDLINK_ABI_DEPENDS.  Most packages already do this.

When a values is appended to an undefined variable using the += operator,
bmake does not add a space before, and pkglint caught up to do the same.
This change has no practical consequences though.

As always, a bit of refactoring.  The method names of MkAssignChecker
contained the redundant word "varassign".
2020-06-12 19:14:45 +00:00
rillig
9c10768978 pkgtools/pkglint: update to 20.1.15
Changes since 20.1.14:

Fix confusing wording of diagnostic "should contain text".  It's more
precise to say "this line should consist of this text".  Otherwise it's
too easy to interpret it as "the text should occur somewhere in the
line".

Allow BUILDLINK_PREFIX.* to be used in helper files.  Especially for
programming language packages, files like plugin.mk often include
buildlink3.mk and therefore may refer to the BUILDLINK_PREFIX of this
package.

Warn about redundant BUILDLINK_API_VERSION restrictions.  Previously, the
check had only been enabled if the operators from the default dependency
pattern (buildlink3.mk) and the additional dependency pattern (package)
used the same operators, which already covered most practical cases.

Determine SuSE versions from the pkgsrc tree.
2020-06-07 15:49:23 +00:00
rillig
049285fb7a pkgtools/compat_headers: properly skip the permissions check
CHECK_PERMS is a user-settable variable.  Setting CHECK_PERMS_SKIP has
the same effect.
2020-06-07 06:26:25 +00:00
rillig
4c3a3b90a3 pkgtools/pkglint: update to 20.1.14
Changes since 20.1.13:

Packages that don't define DISTNAME probably don't download any files
and thus may not need a distinfo file.  (There are several other
conditions involved in this, though.)

When reporting wrong distinfo hashes, always report them in the order in
which they appear in the distinfo file, not by hashmap order.

Fix panic when parsing the Makefile line "./=value", which according to
bmake is a variable assignment.  This is not used in practice though.

Disallow a leading hyphen in package option names.  There are only very
few packages that wrongly use these option selectors in
PKG_SUGGESTED_OPTIONS.

Distinguish between a tool dependency (USE_TOOLS) and a plain tool name
(TOOLS_NOOP, TOOLS_BROKEN, TOOLS_FAIL).  Allow packages to add arbitrary
tools to these lists.
2020-06-06 20:42:56 +00:00
rillig
0cb25565b7 pkgtools/cwrappers: avoid dependency cycle with check-portability 2020-06-02 19:46:00 +00:00
rillig
b3b70f45ee pkgtools/pkglint: update to 20.1.13
Changes since 20.1.12:

Numeric comparison in conditions should not be used.  It is currently
only used for comparing version numbers.

https://mail-index.netbsd.org/pkgsrc-changes/2020/06/02/msg215278.html
2020-06-02 17:52:26 +00:00
adam
6bd0c30da6 Revbump for icu 2020-06-02 08:22:31 +00:00
rillig
a76f4cbf91 pkgtools/pkglint: update to 20.1.12
Changes since 20.1.11:

The file bsd.pkg.mk must only ever be included by package Makefiles
directly, not by other Makefile fragments.  Seen in www/w3m.

The variable BUILDLINK_PREFIX.* should only be used for packages that
have actually been included by the package.  This catches the use of
BUILDLINK_PREFIX.libiconv, which should have been iconv instead.

Allow comments before line 3 in buildlink3.mk files. This is necessary
for mariadb55-client since its buildlink identifier is mysql-client,
which is so non-obvious that it needs to be documented.
2020-06-01 20:49:54 +00:00
rillig
a3f54e4aee pkgtools/pkglint: update to 20.1.11
Changes since 20.1.10:

PKG_SYSCONFDIR and VARBASE must not appear in INSTALLATION_DIRS.

Patch files in which the line number have been edited manually are marked
with notes.
2020-05-29 20:13:17 +00:00
jperkin
18ec400fba pkgin: Update to 20.5.1.
This is quite a disruptive change, but has been tested in various ways across
Darwin, Minix, and SmartOS, so I'm reasonably confident I caught most issues.

With the switch to automake the pkgsrc Makefile has been able to be simplified
a lot, and I also took the opportunity to remove the mostly useless MESSAGE
file.

## Version 20.5.1 (2020-05-25)

 * Improve make portability.

## Version 20.5.0 (2020-05-25)

 * Switch to automake and overhaul mandatory configure options.
 * Remove unused code and pointless configure tests, cleaning up includes
   and headers where appropriate.
 * New version number scheme (yy.m.x).  The previous scheme had no relevance,
   this one at least gives users some clue about how up-to-date their version
   is.
2020-05-25 08:42:05 +00:00
nia
ec92436e93 libnbcompat: Update to 20200524
One change: use AC_PROG_CC_C99 and regen configure

This helps bootstrapping on legacy systems where the compiler doesn't
default to c99 without additional guidance.

Patch from ky0ko@disroot.org, tested on NetBSD and Alpine Linux by myself
and on IRIX with mipspro by ky0ko.
2020-05-24 21:51:54 +00:00
rillig
97d69cd3e1 pkgtools/pkglint: update to 20.1.10
Changes since 20.1.8:

Recognize SUBST_NOOP_OK and SUBST_SHOW_DIFF.

Allow plain -Wl,-R and -Wl,-rpath in BUILDLINK_TRANSFORM, when they are
used to remove compiler options.

Recognize ggrep and other platform tools as valid tool names.  Seen in
lang/rust.
2020-05-24 19:12:29 +00:00
rillig
36b0d87392 pkgtools/pkglint: remove runtime dependency on devel/go-check
Since 2019-11-16, the main pkglint code does not require this package
anymore.  It is still used in the test code.
2020-05-24 09:35:12 +00:00
rillig
c0578aaa0a pkgtools/check-portability: update to 20.1.1
Changes since 20.1.0:

Fixed off-by-one error in diagnostic for test ==.
2020-05-23 22:18:10 +00:00
rillig
0fe9f6e0c8 pkgtools/check-portability: clean up code 2020-05-23 22:12:31 +00:00
rillig
3c3d0f4eec pkgtools/pkglint: update to 20.1.8
Changes since 20.1.7:

There are about 300 cases where a package defines a PLIST conditional in
PLIST_VARS but none of its PLIST files actually uses that condition.
These cases get a warning.
2020-05-23 08:51:07 +00:00
rillig
210a5aae4b pkgtools/pkg_online-client: clean up REPLACE_SH 2020-05-23 08:49:08 +00:00
rillig
74c18fe143 pkgtools/pkg_summary-utils: remove nonexistent file from REPLACE_SH 2020-05-22 19:49:13 +00:00
rillig
9c42f8b711 pkgtools/pkglint: update to 20.1.7
Changes since 20.1.6:

Versioned Python dependencies may end with :test or :tool, as the code in
lang/python/versioned_dependencies.mk says.
2020-05-18 19:11:16 +00:00
adam
68f7d0442a pytest from versioned depends 2020-05-18 10:30:16 +00:00
rillig
4821a6de2c pkgtools/pkgin: allow no-op SUBST block for paths
In a pkgsrc setup with default paths, the simple substitutions are all
no-ops.  The last two substitutions only apply to Makefile.in, which
means that they are no-ops for the other files.  Since the whole sed
command is not considered an identity substitution, an explicit
SUBST_NOOP_OK is needed here.

https://mail-index.netbsd.org/pkgsrc-users/2020/05/17/msg031245.html
2020-05-17 12:13:46 +00:00
rillig
96435d56fa pkgtools/pkglint: update to 20.1.6
Changes since 20.1.5:

Category Makefiles must only list subdirectories in SUBDIR that actually
contain a package.  There is no need to mention the other directories.
This is the same as in the top-level Makefile, where mk/ and regress/ are
not listed.

Packages from pkgsrc-wip may have a COMMIT_MSG file with a suggested
commit message for importing the package into main pkgsrc.
2020-05-17 07:07:18 +00:00
rillig
9a194515dc pkgtools/createbuildlink: remove unused placeholder 2020-05-16 06:28:52 +00:00
rillig
d19556fce1 pkgtools/createbuildlink: use SUBST instead of ad-hoc sed
This allows to show the actual changes by setting SUBST_SHOW_DIFF=yes,
and with SUBST_NOOP_OK=no it also demonstrates that no substitutions are
needed for substplistbasedirs.

Another thing this demonstrates is this wrong patch:

-echo >>$sedrules "s|@@PKGVERSION@@|@PKGVERSION@|g"
+echo >>$sedrules "s|@3.17@|3.17|g"
2020-05-16 06:24:15 +00:00
rillig
4209ef06ce pkgtools/pkglint: update to 20.1.5
Changes since 20.1.4:

No more wrong warnings about the Solaris /bin/sh. These warnings had been
there for 14 years, preventing pkgsrc developers from using the $$(...)
command substitution and negation in shell conditions.

https://mail-index.netbsd.org/pkgsrc-changes/2020/05/01/msg212194.html
2020-05-09 19:26:11 +00:00
rillig
2ec8663c66 pkgtools/pkglint: update to 20.1.4
Changes since 20.1.3:

For patches that patch a single file, the filename of the patch should
correspond to the patched file. There are a few different naming schemes
in action, therefore the check is relatively loose. Patches that are
called patch-[a-z][a-z] continue to be allowed for historic reasons.
Patches that are called patch-CVE-* are also allowed.

The entries in doc/CHANGES-* are checked for consistency. For example,
it doesn't make sense to add a package twice or "update" a package from
version 1.0 to version 1.0. All version numbers in these entries must
be valid pkgsrc versions, i.e. start with a digit and only use
characters from -.0-9A-Z_a-z.
2020-05-08 19:50:04 +00:00
jperkin
a1bd6c01e6 pkg_install: Revert part of last commit.
We need to use the library Makefile so that libnetpgpverify is built.  Fixes
bootstrap.
2020-05-05 09:02:43 +00:00
agc
8d6726aab6 libnetpgpverify now uses its own protected symbols, update build process to
account for this.
2020-05-04 19:14:59 +00:00
jperkin
18d845cc68 pkgin: Unbreak PKGPATH subst change. 2020-05-04 11:15:50 +00:00
tnn
3cc9fe5aa4 don't need a wildcard here 2020-05-02 10:43:44 +00:00
tnn
e8cdb9630f pkglint/select.mk: prefer golang pkglint on NetBSD/aarch64 9.1 or later 2020-05-02 10:33:15 +00:00
rillig
e210d74974 pkgtools/pkglint: update to 20.1.3
Changes since 20.1.2:

Stricter check for Python version numbers. Before, 25 and 26 had not
been marked as wrong.

In assignments like PKGNAME=${DISTNAME:S,from,to,}, modifiers that don't
have any effect generate a note. Most of these modifiers are redundant
or outdated.

Patches must not add well-known absolute paths like /usr/pkg, /var and
/etc since these must be overridable by the pkgsrc user. Other absolute
paths continue to be allowed.
2020-04-30 21:15:03 +00:00
plunky
894c5e9f65 add afl-3.0 as acceptable default license 2020-04-30 09:47:51 +00:00
jperkin
ccc3e27c10 pkgin: Update to 0.16.1.
The "jperkin should have run the test suite before releasing 0.16.0" release.

## Version 0.16.1 (2020-04-29)

 * Don't attempt to update the keep list if we're only downloading packages.
 * Avoid C99isms for now, fixes CentOS 6 build.
 * Ignore "pkg_admin rebuild-tree" output, removes spurious "Done." messages
   from output.
 * Some minor internal refactoring.
2020-04-29 15:09:20 +00:00
rillig
9057d45716 pkgtools/pkgin: define PKGPATH before including mk.conf
PKGPATH is one of the few variables that is guaranteed to be defined when
mk.conf is included. Conditions like ".if ${PKGPATH} == category/package"
trigger a "Malformed conditional" when this variable is not defined.
2020-04-28 02:43:21 +00:00
jperkin
104f4863f2 pkgin: Update to 0.16.0.
## Version 0.16.0 (2020-04-27)

 * Rebuild +REQUIRED_BY files after each pkgdb modification, ensuring
   consistency and avoiding "Can't open +CONTENTS of ..." errors during
   subsequent upgrades.
 * Improved output sorting.
 * Turn off WARNS.
 * Minor cleanups.
 * Documentation fixes.
 * Flush yes/no prompt before reading response (Michael Forney).
2020-04-27 14:54:47 +00:00
rillig
bd33698e2a pkgtools/pkg_filecheck: fix absolute path to PKG_DBDIR 2020-04-27 05:35:29 +00:00
sborrill
f6c23d12bd Allow NetBSD distribution tarball file extension to be defined with DISTRIB_EXT.
Default to tgz.
Bump to version 1.39
2020-04-23 11:28:08 +00:00
rillig
8c83e680a9 pkgtools/check-portability: make test == an error
It had only been a warning before, due to a forgotten nerrors++. The
check in mk/check/check-portability.awk already treats this case as an
error.
2020-04-19 12:47:27 +00:00