the makefile and simply handle it in the shell code. This allows for
appending to PKG_OPTIONS_DEPRECATED_WARNINGS in a makefile even after
bsd.options.mk is included.
shell command that is run via the RUN macro. This makes the output a
little more verbose, but when you have the need to set PKG_DEBUG_LEVEL
that high, you can probably need the extra help you get from this
change.
ALL_ENV as well. This ensures that any locale settings are
overridden and the output matches what pkgsrc expects.
This should fix some of the strange bootstrap issues seen over
time that were seemingly fxied by USE_NATIVE_GCC=yes.
than in work/.pkgdb, so as not to lose them in install-clean.
Because of this, put them back explicitly.
(Fixes 'make replace loses +REQUIRED_BY', and also the unreported
'make replace loses +INSTALLED_INFO'.)
telling him to accept a license:
- if MAKECONF is set, use that
- if this is NetBSD and a non-bootstrap make is used, take /etc/mk.conf
- otherwise use ${PREFIX}/etc/mk.conf.
Issues reported by Michael Neumann on DragonFly's user list.
contains files that are generated during the "install" phase. This
should fix the problem where PLIST modifications were ignored if the
PLIST was modified between a "make deinstall" and a "make reinstall".
been replaced which might have had an ABI change. In practice, a
package is considered to maybe have had an ABI change if the version
changes. Introduce a new tag unsafe_depends_strict, which is
unconditionally set on depending packages whenever make replace is
done.
This will cut down considerably on the amount of rebuilding required
with pkg_rolling-replace, while still guaranteing that packages are
rebuilt if there was an ABI change in a dependency.
+INSTALLED_INFO is present, to avoid complaint from pkg_admin (see
pkg/36741). Separate tag removal into a separate target, and use
STEP_MSG and _PKG_DEBUG properly.
fixing up the required-by file. The invariant on unsafe_depends (on
which pkg_rolling-replace depends) is once again maintained, but now
cleanly, rather than assuming that all tags are cleared.
(proposed on tech-pkg with no objections, and concurrence from tnn@)
of the interpreter as the filetype when a file starts with #!
This unfortunately breaks SUBST handling. For now, use a dummy that
claims that every file is a text file.
installed. Idea from one of joerg@'s patches.
Fix 'make readme' and make README.html' targets for individual packages.
Issue reported by Gary Thorpe and David Lord in pkgsrc-users@
before replacing it, and restore it when the new package is installed.
This saves any state information that should be carried over to the
new package, e.g. automatic=yes.
XXX Still need to do the same when "un-replacing".
PKGVULNDIR; else extract the current setting using audit-packages -Q and use
that. In addition to this mkreadme can still be called with -V to specify
a pkg-vulnerabilities file that will override any automatic detection.
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of
the target filesystem
- derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR
- buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR
- compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf)
- PKG_DBDIR is prefixed with _CROSS_DESTDIR
- package-install and bin-install are not called with su
- install and strip are redirected to the tool version
- links for the target specific ar, as, ld, nm, objdump, ranlib and
strip are added
- compiler wrapper detect if linking is requested or not
- special command sinks for CPP and CC/CXX add the cross-compile magic:
- modify include dirs to get the target /usr/include
- modify linker dirs and runpath to use target /usr/lib at link time,
but keep correct rpath entries
Supported-by: Google SoC 2007
Basic tests by he@ on Sparc. Review from jlam@.
shell script. Just specify everything on the command line. Also,
since shlib-type is a plain-old shell script with no bells and whistles,
we can safely run it with "sh" and not "${SH}", which is necessary
because "${SH}" isn't defined at this point.
behavior of just appending to the file without cvs update (or cvs edit
if not writable), for the convenience of those committing multiple
package updates at once. To implement this, split the
update/cat/commit into elementary targets and compose them to form the
user-exposed targets, spiff up the comments, and rationalize .PHONY
usage.
cross-compile support.
- NATIVE_MACHINE_GNU_ARCH, NATIVE_LOWER_ARCH, NATIVE_MACHINE_ARCH,
NATIVE_MACHINE_PLATFORM and NATIVE_MACHINE_GNU_PLATFORM work
like the counterpars without NATIVE_ prefix. Expansion of
NATIVE_LOWER_ARCH and NATIVE_MACHINE_ARCH is enforced early,
so that MACHINE_ARCH can be overriden in mk.conf to specify the
target architecture.
- Provide a default of NO for USE_CROSS_COMPILE. This will be the
main switch to activate cross-compiling and adding it now makes
it possible to merge more of the patches for specific packages.
- Set --build and --host when cross-compiling, the former using the
just added variable NATIVE_MACHINE_GNU_PLATFORM.
Supported-by: Google SoC 2007
Looks good: jlam@
binary-only packages that require binary "emulation" on the native
operating system. Please see pkgsrc/mk/emulator/README for more
details.
* Teach the plist framework to automatically use any existing
PLIST.${EMUL_PLATFORM} as part of the default PLIST_SRC definition.
* Convert all of the binary-only packages in pkgsrc to use the
emulator framework. Most of them have been tested to install and
deinstall correctly. This involves the following cleanup actions:
* Remove use of custom PLIST code and use PLIST.${EMUL_PLATFORM}
more consistently.
* Simplify packages by using default INSTALL and DEINSTALL scripts
instead of custom INSTALL/DEINSTALL code.
* Remove "SUSE_COMPAT32" and "PKG_OPTIONS.suse" from pkgsrc.
Packages only need to state exactly which emulations they support,
and the framework handles any i386-on-x86_64 or sparc-on-sparc64
uses.
* Remove "USE_NATIVE_LINUX" from pkgsrc. The framework will
automatically detect when the package is installing on Linux.
Specific changes to packages include:
* Bump the PKGREVISIONs for all of the suse100* and suse91* packages
due to changes in the +INSTALL/+DEINSTALL scripts used in all
of the packages.
* Remove pkgsrc/emulators/suse_linux, which is unused by any
packages.
* cad/lc -- remove custom code to create the distinfo file for
all supported platforms; just use "emul-fetch" and "emul-distinfo"
instead.
* lang/Cg-compiler -- install the shared libraries under ${EMULDIR}
instead of ${PREFIX}/lib so that compiled programs will find
the shared libraries.
* mail/thunderbird-bin-nightly -- update to latest binary
distributions for supported platforms.
* multimedia/ns-flash -- update Linux version to 9.0.48 as the
older version is no longer available for interactive fetch.
* security/uvscan -- set LD_LIBRARY_PATH explicitly so that
it's not necessary to install library symlinks into
${EMULDIR}/usr/local/lib.
* www/firefox-bin-flash -- update Linux version to 9.0.48 as the
older version is no longer available for interactive fetch.
changes-entry now does cvs update (and cvs edit if needed), and adds
the line. This target will behave the same way (with extra CVS
traffic) if the file is up to date, and will be omre useful if
CHANGES-YYYY is not up to date.
commit-changes-entry depends on changes-entry and also commits. This
target has no behavior changes.
Rename _CCE_FOO variables to PKGSRC_CHANGES_FOO, and merge with
existing varables.
We may need a changes-entry-no-update, or a new name for what
changes-entry does now. Given how infrequently CHANGES-YYYY is up to
date when I want to add, I believe the new behavior will be welcome to
almost everyone.
plist module, it was being "defined" too late, and the pkginstall module
never created any +SHLIBS scripts. Sidestep the tools problems with
SHLIB_TYPE by pretending they don't exist (for now).
XXX SHLIB_TYPE needs to be re-thought or removed altogether.
We can't use our own imake to check for builtin packages so disable the
check and always report that no builtin implementation exists.
No objections on tech-pkg@
former set several USE_TOOLS lines that were being missed by bsd.tools.mk.
Rearrange the +SHLIBS code so that bsd.tools.mk can now be included
after bsd.pkginstall.mk again. The +SHLIBS code has now been moved
over to the plist module, which is so far the repository for all of
the shlib-type handling.
This should fix the problem with fonts handling being broken.
CVSREAD=t, and should result in unchanged behavior with writable
files. Split _CCE_CHANGES definition into _CCE_CHANGES_{DIR/BASE} to
facilitate above.
Use lower case to be consistent with existing license names.
Declare that free/open licenses do not have -license at the end.
Better articulate rationale for default choice.
Add x11 license (also called mit).
Note 'wait and see' stance towards gnu-gpl-v3.
on platforms that need it.
XXX Right now, if the platform needs it, then it runs for every package.
XXX This needs to be fixed to only run for packages that install shared
XXX libraries.
* Move mk/plist/shlib-type to mk/scripts.
* Move definition of SHLIB_TYPE from mk/plist/plist.mk to bsd.pkg.mk.
* Move inclusion of bsd.pkginstall.mk below bsd.tools.mk so that it
can use SHLIB_TYPE. This is necessary because SHLIB_TYPE's value
is the result of evaluating a command, and the command needs "TOOL"
definitions provided by bsd.tools.mk.
allowing PLIST_SRC to be overridden in a package Makefile.
It's now possible to do:
PLIST_SRC= ${PLIST_SRC_DFLT} ${WRKDIR}/PLIST_DYNAMIC
and still use the default PLIST.* fragment handling.
+INSTALL and +DEINSTALL scripts:
PKGINSTALL_VERBOSE
A list of scriptlets that will be verbose and output a message
noting the actions taken.
* "all" is a special value that implies all of the other items
* "fonts" for +FONTS
* "info-files" for +INFO_FILES
Default value: "all" for PKG_DEVELOPERs, empty otherwise.
* Be "one-liner brief" when doing the default actions. For example,
the info files output now looks like:
gmake-3.81: registering info file /usr/pkg/info/make.info
We retain the current verbosity for the CHECK-* actions.
We fix GNU configure script stupidity by directly replacing the stock
install-sh script provided by the software with the BSD install-compatible
sysutils/install-sh script.
A new package-settable variable comes to life:
INSTALL_SH_OVERRIDE is a list of files relative to WRKSRC which
should be overridden by the install-sh script from
sysutils/install-sh. If not defined or set to "no", then
no files are overridden.
Possible values: no, defined, undefined.
Default value: defined when GNU_CONFIGURE is defined, undefined
otherwise.
Get rid of the install_sh tool, which is no longer needed.
accepting the license"; that sounds too close to a contract issue.
Pkgsrc's license framework is merely about not building a package with
a license not on the ok list by accident, and is not intended to have
any contractual effects.
Split comment about 'package user" into separate concepts of
installing binary packages and running programs in packages.
Add XXX about how DEFAULT_ACCEPTABLE_LICENSES relates to the initial
value of ACCEPTABLE_LICENSES.
the owner of all installed files is a non-root user. This change
affects most packages that require special users or groups by making
them use the specified unprivileged user and group instead.
(1) Add two new variables PKG_GROUPS_VARS and PKG_USERS_VARS to
unprivileged.mk. These two variables are lists of other bmake
variables that define package-specific users and groups. Packages
that have user-settable variables for users and groups, e.g. apache
and APACHE_{USER,GROUP}, courier-mta and COURIER_{USER,GROUP},
etc., should list these variables in PKG_USERS_VARS and PKG_GROUPS_VARS
so that unprivileged.mk can know to set them to ${UNPRIVILEGED_USER}
and ${UNPRIVILEGED_GROUP}.
(2) Modify packages to use PKG_GROUPS_VARS and PKG_USERS_VARS.
For now, DragonFly and FreeBSD use the libc version, it is not reentrant,
but thread-safe. NetBSD 3.0+ and Darwin 8.0+ use libresolv from base
(the BIND9 resolver), all other fall back to net/bind9. Feel free to add
your favorite platform if it has a thread-safe resolver in base.
Modify mail/libspf-alf, mail/milter-greylist, mail/spamdyke and
net/nocol accordingly. Testing on !DragonFly and feedback from tron@
This can currently only be set to 'clean' which will result in a
priveleged 'make clean' operation in case any package builds result
in files under ${WRKSRC} that are owned by root.
This is useful for certain packages e.g. python (on NetBSD) and ezm3
and possibly more.
But actually, the default didn't change because EMACS_TYPE is set to
emacs21 in pkgsrc/mk/defaults/mk.conf.
I will clean up all Emacs Lisp packages to be emacs22-capable, then change
the default.
a "^" to the beginning to anchor the expression. No change in the ouput
but on SunOS-5.9 it runs up to 90,000 times faster on some files (probably
much less of an improvement on some, maybe more improvement on others).
Committed during the freeze as bulk builds that call 'make debug' were
unusable.
well-audited as NetBSD's /usr/bin/su. Change the default
SETUID_ROOT_PERMS to 4511 to raise the bar slightly on finding
vulnerabilities in setuid-root binaries.
appropriately again based on the value of _BOOTSTRAP_VERBOSE. This
code was lost in revision 1.27.
This should again suppress the output during "mirror-distfiles" in the
case where the bootstrap dependency is already installed.
other conditionals. Indented all conditionals according to pkglint's
idea of correct indentation.
All packages that use this file must also have some options. Otherwise,
why should they use it at all?
All errors are _appended_ to PKG_FAIL_REASON, instead of overwriting
older ones.
Java binaries. This makes it easier for packages to call the wrapper
instead of the direct binary. See games/cgoban-java/Makefile revision
1.39 for the current approach and the following revision for the simpler
one.
Added _VARGROUPS. Doing that, I realized that BUILD_DEFS corresponds to
_USER_VARS.* and BUILD_DEFS_EFFECTS to _SYS_VARS.*. This redundancy may
be removed in the future.
Removed a redundant comment.
because /bin/sh on Solaris doesn't understand this syntax and bmake
uses this ancient shell.
bmake should really be built with /bin/ksh or /usr/xpg4/bin/sh as the
default shell.
lock, which I think is what was originally intended.
* Avoid creating ${WRKDIR}/.depends when running the bootstrap-depends
target, which is run as part of running the fetch target. We still
create the .depends file later when we need it.
XXX Note that there are still problems when locking occurs because locks
XXX are created in ${WRKDIR}, so running "bootstrap-depends" as a source
XXX for "fetch" will still cause the work directory to be created and
XXX populated with files. This probably needs to be solved by using a
XXX different location for the lockfile, e.g. ${TMPDIR}, for the
XXX bootstrap-depends step.
+BUILD_INFO we must ensure that we only test valid lines from PLIST and
not lines like "@unexec /bin/rmdir..." where "/bin/rmdir" is not a part
of the resulting package.
To achieve this, a stripped version of PLIST, called _PLIST_NOKEYWORDS,
is introduced.
passed to the configure or build phases. This variable holds a slightly
different value depending on whether GNU_CONFIGURE is defined or not --
in the former case, the value is tuned for passing the GNU configure
script.
Automatically pass TOOLS_ENV to GNU configure scripts, so there is no
user-visible change.
depends.mk. The quoting of arrays passed down is almost impossible
to get right. For example, PKG_BUILD_OPTION.* variables can contain
multiple space separated entries but have to be quoted twice.
The original commit exposed two separate issues:
- too many variables are passed down via MAKEFLAGS, including the above
mentioned PKG_BUILD_OPTIONs.
- x11/gtk2 used an invalid variable name that can't be assigned
correctly via make command line.
This is supposed to fix PR 36387.
account that CVS usually leaves empty directories around. This fixes the
bootstrapping after a "cvs update" without the -P option. The error
message leading to it was:
===> running: (cd /home/p/src/devel/bmake && /home/p/pkg/bin/bmake -s
-DPKG_PRESERVE MAKECONF=/home/p/work/mk.conf.example
WRKOBJDIR=/home/p/work/pkgsrc bootstrap-register)
ERROR: [resolve-dependencies] A package matching ``digest>=20010302'' should
ERROR: be installed, but one cannot be found. Perhaps there is a
ERROR: stale work directory for ../../pkgtools/digest?