Name: globule Version: 1.3.2 %global apache 2.0.58 Release: 1 License: Apache Software License for Apache / GPL for Globule Group: System Environment/Daemons Summary: Apache + Globule combined %description This is a bundled package of Apache and Globule. %package -n patched-httpd License: Apache Software License Group: System Environment/Daemons URL: http://httpd.apache.org/ Distribution: Vrije Universiteit Software Packaging Vendor: Apache Software Foundation Packager: Berry van Halderen Summary: Apache HTTP Server Source: http://www.apache.org/dist/httpd/httpd-%{apache}.tar.gz Source1: init.d_httpd # Patch: udp-requests-httpd-%{apache}.patch # Prereq: openldap-devel, db3-devel, expat-devel, findutils, perl, pkgconfig # Requires: gawk, /usr/share/magic.mime, /usr/bin/find, openldap # Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv # Prereq: sh-utils, textutils, /usr/sbin/useradd Icon: apache.xpm Provides: webserver, httpd-mmn, libapr.so.0, libaprutil.so.0 Conflicts: thttpd, httpd Obsoletes: apache, secureweb, mod_dav, httpd-manual %description -n patched-httpd Apache is a powerful, full-featured, efficient, and freely-available Web server. Apache is also the most popular Web server on the Internet. This version is patched to support UDP requests, used to respond to DNS queries. This facility is used by Globule, but is disabled by default so this patched Apache runs the very same way an unpatched version would. %post -n patched-httpd ldconfig groupadd -f -g 48 apache /usr/sbin/useradd -M -u 48 -g apache -s /sbin/nologin -d /var/www -c "Apache" apache 2> /dev/null || : chkconfig --add httpd chkconfig httpd on %preun -n patched-httpd if [ $1 = 0 ]; then /sbin/service httpd stop > /dev/null 2>&1 || : fi /usr/sbin/apachectl stop || : chkconfig --del httpd %postun -n patched-httpd ldconfig %package -n mod-globule Requires: patched-httpd >= %{apache} Copyright: GPL Group: System Environment/Daemons URL: http://www.globule.org/ Distribution: Vrije Universiteit Software Packaging Vendor: Vrije Universiteit, the Netherlands Packager: Berry van Halderen Summary: An Apache2 module providing transparent replication of web pages. Source2: ftp://globule.revolutionware.net/pub/globule/mod-globule-%{version}.tar.gz %description -n mod-globule Globule is a platform which allows a Web server to automatically replicate its documents to other Web servers, to maintain replicas consistent using adaptive replication policies, and to transparently redirect users to the best replica. It does so by negociating resource allocation with remote servers in a peer-to-peer fashion. %post -n mod-globule #ipaddr=`ifconfig eth0 | sed -e 's/.*inet addr:\([0-9\.]*\).*/\1/p' -e d` #echo >&2 "Registering $ipaddr.." #wget -o /dev/null "http://globule.revolutionware.net/htbin/globule-register-test.cgi?$ipaddr" cat <> /etc/httpd/conf/httpd-std.conf LoadModule globule_module modules/mod_globule.so MaxDiskSpace 64 MaxMetaDocsInMemory 10000 END %prep %setup -c globule-%{version} %setup -c globule-%{version} -D -T -b 2 cp $RPM_SOURCE_DIR/init.d_httpd $RPM_BUILD_DIR/globule-%{version}/httpd-%{apache}/init.d_httpd cd $RPM_BUILD_DIR/globule-%{version}/httpd-%{apache} ; patch -s -p0 < ../mod-globule-%{version}/apache/udp-requests-httpd-2.0.50.patch %build cd httpd-%{apache} ./configure --prefix=/usr \ --bindir=/usr/bin --sbindir=/usr/sbin \ --libexecdir=/usr/lib/httpd/modules --sysconfdir=/etc/httpd/conf \ --datadir=/var/www --mandir=/usr/share/man \ --includedir=/usr/include/httpd --oldincludedir=/usr/include/httpd make make install ; # This sucks but we want to combine the package cd ../mod-globule-%{version} ./configure --with-apache=/usr --disable-debug --enable-optimize \ --enable-dns-redirection --enable-globuleadm make %install rm -rf /etc/httpd /var/www groupadd -f -g 48 apache ( useradd -M -u 48 -g apache -s /sbin/nologin -d /var/www -c Apache apache ;\ exit 0 ) 2>/dev/null if [ \! -d /etc/httpd ] ; then mkdir /etc/httpd ; fi cd httpd-%{apache} make install cp init.d_httpd /etc/rc.d/init.d/httpd chown root:root /etc/rc.d/init.d/httpd chmod 755 /etc/rc.d/init.d/httpd ln -s ../../var/log/httpd /etc/httpd/logs ln -s ../../usr/lib/httpd/modules /etc/httpd/modules ln -s ../../var/run /etc/httpd/run mv /var/www/htdocs /var/www/html if [ \! -d /var/log/httpd ] ; then mkdir /var/log/httpd ; fi for f in man1/htdigest.1 man1/htpasswd.1 man1/dbmmanage.1 man8/ab.8 \ man8/apachectl.8 man8/apxs.8 man8/rotatelogs.8 man8/logresolve.8 \ man8/httpd.8 man8/suexec.8 do gzip -f /usr/share/man/$f done mv -f /usr/sbin/ab /usr/bin/ab mv -f /usr/sbin/htdigest /usr/bin/htdigest mv -f /usr/sbin/htdbm /usr/bin/htdbm mv -f /usr/sbin/logresolve /usr/bin/logresolve mv -f /usr/sbin/htpasswd /usr/bin/htpasswd ln -sf libaprutil-0.so.0 /usr/lib/libaprutil.so.0 ln -sf libaprutil.so.0 /usr/lib/libaprutil.so ln -sf libapr-0.so.0 /usr/lib/libapr.so.0 ln -sf libapr.so.0 /usr/lib/libapr.so # Make some changes to the httpd.conf file f1=`mktemp temp.XXXXXXXXXX` f2=`mktemp temp.XXXXXXXXXX` echo >$f1 "sed < /etc/httpd/conf/httpd.conf > $f2 \\" awk <> $f1 -F" " "{printf(\" -e 's#%s.*#%s#' \\\\\\n\",\$1,\$2);}" ^ServerRoot ServerRoot \\"/etc/httpd\\" ^PidFile PidFile run/httpd.pid ^User nobody User apache ^Group .-1 Group apache ^ServerAdmin ServerAdmin root@localhost ^DocumentRoot DocumentRoot \\"/var/www/html\\" ^.Directory ./var/www/htdocs \ ^TypesConfig TypesConfig /etc/mime.types END echo >>$f1 "" . $f1 cat < $f2 > /etc/httpd/conf/httpd.conf cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd-std.conf rm $f1 $f2 ldconfig cd ../mod-globule-%{version} rm -f /usr/lib/httpd/modules/mod_globule rm -rf /var/www/htdocs mkdir /var/www/htdocs make install rm -rf /var/www/html/globuleadm mv /var/www/htdocs/globuleadm /var/www/html/globuleadm if [ -f /usr/lib/httpd/modules/mod_globule ] ; then mv /usr/lib/httpd/modules/mod_globule /usr/lib/httpd/modules/mod_globule.so mv /usr/lib/httpd/modules/mod_globule-%{version} /usr/lib/httpd/modules/mod_globule-%{version}.so fi if [ -f /etc/httpd/conf/httpd-globule.conf ] ; then sed < /etc/httpd/conf/httpd-globule.conf \ > /etc/httpd/conf/httpd-globule.conf~ \ -e '/^LoadModule globule_module/p' \ -e '/^LoadModule/d' \ -e '/^LogFormat.*%I/d' \ -e 's/\/usr\/htdocs/\/var\/www\/html/g' \ -e 's/^ServerRoot \".*$/ServerRoot \"\/etc\/httpd\"/' mv /etc/httpd/conf/httpd-globule.conf~ /etc/httpd/conf/httpd-globule.conf fi %files # %files -n patched-httpd /etc/rc.d/init.d/httpd /usr/bin/ab /usr/sbin/apxs /usr/bin/htdigest /usr/bin/htdbm /usr/sbin/httpd /usr/sbin/envvars-std /usr/bin/logresolve /usr/bin/htpasswd /usr/sbin/envvars /usr/sbin/rotatelogs /usr/sbin/checkgid /usr/bin/apu-config /usr/bin/apr-config /usr/sbin/apachectl /usr/sbin/dbmmanage /usr/lib/libapr-0.a /usr/lib/libapr-0.la /usr/lib/libapr.so /usr/lib/libapr.so.0 /usr/lib/libapr-0.so /usr/lib/libapr-0.so.0 /usr/lib/libapr-0.so.0.9.12 /usr/lib/aprutil.exp /usr/lib/libaprutil-0.a /usr/lib/libaprutil-0.la /usr/lib/libaprutil.so /usr/lib/libaprutil.so.0 /usr/lib/libaprutil-0.so /usr/lib/libaprutil-0.so.0 /usr/lib/libaprutil-0.so.0.9.12 /usr/lib/apr.exp /usr/share/man/man1/htdigest.1.gz /usr/share/man/man1/htpasswd.1.gz /usr/share/man/man1/dbmmanage.1.gz /usr/share/man/man8/ab.8.gz /usr/share/man/man8/apachectl.8.gz /usr/share/man/man8/apxs.8.gz /usr/share/man/man8/rotatelogs.8.gz /usr/share/man/man8/logresolve.8.gz /usr/share/man/man8/httpd.8.gz /usr/share/man/man8/suexec.8.gz %config /etc/httpd/conf/magic %config /etc/httpd/conf/highperformance.conf %config /etc/httpd/conf/httpd.conf %config /etc/httpd/conf/ssl.conf /var/log/httpd /etc/httpd/logs /etc/httpd/modules /etc/httpd/run /etc/httpd/conf/highperformance-std.conf /etc/httpd/conf/httpd-std.conf /etc/httpd/conf/ssl-std.conf %config /etc/httpd/conf/mime.types %config(noreplace) /var/www/error/README %config(noreplace) /var/www/error/*.var %config(noreplace) /var/www/error/include/*.html %config(noreplace) /var/www/icons /usr/lib/httpd/modules/httpd.exp %config(noreplace) /var/www/html /usr/include/httpd %config(noreplace) /var/www/cgi-bin /var/www/manual /var/www/build # %files -n mod-globule # %doc README # %config /usr/local/globule/conf/httpd.conf /usr/lib/httpd/modules/mod_globule.so /usr/lib/httpd/modules/mod_globule-%{version}.so /usr/bin/globuleutil /etc/httpd/conf/httpd-globule.conf /var/www/html/globuleadm