Date: Wed, 29 Jan 2020 18:47:08 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357264 - in head: etc/mtree release/packages secure/caroot Message-ID: <202001291847.00TIl8wO095926@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Wed Jan 29 18:47:08 2020 New Revision: 357264 URL: https://svnweb.freebsd.org/changeset/base/357264 Log: pkgbase: fix caroot packaging and add post-install script The original intention for caroot was to be packaged separately, perhaps so that users can have a more/less conservative upgrade policy for this separated from the rest of base. secure/caroot/Makefile doesn't have anything interesting to package, but its subdirectories might. Move the PACKAGE= to Makefile.inc so both blacklisted and trusted get packaged consistently into the correct one rather than the default -utilities. Also tag the directories for package=caroot, as they could also be empty; blacklisted is empty by default, but trusted is not. Add a post-install script to do certctl rehash, along with a note should we eventually come up with a way to detect that files have been added or removed that requires a rehash. -caroot gets a dependency on -utilities, as that's where we provide certctl at the moment. We can perhaps reconsider this and put certctl into this package in the future, but there are some bits within -utilities that unconditionally invoke certctl so let's hold off for now. Reviewed by: manu (earlier version, before -utilities dep added) Differential Revision: https://reviews.freebsd.org/D23352 Added: head/release/packages/caroot.ucl (contents, props changed) head/secure/caroot/Makefile.inc (contents, props changed) Modified: head/etc/mtree/BSD.usr.dist head/release/packages/generate-ucl.sh head/secure/caroot/Makefile Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Wed Jan 29 18:41:35 2020 (r357263) +++ head/etc/mtree/BSD.usr.dist Wed Jan 29 18:47:08 2020 (r357264) @@ -201,9 +201,9 @@ .. .. certs - blacklisted + blacklisted tags=package=caroot .. - trusted + trusted tags=package=caroot .. .. dict Added: head/release/packages/caroot.ucl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/packages/caroot.ucl Wed Jan 29 18:47:08 2020 (r357264) @@ -0,0 +1,31 @@ +# +# $FreeBSD$ +# + +name = "FreeBSD-%PKGNAME%" +origin = "base" +version = "%VERSION%" +comment = "%COMMENT%" +categories = [ base ] +maintainer = "re@FreeBSD.org" +www = "https://www.FreeBSD.org" +prefix = "/" +licenselogic = "single" +licenses = [ BSD2CLAUSE ] +desc = <<EOD +%DESC% +EOD +deps: { + FreeBSD-%PKGDEPS%: { + origin: "base", + version: "%VERSION%" + } +} +scripts: { + # XXX If pkg picks up a mechanism to detect in the post-install script + # files being added or removed, we should use it instead to gate the + # rehash. + post-install = <<EOD + [ -x /usr/sbin/certctl ] && /usr/sbin/certctl rehash +EOD +} Modified: head/release/packages/generate-ucl.sh ============================================================================== --- head/release/packages/generate-ucl.sh Wed Jan 29 18:41:35 2020 (r357263) +++ head/release/packages/generate-ucl.sh Wed Jan 29 18:47:08 2020 (r357264) @@ -34,6 +34,9 @@ main() { outname="$(echo ${outname} | tr '-' '_')" case "${outname}" in + caroot) + pkgdeps="utilities" + ;; runtime) outname="runtime" uclfile="${uclfile}" Modified: head/secure/caroot/Makefile ============================================================================== --- head/secure/caroot/Makefile Wed Jan 29 18:41:35 2020 (r357263) +++ head/secure/caroot/Makefile Wed Jan 29 18:47:08 2020 (r357264) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE= caroot - CLEANFILES+= certdata.txt SUBDIR+= trusted Added: head/secure/caroot/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/Makefile.inc Wed Jan 29 18:47:08 2020 (r357264) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +PACKAGE= caroot
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001291847.00TIl8wO095926>