From: Stefan Schantl <stefan.schantl@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] man-db: Update to 2.11.2
Date: Sat, 25 Feb 2023 09:54:59 +0100 [thread overview]
Message-ID: <20230225085459.23203-1-stefan.schantl@ipfire.org> (raw)
[-- 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
reply other threads:[~2023-02-25 8:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230225085459.23203-1-stefan.schantl@ipfire.org \
--to=stefan.schantl@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox