From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id UN2VHm4YRmdgcgEA62LTzQ:P1 (envelope-from ) for ; Tue, 26 Nov 2024 18:50:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id UN2VHm4YRmdgcgEA62LTzQ (envelope-from ) for ; Tue, 26 Nov 2024 19:50:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=SV5kIxY1; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=SuwMO79W; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), DKIM not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732647022; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6f8D8LDv7NP6zbAC9cmzHcFPsDgKlto+CAk7uJwvlTo=; b=N3dRimegqFQqU1GDMuFlaRn9kP9vxdPOt4k2LT9NVdGQUM1Vl/cNzsVWCjPN8SSC7YCG0l 3Y2c8qLMY9Dvyr6fl0Vt8DT6fFllXNADGfULyzrkYjtn8tQec5zwt8YvmSLfS9RnIjkZFN RdOCbGvoRu8ouYDJZbe4RN1v3LIzPv9ew85NP54vALgMZaoexeZMpNzBvZDYMf3z1EAMeP 11NZ+G1QUs4tcrsnuFgYeJhrvdqvAk2ZH5x5/6dif/CVKiMvT3jp/j4YSeAsOiw50zckfS GZjU2e7vIv1STZul49slbrR+2BDA1+Bw518M/7M97aH7glKgd8DMpFKic3IrLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=SV5kIxY1; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=SuwMO79W; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), DKIM not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732647022; a=rsa-sha256; cv=none; b=DTVyEVawgM+jFM3BuWcnBm88rzjY9URCmKJy0w+ySTOtdKiLZcBATm/ia+HumAtXB3dmSQ un8cVBVrrHt2JMC3sjMNxdDw3ibb/OjcijjS+DaQjaRHNmrtQB1Cra80Gy9bc+knVimz1Z Do1a1XgaKtPIdZvYP7GREgDbDP+mYAG3Hylvx8WG/Az6ETwWMWBpaRbftsgyC8426qXGd6 Q7ijJ/CjUOn8lq6TlObWIHIZlkvqWbH94e3EsMP6ao/zzGIGmupTnTCkcgx9+JwZ82XTcJ hJtSWD6TI8hkYh2Z1Th0wANGL8RkVIOIvA+vEmPSFhD2G2rfvJTno8BDIRN2Fw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E2A3F41EEE for ; Tue, 26 Nov 2024 19:50:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tG0dR-00084w-SV; Tue, 26 Nov 2024 13:50:06 -0500 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 1tG0dP-00082C-2p for bug-guix@gnu.org; Tue, 26 Nov 2024 13:50:03 -0500 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 1tG0dO-0000HO-Q6 for bug-guix@gnu.org; Tue, 26 Nov 2024 13:50:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=6f8D8LDv7NP6zbAC9cmzHcFPsDgKlto+CAk7uJwvlTo=; b=SV5kIxY14M1BuUF1IQ96b/If5Ju69C9hSCbqrflqrnv64JwfFg2rOoZjGmphnhwMNa3NmtaOM0T1dkCTA8CH5WfM+cvzXdXKuJBZGNsmWpqhcRCbvEOzcZLtLuSK9vr/3l33FR97yWfxZWmi/SpJVAGFjNGJb67MdZUv29eCe6rFuyCROOCYvFAd0M2ACIneeCr9LmBor4S6qSDTjHmiFPC1VRnhrujJZd2EdFZYyqt+v0f/VZ4G+vlH3sG4aetTs0HUsqnD8GtyQqUtm54QLEoQ70tdHapLxTd942pUCFCCwn4P4RWcFUuJu42YPPxSywSHMNjkT/TgtNyjwpT69g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tG0dO-0001kn-G2 for bug-guix@gnu.org; Tue, 26 Nov 2024 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#73903: [shepherd]: Guix Home's shepherd masks shutdown/reboot on foreign distribution Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 26 Nov 2024 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73903 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 73903@debbugs.gnu.org Received: via spool by 73903-submit@debbugs.gnu.org id=B73903.17326469646663 (code B ref 73903); Tue, 26 Nov 2024 18:50:02 +0000 Received: (at 73903) by debbugs.gnu.org; 26 Nov 2024 18:49:24 +0000 Received: from localhost ([127.0.0.1]:52443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG0cm-0001jO-5u for submit@debbugs.gnu.org; Tue, 26 Nov 2024 13:49:24 -0500 Received: from mout01.posteo.de ([185.67.36.65]:58831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG0ck-0001j8-Bd for 73903@debbugs.gnu.org; Tue, 26 Nov 2024 13:49:23 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8D519240027 for <73903@debbugs.gnu.org>; Tue, 26 Nov 2024 19:49:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1732646954; bh=RfkMk0My+oUbfhF/ZpVhC8Y2Gn1Txna9rIZU0K0jw74=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:Content-Type: Content-Transfer-Encoding:From; b=SuwMO79Wa6wISvPRdKHetje2+JoKiv+U1mhpQ5z/raphMpOkPKJcZA8c3yz80fBb3 ihSulq43S+G0evLX6u+qdSppRYSKz5F9ViXcJ4MTlFzduO+/1+8BEScIzXk55SKg3p ftnTYu3eoNC3ruk1uXR/kHSQnrDnQWukgYT+K2uiqrjIXiaPzMKMvnjpkAyfW+mib/ LggGnYuOiFzGAWgBv8djU8ho7lJ7lxyacAZLabl8aMzZVm2GjE0xE5kO85zQaZ9+nr WXAaUxu+Qgb/Sgz18oPARKW8HOHwrJTnHgQZ9G1mkJEAObP6vcTjKqzIN0pIRywdyj pXXeIyMk2e2HA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XyWnj5j2Rz9rxF; Tue, 26 Nov 2024 19:49:13 +0100 (CET) Message-ID: <6054002f-17fb-4a5d-832d-30392aac396a@posteo.net> Date: Tue, 26 Nov 2024 18:49:01 +0000 MIME-Version: 1.0 References: <7869edcc-d4a4-48a1-9a76-e0e67752d806@posteo.net> <87a5e7wbmf.fsf@gnu.org> <87jzcyyygp.fsf@gnu.org> <87bjy2at2h.fsf@gnu.org> Content-Language: en-US From: Dariqq In-Reply-To: <87bjy2at2h.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -0.67 X-Spam-Score: -0.67 X-Migadu-Queue-Id: E2A3F41EEE X-TUID: q6dX7ml+sWOY Hi, On 26.11.24 16:55, Ludovic Courtès wrote: > Hi, > > Dariqq skribis: > >> >> How should this work? should this be a (public?) procedure? Should it >> rebuild shepherd or just copy the output with trivial-build-system? > > My understanding of this proposal is that there would be a > “shepherd-foreign” package, which is like “shepherd” but without > ‘reboot’ and ‘halt’. > > That package could be implemented with ‘trivial-build-system’ or > ‘copy-build-system’ indeed, and it would symlink all of ‘shepherd’, > except its ‘sbin’ directory. > Imo it would make sense to have the sbinless shepherd be the default shepherd for home-shepherd s.t. the home environment never provides shutdown/halt by default. Those are commands are for the system to take care of (whether that is the shepherd coming from root-shepherd or the init from the foreign system). On my foreign distro setup i am currently using this (apologies if the formatting turns out weird): --8<---------------cut here---------------start------------->8--- (define shepherd-for-home (package (inherit shepherd) (name "shepherd-for-home") (source #f) (build-system trivial-build-system) (arguments (list #:modules '((guix build union) (guix build utils)) #:builder #~(begin (use-modules (guix build union) (guix build utils)) (union-build #$output (list #$(this-package-input "shepherd")) #:create-all-directories? #t) (delete-file-recursively (string-append #$output "/sbin")) (delete-file-recursively (string-append #$output "/share/man/man8"))))) (native-inputs '()) (inputs (list shepherd)))) --8<---------------cut here---------------end--------------->8--- If we don't want to care about the manpages then the (#:create-all-directories? #t) can be omitted in union-build. >> I just thought of a more elegant solution, but this would be a lot >> harder to implement properly: >> >> - Move the sbin stuff into a seperate output >> - Home shepherd service only adds the main output to the profile and >> shepherd-root-service both >> - Will need adjustments some packages that currently reference >> shutdown/reboot ( -> lots of rebuilds because logind) and the same >> change for the shepherd packages in the shepherd module. > > The advantage is that no extra step would be needed when using a foreign > distro. But yeah, it’s relatively intrusive, and not my favorite > solution, FWIW. Dunno. > If this would be possible without rebuilding I'd really like it because it makes clear what part of the shepherd something depends on (service manager stuff vs generic init stuff) and avoids an extra package that is just shepherd minus sbindir. But the 3300 dependants of logind makes this really unattractive. > WDYT? > > Ludo’. Dariqq