This is based on a patch submitted on 16/04/2017 on tech-pkg@ and
adapted by joerg@ for pkgtools/cwrappers. It only consists in the
missing part to actually generate PIE executables with cwrappers if
configured to do so (currently disabled by default). The aim is really
to produce safer binaries where ASLR is in use.
This part in pkgsrc is only supported on NetBSD (x86) with GCC at the
moment.
Tested on NetBSD/amd64, with and without cwrappers, with and without
PKGSRC_MKPIE (all four combinations).
Only pass "-C ${CONFLICTS}" to pkg_create(1) if ${CONFLICTS} is
non-empty; otherwise, a fatal error occurs. This allows CONFLICTS
to be defined, but empty.
Move the definitions of LDCONFIG_ADD_CMD and LDCONFIG_REMOVE_CMD
into suse_linux/emulator.mk. The commands are specific to the
Linux installed, including the path to ldconfig(8), so localize
them to the package that provides it.
Move the definition of RUN_LDCONFIG out of the emulator framework
and into the packages that use them as RUN_LDCONFIG is meant to be
a package-settable variable.
Fix the path to the Linux ldconfig(8) that was used on FreeBSD to
brand the ELF format that has been incorrect for over 10 years.
In the suse_base packages, explicitly set LDCONFIG_REMOVE_CMD to
${TRUE} since the ldconfig(8) command is provided by that package
and can't be invoked at the postremove stage because it has already
been deleted from the system by then.
Bump the PKGREVISION of all the suse_base packages because the
install scripts have changed.
Bump the PKGREVISIONs of the darwin_lib and osf1_lib packages
because the install scripts no longer try to run ldconfig(8),
which is not provided in either OpenDarwin or OSF/1.
The pkginstall framework had an UNPACK action invoked early
in the PRE-INSTALL stage to unpack scriplets that were invoked
in later stages to perform extra work for installation, removal,
or both.
Add an UNPACK action that is a no-op for any scripts that don't
support the action.
The postinstall check was improperly skipping the last N items
listed in CONF_FILES (and related) variables when verifying that
there is a multiple of N items listed. Fix the bounds check.
The shell code used to check for the existence of the source files
listed in the various CONF_FILES (and related) variables has been
refactored out into a separate macro variable. In addition, the
macro has been modified to only emit a warning if the source file
is not in ${PREFIX} and can't be found on the host system.
This supports using /dev/null as a source file, which is a common
idiom for creating an empty target file, even if ${DESTDIR} is
non-empty.
Replace @VAR@ with ${VAR} unconditionally in scripts, even if they
values are empty. This will allow for fall-through to using the
pkgtasks hard-coded defaults, usually found by searching the PATH
contents, and it avoids having ugly "@VAR@" in the generated
scripts.
changing the permission of ${PACKAGES} at the end of the script prevents that
from working.
Undo the change in r1.4 to create the All directory during setup & instead do
not change permissions.
Tested on OS X Tiger & FreeBSD.
Heads up by joerg
[1] http://mail-index.netbsd.org/pkgsrc-changes/2017/08/01/msg160826.html
The return values of the postinstall and postremove meta-tasks are
ignored unless the user-settable variable ${PKG_FATAL_ERRORS} is
"yes". ${PKG_FATAL_ERRORS} defaults to "no" to preserve the
existing behavior of install scripts by mk/pkginstall.
If ${DESTDIR} was non-empty and the source file was an absolute
path, the postinstall check target defined in mk/pkgtasks/files.mk
was improperly failing. Fix the bug by only prepending ${PREFIX}
if the source path is relative, and always prepending ${DESTDIR}.
Add definitions for the gtk-update-icon-cache(1) command to the
script header template, and a makefile fragment that creates the
data file for the "icon_themes" package task if ${ICON_THEMES} is
"yes" in the package Makefile.
Also bump pkgtasks dependency to version 1.12 for the "icon_themes"
package task and compatibility with pkgsrc/mk/pkginstall.
These should be explicitly set in the scripts, otherwise, the
pkgtasks defaults are used by locating programs in the $PATH
or are hardcoded defaults used for testing pkgtasks.
For target files listed in CONF_FILES (and other config file
variables), assert that the containing directories are named in
MAKE_DIRS or one of the other directory variables.
Change the assertion into an install-time check that the paths
listed in INSTALLATION_DIRS are relative paths or are in ${PREFIX}.
This delays the check so that some common variables used when
listing directories in INSTALLATION_DIRS are fully-expanded.
This appears to be causing issues with pkgsrc GCC attempting to insert
builtins it does not have, because we don't build libssp. unbreaks icu build.
there may be more problems from this issue in the future, but netbsd-7 is
better tested now.
Add an assertion that all paths listed in INSTALLATION_DIRS must
either begin with ${PREFIX}/ or are relative paths. Clarify in the
documentation that INSTALLATION_DIRS can list either type of path.
Some packages are using INSTALLATION_DIRS to create directory trees
outside of ${PREFIX}, e.g., under ${PKG_SYSCONFBASE} or ${VARBASE}.
However, these directories are only created as part of the
"install" target, which causes them to only be created during the
staged installation into ${DESTDIR} and not at all if their binary
packages are installed. These packages should be fixed to use
MAKE_DIRS or OWN_DIRS to create these directory trees at the proper
time.
creates or updates the checksum. Allows users to set FAILOVER_FETCH in
mk.conf unconditionally and be able to update distinfo files without
first having to remove them.