Fix init script to change into configured directory before starting, reported by...
authorDaniel Drake <dsd@gentoo.org>
Wed, 6 Sep 2006 14:31:17 +0000 (14:31 +0000)
committerDaniel Drake <dsd@gentoo.org>
Wed, 6 Sep 2006 14:31:17 +0000 (14:31 +0000)
Package-Manager: portage-2.1.1_rc1-r4

www-servers/thttpd/ChangeLog
www-servers/thttpd/files/digest-thttpd-2.25b-r5 [new file with mode: 0644]
www-servers/thttpd/files/thttpd-2.25/thttpd.init
www-servers/thttpd/thttpd-2.25b-r5.ebuild [new file with mode: 0644]

index 3a5b4385d9e0d20a688a8dab134f55121fa7ff4c..b99a1d7051b26ef2bee325d6d59051ceecaeffb7 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for www-servers/thttpd
 # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/ChangeLog,v 1.14 2006/07/05 18:15:34 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/ChangeLog,v 1.15 2006/09/06 14:31:17 dsd Exp $
+
+*thttpd-2.25b-r5 (06 Sep 2006)
+
+  06 Sep 2006; Daniel Drake <dsd@gentoo.org> files/thttpd-2.25/thttpd.init,
+  -thttpd-2.25b-r4.ebuild, +thttpd-2.25b-r5.ebuild:
+  Fix init script to change into configured directory before starting,
+  reported by Laurence Withers in bug #142047
 
   05 Jul 2006; Stefan Schweizer <genstef@gentoo.org>
   -files/php5.0-stdint.diff,
diff --git a/www-servers/thttpd/files/digest-thttpd-2.25b-r5 b/www-servers/thttpd/files/digest-thttpd-2.25b-r5
new file mode 100644 (file)
index 0000000..f7daceb
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 a0e9cd87455d3a0ea11e5ea7e947adf6 thttpd-2.25b.tar.gz 132363
+RMD160 15020e8d04d27b30c4da3104387a281e35d58025 thttpd-2.25b.tar.gz 132363
+SHA256 4ceaa30ef55702d5cfdffdccd3a2dee8d3090e852c18c7ce8d17d692ad0bf024 thttpd-2.25b.tar.gz 132363
index 9adec9c797a65847bd3360c12102f2eec7322730..0821887c3b21aa07f9b00d26c40e6af4ec86e107 100644 (file)
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/files/thttpd-2.25/thttpd.init,v 1.1 2004/08/08 18:34:03 stuart Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/files/thttpd-2.25/thttpd.init,v 1.2 2006/09/06 14:31:17 dsd Exp $
 
 depend() {
        need net
@@ -13,12 +13,9 @@ start() {
                eend 1 "THTTPD_DOCROOT not set correctly in /etc/conf.d/thttpd"
                exit 1
        fi
-       cd $THTTPD_DOCROOT
-       if [ $? -ne 0 ]; then
-               eend $? "ERROR: cannot change to docroot \"$THTTPD_DOCROOT\""
-       fi
        start-stop-daemon --quiet --start --startas /usr/sbin/thttpd \
-               --pidfile /var/run/thttpd.pid -- ${THTTPD_OPTS}
+               --pidfile /var/run/thttpd.pid --chdir "$THTTPD_DOCROOT" -- \
+                       ${THTTPD_OPTS}
        eend $?
 }
 
diff --git a/www-servers/thttpd/thttpd-2.25b-r5.ebuild b/www-servers/thttpd/thttpd-2.25b-r5.ebuild
new file mode 100644 (file)
index 0000000..9ccefd0
--- /dev/null
@@ -0,0 +1,56 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/thttpd-2.25b-r5.ebuild,v 1.1 2006/09/06 14:31:17 dsd Exp $
+
+inherit eutils flag-o-matic
+
+MY_P="${P%[a-z]*}"
+
+DESCRIPTION="Small and fast multiplexing webserver."
+HOMEPAGE="http://www.acme.com/software/thttpd/"
+SRC_URI="http://www.acme.com/software/thttpd/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ppc x86"
+IUSE="static"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/${MY_P}/fix-insecure-tmp-creation-CVE-2005-3124.diff
+}
+
+src_compile() {
+       ## TODO: what to do with IPv6?
+
+       append-ldflags $(bindnow-flags)
+       use static && append-ldflags -static
+
+       econf || die "econf failed"
+       emake || die "emake failed"
+}
+
+src_install () {
+       dodir /usr/share/man/man1
+       make prefix=${D}/usr \
+               MANDIR=${D}/usr/share/man \
+               WEBGROUP=nogroup \
+               WEBDIR=${D}/var/www/localhost \
+               "$@" install || die "make install failed"
+
+       mv ${D}/usr/sbin/{,th_}htpasswd
+       mv ${D}/usr/share/man/man1/{,th_}htpasswd.1
+
+       newinitd ${FILESDIR}/${MY_P}/thttpd.init thttpd
+       newconfd ${FILESDIR}/${MY_P}/thttpd.confd thttpd
+
+       dodoc README INSTALL TODO
+
+       insinto /etc/thttpd
+       doins ${FILESDIR}/${MY_P}/thttpd.conf.sample
+}
+
+pkg_postinst() {
+       einfo "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd !"
+}