[arch-commits] Commit in thttpd/repos (28 files)
Gaetan Bisson
bisson at nymeria.archlinux.org
Mon Jul 8 11:41:45 UTC 2013
Date: Monday, July 8, 2013 @ 13:41:45
Author: bisson
Revision: 93680
archrelease: copy trunk to community-i686, community-x86_64
Added:
thttpd/repos/community-i686/PKGBUILD
(from rev 93679, thttpd/trunk/PKGBUILD)
thttpd/repos/community-i686/config
(from rev 93679, thttpd/trunk/config)
thttpd/repos/community-i686/discreet.patch
(from rev 93679, thttpd/trunk/discreet.patch)
thttpd/repos/community-i686/forwarded-for.patch
(from rev 93679, thttpd/trunk/forwarded-for.patch)
thttpd/repos/community-i686/getline.patch
(from rev 93679, thttpd/trunk/getline.patch)
thttpd/repos/community-i686/logrotate.d
(from rev 93679, thttpd/trunk/logrotate.d)
thttpd/repos/community-i686/service
(from rev 93679, thttpd/trunk/service)
thttpd/repos/community-x86_64/PKGBUILD
(from rev 93679, thttpd/trunk/PKGBUILD)
thttpd/repos/community-x86_64/config
(from rev 93679, thttpd/trunk/config)
thttpd/repos/community-x86_64/discreet.patch
(from rev 93679, thttpd/trunk/discreet.patch)
thttpd/repos/community-x86_64/forwarded-for.patch
(from rev 93679, thttpd/trunk/forwarded-for.patch)
thttpd/repos/community-x86_64/getline.patch
(from rev 93679, thttpd/trunk/getline.patch)
thttpd/repos/community-x86_64/logrotate.d
(from rev 93679, thttpd/trunk/logrotate.d)
thttpd/repos/community-x86_64/service
(from rev 93679, thttpd/trunk/service)
Deleted:
thttpd/repos/community-i686/PKGBUILD
thttpd/repos/community-i686/config
thttpd/repos/community-i686/discreet.patch
thttpd/repos/community-i686/forwarded-for.patch
thttpd/repos/community-i686/getline.patch
thttpd/repos/community-i686/logrotate.d
thttpd/repos/community-i686/service
thttpd/repos/community-x86_64/PKGBUILD
thttpd/repos/community-x86_64/config
thttpd/repos/community-x86_64/discreet.patch
thttpd/repos/community-x86_64/forwarded-for.patch
thttpd/repos/community-x86_64/getline.patch
thttpd/repos/community-x86_64/logrotate.d
thttpd/repos/community-x86_64/service
--------------------------------------+
/PKGBUILD | 142 +++++++++++++++++++++++++++++++++
/config | 14 +++
/discreet.patch | 68 +++++++++++++++
/forwarded-for.patch | 32 +++++++
/getline.patch | 42 +++++++++
/logrotate.d | 24 +++++
/service | 20 ++++
community-i686/PKGBUILD | 67 ---------------
community-i686/config | 7 -
community-i686/discreet.patch | 34 -------
community-i686/forwarded-for.patch | 16 ---
community-i686/getline.patch | 21 ----
community-i686/logrotate.d | 12 --
community-i686/service | 10 --
community-x86_64/PKGBUILD | 67 ---------------
community-x86_64/config | 7 -
community-x86_64/discreet.patch | 34 -------
community-x86_64/forwarded-for.patch | 16 ---
community-x86_64/getline.patch | 21 ----
community-x86_64/logrotate.d | 12 --
community-x86_64/service | 10 --
21 files changed, 342 insertions(+), 334 deletions(-)
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-i686/PKGBUILD 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,67 +0,0 @@
-# $Id$
-# Maintainer: Gaetan Bisson <bisson at archlinux.org>
-# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
-# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
-
-pkgname=thttpd
-pkgver=2.25b
-pkgrel=10
-pkgdesc='Simple, small, portable, fast, and secure HTTP server'
-url='http://www.acme.com/software/thttpd/'
-license=('custom:BSD')
-arch=('i686' 'x86_64')
-backup=('etc/thttpd.conf')
-source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
- 'forwarded-for.patch'
- 'discreet.patch'
- 'getline.patch'
- 'logrotate.d'
- 'service'
- 'config')
-sha1sums=('cd0e823233ad73e34ee1c9b871b01050feb9db52'
- '1293fbaf83a489c65d6d2b107d797c687233d96a'
- '1e73fca7d9ac2579da317f985c8666a181dc37c1'
- '5ac14035a10b9155d813b363520e9aa74c5d91fc'
- '36ffeefd1675ca4920605b1b5ca32dd5141a8f23'
- '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
- '16640870a69cfc48021ee3acfea7c95834549d46')
-
-prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 -i ../forwarded-for.patch
- patch -p1 -i ../discreet.patch
- patch -p1 -i ../getline.patch
- echo 'mkv video/x-matroska' >> mime_types.txt
-}
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- CPPFLAGS= ./configure --prefix=/usr --mandir=/usr/share/man
- sed \
- -e 's/^CFLAGS =/CFLAGS +=/' \
- -e '/^STATICFLAG =/c STATICFLAG =' \
- -i Makefile */Makefile
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -d "${pkgdir}"/usr/share/man/man{1,8}
- make \
- BINDIR="${pkgdir}"/usr/bin \
- WEBDIR="${pkgdir}"/srv/http \
- MANDIR="${pkgdir}"/usr/share/man \
- WEBGROUP=root install
-
- rm -fr "${pkgdir}"/srv
- chown root:root -R "${pkgdir}"
- chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
-
- install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
- install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
- install -Dm644 ../logrotate.d "${pkgdir}"/etc/logrotate.d/thttpd
-
- install -d "${pkgdir}"/var/log/thttpd
- install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
- head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
-}
Copied: thttpd/repos/community-i686/PKGBUILD (from rev 93679, thttpd/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,71 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
+# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
+
+pkgname=thttpd
+pkgver=2.25b
+pkgrel=11
+pkgdesc='Simple, small, portable, fast, and secure HTTP server'
+url='http://www.acme.com/software/thttpd/'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+backup=('etc/thttpd.conf')
+source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
+ 'forwarded-for.patch'
+ 'discreet.patch'
+ 'getline.patch'
+ 'logrotate.d'
+ 'service'
+ 'config')
+sha1sums=('cd0e823233ad73e34ee1c9b871b01050feb9db52'
+ '1293fbaf83a489c65d6d2b107d797c687233d96a'
+ '1e73fca7d9ac2579da317f985c8666a181dc37c1'
+ '5ac14035a10b9155d813b363520e9aa74c5d91fc'
+ '36ffeefd1675ca4920605b1b5ca32dd5141a8f23'
+ '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
+ '16640870a69cfc48021ee3acfea7c95834549d46')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../forwarded-for.patch
+ patch -p1 -i ../discreet.patch
+ patch -p1 -i ../getline.patch
+ echo 'mkv video/x-matroska' >> mime_types.txt
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ CPPFLAGS= ./configure --prefix=/usr --mandir=/usr/share/man
+ sed \
+ -e 's/^CFLAGS =/CFLAGS +=/' \
+ -e '/^STATICFLAG =/c STATICFLAG =' \
+ -i Makefile */Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -d "${pkgdir}"/usr/share/man/man{1,8}
+ make \
+ BINDIR="${pkgdir}"/usr/bin \
+ WEBDIR="${pkgdir}"/srv/http \
+ MANDIR="${pkgdir}"/usr/share/man \
+ WEBGROUP=root install
+
+ rm -fr "${pkgdir}"/srv
+ chown root:root -R "${pkgdir}"
+ chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
+
+ install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
+ install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
+ install -Dm644 ../logrotate.d "${pkgdir}"/etc/logrotate.d/thttpd
+
+ install -d "${pkgdir}"/var/log/thttpd
+ install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
+ head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+
+ # conflicts with apache
+ mv "${pkgdir}"/usr/bin/htpasswd{,-thttpd}
+ mv "${pkgdir}"/usr/share/man/man1/htpasswd{,-thttpd}.1
+}
Deleted: community-i686/config
===================================================================
--- community-i686/config 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-i686/config 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,7 +0,0 @@
-dir=/srv/http
-vhost
-user=http
-cgipat=**.cgi
-logfile=/var/log/thttpd/thttpd.log
-pidfile=/var/run/thttpd.pid
-charset=utf-8
Copied: thttpd/repos/community-i686/config (from rev 93679, thttpd/trunk/config)
===================================================================
--- community-i686/config (rev 0)
+++ community-i686/config 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,7 @@
+dir=/srv/http
+vhost
+user=http
+cgipat=**.cgi
+logfile=/var/log/thttpd/thttpd.log
+pidfile=/var/run/thttpd.pid
+charset=utf-8
Deleted: community-i686/discreet.patch
===================================================================
--- community-i686/discreet.patch 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-i686/discreet.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,34 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c 2012-04-27 14:24:50.971711600 +0200
-+++ new/libhttpd.c 2012-04-27 14:33:24.559135581 +0200
-@@ -744,7 +744,7 @@
- (void) my_snprintf( buf, sizeof(buf), "\
- <HTML>\n\
- <HEAD><TITLE>%d %s</TITLE></HEAD>\n\
--<BODY BGCOLOR=\"#cc9999\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
-+<BODY>\n\
- <H2>%d %s</H2>\n",
- status, title, status, title );
- add_response( hc, buf );
-@@ -769,11 +769,8 @@
- char buf[1000];
-
- (void) my_snprintf( buf, sizeof(buf), "\
--<HR>\n\
--<ADDRESS><A HREF=\"%s\">%s</A></ADDRESS>\n\
- </BODY>\n\
--</HTML>\n",
-- SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
-+</HTML>\n" );
- add_response( hc, buf );
- }
-
-@@ -2766,7 +2763,7 @@
- (void) fprintf( fp, "\
- <HTML>\n\
- <HEAD><TITLE>Index of %.80s</TITLE></HEAD>\n\
--<BODY BGCOLOR=\"#99cc99\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
-+<BODY>\n\
- <H2>Index of %.80s</H2>\n\
- <PRE>\n\
- mode links bytes last-changed name\n\
Copied: thttpd/repos/community-i686/discreet.patch (from rev 93679, thttpd/trunk/discreet.patch)
===================================================================
--- community-i686/discreet.patch (rev 0)
+++ community-i686/discreet.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,34 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c 2012-04-27 14:24:50.971711600 +0200
++++ new/libhttpd.c 2012-04-27 14:33:24.559135581 +0200
+@@ -744,7 +744,7 @@
+ (void) my_snprintf( buf, sizeof(buf), "\
+ <HTML>\n\
+ <HEAD><TITLE>%d %s</TITLE></HEAD>\n\
+-<BODY BGCOLOR=\"#cc9999\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
++<BODY>\n\
+ <H2>%d %s</H2>\n",
+ status, title, status, title );
+ add_response( hc, buf );
+@@ -769,11 +769,8 @@
+ char buf[1000];
+
+ (void) my_snprintf( buf, sizeof(buf), "\
+-<HR>\n\
+-<ADDRESS><A HREF=\"%s\">%s</A></ADDRESS>\n\
+ </BODY>\n\
+-</HTML>\n",
+- SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
++</HTML>\n" );
+ add_response( hc, buf );
+ }
+
+@@ -2766,7 +2763,7 @@
+ (void) fprintf( fp, "\
+ <HTML>\n\
+ <HEAD><TITLE>Index of %.80s</TITLE></HEAD>\n\
+-<BODY BGCOLOR=\"#99cc99\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
++<BODY>\n\
+ <H2>Index of %.80s</H2>\n\
+ <PRE>\n\
+ mode links bytes last-changed name\n\
Deleted: community-i686/forwarded-for.patch
===================================================================
--- community-i686/forwarded-for.patch 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-i686/forwarded-for.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,16 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c 2005-06-30 03:50:39.000000000 +1000
-+++ new/libhttpd.c 2012-10-24 12:12:17.144560917 +1100
-@@ -2207,6 +2207,12 @@
- if ( strcasecmp( cp, "keep-alive" ) == 0 )
- hc->keep_alive = 1;
- }
-+ else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
-+ {
-+ cp = &buf[16];
-+ cp += strspn( cp, " \t" );
-+ inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
-+ }
- #ifdef LOG_UNKNOWN_HEADERS
- else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
- strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||
Copied: thttpd/repos/community-i686/forwarded-for.patch (from rev 93679, thttpd/trunk/forwarded-for.patch)
===================================================================
--- community-i686/forwarded-for.patch (rev 0)
+++ community-i686/forwarded-for.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,16 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c 2005-06-30 03:50:39.000000000 +1000
++++ new/libhttpd.c 2012-10-24 12:12:17.144560917 +1100
+@@ -2207,6 +2207,12 @@
+ if ( strcasecmp( cp, "keep-alive" ) == 0 )
+ hc->keep_alive = 1;
+ }
++ else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
++ {
++ cp = &buf[16];
++ cp += strspn( cp, " \t" );
++ inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
++ }
+ #ifdef LOG_UNKNOWN_HEADERS
+ else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
+ strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||
Deleted: community-i686/getline.patch
===================================================================
--- community-i686/getline.patch 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-i686/getline.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,21 +0,0 @@
-diff -Nur thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c
---- thttpd-2.25b.orig/extras/htpasswd.c 2001-12-19 02:08:08.000000000 +0200
-+++ thttpd-2.25b/extras/htpasswd.c 2010-04-11 14:43:31.037809054 +0300
-@@ -49,7 +49,7 @@
- while((line[y++] = line[x++]));
- }
-
--static int getline(char *s, int n, FILE *f) {
-+static int get_line(char *s, int n, FILE *f) {
- register int i=0;
-
- while(1) {
-@@ -189,7 +189,7 @@
- strcpy(user,argv[2]);
-
- found = 0;
-- while(!(getline(line,MAX_STRING_LEN,f))) {
-+ while(!(get_line(line,MAX_STRING_LEN,f))) {
- if(found || (line[0] == '#') || (!line[0])) {
- putline(tfp,line);
- continue;
Copied: thttpd/repos/community-i686/getline.patch (from rev 93679, thttpd/trunk/getline.patch)
===================================================================
--- community-i686/getline.patch (rev 0)
+++ community-i686/getline.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,21 @@
+diff -Nur thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c
+--- thttpd-2.25b.orig/extras/htpasswd.c 2001-12-19 02:08:08.000000000 +0200
++++ thttpd-2.25b/extras/htpasswd.c 2010-04-11 14:43:31.037809054 +0300
+@@ -49,7 +49,7 @@
+ while((line[y++] = line[x++]));
+ }
+
+-static int getline(char *s, int n, FILE *f) {
++static int get_line(char *s, int n, FILE *f) {
+ register int i=0;
+
+ while(1) {
+@@ -189,7 +189,7 @@
+ strcpy(user,argv[2]);
+
+ found = 0;
+- while(!(getline(line,MAX_STRING_LEN,f))) {
++ while(!(get_line(line,MAX_STRING_LEN,f))) {
+ if(found || (line[0] == '#') || (!line[0])) {
+ putline(tfp,line);
+ continue;
Deleted: community-i686/logrotate.d
===================================================================
--- community-i686/logrotate.d 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-i686/logrotate.d 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,12 +0,0 @@
-/var/log/thttpd/*log {
- missingok
- postrotate
- test -d /sys/fs/cgroup/systemd && {
- systemctl status thttpd.service | grep -q running &&
- systemctl restart thttpd.service >/dev/null
- } || {
- rc.d list thttpd | grep -q STARTED &&
- /etc/rc.d/thttpd restart >/dev/null
- }
- endscript
-}
Copied: thttpd/repos/community-i686/logrotate.d (from rev 93679, thttpd/trunk/logrotate.d)
===================================================================
--- community-i686/logrotate.d (rev 0)
+++ community-i686/logrotate.d 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,12 @@
+/var/log/thttpd/*log {
+ missingok
+ postrotate
+ test -d /sys/fs/cgroup/systemd && {
+ systemctl status thttpd.service | grep -q running &&
+ systemctl restart thttpd.service >/dev/null
+ } || {
+ rc.d list thttpd | grep -q STARTED &&
+ /etc/rc.d/thttpd restart >/dev/null
+ }
+ endscript
+}
Deleted: community-i686/service
===================================================================
--- community-i686/service 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-i686/service 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,10 +0,0 @@
-[Unit]
-Description=Tiny HTTP Daemon
-
-[Service]
-PIDFile=/run/thttpd.pid
-ExecStart=/usr/bin/thttpd -D -C /etc/thttpd.conf
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
Copied: thttpd/repos/community-i686/service (from rev 93679, thttpd/trunk/service)
===================================================================
--- community-i686/service (rev 0)
+++ community-i686/service 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tiny HTTP Daemon
+
+[Service]
+PIDFile=/run/thttpd.pid
+ExecStart=/usr/bin/thttpd -D -C /etc/thttpd.conf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-x86_64/PKGBUILD 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,67 +0,0 @@
-# $Id$
-# Maintainer: Gaetan Bisson <bisson at archlinux.org>
-# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
-# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
-
-pkgname=thttpd
-pkgver=2.25b
-pkgrel=10
-pkgdesc='Simple, small, portable, fast, and secure HTTP server'
-url='http://www.acme.com/software/thttpd/'
-license=('custom:BSD')
-arch=('i686' 'x86_64')
-backup=('etc/thttpd.conf')
-source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
- 'forwarded-for.patch'
- 'discreet.patch'
- 'getline.patch'
- 'logrotate.d'
- 'service'
- 'config')
-sha1sums=('cd0e823233ad73e34ee1c9b871b01050feb9db52'
- '1293fbaf83a489c65d6d2b107d797c687233d96a'
- '1e73fca7d9ac2579da317f985c8666a181dc37c1'
- '5ac14035a10b9155d813b363520e9aa74c5d91fc'
- '36ffeefd1675ca4920605b1b5ca32dd5141a8f23'
- '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
- '16640870a69cfc48021ee3acfea7c95834549d46')
-
-prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 -i ../forwarded-for.patch
- patch -p1 -i ../discreet.patch
- patch -p1 -i ../getline.patch
- echo 'mkv video/x-matroska' >> mime_types.txt
-}
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- CPPFLAGS= ./configure --prefix=/usr --mandir=/usr/share/man
- sed \
- -e 's/^CFLAGS =/CFLAGS +=/' \
- -e '/^STATICFLAG =/c STATICFLAG =' \
- -i Makefile */Makefile
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -d "${pkgdir}"/usr/share/man/man{1,8}
- make \
- BINDIR="${pkgdir}"/usr/bin \
- WEBDIR="${pkgdir}"/srv/http \
- MANDIR="${pkgdir}"/usr/share/man \
- WEBGROUP=root install
-
- rm -fr "${pkgdir}"/srv
- chown root:root -R "${pkgdir}"
- chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
-
- install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
- install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
- install -Dm644 ../logrotate.d "${pkgdir}"/etc/logrotate.d/thttpd
-
- install -d "${pkgdir}"/var/log/thttpd
- install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
- head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
-}
Copied: thttpd/repos/community-x86_64/PKGBUILD (from rev 93679, thttpd/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,71 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
+# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
+
+pkgname=thttpd
+pkgver=2.25b
+pkgrel=11
+pkgdesc='Simple, small, portable, fast, and secure HTTP server'
+url='http://www.acme.com/software/thttpd/'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+backup=('etc/thttpd.conf')
+source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
+ 'forwarded-for.patch'
+ 'discreet.patch'
+ 'getline.patch'
+ 'logrotate.d'
+ 'service'
+ 'config')
+sha1sums=('cd0e823233ad73e34ee1c9b871b01050feb9db52'
+ '1293fbaf83a489c65d6d2b107d797c687233d96a'
+ '1e73fca7d9ac2579da317f985c8666a181dc37c1'
+ '5ac14035a10b9155d813b363520e9aa74c5d91fc'
+ '36ffeefd1675ca4920605b1b5ca32dd5141a8f23'
+ '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
+ '16640870a69cfc48021ee3acfea7c95834549d46')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../forwarded-for.patch
+ patch -p1 -i ../discreet.patch
+ patch -p1 -i ../getline.patch
+ echo 'mkv video/x-matroska' >> mime_types.txt
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ CPPFLAGS= ./configure --prefix=/usr --mandir=/usr/share/man
+ sed \
+ -e 's/^CFLAGS =/CFLAGS +=/' \
+ -e '/^STATICFLAG =/c STATICFLAG =' \
+ -i Makefile */Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -d "${pkgdir}"/usr/share/man/man{1,8}
+ make \
+ BINDIR="${pkgdir}"/usr/bin \
+ WEBDIR="${pkgdir}"/srv/http \
+ MANDIR="${pkgdir}"/usr/share/man \
+ WEBGROUP=root install
+
+ rm -fr "${pkgdir}"/srv
+ chown root:root -R "${pkgdir}"
+ chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
+
+ install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
+ install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
+ install -Dm644 ../logrotate.d "${pkgdir}"/etc/logrotate.d/thttpd
+
+ install -d "${pkgdir}"/var/log/thttpd
+ install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
+ head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+
+ # conflicts with apache
+ mv "${pkgdir}"/usr/bin/htpasswd{,-thttpd}
+ mv "${pkgdir}"/usr/share/man/man1/htpasswd{,-thttpd}.1
+}
Deleted: community-x86_64/config
===================================================================
--- community-x86_64/config 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-x86_64/config 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,7 +0,0 @@
-dir=/srv/http
-vhost
-user=http
-cgipat=**.cgi
-logfile=/var/log/thttpd/thttpd.log
-pidfile=/var/run/thttpd.pid
-charset=utf-8
Copied: thttpd/repos/community-x86_64/config (from rev 93679, thttpd/trunk/config)
===================================================================
--- community-x86_64/config (rev 0)
+++ community-x86_64/config 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,7 @@
+dir=/srv/http
+vhost
+user=http
+cgipat=**.cgi
+logfile=/var/log/thttpd/thttpd.log
+pidfile=/var/run/thttpd.pid
+charset=utf-8
Deleted: community-x86_64/discreet.patch
===================================================================
--- community-x86_64/discreet.patch 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-x86_64/discreet.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,34 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c 2012-04-27 14:24:50.971711600 +0200
-+++ new/libhttpd.c 2012-04-27 14:33:24.559135581 +0200
-@@ -744,7 +744,7 @@
- (void) my_snprintf( buf, sizeof(buf), "\
- <HTML>\n\
- <HEAD><TITLE>%d %s</TITLE></HEAD>\n\
--<BODY BGCOLOR=\"#cc9999\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
-+<BODY>\n\
- <H2>%d %s</H2>\n",
- status, title, status, title );
- add_response( hc, buf );
-@@ -769,11 +769,8 @@
- char buf[1000];
-
- (void) my_snprintf( buf, sizeof(buf), "\
--<HR>\n\
--<ADDRESS><A HREF=\"%s\">%s</A></ADDRESS>\n\
- </BODY>\n\
--</HTML>\n",
-- SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
-+</HTML>\n" );
- add_response( hc, buf );
- }
-
-@@ -2766,7 +2763,7 @@
- (void) fprintf( fp, "\
- <HTML>\n\
- <HEAD><TITLE>Index of %.80s</TITLE></HEAD>\n\
--<BODY BGCOLOR=\"#99cc99\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
-+<BODY>\n\
- <H2>Index of %.80s</H2>\n\
- <PRE>\n\
- mode links bytes last-changed name\n\
Copied: thttpd/repos/community-x86_64/discreet.patch (from rev 93679, thttpd/trunk/discreet.patch)
===================================================================
--- community-x86_64/discreet.patch (rev 0)
+++ community-x86_64/discreet.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,34 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c 2012-04-27 14:24:50.971711600 +0200
++++ new/libhttpd.c 2012-04-27 14:33:24.559135581 +0200
+@@ -744,7 +744,7 @@
+ (void) my_snprintf( buf, sizeof(buf), "\
+ <HTML>\n\
+ <HEAD><TITLE>%d %s</TITLE></HEAD>\n\
+-<BODY BGCOLOR=\"#cc9999\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
++<BODY>\n\
+ <H2>%d %s</H2>\n",
+ status, title, status, title );
+ add_response( hc, buf );
+@@ -769,11 +769,8 @@
+ char buf[1000];
+
+ (void) my_snprintf( buf, sizeof(buf), "\
+-<HR>\n\
+-<ADDRESS><A HREF=\"%s\">%s</A></ADDRESS>\n\
+ </BODY>\n\
+-</HTML>\n",
+- SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
++</HTML>\n" );
+ add_response( hc, buf );
+ }
+
+@@ -2766,7 +2763,7 @@
+ (void) fprintf( fp, "\
+ <HTML>\n\
+ <HEAD><TITLE>Index of %.80s</TITLE></HEAD>\n\
+-<BODY BGCOLOR=\"#99cc99\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
++<BODY>\n\
+ <H2>Index of %.80s</H2>\n\
+ <PRE>\n\
+ mode links bytes last-changed name\n\
Deleted: community-x86_64/forwarded-for.patch
===================================================================
--- community-x86_64/forwarded-for.patch 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-x86_64/forwarded-for.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,16 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c 2005-06-30 03:50:39.000000000 +1000
-+++ new/libhttpd.c 2012-10-24 12:12:17.144560917 +1100
-@@ -2207,6 +2207,12 @@
- if ( strcasecmp( cp, "keep-alive" ) == 0 )
- hc->keep_alive = 1;
- }
-+ else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
-+ {
-+ cp = &buf[16];
-+ cp += strspn( cp, " \t" );
-+ inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
-+ }
- #ifdef LOG_UNKNOWN_HEADERS
- else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
- strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||
Copied: thttpd/repos/community-x86_64/forwarded-for.patch (from rev 93679, thttpd/trunk/forwarded-for.patch)
===================================================================
--- community-x86_64/forwarded-for.patch (rev 0)
+++ community-x86_64/forwarded-for.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,16 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c 2005-06-30 03:50:39.000000000 +1000
++++ new/libhttpd.c 2012-10-24 12:12:17.144560917 +1100
+@@ -2207,6 +2207,12 @@
+ if ( strcasecmp( cp, "keep-alive" ) == 0 )
+ hc->keep_alive = 1;
+ }
++ else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
++ {
++ cp = &buf[16];
++ cp += strspn( cp, " \t" );
++ inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
++ }
+ #ifdef LOG_UNKNOWN_HEADERS
+ else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
+ strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||
Deleted: community-x86_64/getline.patch
===================================================================
--- community-x86_64/getline.patch 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-x86_64/getline.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,21 +0,0 @@
-diff -Nur thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c
---- thttpd-2.25b.orig/extras/htpasswd.c 2001-12-19 02:08:08.000000000 +0200
-+++ thttpd-2.25b/extras/htpasswd.c 2010-04-11 14:43:31.037809054 +0300
-@@ -49,7 +49,7 @@
- while((line[y++] = line[x++]));
- }
-
--static int getline(char *s, int n, FILE *f) {
-+static int get_line(char *s, int n, FILE *f) {
- register int i=0;
-
- while(1) {
-@@ -189,7 +189,7 @@
- strcpy(user,argv[2]);
-
- found = 0;
-- while(!(getline(line,MAX_STRING_LEN,f))) {
-+ while(!(get_line(line,MAX_STRING_LEN,f))) {
- if(found || (line[0] == '#') || (!line[0])) {
- putline(tfp,line);
- continue;
Copied: thttpd/repos/community-x86_64/getline.patch (from rev 93679, thttpd/trunk/getline.patch)
===================================================================
--- community-x86_64/getline.patch (rev 0)
+++ community-x86_64/getline.patch 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,21 @@
+diff -Nur thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c
+--- thttpd-2.25b.orig/extras/htpasswd.c 2001-12-19 02:08:08.000000000 +0200
++++ thttpd-2.25b/extras/htpasswd.c 2010-04-11 14:43:31.037809054 +0300
+@@ -49,7 +49,7 @@
+ while((line[y++] = line[x++]));
+ }
+
+-static int getline(char *s, int n, FILE *f) {
++static int get_line(char *s, int n, FILE *f) {
+ register int i=0;
+
+ while(1) {
+@@ -189,7 +189,7 @@
+ strcpy(user,argv[2]);
+
+ found = 0;
+- while(!(getline(line,MAX_STRING_LEN,f))) {
++ while(!(get_line(line,MAX_STRING_LEN,f))) {
+ if(found || (line[0] == '#') || (!line[0])) {
+ putline(tfp,line);
+ continue;
Deleted: community-x86_64/logrotate.d
===================================================================
--- community-x86_64/logrotate.d 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-x86_64/logrotate.d 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,12 +0,0 @@
-/var/log/thttpd/*log {
- missingok
- postrotate
- test -d /sys/fs/cgroup/systemd && {
- systemctl status thttpd.service | grep -q running &&
- systemctl restart thttpd.service >/dev/null
- } || {
- rc.d list thttpd | grep -q STARTED &&
- /etc/rc.d/thttpd restart >/dev/null
- }
- endscript
-}
Copied: thttpd/repos/community-x86_64/logrotate.d (from rev 93679, thttpd/trunk/logrotate.d)
===================================================================
--- community-x86_64/logrotate.d (rev 0)
+++ community-x86_64/logrotate.d 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,12 @@
+/var/log/thttpd/*log {
+ missingok
+ postrotate
+ test -d /sys/fs/cgroup/systemd && {
+ systemctl status thttpd.service | grep -q running &&
+ systemctl restart thttpd.service >/dev/null
+ } || {
+ rc.d list thttpd | grep -q STARTED &&
+ /etc/rc.d/thttpd restart >/dev/null
+ }
+ endscript
+}
Deleted: community-x86_64/service
===================================================================
--- community-x86_64/service 2013-07-08 11:40:13 UTC (rev 93679)
+++ community-x86_64/service 2013-07-08 11:41:45 UTC (rev 93680)
@@ -1,10 +0,0 @@
-[Unit]
-Description=Tiny HTTP Daemon
-
-[Service]
-PIDFile=/run/thttpd.pid
-ExecStart=/usr/bin/thttpd -D -C /etc/thttpd.conf
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
Copied: thttpd/repos/community-x86_64/service (from rev 93679, thttpd/trunk/service)
===================================================================
--- community-x86_64/service (rev 0)
+++ community-x86_64/service 2013-07-08 11:41:45 UTC (rev 93680)
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tiny HTTP Daemon
+
+[Service]
+PIDFile=/run/thttpd.pid
+ExecStart=/usr/bin/thttpd -D -C /etc/thttpd.conf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
More information about the arch-commits
mailing list