variable before if it had multiple adjacent white-space characters in
it. Removed the dependency on awk(1), as a simple shell script can do
this job, too. Another change is that all kinds of weird pathnames can
be used for PREPEND_PATH, like /bin, "/bin/Program Files", "/ ",
/foo\ bar, and so on. This had not been possible before, too.
Related to PR 32079.
Ok'ed by jlam.
directories listed in INSTALLATION_DIRS are created in ${PREFIX}, but
it's now okay to include ${PREFIX} at the front of each, directory,
e.g. this is now okay:
INSTALLATION_DIRS+= ${PREFIX}/bin
Makes using this variable a bit less unwieldy sometimes.
modified) to not rely on this change, the default value of BUILD_DIRS
can be set to ${CONFIGURE_DIRS} instead of ${WRKSRC}. There are far more
packages setting CONFIGURE_DIRS and BUILD_DIRS to the same value than
there are packages needing different values, so this default seems more
reasonable. Now the default values are:
CONFIGURE_DIRS?= ${WRKSRC} # (unchanged)
BUILD_DIRS?= ${CONFIGURE_DIRS}
INSTALL_DIRS?= ${BUILD_DIRS} # (unchanged)
they had been before my last change. I had thought it would be more
intuitive if they were based on GNU_CONFIGURE_PREFIX instead of PREFIX,
but this might break some packages.
Up to now, a package that wanted to use a different location for
--mandir had to first define CONFIGURE_HAS_MANDIR=no and then
CONFIGURE_ARGS+=--mandir=${...}, which looks weird. Now it only has to
set GNU_CONFIGURE_MANDIR.
relative to ${WRKSRC}. This makes it possible to shorten definitions
like "BUILD_DIRS=${WRKSRC}/foo ${WRKSRC}/bar" in package Makefiles to
"BUILD_DIRS=foo bar". Almost all current uses of those directories are
given as absolute directories (mostly in the form ${WRKSRC}/foo), which
will work as they did before.
pathname relative to ${PREFIX} of directory holding the manual pages
and man directories. I have been using this for over two years.
This defaults to "man" so no change.
If using GNU_CONFIGURE then set --mandir. (Unless CONFIGURE_HAS_MANDIR
is no because some old GNU configure scripts are too old. This is
similar to existing CONFIGURE_HAS_INFODIR.)
Add PKGMANDIR to PLIST_SUBST. Add plist awk pattern-action statement
to convert man/ to ${PKGMANDIR}/. (This might need to be double checked
for some PLISTs that prefix some custom settings in front. qmail
used to do this, but now I see it does not.)
When "Decompressing manual pages" convert man/ also.
I have several other changes to commit for individual packages.
I chose not to modify the INSTALL_MAN or INSTALLATION_DIRS
to also convert man/ to PKGMANDIR/ because I thought this may
make it more confusing. So instead, I modify the individual
uses of these instead. (Todo: modify pkglint to check for this?)
(agc@ of the pkgsrc-pmc asked me to make these changes.)
for cat pages having "[0-9]" suffixes instead of just "0".
Some systems install cat pages with suffix number same as the cat
section number.
(This has been in my pkgsrc tree for probably a couple years,
but looking today, I do see man/cat1/ftp.1 on one of my systems.)
file of the package. It does _not_ replace the LICENSE variable. The
variable is currently only used in the show-license target. It is
intended that LICENSE_FILE is used for licenses that only apply to a
single package or a package group, so that the number of licenses in the
licenses/ directory is kept small.
around at either build-time or at run-time is:
USE_TOOLS+= perl # build-time
USE_TOOLS+= perl:run # run-time
Also remove some places where perl5/buildlink3.mk was being included
by a package Makefile, but all that the package wanted was the Perl
executable.
script that will make the directory later. This fixes the problem
where it fails when doesn't have write access -- for example use
"make fetch-list" to create the shell script to use on another
system.
Thank you, Geert Hendrickx, for your feedback.
Also in a few places echo ${fetchfile:T} instead of ${fetchfile}.
(Todo: maybe should not say "not fetched" until has tried all sites.)
a new bsd.pkg.check.mk file. This new file will eventually collect
all of the various "check" targets that are run at install-time.
While here, change the implementation of check-files so that it is
not so monolithic.
Change the meaning of the CHECK_FILES variables so that if it's not
"no", then the file checks are run. Also, allow these checks to be
run if the user explicitly sets CHECK_FILES in /etc/mk.conf, even if
PKG_DEVELOPER is not defined.
are checked for ${WRKDIR}, but all files are checked for ${TOOLS_DIR}
(assuming that ${TOOLS_DIR} is in ${WRKDIR}). Also, let CHECK_WRKREF_PKG
set the name of the package to check.
for a package and looks for references to the build directory. If
any such references are found and PKG_DEVELOPER is defined, then exit
with an error. This target is automatically run after a package is
installed if CHECK_WRKREF is "yes". The default value for CHECK_WRKREF
is "no".
You can specify certain files to be skipped during the check by setting
CHECK_WRKREF_SKIP to a list of shell globs. Installed files that
match these globs are skipped when running the check-wrkref target.
The original implementation was from Dan McMahill sent to me in private
email. I've added a few more bells and whistles for this commit. This
target will be helpful for catching any unwrapped files or mis-embedded
tool paths.
* Improve the documentation.
* Avoid running commands during Makefile processing by using the :sh
modifier instead of defining variables using !=
* Add a new variable PKGSRC_CHANGES that holds the path to the CHANGES
file to be modified.
* Use ${ID} and ${DATE}, which are provided by the tools framework and
avoid PATH issues.
into pkgsrc/doc/CHANGES.
The type of the entry depends on what CTYPE is set to, which defaults
to "Updated". Other possible values are "Added", "Renamed", "Moved",
and "Removed". An example usage would be:
cd /usr/pkgsrc/category/package
make changes-entry CTYPE=Added
after you added a new package, and similar for the others.
If NETBSD_LOGIN_NAME is not set in /etc/mk.conf, it defaults to
your local login name.
through to dependencies, which caused dependencies to have improper
lists of tools required.
XXX This whole mess with MAKEFLAGS and which ones are passed along when
XXX running the install-depends target needs to be fixed for real.
Several changes are involved since they are all interrelated. These
changes affect about 1000 files.
The first major change is rewriting bsd.builtin.mk as well as all of
the builtin.mk files to follow the new example in bsd.builtin.mk.
The loop to include all of the builtin.mk files needed by the package
is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk
is now included by each of the individual builtin.mk files and provides
some common logic for all of the builtin.mk files. Currently, this
includes the computation for whether the native or pkgsrc version of
the package is preferred. This causes USE_BUILTIN.* to be correctly
set when one builtin.mk file includes another.
The second major change is teach the builtin.mk files to consider
files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most
of the builtin.mk files test for the presence of built-in software by
checking for the existence of certain files, e.g. <pthread.h>, and we
now assume that if that file is under ${LOCALBASE}, then it must be
from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The
exceptions to this new check are the X11 distribution packages, which
are handled specially as noted below.
The third major change is providing builtin.mk and version.mk files
for each of the X11 distribution packages in pkgsrc. The builtin.mk
file can detect whether the native X11 distribution is the same as
the one provided by pkgsrc, and the version.mk file computes the
version of the X11 distribution package, whether it's built-in or not.
The fourth major change is that the buildlink3.mk files for X11 packages
that install parts which are part of X11 distribution packages, e.g.
Xpm, Xcursor, etc., now use imake to query the X11 distribution for
whether the software is already provided by the X11 distribution.
This is more accurate than grepping for a symbol name in the imake
config files. Using imake required sprinkling various builtin-imake.mk
helper files into pkgsrc directories. These files are used as input
to imake since imake can't use stdin for that purpose.
The fifth major change is in how packages note that they use X11.
Instead of setting USE_X11, package Makefiles should now include
x11.buildlink3.mk instead. This causes the X11 package buildlink3
and builtin logic to be executed at the correct place for buildlink3.mk
and builtin.mk files that previously set USE_X11, and fixes packages
that relied on buildlink3.mk files to implicitly note that X11 is
needed. Package buildlink3.mk should also include x11.buildlink3.mk
when linking against the package libraries requires also linking
against the X11 libraries. Where it was obvious, redundant inclusions
of x11.buildlink3.mk have been removed.
doesn't happen until after the package is extracted. Prior to
extraction, cache the variables named in MAKEVARS using MAKEFLAGS
instead. This avoids invoking each expensive computation up to four
times before it gets cached. For packages that include lots of
buildlink3.mk files, this saves a lot of CPU time.
operator does not result in an empty string as make(1) doesn't like
them. Also, rewrite the variable substitution for the find(1) command
to be more readable, and get rid of the extra grep(1) in favor of
using :N.
variables that use the :sh modifier. This still causes expansion to only
happen when referenced, and has the advantage of being :Q-safe.
Bring back the changes from revision 1.19 of mk/subst.mk now that the
problem noted above has been fixed. This passes the buildlink-unwrap
regression test.
- completely redo the code which decides on the machine architecture,
operating system, and operating system version for the binary packages.
The old way just used to directory names to take a guess. The new
way creates a cache file containing meta-data for all the binary packages
in each "All" directory. This cache file is consulted when generating
the lists of available binary packages. The meta-data is obtained with
pkg_info so it should always be correct even if you do something silly
like mix OS_VERSION or MACHINE_ARCH packages up in the same directory.
Among the benefits are: works when PACKAGES is not $PKGSRC/packages,
works with a more or less arbitrary subdirectory structure, works
when there are subdirectories for multiple operating systems.
This portion of the fix should address PR25390.
The cache files are only updated when the contents of an "All" directory
changes or if the cache file format changes. There is some room for
improving the updating of the cache files, but its not too bad the way
it is.
- fix up some of the awk code so that generadme.awk works with Solaris
nawk as well as NetBSD's nawk and gawk (for pre-2.0 systems).
- remove some "if ! foo" shell constructs to increase portability.
- be more consistent with what variables get passed to mkreadme from
make and which ones are determined automatically. Mostly this meant
moving stuff into mkreadme to make it easier to run it standalone.
which can take multiple values -- "pax" or "gtar". The default value
of EXTRACT_USING is "pax", which more closely matches reality since
before, we were using bootstrap "tar" for ${GTAR} and it was actually
pax-as-tar. Also, stop pretending pax-as-tar from the bootstrap kit
or on NetBSD is GNU tar. Lastly, in bsd.pkg.extract.mk, note whether
we need "pax" or "gtar" depending on what we need to extract the
distfiles.
the final man pages to be compressed. If MANZ is not defined, then
we want the final man pages to be uncompressed.
We need to figure out if during installation, we need either gunzip
or gzip to decompress or compress the installed man pages. If a
package sets MANCOMPRESSED to "yes" or "no", then it's an indication
to the install code that the package itself installed the man pages
either compressed or uncompressed. If a package sets
MANCOMPRESSED_IF_MANZ, then the package uses BSD-style makefiles, so
we need to determine if the BSD-style makefile causes the man pages
to be compressed or not. In this case, we need to check in PKGMAKECONF
whether MANZ is set or not.
XXX Perhaps we should also check for MKMANZ if a package uses BSD-style
XXX makefiles?
duplicates in the output, output warnings if necessary. The $$dlist at
the end is unquoted intentionally to omit spaces in the output.
Approved by jlam.
as needing both (no impact since they're both satisfied by the tar
binary installed by the bootstrap kit). There's some funniness in
the extraction code where we check for pax or GNU tar that needs to
be resolved. Remove the TAR=${GTAR} hack since it's no longer needed
after these changes.
XXX Later, a sweep needs to be made to see where we actually need GTAR
XXX and where we only need TAR, probably triggered by whether we call it
XXX with the "z" option or not. Packages that need GTAR should explicitly
XXX add USE_TOOLS+=gtar to the package Makefile.
separate file pkgsrc/mk/bsd.pkg.patch.mk. Also, include this file
ahead of the inclusion of bsd.tools.mk so that tools required to
patch are created by the tools framework.
at the time that they're defined: ${AWK}, ${GREP}, ${SED}, ${TRUE}.
Move the inclusion of compiler.mk below the inclusion of bsd.tools.mk
so that these variables are properly defined by the time they are
used. This should fix problems where pkgsrc gcc was not being properly
detected when using the new tools framework.
This change has the side effect of changing the relative order of the
compiler directories and the tool directory in the PATH, but this has
no impact on existing packages, and actually makes more sense anyway.
check for whether ${PATCHDIR} exists or not, or whether PATCHFILES is
defined or not. This avoids the use of != in a variable definition
just to find out if we need patch or not.
bsd.pkg.mk under the new tools framework. Instead, just note that if
we set PKGSRC_LOCKTYPE, that pkgsrc will require shlock. Remove
"shlock" from the large PKGSRC_USE_TOOLS list since we don't need it
all of the time. This fixes PKGSRC_LOCKTYPE != none when using the
new tools framework.
loop are only used afterwards, split out the EVAL_PREFIX code into a
separate file find-prefix.mk that can be included at any point to
generate a prefix-computation for the variables specified by FIND_PREFIX
at the inclusion point.
separate file pkgsrc/mk/bsd.pkg.extract.mk. Also, include this file
ahead of the inclusion of bsd.tools.mk so that tools required to
extract are created by the tools framework.
This makes more sense since there is never going to be a pkgsrc
replacement for ldconfig. We now always create an ldconfig tool in
${TOOLS_DIR} that either calls the system-supplied one if it exists,
or is a no-op.
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
caches variable definitions that were computed by make. These variables
are specified by listing them in MAKE_VARS, e.g.,
.if !defined(FOO)
FOO!= very_time_consuming_command
.endif
MAKE_VARS+= FOO
bsd.pkg.mk will include only the one generated during the most recent
phase. A particular phase's makevars.mk file consists of variable
definitions that are a superset of all of the ones produced in previous
phases of the build.
The caching is useful because bsd.pkg.mk invokes make recursively,
which in the example above has the potential to run the very time-consuming
command each time unless we cause FOO to be defined for the sub-make
processes. We don't cache via MAKE_FLAGS because MAKE_FLAGS isn't
consistently applied to every invocation of make, and also because
MAKE_FLAGS can overflow the maximum length of a make variable very
quickly if we add many values to it.
One important and desirable property of variables cached via MAKE_VARS
is that they only apply to the current package, and not to any
dependencies whose builds may have been triggered by the current
package.
The makevars.mk files are generated by new targets fetch-vars,
extract-vars, patch-vars, etc., and these targets are built during
the corresponding real-* target to ensure that they are being invoked
with PKG_PHASE set to the proper value.
Also, remove the variables cache file that bsd.wrapper.mk was generating
since the new makevars.mk files provide the same functionality at a
higher level. Change all WRAPPER_VARS definitions that were used by
the old wrapper-phase cache file into MAKE_VARS definitions.
packages to strip installed executables. If INSTALL_UNSTRIPPED ==
"yes", then we create a "strip" wrapper in ${TOOLS_DIR} that just
calls ${TRUE} by considering ${TRUE} the system-supplied strip command.
default value for each platform. Currently, the replacement tools
comes from sysutils/coreutils, but where there is no native BSD install
program, bootstrap-pkgsrc should probably be made to provide an install
shell script as an alternative, and mk/tools/bootstrap.mk should be
amended accordingly.
Also remove one use of ${TYPE} in pkgsrc (bsd.pkg.mk) under the new tools
framework.
* Get rid of an explicit check for ${_IMAKE_MAKE} == ${GMAKE} in
bsd.pkg.mk to check for whether we need to depend on gmake or not.
Instead, we now note in Linux.mk that packages that need imake will
also need to use gmake by setting _IMAKE_TOOLS+=gmake.
* Push the definition of MAKE_PROGRAM from bsd.pkg.mk into make.mk where
it's closer to related code.
to provide "TOOL" definitions for tools used by a top-level make process
(usually because it uses them in a != variable definition). This allows
USE_TOOLS to be defined before bsd.prefs.mk is included by a package
Makefile, where USE_TOOLS lists the additional (non-default) tools that
are required to build the package.
Also, drop the fallback to existing "TOOL" definitions because we now
have TOOLS_PLATFORM.* for each platform in pkgsr/mk/tools/tools.*.mk.
added if GNU_CONFIGURE is specified - the arla and forthcoming openafs
packages are ones that need to be able to let the GNU configure script
guess for itself, rather than hardcoding the value.
Add a switch called USE_GNU_CONFIGURE_HOST to determine whether the
--host argument is provided to the GNU configure script. This is
switched on (it has a "yes" value) by default, so the previous
behaviour applies, but allows us to specify this value on a
package-by-package basis.
Documentation changes for this are also forthcoming.
"${PKGVULNDIR}" (one $, not two). This was causing the vulnerabilities
file to be looked for in the wrong place. This fix makes the
check-vulnerable target actually parse the vulnerabilities file and
look for vulnerable installed packages again.
redundant because we explicitly pass MAKEFLAGS to a sub-process
through command line arguments.
This fixes the problem reported in PR pkg/29874 that PKGNAME_REQD is
not overridden in recursive MAKE calls.
sourcing any config file, if it's defined. With thanks to Julio M.
Merino Vidal for the first pass at a fix, and for keeping me honest
and up-to-date with variable checks in portable shell constructs.
to tech-pkg:
=====
* USE_BUILDLINK3=YES will be unconditional. (In fact, USE_BUILDLINK3 will
be ignored altogether by mk/; but see below.)
* NO_BUILDLINK and NO_WRAPPER will be ignored by mk/. If a build happens,
these phases will happen.
* The existing NO_BUILD will imply the previous NO_BUILDLINK and NO_WRAPPER.
If no build happens, those phases are not needed.
* NO_TOOLS will be ignored by mk/. The tools phase, which provides much
more than just the C compiler, will always happen regardless of package.
This will make metapackage builds only slightly slower, in trade for far
less user error.
o If origfile is already downloaded (size ok) and there's
a temp file with incomplete size, don't try to resume the
transfer on the temp file, remove it.
o Clean the code a bit.
of packages. Several utilities behave differently or even incorrectly if
a locale different than 'C' is set.
One of these is perl, which spits a big warning and then breaks some
packages. An example is irssi, as described in PR pkg/29613 by Hanno
Wagner.
possible, just for the sake of doing so, is not a good thing to do:
The platform files define _STRIPFLAG_* to determine whether to strip things.
But since this is included in bsd.prefs.mk, ".if ..." checks cannot take
things set in the Makefile into account. So convert INSTALL_UNSTRIPPED=YES
to a defined/undefined variable check in bsd.pkg.mk, and use the :D:U idiom
in the _STRIPFLAG_* variables.
This should fix PR pkg/28772 and PR pkg/29031.
but disable this if the package name in the pkg-vulnerabilities file contains
a meta-character. This speeds up the check-vulnerable target from:
[9:28:06] agc@sys3 ...pkgsrc/misc/libutf 11 > time make check-vulnerable
1.821u 1.988s 0:02.57 147.8% 0+0k 0+0io 0pf+0w
[9:28:17] agc@sys3 ...pkgsrc/misc/libutf 12 >
to
[9:28:27] agc@sys3 ...pkgsrc/misc/libutf 13 > time make check-vulnerable
0.273u 0.233s 0:00.33 151.5% 0+0k 0+0io 0pf+0w
[9:28:30] agc@sys3 ...pkgsrc/misc/libutf 14 >
(with caches filled, on a fairly fast machine - P4 2.8 GHz, 2GB RAM).
for a dist file or patch, and let the "checksum" target do the full
digest integrity checks. Should fix a problem reported by John Klos
on tech-pkg, which I was a bit dim in analysing.
Before this fix it would include
PLIST.common
then _only_ one of the following
PLIST.${OPSYS}
PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST
and then PLIST.common_end.
Now, uses all of the following PLIST files, in that order:
PLIST.common
PLIST.${OPSYS}
PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST
PLIST.common_end
ensure the integrity of distfiles and dist patches. For now, the
default algorithms are SHA1 and RMD160, set as a whitespace-separated
list in the DIGEST_ALGORITHMS definition. The DIGEST_ALGORITHM
definition is deprecated.
Patchfiles will still use simply SHA1, since we are trying to detect a
binary "has this file changed", rather than proect against tampering.
In short, if someone can modify the patch file, they can modify the
distinfo file holding its digest information. This value is set in the
new PATCH_DIGEST_ALGORITHM definition.
Triggered by the breaking of SHA1, as reported in
http://www.schneier.com/blog/archives/2005/02/sha1_broken.html
PLIST.common
PLIST.${OPSYS}
PLIST
PLIST.common_end
to
PLIST.common
PLIST.${OPSYS}
PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST
PLIST.common_end
Which makes it possible to remove duplicated code in some packages.
This doesn't change anything, because all affected packages define PLIST_SRC,
so this code would never be used for them.
And most of them will be fixed with the next commit.
ToDO: ${MACHINE_ARCH:C/i[3-6]86/i386/g} looks wrong and should be changed,
but thats what we allready use for MESSAGE_SRC.
<20050215182853.AC52D3C03B8@berkshire.machshav.com>
The check for a vulnerable package at package fetch time is producing
incorrect results when csh-style alternates are used in the
pkg-vulnerabilities specification of the vulnerable package - disable
the incorrect speed-up that was there previously, at the expense of
some machine cycles at build time.
error checks into labelled blocks toward the top of the file.
While here, remove the historic (now completely empty; it was replaced by
PKG_FAIL_REASON some time ago) uptodate-pkgtools target and the references
to it.
Consolidate many MAKE_ENVs and SCRIPTS_ENVs into a common block.
(CONFIGURE_ENVs to be done later.)
Introduce new variable ALL_ENV which is automatically included into all
of MAKE_ENV, SCRIPTS_ENV, and CONFIGURE_ENV; this allows much cleaner
addition of the common CC/CXX/CFLAGS/etc. variables needed by all of these.
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.
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}.
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.
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).
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).
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.
- 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).
framework. The list of changes include:
* Modify compiler.mk so that "c" is always prepended to USE_LANGUAGES,
so we no longer need to say it in package Makefiles. Packages
should now append to USE_LANGUAGES instead of setting it.
* Create mk/compiler/f2c.mk which implements another pseudo-compiler
"f2c" that may be used with any C compiler backend, e.g.
PKGSRC_COMPILER= f2c ccache gcc
* Teach the various "real" compiler files, e.g., sunpro.mk, mipspro.mk,
etc., to use f2c if the native Fortran compiler isn't present.
Packages that use Fortran should now simply include the line:
USE_LANGUAGES+= fortran
in the package Makefile.
already demonstrated by imake failing.
So, instead of fiddling with PATH's value in multiple places, rely on
PREPEND_PATH to get things right. Hopefully this will DTRT. At least
several local tests have worked without problems.
and ${X11BASE}/bin to the current PATH, _prepend_ them. This way we will
pick our own binaries in favour of the system ones, in the cases where
conflicts exist. Also add a PREPEND_PATH for ${LOCALBASE}/bin.
This should fix several packages on non-NetBSD systems. For example,
ispell-spanish under Linux comes to mind, as it was using the 'ispell'
binary from /usr/bin instead of the one in /usr/pkg/bin to get its
configuration information.
Ideally, buildlink could handle this as it does for libraries, hidding
unexpected binaries ;-)
No objections in tech-pkg@ (or packages@; I don't remember the exact
list where I asked).
PKG_ERROR_CLASSES is a list of error handlers, PKG_ERROR_HANDLER.<class>,
to create. The default error handler will rethrow the exit code after
emitting an error message that may be specified per-class with
PKG_ERROR_MSG.<class>.
Create error messages for the configure and build phases that inform
the user of places to go looking for why the build didn't complete.
and groupadd commands won't follow the calling conventions of the
NetBSD useradd/groupadd. Modify the INSTALL scripts to *never* create
users or groups if there is no available ${USERADD} or ${GROUPADD}
command, but will warn the user of users and groups that need to be
created before the package can be installed.
specify (hardcoded) compilers from which we can infer the correct tag
(CC, CXX, F77). Use the following patterns to match compilers to
tags:
CC: *cc *xlc
CXX: *++ *CC
F77: *77 *fort
Bump the PKGREVISION to 1.5.10nb7 since we now infer the F77 tag from
likely Fortran compilers. Also require at least this version of
libtool when building packages that set USE_FORTRAN. This should fix
PR pkg/28661.
If we include pthread.buildlink3.mk, then build with Perl ithreads
support. Bump the PKGREVISION.
Nuke the perl58-thread package. The perl package can now be forcibly
built with thread support by setting PERL5_USE_THREADS to "yes".
load shared objects. Some platforms require pthreads to be linked
into the application if it uses dlopen() or else the applications will
core dump when they dlopen a shared module that _is_ linked with
pthread support. Including dlopen.buildlink3.mk in a package Makefile
will cause pthread.buildlink3.mk to also be included.
It is up to the package to ensure that PTHREAD_{CFLAGS,LDFLAGS,LIBS}
(defined by pthread.buildlink3.mk) are passed to the compiler when
building/linking the applications, possibly by setting PTHREAD_AUTO_VARS
to "yes" in the package Makefile.
particular packages to compile correctly. bsd.hacks.mk auto-includes
the hacks.mk file in the current directory. An example hacks file:
-------------8<-------------8<-------------8<-------------8<-------------
.if !defined(FOO_HACKS_MK)
FOO_HACKS_MK= defined
### [Sun Nov 14 02:08:31 EST 2004 : jlam]
### arm GCC 2.95.x optimisation bug tickled when compiling
### lib/funkyfile.c. Require a more recent version of GCC as a
### workaround and patch lib/funkyfile.c (patch-ae).
###
.if !empty(MACHINE_ARCH:Marm*)
PKG_HACKS+= optimisation
GCC_REQD+= 3.0
.endif
.endif # FOO_HACKS_MK
-------------8<-------------8<-------------8<-------------8<-------------
The comment which heads each individual hack should timestamp when the
hack was added and describe the bug that requires the hack. By
separating out hacks to a separate file, we should be able to simplify
package Makefiles so that they are more readable.
pthread.buildlink3.mk into a separate file, pthread.builtin.mk,
that is handled using the usual builtin.mk logic.
(2) If pthread.buildlink3.mk is included by a package Makefile, then
automatically add the necessary compiler and linker flags to
compile and link pthread-enabled/reentrant code. For native
pthreads, this means passing -pthread to the compiler and linker.
For the userland pthread replacement, we pass -D_REENTRANT and
-lpthread instead.
(3) Add PTHREAD_{CFLAGS,LDFLAGS,LIBS} in both CONFIGURE_ENV and MAKE_ENV
when pthread.buildlink3.mk is included so that the configure and
build processes can use these values. Remove these definitions
from bsd.pkg.mk since PTHREAD_* variables are all declared within
pthread.buildlink3.mk.
XXX For now, PTHREAD_LDFLAGS is a superset of PTHREAD_LIBS until
XXX packages that use use PTHREAD_LDFLAGS can be fixed.
Rather than replacing the LIBTOOL_REQD value, add two BUILD_DEPENDS lines.
That way, the higher numbered BUILD_DEPENDS wins -- allowing the version
in bsd.pkg.mk to be bumped beyond the value in the platform .mk and still
be enforced properly.
* Add FETCH_OUTPUT_ARGS (new option, defaults to "-o" with NetBSD's ftp(1))
* Use FETCH_OUTPUT_ARGS to move the file transfer to a temporary name
on ${DISTDIR}/${DIST_SUBDIR} with extension ".temp"
* If temporary file matches the checksum recorded in distinfo, move it
to the original name (removing temp file)
For example, if you want to use PKG_RESUME_TRANSFERS with wget
(pkgsrc/net/wget), the following vars should be defined in mk.conf:
FETCH_CMD=wget
FETCH_RESUME_ARGS=-c
FETCH_OUTPUT_ARGS=-O
No need to set these vars when using defaults (NetBSD's ftp(1))
specify when the pkgconfig substitutions have to be applied; defaults
to pre-configure. This is useful because some packages modify the .pc
files during the build process (adding -L flags), so they have to wait
until the build finishes to add the correct rpaths.
Also modify the regular expression in PKGCONFIG_OVERRIDE_SED to match
and fix multiple -L flags, instead of just one.
script. Since all platforms define a "reasonable" sed(1), it seems
reasonable to pass this info to ./configure as well.
While here, convert LIBS="${LIBS}" to the proper LIBS=${LIBS:Q}.
a ".bin" extraction (to be used shortly by lang/sun-jre15).
This isn't a generic EXTRACT_ENV, as the rest of the extraction tools don't
currently need such a knob. The most common use would be to set things in
the env of a binary-only distribution to make for silent or otherwise
twiddled package extraction.
as it's only used internally by bsd.prefs.mk.
* Make _PKGSRCDIR a public variable by renaming it to PKGSRCDIR.
Also, generate its value from ${_PKGSRC_TOPDIR} so it's less fragile
than the old method of stripping off the last two components of
${.CURDIR}. PKGSRCDIR may now be used after bsd.prefs.mk is defined.
* Change all references to _PKGSRCDIR to PKGSRCDIR.
that all of pkgsrc can benefit from removing redundant dependencies.
The code is encapsulated in a new file reduce-depends.mk which is
included by bsd.pkg.mk after all dependencies have been specified.
the wrappers from adding extra flags to the command-line if "-v"
exists. This makes "g++ -v" return the same error code for both the
wrapper and the real executable and fixes the problem with the
libtool-base build not correctly detecting the C++ compiler and thus
not adding the CXX configuration tag to the final libtool script.
Downgrade LIBTOOL_REQD to 1.5.10 since the newest version isn't needed
with this change.
in the process. (More information on tech-pkg.)
Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.
Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
indicate the proper process: first read the license, then accept,
and indicate so in /etc/mk.conf:
yui% make
===> graphviz-1.12 has an unacceptable license: graphviz-license.
===> To view the license, enter "/usr/bin/make show-license".
===> To indicate acceptance, add this line to your /etc/mk.conf:
===> ACCEPTABLE_LICENSES+=graphviz-license
*** Error code 1