* [PATCH] man-db: Update to 2.11.2
@ 2023-02-25 8:54 Stefan Schantl
0 siblings, 0 replies; only message in thread
From: Stefan Schantl @ 2023-02-25 8:54 UTC (permalink / raw)
To: development
[-- Attachment #1: Type: text/plain, Size: 3823 bytes --]
* Create man user/group for the man cache manager
* Drop systemd files in favour of the project ones
Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
---
man-db/man-db.nm | 23 ++++++++++++++++---
...and-root-in-init-systemd-man-db.conf.patch | 19 ---------------
man-db/systemd/man-db.service | 10 --------
man-db/systemd/man-db.timer | 10 --------
4 files changed, 20 insertions(+), 42 deletions(-)
delete mode 100644 man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch
delete mode 100644 man-db/systemd/man-db.service
delete mode 100644 man-db/systemd/man-db.timer
diff --git a/man-db/man-db.nm b/man-db/man-db.nm
index 590349e9a..5d3240537 100644
--- a/man-db/man-db.nm
+++ b/man-db/man-db.nm
@@ -4,8 +4,8 @@
###############################################################################
name = man-db
-version = 2.7.1
-release = 3
+version = 2.11.2
+release = 1
groups = Documentation
url = http://savannah.nongnu.org/projects/man-db
@@ -27,11 +27,15 @@ build
gdbm-devel
groff
less
- libpipeline-devel >= 1.4.0
+ libpipeline-devel >= 1.5.0
systemd-devel
zlib-devel
end
+ prepare_cmds
+ %{create_user}
+ end
+
configure_options += \
--with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \
--disable-setuid \
@@ -48,9 +52,18 @@ build
# Create cache directory.
mkdir -pv %{BUILDROOT}/var/cache/man
+
+ # Own the cache directory to the man user/group.
+ chown man:man %{BUILDROOT}/var/cache/man
end
end
+create_user
+ getent group man >/dev/null || groupadd -r -g 15 man
+ getent passwd man >/dev/null || useradd -r -g 15 \
+ -c "Manpage cache user" -d /var/cache/man -s /sbin/nologin man
+end
+
packages
package %{name}
groups += Base
@@ -70,6 +83,10 @@ packages
man
end
+ script prein
+ %{create_user}
+ end
+
script posttransin
# Update the database right now.
rm -rf /var/cache/man/*
diff --git a/man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch b/man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch
deleted file mode 100644
index b91e6d01a..000000000
--- a/man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From 1d523a44a5ad360c83bff362a625cc68cbe7f296 Mon Sep 17 00:00:00 2001
-From: Jan Chaloupka <jchaloup(a)redhat.com>
-Date: Wed, 15 Oct 2014 09:46:56 +0200
-Subject: [PATCH] switch man and root in init/systemd/man-db.conf
-
----
- init/systemd/man-db.conf | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/init/systemd/man-db.conf b/init/systemd/man-db.conf
-index 10b27b4..43dd2ad 100644
---- a/init/systemd/man-db.conf
-+++ b/init/systemd/man-db.conf
-@@ -1 +1 @@
--d /var/cache/man 2755 man root 1w
-+d /var/cache/man 2755 root man 1w
---
-1.9.3
-
diff --git a/man-db/systemd/man-db.service b/man-db/systemd/man-db.service
deleted file mode 100644
index 4adc29792..000000000
--- a/man-db/systemd/man-db.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Update man-db cache
-RequiresMountsFor=/var/cache/man
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/mandb --quiet
-Nice=19
-IOSchedulingClass=best-effort
-IOSchedulingPriority=7
diff --git a/man-db/systemd/man-db.timer b/man-db/systemd/man-db.timer
deleted file mode 100644
index ce43df175..000000000
--- a/man-db/systemd/man-db.timer
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Daily man-db cache update
-
-[Timer]
-OnCalendar=daily
-AccuracySec=12h
-Persistent=true
-
-[Install]
-WantedBy=multi-user.target
--
2.30.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-25 8:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-25 8:54 [PATCH] man-db: Update to 2.11.2 Stefan Schantl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox