the correct information to the +INSTALL and +DEINSTALL scripts to fix
problems with binary packages incorrectly locating the reference counts
database, e.g. /var/db.refcount.
+RCD_SCRIPTS, and +PERMS subscripts to handle copying config files
and rc.d scripts, and setting special permissions on files. The +FILES
and +RCD_SCRIPTS are basically identical except for different embedded
packets of data, and they feature reference-counting for the files in
case multiple packages share the same config file.
Garbage-collect unused functions and definitions in the install scripts
now that the subscripts are self-contained.
this, we only need some simple logic in java-env.mk to automatically
generate an ALTERNATIVES file for us.
There are two exceptions, though: fastjar and jikes (pointed out by tv@),
which do not use this file; they have to be handled manually.
Bump PKGREVISION for all affected packages.
While doing this, remove the java-wrapper package, obsoleted by the new
functionality provided by pkg_alternatives.
now simply make ${PKG_REFCOUNT_DBDIR} always be ${PKG_DBDIR}.refcount
so that it always follows the location of ${PKG_DBDIR}. This preserves
the ability for PKG_DBDIR (and PKG_REFCOUNT_DBDIR) to be different on
different machines despite using the same binary packages.
of ${PKG_DBDIR} to avoid problems with the package tools thinking that
it is a bad package. The default directory is ${PKG_DBDIR} with
".refcount" appended to the name. This may be set explicitly through
PKG_REFCOUNT_DBDIR in /etc/mk.conf (bootstrap users may want to do
this, although the default value should do the right thing).
CHECK-REMOVE. The users and groups are now printed on the same line
with whitespace separating the entries (for easy copy-and-pasting info
commands), and wrapping to successive lines if we overflow the length
of the current line.
list of +DIRS-maintained directories. This allows for a package to
specify where its config files should go and creates the directory
automatically, even if it doesn't have any example config files to
put in place.
script that is unpacked by the +INSTALL script at PRE-INSTALL time
before any other actions take place, and invoke +USERGROUP to create
any necessary users and groups. Remove the now-unused code for
PKG_USERS and PKG_GROUPS from the install and deinstall templates.
We also reference count the users and groups and store the reference
counts in ${PKG_DBDIR}/.refcount/{users,groups}. This allows multiple
packages to register that they use same users and groups, and allows
+USERGROUP to be invoked at any time to repair an installed package.
Also fix the install and deinstall templates to invoke the CHECK-*
actions with ${PKG_METADATA_DIR} so that the correct PKGNAME can be
derived. This fixes the weird messages asking the user to create
directories for ".pkgdb" during a "make install".
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
This ensures that it's always created with the same user/group/mode
as ${WRKDIR}, so if a non-root user thinks he has permissions to remove
${WRKDIR}, then that expectation will remain true for ${PKG_DB_TMPDIR}.
(...and if it were optional, it should have been an .sinclude anyway.)
Sanity: If mk/platform/${OPSYS}.mk is missing, don't assume NetBSD is it.
pkgsrc now depends on a valid platform file for an OS, so require it.
(Still includes NetBSD.mk, but sets PKG_FAIL_REASON.)
spot that will come before compiler.mk (in bsd.prefs.mk). Previously,
LOCALBASE/bin was appearing earlier in the path than work/.<compiler>/bin,
which could cause the Wrong Thing to happen.
-L/some/where -lfoo so that the arguments we push on the stack are actually
used in logic.
Should solve the issue build bash with option 'static' enabled reported on
netbsd-users.
OK'd by jlam@.
Convert _OPSYS_MAX_CMDLEN to a plain _OPSYS_MAX_CMDLEN_CMD variable, which
is not evaluated by a shell until CONFIGURE_ENV is expanded (and only then
if USE_LIBTOOL+GNU_CONFIGURE are both set).
which is similar to PKG_CONFIG. This does not change how the binary packages
are built, only whether the pkg_alternatives command should be run at package
installation/deinstallation time or not. The variable can take either YES or
NO as values and defaults to YES.
A package can optionally provide an ALTERNATIVES file which contains pairs
of wrapper/alternative, one per line. The file is then used by the install
and deinstall scripts to register the alternatives and to create the
appropriate wrappers.
Make bsd.pkg.mk include this new file. This happens unconditionally to
keep all the alternatives logic in an independent file. Otherwise, some
of the stuff could have to be moved to bsd.pkg.mk, breaking consistency.
Collect many modifiable hard-to-find variables scattered throughout
bsd.pkg.mk into a common section near the top of the file. (Not necessarily
"complete", but helps to reduce HEAD-branch divergence.)
Also move its definition later in bsd.pkg.mk, so that it actually works
for compiler/*.mk (which is why those files originally had to provide
"defaults" for their variables -- they never did get evaluated).
No need to do .som_done dance; just show the message as part of the
pre-extract phase. If that means showing it more than once if the extract
is interrupted and restarted, no harm done.
packages they upload (by setting the optional variable MKSUMS=yes) and,
also optionally, PGP signing them (by setting SIGN_AS=username@NetBSD.org,
for example).
the meta-data files are generated and stored in ${PKG_DB_TMPDIR} by
the *-install-fake-pkg targets, and then all of the contents of that
directory are simply copied into ${PKG_DBDIR}/${PKGNAME} by register-pkg.
This is intended to make (DE)INSTALL scripts be more powerful.
Currently, they have no way to keep state on their own. Now, they
can keep state in the current working directory. When invoked by
pkg_add(1), the current working directory is ${PKG_DBDIR}/${PKGNAME},
so the state files are already stored in the correct place. When
invoked by bsd.pkg.mk, the current working directory is ${PKG_DB_TMPDIR},
and any state files generated by the (DE)INSTALL scripts are copied
into the correct place by the register-pkg target.
split the fake-pkg target into three smaller pieces:
pre-install-fake-pkg - Create files in ${WRKSRC}/.pkgdb meant to be
installed into ${PKG_DBDIR}/${PKGNAME} that don't depend on
the installed files.
post-install-fake-pkg - Create files in ${WRKSRC}/.pkgdb meant to be
installed into ${PKG_DBDIR}/${PKGNAME} that may depend on the
installed files.
register-pkg - Copy the files in ${WRKSRC}/.pkgdb and create a few
additional meta-files in ${PKG_DBDIR}/${PKGNAME}.
The idea is that ${WRKSRC}/.pkgdb contains as much of the state as
possible that will be copied into ${PKG_DBDIR}/${PKGNAME}.
The INSTALL and DEINSTALL scripts generated by bsd.pkg.install.mk are
now invoked with ${WRKSRC}/.pkgdb as the working directory, so the
scripts may use the working directory to store temporary files,
regardless of whether they're invoked from bsd.pkg.mk or by pkg_add.
one fork/exec step on platforms where gcc is compiled with hardcoded gcc-lib
pathnames. This applies to most platforms, but the default currently
remains not to use symlinks so as to avoid unexpected gotchas for users.
binpkg timestamps, and ${PKGDIR} file timestamps, will be used to
determine if a rebuild is necessary. If changed to "no", then rebuilds
will only happen when PKGNAME actually changes.
* Add LINTPKGSRC_DB (and companion USE_LINTPKGSRC_CACHE, default "no") to
make pre-build generate a reusable database with "lintpkgsrc -E"; helps
with nfs-mounted pkgsrc. A future change will allow use of this in the
upload script.
* Add entry for PRUNEPACKAGES in build.conf-example (this was missing).
arg-pp-main, and allow for wrapper-specific hooks to extend the
pre-processing through _WRAP_ARG_PP.<wrappee>. Move the Darwin
GCC-related preprocessing into arg-pp-darwin-gcc, and create a
arg-pp-mipspro-cc that understands -LANG:<feature> and -LIST:<feature>
so that they're not confused with the usual -Ldir options.
- Move the previous block of code down in the file so that all used variables
are defined (specially PKG_SYSCONFDIR). Fixes a problem noticed by
kristerw@'s bulk build in comms/minicom.
- Ignore diff's return code, which aborts make in NetBSD 1.6.2. Also noticed
by kristerw@'s bulk build.
- Use full paths to do the checks, instead of relative to ${PREFIX}. Less
ambiguity. Matches should be turned into regular expressions that anchor
to a whole line (tried that, but found some problems).
- Turn CHECK_FILES to NO by default. As said in the previous point, there
are still some problems that have to be fixed and minor improvements to
be done. And I have no time to fix this ATM. Yes, this definitely needs
more testing. I'm sorry for all the noise. (But hey! you should set and
try this feature locally! ;-)
to CHECK_FILES_SKIP to avoid some false positives. These directories are
created in the pre-install stage so are included in the generated file list.
The files are also added to silence some problems that may arise during
"make replace". Found by wiz@ in the gtk2 package.
packages do not install more files than expected (nor delete existing
files), aside other sanity checks in PKG_SYSCONFDIR and VARBASE.
This behavior is only enabled if PKG_DEVELOPER is set and CHECK_FILES
is YES (the default). Should let us catch problems in other systems,
as some packages install different files depending on the OS they are
being built (which is different to see).
Furthermore, since the sanity checks done in PKG_SYSCONFDIR and VARBASE
are quite agressive, only enable them when CHECK_FILES_STRICT is YES
(defaults to NO). Developers should enable this feature to detect errors,
but this can't be a default yet. Otherwise, lots of packages could be
marked broken in bulk builds (they really are, according to "cleanliness"
rules, but most of them are non-trivial to fix).
grepping, run make to get MAINTAINER's value. I've tested this with
a script that tries to "simulate" this one without problems, but I
can't test it "in place".
in their tests for built-in versions of the PAM implementations. The
MacOS X case now collapses nicely into the linux-pam case. Allow
pam.buildlink3.mk to use solaris-pam as an accepted PAM implementation.
It includes the correct buildlink3.mk file from either Linux-PAM
(security/PAM) or OpenPAM (security/openpam) and eventually will
support solaris-pam. pam.buildlink3.mk will:
* set PAMBASE to the base directory of the PAM files;
* set PAM_TYPE to the PAM implementation used.
There are two variables that can be used to tweak the selection of
the PAM implementation:
PAM_DEFAULT is a user-settable variable whose value is the default
PAM implementation to use.
PAM_ACCEPTED is a package-settable list of PAM implementations
that may be used by the package.
Modify most packages that include PAM/buildlink3.mk to include
pam.buildlink3.mk instead.
* Add optional verbosity to show most commands as they are being executed.
* "use strict" and "use warnings".
* Slurp in the varables from build.conf and bmake in one shot (amazing
startup speed boost with nfs pkgsrc); put them in a hash to make
"use strict" much happier with the namespace.
* Fix a bunch of undef-dereference errors evidenced by "use warnings".
* Exclude PKG_DBDIR from leftovers list if it is inside LOCALBASE.
* Convert some <a name="..."/> constructs to <a name="..."></a> to make
non-XHTML-compliant browsers happier.
containing constructs of the form
{perl>=5.8.3nb1,perl-thread>=5.8.3nb1}
is that a Bourne shell "for" interprets this as two separate items in the
list, nuking the {}s. The above will never succeed and thus always cause
Perl-dependent packages to be rebuilt unconditionally.
Just adding more \s isn't enough -- the parsing of the depends list has to
be moved out of the "for" clause. So, echo them one per line and use "read"
to pull them in without allowing the shell to peek at those characters.