Ignore caches and ephemeral file system types

... (rhbz#2033216, rhbz#2097889)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-08-17 13:36:23 +02:00
parent 526f0cad0d
commit b569c0c9bc
1 changed files with 9 additions and 3 deletions

View File

@ -42,14 +42,20 @@ cat >locate.1 <<EOF
.so man1/plocate.1
EOF
cat >updatedb.conf <<EOF
# https://bugzilla.redhat.com/show_bug.cgi?id=2033216
PRUNEFS = "tracefs gvfsd-fuse pstore cgroup cgroup2 devtmpfs 9p afs anon_inodefs auto autofs bdev binfmt_misc cifs coda configfs debugfs devpts ecryptfs exofs fuse fuse.sshfs fusectl gfs gfs2 gpfs hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs usbfs"
# https://bugzilla.redhat.com/show_bug.cgi?id=2097889
PRUNEPATHS = "/dev /sys /proc /run /var/cache"
EOF
%install
%meson_install
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/plocate.conf
ln -s plocate %{buildroot}%{_bindir}/locate
install -p -D -m 0644 -t %{buildroot}%{_mandir}/man1/ locate.1
mkdir %{buildroot}%{_sysconfdir}/
touch %{buildroot}%{_sysconfdir}/updatedb.conf
install -p -D -m 0644 -t %{buildroot}%{_sysconfdir}/ updatedb.conf
# A state file to carry information from %%post to %%posttrans. See
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_saving_state_between_scriptlets.
@ -98,7 +104,7 @@ fi
%_mandir/man8/plocate-build.8*
%_mandir/man8/updatedb.8*
%_sysusersdir/plocate.conf
%ghost %{_sysconfdir}/updatedb.conf
%config(noreplace) %{_sysconfdir}/updatedb.conf
%dir %{_sharedstatedir}/plocate
%{_sharedstatedir}/plocate/CACHEDIR.TAG
%ghost %attr(0640,-,plocate) %verify(not md5 mtime) %{_sharedstatedir}/plocate/plocate.db