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/wwwoffle
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/wwwoffle')
-rw-r--r--net-proxy/wwwoffle/Manifest1
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch20
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle-online.confd10
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle-online.initd30
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle.initd21
-rw-r--r--net-proxy/wwwoffle/metadata.xml9
-rw-r--r--net-proxy/wwwoffle/wwwoffle-2.9i.ebuild107
7 files changed, 198 insertions, 0 deletions
diff --git a/net-proxy/wwwoffle/Manifest b/net-proxy/wwwoffle/Manifest
new file mode 100644
index 000000000000..ef4f69ade2fe
--- /dev/null
+++ b/net-proxy/wwwoffle/Manifest
@@ -0,0 +1 @@
+DIST wwwoffle-2.9i.tgz 1113771 SHA256 e6341a4ec2631dc22fd5209c7e5ffe628a5832ad191d444c56aebc3837eed2ae SHA512 c9e9d67df9a0e40b584916857221a9a728f36a677cba28527f8c2febea1a23379d3b112d96723bf01ec1718a0897d8980715864ac7ef898b2585dd3f01d9a456 WHIRLPOOL 21e66a08e4da68e612a6cde4c1355cef46d2dfdce5cb8d0e3170709ee5abc2d5b3fb91d89581185f131995c38591cf98b25dfb2075f36099b6b2f183358d42e1
diff --git a/net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch b/net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch
new file mode 100644
index 000000000000..3bcc10d761e6
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch
@@ -0,0 +1,20 @@
+--- a/src/wwwoffled.c
++++ b/src/wwwoffled.c
+@@ -15,6 +15,7 @@
+
+ #include "autoconfig.h"
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- a/src/cgi.c
++++ b/src/cgi.c
+@@ -16,6 +16,7 @@
+
+ #include "autoconfig.h"
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/net-proxy/wwwoffle/files/wwwoffle-online.confd b/net-proxy/wwwoffle/files/wwwoffle-online.confd
new file mode 100644
index 000000000000..db8979c209c2
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle-online.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Enter the interface that connects you to the outside world
+# This will correspond to /etc/wwwoffle/init.d/net.${IFACE}
+
+# IMPORTANT: Be sure to run depscan.sh after modifiying IFACE
+
+#IFACE=ppp0
diff --git a/net-proxy/wwwoffle/files/wwwoffle-online.initd b/net-proxy/wwwoffle/files/wwwoffle-online.initd
new file mode 100644
index 000000000000..780708a5ea6a
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle-online.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need wwwoffled
+ use dns
+
+ if [ -n ${IFACE} ];
+ then
+ need net.${IFACE}
+ else
+ ewarn "No IFACE is defined in /etc/conf.d/wwwoffle-online"
+ need net
+ fi
+}
+
+start() {
+ ebegin "Starting wwwoffled-online"
+ wwwoffle -online -c /etc/wwwoffle/wwwoffle.conf
+ wwwoffle -fetch -c /etc/wwwoffle/wwwoffle.conf & > /dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wwwoffled-online"
+ wwwoffle -offline -c /etc/wwwoffle/wwwoffle.conf
+ eend $?
+}
diff --git a/net-proxy/wwwoffle/files/wwwoffle.initd b/net-proxy/wwwoffle/files/wwwoffle.initd
new file mode 100644
index 000000000000..8aa6e104036d
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting wwwoffled"
+ start-stop-daemon --start --quiet --exec /usr/sbin/wwwoffled \
+ -u wwwoffle -- -c /etc/wwwoffle/wwwoffle.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wwwoffled"
+ start-stop-daemon --stop --quiet --name wwwoffled
+ eend $?
+}
diff --git a/net-proxy/wwwoffle/metadata.xml b/net-proxy/wwwoffle/metadata.xml
new file mode 100644
index 000000000000..a4e7c219354f
--- /dev/null
+++ b/net-proxy/wwwoffle/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+<longdescription>The wwwoffled program is a simple proxy server with special features for use
+with dial-up internet links. This means that it is possible to browse web pages and read them
+without having to remain connected.
+</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/wwwoffle/wwwoffle-2.9i.ebuild b/net-proxy/wwwoffle/wwwoffle-2.9i.ebuild
new file mode 100644
index 000000000000..18b187a62da7
--- /dev/null
+++ b/net-proxy/wwwoffle/wwwoffle-2.9i.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils user
+
+DESCRIPTION="Web caching proxy suitable for non-permanent Internet connections"
+HOMEPAGE="http://www.gedanken.org.uk/software/wwwoffle/"
+SRC_URI="http://www.gedanken.org.uk/software/${PN}/download/${P}.tgz"
+
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="gnutls ipv6 zlib"
+
+RDEPEND="gnutls? ( net-libs/gnutls )
+ zlib? ( sys-libs/zlib )"
+DEPEND="dev-lang/perl
+ sys-devel/flex
+ ${RDEPEND}"
+
+# Unsure whether to depend on >=www-misc/htdig-3.1.6-r4 or not
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.9i-define.patch
+ sed -i cache/Makefile.in \
+ -e 's#$(TAR) xpf #$(TAR) --no-same-owner -xpf #' \
+ || die
+}
+
+src_configure() {
+ econf \
+ $(use_with gnutls) \
+ $(use_with ipv6) \
+ $(use_with zlib)
+}
+
+src_install() {
+ default
+
+ # documentation fix
+ # del empty doc dirs
+ rmdir "${D}/usr/doc/${PN}"/{it,nl,ru} || die
+ dodir /usr/share/doc
+ mv "${D}/usr/doc/${PN}" "${D}/usr/share/doc/${PF}" || die
+ rmdir "${D}/usr/doc" || die
+
+ # install the wwwoffled init script
+ newinitd "${FILESDIR}/${PN}.initd" wwwoffled
+ newinitd "${FILESDIR}/${PN}-online.initd" wwwoffled-online
+ newconfd "${FILESDIR}/${PN}-online.confd" wwwoffled-online
+
+ keepdir /var/spool/wwwoffle/{http,outgoing,monitor,lasttime,lastout,local}
+ for number in 1 2 3 4 5 6 7 8 9; do
+ keepdir "/var/spool/wwwoffle/prevtime${number}" "/var/spool/wwwoffle/prevout${number}"
+ done
+
+ # empty dirs are removed during update
+ keepdir \
+ /var/spool/wwwoffle/search/{mnogosearch/db,htdig/tmp,htdig/db-lasttime,htdig/db,namazu/db}
+
+ touch \
+ "${D}/var/spool/wwwoffle/search/htdig/wwwoffle-htdig.log" \
+ "${D}/var/spool/wwwoffle/search/mnogosearch/wwwoffle-mnogosearch.log" \
+ "${D}/var/spool/wwwoffle/search/namazu/wwwoffle-namazu.log"
+
+ # TODO htdig indexing as part of initscripts
+
+ # robots.txt modification - /var/spool/wwwoffle/html/en
+ # - remove Disallow: /index
+ sed -i -e "s|Disallow:.*/index|#Disallow: /index|" "${D}/var/spool/wwwoffle/html/en/robots.txt"
+}
+
+pkg_preinst() {
+ # Add a wwwoffle user
+ enewgroup wwwoffle
+ enewuser wwwoffle -1 -1 /var/spool/wwwoffle wwwoffle
+
+ # Changing the user:group to wwwoffle:woffle
+ fowners -R wwwoffle:wwwoffle /var/spool/wwwoffle /etc/wwwoffle
+ sed -i -e 's/^[# \t]\(run-[gu]id[ \t]*=[ \t]*\)[a-zA-Z0-9]*[ \t]*$/ \1wwwoffle/g' \
+ "${D}/etc/wwwoffle/wwwoffle.conf"
+
+}
+
+pkg_postinst() {
+ # fix permissions for those upgrading
+ for number in 1 2 3 4 5 6 7 8 9;
+ do
+ [ ! -d "${ROOT}/var/spool/wwwoffle/prevtime${number}" ] && \
+ keepdir "${ROOT}/var/spool/wwwoffle/prevtime${number}"
+ [ ! -d "${ROOT}/var/spool/wwwoffle/prevout${number}" ] && \
+ keepdir "${ROOT}/var/spool/wwwoffle/prevout${number}"
+ done
+ chown -R wwwoffle:wwwoffle "${ROOT}/var/spool/wwwoffle" "${ROOT}/etc/wwwoffle"
+
+ [ -f "${T}/stopped" ] && \
+ ewarn "wwwoffled was stopped. /etc/init.d/wwwoffled start to restart AFTER etc-update"
+
+ einfo "wwwoffled should run as an ordinary user now. The run-uid and run-gid should be set"
+ einfo "to \"wwwoffle\" in your /etc/wwwoffle/wwwoffle.conf. Please uncomment this if it hasn't been already"
+
+ einfo "This is for your own security. Otherwise wwwoffle is run as root which is relay bad if"
+ einfo "there is an exploit in this program that allows remote/local users to execute arbitary"
+ einfo "commands as the root user."
+}