[arch-commits] Commit in opensmtpd/repos (6 files)

Evangelos Foutras foutrelis at archlinux.org
Tue Aug 6 03:15:51 UTC 2019


    Date: Tuesday, August 6, 2019 @ 03:15:50
  Author: foutrelis
Revision: 497537

archrelease: copy trunk to community-staging-x86_64

Added:
  opensmtpd/repos/community-staging-x86_64/
  opensmtpd/repos/community-staging-x86_64/PKGBUILD
    (from rev 497536, opensmtpd/trunk/PKGBUILD)
  opensmtpd/repos/community-staging-x86_64/fix-crash-on-authentication.patch
    (from rev 497536, opensmtpd/trunk/fix-crash-on-authentication.patch)
  opensmtpd/repos/community-staging-x86_64/opensmtpd.sysusers
    (from rev 497536, opensmtpd/trunk/opensmtpd.sysusers)
  opensmtpd/repos/community-staging-x86_64/smtpd.service
    (from rev 497536, opensmtpd/trunk/smtpd.service)
  opensmtpd/repos/community-staging-x86_64/smtpd.socket
    (from rev 497536, opensmtpd/trunk/smtpd.socket)

-----------------------------------+
 PKGBUILD                          |   74 ++++++++++++++++++++++++++++++++++++
 fix-crash-on-authentication.patch |   43 ++++++++++++++++++++
 opensmtpd.sysusers                |    4 +
 smtpd.service                     |   11 +++++
 smtpd.socket                      |    8 +++
 5 files changed, 140 insertions(+)

Copied: opensmtpd/repos/community-staging-x86_64/PKGBUILD (from rev 497536, opensmtpd/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2019-08-06 03:15:50 UTC (rev 497537)
@@ -0,0 +1,74 @@
+# Maintainer: Lukas Fleischer <lfleischer 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'
+            'b38b64f1457b7227d55585edc711cce525e089516d16b093e6c44387380e6b13'
+            'abf5baeb2a87c60d668ad18ea41cc08cab7a4f76339dd6df05de15cdaadaf922'
+            '32d46de5562d01de445d04c93bcc9f94bf103539b676e449c32e3603a3866cf8'
+            '0f4a8729bb46413d3b4a043ef41ed4949ff8e35d22c293c4b9fde10f9d44ba41')
+
+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
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc/smtpd \
+    --sbindir=/usr/bin \
+    --libexecdir=/usr/lib/smtpd \
+    --with-path-mbox=/var/spool/mail \
+    --with-path-empty=/var/empty \
+    --with-path-socket=/run \
+    --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \
+    --with-user-smtpd=smtpd \
+    --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'
+
+  make
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+
+  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"
+
+  # 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 an empty aliases file (used by the default config)
+  install -Dm644 /dev/null "$pkgdir/etc/smtpd/aliases"
+}

Copied: opensmtpd/repos/community-staging-x86_64/fix-crash-on-authentication.patch (from rev 497536, opensmtpd/trunk/fix-crash-on-authentication.patch)
===================================================================
--- community-staging-x86_64/fix-crash-on-authentication.patch	                        (rev 0)
+++ community-staging-x86_64/fix-crash-on-authentication.patch	2019-08-06 03:15:50 UTC (rev 497537)
@@ -0,0 +1,43 @@
+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:

Copied: opensmtpd/repos/community-staging-x86_64/opensmtpd.sysusers (from rev 497536, opensmtpd/trunk/opensmtpd.sysusers)
===================================================================
--- community-staging-x86_64/opensmtpd.sysusers	                        (rev 0)
+++ community-staging-x86_64/opensmtpd.sysusers	2019-08-06 03:15:50 UTC (rev 497537)
@@ -0,0 +1,4 @@
+u smtpd 91 "SMTP Daemon" -
+u smtpq 92 "SMTP Queue"  -
+
+m smtpd root

Copied: opensmtpd/repos/community-staging-x86_64/smtpd.service (from rev 497536, opensmtpd/trunk/smtpd.service)
===================================================================
--- community-staging-x86_64/smtpd.service	                        (rev 0)
+++ community-staging-x86_64/smtpd.service	2019-08-06 03:15:50 UTC (rev 497537)
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenSMTPD
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/smtpd
+
+[Install]
+WantedBy=multi-user.target

Copied: opensmtpd/repos/community-staging-x86_64/smtpd.socket (from rev 497536, opensmtpd/trunk/smtpd.socket)
===================================================================
--- community-staging-x86_64/smtpd.socket	                        (rev 0)
+++ community-staging-x86_64/smtpd.socket	2019-08-06 03:15:50 UTC (rev 497537)
@@ -0,0 +1,8 @@
+[Unit]
+Description=OpenSMTPD Socket
+
+[Socket]
+ListenStream=/run/smtpd.sock
+
+[Install]
+WantedBy=sockets.target



More information about the arch-commits mailing list