X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 29CF0DC0374 for ; Sun, 14 Feb 2016 11:10:22 +0000 (UTC) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id C08EBDC0319 for ; Sun, 14 Feb 2016 11:10:21 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id g62so21808505wme.1 for ; Sun, 14 Feb 2016 03:10:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=SGlyE/jbGmcwSAdRjDRbCl+5Lsn1lfraVlzHia1l2Ko=; b=ddn1ivguOWl1zrOywA9Ug6fkdvPt6bewCv3Uz5jTA4zHe6mL3RIuwNToRShEJRqz2m 4736DpcjtIx6fGvHaSiiVvofcJlqgS5xxukrQORgRIebwdMyulWApc/Ylx3DTa0S0bGt VQPeqW1QZ6eonP7E/rHNTqBIybyNnq7Eke2kAdb6441TRvhCokZXKjECCWsUsyCaOo9g I67eTvvIab/il5/g1TlSb9BiHc35F8GuZT/skW7qAHs3gHyic3k49NSnHYpv2bnydXfC TQi+CeFq6TgKuKxSbwCaa/y2yz/e/QiSIT1lwDwdTlzqD7XZ6f9h5fyT1c3ze3/oKhQ3 vPpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=SGlyE/jbGmcwSAdRjDRbCl+5Lsn1lfraVlzHia1l2Ko=; b=evY5NymftwLAdcgc9hnUmj1SbeJZyjlImFX/SlWzt2jPKYFU7MaChk7g0qQokOQo+I zRhj8FfxxT5z+Agyhg8D8Ptl7/l34L6UN9oZkVBe6XyCwVO481ZR+Glunm3g2oCotO3M islkDh0yWGuPrpRJsQxh4xw2JNNwZk1bmEYjmHsqiEhT+Lz2+cMMqfGQatcXxGsg6Cve tKq7Cq8RCg/mgsLwW+ZzBwoaS+d5bj4uYWmMr84h4B3/b6UGjSRLmuCCHRi6r7iikocS wzZxQxIsHuLsxgxkpvqK7/lHrsbD62wpFOiVeUhCuUGmYDvXiLpgCQZn03B5aOV6pNJw pDFQ== X-Gm-Message-State: AG10YORU2m7YR0K1KzbT3+CArw3RK1VzEjgvpBgLCYHj6R2p44AkkKnJ/r0JsxMhZJstQQ== X-Received: by 10.28.21.14 with SMTP id 14mr6774443wmv.39.1455448220108; Sun, 14 Feb 2016 03:10:20 -0800 (PST) Received: from router-dev.coli ([87.18.214.25]) by smtp.gmail.com with ESMTPSA id ll9sm20256385wjc.29.2016.02.14.03.10.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Feb 2016 03:10:19 -0800 (PST) From: Daniele Coli To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH] main/fetchmail: Added description to init.d script and moved configuration options to confd Date: Sun, 14 Feb 2016 12:10:18 +0100 Message-Id: <1455448218-12643-1-git-send-email-danielsan.dani@gmail.com> X-Mailer: git-send-email 2.7.1 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Added description to init.d script in order to make it compliant with rc-system and avoid annoying warning messages on syslog. Moved configuration file path and startup options to confd file. --- main/fetchmail/APKBUILD | 19 ++++++++++++------- main/fetchmail/fetchmail.confd | 5 +++++ main/fetchmail/fetchmail.initd | 10 ++++++---- 3 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 main/fetchmail/fetchmail.confd diff --git a/main/fetchmail/APKBUILD b/main/fetchmail/APKBUILD index 935b2a2..bcec281 100644 --- a/main/fetchmail/APKBUILD +++ b/main/fetchmail/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa pkgname=fetchmail pkgver=6.3.26 -pkgrel=5 +pkgrel=6 pkgdesc="A remote-mail retrieval and forwarding utility" url="http://www.fetchmail.info/" arch="all" @@ -13,8 +13,9 @@ pkggroups="fetchmail" makedepends="openssl-dev python" install="fetchmail.pre-install" subpackages="$pkgname-doc fetchmailconf" -source="http://downloads.sourceforge.net/project/${pkgname}/branch_6.3/fetchmail-${pkgver}.tar.xz - fetchmail.initd" +source="http://downloads.sourceforge.net/project/${pkgname}/branch_6.3/${pkgname}-${pkgver}.tar.xz + $pkgname.initd + $pkgname.confd" _builddir="$srcdir/$pkgname-$pkgver" prepare() { @@ -41,7 +42,8 @@ build() { package() { cd "$_builddir" make DESTDIR="$pkgdir" install - install -Dm755 "$srcdir"/fetchmail.initd "$pkgdir"/etc/init.d/fetchmail + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -o fetchmail -g fetchmail -d "$pkgdir"/var/lib/fetchmail \ "$pkgdir"/var/run/fetchmail } @@ -57,8 +59,11 @@ fetchmailconf() { } md5sums="61b66faad044afa26e142bb1791aa2b3 fetchmail-6.3.26.tar.xz -6beab7b7731b3d321904e2a8ec948121 fetchmail.initd" +482cbb5f67bedaeb3ed559f6671d3d3d fetchmail.initd +0203136e64395c8411b01d75407d1adc fetchmail.confd" sha256sums="79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850 fetchmail-6.3.26.tar.xz -c97185a8c1944574025b83ca4fc78f76330881d7e6ea209caf6962913ad66ffe fetchmail.initd" +ec00bbe1e2e8932c2fada56aea805cf537b775e804bac1d8794e07659291e9d5 fetchmail.initd +6343137640a25b115f015f41640bb498a6ebba471caa9374718364616aef3f85 fetchmail.confd" sha512sums="8e0a2484e60eaf6c0231e2599e10fec6d207fa1c0fa02ec99b3ef9aea00b6d87275434e79470a25f06e358cdd4a293f9c46a82dd128fe733a99c85144e6caa63 fetchmail-6.3.26.tar.xz -83128465a2e2e0df4ddd589cc7644e63ce013dee36196aa757b839edd5ec36775fc48fedd8c88ad51a8bb882bbfa573fff69546bbca84718ac9c1b915f35ff0a fetchmail.initd" +989127859c91eaec9bfa38dd873f141b0561cbe08d9ac4ab700abe612950fc4d61ec9670becf0d432a46c4d1558a2fd65f62f84e79cea9387ec1d377dacaecce fetchmail.initd +6f031ec6bd4a3ae53cd04fbd8470f4d10bd46ca29cabffa634a6801aa2e7707169855fbc045ced3c9a69523e694511a3f076b611678143e49339c8ccac98074e fetchmail.confd" diff --git a/main/fetchmail/fetchmail.confd b/main/fetchmail/fetchmail.confd new file mode 100644 index 0000000..baa1a4c --- /dev/null +++ b/main/fetchmail/fetchmail.confd @@ -0,0 +1,5 @@ +# /etc/conf.d/fetchmail: config file for /etc/init.d/fetchmail + +# See the fetchmail(1) man page for possible options to put here. +CFGFILE="/etc/fetchmailrc" +FETCHMAIL_OPTS="-d ${polling_period:-300}" diff --git a/main/fetchmail/fetchmail.initd b/main/fetchmail/fetchmail.initd index 8fd5adf..ad826ec 100755 --- a/main/fetchmail/fetchmail.initd +++ b/main/fetchmail/fetchmail.initd @@ -1,5 +1,7 @@ #!/sbin/openrc-run +description="Remote mail retrieval and forwarding" + pidfile=/var/run/fetchmail/fetchmail.pid depend() { @@ -9,8 +11,8 @@ depend() { } checkconfig() { - if [ ! -f /etc/fetchmailrc ]; then - eerror "Configuration file /etc/fetchmailrc not found" + if [ ! -f "${CFGFILE}" ]; then + eerror "Configuration file ${CFGFILE} not found" return 1 fi } @@ -22,8 +24,8 @@ start() { ebegin "Starting fetchmail" start-stop-daemon --start --quiet \ --user fetchmail --exec /usr/bin/fetchmail \ - -- -d ${polling_period:-300} -f /etc/fetchmailrc \ - --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids + --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids \ + -- -f "${CFGFILE}" ${FETCHMAIL_OPTS} eend ${?} } -- 2.7.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---