diff --git a/mlocate.spec b/mlocate.spec index dffbb83..f7c9073 100644 --- a/mlocate.spec +++ b/mlocate.spec @@ -3,7 +3,7 @@ Summary: An utility for finding files by name Name: mlocate Version: 0.26 -Release: 26%{?dist} +Release: 27%{?dist} License: GPLv2 URL: https://fedorahosted.org/mlocate/ Source0: https://fedorahosted.org/releases/m/l/mlocate/mlocate-%{version}.tar.xz @@ -57,6 +57,17 @@ exit 0 if /bin/grep -q '^[^#]*DAILY_UPDATE' %{_sysconfdir}/updatedb.conf; then /bin/sed -i.rpmsave -e '/DAILY_UPDATE/s/^/#/' %{_sysconfdir}/updatedb.conf fi +# Bind mounts shouldn't be pruned on ostree based systems so locate works +# properly on HOME and other directories. We can't use the ostree-booted file +# to identy Silverblue - see +# https://github.com/fedora-silverblue/issue-tracker/issues/76#issuecomment-714562564 +. /etc/os-release || exit +if [ "$VARIANT_ID" = "silverblue" ] || [ -f /run/ostree-booted ]; then + if /bin/grep -q '^[^#]*PRUNE_BIND_MOUNTS' %{_sysconfdir}/updatedb.conf; then + /bin/sed -i.rpmsave -e '/PRUNE_BIND_MOUNTS/s/^/#/' %{_sysconfdir}/updatedb.conf + fi +fi + %systemd_post mlocate-updatedb.timer systemctl start mlocate-updatedb.timer @@ -82,6 +93,11 @@ systemctl start mlocate-updatedb.timer %ghost %attr(0640,root,slocate) %{_localstatedir}/lib/mlocate/mlocate.db %changelog +* Thu Oct 22 2020 Tomas Popela - 0.26-27 +- Don't prune bind mounts on ostree based systems, prune the deployments folder + there to avoid duplications. +- Fixes: https://github.com/fedora-silverblue/issue-tracker/issues/76 + * Tue Jul 28 2020 Fedora Release Engineering - 0.26-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/updatedb.conf b/updatedb.conf index 8b0b8e1..78df4fa 100644 --- a/updatedb.conf +++ b/updatedb.conf @@ -1,4 +1,4 @@ PRUNE_BIND_MOUNTS = "yes" PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset 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 udf usbfs ceph fuse.ceph" PRUNENAMES = ".git .hg .svn .bzr .arch-ids {arch} CVS" -PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache/ccache /var/lib/yum/yumdb /var/lib/dnf/yumdb /var/spool/cups /var/spool/squid /var/tmp /var/lib/ceph" +PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache/ccache /var/lib/yum/yumdb /var/lib/dnf/yumdb /var/spool/cups /var/spool/squid /var/tmp /var/lib/ceph /var/lib/mock /sysroot/ostree/deploy"