Commit graph

60 commits

Author SHA1 Message Date
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
agc
13f595bb5b Fix a typo. No functional change. 2014-12-08 02:43:25 +00:00
obache
6757839337 Pass PKGNAME_REQD to su-real-package-install, for multiversion packages
not using default version.
2014-12-07 05:09:02 +00:00
obache
e2a52e6e8e introduce MESSAGE_SRC_DFLT, same as PLIST_SRC_DFLT for PLIST_SRC. 2014-11-02 06:17:39 +00:00
jperkin
ed123862cf Add missing braces and check getline returns success, this code must have
worked by pure luck in the past, and now works with strict POSIX awk too.
2014-10-08 10:04:45 +00:00
obache
28e8f67453 Fixes undefined variable references. 2014-04-07 05:25:03 +00:00
khorben
59e1335fa3 Create signed packages automatically if desired. It is disabled by default,
and documented in mk/defaults/mk.conf. Both the "gpg" and "x509" methods
supported by pkg_admin(1) are supported. With package signing enabled, a
staging, unsigned copy of the package is always created, and its final copy
to the package repository is done with pkg_admin(1) instead of "ln || cp".
Proper operation should otherwise not be affected.

Tested both with and without user-destdir support in packages.

"can live with it" joerg@

From EdgeBSD.
2014-04-06 15:04:16 +00:00
obache
605cd68e59 Clean up target file if failed.
fixes PR pkg/48294.
2014-03-08 11:46:14 +00:00
obache
82f6d72f3a Skip automatic shlib permission fix for files in CHECK_SHLIBS_SKIP. 2014-03-02 07:18:36 +00:00
obache
38443c897d drop unwanted stage-package-remove before stage-package-create,
to avoid unwanted stage binary package removal/regeneration.
2013-08-10 06:05:57 +00:00
obache
23ef105d59 reduce dependencies, to avoid unwanted binary package regeneration.
* ${_BUILD_INFO_FILE} only depends on ${_PLIST_NOKEYWORDS}, not plist target.
* plist target is not required to create +CONTENTS
2013-08-10 06:03:37 +00:00
obache
b57eb9cefd ${_SIZE_PKG_FILE} only require ${PLIST}, so restrict dependency to it.
This change avoid to regeneration the file, it may cause pemission issue
with PKG_DESTDIR_SUPPORT=destdir.
2013-07-13 09:10:35 +00:00
obache
5f5e2d61ad prevent to generate binary package in ${PACKAGES} from the side effect of
`install' with USE_DESTDIR=yes.
This changes prevent to unwanted overwite of existing binary packages with
test installation (`stage-install', `replace' & `undo-replace', and so on).

To do both `install' and `package', you can still use `package-install' target,
same as USE_DESTDIR=no.
2013-05-23 13:18:56 +00:00