From 15ff3649ccbfa94bd17820656d66b49b6237745d Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Thu, 21 Jul 2016 16:33:12 +0200 Subject: [PATCH] Izmjene za Lintian: E: postfix-cn source: source-contains-unsafe-symlink newaliases-gecos W: postfix-cn source: ancient-standards-version 3.9.3 (current is 3.9.6) W: postfix-cn: description-synopsis-starts-with-article --- debian/changelog | 7 +++++++ debian/control | 2 +- debian/cron.d | 2 +- debian/install | 1 - make-aliases-gecos.sh | 32 -------------------------------- newaliases-gecos | 33 ++++++++++++++++++++++++++++++++- 6 files changed, 41 insertions(+), 36 deletions(-) delete mode 100755 make-aliases-gecos.sh mode change 120000 => 100755 newaliases-gecos diff --git a/debian/changelog b/debian/changelog index a39e70f..d1bfae7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +postfix-cn (2.11.3~cn0) stable; urgency=medium + + * Prva verzija za jessie + * Ispravke za Lintian + + -- Ivan Rako Wed, 20 Jul 2016 13:59:35 +0200 + postfix-cn (2.9.6~cn1) stable; urgency=medium * Dodavanje IPv6 localhost adrese u mynetworks diff --git a/debian/control b/debian/control index a7f7ddc..fad824a 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Architecture: all Depends: ${misc:Depends}, postfix (>= 2.9.6-2), carnet-tools-cn (>= 2.7), sasl2-bin (>= 2.1.25), libsasl2-modules (>= 2.1.25), debconf, openssl, adduser Conflicts: sendmail-cn, amavisd-cn (<< 2:20030616p10-10), amavisd-new-milter, sendmail-base Suggests: amavisd-cn -Description: A high-performance mail transport agent +Description: High-performance mail transport agent Postfix is Wietse Venema's mail transport agent that started life as an alternative to the widely-used Sendmail program. Postfix attempts to be fast, easy to administer, and secure, while at the same time being diff --git a/debian/cron.d b/debian/cron.d index b492840..a848782 100644 --- a/debian/cron.d +++ b/debian/cron.d @@ -2,4 +2,4 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH -0 0-23/1 * * * root if [ -x /usr/share/postfix-cn/make-aliases-gecos.sh ]; then /usr/share/postfix-cn/make-aliases-gecos.sh; fi +0 0-23/1 * * * root if [ -x /usr/sbin/newaliases-gecos ]; then /usr/sbin/newaliases-gecos; fi diff --git a/debian/install b/debian/install index 71db1b5..b089b77 100644 --- a/debian/install +++ b/debian/install @@ -1,3 +1,2 @@ -make-aliases-gecos.sh usr/share/postfix-cn carnet_whitelist_clients usr/share/postfix-cn newaliases-gecos usr/sbin diff --git a/make-aliases-gecos.sh b/make-aliases-gecos.sh deleted file mode 100755 index f831cf4..0000000 --- a/make-aliases-gecos.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH - -[ -x /usr/sbin/postalias ] || exit 0 -[ -f /etc/postfix/main.cf ] || exit 0 -gecos="/var/lib/postfix-cn/aliases_gecos" -grep -q "hash:$gecos" /etc/postfix/main.cf || exit 0 - -[ -d /var/lib/postfix-cn/ ] || exit 0 - -# Load CARNet Tools -. /usr/share/carnet-tools/functions.sh - -getent passwd | awk -F: ' - $3 >= 100 && $1 != "nobody" && $5 \ - { - split($5, g, ","); - if (g[1]=="") {next}; - gsub(/ /, ".", g[1]); - print tolower(g[1]) ": " $1; - }' > $gecos.dpkg-tmp.$$ - - -if ! cmp -s $gecos.dpkg-tmp.$$ $gecos > /dev/null; then - cp_mv $gecos.dpkg-tmp.$$ $gecos - postalias hash:$gecos -else - rm -f $gecos.dpkg-tmp.$$ -fi diff --git a/newaliases-gecos b/newaliases-gecos deleted file mode 120000 index 05fbd6f..0000000 --- a/newaliases-gecos +++ /dev/null @@ -1 +0,0 @@ -../share/postfix-cn/make-aliases-gecos.sh \ No newline at end of file diff --git a/newaliases-gecos b/newaliases-gecos new file mode 100755 index 0000000..f831cf4 --- /dev/null +++ b/newaliases-gecos @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH + +[ -x /usr/sbin/postalias ] || exit 0 +[ -f /etc/postfix/main.cf ] || exit 0 +gecos="/var/lib/postfix-cn/aliases_gecos" +grep -q "hash:$gecos" /etc/postfix/main.cf || exit 0 + +[ -d /var/lib/postfix-cn/ ] || exit 0 + +# Load CARNet Tools +. /usr/share/carnet-tools/functions.sh + +getent passwd | awk -F: ' + $3 >= 100 && $1 != "nobody" && $5 \ + { + split($5, g, ","); + if (g[1]=="") {next}; + gsub(/ /, ".", g[1]); + print tolower(g[1]) ": " $1; + }' > $gecos.dpkg-tmp.$$ + + +if ! cmp -s $gecos.dpkg-tmp.$$ $gecos > /dev/null; then + cp_mv $gecos.dpkg-tmp.$$ $gecos + postalias hash:$gecos +else + rm -f $gecos.dpkg-tmp.$$ +fi -- 1.7.10.4