代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/mlocate 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%global _hardened_build 1
Name: mlocate
Version: 0.26
Release: 25
Summary: Application of finding files by name
License: GPLv2
URL: https://pagure.io/mlocate
Source0: https://releases.pagure.org/mlocate/mlocate-%{version}.tar.xz
Source1: updatedb.conf
Source2: mlocate-run-updatedb
Source3: mlocate-updatedb.service
Source4: mlocate-updatedb.timer
BuildRequires: gcc systemd
Requires(pre): shadow-utils
Requires(post): grep sed
# standard systemd requires
%{?systemd_requires}
Provides: bundled(gnulib)
Obsoletes: slocate <= 2.7-30
%description
mlocate is a locate/updatedb implementation. The 'm' stands for "merging":
updatedb reuses the existing database to avoid rereading most of the file
system, which makes updatedb faster and does not trash the system caches as
much.
%package_help
%prep
%autosetup -n %{name}-%{version}
%build
%configure --localstatedir=%{_localstatedir}/lib
%make_build groupname=slocate
%install
%make_install groupname=slocate
mkdir -p %{buildroot}{%{_sysconfdir},/etc/cron.daily}
install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/updatedb.conf
install -D -p -m 750 %{SOURCE2} %{buildroot}%{_libexecdir}/mlocate-run-updatedb
install -D -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/mlocate-updatedb.service
install -D -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/mlocate-updatedb.timer
# %%ghost semantics is so stupid
touch %{buildroot}%{_localstatedir}/lib/mlocate/mlocate.db
%find_lang mlocate
%pre
getent group slocate > /dev/null || groupadd -g 21 -r -f slocate
exit 0
%post
if grep -q '^[^#]*DAILY_UPDATE' %{_sysconfdir}/updatedb.conf; then
sed -i.rpmsave -e '/DAILY_UPDATE/s/^/#/' %{_sysconfdir}/updatedb.conf
fi
%systemd_post mlocate-updatedb.timer
systemctl start mlocate-updatedb.timer
%preun
%systemd_preun mlocate-updatedb.timer
%postun
%systemd_postun_with_restart mlocate-updatedb.timer
%triggerin -- %{name} < 0.26-11
systemctl start mlocate-updatedb.timer
%files -f mlocate.lang
%doc AUTHORS COPYING NEWS README
%config(noreplace) %{_sysconfdir}/updatedb.conf
%attr(2711,root,slocate) %{_bindir}/locate
%{_bindir}/updatedb
%{_unitdir}/mlocate-updatedb.service
%{_unitdir}/mlocate-updatedb.timer
%{_libexecdir}/mlocate-run-updatedb
%dir %attr(0750,root,slocate) %{_localstatedir}/lib/mlocate
%ghost %attr(0640,root,slocate) %{_localstatedir}/lib/mlocate/mlocate.db
%files help
%{_mandir}/man*/*
%changelog
* Sat Sep 5 2020 shixuantong <shixuantong@huawei.com> - 0.26-25
- update Source0 and URL
* Thu Feb 27 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.26-24
- Solve issue #I1ACCR: updatedb: can not find group 'mlocate'.
* Wed Jul 18 2018 openEuler Buildteam <buildteam@openeuler.org> - 0.26-23
- Package init.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。