[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: RedHat RPMS updated to Subversion ALPHA

From: Féliciano Matias <feliciano.matias_at_free.fr>
Date: 2002-07-25 10:09:20 CEST

Sorry for my poor english.

Le jeu 25/07/2002 à 07:34, David Summers a écrit :
> For people who don't like to compile from source code or for people who
> need fast installs, I'm pleased to announce I've updated my RPMS for
> RedHat Linux 7.2 and 7.3 (I've only tested on these platforms, they may
> work on 7.X). You can access these via the normal downloads
> page at the http://subversion.tigris.org URL.
> The apache-2.0.40 packages install in the /usr/local/apache2 directory and
> does not interact with the regular RedHat apache-1.3.X packages so you can
> run both versions of apache concurrently (great for "production" servers).

I use a httpd.spec which is more RedHat award (prefix=/usr). It's a mix
of the rawhide Redhat and your .spec file.

So, it can't live with apache 1.3 !!!!

I try to continu to separate httpd and libapr*

This work fine with my RedHat 7.2.

The berkeley db use is db4 from the rawhide RedHat.

The Subversion spec file use a macro HAVE_APACHE_2 that permit to build
subversion with or without Apache 2.

the package subversion and subversion-devel obtained is the same with or
without Apache 2, and in both case svn can use a remote repository.

All of this to say that a users that dont want/need apache2 or have
apache 1.3 can build/install Subversion rpm packages without installing
apache 2:
- build httpd packages.
- installe ONLY httpd-libapr*
- build/install neon
- build/install db4
- build/install subversion with HAVE_APACHE_2 undefined.

I think there are some people that don't install Subversion because they
don't wan't to deal with two apache version in their RedHat/Mdk/Suse

One word about your .spec :
the "Requires: apache >= %{apache_version}" for subversion-devel seem

> With these packages I can usually install a Subversion server and have it
> completely configured and up and running within 5-15 minutes.
> >From what I've been told, these packages should also work with SUSE 8.0.
> Please correct me if this is wrong.
> Please let me know if you encounter any problems using these packages.
> You can also find the current build sources in subversion repositories for
> these packages at the http://summersoft.fay.ar.us:81/ URL.
> Happy Subversion Alpha Birthday!
> --
> David Wayne Summers "Linux: Because reboots are for upgrades!"
> david_at_summersoft.fay.ar.us PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
> PGP Key fingerprint = C0 E0 4F 50 DD A9 B6 2B 60 A1 31 7E D2 28 6D A8
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

%define contentdir /var/www
%define suexec_caller apache
%define apr_ver 0.2002.07.25

Summary: Apache HTTP Server
Name: httpd
Version: 2.0.40
Release: 0.5
URL: http://httpd.apache.org/
# Vendor: Red Hat, Inc.
Source0: httpd://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
Source3: httpd.logrotate
Source4: httpd.init
Source5: README.confd
Source6: powered_by.gif
Source10: httpd.conf
Source11: ssl.conf
Source12: migration.html
Source13: migration.css
# Apr
Source20: apr-%{apr_ver}.tar.bz2
Source21: apr-util-%{apr_ver}.tar.bz2
# build/scripts patches
Patch0: httpd-2.0.36-sslink.patch
# fixes
Patch1: httpd-2.0.36-suexec.patch
# features/functional changes
Patch2: httpd-2.0.36-cnfdir.patch
Patch3: httpd-2.0.36-redhat.patch
License: Apache Software License
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-root
BuildPrereq: db4-devel, expat-devel, findutils, perl
Requires: /etc/mime.types, gawk, /usr/share/magic.mime, /usr/bin/find
Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv
Prereq: sh-utils, textutils, /usr/sbin/useradd
Provides: webserver
Conflicts: thttpd
Obsoletes: apache, secureweb, mod_dav

Apache is a powerful, full-featured, efficient, and freely-available
Web server. Apache is also the most popular Web server on the

%package devel
Group: Development/Libraries
Summary: Development tools for the Apache HTTP server.
Obsoletes: secureweb-devel, apache-devel
Requires: libtool, httpd = %{version}

%description devel
The httpd-devel package contains the APXS binary and other files
that you need to build Dynamic Shared Objects (DSOs) for Apache.

If you are installing the Apache HTTP server and you want to be
able to compile or develop additional modules for Apache, you need
to install this package.

%package manual
Group: Documentation
Summary: Documentation for the Apache HTTP server.
Obsoletes: secureweb-manual, apache-manual

%description manual
The httpd-manual package contains the complete manual and
reference guide for the Apache HTTP server. The information can
also be found at http://httpd.apache.org/docs/.

%package -n mod_ssl
Group: System Environment/Daemons
Summary: SSL/TLS module for the Apache HTTP server
Serial: 1
BuildPrereq: openssl-devel
Prereq: openssl, dev, /bin/cat
Requires: httpd, make

%description -n mod_ssl
The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.

%package libapr
Version: %{apr_ver}
Group: System Environment/Libraries
Summary: Apache Portable Runtime libraries.

%description libapr
Apache Portable Runtime libraries.

%package libapr-devel
Version: %{apr_ver}
Group: Development/Libraries
Summary: Apache Portable Runtime development libraries.

%description libapr-devel
Apache Portable Runtime development libraries.

%package libapr-utils
Version: %{apr_ver}
Group: System Environment/Libraries
Summary: Apache Portable Runtime Utility libraries.

%description libapr-utils
Apache Portable Runtime Utility libraries.

%package libapr-utils-devel
Version: %{apr_ver}
Group: Development/Libraries
Summary: Apache Portable Runtime Utility development libraries.

%description libapr-utils-devel
Apache Portable Runtime Utility development libraries.

%setup -q -a 20 -a 21

mv apr srclib
mv apr-util srclib

chmod a+x ./buildconf srclib/apr/buildconf srclib/apr-util/buildconf build/config-stubs build/instdso.sh build/install.sh
chmod a+x srclib/apr/build/PrintPath ./srclib/apr/build/buildcheck.sh
chmod a+x srclib/apr-util/xml/expat/buildconf.sh srclib/apr-util/xml/expat/conftools/PrintPath
chmod a+x build/mkdir.sh srclib/apr/build/mkdir.sh srclib/apr-util/build/mkdir.sh

%patch0 -p0 -b .sslink
%patch1 -p0 -b .suexec
%patch2 -p0 -b .cnfdir
%patch3 -p0 -b .redhat

# copy across the migration guide and sed it's location into apachectl
cp $RPM_SOURCE_DIR/migration.{html,css} .
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \

# regenerate configure scripts

YACC="bison -y"
export YACC

./configure \
         --prefix=%{_sysconfdir}/httpd \
         --exec-prefix=%{_prefix} \
         --bindir=%{_bindir} \
         --sbindir=%{_sbindir} \
         --mandir=%{_mandir} \
        --sysconfdir=%{_sysconfdir}/httpd/conf \
        --includedir=%{_includedir}/httpd \
        --libexecdir=%{_libdir}/httpd/modules \
        --datadir=%{contentdir} \
        --with-installbuilddir=%{_libdir}/httpd/build \
        --with-mpm=prefork \
        --enable-mods-shared=all \
        --enable-suexec --with-suexec \
        --with-suexec-caller=%{suexec_caller} \
        --with-suexec-docroot=%{contentdir} \
        --with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
        --with-suexec-bin=%{_sbindir}/suexec \
        --with-suexec-uidmin=500 --with-suexec-gidmin=500 \
        --enable-ssl --with-ssl \
        --enable-proxy --enable-proxy-connect \
        --enable-proxy-http --enable-proxy-ftp


# Classify ab and logresolve as section 1 commands, as they are in /usr/bin
mv docs/man/ab.8 docs/man/ab.1
sed -e "1s/logresolve 8/logresolve 1/" \
  < docs/man/logresolve.8 > docs/man/logresolve.1
rm docs/man/logresolve.8


### remove this
strip -g $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.so

# install conf file/directory
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
install -m 644 $RPM_SOURCE_DIR/README.confd \
install -m 644 $RPM_SOURCE_DIR/ssl.conf \

rm $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/*.conf
install -m 644 $RPM_SOURCE_DIR/httpd.conf \

# mod_ssl bits
for suffix in crl crt csr key prm; do
   mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ssl.${suffix}

# for holding mod_dav lock database
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav

# move utilities to /usr/bin
mv $RPM_BUILD_ROOT%{_sbindir}/{ab,htdbm,logresolve,htpasswd,htdigest} \

# make libtool a symlink
mv $RPM_BUILD_ROOT%{contentdir}/build $RPM_BUILD_ROOT%{_libdir}/httpd/build
rm $RPM_BUILD_ROOT%{_libdir}/httpd/build/libtool
ln -s ../../../..%{_bindir}/libtool $RPM_BUILD_ROOT%{_libdir}/httpd/build/libtool

# fix up config_vars file
sed -e "s|/var/www/build|%{_libdir}/httpd/build|g" \
    -e "/AP_LIBS/d" -e "/abs_srcdir/d" < build/config_vars.mk \
> $RPM_BUILD_ROOT%{_libdir}/httpd/build/config_vars.mk

sed -e "s|/var/www/build|%{_libdir}/httpd/build|g" < support/apxs \
> $RPM_BUILD_ROOT%{_sbindir}/apxs

sed -e "s|/var/www/build|%{_libdir}/httpd/build|g" < include/ap_config_layout.h \
> $RPM_BUILD_ROOT%{_includedir}/httpd/ap_config_layout.h

sed -e "s|/var/www/build|%{_libdir}/httpd/build|g" < srclib/apr/apr-config \
> $RPM_BUILD_ROOT%{_bindir}/apr-config

# Fix envvars executable mode.
# chmod a+x $RPM_BUILD_ROOT/%{_sbindir}/envvars

# docroot
mkdir $RPM_BUILD_ROOT%{contentdir}/html
install -m 644 $RPM_SOURCE_DIR/index.html \
rm -r $RPM_BUILD_ROOT%{contentdir}/manual/style
rm $RPM_BUILD_ROOT%{contentdir}/manual/*/*.xml

install -m 644 $RPM_SOURCE_DIR/powered_by.gif \

# logs
rmdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/logs
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/httpd

# symlinks for /etc/httpd
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
ln -s ../..%{_localstatedir}/run $RPM_BUILD_ROOT/etc/httpd/run
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
ln -s ../..%{_libdir}/httpd/build $RPM_BUILD_ROOT/etc/httpd/build

# install SYSV init stuff
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m755 $RPM_SOURCE_DIR/httpd.init \
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \

# install log rotation stuff
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m644 $RPM_SOURCE_DIR/httpd.logrotate \

# fix man page paths
sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \
    -e "s|/usr/local/apache2/conf/mime.types|/etc/mime.types|" \
    -e "s|/usr/local/apache2/conf/magic|/etc/httpd/conf/magic|" \
    -e "s|/usr/local/apache2/logs/error_log|/var/log/httpd/error_log|" \
    -e "s|/usr/local/apache2/logs/access_log|/var/log/httpd/access_log|" \
    -e "s|/usr/local/apache2/logs/httpd.pid|/var/run/httpd.pid|" \
    -e "s|/usr/local/apache2|/etc/httpd|" < docs/man/httpd.8 \
> $RPM_BUILD_ROOT%{_mandir}/man8/httpd.8

# Add the "apache" user
/usr/sbin/useradd -c "Apache" -u 48 \
        -s /bin/false -r -d %{contentdir} apache 2> /dev/null || :

# Register the httpd service
/sbin/chkconfig --add httpd

if [ $1 = 0 ]; then
        /sbin/service httpd stop > /dev/null 2>&1
        /sbin/chkconfig --del httpd

%post -n mod_ssl
/sbin/ldconfig ### is this needed?
umask 077

if [ ! -f %{_sysconfdir}/httpd/conf/ssl.key/server.key ] ; then
%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/httpd/conf/ssl.key/server.key 2> /dev/null

if [ "x${FQDN}" = "x" ]; then

if [ ! -f %{_sysconfdir}/httpd/conf/ssl.crt/server.crt ] ; then
cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/httpd/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/httpd/conf/ssl.crt/server.crt 2>/dev/null

%doc migration.html migration.css
%dir %{_sysconfdir}/httpd
%dir %{_sysconfdir}/httpd/conf
%config(noreplace) %{_sysconfdir}/httpd/conf/*.conf
%config(noreplace) %{_sysconfdir}/httpd/conf/magic
%config %{_sysconfdir}/logrotate.d/httpd
%config %{_sysconfdir}/rc.d/init.d/httpd
%dir %{_sysconfdir}/httpd/conf.d
%attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec
%dir %{_libdir}/httpd
%dir %{_libdir}/httpd/modules
# everything but mod_ssl.so:
%dir %{contentdir}
%dir %{contentdir}/cgi-bin
%dir %{contentdir}/html
%dir %{contentdir}/icons
%config(noreplace) %{contentdir}/error
%attr(0700,root,root) %dir %{_localstatedir}/log/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
%files manual
%files -n mod_ssl
%config(noreplace) %{_sysconfdir}/httpd/conf.d/ssl.conf
%dir %{_sysconfdir}/httpd/conf/ssl.*
%files devel
%attr(755,,root,root) %{_sbindir}/envvars
%dir %{_libdir}/httpd/build
%files libapr
%files libapr-devel
%files libapr-utils
%files libapr-utils-devel
* Wed Jun 26 2002 Gary Benson <gbenson@redhat.com> 2.0.36-6
- modify init script to detect 1.3.x httpd.conf's and direct users
  to the migration guide
* Tue Jun 25 2002 Gary Benson <gbenson@redhat.com> 2.0.36-5
- patch apachectl to detect 1.3.x httpd.conf's and direct users
  to the migration guide
- ship the migration guide
* Fri Jun 21 2002 Joe Orton <jorton@redhat.com>
- move /etc/httpd2 back to /etc/httpd
- add noindex.html page and poweredby logo; tweak default config
  to load noindex.html if no default "/" page is present.
- add patch to prevent mutex errors on graceful restart
* Fri Jun 21 2002 Tim Powers <timp@redhat.com> 2.0.36-4
- automated rebuild
* Wed Jun 12 2002 Joe Orton <jorton@redhat.com> 2.0.36-3
- add patch to fix SSL mutex handling
* Wed Jun 12 2002 Joe Orton <jorton@redhat.com> 2.0.36-2
- improved config directory patch
* Mon May 20 2002 Joe Orton <jorton@redhat.com>
- initial build; based heavily on apache.spec and mod_ssl.spec
- fixes: #65214, #58490, #57376, #61265, #65518, #58177, #57245

# define to 1 if you have apache 2.
%define HAVE_APACHE_2 1
%define apache_version 2.0.40-0.5
%define neon_version 0.21.3
%define libapr_version 0.2002.07.25
Summary: A Concurrent Versioning system similar to but better than CVS.
Name: subversion
Version: 0.14.0
Release: 2685
Copyright: BSD
Group: Utilities/System
URL: http://subversion.tigris.org
Source0: subversion-%{version}-%{release}.tar.bz2
Patch0: install.patch
Vendor: Summersoft
Packager: David Summers <david@summersoft.fay.ar.us>
Requires: httpd-libapr >= %{libapr_version}
Requires: httpd-libapr-utils >= %{libapr_version}
Requires: db4 >= 4.0.14
Requires: expat
Requires: neon = %{neon_version}
Requires: /sbin/install-info
Requires: httpd-libapr >= %{libapr_version}
Requires: httpd-libapr-utils >= %{libapr_version}
Requires: db4 >= 4.0.14
BuildPreReq: httpd >= %{apache_version}
BuildPreReq: httpd-devel >= %{apache_version}
BuildPreReq: httpd-libapr-devel >= %{libapr_version}
BuildPreReq: httpd-libapr-utils-devel >= %{libapr_version}
BuildPreReq: db4-devel >= 4.0.14
BuildPreReq: autoconf253 >= 2.53
BuildPreReq: expat-devel
BuildPreReq: gdbm-devel
BuildPreReq: libtool >= 1.4.2
BuildPreReq: neon = %{neon_version}
BuildPreReq: openssl-devel
BuildPreReq: python
BuildPreReq: texinfo
BuildPreReq: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Prefix: /usr
Subversion does the same thing CVS does (Concurrent Versioning System) but has
major enhancements compared to CVS.

*** Note: This is a relocatable package; it can be installed anywhere you like
with the "rpm -Uvh --prefix /your/favorite/path" command. This is useful
if you don't have root access on your machine but would like to use this

%package devel
Group: Utilities/System
Summary: Development package for Subversion developers.
Requires: subversion = %{version}-%{release}
%description devel
The subversion-devel package includes the static libraries and include files
for developers interacting with the subversion package.

%package server
Group: Utilities/System
Summary: Apache server module for Subversion server.
Requires: httpd-libapr >= 0.%{libapr_version}
Requires: httpd-libapr-utils >= 0.%{libapr_version}
Requires: perl
Requires: subversion = %{version}-%{release}
BuildPreReq: httpd-devel >= %{apache_version}
%description server
The subversion-server package adds the Subversion server Apache module to
the Apache directories and configuration.
* Tue Jun 25 2002 David Summers <david@summersoft.fay.ar.us> 0.13.0-2332
- Updated to APACHE/APR/APR-UTIL 2002-06-25.
- Previous version had a few problems because of missing apache error/ files.

* Sun Jun 23 2002 David Summers <david@summersoft.fay.ar.us> 0.13.0-2318
- Updated to apache-2.0.40-0.3.
- Updated to subversion-0.13.1-2318.

* Tue Jun 18 2002 David Summers <david@summersoft.fay.ar.us> 0.13.0-2277
- Updated for RedHat 7.3 (autoconf253).
- Added a bunch of pre-requisites I didn't know were needed because I built a
  new machine that didn't have them already installed.
- Fixed installation of man and info documentation pages.

* Wed Mar 06 2002 David Summers <david@summersoft.fay.ar.us> 0.9.0-1447
- Back to apache-libapr* stuff, hopefully to stay.

* Sun Feb 24 2002 David Summers <david@summersoft.fay.ar.us> 0.9.0-1373
- Fixed expat.patch to not have to make so many changes by writing a small
  shell script that changes libexpat to -lexpat.

* Fri Feb 22 2002 Blair Zajac <blair@orcaware.com> 0.9.0-1364
- Updated to neon-0.19.2.

* Mon Feb 11 2002 David Summers <david@summersoft.fay.ar.us> 0.8.0-1250
- Back to using apr and apr-util separately from apache.

* Mon Feb 11 2002 David Summers <david@summersoft.fay.ar.us> 0.8.0-1232
- Updated to APR and APR-UTIL 2002.02.11.
- Updated to apache-2.0.32-0.2. (Requires apache-libapr and apache-libapr-util).
- Took out a (now non-existant) documentation file.
- Moved SPEC file changelog to after all package definitions.
* Sun Feb 03 2002 David Summers <david@summersoft.fay.ar.us> 0.8.0-1153
- Updated to neon-0.18.5.
- Broke up apache and apache-devel into apache-apr, apache-apr-devel,
  apache-apr-utils, and apache-apr-utils-devel.
- Updated apache to APR and APR-UTILS to 2002.02.03 version.

* Sat Feb 02 2002 David Summers <david@summersoft.fay.ar.us> 0.8.0-1147
- Now builds without the separate APR package as it is built into and
  "exported" from apache-2.0.31-0.3.

* Fri Feb 01 2002 David Summers <david@summersoft.fay.ar.us> 0.8.0-1132
- Took out patches to install procedure now not required because of fixes
  in rev 1130.

* Fri Feb 01 2002 David Summers <david@summersoft.fay.ar.us> 0.8.0-1129
- Added requirement for APR 0.2002.01.19 rev 2 where the /usr/bin/apr-config
  program was added.

* Sun Oct 28 2001 David Summers <david@summersoft.fay.ar.us>
- Release M5-r340: Added the subversion-server package.

* Fri Oct 26 2001 David Summers <david@summersoft.fay.ar.us>
- Release M5-r327: No longer need expat-lite. We can use the normal expat.

* Thu Sep 27 2001 David Summers <david@summersoft.fay.ar.us>
- Release M3-r117: Initial Version.

%setup -q

if [ -f /usr/bin/autoconf-2.53 ]; then
sh autogen.sh

LDFLAGS="-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_client/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_delta/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_fs/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_repos/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_ra/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_ra_dav/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_ra_local/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_subr/.libs \
        -L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_wc/.libs \
        " ./configure \
        --prefix=/usr \
        --enable-utf8 \
        --with-apxs=/usr/sbin/apxs \
        --with-apr=/usr/bin/apr-config \

# Fix up mod_dav_svn installation.
%patch0 -p1


mkdir -p $RPM_BUILD_ROOT/usr/share
make install \
        prefix=$RPM_BUILD_ROOT/usr \
        mandir=$RPM_BUILD_ROOT/usr/share/man \
        fs_libdir=$RPM_BUILD_ROOT/usr/lib \
        base_libdir=$RPM_BUILD_ROOT/usr/lib \
        infodir=$RPM_BUILD_ROOT/usr/share/info \

# Only add to INFO directory if this is the only instance installed.
if [ "$1"x = "1"x ]; then
   if [ -f /sbin/install-info -a -x /sbin/install-info ]; then
      /sbin/install-info /usr/share/info/svn-design.info.gz \
         /usr/share/info/dir \
         --entry='* Subversion-design: (svn-design). Subversion Versioning System Design Manual'

      /sbin/install-info /usr/share/info/svn-handbook.info.gz \
         /usr/share/info/dir \
         --entry='* Subversion: (svn-handbook). Subversion Versioning System Manual'

      /sbin/install-info /usr/share/info/svn-handbook-french.info.gz \
         /usr/share/info/dir \
         --entry='* Subversion-french: (svn-handbook-french). Guide du gestionnaire de version Subversion'

# Only delete from INFO directory if this is the last instance being deleted.
if [ "$1"x = "0"x ]; then
   if [ -f /sbin/install-info -a -x /sbin/install-info ]; then
      /sbin/install-info --delete /usr/share/info/svn-design.info.gz \
         /usr/share/info/dir \
         --entry='* Subversion-design: (svn-design). Subversion Versioning System Design Manual'

      /sbin/install-info --delete /usr/share/info/svn-handbook.info.gz \
         /usr/share/info/dir \
         --entry='* Subversion: (svn-handbook). Subversion Versioning System Manual'

      /sbin/install-info --delete /usr/share/info/svn-handbook-french.info.gz \
         /usr/share/info/dir \
         --entry='* Subversion-french: (svn-handbook-french). Guide du gestionnaire de version Subverion'


%post server
# Load subversion server into apache configuration.

# Search for Subversion dav_svn_module and add it to config file if not found.

if [ "`grep -i dav_svn_module $CONF`"x = "x" ]; then
   # Put in LoadModule dav_svn_module line at end of LoadModule section.
   perl -e '
   while ( <> )
      $FirstLoadFound = 1 if ( ! $FirstLoadFound &&
           ( /^LoadModule/ ) );
      $InsertPointFound = 1,
         print "LoadModule dav_svn_module modules/mod_dav_svn.so\n"
         if ( $FirstLoadFound && ! $InsertPointFound &&
              ! ( /^LoadModule/ ) );
   ' < $CONF > $CONF.new && mv $CONF $CONF.bak && mv $CONF.new $CONF

# Conditionally add subversion example configuration.
if [ "`grep -i svnpath $CONF`"x = "x" ]; then
   cat >> $CONF <<EOF

# Begin Subversion server configuration - Please don't delete this line.
#<Location /svn/repos>
# DAV svn
# SVNPath /home/svnroot
# # Limit write permission to list of valid users.
# # Require SSL connection for password protection.
# # SSLRequireSSL
# AuthType Basic
# AuthName "Authorization Realm"
# AuthUserFile /absolute/path/to/passwdfile
# Require valid-user
# </LimitExcept>
# End Subversion server configuration - Please don't delete this line.

# Restart apache server if needed.
source /etc/init.d/functions
if [ "`pidof httpd`"x != "x" ]; then
   /etc/init.d/httpd restart

%preun server
# Take subversion configuration out of apache configuration file.
# Only take it out if this package is being erased and not upgraded.
if [ "$1" = "0" ];
   cd /etc/httpd/conf && sed -e 's/^LoadModule dav_svn_module/#LoadModule dav_svn_module/' -e '/^# Begin Subversion server/,/^# End Subversion server/s/^/#/' < httpd.conf > httpd.conf.new && mv httpd.conf httpd.conf.bak && mv httpd.conf.new httpd.conf

%postun server
# Restart apache server if needed.
source /etc/init.d/functions
if [ "`pidof httpd`"x != "x" ]; then
   /etc/init.d/httpd restart



%doc tools subversion/LICENSE

%files devel

%files server

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 25 10:11:43 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.