Initial import for CentOS Stream 10

Resolves: RHEL-36785
This commit is contained in:
Lukáš Zaoral 2024-05-23 16:29:38 +02:00
parent 4f48a63f09
commit 31186d6461
No known key found for this signature in database
GPG Key ID: 39157506DD67752D
5 changed files with 200 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/plocate-1.1.22.tar.gz

81
changelog Normal file
View File

@ -0,0 +1,81 @@
* Thu May 16 2024 Lukáš Zaoral <lzaoral@redhat.com> - 1.1.22-3
- migrate to SPDX license format
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.22-1
- Version 1.1.22 (rhbz#2259687)
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.17-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 27 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.17-1
- Version 1.1.17
- Bump Obsoletes for cover mlocate in F37 and F38.
* Wed Aug 17 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.16-3
- Update default config to use the defaults in Debian
* Wed Aug 17 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.16-2
- Ignore caches and ephemeral file system types (rhbz#2033216,
rhbz#2097889)
* Wed Aug 17 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.16-1
- Version 1.1.16
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.15-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Mar 06 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.15-3
- Add Obsoletes for mlocate versions in F35- (for #2052433)
* Sat Feb 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.15-2
- Add virtual Provides:locate to make upgrades easier (rhbz#2052433)
* Sat Feb 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.15-1
- Version 1.1.15
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.13-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Nov 26 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.13-4
- Fix mode in %%ghost line
* Wed Nov 24 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.13-3
- Add %%ghost for /etc/updatedb.conf
* Wed Nov 24 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.13-2
- Add locate(1) man page alias
* Wed Nov 24 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.13-1
- Version 1.1.13
* Fri Oct 29 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.12-2
- Remove plocate.db when the package is removed
* Fri Oct 29 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.12-1
- Version 1.1.12
* Tue Sep 14 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.11-2
- Upload sources
* Wed Sep 08 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.11-1
- Version 1.1.11
* Mon Jun 21 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.8-1
- Update to latest version
* Wed May 12 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.7-1
- Resolve comments from initial review
- Start the service and timer in %%posttrans
- Conflict with mlocate and provide /bin/locate alias
* Fri Feb 19 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.4-1
- First version

116
plocate.spec Normal file
View File

@ -0,0 +1,116 @@
Name: plocate
Version: 1.1.22
Release: %autorelease
Summary: Much faster locate
# Licensing information taken from README:
# * plocate (except updatedb) - GPL-2.0-or-later
# * updatedb - GPL-2.0-only
License: GPL-2.0-or-later AND GPL-2.0-only
URL: https://plocate.sesse.net/
Source0: https://plocate.sesse.net/download/plocate-%{version}.tar.gz
Source1: plocate.sysusers
BuildRequires: meson
BuildRequires: gcc-c++
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(liburing)
BuildRequires: pkgconfig(libzstd)
BuildRequires: libatomic
# The plan is to provide both mlocate and plocate for one or two
# Fedora releases, and then retire mlocate when the bugs in plocate
# have been ironed out. Thus, we only allow one or the other to be
# installed.
Conflicts: mlocate
Provides: locate
# https://bugzilla.redhat.com/show_bug.cgi?id=2052433
Obsoletes: mlocate < 0.26-500
%description
plocate is a locate(1) based on posting lists, giving much faster
searches on a much smaller index. It is a drop-in replacement for
mlocate in nearly all aspects, and is fast on SSDs and non-SSDs alike.
%prep
%autosetup -p1
%build
%meson -Dsystemunitdir=%_unitdir -Dinstall_systemd=true
%meson_build
# Man page alias
cat >locate.1 <<EOF
.so man1/plocate.1
EOF
cat >updatedb.conf <<EOF
# https://bugzilla.redhat.com/show_bug.cgi?id=2033216
PRUNEFS = "9p afs autofs binfmt_misc ceph cgroup cgroup2 cifs coda configfs curlftpfs debugfs devfs devpts devtmpfs ecryptfs ftpfs fuse.ceph fuse.cryfs fuse.encfs fuse.glusterfs fuse.gvfsd-fuse fuse.mfs fuse.rclone fuse.rozofs fuse.sshfs fusec fusesmb gfs gfs2 gpfs hugetlbfs iso9660 lustre lustre_lite mfs mqueue ncpfs nfs nfs4 ocfs ocfs2 proc pstore ramfs pstorefs rootfs rpc_pipefs securityfs smbfs sysfs tmpfs tracefs udev udf usbfs"
# https://bugzilla.redhat.com/show_bug.cgi?id=2097889
PRUNEPATHS = "/tmp /media /dev /sys /proc /run /var/cache /var/spool"
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
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.
%global plocate_start_now %{_localstatedir}/lib/rpm-state/plocate_start_now
%pre
%sysusers_create_compat %{SOURCE1}
%post
%systemd_post plocate-updatedb.service plocate-updatedb.timer
if [ $1 == 1 ] && [ -d /run/systemd ]; then
touch %{plocate_start_now} || :
fi
%preun
%systemd_preun plocate-updatedb.service plocate-updatedb.timer
%postun
%systemd_postun_with_restart plocate-updatedb.service plocate-updatedb.timer
%posttrans
# The timer runs once per day. On new installs, let's start both the
# timer and the service immediately in the background, so that the db
# becomes populated. When people install this package onto a running
# system, it's reasonable to assume that they want to use the database.
if [ -f %{plocate_start_now} ]; then
rm %{plocate_start_now} || :
if systemctl is-enabled plocate-updatedb.timer &>/dev/null; then
systemctl start --no-block plocate-updatedb.timer plocate-updatedb.service || :
fi
fi
%files
%license COPYING
%doc README
%attr(02755,-,plocate) %_bindir/plocate
%_bindir/locate
%_sbindir/plocate-build
%_sbindir/updatedb
%_unitdir/plocate-updatedb.service
%_unitdir/plocate-updatedb.timer
%_mandir/man1/plocate.1*
%_mandir/man1/locate.1*
%_mandir/man5/updatedb.conf.5*
%_mandir/man8/plocate-build.8*
%_mandir/man8/updatedb.8*
%_sysusersdir/plocate.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
%changelog
%autochangelog

1
plocate.sysusers Normal file
View File

@ -0,0 +1 @@
g plocate -

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (plocate-1.1.22.tar.gz) = c26ea85f4cc7249f1af7450cfd07f59a03ea98b970f4be67222282fda7789bf9a8fe3d24835f6f3f6068d54802c1fe1e2b9a487e04d568965a23df34845178c1