From nobody Tue Nov 02 11:22:39 2021 X-Original-To: dev-commits-ports-main@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 03D31183A31D; Tue, 2 Nov 2021 11:22:40 +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 4Hk6vM6LLLz4snQ; Tue, 2 Nov 2021 11:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B963723F48; Tue, 2 Nov 2021 11:22:39 +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 1A2BMdBl090800; Tue, 2 Nov 2021 11:22:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A2BMd6L090799; Tue, 2 Nov 2021 11:22:39 GMT (envelope-from git) Date: Tue, 2 Nov 2021 11:22:39 GMT Message-Id: <202111021122.1A2BMd6L090799@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Adam Weinberger Subject: git: 7b6ca19a8048 - main - sysutils/gnupg: Fix running without procfs List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adamw X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b6ca19a8048d71d57b04f2f01962a90f90f67c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by adamw: URL: https://cgit.FreeBSD.org/ports/commit/?id=7b6ca19a8048d71d57b04f2f01962a90f90f67c9 commit 7b6ca19a8048d71d57b04f2f01962a90f90f67c9 Author: FiLiS AuthorDate: 2021-11-02 11:22:07 +0000 Commit: Adam Weinberger CommitDate: 2021-11-02 11:22:07 +0000 sysutils/gnupg: Fix running without procfs --- security/gnupg/Makefile | 1 + security/gnupg/files/patch-common_homedir.c | 30 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/security/gnupg/Makefile b/security/gnupg/Makefile index 7e12050353b9..8dfab25275a4 100644 --- a/security/gnupg/Makefile +++ b/security/gnupg/Makefile @@ -1,5 +1,6 @@ PORTNAME= gnupg PORTVERSION= 2.3.3 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= GNUPG diff --git a/security/gnupg/files/patch-common_homedir.c b/security/gnupg/files/patch-common_homedir.c new file mode 100644 index 000000000000..619818f4ab54 --- /dev/null +++ b/security/gnupg/files/patch-common_homedir.c @@ -0,0 +1,30 @@ +--- common/homedir.c.orig 2021-10-01 12:44:06.000000000 +0000 ++++ common/homedir.c 2021-10-26 08:14:01.320259000 +0000 +@@ -68,7 +68,9 @@ + * text was read. */ + #if __linux__ + # define MYPROC_SELF_EXE "/proc/self/exe" +-#else /* Assume *BSD*/ ++#elif defined(__NetBSD__) ++# define MYPROC_SELF_EXE "/proc/curproc/exe" ++#else /* Assume other BSDs */ + # define MYPROC_SELF_EXE "/proc/curproc/file" + #endif + +@@ -495,13 +497,13 @@ + if (nread < 0) + { + err = gpg_error_from_syserror (); +- log_info ("error reading symlink '%s': %s\n", +- MYPROC_SELF_EXE, gpg_strerror (err)); + buffer[0] = 0; + if ((name = getenv ("GNUPG_BUILD_ROOT")) && *name == '/') + { + /* Try a fallback for systems w/o a supported /proc +- * file system. */ ++ * file system if we are running a regression test. */ ++ log_info ("error reading symlink '%s': %s\n", ++ MYPROC_SELF_EXE, gpg_strerror (err)); + xfree (buffer); + buffer = xstrconcat (name, "/bin/gpgconf", NULL); + log_info ("trying fallback '%s'\n", buffer);