[arch-commits] Commit in libspf2/trunk (PKGBUILD fix-variadic-macros.patch)

George Rawlinson grawlinson at gemini.archlinux.org
Sun Nov 21 02:29:10 UTC 2021


    Date: Sunday, November 21, 2021 @ 02:29:10
  Author: grawlinson
Revision: 1052926

upgpkg: libspf2 1.2.10-7

* Clean up PKGBUILD
* Backport fix for CVE-2021-20314

Modified:
  libspf2/trunk/PKGBUILD
Deleted:
  libspf2/trunk/fix-variadic-macros.patch

---------------------------+
 PKGBUILD                  |   49 ++++++++++++++++++++++++++------------------
 fix-variadic-macros.patch |   29 --------------------------
 2 files changed, 29 insertions(+), 49 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-21 02:20:31 UTC (rev 1052925)
+++ PKGBUILD	2021-11-21 02:29:10 UTC (rev 1052926)
@@ -1,40 +1,49 @@
 # Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: George Rawlinson <grawlinson at archlinux.org>
 # Contributor: svvac <_ at svvac.net>
 
-pkgname="libspf2"
+pkgname=libspf2
 pkgver=1.2.10
-pkgrel=6
+pkgrel=7
 pkgdesc="Sender Policy Framework record checking library"
 arch=('x86_64')
 url="https://www.libspf2.org/"
 license=('LGPL')
 depends=('glibc' 'libnsl')
-makedepends=('libmilter' 'glibc' 'libnsl')
-source=("https://www.libspf2.org/spf/${pkgname}-${pkgver}.tar.gz"
-        'fix-variadic-macros.patch')
-sha256sums=('d91e3de81ae287a2976c44f60283bd3000d720e6a112dc7142eedf1831b821c9'
-            '1396d155665f52748cfc7e06e01a92cc98c65193f36e807b8b1de4fb31d4caec')
+makedepends=('libmilter')
+source=(
+  "https://www.libspf2.org/spf/$pkgname-$pkgver.tar.gz"
+  'fix-variadic-macros.patch::https://github.com/shevek/libspf2/commit/5852828582f556e73751076ad092f72acf7fc8b6.patch'
+  'fix-cve-2021-20314.patch::https://github.com/shevek/libspf2/commit/c37b7c13c30e225183899364b9f2efdfa85552ef.patch'
+)
 sha512sums=('162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130'
-            '886a347c6526c4e81bc035d7e0069f72aaa5ad2103f0e035e46dbd7e1e5f328ebbbc81842fd32397d195a5b18cf841784455a4142291276c1be8942a1c753b4d')
+            '886a347c6526c4e81bc035d7e0069f72aaa5ad2103f0e035e46dbd7e1e5f328ebbbc81842fd32397d195a5b18cf841784455a4142291276c1be8942a1c753b4d'
+            '809c9a001b21831a6840359bea3f4e302e1589a5e77bceff85dd63d631ac25ce217ba11446d537d044a1e87481323940da25e6159ad19dd62fcb0803bcd2dcf6')
+b2sums=('d15a44f64c5e3da20aa349e61a6cc02a15f83ed3acff93fe4c23970e30533d6424b1db35d7d60ff488c9a239d343f8544426fbf8fcb66271237155e0b57df1b5'
+        '0fcf2c91cc8b01f8d20ec1d7e1896f59c01115de45b505c7cf81e68d0850456a08b87c1e2f59a5e37824298bee969650f9dd391ec25addf5186478e07a07d182'
+        '3108e42c5a1f629ce5129adfecd2874d1a02ddca0b2db05da1a9d76907dcf2c8d2bde822eb9ad485485d2befd1a35a07bc7f49b629a0829c20253914c6297593')
 
 prepare() {
-    cd "${srcdir}/${pkgname}-${pkgver}"
-    patch -p1 -i "$srcdir/fix-variadic-macros.patch"
+  cd "$pkgname-$pkgver"
+  patch -p1 -i "$srcdir/fix-variadic-macros.patch"
+  patch -p1 -i "$srcdir/fix-cve-2021-20314.patch"
 }
 
-check() {
-    cd "${srcdir}/${pkgname}-${pkgver}"
-    make check
+build() {
+  cd "$pkgname-$pkgver"
+  ./configure --prefix='/usr'
+  make
 }
 
-build() {
-    cd "${srcdir}/${pkgname}-${pkgver}"
-    ./configure --prefix='/usr'
-    make
+check() {
+  cd "$pkgname-$pkgver"
+  make check
 }
 
 package() {
-    cd "${srcdir}/${pkgname}-${pkgver}"
-    make DESTDIR="${pkgdir}/" install
-    rm -v "${pkgdir}"/usr/bin/*_static "${pkgdir}/usr/bin/spfd" "${pkgdir}/usr/bin/spf_example" "${pkgdir}/usr/bin/spftest"
+  cd "$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
+
+  # remove unused binaries
+  rm -v "${pkgdir}"/usr/bin/*_static "${pkgdir}/usr/bin/spfd" "${pkgdir}/usr/bin/spf_example" "${pkgdir}/usr/bin/spftest"
 }

Deleted: fix-variadic-macros.patch
===================================================================
--- fix-variadic-macros.patch	2021-11-21 02:20:31 UTC (rev 1052925)
+++ fix-variadic-macros.patch	2021-11-21 02:29:10 UTC (rev 1052926)
@@ -1,29 +0,0 @@
-From 5852828582f556e73751076ad092f72acf7fc8b6 Mon Sep 17 00:00:00 2001
-From: Shevek <shevek at anarres.org>
-Date: Tue, 23 Sep 2014 01:03:00 -0700
-Subject: [PATCH] Fix #4: Use gcc trick for variadic macros. Does this break
- anyone else?
-
----
- src/include/spf_log.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/include/spf_log.h b/src/include/spf_log.h
-index 0d2adeb..9b09714 100644
---- a/src/include/spf_log.h
-+++ b/src/include/spf_log.h
-@@ -60,10 +60,10 @@ void SPF_debugv( const char *file, int line, const char *format, va_list ap ) __
- 
- #if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
- 
--#define SPF_errorf(format, ... ) SPF_errorx( __FILE__, __LINE__, format, __VA_ARGS__ )
--#define SPF_warningf(format, ... ) SPF_warningx( __FILE__, __LINE__, format, __VA_ARGS__ )
--#define SPF_infof(format, ... ) SPF_infox( __FILE__, __LINE__, format, __VA_ARGS__ )
--#define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, __VA_ARGS__ )
-+#define SPF_errorf(format, ... ) SPF_errorx( __FILE__, __LINE__, format, ##__VA_ARGS__ )
-+#define SPF_warningf(format, ... ) SPF_warningx( __FILE__, __LINE__, format, ##__VA_ARGS__ )
-+#define SPF_infof(format, ... ) SPF_infox( __FILE__, __LINE__, format, ##__VA_ARGS__ )
-+#define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, ##__VA_ARGS__ )
- 
- #elif defined( __GNUC__ )
- 



More information about the arch-commits mailing list