[arch-commits] Commit in thttpd/trunk (5 files)

Gaetan Bisson bisson at archlinux.org
Fri Aug 15 05:09:45 UTC 2014


    Date: Friday, August 15, 2014 @ 07:09:45
  Author: bisson
Revision: 117420

upstream update, default to syslog rather than /var/log/thttpd

Modified:
  thttpd/trunk/PKGBUILD
  thttpd/trunk/config
  thttpd/trunk/discreet.patch
Deleted:
  thttpd/trunk/getline.patch
  thttpd/trunk/logrotate.d

----------------+
 PKGBUILD       |   39 +++++++++++++++++++--------------------
 config         |    3 ---
 discreet.patch |   53 ++++++++++++++++++++++++++++-------------------------
 getline.patch  |   21 ---------------------
 logrotate.d    |    7 -------
 5 files changed, 47 insertions(+), 76 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-08-15 03:31:45 UTC (rev 117419)
+++ PKGBUILD	2014-08-15 05:09:45 UTC (rev 117420)
@@ -4,8 +4,8 @@
 # Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
 
 pkgname=thttpd
-pkgver=2.25b
-pkgrel=11
+pkgver=2.26
+pkgrel=1
 pkgdesc='Simple, small, portable, fast, and secure HTTP server'
 url='http://www.acme.com/software/thttpd/'
 license=('custom:BSD')
@@ -14,44 +14,45 @@
 source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
         'forwarded-for.patch'
         'discreet.patch'
-        'getline.patch'
-        'logrotate.d'
         'service'
         'config')
-sha1sums=('cd0e823233ad73e34ee1c9b871b01050feb9db52'
+sha1sums=('72c37d058312465b607d662796d05ea43bc6df37'
           '1293fbaf83a489c65d6d2b107d797c687233d96a'
-          '1e73fca7d9ac2579da317f985c8666a181dc37c1'
-          '5ac14035a10b9155d813b363520e9aa74c5d91fc'
-          '36ffeefd1675ca4920605b1b5ca32dd5141a8f23'
+          'b954028d4360ad856f7fb1edc8534f0652f33d20'
           '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
-          '16640870a69cfc48021ee3acfea7c95834549d46')
+          '7a6413491b6ba68625d450caa3c6f071af0ca1ac')
 
 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
+	sed \
+		-e 's/^CFLAGS =/CFLAGS +=/' \
+		-e '/^STATICFLAG =/c STATICFLAG =' \
+		-i {*/,}Makefile.in
 }
 
 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
+
+	# ./configure messes up DEFS when FORTIFY_SOURCE=1
+	CPPFLAGS= ./configure \
+		--prefix=/usr \
+		--mandir=/usr/share/man \
+
+	CFLAGS+=" $CPPFLAGS"
 	make
 }
 
 package() {
 	cd "${srcdir}/${pkgname}-${pkgver}"
-	install -d "${pkgdir}"/usr/share/man/man{1,8}
+	install -d "${pkgdir}"/usr/share/man/man1
 	make \
 		BINDIR="${pkgdir}"/usr/bin \
 		WEBDIR="${pkgdir}"/srv/http \
 		MANDIR="${pkgdir}"/usr/share/man \
-		WEBGROUP=root install
+		WEBGROUP=root \
+		install
 
 	rm -fr "${pkgdir}"/srv
 	chown root:root -R "${pkgdir}"
@@ -59,9 +60,7 @@
 
 	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
 

Modified: config
===================================================================
--- config	2014-08-15 03:31:45 UTC (rev 117419)
+++ config	2014-08-15 05:09:45 UTC (rev 117420)
@@ -2,6 +2,3 @@
 vhost
 user=http
 cgipat=**.cgi
-logfile=/var/log/thttpd/thttpd.log
-pidfile=/var/run/thttpd.pid
-charset=utf-8

Modified: discreet.patch
===================================================================
--- discreet.patch	2014-08-15 03:31:45 UTC (rev 117419)
+++ discreet.patch	2014-08-15 05:09:45 UTC (rev 117420)
@@ -1,34 +1,37 @@
 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",
+--- old/libhttpd.c	2014-08-15 11:32:31.040595413 +0900
++++ new/libhttpd.c	2014-08-15 11:34:57.690595931 +0900
+@@ -754,7 +754,7 @@
+     <title>%d %s</title>\n\
+   </head>\n\
+ \n\
+-  <body bgcolor=\"#cc9999\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
++  <body>\n\
+ \n\
+     <h2>%d %s</h2>\n",
  	status, title, status, title );
-     add_response( hc, buf );
-@@ -769,11 +769,8 @@
+@@ -780,14 +780,9 @@
      char buf[1000];
  
      (void) my_snprintf( buf, sizeof(buf), "\
--<HR>\n\
--<ADDRESS><A HREF=\"%s\">%s</A></ADDRESS>\n\
- </BODY>\n\
--</HTML>\n",
+-    <hr>\n\
+-\n\
+-    <address><a href=\"%s\">%s</a></address>\n\
+-\n\
+   </body>\n\
+ \n\
+-</html>\n",
 -	SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
-+</HTML>\n" );
++</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\
+@@ -2798,7 +2793,7 @@
+     <title>Index of %.80s</title>\n\
+   </head>\n\
+ \n\
+-  <body bgcolor=\"#99cc99\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
++  <body>\n\
+ \n\
+     <h2>Index of %.80s</h2>\n\
+ \n\

Deleted: getline.patch
===================================================================
--- getline.patch	2014-08-15 03:31:45 UTC (rev 117419)
+++ getline.patch	2014-08-15 05:09:45 UTC (rev 117420)
@@ -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;

Deleted: logrotate.d
===================================================================
--- logrotate.d	2014-08-15 03:31:45 UTC (rev 117419)
+++ logrotate.d	2014-08-15 05:09:45 UTC (rev 117420)
@@ -1,7 +0,0 @@
-/var/log/thttpd/*log {
-	missingok
-	postrotate
-	systemctl status thttpd.service | grep -q running &&
-	systemctl restart thttpd.service >/dev/null 
-	endscript
-}




More information about the arch-commits mailing list