summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-05-06 12:29:10 +0200
committerMichael Adam <obnox@samba.org>2011-05-18 22:00:24 +0200
commitec625f7b7bc1a06da8541f9d8538ce88851bb10e (patch)
treefad6f1b9bfc302bc356535b40012a4215c4e83b2 /packaging
parentac0307ff898d5f8edfa783e9f5e7a89ebf6d6524 (diff)
downloadsamba-ec625f7b7bc1a06da8541f9d8538ce88851bb10e.tar.gz
samba-ec625f7b7bc1a06da8541f9d8538ce88851bb10e.tar.bz2
samba-ec625f7b7bc1a06da8541f9d8538ce88851bb10e.zip
packaging(RHEL-CTDB): build libtdb and libtalloc packages ourselves
and add appropriate dependencies to the samba-common package. It should also be possible to run with appropriate system talloc and tdb packages.
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/RHEL-CTDB/makespec.sh15
-rw-r--r--packaging/RHEL-CTDB/samba.spec.tmpl41
2 files changed, 51 insertions, 5 deletions
diff --git a/packaging/RHEL-CTDB/makespec.sh b/packaging/RHEL-CTDB/makespec.sh
index 29dcbeb30e..946ce8ebf9 100755
--- a/packaging/RHEL-CTDB/makespec.sh
+++ b/packaging/RHEL-CTDB/makespec.sh
@@ -45,8 +45,21 @@ else
echo "GITHASH: ${GITHASH}"
fi
-sed -e s/PVERSION/${VERSION}/g \
+
+#
+# get the versions of libtdb and libtalloc we provide
+#
+#LIBTDBVERSION=1.2.9
+LIBTDBVERSION=$(grep ^VERSION ${DIRNAME}/../../lib/tdb/wscript | sed -e "s/'//g" -e 's/.* //')
+
+#LIBTALLOCVERSION=2.0.1
+LIBTALLOCVERSION=$(grep ^VERSION ${DIRNAME}/../../lib/talloc/wscript | sed -e "s/'//g" -e 's/.* //')
+
+sed \
+ -e s/PVERSION/${VERSION}/g \
-e s/GITHASH/${GITHASH}/g \
+ -e s/LIBTDBVERSION/${LIBTDBVERSION}/g \
+ -e s/LIBTALLOCVERSION/${LIBTALLOCVERSION}/g \
< ${SPECFILE}.tmpl \
> ${SPECFILE}
diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl
index ef8d42bfbe..9f249f5daf 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -77,6 +77,8 @@ shares and printing to SMB printers.
Summary: Files used by both Samba servers and clients.
Group: Applications/System
Provides: samba-common = %{version}-%{release}
+Requires: libtalloc >= 2.0.1
+Requires: libtdb >= 1.2.6
%description common
Samba-common provides files necessary for both the server and client
@@ -84,6 +86,28 @@ packages of Samba.
#######################################################################
+%package libtdb
+Summary: the tdb library
+Group: Applications/System
+Provides: libtdb = LIBTDBVERSION-%{release}
+Obsoletes: libtdb
+#Conflicts: libtdb < LIBTALLOCVERSION
+
+%description libtdb
+Samba's tdb library.
+
+#######################################################################
+%package libtalloc
+Summary: the talloc library
+Group: Applications/System
+Provides: libtalloc = LIBTALLOCVERSION-%{release}
+Obsoletes: libtalloc
+#Conflicts: libtalloc < LIBTALLOCVERSION
+
+%description libtalloc
+Samba's talloc library
+
+#######################################################################
%package swat
Summary: The Samba SMB server configuration program.
Group: Applications/System
@@ -256,6 +280,11 @@ cp -p source3/bin/winbind_krb5_locator.so ${RPM_BUILD_ROOT}/%{_libarchdir}/krb5/
## cleanup
/bin/rm -rf $RPM_BUILD_ROOT/usr/lib*/samba/security
+# remove installed but unpackaged files:
+/bin/rm -f $RPM_BUILD_ROOT/usr/lib*/libtalloc.so
+/bin/rm -f $RPM_BUILD_ROOT/usr/lib*/libtdb.so
+
+
# Install the miscellany
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
@@ -483,6 +512,14 @@ exit 0
##########
+%files libtalloc
+%{_libarchdir}/libtalloc.so.LIBTALLOCVERSION
+%{_libarchdir}/libtalloc.so.2
+
+%files libtdb
+%{_libarchdir}/libtdb.so.LIBTDBVERSION
+%{_libarchdir}/libtdb.so.1
+
%files common
%defattr(-,root,root)
%dir %{_sysconfdir}/samba
@@ -524,10 +561,6 @@ exit 0
%{_includedir}/tdb.h
%{_libarchdir}/libnetapi.so
%{_libarchdir}/libnetapi.so.0
-%{_libarchdir}/libtalloc.so
-%{_libarchdir}/libtalloc.so.2
-%{_libarchdir}/libtdb.so
-%{_libarchdir}/libtdb.so.1
%{_libarchdir}/libwbclient.so
%{_libarchdir}/libwbclient.so.0