aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-07-22 07:54:38 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-07-22 08:05:59 +0000
commite497a16a286972bfcab908209b11ee6a13d99dc9 (patch)
tree6fd68cf0cffeb9b91d2e5e441d22a28793af1af8
parenteb1019c69b20335780e95eba93e2d872c6a1ebce (diff)
downloadports-e497a16a286972bfcab908209b11ee6a13d99dc9.tar.gz
ports-e497a16a286972bfcab908209b11ee6a13d99dc9.zip
ports-mgmt/pkg*: Release 1.17.0
TL;DR: new uniq package file extension: '.pkg' Full changelog for pkg: - add a new "snap" prefix, to deal with pkg base snapshots - pkg repo now accepts packages with different compression formats - pkg now have a single extension: ".pkg" and a backward compatible symlink is created when the package is created to help transitioning - Default compression level for zstd is now set to 19 - the default compression level is now a configuration option - plenty of portability fixes - fix plenty of typos - expose the name of the package to lua and shell scripts - plist: remove internal support for @*exec (this is now in the ports tree) remove support for @ignore remove support for @dirrm/@dirrmtry remove support for @pkgdep remove stub support for @stopdaemon remove stub support for @display remove stub support for @mtree remove stub support for @conflict - VUXML: fetch .xz compressed version of the file by default - triggers are deferred to later command (firstboot is planned) if run with pkg -r - pkg triggers commands has been added and can execute the deferred triggers for example at firstboot Changes in the framework: - Add a backward compatibility layer, so people are not forced to move to pkg 1.17 yet (new quarter we will enforce the switch for triggers anyway, but it gives time to people to switch) - Introduce a new PKG_COMPRESSION_FORMAT for users to specify the compression format they are willing to use when creating packages: txz, tar, tgz, tbz, tzst are the valid ones (note that tzst is only usable on FreeBSD 13 and 14) - Add a backward compatibility for people who specified the compression format already via PKG_SUFX and issue a warning to tell them about the deprecation of PKG_SUFX
-rw-r--r--Mk/bsd.port.mk58
-rw-r--r--ports-mgmt/pkg-devel/Makefile4
-rw-r--r--ports-mgmt/pkg-devel/distinfo6
-rw-r--r--ports-mgmt/pkg/Makefile2
-rw-r--r--ports-mgmt/pkg/distinfo6
5 files changed, 40 insertions, 36 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 228644a1845f..5eba5d89da95 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1211,6 +1211,14 @@ _OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/}
.if !defined(_PKG_VERSION)
_PKG_VERSION!= ${PKG_BIN} -v
.endif
+# XXX hack for smooth transition towards pkg 1.17
+_PKG_BEFORE_PKGEXT!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} 1.17.0
+.if ${_PKG_BEFORE_PKGEXT} == "<"
+_PKG_TRANSITIONING_TO_NEW_EXT= yes
+_EXPORTED_VARS+= _PKG_TRANSITIONING_TO_NEW_EXT
+.warning "It is strongly recommanded to upgrade to a newer vertion of pkg first"
+.endif
+# XXX End of hack
_PKG_STATUS!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} ${MINIMAL_PKG_VERSION}
.if ${_PKG_STATUS} == "<"
IGNORE= pkg(8) must be version ${MINIMAL_PKG_VERSION} or greater, but you have ${_PKG_VERSION}. You must upgrade the ${PKG_ORIGIN} port first
@@ -2227,23 +2235,29 @@ _PKGMESSAGES+= ${PKGMESSAGE}
TMPPLIST?= ${WRKDIR}/.PLIST.mktmp
-.if ${WITH_PKG} == devel
-PKG_SUFX?= .pkg
+# backward compatibility for users
+.if defined(_PKG_TRANSITIONING_TO_NEW_EXT)
.if defined(PKG_NOCOMPRESS)
-PKG_OLDSUFX?= .tar
+PKG_SUFX?= .tar
.else
-#.if ${OSVERSION} > 1400000
-#PKG_OLDSUFX?= .tzst
-#.else
-PKG_OLDSUFX?= .txz
-#.endif
+PKG_SUFX?= .txz
.endif
+PKG_COMPRESSION_FORMAT?= ${PKG_SUFX:S/.//}
.else
+.if defined(PKG_SUFX)
+PKG_COMPRESSION_FORMAT?= ${PKG_SUFX:S/.//}
+.warning PKG_SUFX is defined, if should be replace with PKG_COMPRESSION_FORMAT
+.endif
+PKG_SUFX= .pkg
+.endif
.if defined(PKG_NOCOMPRESS)
-PKG_SUFX?= .tar
+PKG_COMPRESSION_FORMAT?= tar
.else
-PKG_SUFX?= .txz
-.endif
+#.if ${OSVERSION} > 1400000
+#PKG_COMPRESSION_FORMAT?= tzst
+#.else
+PKG_COMPRESSION_FORMAT?= txz
+#.endif
.endif
# where pkg(8) stores its data
PKG_DBDIR?= /var/db/pkg
@@ -2634,9 +2648,7 @@ PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
PACKAGES:= ${PACKAGES:S/:/\:/g}
_HAVE_PACKAGES= yes
PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
-.if ${WITH_PKG} == devel
-PKGOLDFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_OLDSUFX}
-.endif
+PKGOLDFILE?= ${PKGREPOSITORY}/${PKGNAME}.${PKG_COMPRESSION_FORMAT}
.else
PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX}
.endif
@@ -2646,12 +2658,10 @@ WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}
PKGLATESTREPOSITORY?= ${PACKAGES}/Latest
PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX}
-.if ${WITH_PKG} == devel
-PKGOLDLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_OLDSUFX}
+PKGOLDLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}.${PKG_COMPRESSION_FORMAT}
# Temporary workaround to be deleted once every supported version of FreeBSD
# have a bootstrap which handles the pkg extension.
-PKGOLDSIGFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_OLDSUFX}.sig
-.endif
+PKGOLDSIGFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}.${PKG_COMPRESSION_FORMAT}.sig
CONFIGURE_SCRIPT?= configure
CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT}
@@ -3434,7 +3444,7 @@ ${PKGFILE}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY}
@${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \
|| ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE}
-.if ${WITH_PKG} == devel
+.if !defined(_PKG_TRANSITIONING_TO_NEW_EXT)
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGOLDFILE}
${PKGOLDFILE}: ${PKGFILE}
${INSTALL} -l rs ${PKGFILE} ${PKGOLDFILE}
@@ -3449,7 +3459,7 @@ _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE}
${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY}
${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE}
-.if ${WITH_PKG} == devel
+.if !defined(_PKG_TRANSITIONING_TO_NEW_EXT)
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGOLDLATESTFILE} ${PKGOLDSIGFILE}
${PKGOLDLATESTFILE}: ${PKGOLDFILE} ${PKGLATESTREPOSITORY}
@@ -3477,13 +3487,7 @@ _EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE}
# This will be the end of the loop
.if !target(do-package)
-.if ${WITH_PKG} == devel
-.if defined(PKG_NOCOMPRESS)
-PKG_CREATE_ARGS+= -f ${PKG_OLDSUFX:S/.//}
-.endif
-.else
-PKG_CREATE_ARGS+= -f ${PKG_SUFX:S/.//}
-.endif
+PKG_CREATE_ARGS+= -f ${PKG_COMPRESSION_FORMAT}
PKG_CREATE_ARGS+= -r ${STAGEDIR}
. if defined(PKG_CREATE_VERBOSE)
PKG_CREATE_ARGS+= -v
diff --git a/ports-mgmt/pkg-devel/Makefile b/ports-mgmt/pkg-devel/Makefile
index 22b7171eb910..1c0c294666c6 100644
--- a/ports-mgmt/pkg-devel/Makefile
+++ b/ports-mgmt/pkg-devel/Makefile
@@ -1,5 +1,5 @@
PORTNAME= pkg
-DISTVERSION= 1.16.99.5
+DISTVERSION= 1.17.99.1
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt
PKGNAMESUFFIX= -devel
@@ -11,7 +11,7 @@ LICENSE= BSD2CLAUSE
USE_GITHUB= yes
GH_ACCOUNT= freebsd
-GH_TAGNAME= ceadb444
+GH_TAGNAME= 156c1c06
CFLAGS+= -O0 -g -Wno-error
USE_LDCONFIG= ${PREFIX}/lib/compat/pkg
diff --git a/ports-mgmt/pkg-devel/distinfo b/ports-mgmt/pkg-devel/distinfo
index e2c5a9b8eb78..b28541cc5996 100644
--- a/ports-mgmt/pkg-devel/distinfo
+++ b/ports-mgmt/pkg-devel/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1619449772
-SHA256 (freebsd-pkg-1.16.99.5-ceadb444_GH0.tar.gz) = 7d7efc270db15fff87e689d3c35f137ac0f8f21c7fdc329350cf414d63a832c1
-SIZE (freebsd-pkg-1.16.99.5-ceadb444_GH0.tar.gz) = 3894193
+TIMESTAMP = 1626940540
+SHA256 (freebsd-pkg-1.17.99.1-156c1c06_GH0.tar.gz) = ca7edf8c5ed57b81bfd2db7fe59648a8bc858b678d52913035c66ec13fc68294
+SIZE (freebsd-pkg-1.17.99.1-156c1c06_GH0.tar.gz) = 3894459
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 23a5b24e1de0..0e454e3e9484 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -1,5 +1,5 @@
PORTNAME= pkg
-DISTVERSION= 1.16.3
+DISTVERSION= 1.17.0
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt
#MASTER_SITES= \
diff --git a/ports-mgmt/pkg/distinfo b/ports-mgmt/pkg/distinfo
index af4c104dc69e..d803a6d0e84e 100644
--- a/ports-mgmt/pkg/distinfo
+++ b/ports-mgmt/pkg/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1613671680
-SHA256 (freebsd-pkg-1.16.3_GH0.tar.gz) = db4bba12ba56521b21b01ac2e404a57ff12f631a4fb3363316f98fc1f189e883
-SIZE (freebsd-pkg-1.16.3_GH0.tar.gz) = 3834224
+TIMESTAMP = 1626940434
+SHA256 (freebsd-pkg-1.17.0_GH0.tar.gz) = 800bcab7af1df2981f3dfd99361f409115781a4c06c018dd338930ecff06427a
+SIZE (freebsd-pkg-1.17.0_GH0.tar.gz) = 3894396