]> git.pld-linux.org Git - packages/boa.git/commitdiff
- 0.94.12, Epoch=1 boa-0_94_12-1
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 9 May 2002 17:55:31 +0000 (17:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- updated PLD patch, removed SA_LEN patch (sufficient fix included in PLD patch)
- cleanups, better "doesn't have UID/GID" messages
- added _without_ipv6 bcond (v6 version can listen only on INET6 sockets)

Changed files:
    boa-PLD.patch -> 1.17
    boa-SA_LEN.patch -> 1.2
    boa.spec -> 1.46

boa-PLD.patch
boa-SA_LEN.patch [deleted file]
boa.spec

index ea6e8525974091c268f016e2b70d95a9a244e31a..4f56fb9c9c4631e5b3b4afb5dfb6836da6b6e30f 100644 (file)
@@ -5,7 +5,7 @@
  #ifdef INET6
  #define SOCKADDR sockaddr_storage
 -#define S_FAMILY __s_family
-+#define S_FAMILY __ss_family
++#define S_FAMILY ss_family
  #define SERVER_AF AF_INET6
  #else
  #define SOCKADDR sockaddr_in
  #endif
  
  /***** Various stuff that you may want to tweak, but probably shouldn't *****/
---- ./src/ip.c.org      Sat Dec 22 23:29:05 2001
-+++ ./src/ip.c  Sat Dec 22 23:33:04 2001
-@@ -43,6 +43,7 @@
-     */
-
- #include "boa.h"
-+#include "compat.h"
- #include <arpa/inet.h>          /* inet_ntoa */
-
- /* Binds to the existing server_s, based on the configuration string
-@@ -89,8 +90,6 @@
-                     dest, len, NULL, 0, NI_NUMERICHOST)) {
-         fprintf(stderr, "[IPv6] getnameinfo failed\n");
-         *dest = '\0';
--    } else {
--        conn->local_ip_addr = strdup(host);
-     }
- #ifdef WHEN_DOES_THIS_APPLY
-     if ((s->__ss_family == AF_INET6) &&
---- ./src/request.c.orig       Mon Jul 30 13:48:11 2001
-+++ ./src/request.c    Mon Jul 30 13:49:29 2001
-@@ -191,7 +191,10 @@
-     ascii_sockaddr(&remote_addr, conn->remote_ip_addr, NI_MAXHOST);
-     /* for possible use by CGI programs */
-+    /* the structure doesn't contain port
-     conn->remote_port = ntohs(remote_addr.sin_port);
-+     */
-+    conn->remote_port = 0;
-     status.requests++;
 --- ./src/Makefile.in.orig     Mon Jul 30 13:52:33 2001
 +++ ./src/Makefile.in  Mon Jul 30 14:11:26 2001
 @@ -14,7 +14,8 @@
diff --git a/boa-SA_LEN.patch b/boa-SA_LEN.patch
deleted file mode 100644 (file)
index 6f94f64..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
---- ./src/boa.h.org    Fri Dec 14 03:15:46 2001
-+++ ./src/boa.h        Sat Dec 22 23:52:55 2001
-@@ -25,6 +25,11 @@
- #ifndef _BOA_H
- #define _BOA_H
-+#ifndef SA_LEN
-+#define SA_LEN(x) (((x)->sa_family == AF_INET6)?sizeof(struct sockaddr_in6): \
-+              (((x)->sa_family == AF_INET)?sizeof(struct sockaddr_in):sizeof(struct sockaddr)))
-+#endif
-+
- #include "config.h"
- /* config.h should be 1st include because this sets lots of #defines that
-  are used in other header files
-@@ -187,6 +192,6 @@
- /* ip */
- int bind_server(int server_s, char *server_ip);
- char *ascii_sockaddr(struct SOCKADDR *s, char *dest, int len);
--int net_port(struct SOCKADDR *s);
-+int net_port(struct sockaddr *s);
- #endif
---- ./src/ip.c.org     Sat Dec 22 23:34:29 2001
-+++ ./src/ip.c Sat Dec 22 23:51:28 2001
-@@ -45,6 +45,7 @@
- #include "boa.h"
- #include "compat.h"
- #include <arpa/inet.h>          /* inet_ntoa */
-+#include <linux/socket.h>
- /* Binds to the existing server_s, based on the configuration string
-    in server_ip.  IPv6 version doesn't pay attention to server_ip yet.  */
-@@ -84,7 +85,7 @@
-         *dest = '\0';
-     }
- #ifdef WHEN_DOES_THIS_APPLY
--    if ((s->__ss_family == AF_INET6) &&
-+    if ((s->sa_family == AF_INET6) &&
-         IN6_IS_ADDR_V4MAPPED(&(((struct sockaddr_in6 *) s)->sin6_addr))) {
-         strncpy(dest, dest + 7, NI_MAXHOST);
-     }
-@@ -95,11 +96,11 @@
-     return dest;
- }
--int net_port(struct SOCKADDR *s)
-+int net_port(struct sockaddr *s)
- {
-     int p;
- #ifdef INET6
--    switch (s->__ss_family) {
-+    switch (s->sa_family) {
-     case AF_INET:
-         p = ntohs(((struct sockaddr_in *) s)->sin_port);
-         break;
-@@ -108,7 +109,7 @@
-         break;
-     default:
-         fprintf(stderr, "[IPv6] family isn't supported: %d\n",
--                s->__ss_family);
-+                s->sa_family);
-         p = 0;
-     }
- #else
---- ./src/request.c.org        Sat Dec 22 23:34:29 2001
-+++ ./src/request.c    Sat Dec 22 23:56:36 2001
-@@ -68,13 +68,13 @@
- void get_request(int server_s)
- {
-     int fd;                     /* socket */
--    struct SOCKADDR remote_addr; /* address */
-+    struct sockaddr remote_addr; /* address */
-     int remote_addrlen = sizeof (struct sockaddr_in);
-     request *conn;              /* connection */
-     int len;
-     static int system_bufsize = 0; /* Default size of SNDBUF given by system */
--    remote_addr.S_FAMILY = 0xdead;
-+    remote_addr.sa_family = 0xdead;
-     fd = accept(server_s, (struct sockaddr *) &remote_addr,
-                 &remote_addrlen);
index 1da4f2dfe71cb57e23e3de10bf04b0ccacf91de9..3537fe3b38917015be696458b3ca238aae4335ab 100644 (file)
--- a/boa.spec
+++ b/boa.spec
@@ -1,32 +1,37 @@
+#
+# Conditional build:
+# _without_ipv6        - IPv4-only version (doesn't require IPv6 in kernel)
+#
 Summary:       Boa high speed HTTP server
 Summary(pl):   Boa - szybki serwer HTTP
 Name:          boa
-Version:       0.94.12pre1
+Version:       0.94.12
 Release:       1
+Epoch:         1
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       http://www.boa.org/%{name}-%{version}.tar.gz
 Source1:       %{name}.init
 Patch0:                %{name}-PLD.patch
-Patch1:                %{name}-SA_LEN.patch
 URL:           http://www.boa.org/
-Provides:      httpd
-Provides:      webserver
-Prereq:                sh-utils
-Prereq:                %{_sbindir}/groupadd
-Prereq:                %{_sbindir}/groupdel
-Prereq:                %{_sbindir}/useradd
-Prereq:                %{_sbindir}/userdel
-Prereq:                rc-scripts
-Prereq:                /sbin/chkconfig
+BuildRequires: autoconf
 BuildRequires: flex
 BuildRequires: sgml-tools
-BuildRequires: autoconf
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+PreReq:                rc-scripts
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(post,preun):  /sbin/chkconfig
+Provides:      httpd
+Provides:      webserver
 Obsoletes:     apache
+Obsoletes:     httpd
 Obsoletes:     thttpd
 Obsoletes:     webserver
-Obsoletes:     httpd
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/httpd
 
@@ -46,15 +51,15 @@ systemowych.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 cd src
-CFLAGS="%{rpmcflags} -DINET6"
+CFLAGS="%{rpmcflags} %{!?_without_ipv6:-DINET6}"
 autoconf
 %configure
 %{__make}
-(cd ../docs; make boa.html )
+cd ../docs
+%{__make} boa.html
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -72,13 +77,13 @@ install examples/* $RPM_BUILD_ROOT/home/httpd/cgi-bin/
 install        %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
 install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
-install redhat/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install contrib/redhat/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 
 install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8/
 
 touch $RPM_BUILD_ROOT/var/log/httpd/{access_log,agent_log,error_log,referer_log}
 
-gzip -9nf README src/ChangeLog
+gzip -9nf README ChangeLog
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -86,7 +91,7 @@ rm -rf $RPM_BUILD_ROOT
 %pre
 if [ -n "`getgid http`" ]; then
         if [ "`getgid http`" != "51" ]; then
-                echo "Warning:group http haven't gid=51. Correct this before install boa" 1>&2
+                echo "Error: group http doesn't have gid=51. Correct this before installing boa." 1>&2
                 exit 1
         fi
 else
@@ -95,7 +100,7 @@ else
 fi
 if [ -n "`id -u http 2>/dev/null`" ]; then
         if [ "`id -u http`" != "51" ]; then
-                echo "Warning:user http haven't uid=51. Correct this before install boa" 1>&2
+                echo "Error: user http doesn't have uid=51. Correct this before installing boa." 1>&2
                 exit 1
         fi
 else
@@ -106,14 +111,13 @@ fi
 %postun
 if [ "$1" = "0" ]; then
        echo "Removing user http UID=51"
-       %{_sbindir}/userdel http > /dev/null 2>&1
+       /usr/sbin/userdel http > /dev/null 2>&1
        echo "Removing group http GID=51"
-       %{_sbindir}/groupdel http > /dev/null 2>&1
+       /usr/sbin/groupdel http > /dev/null 2>&1
 fi
 
 %post
-/sbin/chkconfig --add %{name}
-
+/sbin/chkconfig --add boa
 if [ -f /var/lock/subsys/boa ]; then
         /etc/rc.d/init.d/boa restart 1>&2
 else
@@ -130,7 +134,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc *.gz docs/*.html docs/*.png src/*.gz
+%doc *.gz docs/*.html docs/*.png
 %attr(750, root,http) %dir %{_sysconfdir}
 %attr(640, root,http) %config(noreplace) %{_sysconfdir}/*
 %attr(640, root,http) %config(noreplace) /etc/logrotate.d/%{name}
This page took 0.052446 seconds and 4 git commands to generate.