/[gentoo-x86]/www-servers/thttpd/thttpd-2.26.4-r2.ebuild
Gentoo

Contents of /www-servers/thttpd/thttpd-2.26.4-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Feb 26 20:04:32 2013 UTC (16 months, 1 week ago) by blueness
Branch: MAIN
Make log read/write by thttpd user only, bug #458896, CVE-2013-0348

(Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/thttpd-2.26.4-r1.ebuild,v 1.10 2013/02/25 21:27:58 zmedico Exp $
4
5 EAPI="4"
6
7 inherit eutils flag-o-matic toolchain-funcs
8
9 MY_P="s${P}"
10
11 DESCRIPTION="Fork of thttpd, a small, fast, multiplexing webserver."
12 HOMEPAGE="http://opensource.dyc.edu/sthttpd"
13 SRC_URI="http://opensource.dyc.edu/pub/sthttpd/${MY_P}.tar.gz"
14 S="${WORKDIR}/${MY_P}"
15
16 LICENSE="BSD GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
19 IUSE=""
20
21 RDEPEND=""
22 DEPEND=""
23
24 WEBROOT="/var/www/localhost"
25
26 THTTPD_USER=thttpd
27 THTTPD_GROUP=thttpd
28 THTTPD_DOCROOT="${EPREFIX}${WEBROOT}/htdocs"
29
30 DOCS=( README TODO )
31
32 pkg_setup() {
33 ebegin "Creating thttpd user and group"
34 enewgroup ${THTTPD_GROUP}
35 enewuser ${THTTPD_USER} -1 -1 -1 ${THTTPD_GROUP}
36 }
37
38 src_prepare () {
39 epatch "${FILESDIR}"/thttpd-fix-world-readable-log.patch
40 }
41
42 src_configure() {
43 econf WEBDIR=${THTTPD_DOCROOT}
44 }
45
46 src_install () {
47 default
48
49 newinitd "${FILESDIR}"/thttpd.init.1 thttpd
50 newconfd "${FILESDIR}"/thttpd.confd.1 thttpd
51
52 insinto /etc/logrotate.d
53 newins "${FILESDIR}/thttpd.logrotate" thttpd
54
55 insinto /etc/thttpd
56 doins "${FILESDIR}"/thttpd.conf.sample
57
58 #move htdocs to docdir, bug #429632
59 docompress -x /usr/share/doc/"${PF}"/htdocs.dist
60 mv "${ED}"${WEBROOT}/htdocs \
61 "${ED}"/usr/share/doc/"${PF}"/htdocs.dist
62 mkdir "${ED}"${WEBROOT}/htdocs
63
64 keepdir ${WEBROOT}/htdocs
65
66 chown root:${THTTPD_GROUP} "${ED}/usr/sbin/makeweb" \
67 || die "Failed chown makeweb"
68 chmod 2751 "${ED}/usr/sbin/makeweb" \
69 || die "Failed chmod makeweb"
70 chmod 755 "${ED}/usr/share/doc/${PF}/htdocs.dist/cgi-bin/printenv" \
71 || die "Failed chmod printenv"
72 }

  ViewVC Help
Powered by ViewVC 1.1.20