summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-proxy/polipo
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-proxy/polipo')
-rw-r--r--net-proxy/polipo/Manifest1
-rw-r--r--net-proxy/polipo/files/config8
-rw-r--r--net-proxy/polipo/files/polipo.crond-222
-rw-r--r--net-proxy/polipo/files/polipo.initd-266
-rw-r--r--net-proxy/polipo/files/polipo_at.service11
-rw-r--r--net-proxy/polipo/metadata.xml8
-rw-r--r--net-proxy/polipo/polipo-1.1.1-r1.ebuild62
-rw-r--r--net-proxy/polipo/polipo-1.1.1.ebuild56
-rw-r--r--net-proxy/polipo/polipo-9999.ebuild62
9 files changed, 296 insertions, 0 deletions
diff --git a/net-proxy/polipo/Manifest b/net-proxy/polipo/Manifest
new file mode 100644
index 000000000000..e3126c35d333
--- /dev/null
+++ b/net-proxy/polipo/Manifest
@@ -0,0 +1 @@
+DIST polipo-1.1.1.tar.gz 182891 SHA256 a259750793ab79c491d05fcee5a917faf7d9030fb5d15e05b3704e9c9e4ee015 SHA512 7324ca96c19bf9f089146a12dba349ea8cd2669ee02d0599ed6c6116d11eb0e7cef7830d91d16921ba5cdd0ce06e6f831901832326d8118ebe0a565feeec7fb1 WHIRLPOOL 2904a68cc64500dc6207713e255e49eb6d9fb3d73c0ff80c19b71cf1ae6ceee533b625643c7a177924f4d254deae659cdc4137218ae152582da65d0b933f65e3
diff --git a/net-proxy/polipo/files/config b/net-proxy/polipo/files/config
new file mode 100644
index 000000000000..4c9235582594
--- /dev/null
+++ b/net-proxy/polipo/files/config
@@ -0,0 +1,8 @@
+daemonise=false
+diskCacheRoot=/var/cache/polipo/
+proxyAddress=127.0.0.1
+proxyName=localhost
+serverSlots=4
+serverMaxSlots=8
+cacheIsShared=true
+allowedClients=127.0.0.1
diff --git a/net-proxy/polipo/files/polipo.crond-2 b/net-proxy/polipo/files/polipo.crond-2
new file mode 100644
index 000000000000..6b2d609d6d6a
--- /dev/null
+++ b/net-proxy/polipo/files/polipo.crond-2
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Loop through all init.d instances
+for f in /etc/init.d/polipo*; do
+ # only proceed if daemon is running
+ "${f}" --quiet status || continue
+
+ myname="${f#/etc/init.d/polipo}"
+ conffile="/etc/polipo/config${myname}"
+ pidfile="/var/run/polipo${myname}.pid"
+
+ # check if disk cache is enabled
+ polipo -v -c "${CONFFILE}" |
+ awk '$1 ~ /diskCacheRoot/ { if ($3 == "(none)") exit 1}' ||
+ continue
+
+ # Expire old cached objects
+ kill -USR1 $(cat "${pidfile}")
+ sleep 1
+ nice -n 15 su -s "/bin/sh" -c "polipo -c ${conffile} -x" polipo > /dev/null
+ kill -USR2 $(cat "${pidfile}")
+done
diff --git a/net-proxy/polipo/files/polipo.initd-2 b/net-proxy/polipo/files/polipo.initd-2
new file mode 100644
index 000000000000..e24fff01de83
--- /dev/null
+++ b/net-proxy/polipo/files/polipo.initd-2
@@ -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() {
+ need 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 Polipo HTTP proxy"
+ start-stop-daemon --start --user polipo \
+ --background --pidfile "${PIDFILE}" --make-pidfile \
+ --exec /usr/bin/polipo -- -c "${CONFFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Polipo HTTP proxy"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
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/metadata.xml b/net-proxy/polipo/metadata.xml
new file mode 100644
index 000000000000..b6c2d4e1def9
--- /dev/null
+++ b/net-proxy/polipo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>bircoph@gentoo.org</email>
+</maintainer>
+<longdescription>A small and fast caching web proxy designed to be used by one person or a small group of people.</longdescription>
+</pkgmetadata>
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..8882b5d7f7c7
--- /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
+# $Id$
+
+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-1.1.1.ebuild b/net-proxy/polipo/polipo-1.1.1.ebuild
new file mode 100644
index 000000000000..b19d3bfe0092
--- /dev/null
+++ b/net-proxy/polipo/polipo-1.1.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+
+DESCRIPTION="A caching web proxy"
+HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/"
+LICENSE="MIT GPL-2"
+SLOT="0"
+
+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"
+ exeinto /etc/cron.weekly ; newexe "${FILESDIR}/${PN}.crond-2" ${PN}
+
+ 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"
+}
diff --git a/net-proxy/polipo/polipo-9999.ebuild b/net-proxy/polipo/polipo-9999.ebuild
new file mode 100644
index 000000000000..8882b5d7f7c7
--- /dev/null
+++ b/net-proxy/polipo/polipo-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+}