[arch-commits] Commit in opensmtpd/trunk (3 files)

Bruno Pagani archange at archlinux.org
Sun Oct 20 19:10:08 UTC 2019


    Date: Sunday, October 20, 2019 @ 19:10:08
  Author: archange
Revision: 517944

upgpkg: opensmtpd 6.4.2p1-1

Upgrade to latest version using LibreSSL.

Fixes FS#61002

Added:
  opensmtpd/trunk/opensmtpd.install
Modified:
  opensmtpd/trunk/PKGBUILD
Deleted:
  opensmtpd/trunk/fix-crash-on-authentication.patch

-----------------------------------+
 PKGBUILD                          |   72 +++++++++++++++++-------------------
 fix-crash-on-authentication.patch |   43 ---------------------
 opensmtpd.install                 |   11 +++++
 3 files changed, 46 insertions(+), 80 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-10-20 19:08:42 UTC (rev 517943)
+++ PKGBUILD	2019-10-20 19:10:08 UTC (rev 517944)
@@ -1,38 +1,36 @@
 # Maintainer: Lukas Fleischer <lfleischer at archlinux.org>
+# Maintainer: Bruno Pagani <archange at archlinux.org>
 # Contributor: Sébastien Luttringer
 # Contributor: parchd <parchd at archlinux.info>
 
 pkgname=opensmtpd
-pkgver=6.0.3p1
-pkgrel=3
-pkgdesc='Free implementation of the server-side SMTP protocol'
-arch=('x86_64')
-url='https://www.opensmtpd.org/'
-license=('custom')
-depends=('libasr' 'libevent' 'openssl-1.0' 'pam')
-provides=('smtp-server' 'smtp-forwarder')
-conflicts=('smtp-server' 'smtp-forwarder')
-backup=('etc/smtpd/smtpd.conf' 'etc/smtpd/aliases')
-options=('emptydirs')
-source=("https://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz"
-        'opensmtpd.sysusers'
-        'smtpd.service'
-        'smtpd.socket'
-        'fix-crash-on-authentication.patch')
-sha256sums=('291881862888655565e8bbe3cfb743310f5dc0edb6fd28a889a9a547ad767a81'
+pkgver=6.4.2p1
+pkgrel=1
+pkgdesc="Free implementation of the server-side SMTP protocol"
+arch=(x86_64)
+url="https://www.opensmtpd.org/"
+license=(custom)
+depends=(libasr libevent libressl pam)
+provides=(smtp-server smtp-forwarder)
+conflicts=(smtp-server smtp-forwarder)
+backup=(etc/smtpd/smtpd.conf etc/smtpd/aliases)
+options=(emptydirs)
+source=("https://www.opensmtpd.org/archives/${pkgname}-${pkgver}.tar.gz"
+        opensmtpd.sysusers
+        smtpd.service
+        smtpd.socket)
+sha256sums=('6d71155b15fa4ef0198d10dfb7b1905845c9d36d4a02321245a99da80002fb5d'
             'b38b64f1457b7227d55585edc711cce525e089516d16b093e6c44387380e6b13'
             'abf5baeb2a87c60d668ad18ea41cc08cab7a4f76339dd6df05de15cdaadaf922'
-            '32d46de5562d01de445d04c93bcc9f94bf103539b676e449c32e3603a3866cf8'
-            '0f4a8729bb46413d3b4a043ef41ed4949ff8e35d22c293c4b9fde10f9d44ba41')
+            '32d46de5562d01de445d04c93bcc9f94bf103539b676e449c32e3603a3866cf8')
+install=${pkgname}.install
 
 prepare() {
-  sed -ri 's,/etc/mail,/etc/smtpd,g' "$pkgname-$pkgver/smtpd/smtpd.conf"
-  cd $pkgname-$pkgver
-  patch -p1 -i ../fix-crash-on-authentication.patch
+  sed -ri 's,/etc/mail,/etc/smtpd,g' "${pkgname}-${pkgver}/smtpd/smtpd.conf"
 }
 
 build() {
-  cd "$pkgname-$pkgver"
+  cd "${pkgname}-${pkgver}"
 
   ./configure \
     --prefix=/usr \
@@ -47,28 +45,28 @@
     --with-user-queue=smtpq \
     --with-group-queue=smtpq \
     --with-auth-pam \
-    --with-libssl='/usr/lib/openssl-1.0' \
-    --with-cflags='-I/usr/include/openssl-1.0'
+    --with-cflags='-I/usr/include/libressl -L/usr/lib/libressl -Wl,-rpath=/usr/lib/libressl'
 
   make
 }
 
 package() {
-  cd "$pkgname-$pkgver"
+  cd "${pkgname}-${pkgver}"
 
-  make DESTDIR="$pkgdir/" install
+  make DESTDIR="${pkgdir}" install
 
-  ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/sendmail"
-  ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/mailq"
-  ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/newaliases"
-  ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/makemap"
+  ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/sendmail
+  ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/mailq
+  ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/newaliases
+  ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/makemap
 
-  # install license, systemd unit files, sysusers
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-  install -Dm644 "$srcdir/smtpd.service" "$pkgdir/usr/lib/systemd/system/smtpd.service"
-  install -Dm644 "$srcdir/smtpd.socket" "$pkgdir/usr/lib/systemd/system/smtpd.socket"
-  install -Dm644 "$srcdir/opensmtpd.sysusers" "$pkgdir/usr/lib/sysusers.d/opensmtpd.conf"
+  install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
 
+  cd ..
+  install -Dm644 smtpd.service -t "${pkgdir}"/usr/lib/systemd/system/
+  install -Dm644 smtpd.socket -t "${pkgdir}"/usr/lib/systemd/system/
+  install -Dm644 opensmtpd.sysusers "${pkgdir}"/usr/lib/sysusers.d/opensmtpd.conf
+
   # install an empty aliases file (used by the default config)
-  install -Dm644 /dev/null "$pkgdir/etc/smtpd/aliases"
+  install -Dm644 /dev/null "${pkgdir}"/etc/smtpd/aliases
 }

Deleted: fix-crash-on-authentication.patch
===================================================================
--- fix-crash-on-authentication.patch	2019-10-20 19:08:42 UTC (rev 517943)
+++ fix-crash-on-authentication.patch	2019-10-20 19:10:08 UTC (rev 517944)
@@ -1,43 +0,0 @@
-From 9b5f70b93e038df5446bd37a4adac5a0380748e7 Mon Sep 17 00:00:00 2001
-From: johannes <johannes.brechtmann at gmail.com>
-Date: Wed, 21 Feb 2018 23:57:11 +0100
-Subject: [PATCH] crypt_checkpass: include HAVE_CRYPT_H definition, add NULL
- check
-
----
- openbsd-compat/crypt_checkpass.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/openbsd-compat/crypt_checkpass.c b/openbsd-compat/crypt_checkpass.c
-index dafd2dae..d10b3a57 100644
---- a/openbsd-compat/crypt_checkpass.c
-+++ b/openbsd-compat/crypt_checkpass.c
-@@ -1,5 +1,6 @@
- /* OPENBSD ORIGINAL: lib/libc/crypt/cryptutil.c */
- 
-+#include "includes.h"
- #include <errno.h>
- #ifdef HAVE_CRYPT_H
- #include <crypt.h>
-@@ -10,6 +11,8 @@
- int
- crypt_checkpass(const char *pass, const char *goodhash)
- {
-+	char *c;
-+
- 	if (goodhash == NULL)
- 		goto fail;
- 
-@@ -17,7 +20,11 @@ crypt_checkpass(const char *pass, const char *goodhash)
- 	if (strlen(goodhash) == 0 && strlen(pass) == 0)
- 		return 0;
- 
--	if (strcmp(crypt(pass, goodhash), goodhash) == 0)
-+	c = crypt(pass, goodhash);
-+	if (c == NULL)
-+		goto fail;
-+
-+	if (strcmp(c, goodhash) == 0)
- 		return 0;
- 
- fail:

Added: opensmtpd.install
===================================================================
--- opensmtpd.install	                        (rev 0)
+++ opensmtpd.install	2019-10-20 19:10:08 UTC (rev 517944)
@@ -0,0 +1,11 @@
+post_upgrade() {
+    if [ $(vercmp $2 6.4.2p1-1) -lt 0 ] ; then
+        cat << EOF
+
+The configuration syntax changed in OpenSMTPD 6.4.
+Please refer to https://poolp.org/posts/2018-05-21/switching-to-opensmtpd-new-config/
+as well as smtpd.conf(5) for the new syntax.
+
+EOF
+    fi
+}



More information about the arch-commits mailing list