git: 2b48bc59c42b - main - ports-mgmt/poudriere-dsh2dsh: added fork of poudriere 3.4.99.20240812

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Mon, 21 Oct 2024 17:54:39 UTC
The branch main has been updated by mfechner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2b48bc59c42b252ac5fd76db33e04e9a230fcb37

commit 2b48bc59c42b252ac5fd76db33e04e9a230fcb37
Author:     Denis Shaposhnikov <dsh@bamus.cz>
AuthorDate: 2024-10-21 17:52:08 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-10-21 17:53:57 +0000

    ports-mgmt/poudriere-dsh2dsh: added fork of poudriere 3.4.99.20240812
    
    Changes from upstream:
    
      * Better reuse of prebuilded FreeBSD packages.
      * Speedup building by rebuilding only changed ports.
      * Share go mod cache between builders and store downloaded modules in
        `DISTFILES_CACHE`.
    
    https://github.com/dsh2dsh/poudriere
    
    PR:             282248
---
 ports-mgmt/Makefile                    |   1 +
 ports-mgmt/poudriere-dsh2dsh/Makefile  |  88 +++++++++++++++++++++++++
 ports-mgmt/poudriere-dsh2dsh/distinfo  |   3 +
 ports-mgmt/poudriere-dsh2dsh/pkg-descr |   9 +++
 ports-mgmt/poudriere-dsh2dsh/pkg-plist | 115 +++++++++++++++++++++++++++++++++
 5 files changed, 216 insertions(+)

diff --git a/ports-mgmt/Makefile b/ports-mgmt/Makefile
index 016706fcc9e6..a28c7229e54a 100644
--- a/ports-mgmt/Makefile
+++ b/ports-mgmt/Makefile
@@ -70,6 +70,7 @@
     SUBDIR += portupgrade-devel
     SUBDIR += poudriere
     SUBDIR += poudriere-devel
+    SUBDIR += poudriere-dsh2dsh
     SUBDIR += psearch
     SUBDIR += py-FreeBSD-ports
     SUBDIR += py-pnu-portstreelint
diff --git a/ports-mgmt/poudriere-dsh2dsh/Makefile b/ports-mgmt/poudriere-dsh2dsh/Makefile
new file mode 100644
index 000000000000..8d4f06d12602
--- /dev/null
+++ b/ports-mgmt/poudriere-dsh2dsh/Makefile
@@ -0,0 +1,88 @@
+PORTNAME=	poudriere
+DISTVERSION=	3.4.99.20240812
+CATEGORIES=	ports-mgmt
+PKGNAMESUFFIX=	-dsh2dsh
+
+MAINTAINER=	dsh@bamus.cz
+COMMENT=	Port build and test system (fork with more features)
+
+LICENSE=	BSD2CLAUSE
+
+CONFLICTS_INSTALL=	poudriere*
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	dsh2dsh
+GH_TAGNAME=	c984ecd
+
+GNU_CONFIGURE=	yes
+ETCDIR=		${PREFIX}/etc/poudriere.d
+
+OPTIONS_DEFINE=	BASH MANIFESTS PORTCONFIG EXAMPLES QEMU ZSH
+OPTIONS_DEFAULT=BASH MANIFESTS PORTCONFIG ZSH
+OPTIONS_SUB=	yes
+
+MANIFESTS_DESC=		Install manifests for jail creation
+MANIFESTS_RUN_DEPENDS+=	freebsd-release-manifests>0:misc/freebsd-release-manifests
+
+PORTCONFIG_DESC=	Install portconfig for options command
+PORTCONFIG_RUN_DEPENDS=	portconfig>0:ports-mgmt/portconfig
+
+QEMU_DESC=	Add qemu-user-static for non-x86 architectures
+QEMU_RUN_DEPENDS=	qemu-user-static>0:emulators/qemu-user-static
+
+
+# gmake is not strictly needed but handles test jobs better
+TEST_DEPENDS=	gmake>0:devel/gmake
+TEST_ENV=	MAKE=gmake
+.if make(test)
+MAKE_CMD=	gmake
+.endif
+TEST_TARGET=	check
+TEST_ARGS=	-s
+TEST_ARGS+=	${_MAKE_JOBS}
+# ccache passthrough helps for building pkg a few hundred times.
+# ccache not added as a dependency because it is only used if setup
+# and provided in the env already.
+# XXX: Passthrough local PKGREPOSITORY dir for fetch support
+ccache_vars=	CCACHE_DIR_NON_ROOT_SAFE CCACHE_GROUP \
+		CCACHE_GID CCACHE_STATIC_PREFIX CCACHE_TEMPDIR \
+		CCACHE_DIR CCACHE_NLEVELS
+.for _cv in ${ccache_vars}
+.  if !empty(${_cv})
+TEST_ENV+=	${_cv}=${${_cv}}
+.  endif
+.endfor
+
+.include <bsd.port.options.mk>
+
+# rm -x support came in 10.0.  A bundled rm is used if not supported in base.
+# While <10 is technically not supported in the Ports Tree, Poudriere
+# detects this and it being a package build tool it should still be
+# supported as a user may be installing this to build packages for upgrading
+# their system to a supported release.
+.if ${OSVERSION} < 1000000
+PLIST_SUB+=	RM=""
+.else
+PLIST_SUB+=	RM="@comment "
+.endif
+
+post-patch:
+	${REINPLACE_CMD} \
+	    -e "s,^\(POUDRIERE_VERSION\)=.*,\1='${PKGVERSION}'," \
+	    ${WRKSRC}/src/bin/poudriere.in
+
+post-install:
+	${LN} -fs ${LOCALBASE}/share/freebsd/MANIFESTS \
+	    ${STAGEDIR}${DATADIR}/MANIFESTS
+
+post-install-BASH-on:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions/
+	${INSTALL_DATA} ${WRKSRC}/completions/bash/poudriere \
+	    ${STAGEDIR}${PREFIX}/share/bash-completion/completions/
+
+post-install-ZSH-on:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+	${INSTALL_DATA} ${WRKSRC}/completions/zsh/_poudriere \
+	    ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+
+.include <bsd.port.mk>
diff --git a/ports-mgmt/poudriere-dsh2dsh/distinfo b/ports-mgmt/poudriere-dsh2dsh/distinfo
new file mode 100644
index 000000000000..2cbc142e4c21
--- /dev/null
+++ b/ports-mgmt/poudriere-dsh2dsh/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1723471537
+SHA256 (dsh2dsh-poudriere-3.4.99.20240812-c984ecd_GH0.tar.gz) = 423ff3eaa91e7dfa91a19818456c82323d78233c589f9b206e5f30d5a77a8d76
+SIZE (dsh2dsh-poudriere-3.4.99.20240812-c984ecd_GH0.tar.gz) = 5745709
diff --git a/ports-mgmt/poudriere-dsh2dsh/pkg-descr b/ports-mgmt/poudriere-dsh2dsh/pkg-descr
new file mode 100644
index 000000000000..447ee25fcb16
--- /dev/null
+++ b/ports-mgmt/poudriere-dsh2dsh/pkg-descr
@@ -0,0 +1,9 @@
+poudriere is a tool primarily designed to test package production on FreeBSD.
+However, most people will find it useful to bulk build ports for FreeBSD.
+
+Changes from upstream:
+
+  * Better reuse of prebuilded FreeBSD packages.
+  * Speedup building by rebuilding only changed ports.
+  * Share go mod cache between builders and store downloaded modules in
+    `DISTFILES_CACHE`.
diff --git a/ports-mgmt/poudriere-dsh2dsh/pkg-plist b/ports-mgmt/poudriere-dsh2dsh/pkg-plist
new file mode 100644
index 000000000000..50311b55a168
--- /dev/null
+++ b/ports-mgmt/poudriere-dsh2dsh/pkg-plist
@@ -0,0 +1,115 @@
+bin/poudriere
+@sample etc/poudriere.conf.sample
+%%ETCDIR%%/hooks/bulk.sh.sample
+%%ETCDIR%%/hooks/pkgbuild.sh.sample
+@sample(0,0,0) etc/poudriered.conf.sample
+etc/rc.d/poudriered
+@comment libexec/poudriere/cachec
+libexec/poudriere/clock
+libexec/poudriere/cpdup
+libexec/poudriere/dirempty
+libexec/poudriere/dirwatch
+libexec/poudriere/locked_mkdir
+libexec/poudriere/nc
+libexec/poudriere/poudriered
+libexec/poudriere/ptsort
+libexec/poudriere/pwait
+libexec/poudriere/rename
+%%RM%%libexec/poudriere/rm
+libexec/poudriere/setsid
+libexec/poudriere/sh
+libexec/poudriere/timeout
+libexec/poudriere/timestamp
+%%BASH%%share/bash-completion/completions/poudriere
+share/man/man8/poudriere-bulk.8.gz
+share/man/man8/poudriere-distclean.8.gz
+share/man/man8/poudriere-image.8.gz
+share/man/man8/poudriere-jail.8.gz
+share/man/man8/poudriere-logclean.8.gz
+share/man/man8/poudriere-options.8.gz
+share/man/man8/poudriere-pkgclean.8.gz
+share/man/man8/poudriere-ports.8.gz
+share/man/man8/poudriere-queue.8.gz
+share/man/man8/poudriere-status.8.gz
+share/man/man8/poudriere-testport.8.gz
+share/man/man8/poudriere-version.8.gz
+share/man/man8/poudriere.8.gz
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Caddyfile.sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/httpd.conf.sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nginx.conf.sample
+%%DATADIR%%/MANIFESTS
+%%DATADIR%%/api.sh
+%%DATADIR%%/awk/dependency_loop.awk
+%%DATADIR%%/awk/file_cmp_reg.awk
+%%DATADIR%%/awk/humanize.awk
+%%DATADIR%%/awk/json.awk
+%%DATADIR%%/awk/json_jail.awk
+%%DATADIR%%/awk/json_top.awk
+%%DATADIR%%/awk/parse_MOVED.awk
+%%DATADIR%%/awk/processonelog.awk
+%%DATADIR%%/awk/processonelog2.awk
+%%DATADIR%%/awk/siginfo_buildtime.awk
+%%DATADIR%%/awk/unique_pkgnames_from_flavored_origins.awk
+%%DATADIR%%/bulk.sh
+%%DATADIR%%/common.sh
+%%DATADIR%%/daemon.sh
+%%DATADIR%%/distclean.sh
+%%DATADIR%%/foreachport.sh
+%%DATADIR%%/html/assets/DataTables-1.13.8/css/dataTables.bootstrap5.min.css
+%%DATADIR%%/html/assets/DataTables-1.13.8/images/sort_asc.png
+%%DATADIR%%/html/assets/DataTables-1.13.8/images/sort_asc_disabled.png
+%%DATADIR%%/html/assets/DataTables-1.13.8/images/sort_both.png
+%%DATADIR%%/html/assets/DataTables-1.13.8/images/sort_desc.png
+%%DATADIR%%/html/assets/DataTables-1.13.8/images/sort_desc_disabled.png
+%%DATADIR%%/html/assets/DataTables-1.13.8/js/dataTables.bootstrap5.min.js
+%%DATADIR%%/html/assets/DataTables-1.13.8/js/jquery.dataTables.min.js
+%%DATADIR%%/html/assets/bootstrap-5.3.2/css/bootstrap.min.css
+%%DATADIR%%/html/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js
+%%DATADIR%%/html/assets/favicon.png
+%%DATADIR%%/html/assets/jquery-3.7.1/jquery-3.7.1.js
+%%DATADIR%%/html/assets/jquery-3.7.1/jquery-3.7.1.min.js
+%%DATADIR%%/html/assets/jquery-3.7.1/jquery-3.7.1.min.map
+%%DATADIR%%/html/assets/jquery.dataTables.rowGrouping-1.2.9.js
+%%DATADIR%%/html/assets/logo-dark.png
+%%DATADIR%%/html/assets/logo-light.png
+%%DATADIR%%/html/assets/poudriere.js
+%%DATADIR%%/html/build.html
+%%DATADIR%%/html/index.html
+%%DATADIR%%/html/jail.html
+%%DATADIR%%/html/robots.txt
+%%DATADIR%%/image.sh
+%%DATADIR%%/image_dump.sh
+%%DATADIR%%/image_firmware.sh
+%%DATADIR%%/image_hybridiso.sh
+%%DATADIR%%/image_iso.sh
+%%DATADIR%%/image_mfs.sh
+%%DATADIR%%/image_rawdisk.sh
+%%DATADIR%%/image_tar.sh
+%%DATADIR%%/image_usb.sh
+%%DATADIR%%/image_zfs.sh
+%%DATADIR%%/image_zsnapshot.sh
+%%DATADIR%%/include/asserts.sh
+%%DATADIR%%/include/cache.sh
+%%DATADIR%%/include/colors.pre.sh
+%%DATADIR%%/include/colors.sh
+%%DATADIR%%/include/common.sh.dragonfly
+%%DATADIR%%/include/common.sh.freebsd
+%%DATADIR%%/include/display.sh
+%%DATADIR%%/include/fs.sh
+%%DATADIR%%/include/hash.sh
+%%DATADIR%%/include/html.sh
+%%DATADIR%%/include/parallel.sh
+%%DATADIR%%/include/pkg.sh
+%%DATADIR%%/include/pkgqueue.sh
+%%DATADIR%%/include/shared_hash.sh
+%%DATADIR%%/include/util.sh
+%%DATADIR%%/jail.sh
+%%DATADIR%%/logclean.sh
+%%DATADIR%%/options.sh
+%%DATADIR%%/pkgclean.sh
+%%DATADIR%%/ports.sh
+%%DATADIR%%/processonelog.sh
+%%DATADIR%%/queue.sh
+%%DATADIR%%/status.sh
+%%DATADIR%%/testport.sh
+%%ZSH%%share/zsh/site-functions/_poudriere