From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/wwwoffle/
Date: Sat, 17 Apr 2021 19:20:29 +0000 (UTC) [thread overview]
Message-ID: <1618687178.d06d581876942cee676bd2034c82b6c6594ce540.conikost@gentoo> (raw)
commit: d06d581876942cee676bd2034c82b6c6594ce540
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 19:09:34 2021 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Apr 17 19:19:38 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d06d5818
net-proxy/wwwoffle: migrate to glep 81
Closes: https://bugs.gentoo.org/781473
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
net-proxy/wwwoffle/wwwoffle-2.9i-r2.ebuild | 104 +++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/net-proxy/wwwoffle/wwwoffle-2.9i-r2.ebuild b/net-proxy/wwwoffle/wwwoffle-2.9i-r2.ebuild
new file mode 100644
index 00000000000..a9ea1c3fbe9
--- /dev/null
+++ b/net-proxy/wwwoffle/wwwoffle-2.9i-r2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Web caching proxy suitable for non-permanent Internet connections"
+HOMEPAGE="https://www.gedanken.org.uk/software/wwwoffle/"
+SRC_URI="https://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="
+ acct-group/wwwoffle
+ acct-user/wwwoffle
+ 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
+
+PATCHES=( "${FILESDIR}"/${PN}-2.9i-define.patch )
+
+src_prepare() {
+ default
+ sed -e 's#$(TAR) xpf #$(TAR) --no-same-owner -xpf #' -i cache/Makefile.in || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with gnutls)
+ $(use_with ipv6)
+ $(use_with zlib)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+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"
+ touch "${D}/var/spool/wwwoffle/search/mnogosearch/wwwoffle-mnogosearch.log"
+ touch "${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 -e "s|Disallow:.*/index|#Disallow: /index|" -i "${D}/var/spool/wwwoffle/html/en/robots.txt" || die
+}
+
+pkg_preinst() {
+ # Changing the user:group to wwwoffle:woffle
+ fowners -R wwwoffle:wwwoffle /var/spool/wwwoffle /etc/wwwoffle
+ sed -e 's/^[# \t]\(run-[gu]id[ \t]*=[ \t]*\)[a-zA-Z0-9]*[ \t]*$/ \1wwwoffle/g' -i "${D}/etc/wwwoffle/wwwoffle.conf" || die
+
+}
+
+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
+
+ [ -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."
+}
next reply other threads:[~2021-04-17 19:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-17 19:20 Conrad Kostecki [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-18 10:28 [gentoo-commits] repo/gentoo:master commit in: net-proxy/wwwoffle/ Arthur Zamarin
2024-11-18 10:28 Arthur Zamarin
2024-11-18 1:43 Sam James
2024-11-17 21:03 Michał Górny
2024-11-17 21:03 Michał Górny
2022-11-03 2:05 Yixun Lan
2021-04-17 19:20 Conrad Kostecki
2017-12-28 15:29 Craig Andrews
2016-05-03 19:17 Austin English
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1618687178.d06d581876942cee676bd2034c82b6c6594ce540.conikost@gentoo \
--to=conikost@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox