Accepting request 519876 from home:aaptel:samba-speclean
- Clean specfile assuming SUSE-only system and product >=SLE11 + %{ul_version}, %{rhel_version}, %{mandriva_version}, %{centos_version} are always undefined + %{_vendor} is "suse" and %{suse_version} is at least 1100 OBS-URL: https://build.opensuse.org/request/show/519876 OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/samba?expand=0&rev=571
This commit is contained in:
parent
8fb1f6bb14
commit
ae1ea30911
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 31 08:31:51 UTC 2017 - aaptel@suse.com
|
||||
|
||||
- Clean specfile assuming SUSE-only system and product >=SLE11
|
||||
+ %{ul_version}, %{rhel_version}, %{mandriva_version}, %{centos_version}
|
||||
are always undefined
|
||||
+ %{_vendor} is "suse" and %{suse_version} is at least 1100
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 16 11:33:36 UTC 2017 - ddiss@suse.com
|
||||
|
||||
|
173
samba.spec
173
samba.spec
@ -42,66 +42,31 @@ BuildRequires: libarchive-devel
|
||||
%if 0%{?suse_version} > 1210
|
||||
BuildRequires: gamin-devel
|
||||
%else
|
||||
%if 0%{?rhel_version} < 700
|
||||
BuildRequires: fam-devel
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libattr-devel
|
||||
%if 0%{?centos_version} > 599 ||0%{?fedora_version} > 11 || 0%{?mandriva_version} > 2009 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1100
|
||||
%if 0%{?suse_version} > 1100
|
||||
BuildRequires: libuuid-devel
|
||||
%endif
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pam-devel
|
||||
%if 0%{?centos_version} > 599 ||0%{?fedora_version} > 11 || 0%{?rhel_version} > 599
|
||||
BuildRequires: perl-ExtUtils-MakeMaker
|
||||
%endif
|
||||
BuildRequires: popt-devel
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?suse_version} > 0
|
||||
BuildRequires: python-xml
|
||||
%endif
|
||||
BuildRequires: readline-devel
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: cracklib-devel
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: openldap2-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1030
|
||||
BuildRequires: gdbm-devel
|
||||
BuildRequires: pwdutils
|
||||
%endif
|
||||
%if 0%{?suse_version} > 930
|
||||
BuildRequires: libnscd-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} > 930 && 0%{?suse_version} < 1031
|
||||
BuildRequires: dmapi-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: xfsprogs-devel
|
||||
%endif
|
||||
%if 0%{?fedora_version}
|
||||
BuildRequires: cracklib-devel
|
||||
%endif
|
||||
%if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} || 0%{?mandriva_version}
|
||||
BuildRequires: openldap-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1000
|
||||
BuildRequires: keyutils-devel
|
||||
%endif
|
||||
%if 0%{?fedora_version} || 0%{?rhel_version} > 500
|
||||
BuildRequires: keyutils-libs-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1020
|
||||
%define pkgconfig_req pkg-config
|
||||
%else
|
||||
%define pkgconfig_req pkgconfig
|
||||
%endif
|
||||
BuildRequires: %{pkgconfig_req}
|
||||
BuildRequires: libldb-devel
|
||||
BuildRequires: libtalloc-devel
|
||||
@ -131,14 +96,10 @@ BuildRequires: libpcp-devel
|
||||
BuildRequires: libcephfs-devel
|
||||
BuildRequires: librados-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1031
|
||||
%define libsmbclient_name libsmbclient
|
||||
%else
|
||||
%define libsmbclient_name libsmbclient0
|
||||
%endif
|
||||
%define libnetapi_name libnetapi0
|
||||
%define libwbclient_name libwbclient0
|
||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
|
||||
%if 0%{?suse_version} > 1140
|
||||
%define build_make_smp_mflags %{?_smp_mflags}
|
||||
%else
|
||||
%define build_make_smp_mflags %{?jobs:-j%jobs}
|
||||
@ -152,10 +113,8 @@ Release: 0
|
||||
Url: https://www.samba.org/
|
||||
Obsoletes: samba-32bit < %{version}
|
||||
Obsoletes: samba-gplv3 < %{version}
|
||||
%if 0%{?suse_version} > 1030
|
||||
Recommends: cron
|
||||
Recommends: logrotate
|
||||
%endif
|
||||
Summary: A SMB/CIFS File, Print, and Authentication Server
|
||||
License: GPL-3.0+
|
||||
Group: Productivity/Networking/Samba
|
||||
@ -173,16 +132,16 @@ Requires: %{fillup_prereq}
|
||||
Requires: samba-client >= %{version}
|
||||
# Choose some features / extra packages here
|
||||
############################################
|
||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1120
|
||||
%if 0%{?suse_version} > 1120
|
||||
%define cifs_init_script cifs
|
||||
%else
|
||||
%define cifs_init_script smbfs
|
||||
%endif
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
||||
%if 0%{?suse_version} < 1111
|
||||
# pre-11.2 doesn't know the python_* macros
|
||||
%define python_sitelib %py_sitedir
|
||||
%define python_sitearch %py_sitedir
|
||||
%else (%if 0%{?centos_version} && 0%{?centos_version} < 600) || (0%{rhel_version} && 0%{rhel_version} < 600)
|
||||
%else
|
||||
# CentOS and RHEL pre-6 don't know them either
|
||||
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")
|
||||
%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
|
||||
@ -200,25 +159,13 @@ Requires: samba-client >= %{version}
|
||||
%else
|
||||
%define PIDDIR %{_localstatedir}/run/samba
|
||||
%endif
|
||||
%if "%{_vendor}" == "suse"
|
||||
%define NET_CFGDIR network
|
||||
%else
|
||||
%define NET_CFGDIR network-scripts
|
||||
%endif
|
||||
%define auth_modules auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4
|
||||
%define idmap_modules idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_rfc2307,idmap_rid,idmap_tdb2
|
||||
%define pdb_modules pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4
|
||||
%define vfs_modules vfs_cacheprime,vfs_readahead
|
||||
%if 0%{?ul_version} >= 1
|
||||
%define VENDOR UL
|
||||
%else
|
||||
%if "%{_vendor}" == "suse" || "%{_vendor}" == "redhat"
|
||||
%define VENDOR SUSE
|
||||
%else
|
||||
%define VENDOR %_vendor
|
||||
%endif
|
||||
%endif
|
||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1120
|
||||
%if 0%{?suse_version} > 1120
|
||||
%define cups_lib_dir %{_prefix}/lib/cups
|
||||
%else
|
||||
%define cups_lib_dir %{_libdir}/cups
|
||||
@ -281,7 +228,6 @@ Source Timestamp: %{SOURCE_TIMESTAMP}
|
||||
Branch: %{BRANCH}
|
||||
|
||||
|
||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1020
|
||||
%package core-devel
|
||||
Summary: Development files shared by Samba subpackages
|
||||
License: GPL-3.0+
|
||||
@ -294,9 +240,8 @@ develop programs which make use of Samba.
|
||||
|
||||
Source Timestamp: %{SOURCE_TIMESTAMP}
|
||||
Branch: %{BRANCH}
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1001 || 0%{?suse_version} > 1110
|
||||
%if 0%{?suse_version} > 1110
|
||||
|
||||
%package doc
|
||||
Summary: Samba Documentation
|
||||
@ -326,7 +271,7 @@ License: GPL-3.0+
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: /sbin/ldconfig
|
||||
Requires: krb5
|
||||
%if 0%{?suse_version} > 1210 && 0%{?suse_version} < 1315
|
||||
%if 0%{?suse_version} > 1210 && 0%{?suse_version} < 1315
|
||||
Requires: libfam0-gamin
|
||||
%endif
|
||||
|
||||
@ -342,9 +287,7 @@ Branch: %{BRANCH}
|
||||
Summary: Perl IDL compiler
|
||||
License: GPL-3.0+
|
||||
Group: Development/Tools
|
||||
%if 0%{?suse_version} > 0
|
||||
Requires: perl-base
|
||||
%endif
|
||||
Requires: perl-Parse-Yapp
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
@ -396,14 +339,10 @@ License: GPL-3.0+
|
||||
Group: Productivity/Networking/Samba
|
||||
Obsoletes: samba-gplv3-winbind < %{version}
|
||||
Provides: samba-client:/usr/sbin/winbindd
|
||||
%if 0%{?suse_version}
|
||||
Requires: pam-config
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1030
|
||||
Recommends: cron
|
||||
Recommends: logrotate
|
||||
Recommends: /usr/sbin/nscd
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1221
|
||||
Requires: %{?insserv_prereq}
|
||||
%endif
|
||||
@ -423,7 +362,6 @@ Branch: %{BRANCH}
|
||||
Summary: Clustered TDB
|
||||
License: GPL-3.0+
|
||||
Group: System/Daemons
|
||||
%if 0%{?suse_version}
|
||||
Requires(pre): %{?fillup_prereq}
|
||||
%if 0%{?suse_version} > 1220
|
||||
BuildRequires: systemd-rpm-macros
|
||||
@ -434,9 +372,6 @@ Requires: tdb-tools
|
||||
%else
|
||||
Requires(pre): %{insserv_prereq}
|
||||
%endif
|
||||
%else
|
||||
Requires(pre): /sbin/chkconfig
|
||||
%endif
|
||||
Requires(pre): coreutils
|
||||
Requires(pre): /bin/mktemp
|
||||
Requires(pre): /usr/bin/killall
|
||||
@ -931,9 +866,7 @@ Branch: %{BRANCH}
|
||||
|
||||
|
||||
%package -n %{libsmbclient_name}
|
||||
%if 0%{?suse_version} > 1030
|
||||
Obsoletes: libsmbclient < %{version}
|
||||
%endif
|
||||
Summary: Samba Client Library
|
||||
License: GPL-3.0+
|
||||
Group: System/Libraries
|
||||
@ -1055,7 +988,6 @@ test 0%{?fedora_version} -gt 0 && product_version=%{?fedora_version}
|
||||
test 0%{?mandriva_version} -gt 0 && product_version=%{?mandriva_version}
|
||||
test 0%{?rhel_version} -gt 0 && product_version=%{?rhel_version}
|
||||
test 0%{?suse_version} -gt 0 && product_version=%{?suse_version}
|
||||
%if 0%{?suse_version} > 0
|
||||
major_version=$((${product_version}/100))
|
||||
minor_version=$((${product_version}/10))
|
||||
minor_version="${minor_version#$major_version}"
|
||||
@ -1066,9 +998,6 @@ case "%{suse_version}" in
|
||||
1315) product_suffix="-SLE_12" ;;
|
||||
*) product_suffix="-oS${product_version}" ;;
|
||||
esac
|
||||
%else
|
||||
product_suffix="-OBS"
|
||||
%endif
|
||||
# Add the build architecture
|
||||
test "%{_build_arch}" != "" && \
|
||||
product_suffix="${product_suffix}-%{_build_arch}"
|
||||
@ -1082,7 +1011,7 @@ if command -v ncurses6-config &> /dev/null; then
|
||||
fi
|
||||
|
||||
export CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1141
|
||||
%if 0%{?suse_version} < 1141
|
||||
%{?suse_update_config:%{suse_update_config -f}}
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1111
|
||||
@ -1149,9 +1078,7 @@ install -d -m 0755 -p \
|
||||
%{buildroot}/%{_sysconfdir}/{pam.d,xinetd.d,logrotate.d} \
|
||||
%{buildroot}/%{_sysconfdir}/openldap/schema \
|
||||
%{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/{if-{down,up}.d,scripts} \
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1020
|
||||
%{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services \
|
||||
%endif
|
||||
%{buildroot}/%{_sysconfdir}/security \
|
||||
%{buildroot}/%{_sysconfdir}/slp.reg.d \
|
||||
%{buildroot}/%{CONFIGDIR} \
|
||||
@ -1192,11 +1119,7 @@ rm \
|
||||
%endif
|
||||
|
||||
# CTDB
|
||||
%if 0%{?suse_version}
|
||||
install -m 0644 vendor-files-%{vendor_files_git_vers}/config/sysconfig.ctdb %{buildroot}/%{_var}/adm/fillup-templates
|
||||
%else
|
||||
install -m 0644 vendor-files-%{vendor_files_git_vers}/config/sysconfig.ctdb ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/ctdb
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1220
|
||||
install -m 0755 ctdb/config/ctdb.service %{buildroot}%{_unitdir}/ctdb.service
|
||||
ln -s service %{buildroot}/%{_sbindir}/rcctdb
|
||||
@ -1231,12 +1154,12 @@ install -p -m 0644 config/smb.conf.vendor ../examples/smb.conf.%{VENDOR}
|
||||
for file in smb.conf lmhosts smbusers smbpasswd smbusers; do
|
||||
install -m 0644 "config/${file}" %{buildroot}/%{CONFIGDIR}/${file}
|
||||
done
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
install -m 0644 -p config/cifstab %{buildroot}/%{CONFIGDIR}/%{cifs_init_script}tab
|
||||
%endif
|
||||
section_names=$( sed -ne 's/^\[\(.*\)\]$/\1/p' config/smb.conf)
|
||||
for section in $section_names; do
|
||||
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1211
|
||||
%if 0%{?suse_version} < 1211
|
||||
LD_LIBRARY_PATH=../source3/bin/ \
|
||||
%endif
|
||||
../source3/bin/testparm -s --section-name "${section}" config/smb.conf >"%{buildroot}/%{_datadir}/samba/templates/default-${section}" || :
|
||||
@ -1246,7 +1169,6 @@ for file in config/templates/*; do
|
||||
done
|
||||
# start scripts
|
||||
scriptSuffix=""
|
||||
%if 0%{?suse_version}
|
||||
if test 0%{?suse_version} -lt 901; then
|
||||
scriptSuffix="-900"
|
||||
elif test 0%{?suse_version} -lt 1011; then
|
||||
@ -1256,9 +1178,8 @@ elif test 0%{?suse_version} -lt 1111; then
|
||||
elif test 0%{?suse_version} -lt 1131; then
|
||||
scriptSuffix="-1130"
|
||||
fi
|
||||
%endif
|
||||
startScripts="smb nmb winbind"
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
startScripts="${startScripts} %{cifs_init_script}"
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1220
|
||||
@ -1296,7 +1217,7 @@ install -m 0644 config/sysconfig.dhcp-samba-client %{buildroot}/%{_var}/adm/fill
|
||||
for script in dhcpcd-hook-samba dhcpcd-hook-samba-functions samba-winbindd; do
|
||||
install -m 0755 "tools/${script}" "%{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/${script}"
|
||||
done
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
touch %{buildroot}/var/run/%{cifs_init_script}
|
||||
%if 0%{?suse_version} < 1121
|
||||
sed -e 's/cifs/smbfs/g' tools/cifs >%{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script}
|
||||
@ -1309,28 +1230,20 @@ done
|
||||
for script in 21-dhcpcd-hook-samba 55-samba-winbindd; do
|
||||
touch %{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script}
|
||||
done
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
touch %{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/21-%{cifs_init_script}
|
||||
%endif
|
||||
# Install SuSEfirewall2 config files
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1020
|
||||
install -m 0644 config/sysconfig.firewall.netbios-server \
|
||||
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/netbios-server
|
||||
install -m 0644 config/sysconfig.firewall.samba-server \
|
||||
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-server
|
||||
%endif
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1100
|
||||
%if 0%{?suse_version} > 1100
|
||||
install -m 0644 config/sysconfig.firewall.samba-client \
|
||||
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-client
|
||||
%endif
|
||||
# Add logrotate settings for nmbd and smbd only on systems newer than 8.1.
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 811
|
||||
LOGROTATE_FILES="samba-winbind"
|
||||
rm -f "${RPM_BUILD_DIR}/samba-%{version}/filelist-samba"
|
||||
touch "${RPM_BUILD_DIR}/samba-%{version}/filelist-samba"
|
||||
%else
|
||||
LOGROTATE_FILES="samba samba-winbind"
|
||||
%endif
|
||||
for file in ${LOGROTATE_FILES}; do
|
||||
install -m 0644 logrotate/${file} %{buildroot}/%{_sysconfdir}/logrotate.d/${file}
|
||||
rm -f "${RPM_BUILD_DIR}/samba-%{version}/filelist-${file}"
|
||||
@ -1382,9 +1295,9 @@ done
|
||||
for file in %{buildroot}%{_mandir}/man8/vfs_*; do
|
||||
case "${file#%{buildroot}}" in
|
||||
%{_mandir}/man8/vfs_ceph.8)
|
||||
%if 0%{?build_ceph} == 0
|
||||
%if 0%{?build_ceph} == 0
|
||||
rm ${file}
|
||||
%endif
|
||||
%endif
|
||||
continue
|
||||
;;
|
||||
%{_mandir}/man8/vfs_glusterfs.8)
|
||||
@ -1407,7 +1320,7 @@ done
|
||||
install -m 0644 examples/LDAP/samba.schema %{buildroot}/%{_sysconfdir}/openldap/schema/samba3.schema
|
||||
install -m 0644 examples/LDAP/samba-nds.schema %{buildroot}/%{_datadir}/samba/LDAP/samba-nds.schema
|
||||
# Clean up installed doc if we have a noarch doc package
|
||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1000 && 0%{?suse_version} < 1120
|
||||
%if 0%{?suse_version} < 1120
|
||||
while read file; do
|
||||
rm -r "%{buildroot}/${file#%* }"
|
||||
done <"${RPM_BUILD_DIR}/samba-%{version}/filelist-samba-doc"
|
||||
@ -1455,7 +1368,7 @@ getent group ntadmin >/dev/null || groupadd -g 71 -o -r ntadmin || :
|
||||
%endif
|
||||
|
||||
%pre client
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
# non SUSE + 11.3 an newer, update, no cifstab, but smbfstab
|
||||
if [ ! 0%{?suse_version} -lt 1121 -a \
|
||||
${1:-0} -gt 1 -a \
|
||||
@ -1473,12 +1386,12 @@ fi
|
||||
/sbin/ldconfig
|
||||
if [ ${1:-0} -eq 1 ]; then
|
||||
# Only insserv cifs if we're not in update mode.
|
||||
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1131
|
||||
%if 0%{?suse_version} < 1131
|
||||
%{?insserv_force_if_yast:%{insserv_force_if_yast %{cifs_init_script}}}
|
||||
%endif
|
||||
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/21-dhcpcd-hook-samba
|
||||
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-dhcpcd-hook-samba
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script} %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/21-%{cifs_init_script}
|
||||
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script} %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-%{cifs_init_script}
|
||||
%endif
|
||||
@ -1488,7 +1401,7 @@ else
|
||||
continue
|
||||
rm -f %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/dhcpcd-hook-samba
|
||||
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/21-dhcpcd-hook-samba
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
test -h %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/%{cifs_init_script} || \
|
||||
continue
|
||||
rm -f %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/%{cifs_init_script}
|
||||
@ -1504,7 +1417,7 @@ for fn in brlock.tdb connections.tdb dbwrap_watchers.tdb gencache_notrans.tdb g_
|
||||
test ! -e %{LOCKDIR}/lock/$fn && test -e %{LOCKDIR}/$fn && \
|
||||
mv %{LOCKDIR}/$fn %{LOCKDIR}/lock/
|
||||
done
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
if [ ${1:-0} -gt 1 -a -f /var/adm/backup/etc_samba_smbfstab-move ]; then
|
||||
test -f /etc/samba/cifstab && \
|
||||
mv /etc/samba/cifstab /etc/samba/cifstab.rpmnew
|
||||
@ -1607,7 +1520,6 @@ fi
|
||||
|
||||
%postun winbind
|
||||
/sbin/ldconfig
|
||||
%if 0%{?suse_version}
|
||||
if [ $1 -eq 0 ]; then
|
||||
%{_sbindir}/pam-config --delete --winbind
|
||||
if [ -x %{_sbindir}/nscd ]; then
|
||||
@ -1615,7 +1527,6 @@ if [ -x %{_sbindir}/nscd ]; then
|
||||
%{_sbindir}/nscd -i group
|
||||
fi
|
||||
fi
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1220
|
||||
%service_del_postun winbind.service
|
||||
%else
|
||||
@ -1636,15 +1547,9 @@ fi
|
||||
%if 0%{?suse_version} > 1220
|
||||
%service_del_preun ctdb.service
|
||||
%endif
|
||||
%if 0%{?suse_version} == 0
|
||||
if [ $1 = 0 ] ; then
|
||||
test -x /sbin/chkconfig && /sbin/chkconfig --del ctdb
|
||||
fi
|
||||
%endif
|
||||
exit 0
|
||||
|
||||
%post -n ctdb
|
||||
%if 0%{?suse_version}
|
||||
%if 0%{?suse_version} > 1220
|
||||
%{fillup_only -n ctdb}
|
||||
%service_add_post ctdb.service
|
||||
@ -1652,20 +1557,13 @@ exit 0
|
||||
%else
|
||||
%{fillup_and_insserv -n ctdb}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%postun -n ctdb
|
||||
%if 0%{?suse_version}
|
||||
%if 0%{?suse_version} > 1220
|
||||
%service_del_postun ctdb.service
|
||||
%else
|
||||
%{insserv_cleanup}
|
||||
%endif
|
||||
%else
|
||||
if [ "$1" -ge "1" ]; then
|
||||
%{INITDIR}/ctdb restart >/dev/null
|
||||
fi
|
||||
%endif
|
||||
exit 0
|
||||
|
||||
%post -n %{libsmbclient_name} -p /sbin/ldconfig
|
||||
@ -1686,7 +1584,7 @@ fi
|
||||
%{_unitdir}/nmb.service
|
||||
%{_unitdir}/smb.service
|
||||
%endif
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
||||
%if 0%{?suse_version} < 1111
|
||||
%attr(0600,root,root) %config(noreplace) %{CONFIGDIR}/smbpasswd
|
||||
%else
|
||||
%ghost %{CONFIGDIR}/smbpasswd
|
||||
@ -1694,10 +1592,8 @@ fi
|
||||
%config(noreplace) %{CONFIGDIR}/smbusers
|
||||
%config %{_sysconfdir}/pam.d/samba
|
||||
%{_sysconfdir}/slp.reg.d
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1020
|
||||
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/netbios-server
|
||||
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-server
|
||||
%endif
|
||||
%dir %{_libdir}/samba
|
||||
%dir %{_libdir}/samba/vfs
|
||||
%dir %{_libdir}/samba/ldb
|
||||
@ -1713,7 +1609,7 @@ fi
|
||||
%{_sbindir}/rcnmb
|
||||
%{_sbindir}/rcsmb
|
||||
%{_sbindir}/smbd
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1100
|
||||
%if 0%{?suse_version} < 1100
|
||||
%dir %{_datadir}/omc
|
||||
%dir %{_datadir}/omc/svcinfo.d
|
||||
%endif
|
||||
@ -1725,9 +1621,6 @@ fi
|
||||
%{_mandir}/man5/smbpasswd.5.*
|
||||
%{_mandir}/man8/nmbd.8.*
|
||||
%{_mandir}/man8/smbd.8.*
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1021
|
||||
%{_includedir}/samba
|
||||
%endif
|
||||
%exclude %{_mandir}/man8/samba-tool.8.*
|
||||
%exclude %{_mandir}/man8/samba.8.*
|
||||
%if 0%{?suse_version} > 1220
|
||||
@ -1736,14 +1629,14 @@ fi
|
||||
|
||||
%files client
|
||||
%defattr(-,root,root)
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
||||
%if 0%{?suse_version} < 1221
|
||||
%attr(0754,root,root) %config %{INITDIR}/%{cifs_init_script}
|
||||
%attr(0600,root,root) %config(noreplace) %{CONFIGDIR}/%{cifs_init_script}tab
|
||||
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/21-%{cifs_init_script}
|
||||
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-%{cifs_init_script}
|
||||
%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script}
|
||||
%{_sbindir}/rc%{cifs_init_script}
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1100
|
||||
%if 0%{?suse_version} < 1100
|
||||
%dir %{_datadir}/omc
|
||||
%dir %{_datadir}/omc/svcinfo.d
|
||||
%endif
|
||||
@ -1760,7 +1653,7 @@ fi
|
||||
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-dhcpcd-hook-samba
|
||||
%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba
|
||||
%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba-functions
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1100
|
||||
%if 0%{?suse_version} > 1100
|
||||
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-client
|
||||
%endif
|
||||
%{_bindir}/cifsdd
|
||||
@ -1851,7 +1744,6 @@ fi
|
||||
%dir %{_tmpfilesdir}
|
||||
%{_tmpfilesdir}/samba.conf
|
||||
%endif
|
||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1020
|
||||
|
||||
%files core-devel
|
||||
%defattr(-,root,root)
|
||||
@ -1898,7 +1790,6 @@ fi
|
||||
%_includedir/samba-4.0/util_ldb.h
|
||||
%{_libdir}/libnss_winbind.so
|
||||
%{_libdir}/libnss_wins.so
|
||||
%endif
|
||||
|
||||
%files libs
|
||||
%defattr(-,root,root)
|
||||
@ -2066,7 +1957,7 @@ fi
|
||||
%{_mandir}/man8/idmap_tdb2.8.*
|
||||
%{_mandir}/man8/pam_winbind.8.*
|
||||
%{_mandir}/man8/winbindd.8.*
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1100
|
||||
%if 0%{?suse_version} < 1100
|
||||
%dir %{_datadir}/omc
|
||||
%dir %{_datadir}/omc/svcinfo.d
|
||||
%endif
|
||||
@ -2076,7 +1967,7 @@ fi
|
||||
%{_var}/adm/fillup-templates/sysconfig.samba-winbind
|
||||
%endif
|
||||
%attr(0770,root,root) %{_var}/cache/krb5rcache
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1001 || 0%{?suse_version} > 1110
|
||||
%if 0%{?suse_version} > 1110
|
||||
|
||||
%files doc -f filelist-samba-doc
|
||||
%defattr(-,root,root)
|
||||
@ -2087,11 +1978,7 @@ fi
|
||||
%files -n ctdb
|
||||
%defattr(-,root,root)
|
||||
%dir %{_sysconfdir}/ctdb
|
||||
%if 0%{?suse_version}
|
||||
%{_var}/adm/fillup-templates/sysconfig.ctdb
|
||||
%else
|
||||
%{_sysconfdir}/sysconfig/ctdb
|
||||
%endif
|
||||
%{_sysconfdir}/ctdb/notify.sh
|
||||
%{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
|
||||
%{_sysconfdir}/ctdb/debug-hung-script.sh
|
||||
|
Loading…
Reference in New Issue
Block a user