OpenPkg,
Problem Domain: mod_dav_svn.so and mod_authz_svn.so
Operating System: Solaris 9
Hardware: Sparc
OpenPKG tested: 2.3
Build Parms:
subversion::with_cvs2svn = no
subversion::with_svn2cvs = no
subversion::with_perl = no
subversion::with_python = no
subversion::with_server = yes
subversion::with_included_apr = no
subversion::with_included_apr_util = no
Resolution:
I have included this spec file for others that may want to attempt to
get mod_dav_svn working. This works for me. I have an mod_dav_svn.so
file mod_authz_svn.so file created for apache2. This took some time. But
it works great with subversion 1.2.0. Note that I commented out the APR
installation for whatever reason this kept breaking. Use at your own
risk. But I have been using mod_dav_svn successfully now for a couple of
weeks.
Misc Notes:
I encapsulated all of the subversion libs under their own directory
structure so that it would not modify any other libraries.
Final Note:
I know OpenPKG does not support shared libs. But in order to have
mod_dav_svn you need to have shared libs. And I wanted mod_dav_svn.
Enjoy, :-)
--
Best Regards,
Frank Torres - UNIX Administrator
Portland State University
E-mail: [EMAIL PROTECTED]
>>>>>>>>>>>>>> Spec File HERE <<<<<<<<<<<<<<<<<<<
##
## subversion.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2005 OpenPKG Foundation e.V.
<http://openpkg.net/>
## Copyright (c) 2000-2005 Ralf S. Engelschall
<http://engelschall.com/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_dist 1.2.0
%define V_opkg 1.2.0
%define V_tools 20050525
# package information
Name: subversion
Summary: Source Revision Control System
URL: http://subversion.tigris.org/
Vendor: Tigris
Packager: OpenPKG
Distribution: OpenPKG
Class: BASE
Group: SCM
License: Apache/BSD
Version: %{V_opkg}
Release: 20050526
# package options
%option with_cvs2svn no
%option with_svn2cvs no
%option with_perl no
%option with_python no
%option with_server no
%option with_included_apr no
%option with_included_apr_util no
# list of sources
Source0:
http://subversion.tigris.org/tarballs/subversion-%{V_dist}.tar.gz
Source1:
ftp://ftp.openpkg.org/sources/CPY/subversion/subversion-tools-%{V_tools}.tar.gz
Source2: subversion.config
Source3: subversion.servers
Source4: rc.subversion
Patch0: subversion.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20040130, make, libtool
PreReq: OpenPKG, openpkg >= 20040130
BuildPreReq: diffutils, libxml, db, openssl, zlib, neon
PreReq: diffutils, libxml, db, openssl, zlib, neon
%if "%{with_cvs2svn}" == "yes"
PreReq: rcs, python
%endif
%if "%{with_svn2cvs}" == "yes"
BuildPreReq: perl
PreReq: perl, perl-xml, cvs, rcs
%endif
%if "%{with_perl}" == "yes" || "%{with_python}" == "yes"
BuildPreReq: swig
%endif
%if "%{with_perl}" == "yes"
BuildPreReq: perl
PreReq: perl
%endif
%if "%{with_python}" == "yes"
BuildPreReq: python, swig
PreReq: python
%endif
AutoReq: no
AutoReqProv: no
%description
Subversion is a modern Version Control System (VCS) providing most
current CVS features, versioned directories/renames/meta-data,
atomic commits, cheap branching and tagging, native client/server
architecture, and the choice of database or plain-file repository
implementations.
%track
prog subversion = {
version = %{V_dist}
url =
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260
regex = subversion-(\d+\.\d+\.\d+)\.tar\.gz
}
prog subversion:tools = {
version = %{V_tools}
url = ftp://ftp.openpkg.org/sources/CPY/subversion/
regex = subversion-tools-(__VER__)\.tar\.gz
}
%prep
%setup -q
%setup -q -T -D -a 1
%patch -p0
# substitute path from applied patch
%{l_shtool} subst %{l_value -s -a} \
subversion/bindings/swig/perl/native/Makefile.PL.in
# patch: correctly pass --disable-shared to sub-directories
%{l_shtool} subst \
%if "%{with_server}" == "no"
-e 's;\($ac_abs_srcdir/configure\) $ac_configure_args;\1
--disable-shared;' \
%else
-e 's;\($ac_abs_srcdir/configure\) $ac_configure_args;\1
--enable-shared --libdir=%{l_prefix}/lib/subversion ;' \
%endif
configure
# patch: adjust path to configuration directory
%{l_shtool} subst \
-e 's;/etc/subversion;%{l_prefix}/etc/subversion;g' \
subversion/libsvn_subr/config_impl.h \
subversion/libsvn_subr/config_file.c
# patch: fix installation of APR
%{l_shtool} subst \
-e '/^<Layout apr>/,/<\/Layout>/{ s;\(^[ ]*prefix:\).*$;\1
%{l_prefix}; ;s;\(^[ ]*sysconfdir:\).*$;\1
%{l_prefix}/etc/subversion; }' \
apr/config.layout \
apr-util/config.layout
%build
#libs="%{l_fsl_libs}"
#case "%{l_platform -t}" in
# sun4*-sunos5.9* ) LIBS="$libs -lrt -liconv -lexpat" \ ;;
#esac
# configure package
%if "%{with_perl}" == "yes"
bindings="${bindings}${bindings+,}perl"
%endif
%if "%{with_python}" == "yes"
bindings="${bindings}${bindings+,}python"
%endif
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags libxml2 .}" \
LDFLAGS="%{l_ldflags}" \
%if "%{with_server}" == "yes"
libs="%{l_fsl_libs}"
%if "%{l_platform -t}" == "sun4u-sunos5.9"
LIBS="$libs -lrt -liconv -lexpat" ./configure \
%endif
%else
./configure \
%endif
--prefix=%{l_prefix} \
--with-neon=%{l_prefix} \
--with-zlib \
--with-berkeley-db=%{l_prefix} \
%if "%{with_perl}" == "yes" || "%{with_python}" == "yes"
--with-swig=%{l_prefix}/bin/swig \
--enable-swig-bindings="$bindings" \
%endif
--disable-nls \
%if "%{with_server}" == "no"
--enable-static \
--disable-shared \
--enable-static \
--without-apxs
%else
--disable-static \
--enable-shared \
--with-apxs \
--with-ssl \
--disable-nls \
--disable-dso \
%if "%{with_included_apr}" == "yes"
--with-apr=%{l_prefix}/bin/apr-config \
%endif
%if "%{with_included_apr_util}" == "yes"
--with-apr-util=%{l_prefix}/bin/apu-config \
%endif
--disable-mod-activation \
--libdir=%{l_prefix}/lib/subversion
%endif
# build package
%{l_make} %{l_mflags}
# build Perl bindings
%if "%{with_perl}" == "yes"
( cd apr; ln -s .libs/libapr-0.a . ) || exit $?
( cd apr-util; ln -s .libs/libaprutil-0.a . ) || exit $?
%{l_shtool} mkdir -f -p -m 755 \
subversion/bindings/swig/perl/native/blib/arch/auto/SVN/{_Client,_Delta,_Fs,_Ra,_Repos,_Wc}
%{l_make} %{l_mflags} swig-pl
%endif
# build Python bindings
%if "%{with_python}" == "yes"
mv libtool libtool.orig
ln -s %{l_prefix}/bin/libtool .
%{l_make} %{l_mflags} swig-py
%endif
%install
# install package
rm -rf $RPM_BUILD_ROOT
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
# install Perl bindings
%if "%{with_perl}" == "yes"
%{l_make} %{l_mflags} install-swig-pl DESTDIR=$RPM_BUILD_ROOT
%{l_prefix}/bin/perl-openpkg -F- fixate >/dev/null
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libsvn_swig_perl*
%endif
# install Python bindings
%if "%{with_python}" == "yes"
%{l_make} %{l_mflags} install-swig-py DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libsvn_swig_py*
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/svn-python/libsvn/_*.a
mv $RPM_BUILD_ROOT%{l_prefix}/lib/svn-python \
$RPM_BUILD_ROOT%{l_prefix}/lib/python
%endif
# adjust APR installation for SVN local namespace
# ( cd $RPM_BUILD_ROOT%{l_prefix}/include/apr-0
# for i in *; do
# mv $i ../subversion-1/svn_$i
# done
# ) || exit $?
# %{l_shtool} subst \
# -e 's;^\(#include <\)\(apr.*\)$;\1svn_\2;' \
# $RPM_BUILD_ROOT/%{l_prefix}/include/subversion-1/svn*.h
# ( cd $RPM_BUILD_ROOT%{l_prefix}/lib
# for i in libapr*; do
# mv $i `echo "$i" | sed -e 's;^libapr\(.*\)$;libsvn_apr\1;'`
# done
# ) || exit $?
# strip down installation
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/apr-config
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/apr.exp
rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/apr-0
rm -f $RPM_BUILD_ROOT
%{l_prefix}/include/subversion-1/svn-revision.txt
rm -f $RPM_BUILD_ROOT%{l_prefix}/include/subversion-1/mod_dav_svn.h
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
rm -rf $RPM_BUILD_ROOT%{l_prefix}/build
rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/neon*
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
# install svn-config(1) tool
%{l_shtool} install -c -m 755 \
svn-config $RPM_BUILD_ROOT%{l_prefix}/bin/
# install svn_load_dirs(1) tool
%{l_shtool} install -c -m 755 \
-e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
contrib/client-side/svn_load_dirs.pl \
$RPM_BUILD_ROOT%{l_prefix}/bin/svn_load_dirs
# install Subversion default global configuration files
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/subversion
%{l_shtool} install -c -m 644 \
%{SOURCE subversion.config} \
$RPM_BUILD_ROOT%{l_prefix}/etc/subversion/config
%{l_shtool} install -c -m 644 \
%{SOURCE subversion.servers} \
$RPM_BUILD_ROOT%{l_prefix}/etc/subversion/servers
# install Subversion Bash command completion
%{l_shtool} install -c -m 644 \
tools/client-side/bash_completion \
$RPM_BUILD_ROOT%{l_prefix}/etc/subversion/bashrc
# install Subversion book
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/share/subversion
%{l_shtool} install -c -m 644 \
doc/book/svn-book.html \
doc/book/svn-book.pdf \
$RPM_BUILD_ROOT%{l_prefix}/share/subversion/
%if "%{with_cvs2svn}" == "yes"
# install cvs2svn(1) tool
( cd subversion-tools
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT
%{l_prefix}/libexec/subversion/cvs2svn/cvs2svn_rcsparse
( echo "#!/bin/sh"
echo "PYTHONPATH=\"%{l_prefix}/libexec/subversion/cvs2svn\""
echo "export PYTHONPATH"
echo "%{l_prefix}/bin/python
%{l_prefix}/libexec/subversion/cvs2svn/cvs2svn \${1+\"[EMAIL PROTECTED]"}"
) >cvs2svn.sh
%{l_shtool} install -c -m 755 \
cvs2svn.sh $RPM_BUILD_ROOT%{l_prefix}/bin/cvs2svn
%{l_shtool} install -c -m 644 \
cvs2svn.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
%{l_bzip2} -d -c cvs2svn.tar.bz2 | %{l_tar} xf -
%{l_shtool} install -c -m 644 \
cvs2svn/cvs2svn \
$RPM_BUILD_ROOT%{l_prefix}/libexec/subversion/cvs2svn/
%{l_shtool} install -c -m 644 \
cvs2svn/cvs2svn_rcsparse/*.py \
$RPM_BUILD_ROOT
%{l_prefix}/libexec/subversion/cvs2svn/cvs2svn_rcsparse/
) || exit $?
%endif
%if "%{with_svn2cvs}" == "yes"
# install svn2cvs(1) tool
( cd subversion-tools
%{l_shtool} install -c -m 755 \
-e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
svn2cvs.pl $RPM_BUILD_ROOT%{l_prefix}/bin/svn2cvs
%{l_prefix}/bin/pod2man svn2cvs.pl >svn2cvs.1
%{l_shtool} install -c -m 644 \
svn2cvs.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/svn2cvs.1
) || exit $?
%endif
# install run-command script
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
%{l_shtool} install -c -m 755 %{l_value -s -a} \
%{SOURCE rc.subversion} \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# create directory for default repository and svnserve pidfile
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/var/subversion
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%config %{l_prefix}/etc/subversion/*' \
'%doc %{l_prefix}/share/subversion/svn-book.*'
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT
%post
# create default repository
if [ ! -d $RPM_INSTALL_PREFIX/var/subversion/default ]; then
$RPM_INSTALL_PREFIX/bin/svnadmin create \
$RPM_INSTALL_PREFIX/var/subversion/default
fi
# after upgrade, restart service
[ $1 -eq 2 ] || exit 0
eval `%{l_rc} subversion status 2>/dev/null`
[ ".$subversion_active" = .yes ] && %{l_rc} subversion restart
exit 0
%preun
# before erase, stop service
[ $1 -eq 0 ] || exit 0
%{l_rc} subversion stop 2>/dev/null
exit 0
>>>>>>>>>>>>>>>>>>>>>>>>>>> END Spec File <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
signature.asc
Description: This is a digitally signed message part
