diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2015-03-30 11:25:00 +0000 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2015-03-30 11:25:00 +0000 |
commit | e6c6a0e0963b1ee38bf8b143f0922716149c3559 (patch) | |
tree | 1631deda774298a80efcd7cb8cd5e7fc8a9a4528 /net-proxy | |
parent | Remove vulnerable versions, bug #543620. (diff) | |
download | gentoo-2-e6c6a0e0963b1ee38bf8b143f0922716149c3559.tar.gz gentoo-2-e6c6a0e0963b1ee38bf8b143f0922716149c3559.tar.bz2 gentoo-2-e6c6a0e0963b1ee38bf8b143f0922716149c3559.zip |
add systemd support, wrt bug 510898
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 565953B95372756C)
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/polipo/ChangeLog | 9 | ||||
-rw-r--r-- | net-proxy/polipo/files/polipo_at.service | 11 | ||||
-rw-r--r-- | net-proxy/polipo/polipo-1.1.1-r1.ebuild | 62 | ||||
-rw-r--r-- | net-proxy/polipo/polipo-9999.ebuild | 26 |
4 files changed, 97 insertions, 11 deletions
diff --git a/net-proxy/polipo/ChangeLog b/net-proxy/polipo/ChangeLog index 264414a6e4f5..48bb8a73ad5b 100644 --- a/net-proxy/polipo/ChangeLog +++ b/net-proxy/polipo/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-proxy/polipo # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/ChangeLog,v 1.46 2015/01/12 16:16:12 bircoph Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/ChangeLog,v 1.47 2015/03/30 11:25:00 bircoph Exp $ + +*polipo-1.1.1-r1 (30 Mar 2015) + + 30 Mar 2015; Andrew Savchenko <bircoph@gentoo.org> +polipo-1.1.1-r1.ebuild, + polipo-9999.ebuild, +files/polipo_at.service: + Add systemd support (patch from Yichao Zhou + <broken.zhou@gmail.com>, bug 510898). 12 Jan 2015; Andrew Savchenko <bircoph@gentoo.org> -polipo-1.0.4.1-r1.ebuild, -files/polipo.crond, -files/polipo.initd: diff --git a/net-proxy/polipo/files/polipo_at.service b/net-proxy/polipo/files/polipo_at.service new file mode 100644 index 000000000000..5018ac6c75e0 --- /dev/null +++ b/net-proxy/polipo/files/polipo_at.service @@ -0,0 +1,11 @@ +[Unit] +Description=Polipo Proxy Server +After=network.target + +[Service] +ExecStart=/usr/bin/polipo -c /etc/polipo/%i +User=polipo +PrivateDevices=yes + +[Install] +WantedBy=multi-user.target diff --git a/net-proxy/polipo/polipo-1.1.1-r1.ebuild b/net-proxy/polipo/polipo-1.1.1-r1.ebuild new file mode 100644 index 000000000000..ecd1d4b04066 --- /dev/null +++ b/net-proxy/polipo/polipo-1.1.1-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/polipo-1.1.1-r1.ebuild,v 1.1 2015/03/30 11:25:00 bircoph Exp $ + +EAPI="5" + +if [[ ${PV} == "9999" ]] ; then + _GIT=git-r3 + EGIT_REPO_URI="https://github.com/jech/${PN}.git" + SRC_URI="" + KEYWORDS="" +else + SRC_URI="http://www.pps.jussieu.fr/~jch/software/files/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +inherit ${_GIT} toolchain-funcs user systemd + +DESCRIPTION="A caching web proxy" +HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/" +LICENSE="MIT GPL-2" +SLOT="0" +IUSE="systemd" + +DEPEND="sys-apps/texinfo" +RDEPEND="" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/cache/${PN} ${PN} +} + +src_compile() { + tc-export CC + emake PREFIX=/usr "CDEBUGFLAGS=${CFLAGS}" all +} + +src_install() { + einstall PREFIX=/usr MANDIR=/usr/share/man INFODIR=/usr/share/info "TARGET=${D}" + + newinitd "${FILESDIR}/${PN}.initd-2" ${PN} + insinto /etc/${PN} ; doins "${FILESDIR}/config" + systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service" + if ! use systemd; then + exeinto /etc/cron.weekly ; newexe "${FILESDIR}/${PN}.crond-2" ${PN} + fi + + dodoc CHANGES README + dohtml html/* +} + +pkg_postinst() { + elog "Do not forget to read the manual." + elog "Change the config file in /etc/${PN} to suit your needs." + elog "" + elog "Polipo init scripts can now be multiplexed:" + elog "1. create /etc/${PN}/config.foo" + elog "2. symlink /etc/init.d/{${PN}.foo -> ${PN}}" + elog " a. if you are using OpenRC, symlink /etc/init.d/{${PN}.foo -> ${PN}}" + elog " b. if you are using systemd, execute \"systemctl enable polipo@config.foo\"" + elog "3. make sure all instances use unique ip:port pair and cachedir, if any" +} diff --git a/net-proxy/polipo/polipo-9999.ebuild b/net-proxy/polipo/polipo-9999.ebuild index 868014539d4a..aab25482bf84 100644 --- a/net-proxy/polipo/polipo-9999.ebuild +++ b/net-proxy/polipo/polipo-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/polipo-9999.ebuild,v 1.3 2015/01/09 00:13:32 bircoph Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/polipo-9999.ebuild,v 1.4 2015/03/30 11:25:00 bircoph Exp $ EAPI="5" @@ -14,12 +14,13 @@ else KEYWORDS="~amd64 ~x86" fi -inherit ${_GIT} toolchain-funcs user +inherit ${_GIT} toolchain-funcs user systemd DESCRIPTION="A caching web proxy" HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/" LICENSE="MIT GPL-2" SLOT="0" +IUSE="systemd" DEPEND="sys-apps/texinfo" RDEPEND="" @@ -39,18 +40,23 @@ src_install() { newinitd "${FILESDIR}/${PN}.initd-2" ${PN} insinto /etc/${PN} ; doins "${FILESDIR}/config" - exeinto /etc/cron.weekly ; newexe "${FILESDIR}/${PN}.crond-2" ${PN} + systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service" + if ! use systemd; then + exeinto /etc/cron.weekly ; newexe "${FILESDIR}/${PN}.crond-2" ${PN} + fi dodoc CHANGES README dohtml html/* } pkg_postinst() { - einfo "Do not forget to read the manual." - einfo "Change the config file in /etc/${PN} to suit your needs." - einfo "" - einfo "Polipo OpenRC init scripts can now be multiplexed:" - einfo "1. create /etc/${PN}/config.foo" - einfo "2. symlink /etc/init.d/{${PN}.foo -> ${PN}}" - einfo "3. make sure all instances use unique ip:port pair and cachedir, if any" + elog "Do not forget to read the manual." + elog "Change the config file in /etc/${PN} to suit your needs." + elog "" + elog "Polipo init scripts can now be multiplexed:" + elog "1. create /etc/${PN}/config.foo" + elog "2. symlink /etc/init.d/{${PN}.foo -> ${PN}}" + elog " a. if you are using OpenRC, symlink /etc/init.d/{${PN}.foo -> ${PN}}" + elog " b. if you are using systemd, execute \"systemctl enable polipo@config.foo\"" + elog "3. make sure all instances use unique ip:port pair and cachedir, if any" } |