Commit graph

72 commits

Author SHA1 Message Date
rillig
7f191db6be mk/pkgformat: include only relevant ident strings in +BUILD_VERSION
Before, not only files containing an RCS Id were recorded in the
+BUILD_VERSION file but also files containing text that looked similar to
an RCS Id were recorded, even though these didn't contain any valuable
version information.

The effect was that before this change, pkgtools/pkglint was built over
and over again by the bulk builds since pbulk uses a different regular
expression for detecting modified files.

The regular expression for unexpanded RCS Ids is added to record files
that have never been checked in to CVS, just to have them recorded and to
distinguish them from the final committed version.

See https://mail-index.netbsd.org/tech-pkg/2020/01/11/msg022489.html.
2020-01-15 20:11:11 +00:00
rillig
8b2c7d624a mk/pkgformat: include only relevant ident strings in +BUILD_VERSION
Before, not only files containing an RCS Id were recorded in the
+BUILD_VERSION file but also files containing text that looked similar to
an RCS Id were recorded, even though these didn't contain any valuable
version information.

The effect was that before this change, pkgtools/pkglint was built over
and over again by the bulk builds since pbulk uses a different regular
expression for detecting modified files.

The regular expression for unexpanded RCS Ids is added to record files
that have never been checked in to CVS, just to have them recorded and to
distinguish them from the final committed version.

See https://mail-index.netbsd.org/tech-pkg/2020/01/11/msg022489.html.
2020-01-15 20:03:10 +00:00
rillig
1498fcf3dd mk/pkgformat: fix documentation 2020-01-14 22:22:34 +00:00
rillig
1f7df547ed mk/pkgformat: fix documentation 2020-01-14 22:21:19 +00:00
rillig
48d051044f mk/pkgformat: update documentation in list-dependencies 2020-01-13 07:31:53 +00:00
taca
ca4fe2672a mk/pkgformat/pkg/metadata.mk: Fix awk syntax
Fix awk syntax.
2020-01-13 06:52:57 +00:00
ryoon
bf792e6f39 mk: Add missing line continuation, fix post-install 2020-01-13 03:38:01 +00:00
joerg
43c574a4a9 Add USE_PKG_ADMIN_DIGEST flag for switching between $NetBSD$ and SHA256
digests to identify file versions. Defaults to no for now. For digest
mode, recursive into FILESDIR, so that e.g. the majority of pkg_install
itself is recorded as well SMF manifests.
2020-01-12 23:38:42 +00:00
jperkin
41c29c5abd mk: Ensure only the first NetBSD rcsid is used.
There are a couple of places in pkgsrc where rcsid's are generated, and
these were leaking into "pkg_info -b" output.  This had the side effect of
causing those packages and all their dependencies to be rebuilt for every
bulk build as the output and the respective files always mis-matched.
2019-10-01 13:01:02 +00:00
jperkin
3f3dc70553 mk: Support MESSAGE.rcd and MESSAGE.smf.
Previously packages configured these manually based on INIT_SYSTEM, this
centralises support for them so they only need to exist to be pulled in
accordingly.
2019-05-28 13:32:06 +00:00
rillig
3378b74ea0 mk/pkgformat: add show-all-depends target 2019-04-03 18:38:16 +00:00
roy
92284935f7 Call replace-names before SU
This allows the replace target to work with OBJ on NFS where root
isn't allowed.
2019-01-22 14:29:44 +00:00
joerg
6abe02f428 Don't include TEST_DEPENDS in the normal dependency reduction run. 2018-01-25 00:34:27 +00:00
joerg
dbaa510884 Add missing empty TEST_DEPENDS for the bootstrap case. 2018-01-14 10:47:43 +00:00
joerg
e97fae9138 Introduce TEST_DEPENDS.
Place them in ALL_DEPENDS iff PKGSRC_RUN_TESTS is set, so that bulk
builds will pick them up.
2018-01-13 12:48:56 +00:00
wiz
8444b9a444 Comment out debug printf. 2017-10-06 14:46:21 +00:00
jlam
2c5ffee9f0 reduce-depends.awk: Also reduce "exact match" and "any version".
Also reduce patterns of the form:

	pkg-version	(exact match)
	pkg-[0-9]*	(fnmatch pattern matching any version)
2017-10-04 04:13:12 +00:00
jlam
c47bf45c32 reduce-depends.awk: Match version strings containing tilde (~). 2017-10-04 04:13:00 +00:00
jlam
6b7428c49d reduce-depends.awk: Avoid "delete array" statement for portability.
POSIX awk doesn't allow "delete array" to delete an entire array.
For portability, one must delete each element of the array.
2017-10-01 22:58:19 +00:00
jlam
aca4516d1d reduce-depends.awk: Avoid gensub() for portability. 2017-10-01 17:57:18 +00:00
jlam
5cd938212b reduce-depends.awk: Reduce "pkg>1" and "pkg<2" into "pkg>1<2".
Enhance the reduce-depends.awk script to reduce a larger set of
dependencies into a single dependency.  The patterns representing
intervals of version numbers (can be open-ended) are of the form:

	pkg>lower
	pkg>=lower
	pkg<upper
	pkg<=upper
	pkg>lower<upper
	pkg>lower<=upper
	pkg>=lower<upper
	pkg>=lower<=upper

These patterns are now condensed into a single dependency of the
same form.  For example, given the following patterns:

	pkg>=1.0
	pkg>2.0
	pkg<3.0
	pkg<=4.0
	pkg>=2.5<3.5

the reduced pattern becomes:

	pkg>=2.5<3.0

Add the test script used to help with refactoring and adding the
new feature to the script.

This is a mostly complete rewrite of the script; change the
license to the standard 2-clause BSD license used by TNF.
2017-10-01 04:00:40 +00:00
jlam
ed5291d835 mk/pkgformat: Only pass "-C" option to pkg_create(1) if it's valid.
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.
2017-08-23 17:52:30 +00:00
jlam
efa81dcfaa mk/pkgformat: Support INSTALL scripts that rely on UNPACK.
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.
2017-08-21 12:48:25 +00:00
jlam
98e1e541d0 Run pkg_add(1) and pkg_delete(1) using ${SETENV} ${PKGTOOLS_ENV}.
PKGTOOLS_ENV allows for passing environment variables to the
package install and deinstall scripts.
2017-08-19 00:30:19 +00:00
jlam
1d3dfdfebc Substitute the correct string for GTK3_UPDATE_ICON_CACHE. 2017-08-19 00:29:45 +00:00
jlam
ad2d4d8890 mk/pkgtasks: Failures in POST- stages of the scripts are non-fatal.
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.
2017-08-10 05:41:52 +00:00
jlam
a8a45f8487 mk/pkgtasks: Add infrastructure to use "icon_themes" package task.
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.
2017-08-10 05:41:07 +00:00
jlam
bd5bbf286f mk/pkgtasks: Add additional variables used by package tasks.
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.
2017-08-10 05:38:00 +00:00
jlam
633861d271 Substitute for LDCONFIG_ADD_CMD and LDCONFIG_REMOVE_CMD in scripts.
LDCONFIG_ADD_CMD and LDCONFIG_REMOVE_CMD are set by emulator/*.mk
in order to update the library search paths in the emulated system
directories.  Substitute for those values, but default them to the
empty string so that the default action taken by the "shlibs" task
can be used.
2017-06-07 20:24:19 +00:00
jlam
f43517c597 Fix subsitutions for @PKG_ADMIN@ and @PKG_INFO@.
The substituted values need to refer to the _CMD variables that
hold the path to the actual commands.
2017-06-07 20:24:09 +00:00
jlam
fafe82389b Subsitute for @CROSSBASE@ and @VARBASE@ in install scripts.
${CROSSBASE} and ${VARBASE} both point to important directories
for installed packages, so always substitute those values into
deinstall/install scripts.
2017-06-07 20:24:01 +00:00
jlam
faa05c5d4c Using script templates implies a dependency on pkgtasks.
The header template loads pkgtasks' load.subr unconditionally, so
if any script templates are used, then they imply a dependency on
pkgtasks.  Trigger the dependency in the "pkgtasks" framework by
setting USE_PKGTASKS to "yes".
2017-06-02 19:13:44 +00:00
jlam
0a676f1f26 Provide switch to activate new frameworks to replace "pkginstall".
If ${_USE_NEW_PKGINSTALL} is "yes", then use the new "pkgtasks",
"init", and "pkgformat/pkg"-scripts frameworks instead of the
existing "pkginstall" framework.
2017-06-01 02:15:10 +00:00
jlam
d7e2d30603 Make creation of +DEINSTALL/+INSTALL scripts pkgformat-specific.
Move the files needed to generate +DEINSTALL and +INSTALL scripts
for the "pkg" format into pkgsrc/mk/pkgformat/pkg.

Create new script templates that make use of "pkgtasks" to perform
the actual tasks.
2017-06-01 02:09:43 +00:00
joerg
c9d19aae42 Drop redundant dependency patterns. The normal reduction logic doesn't
work for glob expressions, so multiple generic patterns would not be
reduced.
2017-05-19 14:58:51 +00:00
gdt
b177a0f098 Omit pkg_tarup during replace in destdir mode
In destdir mode (the default), make replace creates the replacement
binary package without modifying the installed system, and then
installs it via pkg_add -u.  Thus, the new package is known to have
built and packaged ok before the system is changed, and the risk of
trouble is low; thus the benefit of tarring up the installed package
is very low, especially since the newly-tarred-up package is removed
by "make clean".  Using pkg_tarup costs cycles to run and more
importantly causes users to have to install it since it is not an
automatic dependency.

In addition, binary packages are now kept by default when building, so
the old version should be accessible in case of trouble.

This commit does not change the non-destdir case.  Almost no one uses
that method, and the relative benefit of tarup is much higher.
2016-09-19 12:26:08 +00:00
leot
d36f22066b Fix a typo in a comment 2016-07-18 09:57:10 +00:00
joerg
6c00682f76 Stop creating category symlinks in ${PACKAGES}, but keep All/ for now. 2016-05-09 00:07:23 +00:00
joerg
639d5b402f Remove support for USE_DESTDIR=no. 2016-04-10 15:58:02 +00:00
joerg
4287748b6e Always require the 2010 version of pkg_install to simplify things a bit. 2016-04-10 15:20:26 +00:00
rillig
4b745bef97 Changed "Install binary package" to "Installing binary package" 2016-02-02 08:15:07 +00:00
jperkin
f67ff360ae Perform signing at the staged package stage rather than only during the
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'.
2015-10-29 20:09:28 +00:00
jperkin
74fa23ab2a Switch to globbing for package symlinks to delete. This provides significant
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.
2015-09-07 11:02:28 +00:00
joerg
11d2712a27 Remove USE_X11BASE and X11PREFIX. 2015-07-04 16:18:28 +00:00
joerg
cd74494def Add a new ulimit modifier for cputime. Support raising limits for
package creation.

There are very few things in pkgsrc that needs more than one hour per
process on decently fast hardware, so setting that as (soft) limit for
bulk builds avoids the infinite loops seen in some other packages. There
are a few select exceptions, i.e. flightgear-data needs more than one
hour for pkg_create when using xz. This flag allows selectively giving
those places more time without wasting resources in the broken cases.
2015-04-21 17:01:55 +00:00
jperkin
733254faf3 Put back PKGNAME_REQD fix for su-real-package-install. 2015-02-16 10:50:33 +00:00
jperkin
4092ea0d63 Put back MESSAGE_SRC_DFLT. 2015-02-16 10:17:47 +00:00
obache
5f2563c087 Revert
introduce MESSAGE_SRC_DFLT, same as PLIST_SRC_DFLT for PLIST_SRC.
proposed/discussed is required for such changes.
2015-02-02 12:32:49 +00:00
obache
ec75d3e707 Revert "Pass PKGNAME_REQD to su-real-package-install",
proposed/discussed is required for such infrastructure changes.
2015-02-01 11:24:58 +00:00
wiz
627d407a75 Remove pkg_views support, second part: infrastructure. 2014-12-30 15:13:19 +00:00