From 1345a849e519e31b003ef686f3e2bbc7cd3cea9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 10 Jul 2021 12:10:29 +0700 Subject: [PATCH 1/7] notmuch: update to 0.32.2. --- srcpkgs/notmuch-emacs | 1 - srcpkgs/notmuch/template | 70 +++++++++++++++++----------------------- 2 files changed, 29 insertions(+), 42 deletions(-) delete mode 120000 srcpkgs/notmuch-emacs diff --git a/srcpkgs/notmuch-emacs b/srcpkgs/notmuch-emacs deleted file mode 120000 index 67778b7eb37e..000000000000 --- a/srcpkgs/notmuch-emacs +++ /dev/null @@ -1 +0,0 @@ -notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch/template b/srcpkgs/notmuch/template index 0b176d22ebd9..58759a9d981f 100644 --- a/srcpkgs/notmuch/template +++ b/srcpkgs/notmuch/template @@ -1,21 +1,28 @@ # Template file for 'notmuch' pkgname=notmuch -version=0.31.3 +version=0.32.2 revision=1 -hostmakedepends="perl pkg-config python3-Sphinx python3-devel texinfo" +build_style=configure +configure_args="--prefix=/usr + --emacslispdir=/usr/share/emacs/site-lisp/notmuch + --emacsetcdir=/usr/share/emacs/site-lisp/notmuch" +hostmakedepends="perl pkg-config python3-Sphinx python3-devel texinfo + desktop-file-utils emacs gnupg2 python3-setuptools" makedepends="bash-completion gmime3-devel talloc-devel xapian-core-devel - python3-cffi python3-setuptools gnupg2" + python3-cffi" depends="gmime3>=3.2.7" -checkdepends="python3-pytest mdocml dtach gdb tar xz" +checkdepends="python3-pytest mdocml dtach gdb tar xz xapian-core + openssl" short_desc="Thread-based email index, search, and tagging" maintainer="Jan S. " license="GPL-3.0-or-later" homepage="https://notmuchmail.org" distfiles="https://notmuchmail.org/releases/notmuch-${version}.tar.xz https://notmuchmail.org/releases/test-databases/database-v1.tar.xz" -checksum="484041aed08f88f3a528a5b82489b6cda4090764228813bca73678da3a753aca +checksum="8e0a7eb8ff2e6011ef48b2bf11d79b9c4bb74511cfe2987758b64898c2a2ded7 4299e051b10e1fa7b33ea2862790a09ebfe96859681804e5251e130f800e69d2" skip_extraction="database-v1.tar.xz" +replaces="notmuch-emacs>=0" # Not a real conflicts, but this package is broken with gpgme 1.13.1- # gpgme is optional dependency @@ -23,21 +30,10 @@ conflicts="gpgme<1.14.0_1" subpackages="libnotmuch libnotmuch-devel notmuch-mutt notmuch-python3" if [ ! "$CROSS_BUILD" ]; then - hostmakedepends+=" desktop-file-utils" - makedepends+=" ruby-devel emacs" - subpackages+=" notmuch-ruby notmuch-emacs" - _args="--emacslispdir=/usr/share/emacs/site-lisp/notmuch - --emacsetcdir=/usr/share/emacs/site-lisp/notmuch" -else - _args="--without-emacs" + makedepends+=" ruby-devel" + subpackages+=" notmuch-ruby" fi -do_configure() { - ./configure --prefix=/usr \ - --bashcompletiondir=/usr/share/bash-completion/completions \ - --zshcompletiondir=/usr/share/zsh/site-functions ${_args} -} - do_build() { make ${makejobs} make -C contrib/notmuch-mutt @@ -48,33 +44,37 @@ do_build() { do_check() { mkdir -p fake-bin ln -sf /usr/bin/gpg2 fake-bin/gpg + ln -sf /usr/bin/gpgv2 fake-bin/gpgv PATH=$PWD/fake-bin:$PATH cp $XBPS_SRCDISTDIR/notmuch-$version/database-v1.tar.xz \ test/test-databases - case "$XBPS_TARGET_LIBC" in - musl) + if [ "$XBPS_TARGET_LIBC" = musl ]; then # Seem like gpgconf's problem, # mutt on musl also have problems with smime - export NOTMUCH_SKIP_TESTS="smime.3 smime.5" ;; - *) + NOTMUCH_SKIP_TESTS="smime.3 smime.5" + else # This test run under gdb is problematic - export NOTMUCH_SKIP_TESTS="count.14" ;; - esac + NOTMUCH_SKIP_TESTS="count.14" + fi + # libconfig because of fqdn + # we don't ship python-cffi + NOTMUCH_SKIP_TESTS+=" libconfig python-cffi" + if [ $(id -u) = 0 ]; then + NOTMUCH_SKIP_TESTS+=" new.36 tagging.25" + fi + export NOTMUCH_SKIP_TESTS make test } do_install() { make DESTDIR=${DESTDIR} install - pushd bindings/python + cd bindings/python python3 setup.py build --build-base=build \ install --prefix=/usr --root=${DESTDIR} - popd + cd - if [ ! "$CROSS_BUILD" ]; then make DESTDIR=${DESTDIR} -C bindings/ruby install fi -} - -post_install() { rm -f ${DESTDIR}/usr/share/applications/mimeinfo.cache } @@ -94,18 +94,6 @@ libnotmuch-devel_package() { } } -notmuch-emacs_package() { - short_desc+=" - Emacs interface" - depends="${sourcepkg}-${version}_${revision} virtual?emacs" - pkg_install() { - vmove usr/bin/notmuch-emacs-mua - vmove usr/share/applications - vmove usr/share/emacs/site-lisp - vmove usr/share/info/notmuch-emacs* - vmove usr/share/man/man1/notmuch-emacs* - } -} - notmuch-mutt_package() { short_desc+=" - Mutt interface" depends="${sourcepkg}-${version}_${revision} perl-Mail-Box perl-MailTools From d93fab329f153d9045247a253c2785304e1f1fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 25 Jan 2021 22:57:29 +0700 Subject: [PATCH 2/7] gnupg: rename binary to gnupg1 --- srcpkgs/gnupg/template | 24 -- srcpkgs/gnupg/update | 1 - ...oking-for-git-info-during-autoreconf.patch | 28 +++ .../0003-change-package-name-to-gnupg1.patch | 23 ++ ...OURCE_DATE_EPOCH-for-reproducibility.patch | 220 ++++++++++++++++++ ...e-default-digest-algorithm-to-SHA256.patch | 55 +++++ srcpkgs/gnupg1/template | 39 ++++ srcpkgs/gnupg1/update | 2 + 8 files changed, 367 insertions(+), 25 deletions(-) delete mode 100644 srcpkgs/gnupg/template delete mode 100644 srcpkgs/gnupg/update create mode 100644 srcpkgs/gnupg1/patches/0001-avoid-looking-for-git-info-during-autoreconf.patch create mode 100644 srcpkgs/gnupg1/patches/0003-change-package-name-to-gnupg1.patch create mode 100644 srcpkgs/gnupg1/patches/0004-doc-Enable-SOURCE_DATE_EPOCH-for-reproducibility.patch create mode 100644 srcpkgs/gnupg1/patches/0005-gpg-Change-default-digest-algorithm-to-SHA256.patch create mode 100644 srcpkgs/gnupg1/template create mode 100644 srcpkgs/gnupg1/update diff --git a/srcpkgs/gnupg/template b/srcpkgs/gnupg/template deleted file mode 100644 index 80d96da518c9..000000000000 --- a/srcpkgs/gnupg/template +++ /dev/null @@ -1,24 +0,0 @@ -# Template file for 'gnupg' -pkgname=gnupg -version=1.4.23 -revision=3 -build_style=gnu-configure -configure_args="--enable-threads=posix --enable-noexecstack gnupg_cv_regex_broken=no" -makedepends="bzip2-devel zlib-devel libldap-devel libcurl-devel readline-devel libusb-compat-devel" -short_desc="The GNU Privacy Guard" -maintainer="Orphaned " -license="GPL-3.0-or-later" -homepage="https://www.gnupg.org/" -distfiles="https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${version}.tar.bz2" -checksum=c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba - -CFLAGS="-fcommon" - -post_extract() { - case "$XBPS_TARGET_MACHINE" in - i686-musl) sed -i Makefile* -e"s;checks = checks;checks =;" ;; - esac -} -post_install() { - rm ${DESTDIR}/usr/bin/gpgsplit -} diff --git a/srcpkgs/gnupg/update b/srcpkgs/gnupg/update deleted file mode 100644 index 6bfa7d9a00bc..000000000000 --- a/srcpkgs/gnupg/update +++ /dev/null @@ -1 +0,0 @@ -ignore="2.*" diff --git a/srcpkgs/gnupg1/patches/0001-avoid-looking-for-git-info-during-autoreconf.patch b/srcpkgs/gnupg1/patches/0001-avoid-looking-for-git-info-during-autoreconf.patch new file mode 100644 index 000000000000..803c36357981 --- /dev/null +++ b/srcpkgs/gnupg1/patches/0001-avoid-looking-for-git-info-during-autoreconf.patch @@ -0,0 +1,28 @@ +From: Daniel Kahn Gillmor +Date: Fri, 1 Apr 2016 06:04:20 -0400 +Subject: avoid looking for git info during autoreconf + +--- + configure.ac | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b92440c..6222be6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -32,13 +32,10 @@ m4_define([mym4_version], [1.4.23]) + # the decimalized short revision number, a beta version string and a + # flag indicating a development version (mym4_isgit). Note that the + # m4 processing is done by autoconf and not during the configure run. +-m4_define([mym4_revision], +- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) ++m4_define([mym4_revision],[]) + m4_define([mym4_revision_dec], + m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) +-m4_define([mym4_betastring], +- m4_esyscmd_s([git describe --match 'gnupg-1.[0-9].*[0-9]' --long|\ +- awk -F- '$3!=0{print"-beta"$3}'])) ++m4_define([mym4_betastring],[]) + m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) + m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) + diff --git a/srcpkgs/gnupg1/patches/0003-change-package-name-to-gnupg1.patch b/srcpkgs/gnupg1/patches/0003-change-package-name-to-gnupg1.patch new file mode 100644 index 000000000000..3e00a9865374 --- /dev/null +++ b/srcpkgs/gnupg1/patches/0003-change-package-name-to-gnupg1.patch @@ -0,0 +1,23 @@ +From: Daniel Kahn Gillmor +Date: Fri, 1 Apr 2016 01:58:00 -0400 +Subject: change package name to gnupg1 + +We're moving to calling this gnupg1; this change should affect libexec +(where the keyserver helpers live), gettext, and other places. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 6222be6..53f2ca6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -39,7 +39,7 @@ m4_define([mym4_betastring],[]) + m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) + m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) + +-AC_INIT([gnupg],[mym4_full_version], [https://bugs.gnupg.org]) ++AC_INIT([gnupg1],[mym4_full_version], [https://bugs.gnupg.org]) + + + development_version=mym4_isgit diff --git a/srcpkgs/gnupg1/patches/0004-doc-Enable-SOURCE_DATE_EPOCH-for-reproducibility.patch b/srcpkgs/gnupg1/patches/0004-doc-Enable-SOURCE_DATE_EPOCH-for-reproducibility.patch new file mode 100644 index 000000000000..5a535b25fc98 --- /dev/null +++ b/srcpkgs/gnupg1/patches/0004-doc-Enable-SOURCE_DATE_EPOCH-for-reproducibility.patch @@ -0,0 +1,220 @@ +From: Daniel Kahn Gillmor +Date: Mon, 29 Aug 2016 10:13:47 -0400 +Subject: doc: Enable $SOURCE_DATE_EPOCH for reproducibility + +* doc/yat2m.c: update to version from 2.1.15 +* doc/Makefile.am: pass SOURCE_DATE_EPOCH through when building + documentation if provided. + +The goal of this changeset is to make it easier to make GnuPG build +reproducibly. + +Debian-bug-id: 806494 +--- + doc/Makefile.am | 1 + + doc/yat2m.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++-------- + 2 files changed, 60 insertions(+), 9 deletions(-) + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 4294f83..13933af 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -59,6 +59,7 @@ yat2m-stamp: $(myman_sources) + @touch yat2m-stamp.tmp + for file in $(myman_sources) ; do \ + ./yat2m $(YAT2M_OPTIONS) --store \ ++ `test -z "$(SOURCE_DATE_EPOCH)" || echo '--date' "$(SOURCE_DATE_EPOCH)"` \ + `test -f '$$file' || echo '$(srcdir)/'`$$file ; done + @mv -f yat2m-stamp.tmp $@ + +diff --git a/doc/yat2m.c b/doc/yat2m.c +index 86c3c70..9b76f19 100644 +--- a/doc/yat2m.c ++++ b/doc/yat2m.c +@@ -1,5 +1,5 @@ + /* yat2m.c - Yet Another Texi 2 Man converter +- * Copyright (C) 2005, 2013 g10 Code GmbH ++ * Copyright (C) 2005, 2013, 2015, 2016 g10 Code GmbH + * Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify +@@ -13,7 +13,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . ++ * along with this program; if not, see . + */ + + /* +@@ -104,6 +104,29 @@ + #include + + ++#if __GNUC__ ++# define MY_GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) ++#else ++# define MY_GCC_VERSION 0 ++#endif ++ ++#if MY_GCC_VERSION >= 20500 ++# define ATTR_PRINTF(f, a) __attribute__ ((format(printf,f,a))) ++# define ATTR_NR_PRINTF(f, a) __attribute__ ((noreturn, format(printf,f,a))) ++#else ++# define ATTR_PRINTF(f, a) ++# define ATTR_NR_PRINTF(f, a) ++#endif ++#if MY_GCC_VERSION >= 30200 ++# define ATTR_MALLOC __attribute__ ((__malloc__)) ++#else ++# define ATTR_MALLOC ++#endif ++ ++ ++ + #define PGM "yat2m" + #define VERSION "1.0" + +@@ -120,6 +143,7 @@ static int quiet; + static int debug; + static const char *opt_source; + static const char *opt_release; ++static const char *opt_date; + static const char *opt_select; + static const char *opt_include; + static int opt_store; +@@ -213,8 +237,16 @@ static const char * const standard_sections[] = + static void proc_texi_buffer (FILE *fp, const char *line, size_t len, + int *table_level, int *eol_action); + ++static void die (const char *format, ...) ATTR_NR_PRINTF(1,2); ++static void err (const char *format, ...) ATTR_PRINTF(1,2); ++static void inf (const char *format, ...) ATTR_PRINTF(1,2); ++static void *xmalloc (size_t n) ATTR_MALLOC; ++static void *xcalloc (size_t n, size_t m) ATTR_MALLOC; + + ++ ++/*-- Functions --*/ ++ + /* Print diagnostic message and exit with failure. */ + static void + die (const char *format, ...) +@@ -323,8 +355,12 @@ isodatestring (void) + { + static char buffer[11+5]; + struct tm *tp; +- time_t atime = time (NULL); ++ time_t atime; + ++ if (opt_date && *opt_date) ++ atime = strtoul (opt_date, NULL, 10); ++ else ++ atime = time (NULL); + if (atime < 0) + strcpy (buffer, "????" "-??" "-??"); + else +@@ -553,7 +589,7 @@ get_section_buffer (const char *name) + for (i=0; i < thepage.n_sections; i++) + if (!thepage.sections[i].name) + break; +- if (i < thepage.n_sections) ++ if (thepage.n_sections && i < thepage.n_sections) + sect = thepage.sections + i; + else + { +@@ -679,6 +715,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, + } cmdtbl[] = { + { "command", 0, "\\fB", "\\fR" }, + { "code", 0, "\\fB", "\\fR" }, ++ { "url", 0, "\\fB", "\\fR" }, + { "sc", 0, "\\fB", "\\fR" }, + { "var", 0, "\\fI", "\\fR" }, + { "samp", 0, "\\(aq", "\\(aq" }, +@@ -699,6 +736,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, + { "emph", 0, "\\fI", "\\fR" }, + { "w", 1 }, + { "c", 5 }, ++ { "efindex", 1 }, + { "opindex", 1 }, + { "cpindex", 1 }, + { "cindex", 1 }, +@@ -708,7 +746,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, + { "subsection", 6, "\n.SS " }, + { "chapheading", 0}, + { "item", 2, ".TP\n.B " }, +- { "itemx", 2, ".TP\n.B " }, ++ { "itemx", 2, ".TQ\n.B " }, + { "table", 3 }, + { "itemize", 3 }, + { "bullet", 0, "* " }, +@@ -755,6 +793,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, + { + if ((*table_level)-- > 1) + fputs (".RE\n", fp); ++ else ++ fputs (".P\n", fp); + } + else if (n >= 7 && !memcmp (s, "example", 7) + && (!n || s[7] == ' ' || s[7] == '\t' || s[7] == '\n')) +@@ -846,7 +886,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, + } + else + inf ("texinfo command '%s' not supported (%.*s)", command, +- ((s = memchr (rest, '\n', len)), (s? (s-rest) : len)), rest); ++ (int)((s = memchr (rest, '\n', len)), (s? (s-rest) : len)), rest); + } + + if (*rest == '{') +@@ -958,7 +998,7 @@ proc_texi_buffer (FILE *fp, const char *line, size_t len, + assert (n <= len); + s += n; len -= n; + s--; len++; +- in_cmd = 0; ++ /* in_cmd = 0; -- doc only */ + } + } + +@@ -1367,7 +1407,7 @@ parse_file (const char *fname, FILE *fp, char **section_name, int in_pause) + } + + if (!incfp) +- err ("can't open include file '%s':%s", ++ err ("can't open include file '%s': %s", + incname, strerror (errno)); + else + { +@@ -1466,13 +1506,14 @@ main (int argc, char **argv) + "Extract man pages from a Texinfo source.\n\n" + " --source NAME use NAME as source field\n" + " --release STRING use STRING as the release field\n" ++ " --date EPOCH use EPOCH as publication date\n" + " --store write output using @manpage name\n" + " --select NAME only output pages with @manpage NAME\n" + " --verbose enable extra informational output\n" + " --debug enable additional debug output\n" + " --help display this help and exit\n" + " -I DIR also search in include DIR\n" +- " -D gpgone the only useable define\n\n" ++ " -D gpgone the only usable define\n\n" + "With no FILE, or when FILE is -, read standard input.\n\n" + "Report bugs to ."); + exit (0); +@@ -1519,6 +1560,15 @@ main (int argc, char **argv) + argc--; argv++; + } + } ++ else if (!strcmp (*argv, "--date")) ++ { ++ argc--; argv++; ++ if (argc) ++ { ++ opt_date = *argv; ++ argc--; argv++; ++ } ++ } + else if (!strcmp (*argv, "--store")) + { + opt_store = 1; diff --git a/srcpkgs/gnupg1/patches/0005-gpg-Change-default-digest-algorithm-to-SHA256.patch b/srcpkgs/gnupg1/patches/0005-gpg-Change-default-digest-algorithm-to-SHA256.patch new file mode 100644 index 000000000000..edceb00e9527 --- /dev/null +++ b/srcpkgs/gnupg1/patches/0005-gpg-Change-default-digest-algorithm-to-SHA256.patch @@ -0,0 +1,55 @@ +From: Daniel Kahn Gillmor +Date: Mon, 14 Nov 2016 07:57:20 +0900 +Subject: gpg: Change default digest algorithm to SHA256 + +* g10/main.h: set DEFAULT_DIGEST_ALGO to DIGEST_ALGO_SHA256 + +-- + +gnupg 2.x defaults to making signatures and certifications with +sha256, and has for quite some time; i know of no problems with that +decision today (it's 2016!). We should emulate it in the 1.4.x +branch. + +Debian-Bug-Id: 824084 +Signed-off-by: Daniel Kahn Gillmor +--- + g10/main.h | 2 +- + g10/sign.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/g10/main.h b/g10/main.h +index a0b96f9..a5500cc 100644 +--- a/g10/main.h ++++ b/g10/main.h +@@ -38,7 +38,7 @@ + # define DEFAULT_CIPHER_ALGO CIPHER_ALGO_3DES + #endif + +-#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1 ++#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA256 + #define DEFAULT_COMPRESS_ALGO COMPRESS_ALGO_ZIP + #define DEFAULT_S2K_DIGEST_ALGO DIGEST_ALGO_SHA1 + +diff --git a/g10/sign.c b/g10/sign.c +index ed8ac73..81c5452 100644 +--- a/g10/sign.c ++++ b/g10/sign.c +@@ -1396,7 +1396,7 @@ make_keysig_packet( PKT_signature **ret_sig, PKT_public_key *pk, + + if( !digest_algo ) + { +- /* Basically, this means use SHA1 always unless it's a v3 RSA ++ /* Basically, this means use the default digest algo always unless it's a v3 RSA + key making a v3 cert (use MD5), or the user specified + something (use whatever they said), or it's DSA (use the + best match). They still can't pick an inappropriate hash +@@ -1412,7 +1412,7 @@ make_keysig_packet( PKT_signature **ret_sig, PKT_public_key *pk, + else if(sk->pubkey_algo==PUBKEY_ALGO_DSA) + digest_algo = match_dsa_hash(mpi_get_nbits(sk->skey[1])/8); + else +- digest_algo = DIGEST_ALGO_SHA1; ++ digest_algo = DEFAULT_DIGEST_ALGO; + } + + md = md_open( digest_algo, 0 ); diff --git a/srcpkgs/gnupg1/template b/srcpkgs/gnupg1/template new file mode 100644 index 000000000000..03844046ff77 --- /dev/null +++ b/srcpkgs/gnupg1/template @@ -0,0 +1,39 @@ +# Template file for 'gnupg1' +pkgname=gnupg1 +version=1.4.23 +revision=4 +wrksrc=gnupg-${version} +build_style=gnu-configure +configure_args="--enable-threads=posix --enable-noexecstack + gnupg_cv_regex_broken=no" +hostmakedepends="automake gettext-devel-tools" +makedepends="bzip2-devel zlib-devel libldap-devel libcurl-devel readline-devel + libusb-compat-devel" +short_desc="GNU Privacy Guard v1" +maintainer="Orphaned " +license="GPL-3.0-or-later" +homepage="https://www.gnupg.org/" +distfiles="https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${version}.tar.bz2" +checksum=c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba + +CFLAGS="-fcommon" + +pre_configure() { + autoreconf -fi +} + +post_extract() { + case "$XBPS_TARGET_MACHINE" in + i686-musl) sed -i Makefile* -e"s;checks = checks;checks =;" ;; + esac +} + +post_install() { + rm ${DESTDIR}/usr/bin/gpgsplit + mv ${DESTDIR}/usr/bin/gpg ${DESTDIR}/usr/bin/gpg1 + mv ${DESTDIR}/usr/bin/gpgv ${DESTDIR}/usr/bin/gpgv1 + mv ${DESTDIR}/usr/share/man/man1/gpg.1 \ + ${DESTDIR}/usr/share/man/man1/gpg1.1 + mv ${DESTDIR}/usr/share/man/man1/gpgv.1 \ + ${DESTDIR}/usr/share/man/man1/gpgv1.1 +} diff --git a/srcpkgs/gnupg1/update b/srcpkgs/gnupg1/update new file mode 100644 index 000000000000..2576122722aa --- /dev/null +++ b/srcpkgs/gnupg1/update @@ -0,0 +1,2 @@ +pkgname=gnupg +ignore="2.*" From c49fe400d97f95705a59b692ca90e35eb4cdf3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 10 Jul 2021 01:01:00 +0700 Subject: [PATCH 3/7] gnupg: update to 2.2.28 --- .../patches/sys-siglist-and-no-systemd.patch | 36 ++++++++++++++++++ .../patches/use-versioned-pcsclite.patch | 0 srcpkgs/{gnupg2 => gnupg}/template | 37 ++++++++++--------- srcpkgs/gnupg2 | 1 + srcpkgs/gnupg2-scdaemon | 2 +- srcpkgs/gnupg2/update | 1 - 6 files changed, 58 insertions(+), 19 deletions(-) create mode 100644 srcpkgs/gnupg/patches/sys-siglist-and-no-systemd.patch rename srcpkgs/{gnupg2 => gnupg}/patches/use-versioned-pcsclite.patch (100%) rename srcpkgs/{gnupg2 => gnupg}/template (61%) create mode 120000 srcpkgs/gnupg2 delete mode 100644 srcpkgs/gnupg2/update diff --git a/srcpkgs/gnupg/patches/sys-siglist-and-no-systemd.patch b/srcpkgs/gnupg/patches/sys-siglist-and-no-systemd.patch new file mode 100644 index 000000000000..0591c33e2e06 --- /dev/null +++ b/srcpkgs/gnupg/patches/sys-siglist-and-no-systemd.patch @@ -0,0 +1,36 @@ +No brainer patch converted from + vsed -i 's/HAVE_DECL_SYS_SIGLIST/0/' common/signal.c + vsed -i '/examples\/systemd-user/d' doc/Makefile.in + +Index: gnupg-2.2.28/common/signal.c +=================================================================== +--- gnupg-2.2.28.orig/common/signal.c ++++ gnupg-2.2.28/common/signal.c +@@ -87,7 +87,7 @@ get_signal_name( int signum ) + { + /* Note that we can't use strsignal(), because it is not + reentrant. */ +-#if HAVE_DECL_SYS_SIGLIST && defined(NSIG) ++#if 0 && defined(NSIG) + return (signum >= 0 && signum < NSIG) ? sys_siglist[signum] : "?"; + #else + return NULL; +Index: gnupg-2.2.28/doc/Makefile.in +=================================================================== +--- gnupg-2.2.28.orig/doc/Makefile.in ++++ gnupg-2.2.28/doc/Makefile.in +@@ -477,14 +477,6 @@ libcommontlsnpth = ../common/libcommontl + examples = examples/README examples/scd-event examples/trustlist.txt \ + examples/VS-NfD.prf examples/Automatic.prf \ + examples/debug.prf \ +- examples/systemd-user/README \ +- examples/systemd-user/dirmngr.service \ +- examples/systemd-user/dirmngr.socket \ +- examples/systemd-user/gpg-agent.service \ +- examples/systemd-user/gpg-agent.socket \ +- examples/systemd-user/gpg-agent-ssh.socket \ +- examples/systemd-user/gpg-agent-browser.socket \ +- examples/systemd-user/gpg-agent-extra.socket \ + examples/gpgconf.conf examples/pwpattern.list + + helpfiles = help.txt help.be.txt help.ca.txt help.cs.txt \ diff --git a/srcpkgs/gnupg2/patches/use-versioned-pcsclite.patch b/srcpkgs/gnupg/patches/use-versioned-pcsclite.patch similarity index 100% rename from srcpkgs/gnupg2/patches/use-versioned-pcsclite.patch rename to srcpkgs/gnupg/patches/use-versioned-pcsclite.patch diff --git a/srcpkgs/gnupg2/template b/srcpkgs/gnupg/template similarity index 61% rename from srcpkgs/gnupg2/template rename to srcpkgs/gnupg/template index 36fba35e68bb..22ab75856cdb 100644 --- a/srcpkgs/gnupg2/template +++ b/srcpkgs/gnupg/template @@ -1,15 +1,14 @@ -# Template file for 'gnupg2' -pkgname=gnupg2 +# Template file for 'gnupg' +pkgname=gnupg version=2.2.28 -revision=1 -wrksrc="gnupg-${version}" +revision=2 build_style=gnu-configure -configure_args="--enable-gpg-is-gpg2 $(vopt_enable ldap) +configure_args="$(vopt_enable ldap) --with-libgcrypt-prefix=${XBPS_CROSS_BASE}/usr --with-libassuan-prefix=${XBPS_CROSS_BASE}/usr --with-ksba-prefix=${XBPS_CROSS_BASE}/usr --with-npth-prefix=${XBPS_CROSS_BASE}/usr" -hostmakedepends="pkg-config" +hostmakedepends="pkg-config gettext" makedepends="bzip2-devel gnutls-devel libassuan-devel libcurl-devel libksba-devel libldap-devel libusb-compat-devel npth-devel sqlite-devel libgcrypt-devel" @@ -23,20 +22,24 @@ checksum=6ff891fc7583a9c3fb9f097ee0d1de0a12469d4b53997e7ba5064950637dfaec build_options="ldap" build_options_default="ldap" -post_patch() { - # On at least aarch64, configure sets this even though it doesn't exist - vsed -i 's/HAVE_DECL_SYS_SIGLIST/0/' common/signal.c - vsed -i '/examples\/systemd-user/d' doc/Makefile.in -} - post_install() { - # remove conflicts with gnupg 1. - mv ${DESTDIR}/usr/share/man/man7/gnupg.7 ${DESTDIR}/usr/share/man/man7/gnupg2.7 - vmkdir usr/share/examples - mv ${DESTDIR}/usr/share/doc/gnupg/examples ${DESTDIR}/usr/share/examples/gnupg2 + mv ${DESTDIR}/usr/share/doc/gnupg/examples \ + ${DESTDIR}/usr/share/examples/gnupg +} - mv ${DESTDIR}/usr/share/doc/gnupg ${DESTDIR}/usr/share/doc/gnupg2 +gnupg2_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - compat package" + pkg_install() { + vmkdir usr/bin + ln -s gpg $PKGDESTDIR/usr/bin/gpg2 + ln -s gpgv $PKGDESTDIR/usr/bin/gpgv2 + vmkdir usr/share/examples + ln -s gnupg $PKGDESTDIR/usr/share/examples/gnupg2 + vmkdir usr/share/doc + ln -s gnupg $PKGDESTDIR/usr/share/doc/gnupg2 + } } gnupg2-scdaemon_package() { diff --git a/srcpkgs/gnupg2 b/srcpkgs/gnupg2 new file mode 120000 index 000000000000..ce3d705284c3 --- /dev/null +++ b/srcpkgs/gnupg2 @@ -0,0 +1 @@ +gnupg \ No newline at end of file diff --git a/srcpkgs/gnupg2-scdaemon b/srcpkgs/gnupg2-scdaemon index 7a41d0a790f9..ce3d705284c3 120000 --- a/srcpkgs/gnupg2-scdaemon +++ b/srcpkgs/gnupg2-scdaemon @@ -1 +1 @@ -gnupg2 \ No newline at end of file +gnupg \ No newline at end of file diff --git a/srcpkgs/gnupg2/update b/srcpkgs/gnupg2/update deleted file mode 100644 index 95f92483c02c..000000000000 --- a/srcpkgs/gnupg2/update +++ /dev/null @@ -1 +0,0 @@ -pkgname=gnupg From 5a15e1ad1b611b62281b9659789b30d1d1e7686c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 25 Jan 2021 19:27:07 +0700 Subject: [PATCH 4/7] notmuch: do_check: remove gpg2 hack --- srcpkgs/notmuch/template | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/srcpkgs/notmuch/template b/srcpkgs/notmuch/template index 58759a9d981f..7fbbafa5197e 100644 --- a/srcpkgs/notmuch/template +++ b/srcpkgs/notmuch/template @@ -7,7 +7,7 @@ configure_args="--prefix=/usr --emacslispdir=/usr/share/emacs/site-lisp/notmuch --emacsetcdir=/usr/share/emacs/site-lisp/notmuch" hostmakedepends="perl pkg-config python3-Sphinx python3-devel texinfo - desktop-file-utils emacs gnupg2 python3-setuptools" + desktop-file-utils emacs gnupg python3-setuptools" makedepends="bash-completion gmime3-devel talloc-devel xapian-core-devel python3-cffi" depends="gmime3>=3.2.7" @@ -42,10 +42,6 @@ do_build() { } do_check() { - mkdir -p fake-bin - ln -sf /usr/bin/gpg2 fake-bin/gpg - ln -sf /usr/bin/gpgv2 fake-bin/gpgv - PATH=$PWD/fake-bin:$PATH cp $XBPS_SRCDISTDIR/notmuch-$version/database-v1.tar.xz \ test/test-databases if [ "$XBPS_TARGET_LIBC" = musl ]; then From 6f77761021520c1cf864a73781b56665d252346a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 25 Jan 2021 19:26:24 +0700 Subject: [PATCH 5/7] pacman: our gpg is gpg2 --- srcpkgs/pacman/patches/gpg2gpg2.patch | 38 --------------------------- srcpkgs/pacman/template | 4 +-- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 srcpkgs/pacman/patches/gpg2gpg2.patch diff --git a/srcpkgs/pacman/patches/gpg2gpg2.patch b/srcpkgs/pacman/patches/gpg2gpg2.patch deleted file mode 100644 index dd458cae9c4b..000000000000 --- a/srcpkgs/pacman/patches/gpg2gpg2.patch +++ /dev/null @@ -1,38 +0,0 @@ -gpg to gpg2: -Arch's "gnupg" package is this distro's "gnupg2" -This patches all references to the gpg command to use -gpg2 instead. - -diff -Naur pacman-5.2.1.orig/scripts/pacman-key.sh.in pacman-5.2.1/scripts/pacman-key.sh.in ---- a/scripts/pacman-key.sh.in 2019-10-24 06:29:08.000000000 -0700 -+++ b/scripts/pacman-key.sh.in 2020-05-24 02:30:26.838797182 -0700 -@@ -51,6 +51,7 @@ - UPDATEDB=0 - USE_COLOR='y' - VERIFY=0 -+GPG_COMMAND='gpg2' - - usage() { - printf "pacman-key (pacman) %s\n" ${myver} -@@ -591,8 +592,8 @@ - unset ALL_OFF BOLD BLUE GREEN RED YELLOW - fi - --if ! type -p gpg >/dev/null; then -- error "$(gettext "Cannot find the %s binary required for all %s operations.")" "gpg" "pacman-key" -+if ! type -p ${GPG_COMMAND} >/dev/null; then -+ error "$(gettext "Cannot find the %s binary required for all %s operations.")" "${GPG_COMMAND}" "pacman-key" - exit 1 - fi - -@@ -611,7 +612,7 @@ - # file, falling back on a hard default - PACMAN_KEYRING_DIR=${PACMAN_KEYRING_DIR:-$(pacman-conf --config="$CONFIG" gpgdir)} - --GPG_PACMAN=(gpg --homedir "${PACMAN_KEYRING_DIR}" --no-permission-warning) -+GPG_PACMAN=(${GPG_COMMAND} --homedir "${PACMAN_KEYRING_DIR}" --no-permission-warning) - if [[ -n ${KEYSERVER} ]]; then - GPG_PACMAN+=(--keyserver "${KEYSERVER}") - fi - - diff --git a/srcpkgs/pacman/template b/srcpkgs/pacman/template index d23aba0468bf..4f85346a01ac 100644 --- a/srcpkgs/pacman/template +++ b/srcpkgs/pacman/template @@ -1,7 +1,7 @@ # Template file for 'pacman' pkgname=pacman version=5.2.2 -revision=2 +revision=3 make_dirs="/var/lib/pacman 0755 root root /usr/var/cache/pacman/pkg 0755 root root /usr/share/libalpm/hooks 0755 root root" @@ -9,7 +9,7 @@ conf_files="/etc/pacman.conf" build_style=meson hostmakedepends="autoconf automake curl libtool gettext-devel pkg-config asciidoc" makedepends="libarchive-devel gpgme-devel libcurl-devel" -depends="gnupg2" +depends="gnupg>=2" checkdepends="fakeroot" short_desc="Simple library-based package manager" maintainer="oreo639 " From 508e1b7e767706a2a5e1463358b87374af455a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 25 Jan 2021 19:29:19 +0700 Subject: [PATCH 6/7] gpgme: depends on gnupg>=2 --- srcpkgs/gpgme/template | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template index 072da12708d4..8633075a8404 100644 --- a/srcpkgs/gpgme/template +++ b/srcpkgs/gpgme/template @@ -1,14 +1,14 @@ # Template file for 'gpgme' pkgname=gpgme version=1.15.1 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-fd-passing --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr --with-libassuan-prefix=$XBPS_CROSS_BASE/usr" -hostmakedepends="gnupg2 pkg-config qt5-host-tools qt5-qmake" +hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake" makedepends="libassuan-devel qt5-tools-devel" -depends="gnupg2" +depends="gnupg>=2" short_desc="GnuPG Made Easy" maintainer="Orphaned " license="GPL-2.0-or-later, LGPL-2.1-or-later" @@ -25,12 +25,6 @@ fi CXXFLAGS+=" -D_GLIBCXX_USE_C99_STDIO=1" -post_extract() { - vsed -i 's|GPG = gpg|GPG = gpg2|g' \ - tests/gpg/Makefile.* tests/json/Makefile.* \ - lang/qt/tests/Makefile.* lang/python/tests/Makefile.* -} - libgpgme_package() { short_desc+=" - library" pkg_install() { From 781b3ea6170598d906f3fa71d8dc2e0451e39659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 10 Jul 2021 01:05:50 +0700 Subject: [PATCH 7/7] blackbox: always depends on gnupg --- srcpkgs/blackbox/INSTALL.msg | 2 -- srcpkgs/blackbox/template | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 srcpkgs/blackbox/INSTALL.msg diff --git a/srcpkgs/blackbox/INSTALL.msg b/srcpkgs/blackbox/INSTALL.msg deleted file mode 100644 index 36cb62d8275c..000000000000 --- a/srcpkgs/blackbox/INSTALL.msg +++ /dev/null @@ -1,2 +0,0 @@ -blackbox requires GnuGP 1 or 2, install gnupg or gnupg2. -Needs environment variable GPG=gpg2 if used with GnuPG 2. diff --git a/srcpkgs/blackbox/template b/srcpkgs/blackbox/template index e0d94abf4a50..c242782d7937 100644 --- a/srcpkgs/blackbox/template +++ b/srcpkgs/blackbox/template @@ -1,8 +1,8 @@ # Template file for 'blackbox' pkgname=blackbox version=1.20181219 -revision=2 -depends="bash" +revision=3 +depends="bash gnupg" short_desc="Safely store secrets in Git/Mercurial/Subversion" maintainer="Daniel A. Maierhofer " license="MIT"