modified patch from Rin Okuyama
PR pkg/50722: do not hardcode lang/gcc48 in gfortran.mk
"looks ok, needs docs" - wiz
"it'll do for now, ideally I'd like something more robust and possibly
integrate into gcc.mk's path selection" - jperkin
in the default environment and provide a config.site overriding the
default libdir settings. This breaks havoc with our PLISTs and expected
library paths, so kill it.
In particular:
OS_VERSION
MACHINE_GNU_PLATFORM
MACHINE_ARCH
MACHINE_GNU_ARCH
LOWER_OS_VERSION
Reason: Only very few packages really need these, many other have false
positives.
Ok jperkin@
- set a sensible default for OCAML_FINDLIB_DIRS (and factorise out
OCAML_SITELIBDIR)
- make it possible not to register any directory by setting
OCAML_FINDLIB_REGISTER to no
"no" Do not pass any stack protection flags (the default)
"yes" Pass -fstack-protector
"strong" Pass -fstack-protector-strong
"all" Pass -fstack-protector-all
This allows users to configure the level of stack smashing protection they
require, and ensures consistent behaviour across platforms. Users running
on NetBSD who previously used the option will need to change "yes" to "all"
to match the previous default configuration for that platform.
While here use _WRAP_EXTRA_ARGS to ensure the flag gets passed regardless
of whether the package honours CFLAGS, and support additional wrappers.
Discussed a while back with khorben, and used in production for the SmartOS
2016Q1 package sets with the "strong" option.
PKG_VERBOSE.
PKG_VERBOSE currently is mostly used consistently in order to pass the `-v'
option to various commands (FETCH_CMD, PATCH, plist/doc-compress,
pkg_delete(1)).
It is also used internally (and a bit less consistently) in other cases to
provide more information mostly useful only for debugging.
ok <bsiegert>
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@
with what packages such as multimedia/ffmpeg2 expect, and as so few
packages have texi2html in USE_TOOLS it may be causing more problems
that it is worth to save a few dependencies. PR#51113.
script included in the ocaml-findlib package) and removes the need to call
said script explicitly from PLIST.
Packages that use findlib will now automatically add directories that are
in OCAML_FINDLIB_DIRS (set by default to $(OCAML_SITELIBDIR)/${PKGBASE})
to the file ${PREFIX}/lib/ocaml/ld.conf. This behaviour can be disabled by
undefining OCAML_FINDLIB_REGISTER.
been broken due to NATIVE_MACHINE_ARCH no longer being set to x86_64. Fix
this by introducing HOST_MACHINE_ARCH which refers to the underlying host
architecture rather than bmake's native architecture, thus differentiating
between cross-compiling and multilib.
This is currently only set on Linux as the only OPSYS which currently
requires such a test, but can be expanded to other OPSYS as necessary.
This allows fixing an issue with PKGSRC_MKPIE, where "gcc source.c" would
not work. Some packages rely on this test to determine if a working
compiler is available.
- change Linux x86 from sun-jdk6 to oracle-jdk8
- change SunOS x86 from openjdk7 to openjdk8
- change DragonFly from openjdk7 to openjdk8
leave Darwin at sun-jdk6 for now, not sure how the builtin stuff works ...
- No _GCC_* anything in mk/bsd.prefs.mk;
- No compiler flags in platform files.
Tested again on NetBSD/amd64, with and without cwrappers, with the same
outcome.
With feedback from jperkin@
- Revisit (and rename) support for FORTIFY as PKGSRC_USE_FORTIFY (instead
of PKGSRC_USE_FORT) for easier support outside NetBSD/gcc;
- PKGSRC_USE_SSP is no longer enabled by default when PKGSRC_USE_FORTIFY
is enabled;
- PKGSRC_MKPIE builds executables as PIE (to leverage userland ASLR)
- PKGSRC_USE_RELRO builds with a read-only GOT to prevent some exploits
from functioning.
Tested on NetBSD/amd64 by myself, in every combination, with and without
pkgtools/cwrappers. MKPIE is not supported at the moment with cwrappers.
Also, MKPIE is known to still break a number of packages when enabled (and
actually supported).
Tested on SunOS by jperkin@, thank you!
As discussed on tech-pkg@, the default behavior is not changed, except
where noted above.
ok bsiegert@
It turns out a handful of AIX binutil-like utilities are particular
about type of object files they should examine. Instead of piping
through flags for each utility everywhere, it is easier to just export
'OBJECT_MODE=[32|64]' instead.
From Eric N. Vander Weele.
AIX is particular about the type of object files `ar` should examine.
This should be set explicitly to coincide with the user's defined $ABI.
Contributed by Eric N. Vander Weele.
conflict with pkgsrc versions of those packages, and do not interact well
with the wrappers anyway as cmake will perform simple file-based tests for
headers but the compiler will be unable to find them.
overrides for libtool. This allows us to easily get the fixed version
from our libtool in place without having to hunt down for the specific
bugs in random places. Disable the override explicitly in clisp, which
installs a copy without explicitly depending on libtool at run time.
ocaml.mk. It was becoming more trouble than it was worth: only a minority
of packages used it, and it only made Makefiles more confusing.
(I've left out some packages: these will be updated forthwith)
look for print/texlive/*.mk files for help.
Now documentation regarding TeX packages for pkgsrc MAINTAINERs and
developers is easily accessible via the "help" target.
ok wiz@
Up to now, using subst.mk may have led to file corruption during active
package development. This happened when a sed(1) command had a syntax
error, in which case the whole sed(1) command was terminated, leaving an
empty original file behind.
This commit changes that behavior by applying the sed(1) commands to
the original file and saving the result in a temporary file. Only
after that succeeded is the original file overwritten.
During this rewrite, SUBST_POSTCMD has been removed, since it was
only used in one place (mk/wrapper), and since it relied on the exact
sequence of the internal commands. No package in either main pkgsrc
or pkgsrc-wip uses this variable right now.
Previously there were at least 5 different ways MACHINE_ARCH could be set,
some statically and some at run time, and in many cases these settings
differed, leading to issues at pkg_add time where there was conflict
between the setting encoded into the package and that used by pkg_install.
Instead, move to a single source of truth where the correct value based on
the host and the chosen (or default) ABI is determined in the bootstrap
script. The value can still be overridden in mk.conf if necessary, e.g.
for cross-compiling.
ABI is now set by default and if unset a default is calculated based on
MACHINE_ARCH. This fixes some OS, e.g. Linux, where the wrong default was
previously chosen.
As a result of the refactoring there is no need for LOWER_ARCH, with
references to it replaced by MACHINE_ARCH. SPARC_TARGET_ARCH is also
removed.
This goes as far back as 2001 (mk.conf.example) but there should not be any
reason to explicitly set CFLAGS for specific packages. In practice this
even fixes support for global CFLAGS in www/apache{22,24}.
ok gdt@
and checksum scripts.
Fixes the problem where DISTINFO_FILE=../../foo/bar/distinfo doesn't
work without having an extraneous and ugly ${.CURDIR} stuffed into it
by hand.
of software such as Ruby to build on Tiger/PowerPC.
Tested with & without on a G4 with Tiger & Leopard.
It was not needed on Leopard as the linker defaults to a target of 10.5 &
setting it back broke the bootstrap process.
Reviewed by wiz@ long ago.
The find-prefix infrastructure was required in a pkgviews world where
packages installed from pkgsrc could have different installation
prefixes, and this was a way for a dependency prefix to be determined.
Now that pkgviews has been removed there is no longer any need for the
overhead of this infrastructure. Instead we use BUILDLINK_PREFIX.pkg
for dependencies pulled in via buildlink, or LOCALBASE/PREFIX where the
dependency is coming from pkgsrc.
Provides a reasonable performance win due to the reduction of `pkg_info
-qp` calls, some of which were redundant anyway as they were duplicating
the same information provided by BUILDLINK_PREFIX.pkg.
for the memoent:
Because multiple versions of wxGTK cannot currently coexist, the
strategy is to use a single version, with each package building with
it if possible and failing otherwise.
Thanks gdt@ for comments and corrections.
TOOLS_PATH.readelf is set. This is a PKG_DEVELOPER feature and it's
likely the developer is smart enough to either have it already available
in $PATH or be able to install it (e.g. via devel/binutils) if required.
at least on NetBSD. Trying to build with /bin/csh as login
shell leads to a rather cryptic "Illegal variable name" error
message for all bulk-built packages.
copy to the target pkgfile. Ensures consistency at all stages, means we
can support verifying the signature at install time, and also fixes signed
packages with recent pbulk changes which now invoke 'stage-package-create'
rather than 'package'.
the SHA512 digest to the mix of digests we keep for each distfile.
All part of providing stronger digests for pkgsrc, as discussed on
tech-pkg recently, with unanimous agreement. There will be further
changes in this area in the near future, as we transit away from
reliance on SHA1 and RMD160.
New distinfo files will gain a SHA512 digest entry. Existing
verification of distinfo files will just use the SHA1 and RMD160
digests which exist right now.
directory hierarchy to be created but not removed. This is triggered by
the GNU getcwd-path-max.m4 configure test used in lots of GNU software,
and causes the builds to fail in pbulk as 'make clean' cannot complete.
For now we provide a cached result for the test to avoid running it,
using a 'no' value as the test is for a specific glibc bug.
This bug has been brought to Apple's attention by the NixOS developers,
raised as https://openradar.appspot.com/radar?id=6160634819379200. For
now we mark only 10.11.0 (15.0.0) as having the bug - it remains to be
seen whether Apple will fix it in the upcoming .1 release.
the SDK path if we need to.
This avoids issues on Yosemite and Xcode 7, which drops support for the 10.10
SDK. Trying to determine the SDK path fails, but the failure is not cached in
the xcrun database, so each call to a compiler tool is unecessarily delayed (by
around 3 seconds on my build hosts).
For users still on Yosemite who have upgraded to Xcode 7, the solution is to
install the Command Line Tools so that /usr/include is populated and used.
as an acceptable input.
Fixes Pkgsrc for users that set PKG_RESUME_TRANSFERS=yes in their mk.conf if
installing a package that has an interactive fetch stage, after
mk/fetch/fetch.mk revision 1.66.
Tested for all combinations of:
+ PKG_RESUME_TRANSFERS=yes/no; and
+ interactive fetch=yes/no; and
+ distfile=downloaded/not downloaded
... with no signs of misbehaviour.
The specific case that was broken, and this change fixes, is:
+ PKG_RESUME_TRANSFERS=yes; and
+ interactive fetch=yes; and
+ distfile=downloaded
This change was designed with the following considerations:
1. Given it's a freeze, keep it simple.
2. The change in behaviour allows 'fetch' to succeed where it would previously
fail fatally, so it's unlikely to affect any (intentional) existing
behaviour in Pkgsrc.
3. The behaviour of 'fetch' with zero sites is essentially the same as a
fetch where all the possible download sites fail, I.e. Pkgsrc already
expects to handle such behaviour.
ok gdt@
the override site, even for INTERACTIVE_STATE=stage or FETCH_MESSAGE.
Ignore all backup sites as they won't have the distfile anyway, the
fetch wouldn't be interactive in first place otherwise.
Lots of people have been using make replace for many years, at least
since 2006. It hasn't been experimental for most of those years, and
there have been no reports of "data loss".
without arguments, strip(1) will attempt to strip all symbols by default,
and when it is unable to do this will fail with a non-zero exit status.
Passing '-u -r' to strip(1) would in theory resolve the issue, but there
is no simple of way of doing this due to the way strip is called by the
native install program through XCode. We would need to build a patched
bsdinstall for Darwin, so for now we just disable stripping on install,
as many packages have had to do individually up until now.
performance improvements on at least OSX and SunOS, where each file is stat'd
rather than just the links we are looking for, especially with large package
directories over NFS.
host and whether to use native or pkgsrc components.
With the use of builtin.mk in packages, these tests are superfluous and can
prevent the builtin.mk detection mechanism from working correctly.
Discovered on OpenBSD where X11_TYPE native was being used but the native
MesaLib wasn't because a test to check the presence of xorgversin.def
failed, forcing MesaLib to be added to $PREFER_PKGSRC.
Change leading if statement to default to an empty $PREFER_PKGSRC with OpenBSD &
Bitrig defaulting to this, remaining platforms should also be moved here after
testing, this is in preperation for replacing the block with just the default value for
$PREFER_PKGSRC.
Put together with instruction from jperkin@
Reviewed by jperkin@ wiz@
This works in a similar way to the ELF checks, but uses otool(1) to list the
library name and its dependencies, and the checks fail if there are WRKDIR
references or if the -install_name of the library does not match $PREFIX, as
well as ensuring that any libraries from pkgsrc are correctly registered as
full dependencies.
Removes support for the user to set USE_CHECK_SHLIBS_ELF, but there were no
reasonable reasons for doing so in the past anyway, and it may be masking
issues in platform files we should fix.
This is pretty much the same change as with SSP, and completes it with
support for fortify (like USE_FORT in NetBSD's base system). Like SSP, this
is disabled by default for the moment. Like in NetBSD's base system,
enabling fortify explicitly also enables SSP by default - but SSP can still
be disabled explicitly in this situation.
All four combinations tested on NetBSD/amd64.
With this change, the check if the current architecture is supported is
only performed if SSP is enabled in the first place. This should not
change the current behavior; tested on NetBSD/amd64.
Suggested by wiz@
This is enabled with PKGSRC_USE_SSP in mk.conf(5), as documented there.
Most NetBSD platforms are supported (when compiling with gcc).
After consensus on tech-pkg@.
Operating Systems.
For SmartOS, store the result from running uname -v & trimming the joyent_
prefix.
For OmniOS, store the result from processing /etc/release with awk(1)
Reviewed by joerg@ bsiegert@
problems that are fixed by using the pkgsrc version, and no platform
other than Cygwin tries to use a native version.
Consensus is that due to the limited impact and clear benefit this is
ok to go in during the freeze despite being an infrastructure change.
Initial patchset to add support by rodent@
Further adjustments made based on feedback by joerg@
Tested by myself with numerous bulkbuilds thanks to Patrick Wildt @ Bitrig
Reviewed by bsiegert@ joerg@ wiz@
wrapped version by full path. This fixes some cases where the wrappers
have been bypassed. lang/lua52 triggered the investigation as it failed
to link against libreadline, which should have been translated to
libedit. Tested by jperkin and myself with full bulk builds.
to NetBSD 6.1)
introduce compat61 (and compat61-x11 with it) as a backward compatibility
package to NetBSD 7
add compat61* to mk/emulator/netbsd-compat.mk and emulators/Makefile
some sort of version for the binary compat packages might have been
useful, maybe abusing the DIST_SUBDIR? compat61 is likely to change
if/when NetBSD 6.2 is released
http://ctan.org/license/gfsl
Since this is basically the LaTeX Project Public License with one clause
removed, add it to the default acceptable licenses.
(lppl is fine with both OSI and FSF and already allowed.)