From patchwork Thu Apr 17 09:42:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Josefsson X-Patchwork-Id: 41724 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9037F27BC4B; Thu, 17 Apr 2025 10:46:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5383427BC49 for ; Thu, 17 Apr 2025 10:46:53 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u5LpF-0004X1-Nj; Thu, 17 Apr 2025 05:46:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u5Loo-0004Mt-Oj for guix-patches@gnu.org; Thu, 17 Apr 2025 05:46:13 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u5Loo-0000GK-EJ for guix-patches@gnu.org; Thu, 17 Apr 2025 05:46:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=9TUyLsEin50Lc2/w5lLVXaJUFWih7r7I6m9ixuyS6mk=; b=KhCz99zj76Rfv0HO7MCowDG1m5pGKVFNCXbPuCASVlU1kI0tbTusBCUf6lAaUryooLOrdPWACmQQiHQHjpa6+viMGyR1o+9hpwJK2zaSs3RUTSF07oigH2Scbvqs81gL0Rw5J9V1FddP+1qqppa0t9/2KRL9xsas2o0HvT9LflloqpRv/gNS5BiX0e7ZvdLqM4zOVkefg23lCW9x31rPUI859ZH8Pe9CmJ/ZJnT1XTkolS8oJtNPRYizN3pYJKTvnP0YuoFRMrl6k/MoD+lQdDhO8v416g8xQU02auiJOMOiYNQAEV5yGUXocZzTrZ3ZVFwR+tFVrmUM+3s7hVPKMw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u5Loo-0003wf-8r for guix-patches@gnu.org; Thu, 17 Apr 2025 05:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77860] [PATCH] Shepherd: build: Improve man-page NAME whatis string for *.8. Resent-From: Simon Josefsson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Apr 2025 09:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77860@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174488310814602 (code B ref -1); Thu, 17 Apr 2025 09:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Apr 2025 09:45:08 +0000 Received: from localhost ([127.0.0.1]:45827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5Lnv-0003nS-9Q for submit@debbugs.gnu.org; Thu, 17 Apr 2025 05:45:07 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42126) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u5Lnr-0003lx-Rw for submit@debbugs.gnu.org; Thu, 17 Apr 2025 05:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u5LnW-00031X-Cz for guix-patches@gnu.org; Thu, 17 Apr 2025 05:44:50 -0400 Received: from uggla.sjd.se ([2001:9b1:8633::107]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u5LnT-0008NP-38 for guix-patches@gnu.org; Thu, 17 Apr 2025 05:44:42 -0400 DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=ed2303; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description; bh=9TUyLsEin50Lc2/w5lLVXaJUFWih7r7I6m9ixuyS6mk=; t=1744883070; x=1746092670; b=CoHiVyUs6tRpx3DOaAjZ1pnJQaZ/Tc4qf9eQKf7rWB76VnG DX672llP17EnXC+Y6dJQKZUsxoK1Y7XvUOJ2yAw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=rsa2303; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description; bh=9TUyLsEin50Lc2/w5lLVXaJUFWih7r7I6m9ixuyS6mk=; t=1744883070; x=1746092670; b=w3ZP4OA3XDQiUhuKQM5QuxCoMI+N9HlzU6pKQjYvKvbAXSs RKEq/+uOlX5VcHKHgSa8dvcKtthpo/PqZ2MqxHw3/c2ETIcNyFFopE/SiQRYrAYy+fys+rZedm2/P 94WlrLHYHhk7NHPC2OXajCyxRMceaQ5BAsHuo+lDnBH4hjzlqoTP82N8+jir/U8KSEqLK6abCHx1y Znwcg9lxTz6L3uTyfhd8pwh7bW11+RqXDpADJsQ4eBJ7k3jIlE971xjnMziZi+4ew1+7/HL3BMDKw GeM82/hNaz06TS1Z/Zn1lhQ0K+AbmPhMUxkStr1ASIEflBffhNCOfK6mpkAjbNGkij18TidTSSLrr yYZxHOi0IbJ2W5Y02mqDB8sDRfdXtkrTd0flb8AijUYppJrn64LdXAxjNpT0gsFA3nIJXXLxqVqS/ +XeOw7Y9I5955+Lc/dhPgwap; Received: from h-155-4-221-32.na.cust.bahnhof.se ([155.4.221.32]:57444 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1u5LnH-005WQ9-An for guix-patches@gnu.org; Thu, 17 Apr 2025 09:44:27 +0000 OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE; url=https://josefsson.org/key-20190320.txt X-Hashcash: 1:23:250417:guix-patches@gnu.org::Wm/GhSos21aIILKC:1Kdsx Date: Thu, 17 Apr 2025 11:42:45 +0200 Message-ID: <87tt6nunsa.fsf@josefsson.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Received-SPF: pass client-ip=2001:9b1:8633::107; envelope-from=simon@josefsson.org; helo=uggla.sjd.se X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Simon Josefsson X-ACL-Warn: , Simon Josefsson via Guix-patches X-Patchwork-Original-From: Simon Josefsson via Guix-patches via From: Simon Josefsson Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi, Thanks for 1.0.4! Frequent releases helps to iterate on small improvements that I'm reminded of when a new release happens. The Debian packages now puts halt and reboot below /usr/libexec/shepherd/ like this: jas@kaka:~/src/shepherd$ ls -la /usr/libexec/shepherd/sbin/ totalt 16 drwxr-xr-x 2 root root 4096 17 apr 10.54 . drwxr-xr-x 3 root root 4096 19 mar 13.43 .. -rwxr-xr-x 1 root root 288 17 apr 09.24 halt -rwxr-xr-x 1 root root 290 17 apr 09.24 reboot lrwxrwxrwx 1 root root 4 17 apr 09.24 shutdown -> halt jas@kaka:~/src/shepherd$ This allows someone to use `PATH=/usr/libexec/shepherd/sbin:$PATH` to use Shepherd's halt and reboot commands. It is unclear to me why anyone would want that, but it seems conceviable, and I recall hearing from people who managed to use Shepherd as pid 1 on a Debian system. Man pages for these commands are installed as shepherd-halt.8 and shepherd-reboot.8 to not conflict with Debian's halt(8) and reboot(8). Maybe there is a better way to deal with that, but it seems better to ship them under another name than to not ship them at all, pending some better approach. The QA tooling complained about these manpages: W: shepherd: useless-whatis-entry [usr/share/man/man8/shepherd-halt.8.gz] N: N: The whatis entry for this manual page (the brief description found in the N: NAME section) is of the form: N: N: program - manual page for program N: N: This conveys no information about what the program is for and is N: repetitive. The short description should contain brief information about N: what the program is for to aid in searching with apropos and similar N: programs. N: N: If this manual page was generated by help2man, use the -n option to N: provide a more meaningful description. That is the same as for shepherd.1 and herd.1 that you patched earlier: https://issues.guix.gnu.org/76435 The attached patch solves the same issue but for halt.8 and reboot.8. This uses help2man's --include-opt instead which I think is a better mechanism (and allows the relevant SEE ALSO). What do you think? If this approach seems right, I may propose a patch to create doc/shepherd.1.h2m and doc/herd.1.h2m too, cleaning up Makefile.am slightly. /Simon From d97e2485ca700162474d40ffde0b53a06e358ee6 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 17 Apr 2025 11:13:14 +0200 Subject: [PATCH] build: Improve man-page NAME whatis string for *.8. * Makefile.am (%.8): Pass --include-opt. doc/halt.8.h2m: Add. doc/reboot.8.h2m: Add. Makefile.am (EXTRA_DIST): Add doc/*.h2m's. --- Makefile.am | 3 +++ doc/halt.8.h2m | 4 ++++ doc/reboot.8.h2m | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 doc/halt.8.h2m create mode 100644 doc/reboot.8.h2m diff --git a/Makefile.am b/Makefile.am index a61b403..bdb1909 100644 --- a/Makefile.am +++ b/Makefile.am @@ -143,8 +143,11 @@ doc/herd.1: modules/shepherd/scripts/herd.scm configure.ac doc/%.8: modules/shepherd/scripts/%.scm configure.ac $(gen_man) --section=8 --output="$@" \ + --include=$(srcdir)/$@.h2m \ "$(top_builddir)/`basename "$@" .8`" +EXTRA_DIST += doc/halt.8.h2m doc/reboot.8.h2m + dist_man1_MANS = doc/shepherd.1 doc/herd.1 dist_man8_MANS = doc/halt.8 doc/reboot.8 diff --git a/doc/halt.8.h2m b/doc/halt.8.h2m new file mode 100644 index 0000000..b6162d8 --- /dev/null +++ b/doc/halt.8.h2m @@ -0,0 +1,4 @@ +[NAME] +halt \- tell Shepherd to stop services and turn off system +[SEE ALSO] +shepherd(1), herd(1), reboot(8) diff --git a/doc/reboot.8.h2m b/doc/reboot.8.h2m new file mode 100644 index 0000000..4480ba7 --- /dev/null +++ b/doc/reboot.8.h2m @@ -0,0 +1,4 @@ +[NAME] +reboot \- tell Shepherd to stop services and reboot system +[SEE ALSO] +shepherd(1), herd(1), halt(8) -- 2.49.0