diff options
author | Alin Năstac <mrness@gentoo.org> | 2007-03-10 13:34:21 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2007-03-10 13:34:21 +0000 |
commit | 16cb1faedde7e7ba2b7bd48bb1940daa7f315a32 (patch) | |
tree | b7e5983982c6d6c4eddc8c9599d649d968dc1e48 /net-proxy | |
parent | fix arguments to llseek() syscall, not libc call #170203 (diff) | |
download | historical-16cb1faedde7e7ba2b7bd48bb1940daa7f315a32.tar.gz historical-16cb1faedde7e7ba2b7bd48bb1940daa7f315a32.tar.bz2 historical-16cb1faedde7e7ba2b7bd48bb1940daa7f315a32.zip |
Remove $ROOT from src_compile (#168039). Version bump with cleaner ebuild code.
Package-Manager: portage-2.1.2.2
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/wwwoffle/ChangeLog | 10 | ||||
-rw-r--r-- | net-proxy/wwwoffle/Manifest | 42 | ||||
-rw-r--r-- | net-proxy/wwwoffle/files/digest-wwwoffle-2.9b | 3 | ||||
-rw-r--r-- | net-proxy/wwwoffle/wwwoffle-2.9-r1.ebuild | 54 | ||||
-rw-r--r-- | net-proxy/wwwoffle/wwwoffle-2.9a.ebuild | 54 | ||||
-rw-r--r-- | net-proxy/wwwoffle/wwwoffle-2.9b.ebuild | 127 |
6 files changed, 204 insertions, 86 deletions
diff --git a/net-proxy/wwwoffle/ChangeLog b/net-proxy/wwwoffle/ChangeLog index 576472478957..9bc1b0b13dc2 100644 --- a/net-proxy/wwwoffle/ChangeLog +++ b/net-proxy/wwwoffle/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-proxy/wwwoffle -# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/wwwoffle/ChangeLog,v 1.24 2006/12/03 20:02:29 corsair Exp $ +# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/wwwoffle/ChangeLog,v 1.25 2007/03/10 13:34:21 mrness Exp $ + +*wwwoffle-2.9b (10 Mar 2007) + + 10 Mar 2007; Alin Năstac <mrness@gentoo.org> wwwoffle-2.9-r1.ebuild, + wwwoffle-2.9a.ebuild, +wwwoffle-2.9b.ebuild: + Remove $ROOT from src_compile (#168039). Version bump with cleaner ebuild code. 03 Dec 2006; Markus Rothe <corsair@gentoo.org> wwwoffle-2.9a.ebuild: Stable on ppc64 diff --git a/net-proxy/wwwoffle/Manifest b/net-proxy/wwwoffle/Manifest index 82eb0e57b93f..32835e4620ad 100644 --- a/net-proxy/wwwoffle/Manifest +++ b/net-proxy/wwwoffle/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX wwwoffle-2.9-gcc41.patch 1728 RMD160 30664073ca03b3e1ef554a7d78e2c91fd75383e4 SHA1 eca8194632a4f525f37b007edfcf4e37ab34f4ce SHA256 9fb9f470964e6e307f11f88c5bb9afae87c1e807aa6bae939d965c5783f783b5 MD5 81b9c9d0eaf6200078fdb1380202de80 files/wwwoffle-2.9-gcc41.patch 1728 RMD160 30664073ca03b3e1ef554a7d78e2c91fd75383e4 files/wwwoffle-2.9-gcc41.patch 1728 @@ -20,18 +23,23 @@ RMD160 f5f0c39adabadbdd74108d455a5b910ce66d92ea files/wwwoffle.initd 539 SHA256 346b3d93113ed56096e8a052e62c3410eeb0936fe08842d64de0bdf0905e2db0 files/wwwoffle.initd 539 DIST wwwoffle-2.9.tgz 1074108 RMD160 f5cbe205c3d0b5ba0cdc23bfa51f185cb8ec1f6c SHA1 51090c2cebc296722538f74a8dcae8d448d80c06 SHA256 ac5e779beae963cf2f3b0dd44f7ed64114a1c15aa2fb6f41ad7db9bc0f096df3 DIST wwwoffle-2.9a.tgz 1071362 RMD160 b183fe881f9824a0dbf11480fc8d98f57cd5a7f8 SHA1 9070d944c609979b9f8d14e38d31536214e2caf4 SHA256 23a469f6b4be39333fdbafb750dff890c0c6e9000144ad98d27c5461dddf9de1 -EBUILD wwwoffle-2.9-r1.ebuild 5327 RMD160 f3b6ac3dccf4e08843b6e308c607417fa42dfa30 SHA1 e593fe3093b0d75eba36c790e463ed1c3439465e SHA256 ede12aba9cba1306084e47be5de6c50129ea26c70fce842027e602420e0a19c8 -MD5 aad35114fefb64324932de3ce271eabd wwwoffle-2.9-r1.ebuild 5327 -RMD160 f3b6ac3dccf4e08843b6e308c607417fa42dfa30 wwwoffle-2.9-r1.ebuild 5327 -SHA256 ede12aba9cba1306084e47be5de6c50129ea26c70fce842027e602420e0a19c8 wwwoffle-2.9-r1.ebuild 5327 -EBUILD wwwoffle-2.9a.ebuild 5250 RMD160 fda6b497a88c2523f6f16680a0b0c5ef14746dcb SHA1 ab78d9edcb8c7d7c32f3a2f80c99de8a12cd68d0 SHA256 339f732032193cb99e21d73a0ab766a96c60298b16a1a28327518549e720a3fd -MD5 009c2d4386b716e0ec24104e3a711aa3 wwwoffle-2.9a.ebuild 5250 -RMD160 fda6b497a88c2523f6f16680a0b0c5ef14746dcb wwwoffle-2.9a.ebuild 5250 -SHA256 339f732032193cb99e21d73a0ab766a96c60298b16a1a28327518549e720a3fd wwwoffle-2.9a.ebuild 5250 -MISC ChangeLog 9037 RMD160 adcabc2d3e82d271a40b633d6050a9e3c95801a4 SHA1 a2d54c9b86fac62c1f3ec88d169d48c3b73242ca SHA256 b660bef32dd6429580476b820ce458df6ceee5081142369819ccc6f5d94f6a8e -MD5 f820031acd9cb000544518adb61ade55 ChangeLog 9037 -RMD160 adcabc2d3e82d271a40b633d6050a9e3c95801a4 ChangeLog 9037 -SHA256 b660bef32dd6429580476b820ce458df6ceee5081142369819ccc6f5d94f6a8e ChangeLog 9037 +DIST wwwoffle-2.9b.tgz 1076009 RMD160 0993246866fe9bafc505c4b10fb1c0f0ce95e5ad SHA1 4a7729f8ddb294356759561ea45d01366eaf0a79 SHA256 85d5650a1446c5f8d0f511345e12caa33693fffd556bee122f66531325d5fbf0 +EBUILD wwwoffle-2.9-r1.ebuild 4759 RMD160 091f6dedea579bfb356b7cd2abaf2df2d716b19b SHA1 0d308c4dddeb152606bb52d21ae0daf2b50ece4e SHA256 fbb593a3a94dbc33fb7249628969b63065b58a916520eadb1c2d61fec8cd9905 +MD5 2e5c8ec8f2018f158dbc4835b43fb7b5 wwwoffle-2.9-r1.ebuild 4759 +RMD160 091f6dedea579bfb356b7cd2abaf2df2d716b19b wwwoffle-2.9-r1.ebuild 4759 +SHA256 fbb593a3a94dbc33fb7249628969b63065b58a916520eadb1c2d61fec8cd9905 wwwoffle-2.9-r1.ebuild 4759 +EBUILD wwwoffle-2.9a.ebuild 4680 RMD160 dde4374b8630cb160b7570d6881ae5c87bf600aa SHA1 c73524ede5343d2715d94fc785ac7118efa22af9 SHA256 569ee6e468fe27a2a689fdd2e3d778b0141f1d728c4094bf8568d22c14069721 +MD5 05b6d8ab40e3a4c9ff8f2adda8b4561d wwwoffle-2.9a.ebuild 4680 +RMD160 dde4374b8630cb160b7570d6881ae5c87bf600aa wwwoffle-2.9a.ebuild 4680 +SHA256 569ee6e468fe27a2a689fdd2e3d778b0141f1d728c4094bf8568d22c14069721 wwwoffle-2.9a.ebuild 4680 +EBUILD wwwoffle-2.9b.ebuild 4235 RMD160 fb0f8eeb27e4cd2a499db6d6deac20f681ee000d SHA1 69a25174033cd8d08403e149be71f91dd8691de5 SHA256 1b6563fa013c130efebdf9c74c786acdc10548ce76e103d06b3e0f4a4bb47896 +MD5 6c7db06471a4e04a3baf8def620e0d15 wwwoffle-2.9b.ebuild 4235 +RMD160 fb0f8eeb27e4cd2a499db6d6deac20f681ee000d wwwoffle-2.9b.ebuild 4235 +SHA256 1b6563fa013c130efebdf9c74c786acdc10548ce76e103d06b3e0f4a4bb47896 wwwoffle-2.9b.ebuild 4235 +MISC ChangeLog 9268 RMD160 e84dd079ba0452ef93533421e1d671f02c69ee54 SHA1 35ef1ddbd87af3a6a4f17bfdf9ef44c3badae40c SHA256 dafb11b5d61b559c7702b0d1d3e70a60ea69ffd87d15224c87460851ee33fcb3 +MD5 c9a326fc9ca93bc0cacc287ebc734be6 ChangeLog 9268 +RMD160 e84dd079ba0452ef93533421e1d671f02c69ee54 ChangeLog 9268 +SHA256 dafb11b5d61b559c7702b0d1d3e70a60ea69ffd87d15224c87460851ee33fcb3 ChangeLog 9268 MISC metadata.xml 496 RMD160 83dcce07fea8707824659b0e9f84d9ea50bed6e8 SHA1 234ff53e9be6079bd54ba6b74e433dfc0ead37d0 SHA256 400cf41c4924baa4c622731d8066b62876c5f3bce7aa51f550057ba2beebe788 MD5 3acc1c195150e4b1528fc86076e4f292 metadata.xml 496 RMD160 83dcce07fea8707824659b0e9f84d9ea50bed6e8 metadata.xml 496 @@ -42,3 +50,13 @@ SHA256 416572f05bfdbe9206351e861e69ed7ec558bda4b9e66dc33305d3da76ce01c7 files/di MD5 d3c25f5c62b3394d386cc183910888c6 files/digest-wwwoffle-2.9a 235 RMD160 8a86e2e2de60661be3323e417cea6ee0374777e1 files/digest-wwwoffle-2.9a 235 SHA256 f0a8dfabdeab4d4818d372a73911c625e22ff2d0558a9df84a4c7277df1078b6 files/digest-wwwoffle-2.9a 235 +MD5 92d43c7123ab207edaeeba3fd4a41ba6 files/digest-wwwoffle-2.9b 235 +RMD160 584bf31b7c0baa32f8958fc295f08c164c177e92 files/digest-wwwoffle-2.9b 235 +SHA256 344a821e89f67f360224e9b557a962eca874da31bab5906862fc2d32be465dfd files/digest-wwwoffle-2.9b 235 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.3 (GNU/Linux) + +iD8DBQFF8rPpJnxX6mF440QRAnwjAKDf0b2e6JDfvTh72SUu5Bq1+CvyPQCdFjXk +D7mbb283cjKQ6EqEEgLUOjc= +=Uol+ +-----END PGP SIGNATURE----- diff --git a/net-proxy/wwwoffle/files/digest-wwwoffle-2.9b b/net-proxy/wwwoffle/files/digest-wwwoffle-2.9b new file mode 100644 index 000000000000..9b38d9dc1cc6 --- /dev/null +++ b/net-proxy/wwwoffle/files/digest-wwwoffle-2.9b @@ -0,0 +1,3 @@ +MD5 492fd8e7f77cfc6103a1bd23093a1e0a wwwoffle-2.9b.tgz 1076009 +RMD160 0993246866fe9bafc505c4b10fb1c0f0ce95e5ad wwwoffle-2.9b.tgz 1076009 +SHA256 85d5650a1446c5f8d0f511345e12caa33693fffd556bee122f66531325d5fbf0 wwwoffle-2.9b.tgz 1076009 diff --git a/net-proxy/wwwoffle/wwwoffle-2.9-r1.ebuild b/net-proxy/wwwoffle/wwwoffle-2.9-r1.ebuild index 107a10aa09a1..6685cf77192d 100644 --- a/net-proxy/wwwoffle/wwwoffle-2.9-r1.ebuild +++ b/net-proxy/wwwoffle/wwwoffle-2.9-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/wwwoffle/wwwoffle-2.9-r1.ebuild,v 1.6 2006/08/31 17:43:55 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/wwwoffle/wwwoffle-2.9-r1.ebuild,v 1.7 2007/03/10 13:34:21 mrness Exp $ inherit eutils @@ -37,29 +37,9 @@ src_unpack() { } src_compile() { - # TODO confdir back to default /etc/wwwoffle - # allows to change config file using web interface. - econf $(use_with zlib) $(use_with gnutls) \ $(use_with ipv6) || die "econf failed" emake || die "emake failed" - - if [ -f "${ROOT}/etc/wwwoffle.conf" ] ; then - einfo "Upgrading current configuration file" - cp "${ROOT}/etc/wwwoffle.conf" conf/wwwoffle.conf - conf/upgrade-config.pl conf/wwwoffle.conf - - # Hack to stop regeneration of config file - touch conf/conf-file - - einfo "Changing the default user (and group) to wwwoffle" - sed -i -e 's/\(run-[gu]id\)[ \t]*=[ \t]*[a-zA-Z0-9]*[ \t]*$/\1 = wwwoffle/g' \ - conf/wwwoffle.conf - else - einfo "Changing the default user (and group) to wwwoffle" - sed -i -e 's/#\(run-[gu]id\)[ \t]*=[ \t]*[a-zA-Z0-9]*[ \t]*$/\1 = wwwoffle/g' \ - conf/wwwoffle.conf.template - fi } src_install() { @@ -71,11 +51,6 @@ src_install() { dodir /usr/share/doc mv "${D}/usr/doc/wwwoffle" "${D}/usr/share/doc/${PF}" - #Updated configuration file - #if [ -f "${ROOT}/etc/wwwoffle.conf" ]; then - # mv "${D}/etc/wwwoffle.conf" "${D}/etc/wwwoffle.conf.updated" - #fi - # install the wwwoffled init script newinitd "${FILESDIR}/${PN}.initd" wwwoffled newinitd "${FILESDIR}/${PN}-online.initd" wwwoffled-online @@ -112,15 +87,22 @@ pkg_preinst() { enewgroup wwwoffle enewuser wwwoffle -1 -1 /var/spool/wwwoffle wwwoffle - # TODO maybe rootjail ${ROOT} - source /etc/init.d/functions.sh - if [ -L "${svcdir}/started/wwwoffled" ]; then - einfo "The wwwoffled init script is running. I'll stop it, merge the new files and - restart the script." - /etc/init.d/wwwoffled stop - # Just to be sure... - start-stop-daemon --stop --quiet --name wwwoffled - touch "${T}/stopped" + # 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" + + # Stop the service if it is started + if [ "${ROOT}" = "/" ] ; then + source /etc/init.d/functions.sh + if [ -L "${svcdir}/started/wwwoffled" ]; then + einfo "The wwwoffled init script is running. I'll stop it, merge the new files and + restart the script." + /etc/init.d/wwwoffled stop + # Just to be sure... + start-stop-daemon --stop --quiet --name wwwoffled + touch "${T}/stopped" + fi fi } diff --git a/net-proxy/wwwoffle/wwwoffle-2.9a.ebuild b/net-proxy/wwwoffle/wwwoffle-2.9a.ebuild index a9328f04ad0c..183e7cdbc8dd 100644 --- a/net-proxy/wwwoffle/wwwoffle-2.9a.ebuild +++ b/net-proxy/wwwoffle/wwwoffle-2.9a.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/wwwoffle/wwwoffle-2.9a.ebuild,v 1.4 2006/12/03 20:02:29 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/wwwoffle/wwwoffle-2.9a.ebuild,v 1.5 2007/03/10 13:34:21 mrness Exp $ inherit eutils @@ -35,29 +35,9 @@ src_unpack() { } src_compile() { - # TODO confdir back to default /etc/wwwoffle - # allows to change config file using web interface. - econf $(use_with zlib) $(use_with gnutls) \ $(use_with ipv6) || die "econf failed" emake || die "emake failed" - - if [ -f "${ROOT}/etc/wwwoffle.conf" ] ; then - einfo "Upgrading current configuration file" - cp "${ROOT}/etc/wwwoffle.conf" conf/wwwoffle.conf - conf/upgrade-config.pl conf/wwwoffle.conf - - # Hack to stop regeneration of config file - touch conf/conf-file - - einfo "Changing the default user (and group) to wwwoffle" - sed -i -e 's/\(run-[gu]id\)[ \t]*=[ \t]*[a-zA-Z0-9]*[ \t]*$/\1 = wwwoffle/g' \ - conf/wwwoffle.conf - else - einfo "Changing the default user (and group) to wwwoffle" - sed -i -e 's/#\(run-[gu]id\)[ \t]*=[ \t]*[a-zA-Z0-9]*[ \t]*$/\1 = wwwoffle/g' \ - conf/wwwoffle.conf.template - fi } src_install() { @@ -69,11 +49,6 @@ src_install() { dodir /usr/share/doc mv "${D}/usr/doc/wwwoffle" "${D}/usr/share/doc/${PF}" - #Updated configuration file - #if [ -f "${ROOT}/etc/wwwoffle.conf" ]; then - # mv "${D}/etc/wwwoffle.conf" "${D}/etc/wwwoffle.conf.updated" - #fi - # install the wwwoffled init script newinitd "${FILESDIR}/${PN}.initd" wwwoffled newinitd "${FILESDIR}/${PN}-online.initd" wwwoffled-online @@ -110,15 +85,22 @@ pkg_preinst() { enewgroup wwwoffle enewuser wwwoffle -1 -1 /var/spool/wwwoffle wwwoffle - # TODO maybe rootjail ${ROOT} - source /etc/init.d/functions.sh - if [ -L "${svcdir}/started/wwwoffled" ]; then - einfo "The wwwoffled init script is running. I'll stop it, merge the new files and - restart the script." - /etc/init.d/wwwoffled stop - # Just to be sure... - start-stop-daemon --stop --quiet --name wwwoffled - touch "${T}/stopped" + # 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" + + # Stop the service if it is started + if [ "${ROOT}" = "/" ] ; then + source /etc/init.d/functions.sh + if [ -L "${svcdir}/started/wwwoffled" ]; then + einfo "The wwwoffled init script is running. I'll stop it, merge the new files and + restart the script." + /etc/init.d/wwwoffled stop + # Just to be sure... + start-stop-daemon --stop --quiet --name wwwoffled + touch "${T}/stopped" + fi fi } diff --git a/net-proxy/wwwoffle/wwwoffle-2.9b.ebuild b/net-proxy/wwwoffle/wwwoffle-2.9b.ebuild new file mode 100644 index 000000000000..1ddcaaddf5d1 --- /dev/null +++ b/net-proxy/wwwoffle/wwwoffle-2.9b.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/wwwoffle/wwwoffle-2.9b.ebuild,v 1.1 2007/03/10 13:34:21 mrness Exp $ + +inherit eutils + +DESCRIPTION="wwwoffle = WWW Offline Explorer, an adv. caching proxy especially suitable for nonpermanent (e.g. dialup) Internet connections" +SRC_URI="http://www.gedanken.demon.co.uk/download-wwwoffle/${P}.tgz" +HOMEPAGE="http://www.gedanken.demon.co.uk/wwwoffle" + +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_unpack() { + unpack ${A} + + sed -i -e 's#$(TAR) xpf #$(TAR) --no-same-owner -xpf #' \ + "${S}/cache/Makefile.in" +} + +src_compile() { + econf $(use_with zlib) \ + $(use_with gnutls) \ + $(use_with ipv6) || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + # documentation fix + # del empty doc dirs + rmdir "${D}/usr/doc/${PN}"/{it,nl,ru} + dodir /usr/share/doc + mv "${D}/usr/doc/wwwoffle" "${D}/usr/share/doc/${PF}" + + # 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" + + rmdir "${D}/usr/doc" +} + +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" + + # Stop the service if it is started + if [ "${ROOT}" = "/" ] ; then + source /etc/init.d/functions.sh + if [ -L "${svcdir}/started/wwwoffled" ]; then + einfo "The wwwoffled init script is running. I'll stop it, merge the new files and + restart the script." + /etc/init.d/wwwoffled stop + # Just to be sure... + start-stop-daemon --stop --quiet --name wwwoffled + touch "${T}/stopped" + fi + fi +} + +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." + + if [ -f "${ROOT}/etc/wwwoffle.conf" ]; then + ewarn "Configuration file is /etc/wwwoffle/wwwoffle.conf now" + ewarn "Suggest you move ${ROOT}etc/wwwoffle.conf" + fi + + # if htdig - run script for full database index + # TODO +} |