mirror of
https://abf.rosa.ru/djam/samba.git
synced 2025-02-24 09:32:49 +00:00
build modern ctdb (was a separate package)
Based on Fedora spec
This commit is contained in:
parent
9e5393207b
commit
a8278dadcd
1 changed files with 121 additions and 3 deletions
124
samba.spec
124
samba.spec
|
@ -10,7 +10,6 @@
|
||||||
#
|
#
|
||||||
# To view current parameters, including directories: sbmd -b
|
# To view current parameters, including directories: sbmd -b
|
||||||
#######
|
#######
|
||||||
# TODO: ctdb (--with-cluster-support)
|
|
||||||
|
|
||||||
# Build order of the dependency chain of samba:
|
# Build order of the dependency chain of samba:
|
||||||
# tdb lmdb talloc
|
# tdb lmdb talloc
|
||||||
|
@ -59,6 +58,7 @@
|
||||||
%bcond_with avahi_service
|
%bcond_with avahi_service
|
||||||
# switch between system MIT krb5 and built-in Heimdal krb5
|
# switch between system MIT krb5 and built-in Heimdal krb5
|
||||||
%bcond_with mitkrb5
|
%bcond_with mitkrb5
|
||||||
|
%bcond_without clustering
|
||||||
|
|
||||||
# zerro is a dummy value bellow #
|
# zerro is a dummy value bellow #
|
||||||
# this package does not contain libraries
|
# this package does not contain libraries
|
||||||
|
@ -114,7 +114,7 @@ Conflicts: %{1} < %{2}
|
||||||
Summary: Samba SMB server
|
Summary: Samba SMB server
|
||||||
Name: samba
|
Name: samba
|
||||||
Version: 4.19.3
|
Version: 4.19.3
|
||||||
Release: 2
|
Release: 3
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Servers
|
Group: System/Servers
|
||||||
|
@ -174,7 +174,6 @@ BuildRequires: magic-devel
|
||||||
BuildRequires: openldap-devel
|
BuildRequires: openldap-devel
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: pkgconfig(ctdb) >= 2.0
|
|
||||||
BuildRequires: pkgconfig(gnutls)
|
BuildRequires: pkgconfig(gnutls)
|
||||||
BuildRequires: pkgconfig(krb5)
|
BuildRequires: pkgconfig(krb5)
|
||||||
BuildRequires: pkgconfig(ldb) >= 1.1.29
|
BuildRequires: pkgconfig(ldb) >= 1.1.29
|
||||||
|
@ -514,6 +513,9 @@ Provides libraries for Samba
|
||||||
%{_libdir}/samba/libroken-samba4.so
|
%{_libdir}/samba/libroken-samba4.so
|
||||||
%{_libdir}/samba/libwind-samba4.so
|
%{_libdir}/samba/libwind-samba4.so
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with clustering}
|
||||||
|
%{_libdir}/samba/libctdb-event-client-samba4.so
|
||||||
|
%endif
|
||||||
%dir %{_libdir}/samba/vfs
|
%dir %{_libdir}/samba/vfs
|
||||||
%{_libdir}/%{name}/nss_info
|
%{_libdir}/%{name}/nss_info
|
||||||
%{_libdir}/%{name}/idmap
|
%{_libdir}/%{name}/idmap
|
||||||
|
@ -722,6 +724,114 @@ packages of Samba.
|
||||||
%doc clean-docs/samba-doc/examples
|
%doc clean-docs/samba-doc/examples
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
%if %{with clustering}
|
||||||
|
%package -n ctdb
|
||||||
|
Summary: A Clustered Database based on Samba's Trivial Database (TDB)
|
||||||
|
Requires: coreutils
|
||||||
|
# for ps and killall
|
||||||
|
Requires: psmisc
|
||||||
|
Requires: sed
|
||||||
|
Requires: tdb-utils
|
||||||
|
Requires: gawk
|
||||||
|
# for pkill and pidof:
|
||||||
|
Requires: procps-ng
|
||||||
|
# for netstat:
|
||||||
|
Requires: net-tools
|
||||||
|
Requires: ethtool
|
||||||
|
# for ip:
|
||||||
|
Requires: iproute2
|
||||||
|
Requires: iptables
|
||||||
|
# for flock, getopt, kill:
|
||||||
|
Requires: util-linux
|
||||||
|
# sudoers config
|
||||||
|
Recommends: sudo
|
||||||
|
|
||||||
|
%description -n ctdb
|
||||||
|
CTDB is a cluster implementation of the TDB database used by Samba and other
|
||||||
|
projects to store temporary data. If an application is already using TDB for
|
||||||
|
temporary data it is very easy to convert that application to be cluster aware
|
||||||
|
and use CTDB instead.
|
||||||
|
|
||||||
|
%files -n ctdb
|
||||||
|
%doc ctdb/README
|
||||||
|
%doc ctdb/doc/examples
|
||||||
|
%dir %{_sysconfdir}/ctdb
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/ctdb.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/notify.sh
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/debug-hung-script.sh
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/debug_locks.sh
|
||||||
|
%{_sysconfdir}/ctdb/functions
|
||||||
|
%{_sysconfdir}/ctdb/nfs-linux-kernel-callout
|
||||||
|
%{_sysconfdir}/ctdb/statd-callout
|
||||||
|
%config %{_sysconfdir}/sudoers.d/ctdb
|
||||||
|
# CTDB scripts, no config files
|
||||||
|
# script with executable bit means activated
|
||||||
|
%dir %{_sysconfdir}/ctdb/events
|
||||||
|
%dir %{_sysconfdir}/ctdb/events/legacy
|
||||||
|
%dir %{_sysconfdir}/ctdb/events/notification
|
||||||
|
%{_sysconfdir}/ctdb/events/notification/README
|
||||||
|
# CTDB scripts, no config files
|
||||||
|
# script with executable bit means activated
|
||||||
|
%dir %{_sysconfdir}/ctdb/nfs-checks.d
|
||||||
|
%{_sysconfdir}/ctdb/nfs-checks.d/README
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/00.portmapper.check
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/10.status.check
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/20.nfs.check
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/30.nlockmgr.check
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/40.mountd.check
|
||||||
|
%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/50.rquotad.check
|
||||||
|
%{_sbindir}/ctdbd
|
||||||
|
%{_bindir}/ctdb
|
||||||
|
%{_bindir}/ctdb_diagnostics
|
||||||
|
%{_bindir}/ltdbtool
|
||||||
|
%{_bindir}/onnode
|
||||||
|
%{_bindir}/ping_pong
|
||||||
|
%{_datadir}/ctdb
|
||||||
|
%dir %{_libexecdir}/ctdb
|
||||||
|
%{_libexecdir}/ctdb/ctdb-config
|
||||||
|
%{_libexecdir}/ctdb/ctdb-event
|
||||||
|
%{_libexecdir}/ctdb/ctdb-eventd
|
||||||
|
%{_libexecdir}/ctdb/ctdb_killtcp
|
||||||
|
%{_libexecdir}/ctdb/ctdb_lock_helper
|
||||||
|
%{_libexecdir}/ctdb/ctdb_lvs
|
||||||
|
%{_libexecdir}/ctdb/ctdb_mutex_fcntl_helper
|
||||||
|
%{_libexecdir}/ctdb/ctdb_natgw
|
||||||
|
%{_libexecdir}/ctdb/ctdb-path
|
||||||
|
%{_libexecdir}/ctdb/ctdb_recovery_helper
|
||||||
|
%{_libexecdir}/ctdb/ctdb_takeover_helper
|
||||||
|
%{_libexecdir}/ctdb/smnotify
|
||||||
|
%{_libexecdir}/ctdb/tdb_mutex_check
|
||||||
|
%dir %{_localstatedir}/lib/ctdb/
|
||||||
|
%dir %{_localstatedir}/lib/ctdb/persistent
|
||||||
|
%dir %{_localstatedir}/lib/ctdb/state
|
||||||
|
%dir %{_localstatedir}/lib/ctdb/volatile
|
||||||
|
%{_mandir}/man1/ctdb.1*
|
||||||
|
%{_mandir}/man1/ctdb_diagnostics.1*
|
||||||
|
%{_mandir}/man1/ctdbd.1*
|
||||||
|
%{_mandir}/man1/onnode.1*
|
||||||
|
%{_mandir}/man1/ltdbtool.1*
|
||||||
|
%{_mandir}/man1/ping_pong.1*
|
||||||
|
%{_mandir}/man5/ctdb.conf.5*
|
||||||
|
%{_mandir}/man5/ctdb-script.options.5*
|
||||||
|
%{_mandir}/man5/ctdb.sysconfig.5*
|
||||||
|
%{_mandir}/man7/ctdb.7*
|
||||||
|
%{_mandir}/man7/ctdb-tunables.7*
|
||||||
|
%{_mandir}/man7/ctdb-statistics.7*
|
||||||
|
%{_tmpfilesdir}/ctdb.conf
|
||||||
|
%{_unitdir}/ctdb.service
|
||||||
|
|
||||||
|
%post -n ctdb
|
||||||
|
%tmpfiles_create ctdb.conf
|
||||||
|
%systemd_post ctdb.service
|
||||||
|
|
||||||
|
%preun -n ctdb
|
||||||
|
%systemd_preun ctdb.service
|
||||||
|
|
||||||
|
%postun -n ctdb
|
||||||
|
%systemd_postun_with_restart ctdb.service
|
||||||
|
%endif
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
%package -n %{libwinbind}
|
%package -n %{libwinbind}
|
||||||
|
@ -1473,6 +1583,9 @@ sed -e 's/@ROSA_VENDOR_PATCH@/%{release}/g' -i VERSION
|
||||||
--with-iconv \
|
--with-iconv \
|
||||||
--with-acl-support \
|
--with-acl-support \
|
||||||
--with-automount \
|
--with-automount \
|
||||||
|
%if %{with clustering}
|
||||||
|
--with-cluster-support \
|
||||||
|
%endif
|
||||||
--with-systemd \
|
--with-systemd \
|
||||||
--with-systemddir=%{_unitdir} \
|
--with-systemddir=%{_unitdir} \
|
||||||
--systemd-install-services \
|
--systemd-install-services \
|
||||||
|
@ -1562,6 +1675,11 @@ sed -i "s|/usr/bin/kill|$(which kill)|g" %{buildroot}%{_unitdir}/*.service
|
||||||
# create %{_rundir}/samba too.
|
# create %{_rundir}/samba too.
|
||||||
mkdir -p %{buildroot}%{_tmpfilesdir}/
|
mkdir -p %{buildroot}%{_tmpfilesdir}/
|
||||||
echo "d %{_rundir}/samba 755 root root" >> %{buildroot}%{_tmpfilesdir}/samba.conf
|
echo "d %{_rundir}/samba 755 root root" >> %{buildroot}%{_tmpfilesdir}/samba.conf
|
||||||
|
%if %{with clustering}
|
||||||
|
echo "d %{_rundir}/ctdb 755 root root" > %{buildroot}%{_tmpfilesdir}/ctdb.conf
|
||||||
|
install -d -m 755 %{buildroot}%{_sysconfdir}/ctdb
|
||||||
|
install -m 644 ctdb/config/ctdb.conf %{buildroot}%{_sysconfdir}/ctdb/ctdb.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
# Prepare schema files to be included into OpenLDAP configuration
|
# Prepare schema files to be included into OpenLDAP configuration
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/openldap/{schema,slapd.d}
|
mkdir -p %{buildroot}%{_sysconfdir}/openldap/{schema,slapd.d}
|
||||||
|
|
Loading…
Add table
Reference in a new issue