|
Packit |
8480eb |
#
|
|
Packit |
8480eb |
#
|
|
Packit |
8480eb |
%ifarch sparc i386 i586 i686
|
|
Packit |
8480eb |
%define _lib lib
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%ifarch x86_64 sparc64
|
|
Packit |
8480eb |
%define _lib lib64
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
# Use --without systemd in your rpmbuild command or force values to 0 to
|
|
Packit |
8480eb |
# disable them.
|
|
Packit |
8480eb |
%define with_systemd %{?_without_systemd: 0} %{?!_without_systemd: 1}
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
# Use --without libtirpc in your rpmbuild command or force values to 0 to
|
|
Packit |
8480eb |
# disable them.
|
|
Packit |
8480eb |
%define with_libtirpc %{?_without_libtirpc: 0} %{?!_without_libtirpc: 1}
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Summary: A tool from automatically mounting and umounting filesystems.
|
|
Packit |
8480eb |
Name: autofs
|
|
Packit |
8480eb |
%define version 5.1.4
|
|
Packit |
8480eb |
%define release 1
|
|
Packit |
8480eb |
Version: %{version}
|
|
Packit |
8480eb |
Release: %{release}
|
|
Packit |
8480eb |
License: GPL
|
|
Packit |
8480eb |
Group: System Environment/Daemons
|
|
Packit |
8480eb |
Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz
|
|
Packit |
8480eb |
Buildroot: %{_tmppath}/%{name}-tmp
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
BuildRequires: systemd-units
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
%if %{with_libtirpc}
|
|
Packit |
8480eb |
BuildRequires: libtirpc-devel
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, cyrus-sasl-devel
|
|
Packit |
8480eb |
Requires: chkconfig
|
|
Packit |
8480eb |
Requires: /bin/bash mktemp sed textutils sh-utils grep /bin/ps
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
Requires(post): systemd-sysv
|
|
Packit |
8480eb |
Requires(post): systemd-units
|
|
Packit |
8480eb |
Requires(preun): systemd-units
|
|
Packit |
8480eb |
Requires(postun): systemd-units
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
Obsoletes: autofs-ldap
|
|
Packit |
8480eb |
Summary(de): autofs daemon
|
|
Packit |
8480eb |
Summary(fr): démon autofs
|
|
Packit |
8480eb |
Summary(tr): autofs sunucu süreci
|
|
Packit |
8480eb |
Summary(sv): autofs-daemon
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%description
|
|
Packit |
8480eb |
autofs is a daemon which automatically mounts filesystems when you use
|
|
Packit |
8480eb |
them, and unmounts them later when you are not using them. This can
|
|
Packit |
8480eb |
include network filesystems, CD-ROMs, floppies, and so forth.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%description -l de
|
|
Packit |
8480eb |
autofs ist ein Dämon, der Dateisysteme automatisch montiert, wenn sie
|
|
Packit |
8480eb |
benutzt werden, und sie später bei Nichtbenutzung wieder demontiert.
|
|
Packit |
8480eb |
Dies kann Netz-Dateisysteme, CD-ROMs, Disketten und ähnliches einschließen.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%description -l fr
|
|
Packit |
8480eb |
autofs est un démon qui monte automatiquement les systèmes de fichiers
|
|
Packit |
8480eb |
lorsqu'on les utilise et les démonte lorsqu'on ne les utilise plus. Cela
|
|
Packit |
8480eb |
inclus les systèmes de fichiers réseau, les CD-ROMs, les disquettes, etc.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%description -l tr
|
|
Packit |
8480eb |
autofs, kullanýlan dosya sistemlerini gerek olunca kendiliðinden baðlar
|
|
Packit |
8480eb |
ve kullanýmlarý sona erince yine kendiliðinden çözer. Bu iþlem, að dosya
|
|
Packit |
8480eb |
sistemleri, CD-ROM'lar ve disketler üzerinde yapýlabilir.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%description -l sv
|
|
Packit |
8480eb |
autofs är en daemon som mountar filsystem när de använda, och senare
|
|
Packit |
8480eb |
unmountar dem när de har varit oanvända en bestämd tid. Detta kan
|
|
Packit |
8480eb |
inkludera nätfilsystem, CD-ROM, floppydiskar, och så vidare.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%prep
|
|
Packit |
8480eb |
%setup -q -n %{name}-%{version}
|
|
Packit |
8480eb |
echo %{version}-%{release} > .version
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
%define unitdir %{?_unitdir:/lib/systemd/system}
|
|
Packit |
8480eb |
%define systemd_configure_arg --with-systemd
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
%if %{with_libtirpc}
|
|
Packit |
8480eb |
%define libtirpc_configure_arg --with-libtirpc
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%build
|
|
Packit |
8480eb |
CFLAGS="$RPM_OPT_FLAGS -Wall" \
|
|
Packit |
8480eb |
LDFLAGS="-Wl,-z,now" \
|
|
Packit |
8480eb |
./configure --libdir=%{_libdir} \
|
|
Packit |
8480eb |
--disable-mount-locking \
|
|
Packit |
8480eb |
--enable-ignore-busy \
|
|
Packit |
8480eb |
%{?systemd_configure_arg:} \
|
|
Packit Bot |
06041b |
%{?libtirpc_configure_arg:}
|
|
Packit |
8480eb |
CFLAGS="$RPM_OPT_FLAGS -Wall" LDFLAGS="-Wl,-z,now" make initdir=/etc/rc.d/init.d DONTSTRIP=1
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%install
|
|
Packit |
8480eb |
rm -rf $RPM_BUILD_ROOT
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
install -d -m 755 $RPM_BUILD_ROOT%{unitdir}
|
|
Packit |
8480eb |
%else
|
|
Packit |
8480eb |
mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
mkdir -p -m755 $RPM_BUILD_ROOT%{_sbindir}
|
|
Packit |
8480eb |
mkdir -p -m755 $RPM_BUILD_ROOT%{_libdir}/autofs
|
|
Packit |
8480eb |
mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/{man5,man8}
|
|
Packit |
8480eb |
mkdir -p -m755 $RPM_BUILD_ROOT/etc/sysconfig
|
|
Packit |
8480eb |
mkdir -p -m755 $RPM_BUILD_ROOT/etc/auto.master.d
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
make install mandir=%{_mandir} initdir=/etc/rc.d/init.d INSTALLROOT=$RPM_BUILD_ROOT
|
|
Packit |
8480eb |
echo make -C redhat
|
|
Packit |
8480eb |
make -C redhat
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
# Configure can get this wrong when the unit files appear under /lib and /usr/lib
|
|
Packit |
8480eb |
find $RPM_BUILD_ROOT -type f -name autofs.service -exec rm -f {} \;
|
|
Packit |
8480eb |
install -m 644 redhat/autofs.service $RPM_BUILD_ROOT%{unitdir}/autofs.service
|
|
Packit |
8480eb |
%define init_file_name %{unitdir}/autofs.service
|
|
Packit |
8480eb |
%else
|
|
Packit |
8480eb |
install -m 755 redhat/autofs.init $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs
|
|
Packit |
8480eb |
%define init_file_name /etc/rc.d/init.d/autofs
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
install -m 644 redhat/autofs.conf $RPM_BUILD_ROOT/etc/autofs.conf
|
|
Packit |
8480eb |
install -m 644 redhat/autofs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/autofs
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%clean
|
|
Packit |
8480eb |
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%post
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
if [ $1 -eq 1 ]; then
|
|
Packit |
8480eb |
%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
Packit |
8480eb |
# autofs has been approved to be enabled by default
|
|
Packit |
8480eb |
%{_bindir}/systemctl enable %{name}.service >/dev/null 2>&1 || :
|
|
Packit |
8480eb |
fi
|
|
Packit |
8480eb |
%else
|
|
Packit |
8480eb |
if [ $1 -eq 1 ]; then
|
|
Packit |
8480eb |
%{_sbindir}/chkconfig --add autofs
|
|
Packit |
8480eb |
fi
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%preun
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
if [ $1 -eq 0 ] ; then
|
|
Packit |
8480eb |
%{_bindir}/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
|
|
Packit |
8480eb |
%{_bindir}/systemctl stop %{name}.service > /dev/null 2>&1 || :
|
|
Packit |
8480eb |
fi
|
|
Packit |
8480eb |
%else
|
|
Packit |
8480eb |
if [ $1 -eq 0 ] ; then
|
|
Packit |
8480eb |
%{_sbindir}/service autofs stop > /dev/null 2>&1 || :
|
|
Packit |
8480eb |
%{_sbindir}/chkconfig --del autofs
|
|
Packit |
8480eb |
fi
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%postun
|
|
Packit |
8480eb |
%if %{with_systemd}
|
|
Packit |
8480eb |
%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
Packit |
8480eb |
if [ $1 -ge 1 ] ; then
|
|
Packit |
8480eb |
# Package upgrade, not removal
|
|
Packit |
8480eb |
%{_bindir}/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
|
|
Packit |
8480eb |
fi
|
|
Packit |
8480eb |
%else
|
|
Packit |
8480eb |
if [ $1 -ge 1 ] ; then
|
|
Packit |
8480eb |
%{_sbindir}/service autofs condrestart > /dev/null 2>&1 || :
|
|
Packit |
8480eb |
fi
|
|
Packit |
8480eb |
%endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
#%triggerun -- %{name} < $bla release
|
|
Packit |
8480eb |
## Save the current service runlevel info
|
|
Packit |
8480eb |
## User must manually run systemd-sysv-convert --apply %{name}
|
|
Packit |
8480eb |
## to migrate them to systemd targets
|
|
Packit |
8480eb |
#%{_bindir}/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||:
|
|
Packit |
8480eb |
#
|
|
Packit |
8480eb |
## Run these because the SysV package being removed won't do them
|
|
Packit |
8480eb |
#%{_sbindir}/chkconfig --del %{name} >/dev/null 2>&1 || :
|
|
Packit |
8480eb |
#%{_bindir}/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%files
|
|
Packit |
8480eb |
%defattr(-,root,root)
|
|
Packit |
8480eb |
%doc CREDITS CHANGELOG INSTALL COPY* README* samples/ldap* samples/autofs.schema samples/autofs_ldap_auth.conf
|
|
Packit |
8480eb |
%config %{init_file_name}
|
|
Packit |
8480eb |
%config(noreplace) /etc/auto.master
|
|
Packit |
8480eb |
%config(noreplace) /etc/autofs.conf
|
|
Packit |
8480eb |
%config(noreplace,missingok) /etc/auto.misc
|
|
Packit |
8480eb |
%config(noreplace,missingok) /etc/auto.net
|
|
Packit |
8480eb |
%config(noreplace,missingok) /etc/auto.smb
|
|
Packit |
8480eb |
%config(noreplace) /etc/sysconfig/autofs
|
|
Packit |
8480eb |
%config(noreplace) /etc/autofs_ldap_auth.conf
|
|
Packit |
8480eb |
%{_sbindir}/automount
|
|
Packit |
8480eb |
%dir %{_libdir}/autofs
|
|
Packit |
8480eb |
%{_libdir}/autofs/*
|
|
Packit |
8480eb |
%{_mandir}/*/*
|
|
Packit |
8480eb |
%dir /etc/auto.master.d
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
%changelog
|
|
Packit |
8480eb |
* Wed May 24 2017 Ian Kent <raven@themaw.net>
|
|
Packit |
8480eb |
- Update package to version 5.1.3.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
* Wed Jun 15 2016 Ian Kent <raven@themaw.net>
|
|
Packit |
8480eb |
- Update package to version 5.1.2.
|
|
Packit |
8480eb |
|