File autofs.spec of Package autofs.6209
#
# spec file for package autofs
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} >= 1230
%define with_sssd 1
%else
%define with_sssd 0
%endif
Name: autofs
Url: http://www.kernel.org/pub/linux/daemons/autofs/v5/
BuildRequires: autoconf
BuildRequires: bison
BuildRequires: cyrus-sasl-devel
BuildRequires: dbus-1-devel
BuildRequires: e2fsprogs
BuildRequires: flex
BuildRequires: krb5-devel
BuildRequires: libopenssl-devel
BuildRequires: libtirpc-devel
BuildRequires: libxml2-devel
BuildRequires: module-init-tools
BuildRequires: nfs-client
BuildRequires: openldap2-devel
BuildRequires: pkg-config
BuildRequires: systemd
%if %{with_sssd}
BuildRequires: sssd
%endif
Version: 5.0.9
Release: 0
Summary: A Kernel-Based Automounter
License: GPL-2.0-or-later
Group: System/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/%{name}-%{version}.tar.xz
Source1: sysconfig.autofs
Source3: autofs.schema
Source4: README.SUSE.ldap
Source5: README.SUSE
Source6: autofs.service
Source7: NetworkManager-autofs
Source8: get-upstream-patches
Patch01: autofs-5.0.9-check-for-non-existent-negative-entries.patch
Patch02: autofs-5-1-0-add-serialization-to-sasl-init.patch
Patch03: autofs-5.1.0-dont-pass-sloppy-option-for-other-than-nfs-mounts.patch
Patch04: autofs-5.1.0-make-negative-cache-update-consistent-for-all-lookup-modules.patch
Patch05: autofs-5.1.0-ensure-negative-cache-isnt-updated-on-remount.patch
Patch06: autofs-5.1.0-dont-add-wildcard-to-negative-cache.patch
Patch07: autofs-5.1.0-add-a-prefix-to-program-map-stdvars.patch
Patch08: autofs-5.1.0-add-config-option-to-force-use-of-program-map-stdvars.patch
Patch09: autofs-5-1-0-fix-gcc5-complaints.patch
Patch10: autofs-5.1.1-leave_auth_destroy.patch
Patch11: autofs-5-1-1-move-query-dn-calculation-from-do_bind-to-do_connect.patch
Patch12: autofs-5-1-1-make-do_connect-return-a-status.patch
Patch13: autofs-5-1-1-make-connect_to_server-return-a-status.patch
Patch14: autofs-5-1-1-make-find_dc_server-return-a-status.patch
Patch15: autofs-5-1-1-make-find_server-return-a-status.patch
Patch16: autofs-5-1-1-fix-return-handling-of-do_reconnect-in-ldap-module.patch
Patch17: autofs-5-1-1-fix-error-handling-on-ldap-bind-fail.patch
Patch18: autofs-5-1-1-define-monotonic-clock-helper-functions.patch
Patch19: autofs-5-1-1-use-monotonic-clock-for-alarm-thread-condition-wait.patch
Patch20: autofs-5-1-1-define-pending-condition-init-helper-function.patch
Patch21: autofs-5-1-1-use-monotonic-clock-for-direct-mount-condition.patch
Patch22: autofs-5-1-1-use-monotonic-clock-for-indirect-mount-condition.patch
Patch23: autofs-5-1-1-change-remaining-gettimeofday-to-use-clock_gettime.patch
Patch24: autofs-5-1-1-change-time-to-use-monotonic_clock.patch
Patch25: autofs-5-1-1-remove-unused-function-elapsed.patch
Patch26: autofs-5-1-1-fix-unbind-sasl-external-mech.patch
Patch27: autofs-5-1-1-fix-sasl-connection-concurrancy-problem.patch
Patch28: autofs-improve-scalability-of-direct-mount-path-comp.patch
Patch29: autofs-5.0.9-task-use-after-free.patch
Patch30: autofs-5.0.6-fix-yp-map-age-not-updated-in-s-_-.-g-case.patch
Patch31: autofs-5.0.6-properly-handle-errors-in-lookup_nss_mount.patch
Patch32: autofs-5-1-2-build-check-for-clock_gettime-in-librt.patch
Patch33: autofs-5-1-2-fix-file-map-changed-check.patch
Patch34: autofs-5-1-3-fix-possible-map-instance-memory-leak.patch
Patch35: autofs-5-1-3-check-map-instances-for-staleness-on-map-update.patch
Patch36: autofs-5-1-3-fix-ordering-of-seteuid-setegid-in-do_spawn.patch
Patch37: 0002-Fix-monotonic_elapsed.patch
Patch100: autofs-5.0.9-suse-auto_master_default.patch
Patch101: autofs-use-libldap_r-instead-of-libldap-for-thread-safety.patch
Patch200: autofs-debuginfo-fix.patch
Requires(pre): %fillup_prereq
Requires(pre): %insserv_prereq
Requires(pre): aaa_base
%{?systemd_requires}
Recommends: nfs-client
%description
AutoFS is a kernel-based automounter for Linux. It automatically
mounts filesystems when you use them, and unmounts them later when
you are not using them. This can include network filesystems, CD-ROMs,
floppies, and so forth.
%prep
%setup -q
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
#
#%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch100 -p1
%patch101 -p1
%patch200 -p1
# Must be after anything patching configure.in
autoreconf -fiv
%build
SUSE_ASNEEDED=0
%configure %{_target_cpu}-suse-linux \
--libdir=%{_libdir} --mandir=%{_mandir} \
--with-confdir=/etc/sysconfig \
--disable-mount-locking \
--enable-forced-shutdown \
--enable-ignore-busy \
--with-systemd \
--with-libtirpc \
--with-hesiod=no \
--with-sasl
make all DONTSTRIP=1 LOCAL_CFLAGS="%{optflags} %(getconf LFS_CFLAGS)" \
%{?_smp_mflags}
%install
make install INSTALLROOT=%{buildroot}
install -d -m 755 %{buildroot}%{_sysconfdir}/auto.master.d
install -D -m 644 %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.autofs
install -D -m 755 %{SOURCE7} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/autofs
ln -s /usr/sbin/service %{buildroot}/usr/sbin/rcautofs
ln -s %{_mandir}/man8/autofs.8.gz %{buildroot}/%{_mandir}/man8/rcautofs.8.gz
install -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/autofs.service
# will be installed by fillup scripts
rm -f %{buildroot}%{_sysconfdir}/sysconfig/autofs
%pre
%service_add_pre %{name}.service
%post
%{fillup_only -n autofs}
%service_add_post %{name}.service
%preun
%{stop_on_removal autofs}
%service_del_preun %{name}.service
%postun
%{restart_on_update autofs}
%{insserv_cleanup}
%service_del_postun %{name}.service
%files
%defattr (-, root, root)
%{_localstatedir}/adm/fillup-templates/sysconfig.autofs
%config(noreplace) %{_sysconfdir}/auto.master
%config(noreplace) %{_sysconfdir}/auto.misc
%config(noreplace) %{_sysconfdir}/auto.net
%config(noreplace) %{_sysconfdir}/auto.smb
%config(noreplace) %{_sysconfdir}/autofs_ldap_auth.conf
%dir %{_sysconfdir}/auto.master.d
%dir %{_sysconfdir}/NetworkManager
%dir %{_sysconfdir}/NetworkManager/dispatcher.d
%{_sysconfdir}/NetworkManager/dispatcher.d/autofs
%doc COPYRIGHT README README.changer README.ncpfs README.replicated-server
%doc README.smbfs README.v5.release autofs.schema README.active-restart
%doc README.SUSE README.SUSE.ldap
%dir %{_libdir}/autofs/
%{_libdir}/autofs/
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_sbindir}/automount
%{_sbindir}/rcautofs
%{_unitdir}/autofs.service
%changelog