rpms/thttpd/devel thttpd-2.25b-getline.patch, NONE, 1.1 thttpd.spec, 1.21, 1.22

Matthias Saou thias at fedoraproject.org
Sat Apr 11 10:07:53 UTC 2009


Author: thias

Update of /cvs/extras/rpms/thttpd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11578

Modified Files:
	thttpd.spec 
Added Files:
	thttpd-2.25b-getline.patch 
Log Message:
Include patch to rename conflicting "getline" function (stdio.h).


thttpd-2.25b-getline.patch:

--- NEW FILE thttpd-2.25b-getline.patch ---
diff -Naupr thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c
--- thttpd-2.25b.orig/extras/htpasswd.c	2009-04-11 11:43:28.910251860 +0200
+++ thttpd-2.25b/extras/htpasswd.c	2009-04-11 11:44:00.737126470 +0200
@@ -54,7 +54,7 @@ static void getword(char *word, char *li
     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) {
@@ -225,7 +225,7 @@ int main(int argc, char *argv[]) {
 
     found = 0;
     /* line we get is username:pwd, or possibly any other cruft */
-    while(!(getline(line,MAX_LINE_LEN,f))) {
+    while(!(get_line(line,MAX_LINE_LEN,f))) {
         char *i;
 
         if(found || (line[0] == '#') || (!line[0])) {


Index: thttpd.spec
===================================================================
RCS file: /cvs/extras/rpms/thttpd/devel/thttpd.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- thttpd.spec	10 Apr 2009 13:15:20 -0000	1.21
+++ thttpd.spec	11 Apr 2009 10:07:23 -0000	1.22
@@ -4,7 +4,7 @@
 Summary: Tiny, turbo, throttleable lightweight http server
 Name: thttpd
 Version: 2.25b
-Release: 20%{?dist}
+Release: 21%{?dist}
 License: BSD
 Group: System Environment/Daemons
 URL: http://www.acme.com/software/thttpd/
@@ -15,6 +15,7 @@
 Source11: thttpd_powered_3.png
 Patch0: thttpd-2.25b-CVE-2005-3124.patch
 Patch1: thttpd-2.25b-fixes.patch
+Patch2: thttpd-2.25b-getline.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires: system-logos >= 7.92.1
 Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd
@@ -38,6 +39,7 @@
 %setup -q
 %patch0 -p1 -b .CVE-2005-3124
 %patch1 -p1 -b .fixes
+%patch2 -p1 -b .getline
 # Convert man pages to UTF8
 for man in *.8 */*.8 */*.1; do
     iconv -f iso8859-1 -t utf-8 -o tmp ${man}
@@ -55,8 +57,8 @@
 %{?_without_indexes:      %{__perl} -pi -e 's/#define GENERATE_INDEXES/#undef GENERATE_INDEXES/g' config.h}
 %{!?_with_showversion:    %{__perl} -pi -e 's/#define SHOW_SERVER_VERSION/#undef SHOW_SERVER_VERSION/g' config.h}
 %{!?_with_expliciterrors: %{__perl} -pi -e 's/#define EXPLICIT_ERROR_PAGES/#undef EXPLICIT_ERROR_PAGES/g' config.h}
-# Don't use _smp_mflags since the build fails with it
-%{__make} WEBDIR=%{webroot} STATICFLAG="" \
+# (list SUBDIRS to exclude "cgi-src")
+%{__make} %{?_smp_mflags} SUBDIRS="extras" WEBDIR=%{webroot} STATICFLAG="" \
     CCOPT="%{optflags} -D_FILE_OFFSET_BITS=64"
 
 
@@ -72,8 +74,9 @@
 %{__install} -Dpm 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/thttpd
 %{__install} -Dpm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/thttpd
 
-# Main install
-%{__make} install BINDIR=%{buildroot}%{_sbindir} \
+# Main install (list SUBDIRS to exclude "cgi-src")
+%{__make} install SUBDIRS="extras" \
+    BINDIR=%{buildroot}%{_sbindir} \
     MANDIR=%{buildroot}%{_mandir} \
     WEBDIR=%{buildroot}%{webroot}
 
@@ -155,19 +158,18 @@
 %{_sbindir}/syslogtocern
 %{_sbindir}/thttpd
 %{webroot}/
-# We don't want those default cgi-bin programs
-%exclude %{webroot}/cgi-bin/
 %{_mandir}/man1/thtpasswd.1*
 %{_mandir}/man8/syslogtocern.8*
 %{_mandir}/man8/thttpd.8*
-# Also exclude cgi-bin man pages
-%exclude %{_mandir}/man8/redirect.8*
-%exclude %{_mandir}/man8/ssi.8*
 # Hack to own parent directory for the default "webroot". Remove if needed.
 %dir /var/www
 
 
 %changelog
+* Sat Apr 11 2009 Matthias Saou <http://freshrpms.net/> 2.25b-21
+- Include patch to rename conflicting "getline" function (stdio.h).
+- Fix so that makeweb gets compiled in "build" section with the right WEBDIR.
+
 * Thu Apr  9 2009 Matthias Saou <http://freshrpms.net/> 2.25b-20
 - Fix thttpd-2.25b-CVE-2005-3124.patch (#483733).
 - Remove unwanted .orig files from patches (#484205).
@@ -178,7 +180,8 @@
 - Fix thttpd mode from 555 to 755.
 - Add new init block to the init script (commands and exit status need work).
 - Re-enable indexes by default, it's possible to turn them off with dir modes.
-- Don't build htpasswd as static.
+- Don't even compile the CGI programs instead of just excluding them.
+- No longer build htpasswd as static.
 
 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild




More information about the fedora-extras-commits mailing list