When parse-guessing a package Makefile, lintpkgsrc tries to evaluate
variable expressions such as ${VAR:S,from,to,} by passing them through
Perl's eval function.
In a variable expression of the form ${VAR:S,@exec@,${exec},}, this
produced Perl warnings due to the unescaped '@':
Possible unintended interpolation of @exec in string at
(eval 63841) line 1.
As a quick fix, skip ':S' modifiers that contain the character '@' for
now. A proper fix will follow.
- New option `sysroot=<dir>':
. Wrapper will add `--sysroot=<dir>' as first argument.
. For every rpath argument, e.g. -Wl,-R<path> to cc, wrapper will
pass `-rpath-link <dir><path>' to the linker.
This matches the old mk/wrapper/cmd-sink-cross-* logic.
- Create wrappers for the ${MACHINE_GNU_PLATFORM}-cc style of command,
as in ${CC}, ${CXX}, ${LD} for cross-builds.
- Bump version.
- Use TOOL_DEPENDS, not BUILD_DEPENDS, for cwrappers.
Changes since 21.4.4:
Python packages that declare 2.7 as an incompatible Python version no
longer need to provide a rationale for this since it is common knowledge
that Python 2.7 is old and therefore unsupported by many modern
packages.
Changes since 21.4.2:
In simple Makefiles, do not allow the GitHub variables like
GITHUB_RELEASE to occur above DISTNAME anymore. Previously, these
variables had 2 possible places in the "canonical" order.
gcc 11 with -O2 optimizes away the store of the bit length into the
last 8 bytes of the context buffer due to an aliasing violation
(stored through uint64_t, retrieved through uint32_t).
To fix this, import the NetBSD patch from christos[0] which makes
it use memcpy instead.
[0] http://cvsweb.netbsd.org/bsdweb.cgi/src/common/lib/libc/hash/sha2/sha2.c.diff?r1=1.12&r2=1.13
Previously, it was necessary to create the package directory, change
into it and then run url2pkg from there. Since the name of the package
directory usually corresponds to DISTNAME without the version number,
all necessary data is readily available, so automate this.
Update version to 21.4.2.
In a few commits, this will allow url2pkg to be run from a category
directory, thereby omitting the need to create the package directory
manually.
No functional change.
Changes since 21.4.1:
When checking a package, check for naming collision with other packages
from the same category, on case-insensitive file systems. For packages
from pkgsrc-wip, additionally perform the same check for the main
category of the package, to prepare for importing the package.
In the first phase, url2pkg generates a minimal package Makefile, barely
enough for downloading the distfile from the given URL. That part runs
fully automated in almost all cases, so there is no need to invoke the
editor at this point.
After adjusting the package Makefile based on the downloaded and
extracted distfile, url2pkg has done its job, so there is no reason to
run the editor there as well.
Bump version.
The warning was:
Bogus: -${DISTNAME:tl:S/-1$//1}
(from /.../devel/lua-moses/Makefile)
Previously, lintpkgsrc searched for the package name and version by
looking for '-' followed by a digit. This was too naive, as in the
above expression, the '-1' does not mark the beginning of the version
number. Fix this by resorting to 'make show-vars' in all cases in which
the PKGNAME still contains a '$'.
When running 'lintpkgsrc -Dp devel/lua-moses' with a relative directory
as argument, lintpkgsrc tried 'cd /lua-moses' and ignored the failure,
running 'make show-vars' in the current directory instead, which in my
case was the top-level pkgsrc directory.
Bump version.
Changes since 21.4.0:
Running 'pkglint doc/CHANGES-2021' now warns about issues for this
single file. Previously, it was necessary to specify '-Cglobal' as
well, but then pkglint also warned about issues in all other CHANGES
files.
Pkglint no longer warns about the characters '!' and '@' in
GO_MODULES_FILES, since these are legitimate. Fixes PR pkg/56595.
Small cleanups in the pkglint testing infrastructure.
vfork() no longer works on Monterey and causes serious intermittent issues
when upgrading pkg_install. Forking the INSTALL and DEINSTALL scripts can
sometimes fail, due to the underlying pkg_add/pkg_delete binaries having
been changed or removed, leaving the system broken with no package tools.
The manual page suggests using posix_spawn() instead and that appears to
work correctly. The code has been laid out so that it's easy enough to
switch other platforms to posix_spawn() too if required, or for improved
performance, and has been verified to work successfully on SmartOS.
Bump pkg_install version to 20211115.
Changes since 21.1.0:
When creating a package from a GitHub archive URL, make the generated
package simpler and place the distfile in the main directory instead of
using DIST_SUBDIR.
Changes since 21.3.2:
Explain warning about invalid symlink.
Do not warn when a package uses MAKE_JOBS without adding it to
BUILD_DEFS, since MAKE_JOBS is supposed to be a build-time only
variable.