From nobody Tue Mar 7 17:10:13 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PWMQG1Tpvz3wNyD; Tue, 7 Mar 2023 17:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PWMQF5hDMz4Mmy; Tue, 7 Mar 2023 17:10:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678209013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HJkXsrhG8XZ0XT0S3PlX497jXtz5d/GYq/CYFxiEfI=; b=gCvbWyQj0p5o3P3dMVFducS2IoSis3bAJ0xXK6dm7SIo066akoEbPqH54OaB+7WASdvGNT 16m3aD/Nq4j566XaKNjyPjAwXfNmBsGXCe1TyHwaaDv3y9F3TPsy7Wl1SR6A3lXYSH+Nm7 VhFvFiuFKCovO4VBsXLbs28qQ0i43s0jJRGNIxTKcJqrEC4S/KRwThjnmAf4+akR5ZP4Ua D7qki3lB0XR4UZw2nIuKPr2bVGDyae8awBrTAxW2f3m4kQuYQH9X0sw++crJsLLzmg4mXI /QAIb0ILPpr9VxmfFlFIQb9KRawj1cgzKDofDb7zJ9GGoF0KHHsFdbX8u+gOOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678209013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HJkXsrhG8XZ0XT0S3PlX497jXtz5d/GYq/CYFxiEfI=; b=vf35o78Xl/DyGkQzOnbXZzcQpSw32fwxUBqzwREeXdvtuvoVUady3MTEOxlbs1cCNAAHJJ 3KeWYNtex81j8dML70U0MMvPM1NPUL7PIki6eTVsjwywdmn78rBQxDTEOf0R7oM7OoeeWi mo2TskuH2hUDLdy2Ra8GkBb5rZ8WHd9Q1K0qop4QpM7bxvm1p5Jraq2SbFjLHxEzCWEv1Y TD3NuSRly99tRKJ9UvQpntSbAmXZXbhh+lu9Jba0LOIAkKkCkkeQ6/7z4Ar4gscxQAAbiu jrfFyQ2Azioz11qcvQU88Txj1A0OzSsMMm+sksVsDAqXbeqlyYka/jRzF93KYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678209013; a=rsa-sha256; cv=none; b=VqFrpgeF5AWtnWhBmEgHXtcHN9QbIgcJB6ISFlOVLJhFq1FU4nT6+qbquvDQjjfMwUNPdv cn4EMXNMA15GHTMMPx8gEuyimTmCUfevZs037x1U+va5O+nCRqAxXr9wMQOUvcyf4tROZo hAIUaYOA1xIhBYZOVukY7JEMrxPRF/Pa/IKFVXOtgIjPA1cbPbFRc+9LaoLtCAe/z9yW2J 9ARNRk5KPWYWS5ATdebI5lzJmTd/TOiZxyWhL1b/jOaSVtk44ZIzdxcGoRUzAa3YXMlDx2 vQtJpKj1nC+l89UNqudtAba1eFQSKW7dnrMIfmtQm/pxN+6XRa0qDE9HoqtdBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PWMQF4jp8zrGh; Tue, 7 Mar 2023 17:10:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 327HAD0v047551; Tue, 7 Mar 2023 17:10:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 327HADG1047541; Tue, 7 Mar 2023 17:10:13 GMT (envelope-from git) Date: Tue, 7 Mar 2023 17:10:13 GMT Message-Id: <202303071710.327HADG1047541@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Felix Palmen Subject: git: 4e0f740ddca6 - main - sysutils/debootstrap: Fix several issues List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zirias X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e0f740ddca6bd6d4cf7017bb3132ee759f6db39 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zirias: URL: https://cgit.FreeBSD.org/ports/commit/?id=4e0f740ddca6bd6d4cf7017bb3132ee759f6db39 commit 4e0f740ddca6bd6d4cf7017bb3132ee759f6db39 Author: Felix Palmen AuthorDate: 2023-02-24 08:32:30 +0000 Commit: Felix Palmen CommitDate: 2023-03-07 17:09:28 +0000 sysutils/debootstrap: Fix several issues * Don't use substitutions on Makefile, pass variables instead * Eliminate "static" substitutions, use a patch-file instead * Fix hardcoded /usr/local in debootstrap script PR: 269584 Approved by: nc (maintainer), tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D38754 --- sysutils/debootstrap/Makefile | 24 +++++++++--------------- sysutils/debootstrap/files/patch-Makefile | 2 +- sysutils/debootstrap/files/patch-debootstrap | 4 ++-- sysutils/debootstrap/files/patch-functions | 20 ++++++++++++++++++++ 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/sysutils/debootstrap/Makefile b/sysutils/debootstrap/Makefile index 47dcc65a4b85..baff0b53bf40 100644 --- a/sysutils/debootstrap/Makefile +++ b/sysutils/debootstrap/Makefile @@ -1,5 +1,6 @@ PORTNAME= debootstrap PORTVERSION= ${DEB_VERSION}n${DEB_NMU} +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= DEBIAN DISTNAME= ${PORTNAME}_${DEB_VERSION}+nmu${DEB_NMU} @@ -17,31 +18,24 @@ RUN_DEPENDS= wget:ftp/wget \ gpgv2:security/gnupg \ ${LOCALBASE}/share/keyrings/ubuntu-archive-keyring.gpg:security/ubuntu-keyring -WRKSRC= ${WRKDIR}/${PORTNAME} -NO_BUILD= yes -NO_ARCH= yes USES= gmake perl5 USE_PERL5= run +MAKE_ENV= DATADIR="${DATADIR}" +NO_ARCH= yes +NO_BUILD= yes +WRKSRC= ${WRKDIR}/${PORTNAME} + # The +nmu suffix used by debian for "non maintainer uploads" of a Debian # native package doesn't play well with our versioning DEB_VERSION= 1.0.128 DEB_NMU= 2 post-patch: - @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \ - ${WRKSRC}/Makefile \ - ${WRKSRC}/debootstrap - @${REINPLACE_CMD} -e 's,%%DATADIR%%,${DATADIR},g' \ - ${WRKSRC}/Makefile \ + @${REINPLACE_CMD} \ + -e 's,%%DATADIR%%,${DATADIR},g' \ + -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ ${WRKSRC}/debootstrap - @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ - ${WRKSRC}/Makefile \ - ${WRKSRC}/debootstrap - @${REINPLACE_CMD} -e 's,gpgv,gpgv2,g' \ - ${WRKSRC}/Makefile \ - ${WRKSRC}/debootstrap \ - ${WRKSRC}/functions @${FIND} ${WRKSRC}/scripts -type f | \ ${XARGS} ${REINPLACE_CMD} -e 's,/usr/share/keyrings,${LOCALBASE}/share/keyrings,g' diff --git a/sysutils/debootstrap/files/patch-Makefile b/sysutils/debootstrap/files/patch-Makefile index 8d55f3868d54..4627149a0e5a 100644 --- a/sysutils/debootstrap/files/patch-Makefile +++ b/sysutils/debootstrap/files/patch-Makefile @@ -5,7 +5,7 @@ clean: -DSDIR=$(DESTDIR)/usr/share/debootstrap -+DSDIR=$(DESTDIR)$(PREFIX)/share/debootstrap ++DSDIR=$(DESTDIR)$(DATADIR) install: mkdir -p $(DSDIR)/scripts - mkdir -p $(DESTDIR)/usr/sbin diff --git a/sysutils/debootstrap/files/patch-debootstrap b/sysutils/debootstrap/files/patch-debootstrap index 82733b633193..32e164a075f3 100644 --- a/sysutils/debootstrap/files/patch-debootstrap +++ b/sysutils/debootstrap/files/patch-debootstrap @@ -2,7 +2,7 @@ +++ debootstrap @@ -1,4 +1,4 @@ -#!/bin/sh -+#!/usr/local/bin/bash ++#!%%LOCALBASE%%/bin/bash set -e VERSION='@VERSION@' @@ -11,7 +11,7 @@ DEBOOTSTRAP_DIR=/debootstrap else - DEBOOTSTRAP_DIR=/usr/share/debootstrap -+ DEBOOTSTRAP_DIR=/usr/local/share/debootstrap ++ DEBOOTSTRAP_DIR=%%DATADIR%% fi fi diff --git a/sysutils/debootstrap/files/patch-functions b/sysutils/debootstrap/files/patch-functions new file mode 100644 index 000000000000..4247a0cef7db --- /dev/null +++ b/sysutils/debootstrap/files/patch-functions @@ -0,0 +1,20 @@ +--- functions.orig 2023-02-24 08:27:34 UTC ++++ functions +@@ -658,7 +658,7 @@ download_release_sig () { + info RELEASESIG "Checking Release signature" + # Don't worry about the exit status from gpgv; parsing the output will + # take care of that. +- (gpgv --status-fd 1 --keyring "$KEYRING" --ignore-time-conflict \ ++ (gpgv2 --status-fd 1 --keyring "$KEYRING" --ignore-time-conflict \ + "$relsigdest" "$reldest" || true) | read_gpg_status + progress 100 100 DOWNRELSIG "Downloading Release file signature" + fi +@@ -1706,7 +1706,7 @@ read_gpg_status () { + elif [ "$unkkey" ]; then + error 1 UNKNOWNRELSIG "Release signed by unknown key (key id %s)\n The specified keyring $KEYRING may be incorrect or out of date.\n You can find the latest Debian release key at https://ftp-master.debian.org/keys.html" "$unkkey" + else +- error 1 SIGCHECK "Error executing gpgv to check Release signature" ++ error 1 SIGCHECK "Error executing gpgv2 to check Release signature" + fi + } +