From patchwork Sat Feb 25 08:54:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 6614 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4PP0vf050rz3wjy for ; Sat, 25 Feb 2023 08:55:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4PP0vc4dJ7zpH; Sat, 25 Feb 2023 08:55:08 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4PP0vc2kbNz2xWH; Sat, 25 Feb 2023 08:55:08 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4PP0vZ71Rsz2x9l for ; Sat, 25 Feb 2023 08:55:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4PP0vZ1vbjzlZ; Sat, 25 Feb 2023 08:55:06 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1677315306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7Ka1RTfV3MZ76pidrKQZ9xg8ASgDI6HxBOzloRSFS2U=; b=/yc6zcRSGp7pRpwpKB+iJli36hHTu9rTq8RCHw9LMVJ40qR3IV5EGR7LLjbUSocOGkgTGN /zijJApv8NUfXDCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1677315306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7Ka1RTfV3MZ76pidrKQZ9xg8ASgDI6HxBOzloRSFS2U=; b=WE8n1WDqO3Asb898JQIZxwe6jYSgXvQcCguqYFrNCWIjQdUj/hB/L1Qypdx8X0XvF3tFLq kGUpJBqW8roKTskGmP3OKY1UhpLFIy7uJ+IabhBf8vHwuS0/xB6z+HiIWqvP5IgVM7o0UR UsTFxAjvGcz08W9CMOltlALA7Cy6ga/2x086ke29p9RphwFhF9dB5X+rJzdzsRzHeP0RxG ibzAsSX+J+Kjc24Ng48oSiu3NlPBS6sQCws5vW1GMrujvcEFtK7lpGR11WzyzwbKzwnNsu hzOAcJgrrqOv9eI+8ucVOnmZ2Tffede5EWwLtoXV59wJOIb6NeIaEt2q9xLwPg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] man-db: Update to 2.11.2 Date: Sat, 25 Feb 2023 09:54:59 +0100 Message-Id: <20230225085459.23203-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" * Create man user/group for the man cache manager * Drop systemd files in favour of the project ones Signed-off-by: Stefan Schantl --- 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 -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