Commit graph

9895 commits

Author SHA1 Message Date
rillig
c842ae6257 mk/haskell.mk: fix PLIST generation for Haskell packages
The package textproc/hs-cgrep does not install a Haskell library.  This
was unexpected to mk/haskell.mk, which generated an obviously wrong PLIST
file for that package, and for 3 other packages.

Noticed by wiz.
2020-06-21 22:21:02 +00:00
taca
fe782b891f mk/defaults/options.description: rename two options
Rename ecap and esi to squid-ecap and squid-esi.
2020-06-21 16:07:06 +00:00
wiz
e597787c88 mk: do not check vulnerability when just fetching distfiles
This is intended to reduce the log output on ftp.NetBSD.org when
fetching all distfiles.

Also, we call the target in basically every step of package creation
(extract, patch, configure, build, install, package) - perhaps we should trim
this down some more.
2020-06-18 17:05:55 +00:00
rillig
548e02a834 mk/subst.mk: SUBST_NOOP_OK defaults to yes again
There are still some packages that fail the strict SUBST check.  These
packages should nevertheless be built using the default pkgsrc
configuration, at least in the stable 2020Q2 branch.  After 2020Q2 has
been switched, the strict SUBST checks will be activated again in the
default configuration.
2020-06-16 18:13:54 +00:00
ryoon
c963102a49 mk/configure: Replace SET(CMAKE_MODULE_PATH... like 'set' too.
This will break print/scribus-qt4.
It uses CMAKE_MODULE_PATH as not a directory list.
It is wrong assumption.
2020-06-13 15:11:11 +00:00
rillig
82d30f4f85 mk/build/build.mk: use SH for the shell in build-env
Providing a realistic build environment has priority over having a
convenient shell with auto-completion and all the likes.
2020-06-12 17:33:23 +00:00
rillig
94077fc887 mk/subst.mk: remove unnecessary SUBST_VARS definition
This is a package-settable variable, and if a package leaves it
undefined, "bmake show-all-subst" should show exactly this.
2020-06-11 20:13:22 +00:00
rillig
97dcdb49ce mk/subst.mk: document the unspecified application order
To avoid bmake warnings because of duplicate class names, the :O:u
modifier had been added in r1.66 on 2020-03-21.  This had the side effect
that the subst classes are now applied in alphabetical order instead of
declaration order.

For this to actually matter, there must be a file that is affected by two
different subst classes and in which the substitutions depend on each
other or prevent each other.  Chances for that are pretty low.

The order is intentionally documented as being unspecified, to allow for
future modifications, just in case that a bmake variable modifier is
invented that filters for duplicates without requiring the duplicates to
be adjacent to each other.  In that situation, it would be nicer to
switch back to declaration order instead of alphabetical.
2020-06-11 19:38:40 +00:00
rillig
86d21b53d7 mk/subst.mk: fix local variable names
These variables don't record whether a file is changed but instead
whether a pattern was found.
2020-06-11 19:27:56 +00:00
rillig
1fb832cc6e mk/subst.mk: always remove temporary file
Fixes PR pkg/55364.
2020-06-11 18:04:41 +00:00
leot
fa8cb992c2 mk/plist: Add EARLY_PRINT_PLIST_AWK
EARLY_PRINT_PLIST_AWK is like PRINT_PLIST_AWK but operates before the
file/directory lists are sorted.

Discussed on tech-pkg@ mainly to address `print-PLIST' order problems for
Python 3 packages:

 <https://mail-index.NetBSD.org/tech-pkg/2020/05/27/msg023249.html>
2020-06-10 16:06:09 +00:00
rillig
12d982ecf7 bsd.buildlink3.mk: add ABI_DEPENDS and API_DEPENDS to show-all-bl3 2020-06-07 17:56:13 +00:00
rillig
e6b0d53b3d mk/check/check-portability.mk: remove leaked debug code
Thanks jperkin@.
2020-06-07 10:42:04 +00:00
rillig
2539de7edb mk/configure/replace-interpreter.mk: clean up show-all-interp variables 2020-06-07 06:10:36 +00:00
rillig
ffb8ba6d5f mk/check/check-portability.mk: use predefined tools
Just in case any of these tools defines some command line arguments. The
correct path had already been used before since both env and sh are added
to USE_TOOLS in bsd.pkg.mk.
2020-06-07 06:05:35 +00:00
rillig
d2050ec11e mk/bsd.prefs.mk: add PKG_DBDIR to show-all-dirs 2020-06-07 05:59:30 +00:00
rillig
c7940cfb7f mk/.../metadata.mk: properly clean up loops after removing ""
There is no evidence that any shell needs the empty string literal in
'for i in "" $var' to loop over a simple variable.  This would only be
necessary if the shell code were generated by a preprocessor such as
bmake or autoconf, and the list of items might end up empty.  In such a
case, the empty string literal prevents to generate 'for i in ; do',
which would produce a syntax error.
2020-06-07 04:41:58 +00:00
rillig
b2a99dcb17 mk/bsd.options.mk: remove redundant assignment to PKG_OPTIONS
This assignment has popped up various times in the pkglint output, even
though it is defined in the infrastructure and not in a specific package.
Since there is no need to have this duplicate assignment, it is removed.
2020-06-06 19:09:37 +00:00
rillig
ff1cb47d6f mk/bsd.options.mk: document variables in the canonical order 2020-06-06 19:02:55 +00:00
rillig
16e188625b mk/subst.mk: fix wrong SUBST failure in mail/policyd-weight
The general rule is that a SUBST_SED that contains _any_ identity
substitution may leave files unmodified, no matter if there are other
substitutions as well.
2020-06-06 13:17:34 +00:00
rillig
cd76433a09 mk/.../metadata.mk: fix reference to undefined shell variable
When RUN includes the -u shell option (see the pkgsrc guide, section
bulk.var.shvar), there is a stray "requires: parameter not set" error.

This error doesn't make the build fail immediately since it is on the
left-hand side of a pipe, where the exit status is ignored.  It would
fail if the shell for bmake were set to bash and its option "pipefail"
were enabled.
2020-06-06 09:33:56 +00:00
rillig
f374c71565 mk, doc: remove obsolete bulk-install and bulk-package targets 2020-06-05 17:05:22 +00:00
gdt
dba3f3a134 subst.mk: Move hint about find to package-settable section 2020-06-03 10:56:46 +00:00
gdt
dc7a002470 subst.mk: Give hint abotu SUBST_NOOP_OK
Note that a typical reason to need this is using find to generate a
list of files.
2020-06-02 23:37:25 +00:00
jperkin
25bb928af5 mk: bmake cannot compare non-integers numerically.
Just use an empty() match instead.
2020-06-02 16:22:40 +00:00
sjmulder
46895896ea mk/defaults: Add 'mouse' option
Used already in sysutils/nnn but forgot to commit options.description.
2020-06-02 10:38:26 +00:00
rillig
c42fb662dc mk/compiler.mk: check for too late GCC_REQD and USE_LANGUAGES
For USE_LANGUAGES there is already a pkglint warning, but for GCC_REQD it
is missing.  It's better to have this check directly in the
infrastructure since it is more reliable.

This check is disabled by default, to not cause any new breakage.
It should be enabled in bulk builds.
2020-06-02 06:58:13 +00:00
gutteridge
79f41f7786 options.description: add "keyring" option 2020-05-31 23:48:00 +00:00
sjmulder
a376838f3a mk/compiler: Set -fcommon for GCC 10
As with clang. Default got flipped with v10.
2020-05-31 00:00:13 +00:00
sjmulder
9014f3f496 mk/compiler: Fix version check for GCC 10
Caused SSP flags to be omitted in GCC 10. Check flipped because all new
GCC versions can be expected to support it.
2020-05-30 22:45:36 +00:00
rillig
b964aa2b2f mk/defaults/options.description: remove trailing whitespace 2020-05-30 19:57:23 +00:00
khorben
94c385420d Typo 2020-05-30 03:36:45 +00:00
maya
f1308fb6bd Flip the switch on ALLOW_VULNERABLE_PACKAGES to allow them by default.
Right now, users who install the pkg-vulnerabilities database find that
the vast majority of packages fail to build, penalizing them too severely.
Package auditing can still be done via "pkg_admin audit".

Alternatively, the previous behaviour can be restored with
ALLOW_VULNERABLE_PACKAGES=no in mk.conf.

Additionally, bmake-ify the check.mk logic. It was easier to do this,
as the package relied on a single long ${RUN} command.

Proposed on tech-pkg, with no objections to the idea of changing the
default, just the method of doing so.
2020-05-28 16:22:58 +00:00
nia
bee9205d2d mk/tools: not all linuxes have bash (e.g. alpine) 2020-05-28 14:47:36 +00:00
gutteridge
212fb2eb3a options.description: "firefox" is also no longer an option 2020-05-25 00:15:14 +00:00
gutteridge
1bf8f4e1c2 options.description: +2 missing entries, -1 no longer used 2020-05-25 00:07:52 +00:00
rillig
11dbf836d6 mk/configure: fix configure options check for custom CONFIGURE_SCRIPT
Seen in cross/arm-none-eabi-gdb.
2020-05-23 12:11:33 +00:00
adam
f616f8bf6d MySQL 5.5 and PostgreSQL 9.4 are no longer with us 2020-05-23 07:35:56 +00:00
rillig
4c58410ecc mk/configure: fix check for unknown configure options 2020-05-22 15:21:15 +00:00
joerg
84342eb5e0 Add a missing redirect to ensure that all files are picked up for
hashing.
2020-05-22 01:24:05 +00:00
rillig
dde6099996 mk/configure: remove outdated documentation 2020-05-21 21:05:51 +00:00
rillig
ecee64e6c9 mk/configure: add variable GNU_CONFIGURE_QUIET
This allows bulk builds or other setups to see interesting error
messages, without them being hidden in the noise of "checking ...".
2020-05-21 20:50:54 +00:00
rillig
e45d2e3458 mk/pkgformat/metadata.mk: fix relative paths in PATCHDIR and FILESDIR
Before, relative paths had been stored as-is.  This affected those
packages that defined PATCHDIR or FILESDIR as relative directory instead
of prefixing it with ${.CURDIR}.

Since there are already several other paths that are interpreted relative
to the package directory (CONFLICTS, DEPENDS), allow PATCHDIR and
FILESDIR to be specified as relative paths, too.  This makes the package
Makefiles a bit shorter.
2020-05-21 18:48:43 +00:00
rillig
6c80597618 mk/configure/gnu-configure.mk: disable built-in option check
The rewritten check for unknown configure options already checks for
options that are not defined anywhere.  After that, the configure scripts
don't need to check for these options anymore since all remaining options
are known to the package, in at least one of its configure scripts.
2020-05-21 15:29:25 +00:00
rillig
cc8614f669 mk/configure: completely rewrite check for unknown configure options
The previous implementation could not reliably detect outdated configure
options.  This was apparent in devel/gettext-tools, where the option
--with-included-libcroco had become unknown between May 2019 and May
2020, but the check was not run.

The behavior is the same in the pkgsrc default configuration.  Only if
GNU_CONFIGURE_STRICT=yes, the new check is activated and will make
packages fail that previously succeeded to build.  Since that variable is
not widely known, there won't be much sudden breakage, if any.
2020-05-21 13:42:10 +00:00
rillig
1126482bd5 mk/configure/replace-interpreter.mk: silently skip broken symlinks
Like directories, they probably come from shell globs.

Seen in misc/byobu.
2020-05-18 06:06:34 +00:00
tnn
32e2e5830f g/c references to openjdk7 2020-05-17 00:54:00 +00:00
rillig
67d8ae7d2b mk/subst.mk: change default value for SUBST_NOOP_OK from yes to no
This makes the SUBST blocks stricter than before, to detect outdated or
unnecessary definitions.

Filename patterns that are not affected by any of the SUBST_SED
expressions make the build fail.  It is still ok if only some of the
files from a pattern are affected and some aren't.

The latest bulk build shows that most of the build failures are fixed.
The packages that fail in that build are mostly due to other failures,
like missing C headers, wrong PLIST files, unresolved references at link
time.  There may be a few packages that still fail because of this, but
these are near the leaves of the dependency tree.

https://mail-index.netbsd.org/pkgsrc-bulk/2020/05/14/msg018919.html
2020-05-16 19:02:32 +00:00
rillig
f0feafbfc1 mk/subst.mk: properly detect s,a,a,1 as identity substitution
Seen in games/bastet.  The 1 is not necessary though since it only
repeats the default behavior of sed.
2020-05-16 12:43:10 +00:00
maya
309a5cc299 pkg_create -U doesn't do anything, don't pass the flag. 2020-05-15 22:13:39 +00:00