From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E8413138206 for ; Tue, 26 Apr 2016 04:28:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB98E21C001; Tue, 26 Apr 2016 04:28:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5889C21C001 for ; Tue, 26 Apr 2016 04:28:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BED7434072E for ; Tue, 26 Apr 2016 04:28:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 50542963 for ; Tue, 26 Apr 2016 04:28:37 +0000 (UTC) From: "Andrew Savchenko" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Savchenko" Message-ID: <1461639766.88902c0975557bccd36d67f8c23341c7187aa8f4.bircoph@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/polipo/files/, net-proxy/polipo/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-proxy/polipo/files/polipo.initd-5 net-proxy/polipo/polipo-1.1.1-r4.ebuild net-proxy/polipo/polipo-9999.ebuild X-VCS-Directories: net-proxy/polipo/ net-proxy/polipo/files/ X-VCS-Committer: bircoph X-VCS-Committer-Name: Andrew Savchenko X-VCS-Revision: 88902c0975557bccd36d67f8c23341c7187aa8f4 X-VCS-Branch: master Date: Tue, 26 Apr 2016 04:28:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7d772cb3-8028-4029-b8fe-9502665adff3 X-Archives-Hash: 3589070ee9bde1e0c345b0bb6a45ffbd commit: 88902c0975557bccd36d67f8c23341c7187aa8f4 Author: Andrew Savchenko gentoo org> AuthorDate: Tue Apr 26 03:02:46 2016 +0000 Commit: Andrew Savchenko gentoo org> CommitDate: Tue Apr 26 03:02:46 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88902c09 net-proxy/polipo: unloosing net dependency use net is sufficient and requires in some use cases Package-Manager: portage-2.2.28 Signed-off-by: Andrew Savchenko gentoo.org> net-proxy/polipo/files/polipo.initd-5 | 66 ++++++++++++++++++++++ .../{polipo-9999.ebuild => polipo-1.1.1-r4.ebuild} | 2 +- net-proxy/polipo/polipo-9999.ebuild | 2 +- 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/net-proxy/polipo/files/polipo.initd-5 b/net-proxy/polipo/files/polipo.initd-5 new file mode 100644 index 0000000..e0cabe6 --- /dev/null +++ b/net-proxy/polipo/files/polipo.initd-5 @@ -0,0 +1,66 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +CONFFILE="/etc/polipo/config${SVCNAME#polipo}" +PIDFILE="/var/run/${SVCNAME}.pid" + +depend() { + use net +} + +checkconfig() { + { polipo -v -c "${CONFFILE}" || return 1 ; } | { + local retvalue=0 + local name type value desc + while read name type value desc ; do + case ${name} in + configFile) + if [ "${value}" = "(none)" ] ; then + eerror "Unable to read configuration file /etc/polipo/config" + retvalue=1 + fi + ;; + daemonise) + if [ "${value}" != "false" ] ; then + eerror "Configuration option not supported by this init script: ${name}=${value}" + retvalue=1 + fi + ;; + pidFile) + if [ "${value}" != "(none)" ] ; then + eerror "Configuration option not supported by this init script: ${name}=${value}" + retvalue=1 + fi + ;; + diskCacheRoot) + if [ "${value}" != "(none)" ] ; then + # Ensure that cache directory exists and have proper permissions + if ! [ -d "{value}" ]; then + mkdir -p -m 0750 "${value}" + chown polipo:polipo "${value}" + fi + fi + ;; + esac + done + return ${retvalue} + } +} + +start() { + checkconfig || return 1 + + ebegin "Starting ${SVCNAME} HTTP proxy" + start-stop-daemon --start --user polipo \ + --background --pidfile "${PIDFILE}" --make-pidfile \ + --exec /usr/bin/polipo -- -c "${CONFFILE}" + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME} HTTP proxy" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-proxy/polipo/polipo-9999.ebuild b/net-proxy/polipo/polipo-1.1.1-r4.ebuild similarity index 97% copy from net-proxy/polipo/polipo-9999.ebuild copy to net-proxy/polipo/polipo-1.1.1-r4.ebuild index 559a3ed..84b743e 100644 --- a/net-proxy/polipo/polipo-9999.ebuild +++ b/net-proxy/polipo/polipo-1.1.1-r4.ebuild @@ -38,7 +38,7 @@ src_compile() { src_install() { einstall PREFIX=/usr MANDIR=/usr/share/man INFODIR=/usr/share/info "TARGET=${D}" - newinitd "${FILESDIR}/${PN}.initd-4" ${PN} + newinitd "${FILESDIR}/${PN}.initd-5" ${PN} insinto /etc/${PN} ; doins "${FILESDIR}/config" systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service" if ! use systemd; then diff --git a/net-proxy/polipo/polipo-9999.ebuild b/net-proxy/polipo/polipo-9999.ebuild index 559a3ed..84b743e 100644 --- a/net-proxy/polipo/polipo-9999.ebuild +++ b/net-proxy/polipo/polipo-9999.ebuild @@ -38,7 +38,7 @@ src_compile() { src_install() { einstall PREFIX=/usr MANDIR=/usr/share/man INFODIR=/usr/share/info "TARGET=${D}" - newinitd "${FILESDIR}/${PN}.initd-4" ${PN} + newinitd "${FILESDIR}/${PN}.initd-5" ${PN} insinto /etc/${PN} ; doins "${FILESDIR}/config" systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service" if ! use systemd; then