Commit Graph

25 Commits

Author SHA1 Message Date
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Mina Igalic
1c1ff79795 pkgbase: make only vital packages vital, not their sub-packages
make "vital" a replaceable, which defaults to "false" and only set it for
the main clib, utilities and runtime packages, not their sub-packages

PR: 254174
Differential Revision:	https://reviews.freebsd.org/D29224
2021-03-28 12:18:09 +02:00
Kyle Evans
209dcc7cec pkgbase: use consistent annotation for objectk eys
Everywhere else we use objects ("scripts", generally) we do sepcify the
optional colon. Be consistent and do the same for directories.

PR:		249273
Submitted by:	Martin <martin.jakob gmx com>
MFC after:	1 week
2020-09-18 14:29:01 +00:00
Emmanuel Vadot
82087d4b68 pkgbase: Add PKG_NAME_PREFIX, PKG_MAINTAINER and PKG_WWW
This is useful for downstream users to customize the packages.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D26019
2020-08-11 08:42:24 +00:00
Emmanuel Vadot
1931aa942f pkgbase: Remove vcs revision from kernel and runtime comment
This is not needed and we don't do that for other packages.
2020-08-06 16:11:30 +00:00
Kyle Evans
f2c462994d pkgbase: generate dependencies in generate-ucl.sh
This cuts out a large chunk of duplicated *.ucl files that just needed
dependencies tacked on, and gives generate-ucl.sh some leeway in case a
future pkg may need more than one dependency.

Run-through to determine which ones could simply be removed done with for i
in *.ucl; do diff -U3 template.ucl ${i}; done | less and inspecting for any
differences beyond just adding deps at the end. The remaining ucl files are
basically all differently-licensed, require scripts, or are marked vital.

I've opted to remove %PKGDEPS% entirely without regard for third-party ucl,
as pkgbase is not yet considered production. However, I do not hold a strong
position on this and there is approximately 0 chance it will return.

clibs should have been added previously in generate-ucl.sh as one that
doesn't have any dependencies, but do so now that we would otherwise be
tacking on the runtime dependency.

Reviewed by:	manu, bapt (earlier version)
Differential Revision:	https://reviews.freebsd.org/D23415
2020-01-30 03:01:00 +00:00
Emmanuel Vadot
bf9b4985e9 pkgbase: Move cap_mkdb from runtime to utilities POST-INSTALL
Since login and login.conf moved to the utilities packages move also
the post-install related commands.

Reported by:	mj-mailinglist@gmx.de
Reviewed by:	bapt
2019-09-16 12:51:30 +00:00
Brad Davis
7c3f17c5d5 Chase the pwd_mkdb endian changes.
Approved by:	bapt (mentor)
2018-06-27 19:10:32 +00:00
Brad Davis
6be8e27be0 Add missing call to services_mkdb to build the services.db
Approved by:	gjb
2017-11-19 02:16:11 +00:00
Glen Barber
53d1eddd44 Revert r322327, r322352, r322358:
Disconnect the dependency on the kernel package from the runtime
package.  There are a number of problems here:

 1) The runtime package installed into a chroot or a jail would
    include the kernel package, changing the behavior of how jails
    work now [1];

 2) As result of (1), it is possible a binary may incorrectly
    resolve kernel symbols [2]; in addition, it is possible there
    will be unexpected fallout with 32-bit jails on a 64-bit host
    kernel [2].

Noticed by:	brd [1]
Discussed with:	kib [2]
MFC after:	3 days
MFC note:	record-only to wipe from the merge tracker
Sponsored by:	The FreeBSD Foundation
2017-08-15 15:13:33 +00:00
Glen Barber
ebd2eeb3f8 Add SVNVERSION_CMD to bsd.own.mk, adding the capability to include
svnversion metadata to the runtime and kernel packages.

Instead of traversing src/sys, as is done by newvers.sh for uname(1),
a full tree walk is done to prevent userland and/or modifications
from not being reflected in a modified tree (M).

MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
2017-08-11 19:21:40 +00:00
Glen Barber
16398a1141 Add a dependency on the kernel package for the runtime package.
The idea here is that, provided upstream pkg(8) maintainers accept
the proposed change, the kernel.ucl will contain a post-install
script causing pkg(8) to emit a message informing to reboot the
system after the kernel is upgraded using 'pkg upgrade', so the
new userland is installed on the running new kernel.  At present,
this functionality does not exist in pkg(8), but will help ensure
the upgrade path follows that from UPDATING.  To work around this
for now, evaluate ASSUME_ALWAYS_YES, and prompt the user if they
wish to proceed if not set to true.

Since there is a kernel dependency, and a non-GENERIC kernel may
be in use, update Makefile.inc1 to replace '%KERNCONF%' in the
runtime.ucl with the first-built kernel set either via command line
or in make.conf(5).

MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
2017-08-09 19:16:54 +00:00
Glen Barber
696f00b67f Fix permissions on /tmp when installing the runtime package.
Reported by:	many
Patch by:	Kyle Evans
PR:		217574
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-03-08 18:52:40 +00:00
Glen Barber
9fc3c7f733 Set the 'vital' flag on the runtime and jail packages.
The default pkg(8) from pkg.freebsd.org requires libjail.so,
so mark the jail package as vital along with the runtime
package to avoid errors when libjail.so is removed.  This is
a no-op for systems with WITHOUT_JAIL in src.conf(5) and pkg(8)
built from the Ports Collection.

In order to make this work without marking packages such as
the jail-lib32, for example, the jail.ucl file needed to be
split out into separate files similarly to the runtime-*.ucl
files.

Glanced at by:	brd
MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
2016-11-21 23:29:28 +00:00
Glen Barber
de48750cce Add (commented) 'vital' flag to the runtime packages. Support for
it is expected in pkg-1.8.0, which will cause 'pkg del -afy' to not
destroy a system by forcefully removing everything.

As there are valid use cases for doing such (test jails, for example),
it will be overrideable.

In addition, ensure /dev and /tmp exist, as /dev is not created by
default currently, and pkg(8) requires /tmp to exist, which is also
not created by default.

This needs to be moved to the clibs package, since runtime depends on
that package, however I need to first verify that it will work as it
is expected.

Sponsored by:	The FreeBSD Foundation
2016-05-10 00:38:14 +00:00
Glen Barber
c389411c8a Remove libc, librtld_db, libthr packages, and further increase
the constraints on what needs to be installed in a specific to
maintain consistency during upgrades.

Create a new clibs package containing libraries that are needed
as a bare minimum for consistency.

With much help and input from:	kib
Sponsored by:	The FreeBSD Foundation
2016-02-05 21:01:08 +00:00
Glen Barber
123099f316 Add package files for libc, libedit, librtld_db, and libthr.
libedit is needed for sh(1), which if updated before runtime,
can cause undesirable behavior.

For the rest, the installation order needs to be:

 1) librtld
 2) libc
 3) libthr

The dependency listing and shilbs_required entries ensure this
behavior.

Sponsored by:	The FreeBSD Foundation
2016-02-04 21:20:26 +00:00
Glen Barber
3a722e0726 Add FreeBSD RCSID header and svn:keyword property.
Sponsored by:	The FreeBSD Foundation
2016-02-04 15:41:00 +00:00
Glen Barber
5c52b2f5ca Rework the way <packagename>.ucl files are generated.
One of the major pain points with how this was implemented
is the requirement of in-tree, hard-coded <name>.ucl, as
well as <name>-<suffix>.ucl where <suffix> can be lib32,
profile, development, debug, or any combination of the four.

This created significant overhead when adding new packages
and any of the files in any of the combinations were missing.

Instead of test(1)-ing if the <packagename>.ucl file exists,
hand off to a script to figure out what the final ucl file
name should be before invoking pkg(8).

The default behavior is 'template.ucl' is used as a fallback.

This affects only the userland packages, as the kernel code
is already smart enough to handle these variations.

Sponsored by:	The FreeBSD Foundation
2016-02-04 15:32:03 +00:00
Glen Barber
b3075f337b Initial commit to add dependencies.
Sponsored by:	The FreeBSD Foundation
2016-02-03 23:41:58 +00:00
Glen Barber
db03168b5d Prefer https in package URLs.
Sponsored by:	The FreeBSD Foundation
2015-10-15 19:55:32 +00:00
Baptiste Daroussin
80a3127a72 Fix script syntax 2015-06-15 13:27:57 +00:00
Baptiste Daroussin
3a161d956b Make scripts cross installation friendly 2015-04-03 23:28:56 +00:00
Baptiste Daroussin
8cf263c843 run pw_mkdb and cap_mkdb at post-installation for cross installation the version
from the host would be run but the generated files will be on the target
respecing the endianness of the target
2015-03-18 16:06:04 +00:00
Baptiste Daroussin
d3cd95cf88 Now that pkg create can directly accept both a file and a plist in command line,
directly use it
2015-03-18 09:39:31 +00:00