Previously a "grep" tool was created, but GREP still pointed at the platform
grep, breaking any package that used the environment variables rather than
PATH when the native platform grep does not have GNU features.
When "bmake clean depends" was called for a package where the various
cookie files already existed, these would enable different rules than a
clean package directory.
Since "bmake clean" deletes all the cookie files before "bmake depends"
starts, in these combined command lines the cookie files must be treated
as absent.
If a package had said FLEX_REQD=1000.0, the actual dependency had still
been flex>=2.5.4. Now all version numbers from FLEX_REQD are taken into
account, too.
Before, the tool arguments were written to the log as plain strings. Now
the arguments are properly quoted, which makes it possible to replay the
commands by copying them from the .work.log file.
This only affects tools that are shell builtins (echo, true, false), get
additional arguments (mkdir -p) or define a custom TOOLS_SCRIPT
(pkg-config, to set an environment variable; or autotools). Tools that
are symlinked to the real tool are not affected.
The calls to the compiler are already properly logged since cwrappers
takes care of that. This commit therefore makes the log entries for the
compilers and the other tools more similar.
When a package or the infrastructure defined a tool with custom
TOOLS_ARGS or TOOLS_SCRIPT containing special characters, these could
lead to unintuitive interactions at the time when that tool invocation
was logged in the tool wrapper log. Some of the logging output ended up
on stdout, while some of the normal output ended up in the log, and parts
of the quoted arguments were even evaluated as shell commands.
The logging of the wrapped tool commands is not perfect yet, but at least
it's much more predictable now.
The check to avoid possible dependency loop was not updated to
check devel/nbpatch (instead of devel/patch).
Fix PR pkg/53920 reported by Dean Matzkov.
Up to now, there was a central list of variable name patterns that
defined whether a variable was printed as a sorted list, as a list or as
a single value.
Now each variable group decides on its own which of the variables are
printed in which way, using the usual glob patterns. This is more
flexible since different files sometimes differ in their naming
conventions.
Two variable groups are added: license (for everything related to
LICENSE) and go (for lang/go).
Platform support is determined by _OPSYS_SUPPORTS_CTF from mk/platform, the
user enables support by setting PKGSRC_USE_CTF=yes, and packages can
explicitly disable support with CTF_SUPPORTED=no or skip certain files with
CTF_FILES_SKIP.
The path to ctfconvert is configured via TOOLS_PLATFORM.ctfconvert.
If all of the requisite variables are enabled, a compiler-specific debug flag
is passed via the wrappers to ensure we have DWARF information to convert,
_INSTALL_UNSTRIPPED is explicitly defined to avoid binaries being stripped
prior to conversion, and the conversion is performed during the install stage.
It is recommended that users who enable the feature also set STRIP_DEBUG=yes
to reduce the final binary size once the conversion has been performed.
This has been used for the past year in Joyent SmartOS builds. FreeBSD is
marked as supported but is untested.
This is for when GNU features are required that aren't available in some
other greps, for example -o or --color. If ggrep is requested then it
takes precedence over grep/egrep/fgrep and the GNU versions are used for
all three.
BSD grep aims for GNU compatibility so it is anticipated that it can be
used as a native tool to avoid a dependency on textproc/grep on platforms
that provide it.
This is based on the decision The NetBSD Foundation made in 2008 to
do so, which was already applied to src.
This change has been applied to code which is likely not in other
repositories.
ok board@, reviewed by riastradh@
The "split" program is not managed by the tools framework. It just has a
wrapper that is placed into the same directory. This is confusing since
intuitively, "split" is a tool like many others.
The "duplicate script for target" warning from Make is therefore correct,
albeit obscure.
Currently, neither the pkgsrc infrastructure nor pkglint check for
allowed tool names.
The TOOLS_CREATE variable is only ever appended to, without checking for
duplicates. In some rare cases, this produces warnings about
doubly-defined make targets. An example is adding USE_TOOLS+=strip to
pkgtools/pkglint:
".../mk/tools/create.mk" line 149: warning:
duplicate script for target ".../work/.tools/bin/strip" ignored
The above line number 149 is zero-based, which in reality means the
duplicate definition is in line 150.
there are further issues with circular dependencies which need to be resolved
before the change to using find from coreutils can be made.
Revert previous change for now.
the exec option up until version 9 (Leopard). sysutils/findutils should be used on
prior releases.
This resolves packaging Python modules which utilise lang/python/egg.mk. find(1)
is called here with '{}' +; passed to exec option.
When necessary, the flex version is obtained from the version string reported
by running flex. Generally, the first word of the version string is flex and
and the second is a version number. At least for MacOS, there is a third
vendor-specific word. The sed command previously used to capture the flex
version captured the last word, not the second one, because the first capture
group was too greedy and could capture more than a single word. Instead,
force the capture groups to capture only words, i.e., no blanks, and use the
second word for the version.
This allows setting flags for PaX on select binaries. Two new variables
are introduced for packages: NOT_PAX_ASLR_SAFE and NOT_PAX_MPROTECT_SAFE.
They both expect a list of binaries are known to not support PaX ASLR
and/or PaX MPROTECT, respectively.
"Please commit" wiz@