From unknown Mon Aug 18 02:38:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43769 <43769@debbugs.gnu.org> To: bug#43769 <43769@debbugs.gnu.org> Subject: Status: [PATCH 0/2] guix-install.sh: Minor first user-experience tweaks Reply-To: bug#43769 <43769@debbugs.gnu.org> Date: Mon, 18 Aug 2025 09:38:44 +0000 retitle 43769 [PATCH 0/2] guix-install.sh: Minor first user-experience twea= ks reassign 43769 guix-patches submitter 43769 zimoun severity 43769 normal tag 43769 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 02 13:35:54 2020 Received: (at submit) by debbugs.gnu.org; 2 Oct 2020 17:35:54 +0000 Received: from localhost ([127.0.0.1]:42440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOOyI-00017J-AD for submit@debbugs.gnu.org; Fri, 02 Oct 2020 13:35:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:46738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOOyH-00017C-47 for submit@debbugs.gnu.org; Fri, 02 Oct 2020 13:35:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOOyG-0000M3-TM for guix-patches@gnu.org; Fri, 02 Oct 2020 13:35:52 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOOyF-0003Ie-AH for guix-patches@gnu.org; Fri, 02 Oct 2020 13:35:52 -0400 Received: by mail-wr1-x434.google.com with SMTP id e16so2688125wrm.2 for ; Fri, 02 Oct 2020 10:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vun8z9ekcdCuq2rwSb6+cjLEgZSH49220JOHPsiLYK0=; b=laXelfl8z4Dq8fIyrSCetSK+Z1bBBgCO5QZQKcYVRbx5Opke8A3rKsMiGi2ZkOWORD 3jqZNXS8D49Iyy0Xj5BBFvLRST28dN12P+jX1q9DJC/3wq/FFPabPRJJwZo6urbI+/Fh JcarB8YmziQraRGhp1aKOGO7YRpRP7wUVfY/jaiD4CdVtNi1G+1IpVgXkUfqo7gPPZvv 45bYhC67IUsbhXdUhPOnijz/V0CyhhTrc2JqGDsSNawFeGPv209OX12zxWqrnDs/TrY6 k7am5AxQCGSlb5skAXjx+dAZ2Vb7Rv1MULTheLpTJmjOWC2QAWWjThe5L9uBC+CB5oi2 e+uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vun8z9ekcdCuq2rwSb6+cjLEgZSH49220JOHPsiLYK0=; b=seOFWx8mTexBGgdB9APaPyPMcU1bhR4dKmsooly3FZf1gnB6hRnswde6+ARamloVrB GMPAPwjKKDEi/sfZux5vm50r0n7S60oYfpcofeODhLAKVjVTUs0zwMpwclM2OGhmHY/g 9x4pwNce7QTf0UMAfNVZw5Rm5+X2nyU7M4BRCeRH88vmEMvYQb43P7+t6w3ltOMU/91r sRT19ojflsmWtBlSGkXmSoGvgY4NXVLrXS/u9s1eb2btqQtvCM4NofWWRIZVQqdoQGyS ScU6zpBH8rGeAEIdeNfXbvmuCAN1abrr2GlIgC512+4ZSAvdf0EF1bV3GyhaipftxHXk XrUQ== X-Gm-Message-State: AOAM5331jDAa6wd9lD3/Ww6/GzZGqKXUveY91aGyOunbCqzFAgPnDWel 62Ogl0PDZk0A3A1rVpJOMPKvOlbrEJfxpA== X-Google-Smtp-Source: ABdhPJzIkdEni+CPyh5dRNOnZYBHa0GMzJ3knOeGUJ2Er4V/Be00Den9e5cbW01R9jG7baJ19ChuhQ== X-Received: by 2002:adf:f791:: with SMTP id q17mr3879532wrp.364.1601660148871; Fri, 02 Oct 2020 10:35:48 -0700 (PDT) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id y1sm2528220wma.36.2020.10.02.10.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:35:48 -0700 (PDT) From: zimoun To: guix-patches@gnu.org Subject: [PATCH 0/2] guix-install.sh: Minor first user-experience tweaks Date: Fri, 2 Oct 2020 19:35:37 +0200 Message-Id: <20201002173537.12045-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x434.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Dear, These 2 patches are proposal for the point #1 and #3 in [1]. The errorin patch 2/2 about 'nscd' should be turned into a simple warning and so adds: WARN=[color WARN color] in orange, similarly to PASS and ERR. WDYT? [1]: All the best, simon zimoun (2): guix-install.sh: Add symbolic links for supported shell completions. guix-install.sh: Check the daemon 'nscd' and suggest it. etc/guix-install.sh | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) base-commit: db194f714a8beb155c508c06e346c7c2322e7053 -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 02 13:40:40 2020 Received: (at 43769) by debbugs.gnu.org; 2 Oct 2020 17:40:41 +0000 Received: from localhost ([127.0.0.1]:42456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOP2u-0001Eb-Ku for submit@debbugs.gnu.org; Fri, 02 Oct 2020 13:40:40 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOP2t-0001EP-3M for 43769@debbugs.gnu.org; Fri, 02 Oct 2020 13:40:39 -0400 Received: by mail-wm1-f67.google.com with SMTP id k18so2573049wmj.5 for <43769@debbugs.gnu.org>; Fri, 02 Oct 2020 10:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mgh8dKasq3+vOzIuIwjf2DrH98ynWraV+PKajWQUtwc=; b=SrHGlfP0Rl+PDUygsdPBLBEfwPfd1OFqO+PDysbPHNszVGa/uoigV0Zru4avZGriI3 MCBZEhhJG/5At3HQt33TabMz5CuwyOtBrkIy+1PxkLDC2QftR1ACaJ76Oh1QgA+KFUje 37EGCCzIESNDn5Bif+hZa/2f7D1o/0Dpa0KlhpW04pqUfz9QyIL1bOYc26eXb77CAwcR n5YJzlCjtc9t1vzzOKJInPNDmwU6H5e98o8usuXqVkWUt9qubT4KNc4YB4TCxrQx9zBk r9E1qSK4XNVrj//e0a2kSxt+C/PLFZKYnEB9L3Nl7d7dhQCH7cUe0C/+iSgxnNc+IsK7 S7dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mgh8dKasq3+vOzIuIwjf2DrH98ynWraV+PKajWQUtwc=; b=FB82PCwDyekIp7PuhpvldHaR2v6jdQwjYHsrcBrMIbhtitc+wIK5ESS92IZxsY3gpz ayb07+D9ZMu633gEDpqAAbBxxkOpJOvrzU5OiV3xjV3hBftiHyvPMZBRHS5yesc3sl9b UzCC/o6pVExrDNX52u5ycbjYyogQNqcfxMTvI8qBRzetd25gtB+YR9lenguUDRMxEa5B 0siBCNMPau8ljhtLxodDFNpgpzzowM7OGQxvSAnwPMNCy6OkfYPVcyuB9MKo9DyM6GEN hft4jbYD6n0DX/KjhZLII9Ch+o6CRuPwPNZRGJPSSmEfaQLn0TJeYECJeaZnkf1d+74r f7cA== X-Gm-Message-State: AOAM530yt8oAPTbJaBiC43P+8h9uZO1XwQY1GOmm6mVuvPwOrlMdhFWD yajwhD5qg1XamietSOAMNi9tjB/ebneKZw== X-Google-Smtp-Source: ABdhPJzW5bDnxd/TcDEawtjGjiHr4RMrKx2ePufeIIK22+EvRzwj/MLt16lFpT8wHQypYZRZ3vv3WQ== X-Received: by 2002:a7b:c750:: with SMTP id w16mr4158308wmk.16.1601660432864; Fri, 02 Oct 2020 10:40:32 -0700 (PDT) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id k82sm1312413wmf.15.2020.10.02.10.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:40:32 -0700 (PDT) From: zimoun To: 43769@debbugs.gnu.org Subject: [PATCH 1/2] guix-install.sh: Add symbolic links for supported shell completions. Date: Fri, 2 Oct 2020 19:40:30 +0200 Message-Id: <20201002174030.13819-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * etc/guix-install.sh (sys_create_shell_completion): New function to add system wide all the symlinks for supported shell completions. --- etc/guix-install.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index eb7205a261..a5da198eb0 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -5,6 +5,7 @@ # Copyright © 2018 Efraim Flashner # Copyright © 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2020 Morgan Smith +# Copyright © 2020 Simon Tournier # # This file is part of GNU Guix. # @@ -459,6 +460,36 @@ export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/us EOF } +sys_create_shell_completion() +{ # Symlink supported shell completions system-wide + + var_guix=/var/guix/profiles/per-user/root/current-guix + bash_completion=/etc/bash_completion.d + zsh_completion=/usr/share/zsh/site-functions + fish_completion=/usr/share/fish/vendor_completions.d + + while true; do + read -p "Install shell completion? (yes/no)" yn + case $yn in + [Yy]*) + { # Just in case + for dir_shell in $bash_completion $zsh_completion $fish_completion; do + [ -d "$dir_shell" ] || mkdir -p $dir_shell + done; + + ln -sf ${var_guix}/etc/bash_completion.d/* "$bash_completion"; + ln -sf ${var_guix}/share/zsh/site-functions/* "$zsh_completion"; + ln -sf ${var_guix}/share/fish/vendor_completions.d/* "$fish_completion"; } && + _msg "${PAS}Installed shell completion" + break;; + [Nn]*) _msg "${INF}Skipped shell completion installation" + break;; + *) _msg "Please answer yes or no."; + esac + done +} + + welcome() { cat<<"EOF" @@ -516,6 +547,7 @@ main() sys_enable_guix_daemon sys_authorize_build_farms sys_create_init_profile + sys_create_shell_completion _msg "${INF}cleaning up ${tmp_path}" rm -r "${tmp_path}" -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 02 13:42:21 2020 Received: (at 43769) by debbugs.gnu.org; 2 Oct 2020 17:42:22 +0000 Received: from localhost ([127.0.0.1]:42472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOP4X-0001ID-OD for submit@debbugs.gnu.org; Fri, 02 Oct 2020 13:42:21 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:53038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOP4V-0001Hm-QG for 43769@debbugs.gnu.org; Fri, 02 Oct 2020 13:42:20 -0400 Received: by mail-wm1-f41.google.com with SMTP id q9so2456762wmj.2 for <43769@debbugs.gnu.org>; Fri, 02 Oct 2020 10:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+NdwtEU1OEjKB+qrYJzxOUqzTHQ/drUTAZeEQCnG6p0=; b=Li4TpgMNJOL4l9AhA+72h3LcG0xi3HnAr9lvHb5MYIQGEXsofJBdszjZp5L7Wor9TF Yjx5aPptD7kEhDlYeOyewfqf6G84gRt2GFxd+F07K6FoTNaHuMDK84ARVCdrVdMmMJEk Xc6grP1wCT8gDTqzIfMRpPmzYq6llqx69qTA/US5tk7j7EhPAo8K4tgMlKT50ph9LITF 3vUBrZS+k1j5yhTlFFJdmFMJV6RrLLmZ9Ez2OKYLyP53I2hECc+4PmXTkvOJSLi2x1Cc bOPvOZKKdAdPt38LeHt0bFjIoiosm0leAKFbBg7MytihgZ1sE9nB3zhiLRAOatWVtHu/ V8jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+NdwtEU1OEjKB+qrYJzxOUqzTHQ/drUTAZeEQCnG6p0=; b=HG9qdecrKBOVuvm0KeWAoFL0f3F4rLX3PvdfYz3xrzRFgvyaFcTbQcnF/fn3DgN0uw AiegJFRTl0YSlzb8zhpThmrp0B+5DRN/bwtygeIJYHSuUZDG/nBXyfvF1fJ3pwwSmBGd 0hU3Klku5VCwXBO2Pv6uMw//jKDoeqowEWWTka7NbXnhGAefZB7pmoTXpu+7GQ/6LCNH vEK6T2kITAK3HCT8dXkM+CuF+kWLC/lbLAwLVZQfAVqIPedHl57a4OInNPw/cTu/zeoZ 7ZbWuDbZb2OZXi1M8CK5jF9bBRmalk/bkwxftD1l1ZGe9aGlMiO3ydpDwHchxikeSge6 6UMg== X-Gm-Message-State: AOAM5338FnkkH47LpNKVKz9KSNz/CRE4X9B/Jlc1a8myIn3j0NYbeFic b7AOY1QUyDjrd5COhDtHZcl/FHVkV/i6Tg== X-Google-Smtp-Source: ABdhPJxEZ7PLb/eFar5V9mjkBjHAXXGHxMnnxksPoYfiSNgeD6zPesoTfj/JrhwcPQfMx88NMYaIrg== X-Received: by 2002:a1c:7c1a:: with SMTP id x26mr4249100wmc.112.1601660533940; Fri, 02 Oct 2020 10:42:13 -0700 (PDT) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id c16sm988772wrt.58.2020.10.02.10.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:42:13 -0700 (PDT) From: zimoun To: 43769@debbugs.gnu.org Subject: [PATCH 2/2] guix-install.sh: Check the daemon 'nscd' and suggest it. Date: Fri, 2 Oct 2020 19:42:11 +0200 Message-Id: <20201002174211.14467-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * etc/guix-install.sh (chk_sys_nscd): New function to check if the daemon 'nscd is running, otherwise suggest to install distribution-wide. --- etc/guix-install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index a5da198eb0..3860ab3cdc 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -200,6 +200,18 @@ chk_sys_arch() ARCH_OS="${arch}-${os}" } +chk_sys_nscd() +{ # Check if nscd is up and suggest to start it or install it + + if [ "$(type -P pidof)" ]; then + if [ ! "$(pidof nscd)" ]; then + _msg "${ERR}We recommand to install the daemon 'nscd' via your distribution..." + _msg "${ERR}...or to start it." + _msg "${ERR}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\"" + fi + fi +} + # ------------------------------------------------------------------------------ #+MAIN @@ -552,6 +564,8 @@ main() _msg "${INF}cleaning up ${tmp_path}" rm -r "${tmp_path}" + chk_sys_nscd + _msg "${PAS}Guix has successfully been installed!" _msg "${INF}Run 'info guix' to read the manual." -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 03 14:45:17 2020 Received: (at 43769) by debbugs.gnu.org; 3 Oct 2020 18:45:17 +0000 Received: from localhost ([127.0.0.1]:44476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmWz-0001gy-D3 for submit@debbugs.gnu.org; Sat, 03 Oct 2020 14:45:17 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmWy-0001gj-9b for 43769@debbugs.gnu.org; Sat, 03 Oct 2020 14:45:16 -0400 Received: by mail-wr1-f67.google.com with SMTP id c18so5273194wrm.9 for <43769@debbugs.gnu.org>; Sat, 03 Oct 2020 11:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mgh8dKasq3+vOzIuIwjf2DrH98ynWraV+PKajWQUtwc=; b=f1d2zGXiAwZkPI9hctND+8jgUu6/QJf9RoiLWSbGoYXdto0amBCjAvsepWwRTALSvw +AHvj7T50Oe3e2YP1YCYFs1ZwRhVwjlugkRA/yRjP83u2EPOQ+T/mrS3gthKXsUxMLVg GVcOwz1l4uJYOmGwDFsFV3Nt0DqJckRIDbqRuPqAPd31F4cLJnQXAPGNJANgulSVZvtp FGpBirSQMd6EfDEfQkwrhm4S1ikAmgJdI+7HE1qbcaJ7ICv6Wy0uOqPYunTDxrXGUb/x PLZPmNviz/z+GkhnWVGyAdkpJPBg8wKsY3pJIel4ZOWyRr0PtK7s0IA/Q23tGS1Txryv +a3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mgh8dKasq3+vOzIuIwjf2DrH98ynWraV+PKajWQUtwc=; b=B+/v/wMwdOh+QxiSECFUIp2ooZpqzNs7032IYthXU9ytNIWuO6A6HmRX+GQxy0nOhY 6yqmmdMJiCCLdqs8pi76ymXkzgkHiB5cyqiRhKn/PM+h3hK10ZIYqFddSc/Q6eoaZRll 60aHdFt8gvxDEaoxXg3+or4bMjP92ji5pcikvdaEv/U8FLi+HXSmUkmyPsY0vylz/gzS sIvtQSXb0q9UUNWUdT9810RWVuE0roKa6moiD8rMxFdKXpqBLCaLCI0lzBa4AMr6iWnJ R3s0+uV2YeW9M1GrmjJ3XqaClbMCgw/7fZLHOhEVgqKYYqP2v0qFYeyOnWXlPgAs92M/ KatQ== X-Gm-Message-State: AOAM531fjmE2uTNgKtZHrTWnJi3QeSOhF/W2UxxH8yUGZS6JzHJehFE2 ARiD/0L7s7ydHRKuuR0zYfoESsb+b+Y= X-Google-Smtp-Source: ABdhPJxe7nkK0+tUQa1Q6cdwcz4+zeHjzRHuN1TaQzhJ3JfOjwt/oEbmiS5p8+aK5LYLCtP/dC/AQQ== X-Received: by 2002:adf:f986:: with SMTP id f6mr8803075wrr.270.1601750710016; Sat, 03 Oct 2020 11:45:10 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u81sm2993224wmg.43.2020.10.03.11.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 11:45:09 -0700 (PDT) From: zimoun To: 43769@debbugs.gnu.org Subject: [PATCH v2 1/2] guix-install.sh: Add symbolic links for supported shell completions. Date: Sat, 3 Oct 2020 20:44:46 +0200 Message-Id: <20201003184447.9542-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * etc/guix-install.sh (sys_create_shell_completion): New function to add system wide all the symlinks for supported shell completions. --- etc/guix-install.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index eb7205a261..a5da198eb0 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -5,6 +5,7 @@ # Copyright © 2018 Efraim Flashner # Copyright © 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2020 Morgan Smith +# Copyright © 2020 Simon Tournier # # This file is part of GNU Guix. # @@ -459,6 +460,36 @@ export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/us EOF } +sys_create_shell_completion() +{ # Symlink supported shell completions system-wide + + var_guix=/var/guix/profiles/per-user/root/current-guix + bash_completion=/etc/bash_completion.d + zsh_completion=/usr/share/zsh/site-functions + fish_completion=/usr/share/fish/vendor_completions.d + + while true; do + read -p "Install shell completion? (yes/no)" yn + case $yn in + [Yy]*) + { # Just in case + for dir_shell in $bash_completion $zsh_completion $fish_completion; do + [ -d "$dir_shell" ] || mkdir -p $dir_shell + done; + + ln -sf ${var_guix}/etc/bash_completion.d/* "$bash_completion"; + ln -sf ${var_guix}/share/zsh/site-functions/* "$zsh_completion"; + ln -sf ${var_guix}/share/fish/vendor_completions.d/* "$fish_completion"; } && + _msg "${PAS}Installed shell completion" + break;; + [Nn]*) _msg "${INF}Skipped shell completion installation" + break;; + *) _msg "Please answer yes or no."; + esac + done +} + + welcome() { cat<<"EOF" @@ -516,6 +547,7 @@ main() sys_enable_guix_daemon sys_authorize_build_farms sys_create_init_profile + sys_create_shell_completion _msg "${INF}cleaning up ${tmp_path}" rm -r "${tmp_path}" -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 03 14:45:21 2020 Received: (at 43769) by debbugs.gnu.org; 3 Oct 2020 18:45:21 +0000 Received: from localhost ([127.0.0.1]:44479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmX2-0001hD-NF for submit@debbugs.gnu.org; Sat, 03 Oct 2020 14:45:21 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:35710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmX1-0001go-Dm for 43769@debbugs.gnu.org; Sat, 03 Oct 2020 14:45:19 -0400 Received: by mail-wm1-f41.google.com with SMTP id y15so4970910wmi.0 for <43769@debbugs.gnu.org>; Sat, 03 Oct 2020 11:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KBsbxztc72itiCXOMZUhiI9V5YaodIa3hkKIusxIXeE=; b=kFZpDX9yYAsGQIG35rnwUWajPUQc1STLx1t1AJhkS9KRzTr+sLkQL1PSPToJCP2ZIl vTfTNa61NLZIuEOh98wef3zmBTf5l2DUlPlySwuU+A+rHGS6dfxfue5J75gKU2speVj+ yRXIlaXhIyjveh8kQD6gRkaBiIfwwOyVuQar4i80SuOWbjQ7xx5wbDG9yhbogvAjXaTP 94w21mfzVBViRHUZTEauQubeGi0t6x8KEd2f8fRfPpvgTGVW6M4Gl2OiwZwXg7q2B/i+ bKBlgnBZ3T/X8lDxTHOfX/Ru9WWjzuLH4JGZutgxpJ591LGyuYq8Lh5lVtVeQB5U+nQZ MSiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KBsbxztc72itiCXOMZUhiI9V5YaodIa3hkKIusxIXeE=; b=Gi2LySz0pgUnTZkXksFLmmWw1mAZ9939tpm0QmmXYYADAaxP0Dbr/IoQKery2oIl55 riw0F7egJagXHLIxT/LhL0BrWxv9wQ2Hl/7Z6noYJVjV0eJ+m0pemi7/5vw5Jt6MiTbD C3A6XrmNAiZDo/YH0bTLzyqJ3uJ7Y0yphpRl+5atR8k+vc7pVIK++UlHYwiBGsH7vpG2 EX7xO3DvRarxxZxm5FVfQS1fgf1YwVQ4z8qOqtmoTim6UaoY7d+Qj3NfxN0+oCF869nn rN5tywZaVSjdlTreNczsF0MIX57EqLcKui+q16oM/2cchqW1M8qA8VLcxoA94obmB4Fh 3ybw== X-Gm-Message-State: AOAM530WH6o9bdY2BhwJPJXVSpCPnwo9RyfLQXwNyc8dWHb9YaqDHWkB BQ3YVaDOidox/ytpzlfnYArrbd/h6hQ= X-Google-Smtp-Source: ABdhPJwdim8zpCVr9EaRyErAQMMok8Ua/qrDalsuSQzEhhnkZsj2CkulnGZafFpX0eu3lEMOlsNmyA== X-Received: by 2002:a1c:4b13:: with SMTP id y19mr9005552wma.33.1601750713375; Sat, 03 Oct 2020 11:45:13 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u81sm2993224wmg.43.2020.10.03.11.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 11:45:13 -0700 (PDT) From: zimoun To: 43769@debbugs.gnu.org Subject: [PATCH v2 2/2] guix-install.sh: Check the service 'nscd' and suggest it. Date: Sat, 3 Oct 2020 20:44:47 +0200 Message-Id: <20201003184447.9542-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201003184447.9542-1-zimon.toutoune@gmail.com> References: <20201003184447.9542-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * etc/guix-install.sh (chk_sys_nscd): New function to check if the service 'nscd is running, otherwise suggest to install distribution-wide. --- etc/guix-install.sh | 66 ++++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index a5da198eb0..5bda31de2e 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -55,6 +55,7 @@ REQUIRE=( PAS=$'[ \033[32;1mPASS\033[0m ] ' ERR=$'[ \033[31;1mFAIL\033[0m ] ' +WAR=$'[ \033[33;1mWARN\033[0m ] ' INF="[ INFO ] " DEBUG=0 @@ -200,6 +201,19 @@ chk_sys_arch() ARCH_OS="${arch}-${os}" } +chk_sys_nscd() +{ # Check if nscd is up and suggest to start it or install it + if [ "$(type -P pidof)" ]; then + if [ ! "$(pidof nscd)" ]; then + _msg "${WAR}We recommend installing and/or starting your distribution 'nscd' service" + _msg "${WAR}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\"" + fi + else + _msg "${INF}We cannot determine if your distribution 'nscd' service is running" + _msg "${INF}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\"" + fi +} + # ------------------------------------------------------------------------------ #+MAIN @@ -523,40 +537,42 @@ EOF main() { - local tmp_path - welcome + # local tmp_path + # welcome + + # _msg "Starting installation ($(date))" - _msg "Starting installation ($(date))" + # chk_term + # chk_require "${REQUIRE[@]}" + # chk_gpg_keyring + # chk_init_sys + # chk_sys_arch - chk_term - chk_require "${REQUIRE[@]}" - chk_gpg_keyring - chk_init_sys - chk_sys_arch + # _msg "${INF}system is ${ARCH_OS}" - _msg "${INF}system is ${ARCH_OS}" + # umask 0022 + # tmp_path="$(mktemp -t -d guix.XXX)" - umask 0022 - tmp_path="$(mktemp -t -d guix.XXX)" + # guix_get_bin_list "${GNU_URL}" + # guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path" - guix_get_bin_list "${GNU_URL}" - guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path" + # sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}" + # sys_create_build_user + # sys_enable_guix_daemon + # sys_authorize_build_farms + # sys_create_init_profile + # sys_create_shell_completion - sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}" - sys_create_build_user - sys_enable_guix_daemon - sys_authorize_build_farms - sys_create_init_profile - sys_create_shell_completion + # _msg "${INF}cleaning up ${tmp_path}" + # rm -r "${tmp_path}" - _msg "${INF}cleaning up ${tmp_path}" - rm -r "${tmp_path}" + chk_sys_nscd - _msg "${PAS}Guix has successfully been installed!" - _msg "${INF}Run 'info guix' to read the manual." + # _msg "${PAS}Guix has successfully been installed!" + # _msg "${INF}Run 'info guix' to read the manual." - # Required to source /etc/profile in desktop environments. - _msg "${INF}Please log out and back in to complete the installation." + # # Required to source /etc/profile in desktop environments. + # _msg "${INF}Please log out and back in to complete the installation." } main "$@" -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 03 15:11:32 2020 Received: (at 43769) by debbugs.gnu.org; 3 Oct 2020 19:11:32 +0000 Received: from localhost ([127.0.0.1]:44504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmwN-0002Im-Q4 for submit@debbugs.gnu.org; Sat, 03 Oct 2020 15:11:31 -0400 Received: from tobias.gr ([80.241.217.52]:50846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmwK-0002Ic-EO for 43769@debbugs.gnu.org; Sat, 03 Oct 2020 15:11:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=u9dKLeZqVoqgUv3WjV/bmwy0w/WPq/nCOerAp2PBRHc=; h=date:in-reply-to: references:subject:cc:to:from; b=Lff0PrCGReubnK48w0xy81lgYS3B5JYYyoVZz vdyC1XynZjylTYGkPddGL4g3K1yTrXuhbmqbQecxjRlMKnnSso6Gqr4FJtp3DZQUl/4Nrl f7mNyoi03XeGCNc923dUXEBvgdx4NRKCI0FxWkMcaieeC0H9iZGa/B3WuuBNLbEIq1ReWw YdgXUaXyofWOB4bC7gSIwuI6VSo9zVfFoLdniVQG0r0TtGafNQl9nZYMq4Uj5vWMO7DQdx 4MKO7u2AYBTS5mBG8UpVcoMW3tlShkpTsuIgSNnumu/kXACDGKmGBPQjeY5ZjRaywwFFGo DjS1iEHsOTilneFU8hONV79JA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id f58ed69e (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Sat, 3 Oct 2020 19:11:34 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice To: zimoun Subject: Re: [bug#43769] [PATCH v2 1/2] guix-install.sh: Add symbolic links for supported shell completions. References: <20201002173537.12045-1-zimon.toutoune@gmail.com> <20201003184447.9542-1-zimon.toutoune@gmail.com> In-reply-to: <20201003184447.9542-1-zimon.toutoune@gmail.com> Date: Sat, 03 Oct 2020 21:11:26 +0200 Message-ID: <87pn5z9lb5.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43769 Cc: 43769@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Zimoun, Thanks! Shell code always looks ugly to me, so LGTM if it works=20 :-) Nitpick: s/create/install/ zimoun =E5=86=99=E9=81=93=EF=BC=9A > + [Nn]*) _msg "${INF}Skipped shell completion=20 > installation" > + break;; > + *) _msg "Please answer yes or no."; Why bother the user with this? We don't ask before installing=20 /etc/profile.d/guix.sh, or enabling the daemon, and we shouldn't=20 offer similar meaningless choices just for the sake of it. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX3jM3g0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15aAUBAJihwdBr5VVPWFmaEHVIhpiIDTJFqfTIePWXxlbw bvadAQDqTJZza69KvA+FCJ3YdvlDLmdem2YBS/Y4e8V8PSRvAw== =pdM5 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 03 15:15:12 2020 Received: (at 43769) by debbugs.gnu.org; 3 Oct 2020 19:15:12 +0000 Received: from localhost ([127.0.0.1]:44511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmzw-0002ON-8z for submit@debbugs.gnu.org; Sat, 03 Oct 2020 15:15:12 -0400 Received: from tobias.gr ([80.241.217.52]:50854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmzu-0002OE-AB for 43769@debbugs.gnu.org; Sat, 03 Oct 2020 15:15:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=QaiNEhjyFKnY9Ha/7UlwDhgOaGGzeQGxL8hh93fk7Ko=; h=date:in-reply-to: references:subject:cc:to:from; b=H/zIRU3GzbokXSriHYJH5VikI6OUIJrzLcRCH anx/F4FSolgbkyGCNnMdnwDjoQ128fSTd5TIGyO1+UlkbrrBndp0wALTGgH9kTyVpf/qIg 3iKiTgMT7P13wf6/53ksUkrnwc/JRqJWZ8beqU3KcD6K1rhNzLDKl4wxuU98zvdIDzzbzi jOmpXP0LgrAMwvNVYCLs8WuN+x6D+OvsjvcTIFjTTUjgddwSzOW1NArqby2e3d0Tm6sKYC OiBQr9SHIls+bpv7a8hjgIOUjTrqGVcXqLGC5QgM3epl9iQjE7TbjO9ZLDherOOp7CxbuD F+9BTU6OHiPoN2IOjvBGM7sWA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id c8cd739e (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Sat, 3 Oct 2020 19:15:17 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice To: zimoun Subject: Re: [bug#43769] [PATCH v2 2/2] guix-install.sh: Check the service 'nscd' and suggest it. References: <20201003184447.9542-1-zimon.toutoune@gmail.com> <20201003184447.9542-2-zimon.toutoune@gmail.com> In-reply-to: <20201003184447.9542-2-zimon.toutoune@gmail.com> Date: Sat, 03 Oct 2020 21:14:53 +0200 Message-ID: <87mu139l5e.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43769 Cc: 43769@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Zimoun, zimoun =E5=86=99=E9=81=93=EF=BC=9A > * etc/guix-install.sh (chk_sys_nscd): New function to check if=20 > the service > 'nscd is running, otherwise suggest to install=20 > distribution-wide. If we must have a new interactive prompt in this series, this=20 seems like the better place: we know enough about the host (init)=20 system to auto-enable nscd on most of them, if the user so wishes. > main() > { > - local tmp_path > - welcome > + # local tmp_path > + # welcome > + > + # _msg "Starting installation ($(date))" >=20=20 > - _msg "Starting installation ($(date))" > + # chk_term > + # chk_require "${REQUIRE[@]}" > + # chk_gpg_keyring > + # chk_init_sys > + # chk_sys_arch >=20=20 > - chk_term > - chk_require "${REQUIRE[@]}" > - chk_gpg_keyring > - chk_init_sys > - chk_sys_arch > + # _msg "${INF}system is ${ARCH_OS}" >=20=20 > - _msg "${INF}system is ${ARCH_OS}" > + # umask 0022 > + # tmp_path=3D"$(mktemp -t -d guix.XXX)" >=20=20 > - umask 0022 > - tmp_path=3D"$(mktemp -t -d guix.XXX)" > + # guix_get_bin_list "${GNU_URL}" > + # guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path" >=20=20 > - guix_get_bin_list "${GNU_URL}" > - guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path" > + # sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}" > + # sys_create_build_user > + # sys_enable_guix_daemon > + # sys_authorize_build_farms > + # sys_create_init_profile > + # sys_create_shell_completion >=20=20 > - sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}" > - sys_create_build_user > - sys_enable_guix_daemon > - sys_authorize_build_farms > - sys_create_init_profile > - sys_create_shell_completion > + # _msg "${INF}cleaning up ${tmp_path}" > + # rm -r "${tmp_path}" >=20=20 > - _msg "${INF}cleaning up ${tmp_path}" > - rm -r "${tmp_path}" > + chk_sys_nscd >=20=20 > - _msg "${PAS}Guix has successfully been installed!" > - _msg "${INF}Run 'info guix' to read the manual." > + # _msg "${PAS}Guix has successfully been installed!" > + # _msg "${INF}Run 'info guix' to read the manual." >=20=20 > - # Required to source /etc/profile in desktop environments. > - _msg "${INF}Please log out and back in to complete the=20 > installation." > + # # Required to source /etc/profile in desktop=20 > environments. > + # _msg "${INF}Please log out and back in to complete the=20 > installation." > } ? Debugging left-overs? Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX3jNrQ0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15y+YBAOvBUaQM/r+2RgPv+dn6rjx0m2psAea/mSv6zybn hx+eAP0XyNbQRZCbZyf+CuuJBKURYKpF9zof37oAhYw8NQq+BA== =7xBj -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 04:08:51 2020 Received: (at 43769) by debbugs.gnu.org; 5 Oct 2020 08:08:51 +0000 Received: from localhost ([127.0.0.1]:47751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPLYA-000480-SG for submit@debbugs.gnu.org; Mon, 05 Oct 2020 04:08:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPLY5-00047h-Kf for 43769@debbugs.gnu.org; Mon, 05 Oct 2020 04:08:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54327) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPLY0-0005Dn-7G; Mon, 05 Oct 2020 04:08:40 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=33918 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kPLXx-0007fQ-NO; Mon, 05 Oct 2020 04:08:38 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tobias Geerinckx-Rice Subject: Re: [bug#43769] [PATCH v2 2/2] guix-install.sh: Check the service 'nscd' and suggest it. References: <20201003184447.9542-1-zimon.toutoune@gmail.com> <20201003184447.9542-2-zimon.toutoune@gmail.com> <87mu139l5e.fsf@nckx> Date: Mon, 05 Oct 2020 10:08:36 +0200 In-Reply-To: <87mu139l5e.fsf@nckx> (Tobias Geerinckx-Rice's message of "Sat, 03 Oct 2020 21:14:53 +0200") Message-ID: <87lfgl5c3f.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43769 Cc: 43769@debbugs.gnu.org, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Tobias, Tobias Geerinckx-Rice skribis: > zimoun =E5=86=99=E9=81=93=EF=BC=9A >> * etc/guix-install.sh (chk_sys_nscd): New function to check if the >> service >> 'nscd is running, otherwise suggest to install distribution-wide. > > If we must have a new interactive prompt in this series, this seems > like the better place: we know enough about the host (init) system to > auto-enable nscd on most of them, if the user so wishes. In practice, you enable nscd by running =E2=80=98apt install nscd=E2=80=99 = or similar, and I think we cannot guess what the right command is. WDYT? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 04:10:10 2020 Received: (at 43769) by debbugs.gnu.org; 5 Oct 2020 08:10:10 +0000 Received: from localhost ([127.0.0.1]:47764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPLZM-0004B9-MD for submit@debbugs.gnu.org; Mon, 05 Oct 2020 04:10:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPLZK-0004A5-CA for 43769@debbugs.gnu.org; Mon, 05 Oct 2020 04:10:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54341) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPLZD-0005K4-Lp; Mon, 05 Oct 2020 04:09:55 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=33922 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kPLZD-0007jz-9u; Mon, 05 Oct 2020 04:09:55 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tobias Geerinckx-Rice Subject: Re: [bug#43769] [PATCH v2 1/2] guix-install.sh: Add symbolic links for supported shell completions. References: <20201002173537.12045-1-zimon.toutoune@gmail.com> <20201003184447.9542-1-zimon.toutoune@gmail.com> <87pn5z9lb5.fsf@nckx> Date: Mon, 05 Oct 2020 10:09:53 +0200 In-Reply-To: <87pn5z9lb5.fsf@nckx> (Tobias Geerinckx-Rice's message of "Sat, 03 Oct 2020 21:11:26 +0200") Message-ID: <87h7r95c1a.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43769 Cc: 43769@debbugs.gnu.org, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Tobias Geerinckx-Rice skribis: > Why bother the user with this? We don't ask before installing > /etc/profile.d/guix.sh, or enabling the daemon, and we shouldn't=20 > offer similar meaningless choices just for the sake of it. Yeah, I think we can install completions without asking (but still printing a line about it.) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 05:19:47 2020 Received: (at 43769) by debbugs.gnu.org; 5 Oct 2020 09:19:47 +0000 Received: from localhost ([127.0.0.1]:47900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPMep-0001oM-9g for submit@debbugs.gnu.org; Mon, 05 Oct 2020 05:19:47 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:39919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPMem-0001o8-J2 for 43769@debbugs.gnu.org; Mon, 05 Oct 2020 05:19:45 -0400 Received: by mail-qt1-f195.google.com with SMTP id d1so8961604qtr.6 for <43769@debbugs.gnu.org>; Mon, 05 Oct 2020 02:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=l+Gr1CJPG/lfKdSq0yjrMsbnZ7NsrGLbQ9VRx+cU+AE=; b=YiJIfCLNsgMyH07yJVsJXIaQ6IqpyRgiz+di7y8wTTDA3oSErMeKjT6ujxKyS9BE8Q g82e8E8128UFFsWX7Vw1IKerNXKwWk/nRGyRjdXpHuMwzLO7JwhCCVgElLFwM7RJo7+m 2oxTXtVEstvc7bJUP/z8BiiSQFyThJfo3qNeuiFnUOGr9dURF4uuqd/9tqTUn6Sv9bz5 tqOvf+B1SnTJ12XzrjWOtifdLdqex9P0y9H3qL4ITMREUCizJfvEkY6x5HoiPN17+M9X RCzh3cU1QMjqwCOhk9bgcfdnm++qKQlfkF+mTccs7CKnJ0l6lRD0FkFNcWT9yrW77emt 1a/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=l+Gr1CJPG/lfKdSq0yjrMsbnZ7NsrGLbQ9VRx+cU+AE=; b=ItSWLFhnDmWJ6bfX3yp3rWQ4QR3lQNh49ahgPrQTIRDe84kM2BsJsCPD/73zadDQyc uQopDauvWNofYsKkcHrwgMKJhgOgOOFgOePoku6t/jTYfZbGjGXrIJ8KMC1MOoZCffdz 1AvFITLYo5gtBjPSSOJ8X6dDLnh/E7OTFmhU/q2H+xVHcFbiWzyISwN1GrOCbvJn6NL1 HbAGWR7Ce6fdkxBBH1qlLYjf33S155Bjg4egbYY1Sq9lRAz6Fl13WBU2MkCR9NWBTsJV 4X8W5HM0/D5BMA8mWluFq2kU8fjPJvHFpuTy+ZKSxuapIdvI/IHsgNwkKph/LLcwweGO ufrw== X-Gm-Message-State: AOAM530faYiuD9sMfrKm5nO6qFLm3l7z1olGJoRKI/8MrUgnRedH629Y el31cPqz/sTwItOk/kNsI07tLmKMdZHNs4QY+I8= X-Google-Smtp-Source: ABdhPJyQ88SFTcDJADMLWpf2dNOqlbFQ3SBhzQcbKb7JPlXLUa5wmswdkELnhx6X2c+n0Te8Oc7vC8kZTEAieTIPHrA= X-Received: by 2002:ac8:5317:: with SMTP id t23mr14125799qtn.354.1601889579048; Mon, 05 Oct 2020 02:19:39 -0700 (PDT) MIME-Version: 1.0 References: <20201003184447.9542-1-zimon.toutoune@gmail.com> <20201003184447.9542-2-zimon.toutoune@gmail.com> <87mu139l5e.fsf@nckx> <87lfgl5c3f.fsf@gnu.org> In-Reply-To: <87lfgl5c3f.fsf@gnu.org> From: zimoun Date: Mon, 5 Oct 2020 11:19:28 +0200 Message-ID: Subject: Re: [bug#43769] [PATCH v2 2/2] guix-install.sh: Check the service 'nscd' and suggest it. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: Tobias Geerinckx-Rice , 43769@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, 5 Oct 2020 at 10:08, Ludovic Court=C3=A8s wrote: > Tobias Geerinckx-Rice skribis: > > > zimoun =E5=86=99=E9=81=93=EF=BC=9A > >> * etc/guix-install.sh (chk_sys_nscd): New function to check if the > >> service > >> 'nscd is running, otherwise suggest to install distribution-wide. > > > > If we must have a new interactive prompt in this series, this seems > > like the better place: we know enough about the host (init) system to > > auto-enable nscd on most of them, if the user so wishes. > > In practice, you enable nscd by running =E2=80=98apt install nscd=E2=80= =99 or similar, > and I think we cannot guess what the right command is. WDYT? Yeah, I have tried in an unsent yet v3 to ask and then try to start the service depending on the init system if nscd is not running. And if it fails, ask to install it. That's the best we can do, IMHO. Maybe it is over engineering and a simple INFO/WARN is enough. WDYT? All the best, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 05:23:40 2020 Received: (at 43769) by debbugs.gnu.org; 5 Oct 2020 09:23:40 +0000 Received: from localhost ([127.0.0.1]:47908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPMia-0001uk-1E for submit@debbugs.gnu.org; Mon, 05 Oct 2020 05:23:40 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:40685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPMiY-0001uX-PO for 43769@debbugs.gnu.org; Mon, 05 Oct 2020 05:23:39 -0400 Received: by mail-qt1-f195.google.com with SMTP id m9so8297079qth.7 for <43769@debbugs.gnu.org>; Mon, 05 Oct 2020 02:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qSJkaHe6BBjmzsG9RXCEGhTI6WJGAtMedyo0zelrD9g=; b=mGjGdopqn9rpYmPLZFaUJjJIwYd0NfsaKLFRsBQU0b2PickAYVK7JRryDlBYQufb0A DaV+jVl9IIMgLvOD8aLKAeZlbjFVlXjeESH/YObT/lUhMHU5Xm/twD7Ywke8HH81XKmJ cAag+PgeSf7oAvuLAuxk59N/nDDsUfTE80lFHDa5iwu7pJKPF5yoDepQ4IH+1k43AGLH Egenhyzr7aDG/JI3Fl2SehiAnjgc5b+/WCc0iwnPj2vyrQx0Cq5VPdyhx43Ro3a8FRFa 6LGuaAW6aLf/udSUlUmVdtM9e/ayPSuIzKOwKoW9yAmOz/ueGKisUgZmv/FF2rOQKbME Q1lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qSJkaHe6BBjmzsG9RXCEGhTI6WJGAtMedyo0zelrD9g=; b=PxUXhxvuHpAkDABnvlaXlcFxJlsyejev6Ld3LBeNxY9d4m6sA9L1G/cPnJCveKsEZT Xip7lLxS4HldKCMd2QV3XI681n9i0dP8RH/d4u2Uq6QKo51lzQJaiys0LZDbEfb1CTcu D5oTyprYX2o5Rc2Pc0OkEFlMay3wAiJOLPiPD+nJh24VGUOESl3CNc5ujH9QKWIU3lF2 NwHZVRCsC8pIcWu0U7DNhnGDWpW67mnEyy6rq40Zn2W+gxyYLzKOODiHyBFBiQzIGU6V bktCKwAeC0jPZjADFpI5VCC8O2NMO3vJ7awPDlEnxEUxpZKGx5K86rAoUR1Ojm4vvnHK Qcjg== X-Gm-Message-State: AOAM530tzmlx4cvl4BDSYMtntqO0kKcCO13cwW/pw/ZT7Afb+huIb2S4 9kvGEiFs59heEYCGxJHCnrQV535aH9bLiydaElQ= X-Google-Smtp-Source: ABdhPJydbUl3q6tJN1DAdzOhrg/4IA68dOmZ/i++abAyn3meHclfSpZQNAuXr1SUvIsXzw7Yl1egCEBiOw2c6NYwvsY= X-Received: by 2002:ac8:2dc4:: with SMTP id q4mr12999588qta.211.1601889813398; Mon, 05 Oct 2020 02:23:33 -0700 (PDT) MIME-Version: 1.0 References: <20201002173537.12045-1-zimon.toutoune@gmail.com> <20201003184447.9542-1-zimon.toutoune@gmail.com> <87pn5z9lb5.fsf@nckx> <87h7r95c1a.fsf@gnu.org> In-Reply-To: <87h7r95c1a.fsf@gnu.org> From: zimoun Date: Mon, 5 Oct 2020 11:23:22 +0200 Message-ID: Subject: Re: [bug#43769] [PATCH v2 1/2] guix-install.sh: Add symbolic links for supported shell completions. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: Tobias Geerinckx-Rice , 43769@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, 5 Oct 2020 at 10:09, Ludovic Court=C3=A8s wrote: > Tobias Geerinckx-Rice skribis: > > > Why bother the user with this? We don't ask before installing > > /etc/profile.d/guix.sh, or enabling the daemon, and we shouldn't > > offer similar meaningless choices just for the sake of it. > > Yeah, I think we can install completions without asking (but still > printing a line about it.) As we talked with nckx yesterday on IRC, from my point of view, it is impolite to install stuff behind the user. Well, to be concrete, I suggest either: a) add a comment in the Warning Note in the manual saying that /etc/profile.d and shell competitions will be installed or b) ask a global question in guix-install.sh about these. WDYT? I do not have a strong opinion and the patch doing what you are both suggesting is ready. ;-) All the best, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 08:02:25 2020 Received: (at 43769) by debbugs.gnu.org; 5 Oct 2020 12:02:25 +0000 Received: from localhost ([127.0.0.1]:48177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPPCD-00087o-FT for submit@debbugs.gnu.org; Mon, 05 Oct 2020 08:02:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPPC9-00087Z-CH for 43769@debbugs.gnu.org; Mon, 05 Oct 2020 08:02:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57233) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPPC3-0002Of-9T; Mon, 05 Oct 2020 08:02:15 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=35020 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kPPC2-0004jw-Ek; Mon, 05 Oct 2020 08:02:15 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [bug#43769] [PATCH v2 1/2] guix-install.sh: Add symbolic links for supported shell completions. References: <20201002173537.12045-1-zimon.toutoune@gmail.com> <20201003184447.9542-1-zimon.toutoune@gmail.com> <87pn5z9lb5.fsf@nckx> <87h7r95c1a.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 =?utf-8?Q?Vend=C3=A9miaire?= an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 05 Oct 2020 14:02:13 +0200 In-Reply-To: (zimoun's message of "Mon, 5 Oct 2020 11:23:22 +0200") Message-ID: <87a6x03mpm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43769 Cc: Tobias Geerinckx-Rice , 43769@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) zimoun skribis: > On Mon, 5 Oct 2020 at 10:09, Ludovic Court=C3=A8s wrote: >> Tobias Geerinckx-Rice skribis: >> >> > Why bother the user with this? We don't ask before installing >> > /etc/profile.d/guix.sh, or enabling the daemon, and we shouldn't >> > offer similar meaningless choices just for the sake of it. >> >> Yeah, I think we can install completions without asking (but still >> printing a line about it.) > > As we talked with nckx yesterday on IRC, from my point of view, it is > impolite to install stuff behind the user. Like Tobias wrote, the script is already doing that. (It=E2=80=99s also widespread practice these days: favor ease of use and installation speed over fine-grained user control.) > Well, to be concrete, I suggest either: a) add a comment in the > Warning Note in the manual saying that /etc/profile.d and shell > competitions will be installed or b) ask a global question in > guix-install.sh about these. WDYT? I think it=E2=80=99s fine to just drop the completion files in the right pl= ace: it=E2=80=99s what users expect. But we should still have an INFO line sayi= ng these are being installed, as a matter of transparency. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 08:28:58 2020 Received: (at 43769) by debbugs.gnu.org; 5 Oct 2020 12:28:58 +0000 Received: from localhost ([127.0.0.1]:48250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPPbu-0000Mr-71 for submit@debbugs.gnu.org; Mon, 05 Oct 2020 08:28:58 -0400 Received: from tobias.gr ([80.241.217.52]:59708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPPbs-0000Mj-KA for 43769@debbugs.gnu.org; Mon, 05 Oct 2020 08:28:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=Ydy/PKp2rls3ryLhFx/UfxqbWC0vOOV9j/Zr9MqtV+I=; h=date:in-reply-to: references:subject:cc:to:from; b=R70Rq7q+BMthgzn64UblaVHthKtvBT7u67Fxb 8sTlqnJFAzxE9FaNDXtP50T4w4JdIgXI3MrF3eBJNkr8ojh/dcHBs+cvqfegxA3j3wCD3I poLDSSbQysi/UP5knyjjHS9hBC+1rRSGd3rR7AVdMp6xR2KJu/M6Ur8HhVMjR1aJXk6xyx x1VuhqckhIH0uB/FlH4yNDUYmmZNYTMqsfNA0EakHvh+8s2sce5afQe8PODoZZTu44wKBk IpJMHXBqHObEzRBiLyz+RiraJMeV/GdkHr3ejD3FYnThiFyNVpOjgaZGVFM+vfLG9lTCHO br/pduXLojU/Z/MqkorWGVJQA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id d2a0b708 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Mon, 5 Oct 2020 12:29:03 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice To: Ludovic =?utf-8?Q?Court=C3=A8s?= , zimoun Subject: Re: [bug#43769] [PATCH v2 2/2] guix-install.sh: Check the service 'nscd' and suggest it. References: <20201003184447.9542-1-zimon.toutoune@gmail.com> <20201003184447.9542-2-zimon.toutoune@gmail.com> <87mu139l5e.fsf@nckx> <87lfgl5c3f.fsf@gnu.org> In-reply-to: <87lfgl5c3f.fsf@gnu.org> Date: Mon, 05 Oct 2020 14:28:53 +0200 Message-ID: <878sckambe.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43769 Cc: 43769@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Ludo', Zimoun, Ludovic Court=C3=A8s =E5=86=99=E9=81=93=EF=BC=9A >> If we must have a new interactive prompt in this series, this=20 >> seems >> like the better place: we know enough about the host (init)=20 >> system to >> auto-enable nscd on most of them, if the user so wishes. > > In practice, you enable nscd by running =E2=80=98apt install nscd=E2=80= =99 or=20 > similar, > and I think we cannot guess what the right command is. WDYT? I agree: I was under the assumption that nscd is commonly=20 installed as part of the base OS, but disabled by default at the=20 init system level. If that's not likely to be true, don't let's=20 bother. Zimoun =E5=86=99=E9=81=93=EF=BC=9A > ask and then try to start the service depending on the init=20 > system if nscd is not running If the distro equivalent of =E2=80=98service start nscd=E2=80=99 works in t= he=20 *common* case, I like it. Otherwise a warning/suggestion to=20 manually install & enable it is fine. My general point was that guix-install.sh should do as much as it=20 can with the information it already has ($INIT_SYS) and be=20 consistent in using it, not that we start sniffing=20 $LEGACY_PKG_MANAGER too :-) Thanks for your work so far, Simon, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX3sRhQ0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15xnwA/3ZfOGaOi4ugbO+Wwt+NdbFDsPEqSGVwTkbtoR88 C83iAP9m7lvBp/2XP8Cu8iQdBw9oU/XiwwWXn+7bTUrIISxGCA== =2Ry2 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 13 12:45:28 2020 Received: (at 43769) by debbugs.gnu.org; 13 Oct 2020 16:45:29 +0000 Received: from localhost ([127.0.0.1]:48633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNQW-00033z-KV for submit@debbugs.gnu.org; Tue, 13 Oct 2020 12:45:28 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNQU-00033m-EQ for 43769@debbugs.gnu.org; Tue, 13 Oct 2020 12:45:26 -0400 Received: by mail-wm1-f66.google.com with SMTP id l15so344361wmh.1 for <43769@debbugs.gnu.org>; Tue, 13 Oct 2020 09:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=8Jg4cvtZdD7l0UT+xyfxq2OpF7/b5b0xXMWXvlpTYI4=; b=MyFOJplsZ9/VO0hu6NP+mRtScWkDs0QI5yw7gL1+r/oZICFL8y1qY3V1FAN2XSzguF Q8wwXYTJgLqaCBJFGR07TmYeTdOYuQCi1i/cmpQhPaEkzk2pzI5K3/nYBttBOTYb1/ZJ 6j4OME/yqCjJTM34Sorlz4rNuBesDNGz2XpSbAVyYzCw3HRuHcjbk7YsChCo32xPJf0Y QaN29fJsCme+Jg+hSAZdZpBiQSoV9N3Uf1Q0HLHmF6uuoSw54sXPg0kMWxbfVPrXeWDm KPnGVqG8j9tbPmo71JQhAy9ttgetisfxrRK9UI+///AOcIMG9tDAK8GqHQI/4k5f8D3G F0Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=8Jg4cvtZdD7l0UT+xyfxq2OpF7/b5b0xXMWXvlpTYI4=; b=PRjjJmPDLgtBsniLKPylXoryFnfFI5x2SzLp+AHhgwDAKmUaUzy6wwjrqa1jCTXCve tPRxZEb6+p9+R/IjsFn3NqoTWRxOd/5rlh9hIXCKks6keK8FbwoHZqZtummC2aam1AVS 2zULgDAV4LfeK4ZYoADPWaHTS2x5sx7vCed64sSMFXvYhJKyG1Ej/uwR4BYCkhs5VxG2 Q13TRNEor0HbJL+n7RWEU2gWnngZi+9RCXKqoS4YVdqoV/8kV+2H2XbrqNjZqoyeNy07 d/ncylhbI5nn6JZ0V9akjpCkv+7UozKvj7HP7s/PH50TeTKmSrpQIzcfIaQW7TB84hu1 mkKA== X-Gm-Message-State: AOAM5327nGuo3lDD+seOUQ081R5W94xe3QjniW3+ZrIxw3b+/6ZTcSH0 XmheUbasRHrOSdo5ldtmP37kktUs6/s= X-Google-Smtp-Source: ABdhPJwGI2dC6+FpnOSP2M93Bgzd08lj2VqCSFOaKHgagHo2gUqKkz3AaGvQE/k5c2GNFiNqGBTbgw== X-Received: by 2002:a1c:bcd5:: with SMTP id m204mr717514wmf.133.1602607520092; Tue, 13 Oct 2020 09:45:20 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id f7sm175215wrx.64.2020.10.13.09.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 09:45:19 -0700 (PDT) From: zimoun To: Tobias Geerinckx-Rice Subject: Re: [bug#43769] [PATCH v2 2/2] guix-install.sh: Check the service 'nscd' and suggest it. References: <20201003184447.9542-1-zimon.toutoune@gmail.com> <20201003184447.9542-2-zimon.toutoune@gmail.com> <87mu139l5e.fsf@nckx> <87lfgl5c3f.fsf@gnu.org> <878sckambe.fsf@nckx> Date: Tue, 13 Oct 2020 18:45:16 +0200 In-Reply-To: <878sckambe.fsf@nckx> (Tobias Geerinckx-Rice's message of "Mon, 05 Oct 2020 14:28:53 +0200") Message-ID: <86o8l6jcrn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 43769@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> In practice, you enable nscd by running =E2=80=98apt install nscd=E2=80= =99 or similar, >> and I think we cannot guess what the right command is. WDYT? > > I agree: I was under the assumption that nscd is commonly installed as pa= rt of > the base OS, but disabled by default at the init system level. If that's= not > likely to be true, don't let's bother. >> ask and then try to start the service depending on the init system if ns= cd >> is not running > > If the distro equivalent of =E2=80=98service start nscd=E2=80=99 works in= the *common* case, I > like it. Otherwise a warning/suggestion to manually install & enable it = is > fine. > > My general point was that guix-install.sh should do as much as it can wit= h the > information it already has ($INIT_SYS) and be consistent in using it, not= that > we start sniffing $LEGACY_PKG_MANAGER too :-) As said, I have tried somehting like this uglyness=E2=80=A6 but it=E2=80=99= s wrong! It is overcomplicated and if the package is installed, then it is highly probable that is running. I mean 2 kind of users: - the noob as me: =E2=80=9CPlease install nscd=E2=80=9D and the I do =E2= =80=9Captitude install nscd=E2=80=9D and my distro takes care of everything (start it etc.) =20=20=20 - the control-freak: they knows what to do with the message =E2=80=9CPlease install nscd=E2=80=9D. And we can try to guess the distro=E2=80=A6 but again it is overcomplicated. So it=E2=80=99s not useful. A message is enough. Please give a look at v3. Thanks, simon --8<---------------cut here---------------start------------->8--- sys_enable_nscd() { # Check if nscd is up and suggest to start it or install it flag=3D"" if [ "$(type -P pidof)" ]; then if [ ! "$(pidof nscd)" ]; then _msg "${INF}We recommend installing and/or starting your distri= bution 'nscd' service" while true; do read -p "Permit to try starting your 'nscd' service? (yes/n= o) " yn case $yn in [Yy]*) case "$INIT_SYS" in upstart) { initctl reload-configuration; /etc/init/ && start nscd; } && _msg "${PAS}enabled 'nscd' service v= ia upstart" ;; systemd) if [ ( systemctl daemon-reload && systemctl enable nscd && systemctl start nscd; ) ]; th= en _msg "${PAS}enabled 'nscd' service v= ia systemd"; else flag=3Dfailure fi ;; sysv-init) { update-rc.d nscd defaults && update-rc.d nscd enable && service nscd start; } && _msg "${PAS}enabled 'nscd' service v= ia sysv" ;; openrc) { rc-update add nscd default && rc-service nscd start; } && _msg "${PAS}enabled 'nscd' service v= ia OpenRC" ;; NA|*) _msg "${ERR}unsupported init system; run= the 'ncsd' service manually" ;; esac; break;; [Nn]*) _msg "${INF}Skipped 'nscd' service" flag=3Dfailure break;; *) _msg "Please answer yes or no."; esac done fi else _msg "${WAR}We cannot determine1 if your distribution 'nscd' servic= e is running" failure=3Dfailure fi if [[ $flag =3D=3D failure ]]; then _msg "${WAR}Please read 'info guix \"Application Setup\"' about \"N= ame Service Switch\"" fi } --8<---------------cut here---------------end--------------->8--- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 13 13:12:23 2020 Received: (at 43769) by debbugs.gnu.org; 13 Oct 2020 17:12:23 +0000 Received: from localhost ([127.0.0.1]:48695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqY-0005sK-My for submit@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:22 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41913) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqW-0005rv-GK for 43769@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:21 -0400 Received: by mail-wr1-f68.google.com with SMTP id s9so160515wro.8 for <43769@debbugs.gnu.org>; Tue, 13 Oct 2020 10:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hvaptL1TYXz1ht1Ynp1REq45HS1gztDXhicYBfeJKOY=; b=nshqzKTKPeCzfj+BmfTjt5Wh+FxZsj2UgQa/0kLjYDN9TuW9EjGoLMqGW7blr/YuZX eC14wPyYqBgkBoR9c0TW9SBO0SSMKRmMnm7AaEZsyhghFaO0tOFdR61f9vAQCuhz3zDk pm1HYXw/zdQPlx9Fhca99qxC/Gz8pWp/0Qgcs/gBxCpZLCyK8ta5cHJulRXP43hPuJMF 6tU6rSTwt1VGI7cla5/GLEt+xq5Rl94oHajaOUdhi3PRSou0YW5AJHg/V9hGGbiQp8mA lkX/+WRb02yttgDmJnzjKXrJOGp9I+/GlxiVNVJ8ztIsED5c2v+IGqWTdZOte89Jq4xb DtOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hvaptL1TYXz1ht1Ynp1REq45HS1gztDXhicYBfeJKOY=; b=L0g6AKsBjzKL1ehdRNKdLqOx6Nrm/KJlP3lzU5fGbHqtai92dsKVB0YfJCSoo1TPvN auI2fQhF9EXFoi23rgsFYbO57iBKsttbKj54kkTykKScRGz23icB1BhkUCrysK2hVRlx ZarQSFiCyqEUMWJ0WdupRondkf5OVFlTzW0R0lkb6VzXz+cyysYVZzVtKTWZrSkHQ62L FIAH7hTmFOS5Q4fpJuf6pHWmbs56j6dYJcS+zsD+TmGtAVYpvboKvjajYRmbeexij5yP 8SjTS6YzRstDlJGfhVLttGfIsACyJVbyPIufozXZvdfUfIzAPcLp9NJQ9TGrotwjH+6R Bxmg== X-Gm-Message-State: AOAM531Yj4XmuIyaA/Dz0NKGyWgZCUfPuRZ/FX/BpYjKaLc8J77/EWx0 hDdD7ynhrqIiLxRa2SSruomB2Sgu41o= X-Google-Smtp-Source: ABdhPJyDsnqPFfecOADcOE0AnqlPf2AuKWM4/dnq2dbHgRiWgF6Uxtrfg90BfuNtXbRPxBp01aNy9Q== X-Received: by 2002:a5d:4141:: with SMTP id c1mr715173wrq.113.1602609134720; Tue, 13 Oct 2020 10:12:14 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o4sm293543wrv.8.2020.10.13.10.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 10:12:13 -0700 (PDT) From: zimoun To: 43769@debbugs.gnu.org Subject: [PATCH v3 2/2] guix-install.sh: Check the service 'nscd' and suggest it. Date: Tue, 13 Oct 2020 19:12:03 +0200 Message-Id: <20201013171204.14708-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: ludo@gnu.org, me@tobias.gr, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * etc/guix-install.sh (chk_sys_nscd): New function to check if the service 'nscd is running, otherwise suggest to install distribution-wide. --- etc/guix-install.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index f51a1b653f..7f0dd00e53 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -55,6 +55,7 @@ REQUIRE=( PAS=$'[ \033[32;1mPASS\033[0m ] ' ERR=$'[ \033[31;1mFAIL\033[0m ] ' +WAR=$'[ \033[33;1mWARN\033[0m ] ' INF="[ INFO ] " DEBUG=0 @@ -200,6 +201,19 @@ chk_sys_arch() ARCH_OS="${arch}-${os}" } +chk_sys_nscd() +{ # Check if nscd is up and suggest to start it or install it + if [ "$(type -P pidof)" ]; then + if [ ! "$(pidof nscd)" ]; then + _msg "${WAR}We recommend installing and/or starting your distribution 'nscd' service" + _msg "${WAR}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\"" + fi + else + _msg "${INF}We cannot determine if your distribution 'nscd' service is running" + _msg "${INF}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\"" + fi +} + # ------------------------------------------------------------------------------ #+MAIN @@ -523,6 +537,7 @@ main() chk_gpg_keyring chk_init_sys chk_sys_arch + chk_sys_nscd _msg "${INF}system is ${ARCH_OS}" -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 13 13:12:26 2020 Received: (at 43769) by debbugs.gnu.org; 13 Oct 2020 17:12:26 +0000 Received: from localhost ([127.0.0.1]:48699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqc-0005sb-8q for submit@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:26 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqX-0005ry-To for 43769@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:22 -0400 Received: by mail-wr1-f67.google.com with SMTP id g12so147673wrp.10 for <43769@debbugs.gnu.org>; Tue, 13 Oct 2020 10:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DWUiuVqzpQJYSN8cadMAUyzAil+CUrnkj8Rai9dt5eM=; b=IEiYMEEHOIen3tkpc8ncOlMn3yJVJ4TS7aX+mIFl2ZAYUlNCthM/+PoE7EN3xpjCZs NfdsmTyIfDL7lveFv1lNZCp/8ZtcXu6drndXqUkL2plWJ16pvOkOHmGzDwsmObNYO3rr v0plW8CVIc8+Gr8AC/qu4T51ptMVDdV3ffyg5aNsqHzCRKhIms1diK9VP0LQAR88jqB6 C9B/Lro4GNDwJZSLKOl+mbS4KRl2GBA5zgloIbboogQfY/n1D/zcClbQgg1weje3bm7+ 4bumdZqzUYsbpeqVq90/cE71Wls+ORRhagpWEwAbNnKsNzYLNEQIr5+d3UPfkS0a/xtu jlQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DWUiuVqzpQJYSN8cadMAUyzAil+CUrnkj8Rai9dt5eM=; b=aObDrleWVh7srZVu4eWnlGr8XwiAKQgqHKHbfLVMr8GrwSAxAsWJCUjrcfZ/Gt3eDu /D0aa6vL+DixK2zCa37Mh/nBZMQDvFtODvkOi4d/jAPbOoLaJPyR9h6r+boLwBc5RAf3 qBARWlJqmO5SyqS0g+znAgn6y52c8F3ySItY/yEXtc7YoqhIont1I9MmzdVu3kH+cTb9 y2Ofq0C788tq3nXDehPmWuw4LpAW12vyj7L707FjkRp0uToVjEgMRXpTBD6NYyjiIiny nnWnLOxFscXFiuUsUrfKw/jl5VpHvUSNUM9wn5ZtZ+vVXVesB8opKZ62xvPBgVHCK4c/ Ddkg== X-Gm-Message-State: AOAM5324TEU4l3DBgLBZROJ/ol4jM02MUf7c+AVz4nn+HHsz8lkXKPp/ qeksaPfUZgzlRFfbxakFbGyk9wTl/IE= X-Google-Smtp-Source: ABdhPJzHYgagTdNapBOhbpuQQpenyjpsxWriBRzk7BKWZ3HZ1P9zodD00XHSh1DCb2ATbT3OXvtQ+g== X-Received: by 2002:adf:de89:: with SMTP id w9mr760220wrl.212.1602609136059; Tue, 13 Oct 2020 10:12:16 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o4sm293543wrv.8.2020.10.13.10.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 10:12:15 -0700 (PDT) From: zimoun To: 43769@debbugs.gnu.org Subject: [PATCH v3 1/2] guix-install.sh: Add symbolic links for supported shell completions. Date: Tue, 13 Oct 2020 19:12:04 +0200 Message-Id: <20201013171204.14708-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201013171204.14708-1-zimon.toutoune@gmail.com> References: <20201013171204.14708-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43769 Cc: ludo@gnu.org, me@tobias.gr, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * etc/guix-install.sh (sys_create_shell_completion): New function to add system wide all the symlinks for supported shell completions. --- etc/guix-install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index eb7205a261..f51a1b653f 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -5,6 +5,7 @@ # Copyright © 2018 Efraim Flashner # Copyright © 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2020 Morgan Smith +# Copyright © 2020 Simon Tournier # # This file is part of GNU Guix. # @@ -459,6 +460,26 @@ export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/us EOF } +sys_create_shell_completion() +{ # Symlink supported shell completions system-wide + + var_guix=/var/guix/profiles/per-user/root/current-guix + bash_completion=/etc/bash_completion.d + zsh_completion=/usr/share/zsh/site-functions + fish_completion=/usr/share/fish/vendor_completions.d + + { # Just in case + for dir_shell in $bash_completion $zsh_completion $fish_completion; do + [ -d "$dir_shell" ] || mkdir -p $dir_shell + done; + + ln -sf ${var_guix}/etc/bash_completion.d/* "$bash_completion"; + ln -sf ${var_guix}/share/zsh/site-functions/* "$zsh_completion"; + ln -sf ${var_guix}/share/fish/vendor_completions.d/* "$fish_completion"; } && + _msg "${PAS}installed shell completion" +} + + welcome() { cat<<"EOF" @@ -516,6 +537,7 @@ main() sys_enable_guix_daemon sys_authorize_build_farms sys_create_init_profile + sys_create_shell_completion _msg "${INF}cleaning up ${tmp_path}" rm -r "${tmp_path}" -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 16 05:39:32 2020 Received: (at 43769-done) by debbugs.gnu.org; 16 Oct 2020 09:39:32 +0000 Received: from localhost ([127.0.0.1]:57689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTMCy-0005HK-Go for submit@debbugs.gnu.org; Fri, 16 Oct 2020 05:39:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTMCw-0005H8-KN for 43769-done@debbugs.gnu.org; Fri, 16 Oct 2020 05:39:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46799) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTMCq-0006V9-LP; Fri, 16 Oct 2020 05:39:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34688 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kTMCq-00082N-7B; Fri, 16 Oct 2020 05:39:24 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [PATCH v3 2/2] guix-install.sh: Check the service 'nscd' and suggest it. References: <20201013171204.14708-1-zimon.toutoune@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Vend=C3=A9miaire?= an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 16 Oct 2020 11:39:22 +0200 In-Reply-To: <20201013171204.14708-1-zimon.toutoune@gmail.com> (zimoun's message of "Tue, 13 Oct 2020 19:12:03 +0200") Message-ID: <87k0vq8q7p.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43769-done Cc: me@tobias.gr, 43769-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, zimoun skribis: > Fixes . > > * etc/guix-install.sh (chk_sys_nscd): New function to check if the service > 'nscd is running, otherwise suggest to install distribution-wide. [...] > Fixes . > > * etc/guix-install.sh (sys_create_shell_completion): New function to add > system wide all the symlinks for supported shell completions. Applied, thanks! Ludo=E2=80=99. From unknown Mon Aug 18 02:38:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 13 Nov 2020 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator