autofs/autofs.spec
2022-01-12 18:48:05 +08:00

114 lines
4.1 KiB
RPMSpec

Name: autofs
Version: 5.1.8
Release: 1
Epoch: 1
Summary: A tool for automatically mounting and unmounting filesystems
License: GPL-2.0+ and GPL-2.0
URL: https://www.kernel.org/pub/linux/daemons/autofs/v5
Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz
Requires: bash coreutils sed gawk grep module-init-tools procps
Requires(post): systemd-sysv systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
BuildRequires: systemd-units systemd-devel autoconf openldap-devel bison flex libxml2-devel
BuildRequires: cyrus-sasl-devel openssl-devel module-init-tools util-linux e2fsprogs libtirpc-devel
BuildRequires: libsss_autofs libnsl2-devel rpcgen pkgconfig gcc
Conflicts: cyrus-sasl-lib < 2.1.23-9
%description
Autofs is a daemon that automatically mounts the file system when you use
the file system and automatically unmounts it when you are not using the
file system. Including network file system, CD-ROM, floppy disk, etc.
%package help
Summary: This package contains help documents
Requires: %{name} = %{epoch}:%{version}-%{release}
%description help
Files for help with autofs.
%prep
%autosetup -n %{name}-%{version} -p1
echo %{version}-%{release} > .version
%build
LDFLAGS=-Wl,-z,now
%configure --disable-mount-locking --enable-ignore-busy --enable-forced-shutdown --without-hesiod --with-libtirpc --with-systemd
make initdir=%{_initrddir} DONTSTRIP=1
%install
install -d -m 755 $RPM_BUILD_ROOT/usr/lib/systemd/system $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir}/autofs
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/{man5,man8} $RPM_BUILD_ROOT/etc/sysconfig $RPM_BUILD_ROOT/etc/auto.master.d
make install mandir=%{_mandir} initdir=%{_initrddir} systemddir=/usr/lib/systemd/system INSTALLROOT=$RPM_BUILD_ROOT
echo make -C redhat
make -C redhat
install -m 755 -d $RPM_BUILD_ROOT/misc
install -m 644 redhat/autofs.service $RPM_BUILD_ROOT/usr/lib/systemd/system/autofs.service
install -m 644 redhat/autofs.conf $RPM_BUILD_ROOT/etc/autofs.conf
install -m 644 redhat/autofs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/autofs
install -m 644 samples/auto.master $RPM_BUILD_ROOT/etc/auto.master
install -m 644 samples/auto.misc $RPM_BUILD_ROOT/etc/auto.misc
install -m 755 samples/auto.net $RPM_BUILD_ROOT/etc/auto.net
install -m 755 samples/auto.smb $RPM_BUILD_ROOT/etc/auto.smb
install -m 600 samples/autofs_ldap_auth.conf $RPM_BUILD_ROOT/etc/autofs_ldap_auth.conf
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%triggerun -- %{name} < 5.0.6-5
%{_bindir}/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||:
%{_sbindir}/chkconfig --del %{name} >/dev/null 2>&1 || :
%{_bindir}/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
%files
%doc COPY*
%config /usr/lib/systemd/system/autofs.service
%config(noreplace,missingok) /etc/auto.master
%config(noreplace) /etc/autofs.conf
%config(noreplace,missingok) /etc/auto.misc
%config(noreplace,missingok) /etc/auto.net
%config(noreplace,missingok) /etc/auto.smb
%config(noreplace) /etc/sysconfig/autofs
%config(noreplace) /etc/autofs_ldap_auth.conf
%{_sbindir}/automount
%dir %{_libdir}/autofs
%{_libdir}/libautofs.so
%{_libdir}/autofs/
%dir /etc/auto.master.d
%files help
%doc CREDITS INSTALL README* samples/ldap* samples/autofs.schema
%{_mandir}/*/*
%changelog
* Wed Jan 12 2022 caodongxia <caodongxia@huawei.com> - 1:5.1.8-1
- update to 5.1.8
* Tue Aug 10 2021 caodongxia <caodongxia@huawei.com> - 1:5.1.4-28
- Use default stack size for threads
* Mon May 31 2021 baizhonggui <baizhonggui@huawei.com> - 1:5.1.4-27
- Add gcc in BuildRequires
* Mon Jan 4 2021 Ge Wang <wangge20@huawei.com> - 1:5.1.4-26
- Modify license information
* Fri Sep 18 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 1:5.1.4-25
- Fix automount aborted when use -M option
* Thu Sep 17 2020 lingsheng <lingsheng@huawei.com> - 1:5.1.4-24
- Build without hesiod
* Tue Nov 26 2019 gulining<gulining1@huawei.com> - 1:5.1.4-23
- modify spec
* Tue Aug 20 2019 zhanghaibo <ted.zhang@huawei.com> - 1:5.1.4-22
- Package init