]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/commitdiff
man-db: Update to 2.11.2
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 25 Feb 2023 08:54:59 +0000 (09:54 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 25 Feb 2023 12:21:07 +0000 (12:21 +0000)
* 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@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
man-db/man-db.nm
man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch [deleted file]
man-db/systemd/man-db.service [deleted file]
man-db/systemd/man-db.timer [deleted file]

index 590349e9ab63a6aef40cbf851462bbd82eebb0d0..5d324053788ed593c0b54faa185c3dbbc870618e 100644 (file)
@@ -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 (file)
index b91e6d0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-From 1d523a44a5ad360c83bff362a625cc68cbe7f296 Mon Sep 17 00:00:00 2001
-From: Jan Chaloupka <jchaloup@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 (file)
index 4adc297..0000000
+++ /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 (file)
index ce43df1..0000000
+++ /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