aboutsummaryrefslogtreecommitdiffstats
path: root/testing/postfwd
diff options
context:
space:
mode:
authorSimon Frankenberger <simon@fraho.eu>2019-04-12 06:56:56 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2019-04-14 21:31:46 +0000
commit37447de8c4957b1b90b9b38bf8377de6dd5c92eb (patch)
tree702a88bf0db95f798b23a109c08101d5933a826f /testing/postfwd
parent0383b528c3a5a5da2a528c8b27903e352eb643e2 (diff)
downloadaports-37447de8c4957b1b90b9b38bf8377de6dd5c92eb.tar.bz2
aports-37447de8c4957b1b90b9b38bf8377de6dd5c92eb.tar.xz
testing/postfwd: Upgrade to 2.01
Diffstat (limited to 'testing/postfwd')
-rw-r--r--testing/postfwd/APKBUILD27
-rw-r--r--testing/postfwd/postfwd.confd (renamed from testing/postfwd/postfwd2.confd)14
-rw-r--r--testing/postfwd/postfwd.initd18
-rwxr-xr-xtesting/postfwd/postfwd.pre-install6
-rw-r--r--testing/postfwd/postfwd2.initd18
5 files changed, 46 insertions, 37 deletions
diff --git a/testing/postfwd/APKBUILD b/testing/postfwd/APKBUILD
index a68cca55a6..5d9d59ccc9 100644
--- a/testing/postfwd/APKBUILD
+++ b/testing/postfwd/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
pkgname=postfwd
-pkgver=1.39
+pkgver=2.01
pkgrel=0
pkgdesc="Combines complex postfix restrictions in a ruleset similar to those of the most firewalls"
url="https://postfwd.org/"
@@ -10,8 +10,8 @@ license="BSD"
depends="perl-net-server perl-net-dns perl-io-multiplex"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
- ${pkgname}2.initd
- ${pkgname}2.confd
+ $pkgname.initd
+ $pkgname.confd
"
options="!check" # package has no tests
builddir="$srcdir/$pkgname-$pkgver"
@@ -24,24 +24,27 @@ replaces="postfwd2" # for backward compatibility
build() {
cd "$builddir"
# just print out version to check if all dependencies are met
- sbin/postfwd2 -V
+ sbin/postfwd -V
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/usr/sbin \
- "$pkgdir"/usr/share/doc/postfwd2 \
+ "$pkgdir"/usr/share/doc/$pkgname \
"$pkgdir"/usr/share/man/man8 \
- "$pkgdir"/etc/postfwd2 \
+ "$pkgdir"/etc/$pkgname \
"$pkgdir"/etc/init.d
- install -m0755 sbin/postfwd2 "$pkgdir"/usr/sbin
- install -m0644 doc/* "$pkgdir"/usr/share/doc/postfwd2
+ install -m0755 sbin/postfwd3 "$pkgdir"/usr/sbin
+ ln -s postfwd3 "$pkgdir"/usr/sbin/postfwd
+ ln -s postfwd3 "$pkgdir"/usr/sbin/postfwd2
+ cp -r doc/* "$pkgdir"/usr/share/doc/$pkgname
install -m0644 man/man8/* "$pkgdir"/usr/share/man/man8
- install -m0644 etc/postfwd.cf.sample "$pkgdir"/etc/postfwd2
+ install -m0644 etc/postfwd.cf.sample "$pkgdir"/etc/$pkgname
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -dm750 -o postfwd -g postfwd "$pkgdir"/var/lib/postfw
}
-sha512sums="b292b3d5cb634fedc039b33225e5f3e5653a25e56b5b2d9a5936d0a9d59ddb9a0fef129221f23859a679609eed57f4c7f20299f4895a48600cc78d2e22756a16 postfwd-1.39.tar.gz
-b33ebb90d5e38f2af3cd93d0205672d83a618b253e22a6fc10cffee4b1e75513189f6214ae25a910913119c1ce0178fabdd95cc10c47ac1f85093953c4e04f5a postfwd2.initd
-e1ead4e130c593fabf6ce28fdbdf74806bd922556b492976c03b3578112c533ca60645ad11786785763abf6dd94fee37f2e7261661314f712f9f46fad2acd20d postfwd2.confd"
+sha512sums="71433e67ed0da166909cde427847a78e3764439871f17a749c7560e21668a5b89f43f354e2af84a3724dff1c763407e79384eb92ba3334a3515b853262e1556e postfwd-2.01.tar.gz
+d68b1a1a8294fcccc7a2d9d88bb7b93c16569524e6844f17c4a4ad0df0abca17690dc021267e92b10b4a88f8dd21b559d36a9ca8a71e1813ca3819b4a2684d1c postfwd.initd
+3fdd6558eb3d87b8ef05c4e650ea33fcfe5bde412590ab7cb745bc1fdbf62f4f4630da271de59e6300ddd1a77287e084f7f2766c312bc2f82eb98a5623dedac2 postfwd.confd"
diff --git a/testing/postfwd/postfwd2.confd b/testing/postfwd/postfwd.confd
index 7f16ef108b..6aab8788cb 100644
--- a/testing/postfwd/postfwd2.confd
+++ b/testing/postfwd/postfwd.confd
@@ -1,19 +1,19 @@
-# /etc/conf.d/postfwd2.conf
+# /etc/conf.d/postfwd.conf
# User and group to execute postfwd as
-POSTFWD2_USER="postfwd2"
-POSTFWD2_GROUP="postfwd2"
+POSTFWD_USER="postfwd"
+POSTFWD_GROUP="postfwd"
# Configuration file to use
-POSTFWD2_CONFIG="/etc/postfwd2/postfwd.cf"
+POSTFWD_CONFIG="/etc/postfwd/postfwd.cf"
# The IP address postfwd will listen on
# WARNING: You _really_ want this to be localhost for security!
-POSTFWD2_LISTEN="127.0.0.1"
+POSTFWD_LISTEN="127.0.0.1"
# The port postfwd will listen on
-POSTFWD2_PORT="10040"
+POSTFWD_PORT="10040"
# Additional options to pass to postfwd
-POSTFWD2_OPTS=""
+POSTFWD_OPTS=""
diff --git a/testing/postfwd/postfwd.initd b/testing/postfwd/postfwd.initd
new file mode 100644
index 0000000000..81d8613a17
--- /dev/null
+++ b/testing/postfwd/postfwd.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+command="/usr/sbin/postfwd"
+pidfile="/run/postfwd.pid"
+command_args="--file ${POSTFWD_CONFIG}
+--interface=${POSTFWD_LISTEN}
+--port=${POSTFWD_PORT}
+--user=${POSTFWD_USER}
+--group=${POSTFWD_GROUP}
+--pidfile ${pidfile}
+${POSTFWD_OPTS}
+"
+command_args_background="--daemon"
+
+depend() {
+ need net
+}
+
diff --git a/testing/postfwd/postfwd.pre-install b/testing/postfwd/postfwd.pre-install
new file mode 100755
index 0000000000..62c8ba5d71
--- /dev/null
+++ b/testing/postfwd/postfwd.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S postfwd 2>/dev/null
+adduser -SD -h /var/lib/postfwd -G postfwd postfwd 2>/dev/null
+
+exit 0
diff --git a/testing/postfwd/postfwd2.initd b/testing/postfwd/postfwd2.initd
deleted file mode 100644
index 4206c8c01a..0000000000
--- a/testing/postfwd/postfwd2.initd
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/sbin/openrc-run
-
-command="/usr/sbin/postfwd2"
-pidfile="/run/postfwd2.pid"
-command_args="--file ${POSTFWD2_CONFIG}
---interface=${POSTFWD2_LISTEN}
---port=${POSTFWD2_PORT}
---user=${POSTFWD2_USER}
---group=${POSTFWD2_GROUP}
---pidfile ${pidfile}
-${POSTFWD2_OPTS}
-"
-command_args_background="--daemon"
-
-depend() {
- need net
-}
-