When dealing with legacy systems like SUSE Linux 10.1 (x86_64), package availability becomes a significant challenge. The situation with Subversion 1.4 is particularly tricky because:
- Official repositories no longer maintain packages for this old distribution
- Modern package formats may not be compatible
- Dependency resolution becomes complex with outdated libraries
First, set up a clean build environment to avoid contaminating your production system:
# Install required development tools
zypper install rpm-build gcc make autoconf automake libtool
# Create RPM build tree structure
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
The heart of RPM creation is the spec file. Here's a basic template for Subversion 1.4:
Name: subversion
Version: 1.4.6
Release: 1%{?dist}
Summary: Advanced version control system
License: Apache
URL: https://subversion.apache.org/
Source0: http://archive.apache.org/dist/subversion/subversion-1.4.6.tar.gz
BuildRequires: openssl-devel, neon-devel, apr-devel, apr-util-devel
Requires: openssl, neon, apr, apr-util
%description
Subversion is a version control system designed to be the successor of CVS.
%prep
%setup -q -n subversion-1.4.6
%build
./configure --prefix=/usr \
--with-ssl \
--with-neon \
--with-apr=/usr/bin/apr-1-config \
--with-apr-util=/usr/bin/apu-1-config
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
%files
%defattr(-,root,root,-)
/usr/bin/svn
/usr/bin/svnadmin
/usr/bin/svndumpfilter
/usr/bin/svnlook
/usr/bin/svnserve
/usr/bin/svnsync
/usr/bin/svnversion
%changelog
* Tue Oct 10 2023 Your Name - 1.4.6-1
- Initial package for SUSE 10.1 x86_64
With the spec file ready, proceed with building:
# Download the source
wget http://archive.apache.org/dist/subversion/subversion-1.4.6.tar.gz -P ~/rpmbuild/SOURCES/
# Build the RPM
rpmbuild -ba ~/rpmbuild/SPECS/subversion.spec
# The resulting RPM will be in:
~/rpmbuild/RPMS/x86_64/subversion-1.4.6-1.x86_64.rpm
Legacy dependencies often require special attention. For SUSE 10.1, you might need:
# Check dependencies
rpm -qpR subversion-1.4.6-1.x86_64.rpm
# Install required legacy libraries
zypper install libneon27 libapr1 libaprutil1
After installation, verify functionality:
# Check version
svn --version --quiet
# Should output: 1.4.6
# Test basic functionality
svn co http://svn.apache.org/repos/asf/subversion/tags/1.4.6 test-co
For a cleaner approach, consider using mock to build in a chroot environment:
# Install mock
zypper install mock
# Add user to mock group
usermod -a -G mock yourusername
# Initialize chroot (for SUSE 10.1)
mock -r suse-10.1-x86_64 --init
# Build the package
mock -r suse-10.1-x86_64 --rebuild ~/rpmbuild/SRPMS/subversion-1.4.6-1.src.rpm
Some frequent problems and solutions:
- Library version conflicts: Use
ldd /usr/bin/svn
to check missing libraries - Build failures: Check config.log in the build directory
- RPM signature issues: Use
--nodeps
flag if absolutely necessary
When maintaining older systems like SUSE Linux 10.1 (x86_64), package availability becomes a significant challenge. In this case, we need Subversion 1.4 specifically, which isn't available in the default repositories. While newer versions exist, compatibility requirements sometimes force us to work with specific legacy versions.
Before starting, ensure you have these packages installed:
sudo zypper install rpm-build gcc make autoconf automake libtool
sudo zypper install neon-devel apr-devel apr-util-devel
First, create the standard RPM build directory structure:
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo "%_topdir %(echo $HOME)/rpmbuild" > ~/.rpmmacros
The heart of RPM creation is the spec file. Here's a basic template for Subversion 1.4:
Name: subversion
Version: 1.4.6
Release: 1%{?dist}
Summary: Subversion 1.4.6 for SUSE 10.1 x86_64
License: Apache
URL: http://subversion.apache.org/
Source0: http://archive.apache.org/dist/subversion/subversion-1.4.6.tar.gz
BuildRequires: gcc, make, autoconf, automake, libtool
BuildRequires: neon-devel >= 0.25, apr-devel, apr-util-devel
%description
Subversion 1.4.6 compiled for SUSE Linux 10.1 x86_64 systems.
%prep
%setup -q -n subversion-1.4.6
%build
./configure --prefix=/usr --with-neon
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
%files
/usr/bin/svn
/usr/bin/svnadmin
/usr/bin/svndumpfilter
/usr/bin/svnlook
/usr/bin/svnserve
/usr/bin/svnsync
/usr/bin/svnversion
%changelog
* Thu Aug 04 2023 Package Builder - 1.4.6-1
- Initial build for SUSE 10.1 x86_64
With the spec file ready, download the source and build the RPM:
cd ~/rpmbuild/SOURCES
wget http://archive.apache.org/dist/subversion/subversion-1.4.6.tar.gz
cd ../SPECS
rpmbuild -ba subversion.spec
Once built, install and verify the package:
sudo rpm -ivh ~/rpmbuild/RPMS/x86_64/subversion-1.4.6-1.x86_64.rpm
svn --version | head -n 1
This should output "svn, version 1.4.6" if successful.
Dependency Problems: You might encounter missing dependencies. For each one, search for the appropriate -devel package in your repositories.
Compatibility Flags: For older systems, you might need to add specific compiler flags to the %build section:
CFLAGS="-O2 -g -march=x86-64" ./configure --prefix=/usr --with-neon
For cleaner builds, consider using mock to create a chroot environment:
sudo zypper install mock
mock -r suse-10.1-x86_64 --init
mock -r suse-10.1-x86_64 --rebuild subversion-1.4.6-1.src.rpm