changeset 386:84d2735fe7f6

Simplified version tagging a lot: it is also faster now. While being there: adjusting copyright year to end in 2023 now.
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 23 Feb 2023 01:08:31 +0100
parents d058f55fffea
children 9921352225a9
files Makefile docs/man/man8/local-bsdtools.rst etc/bsmtp2dma.conf.sample etc/package-mapping.conf.sample etc/periodic/daily/750.local-trim-zfs etc/periodic/daily/800.local-ipv6-refresh etc/pkgtools.conf.sample sbin/bsmtp2dma sbin/check-ports sbin/fjail sbin/fpkg sbin/ftjail sbin/fzfs
diffstat 13 files changed, 31 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Feb 22 21:23:50 2023 +0100
+++ b/Makefile	Thu Feb 23 01:08:31 2023 +0100
@@ -35,6 +35,9 @@
 HGAUTHOR=	${:!hg log -R "${SRC}" -r "${HGREVISION:S/+//}" --template '{author|person}' | ${TR} ' ' '+'!}
 HGPATH=		${:!hg --config ui.paginate=never path -R "${SRC}" ${HGCANONICALPATH} || echo "file://\$$\(hg root)"!}
 HGPHASE=	${:!hg phase!:[2]}
+SIMPLEVERSIONSTR=	v${PKGVERSION} (rv:${HGREVISION})
+SIMPLEVERSIONTAG=	${PKGORIGIN} v${PKGVERSION} (rv:${HGREVISION})
+VERSIONTAG=	${PKGORIGIN} v${PKGVERSION} (rv:${HGREVISION} with repo at ${HGPATH})
 
 do-extract:
 	${MKDIR} ${WRKSRC}/bin
@@ -42,31 +45,23 @@
 	${CP} Makefile ${WRKSRC}/Makefile
 .for _rp in sbin/check-ports sbin/fjail sbin/ftjail sbin/fzfs sbin/fpkg sbin/bsmtp2dma
 	${CP} -v ${SRC}/${_rp} ${WRKSRC}/${_rp}
-	${SED} -i "" -E -e "s|\\\$$Date\\\$$|\$$Date: ${HGDATE} \$$|" ${WRKSRC}/${_rp}
-	${SED} -i "" -E -e "s|\\\$$Revision\\\$$|\$$Revision: ${HGREVISION} \$$|" ${WRKSRC}/${_rp}
-	${SED} -i "" -E -e "s|\\\$$Author\\\$$|\$$Author: ${HGAUTHOR} \$$|" ${WRKSRC}/${_rp}
-	${SED} -i "" -e "s|\\\$$HGpath\\\$$|\$$HGpath: ${HGPATH} \$$|" ${WRKSRC}/${_rp}
-	${SED} -i "" -e "s|\\\$$HGsource\\\$$|\$$HGsource: ${HGPATH}/${_rp} \$$|" ${WRKSRC}/${_rp}
-	${SED} -i "" -e "s|\\\$$Header\\\$$|\$$Header: ${_rp} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/${_rp}
-	${SED} -i "" -e "s|\\\$$HGid\\\$$|\$$HGid: ${HGPATH}/${_rp} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/${_rp}
 	${SED} -i "" -e "s|@@VERSION@@|${PORTVERSION}|" ${WRKSRC}/${_rp}
-	${SED} -i "" -e "s|@@HGREVISION@@|${HGREVISION}|" ${WRKSRC}/${_rp}
 	${SED} -i "" -e "s|@@ETCDIR@@|${ETCDIR}|" ${WRKSRC}/${_rp}
-	${SED} -i "" -e "s|@@PKGORIGIN@@|${PKGORIGIN}|" ${WRKSRC}/${_rp}
+	${SED} -i "" -e "s|@@VERSIONTAG@@|${VERSIONTAG}|" ${WRKSRC}/${_rp}
+	${SED} -i "" -e "s|@@SIMPLEVERSIONTAG@@|${SIMPLEVERSIONTAG}|" ${WRKSRC}/${_rp}
+	${SED} -i "" -e "s|@@SIMPLEVERSIONSTR@@|${SIMPLEVERSIONSTR}|" ${WRKSRC}/${_rp}
 .endfor
 	${MKDIR} ${WRKSRC}/etc/periodic/daily
 .for _ef in etc/package-mapping.conf.sample etc/pkgtools.conf.sample etc/bsmtp2dma.conf.sample etc/periodic/daily/800.local-ipv6-refresh etc/periodic/daily/750.local-trim-zfs
 	${CP} -v ${SRC}/${_ef} ${WRKSRC}/${_ef}
-	${SED} -i "" -e "s|\\\$$HGid\\\$$|\$$HGid: ${HGPATH}/${_ef} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/${_ef}
-	${SED} -i "" -e "s|@@PKGORIGIN@@|${PKGORIGIN}|" ${WRKSRC}/${_ef}
+	${SED} -i "" -e "s|@@SIMPLEVERSIONTAG@@|${SIMPLEVERSIONTAG}|" ${WRKSRC}/${_ef}
 .endfor
 
 post-extract-DOCS-on:
 	${MKDIR} ${WRKSRC}/docs
 	(${TAR} -C ${.CURDIR}/docs -c --exclude ./_build -f - . | ${TAR} -C ${WRKSRC}/docs -x -f - )
 .for _mp in man/man8/local-bsdtools.rst
-	${SED} -i "" -e "s|@@PKGORIGIN@@|${PKGORIGIN}|" ${WRKSRC}/docs/${_mp}
-	${SED} -i "" -e "s|@@VERSION@@|${PORTVERSION}|" ${WRKSRC}/docs/${_mp}
+	${SED} -i "" -e "s|@@SIMPLEVERSIONTAG@@|${SIMPLEVERSIONTAG}|" ${WRKSRC}/docs/${_mp}
 	${SED} -i "" -e "s|\\\$$HGid\\\$$|\$$HGid: ${HGPATH}/docs/${_mp} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/docs/${_mp}
 .endfor
 
--- a/docs/man/man8/local-bsdtools.rst	Wed Feb 22 21:23:50 2023 +0100
+++ b/docs/man/man8/local-bsdtools.rst	Thu Feb 23 01:08:31 2023 +0100
@@ -76,5 +76,5 @@
 History
 -------
 
-:Version: @(#)@@PKGORIGIN@@ v@@VERSION@@
+:Version: @(#)@@SIMPLEVERSIONTAG@@
 :ID:      $HGid$
--- a/etc/bsmtp2dma.conf.sample	Wed Feb 22 21:23:50 2023 +0100
+++ b/etc/bsmtp2dma.conf.sample	Thu Feb 23 01:08:31 2023 +0100
@@ -3,7 +3,7 @@
 #
 # Is is sourced by `bsmtp2dma`.
 #
-# @(#)@@PKGORIGIN@@ $HGid$
+# @(#)@@SIMPLEVERSIONTAG@@
 #
 
 #
--- a/etc/package-mapping.conf.sample	Wed Feb 22 21:23:50 2023 +0100
+++ b/etc/package-mapping.conf.sample	Thu Feb 23 01:08:31 2023 +0100
@@ -1,7 +1,7 @@
 #
 # Map from installed package name to the (unchanged) parent package name
 #
-# @(#)@@PKGORIGIN@@ $HGid$
+# @(#)@@SIMPLEVERSIONTAG@@
 #
 fmg-nextcloud-php71 nextcloud-php71
 fmg-nextcloud-twofactor_totp-php71 nextcloud-twofactor_totp-php71
--- a/etc/periodic/daily/750.local-trim-zfs	Wed Feb 22 21:23:50 2023 +0100
+++ b/etc/periodic/daily/750.local-trim-zfs	Thu Feb 23 01:08:31 2023 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# # @(#)@@PKGORIGIN@@ $HGid$
+# # @(#)@@SIMPLEVERSIONTAG@@
 #
 # Heavily inspired (aka "copied")  from /etc/periodic/daily/800.scrub-zfs
 #
--- a/etc/periodic/daily/800.local-ipv6-refresh	Wed Feb 22 21:23:50 2023 +0100
+++ b/etc/periodic/daily/800.local-ipv6-refresh	Thu Feb 23 01:08:31 2023 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# @(#)@@PKGORIGIN@@ $HGid$
+# @(#)@@SIMPLEVERSIONTAG@@
 #
 # Daily script to keep the IPv6 routing working
 #
--- a/etc/pkgtools.conf.sample	Wed Feb 22 21:23:50 2023 +0100
+++ b/etc/pkgtools.conf.sample	Thu Feb 23 01:08:31 2023 +0100
@@ -1,3 +1,3 @@
 # Shell (sh) script to configure tools in local-bsdtools
-# @(#)@@PKGORIGIN@@ $HGid$
+# @(#)@@SIMPLEVERSIONTAG@@
 #
--- a/sbin/bsmtp2dma	Wed Feb 22 21:23:50 2023 +0100
+++ b/sbin/bsmtp2dma	Thu Feb 23 01:08:31 2023 +0100
@@ -4,13 +4,13 @@
 not listen on TCP ports (e.g. `dma`, `ssmtp` et al.).
 
 :Author:    Franz Glasner
-:Copyright: (c) 2019 Franz Glasner.
+:Copyright: (c) 2019-2023 Franz Glasner.
             All rights reserved.
 :License:   BSD 3-Clause "New" or "Revised" License.
             See LICENSE for details.
             If you cannot find LICENSE see
             <https://opensource.org/licenses/BSD-3-Clause>
-:ID:        @(#)@@PKGORIGIN@@ $HGid$
+:ID:        @(#)@@SIMPLEVERSIONTAG@@
 
 '
 
@@ -237,7 +237,7 @@
 while getopts "V8c:d:f:h:l:nr:s:" _opt; do
     case ${_opt} in
         V)
-            printf 'bsmtp2dma v%s (rv:%s)\n' "${VERSION}" '@@HGREVISION@@'
+            printf 'bsmtp2dma %s\n' '@@SIMPLEVERSIONSTR@@'
             echo "$USAGE"
             exit 0;
             ;;
--- a/sbin/check-ports	Wed Feb 22 21:23:50 2023 +0100
+++ b/sbin/check-ports	Thu Feb 23 01:08:31 2023 +0100
@@ -4,13 +4,13 @@
 version in remote repositories and the local ports index.
 
 :Author:    Franz Glasner
-:Copyright: (c) 2017-2022 Franz Glasner.
+:Copyright: (c) 2017-2023 Franz Glasner.
             All rights reserved.
 :License:   BSD 3-Clause "New" or "Revised" License.
             See LICENSE for details.
             If you cannot find LICENSE see
             <https://opensource.org/licenses/BSD-3-Clause>
-:ID:        @(#)@@PKGORIGIN@@ $HGid$
+:ID:        @(#)@@SIMPLEVERSIONTAG@@
 
 '
 
@@ -497,7 +497,7 @@
 while getopts "VhAansv" _opt ; do
     case ${_opt} in
 	V)
-            printf 'check-ports v%s (rv:%s)\n' "${VERSION}" '@@HGREVISION@@'
+            printf 'check-ports %s\n' '@@SIMPLEVERSIONSTR@@'
             exit 0
 	    ;;
         h)
--- a/sbin/fjail	Wed Feb 22 21:23:50 2023 +0100
+++ b/sbin/fjail	Thu Feb 23 01:08:31 2023 +0100
@@ -3,13 +3,13 @@
 : 'A very minimal BSD Jail management tool.
 
 :Author:    Franz Glasner
-:Copyright: (c) 2019-2022 Franz Glasner.
+:Copyright: (c) 2019-2023 Franz Glasner.
             All rights reserved.
 :License:   BSD 3-Clause "New" or "Revised" License.
             See LICENSE for details.
             If you cannot find LICENSE see
             <https://opensource.org/licenses/BSD-3-Clause>
-:ID:        @(#)@@PKGORIGIN@@ $HGid$
+:ID:        @(#)@@SIMPLEVERSIONTAG@@
 
 '
 
@@ -684,7 +684,7 @@
 while getopts "Vh" _opt ; do
     case ${_opt} in
         V)
-            printf 'fjail v%s (rv:%s)\n' "${VERSION}" '@@HGREVISION@@'
+            printf 'fjail %s\n' '@@SIMPLEVERSIONSTR@@'
             exit 0
             ;;
         h)
--- a/sbin/fpkg	Wed Feb 22 21:23:50 2023 +0100
+++ b/sbin/fpkg	Thu Feb 23 01:08:31 2023 +0100
@@ -4,13 +4,13 @@
 running jails.
 
 :Author:    Franz Glasner
-:Copyright: (c) 2019-2022 Franz Glasner.
+:Copyright: (c) 2019-2023 Franz Glasner.
             All rights reserved.
 :License:   BSD 3-Clause "New" or "Revised" License.
             See LICENSE for details.
             If you cannot find LICENSE see
             <https://opensource.org/licenses/BSD-3-Clause>
-:ID:        @(#)@@PKGORIGIN@@ $HGid$
+:ID:        @(#)@@SIMPLEVERSIONTAG@@
 
 '
 
@@ -323,7 +323,7 @@
 while getopts "Vh" _opt ; do
     case ${_opt} in
         V)
-            printf 'fpkg v%s (rv:%s)\n' "${VERSION}" '@@HGREVISION@@'
+            printf 'fpkg %s\n' '@@SIMPLEVERSIONSTR@@'
             exit 0
             ;;
         h)
--- a/sbin/ftjail	Wed Feb 22 21:23:50 2023 +0100
+++ b/sbin/ftjail	Thu Feb 23 01:08:31 2023 +0100
@@ -10,7 +10,7 @@
 #:             See LICENSE for details.
 #:             If you cannot find LICENSE see
 #:             <https://opensource.org/licenses/BSD-3-Clause>
-#: :ID:        @(#)@@PKGORIGIN@@ $HGid$
+#: :ID:        @(#)@@SIMPLEVERSIONTAG@@
 #:
 
 set -eu
@@ -1165,7 +1165,7 @@
 while getopts "Vh" _opt ; do
     case ${_opt} in
         V)
-            printf 'ftjail v%s (rv:%s)\n' "${VERSION}" '@@HGREVISION@@'
+            printf 'ftjail %s\n' '@@SIMPLEVERSIONSTR@@'
             exit 0
             ;;
         h)
--- a/sbin/fzfs	Wed Feb 22 21:23:50 2023 +0100
+++ b/sbin/fzfs	Thu Feb 23 01:08:31 2023 +0100
@@ -4,13 +4,13 @@
 #: A ZFS management helper tool.
 #:
 #: :Author:    Franz Glasner
-#: :Copyright: (c) 2022 Franz Glasner.
+#: :Copyright: (c) 2022-2023 Franz Glasner.
 #:             All rights reserved.
 #: :License:   BSD 3-Clause "New" or "Revised" License.
 #:             See LICENSE for details.
 #:             If you cannot find LICENSE see
 #:             <https://opensource.org/licenses/BSD-3-Clause>
-#: :ID:        @(#)@@PKGORIGIN@@ $HGid$
+#: :ID:        @(#)@@SIMPLEVERSIONTAG@@
 #:
 
 set -eu
@@ -376,7 +376,7 @@
 while getopts "Vh" _opt ; do
     case ${_opt} in
         V)
-            printf 'ftjail v%s (rv:%s)\n' "${VERSION}" '@@HGREVISION@@'
+            printf 'ftjail %s\n' '@@SIMPLEVERSIONSTR@@'
             exit 0
             ;;
         h)