diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2015-07-27 06:59:31 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2015-07-27 08:27:44 +0000 |
commit | 7180e3fee7185e6fafffe5e750173838cec0c430 (patch) | |
tree | 9eda469ca9bd4374cb3df5604cca93bd9e63cdf3 /testing/thttpd | |
parent | fe8c11c1954834f77fb17887c939b2866cde74a9 (diff) | |
download | aports-7180e3fee7185e6fafffe5e750173838cec0c430.tar.bz2 aports-7180e3fee7185e6fafffe5e750173838cec0c430.tar.xz |
testing/thttpd: upgrade to 2.26. Now it belongs to www-data, remove setuid from makeweb
Diffstat (limited to 'testing/thttpd')
-rw-r--r-- | testing/thttpd/APKBUILD | 44 | ||||
-rw-r--r-- | testing/thttpd/thttpd-makeweb-notsuid.patch | 12 | ||||
-rw-r--r-- | testing/thttpd/thttpd-webgroup.patch | 13 | ||||
-rw-r--r-- | testing/thttpd/thttpd.conf | 2 | ||||
-rw-r--r-- | testing/thttpd/thttpd.initd | 3 | ||||
-rw-r--r-- | testing/thttpd/thttpd.post-install | 4 | ||||
-rw-r--r-- | testing/thttpd/thttpd.pre-install | 6 |
7 files changed, 57 insertions, 27 deletions
diff --git a/testing/thttpd/APKBUILD b/testing/thttpd/APKBUILD index 3c80b7a9c5..bd067e7382 100644 --- a/testing/thttpd/APKBUILD +++ b/testing/thttpd/APKBUILD @@ -1,7 +1,7 @@ # Contributor: z3bra <willy at mailoo dot org> # Maintainer: pkgname=thttpd -pkgver=2.25b +pkgver=2.26 pkgrel=0 pkgdesc="Simple, small, portable, fast, adn secure HTTP server" url="http://www.acme.com/software/thttpd" @@ -17,9 +17,9 @@ source="http://www.acme.com/software/$pkgname/$pkgname-$pkgver.tar.gz thttpd.confd thttpd.conf thttpd.logrotated - discreet.patch + thttpd-webgroup.patch forwarded-for.patch - getline.patch + thttpd-makeweb-notsuid.patch " _builddir=$srcdir/$pkgname-$pkgver @@ -54,7 +54,7 @@ package() { BINDIR="$pkgdir"/usr/sbin \ WEBDIR="$pkgdir"/var/www/http \ MANDIR="$pkgdir"/usr/share/man \ - WEBGROUP=root install || return 1 + WEBGROUP=www-data install || return 1 rm -rf "$pkgdir"/var/www/http/* @@ -71,29 +71,35 @@ package() { install -d "$pkgdir"/usr/share/licenses/"$pkgname" head -n 26 thttpd.c > \ "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE || return 1 + mkdir -p "$pkgdir/usr/share/doc/$pkgname" + cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF + To use makeweb, please set suid to makeweb binary with: + ------------------------------------------------------- + chmod 2755 /usr/sbin/makeweb +EOF } -md5sums="156b249b3b0bcd48b06badd2db0d56c5 thttpd-2.25b.tar.gz -e73c541527e4784e1e234bab896fbe99 thttpd.initd +md5sums="0e2f14a878cc722f35506d791d5c3198 thttpd-2.26.tar.gz +0e5239ab3c23753fa288d53b4eb28241 thttpd.initd 7e53378c3ab359beee6f1b3198bdb353 thttpd.confd -1828991ab3b4836247c94a7deb8947fa thttpd.conf +fb88ae8b618a34431ec6d3608e06cc88 thttpd.conf e29e38de0195bdbacec8daaa016cabfa thttpd.logrotated -055692a3037c35addc13e897ff8e5a02 discreet.patch +5677f99962af531b65e4f58198b84fc0 thttpd-webgroup.patch 9976ae6a2bb06b076a100c05235a72b8 forwarded-for.patch -bf80d29e633eb0f6e3934649f9e010b2 getline.patch" -sha256sums="07719b08b1cff6a21c08697a7bcb4395425b07ee753106262fb62a03a7d32360 thttpd-2.25b.tar.gz -f20245ba64135f6a29cc3380d1940e2052e89edd56b12c4457009846b051bd15 thttpd.initd +a810cf21f0caf648856ed5851023e794 thttpd-makeweb-notsuid.patch" +sha256sums="4693d7c421fe1bd25553a8891cbb447d2bab3e0df01c029dadd79596b9bdb4c5 thttpd-2.26.tar.gz +e132cbcd0f78313e4406438385143bca00ef22c164286429fd2f6613e5f1d9bf thttpd.initd 25f55ad96c73d8c22117dd6ef331e85fed5a3ba78b4b0ec329832e82a4159e4e thttpd.confd -7fd376775c131474e123800b625fc43784c279b875061f4d5e3343742474355c thttpd.conf +51e5f3cea217be5cc36b5f5b5084e2bf4d2611f6577ca98c98ed3a69ac5bebf2 thttpd.conf 774ac53a3ea2b9ccf08b8ce75bf0253f72e25054ed0cd0bae4e257526248376c thttpd.logrotated -da061d265b41d85aa5036dc439225e3fe709599b881e44ed8837a3c00fc54e7f discreet.patch +04cab749b869a38d34bafb1c638c4d57bf561e6f64dde7dd0a3da5df37ce7a5d thttpd-webgroup.patch eb3be98c65b8f9297867205772cd9939f526ac1c2227c24ba7e8ff754dd2216c forwarded-for.patch -ab054c6178c91213293e2ad5eacec4d76a43c2140cbd4e516480acba9146e1d5 getline.patch" -sha512sums="52cbf3eb95ad868b60af2bd45620142cc8c6a80c3ff31ca853640a944d38594ac53e060b950bd028b3be49da97db5e10b41073d21b3f49b73a54ee01349a6b1d thttpd-2.25b.tar.gz -eeb042150c3b29b89c667cb8afc92d026e6b6cf772409dfb235fbd45823651b5e755cd93e3ae88304d77f171de8b3c46d558ac9c35eb9d2b640151b1761c89b7 thttpd.initd +96ea2ac4d8dabb605caa22fa0591e53bbf57cead2d5311dd7c16e56b46463b8a thttpd-makeweb-notsuid.patch" +sha512sums="c42942e010e0f4e3ef362e675073353081b27b04fe9f64a6cef7ff9c51683bca87876916a35e3a75a4eec25ad3d14fcf571be5e2bd70adaeadd6b6950be0090a thttpd-2.26.tar.gz +bc7416986e135ade401721708060b94ce3bb885a3aa40893d68abc1b305c13609e086fbb48f8db11656902c294bf558a81814013ef3a14d73f0c5f0df0decb7d thttpd.initd 9b4309c2bc88d11ce71d40ab813e9cbe78e4ec7368e3e98f35da1d5a324ee0630a6892b43f58f84490e2b534a573673b106a9d5dd406fedefb2a4c664e455aa1 thttpd.confd -691c4a4d455f9043ea2a188b8271db431924bd24d5083d153b422ff6e8fd99d43129a1d6af7b2f6515a52d4ee0e172848b4490b4cbe6337decd0c2332ab8fdd3 thttpd.conf +f1b86a554177a5f2a343abb4aac6fa9bc06dafd7cabdaf8329e6478bcc296f39a56d839e85ac4bf77b682e6e9cdbbe844732dfac034d0d775b65cdeaefc4349e thttpd.conf 5b2800825583e93cf4be76e71d2840b9894c1779a810d562a0b6145cae0c7504dadfdc1e844f1611a48cca3b4518d41b47e41a68f33043d58ffde85f1e56e3f3 thttpd.logrotated -63f1f8cce5f29977dafd9dd364abc0e34bbf7049aef3a570efb96454fcf69fe6143d88e49640a52c58cbb6ad30d11dc2db5bd661fd1a6a26061ccc6913b1c117 discreet.patch +349721da9e670ca666891f98ca338ae0041c09b353fc42bdd87015803f0b668478be8e48f36d5b56b5e172d3a7b262bf4a71c9619607a068e41c2bc292bde2be thttpd-webgroup.patch 02c079ca104f2358cd20756082657dca96f7a88cbeb611de81504f1581c5e085a7a2765ec55b6e0ae1948803afced85e8a45fc6deb2fef1ec5ba1ba96ce68b4b forwarded-for.patch -503294520bd62170eae264ff1128f2b74d3d036d6c51b426e0a482f5d4a431f681f5076e6173ed04ee31065c042062759a3cc9208cf5c4a9c756ad806600635e getline.patch" +1138a827049f73b43ce142c914fad0670bcd4577de16485ade024314c616056ab6789897663d8b6592331354d44065eae7aa712e20f5c930a80513448416fa17 thttpd-makeweb-notsuid.patch" diff --git a/testing/thttpd/thttpd-makeweb-notsuid.patch b/testing/thttpd/thttpd-makeweb-notsuid.patch new file mode 100644 index 0000000000..a1e0fa143f --- /dev/null +++ b/testing/thttpd/thttpd-makeweb-notsuid.patch @@ -0,0 +1,12 @@ +diff --git a/extras/Makefile.in b/extras/Makefile.in +index a29780f..3e19a79 100644 +--- a/extras/Makefile.in ++++ b/extras/Makefile.in +@@ -69,7 +69,6 @@ install: all + rm -f $(BINDIR)/makeweb $(BINDIR)/htpasswd $(BINDIR)/syslogtocern + cp makeweb $(BINDIR)/makeweb + chgrp $(WEBGROUP) $(BINDIR)/makeweb +- chmod 2755 $(BINDIR)/makeweb + cp htpasswd $(BINDIR)/htpasswd + cp syslogtocern $(BINDIR)/syslogtocern + rm -f $(MANDIR)/man1/makeweb.1 diff --git a/testing/thttpd/thttpd-webgroup.patch b/testing/thttpd/thttpd-webgroup.patch new file mode 100644 index 0000000000..fb493c88f4 --- /dev/null +++ b/testing/thttpd/thttpd-webgroup.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index ddd5f9a..d40fd6a 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -40,7 +40,7 @@ WEBDIR = $(prefix)/www + # CONFIGURE: The group that the web directory belongs to. This is so that + # the makeweb program can be installed set-group-id to that group, and make + # subdirectories. If you're not going to use makeweb, ignore this. +-WEBGROUP = www ++WEBGROUP = www-data + + # CONFIGURE: Directory for CGI executables. + CGIBINDIR = $(WEBDIR)/cgi-bin diff --git a/testing/thttpd/thttpd.conf b/testing/thttpd/thttpd.conf index 3df0a660b0..3623b89899 100644 --- a/testing/thttpd/thttpd.conf +++ b/testing/thttpd/thttpd.conf @@ -1,7 +1,7 @@ dir=/var/www/http vhost chroot -user=nobody +user=thttpd cgipat=**.cgi logfile=/var/log/thttpd/thttpd.log pidfile=/var/run/thttpd.pid diff --git a/testing/thttpd/thttpd.initd b/testing/thttpd/thttpd.initd index bd869489ee..5ba5247b6d 100644 --- a/testing/thttpd/thttpd.initd +++ b/testing/thttpd/thttpd.initd @@ -1,5 +1,4 @@ -#!/sbin/runscript - +#!/sbin/openrc-run # init.d file for thttpd name=thttpd diff --git a/testing/thttpd/thttpd.post-install b/testing/thttpd/thttpd.post-install index 0586fcd5c5..039e4d0069 100644 --- a/testing/thttpd/thttpd.post-install +++ b/testing/thttpd/thttpd.post-install @@ -1,4 +1,2 @@ #!/bin/sh - -# add something which happends after install - +exit 0 diff --git a/testing/thttpd/thttpd.pre-install b/testing/thttpd/thttpd.pre-install index 46079e0c04..1094a4b69c 100644 --- a/testing/thttpd/thttpd.pre-install +++ b/testing/thttpd/thttpd.pre-install @@ -1,4 +1,6 @@ #!/bin/sh -# add something which happends before install - +addgroup -g 82 -S www-data 2>/dev/null +adduser -S -G thttpd -H -h /var/www/localhost/htdocs -s /sbin/nologin \ + -D thttpd 2>/dev/null +addgroup thttpd www-data 2>/dev/null |