From patchwork Wed Sep 4 10:26:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 15295 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 BDD7017375; Wed, 4 Sep 2019 11:28:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 547A017372 for ; Wed, 4 Sep 2019 11:28:16 +0100 (BST) Received: from localhost ([::1]:55778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5SWN-0005sf-Bk for patchwork@mira.cbaines.net; Wed, 04 Sep 2019 06:28:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56294) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5SWC-0005q3-72 for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5SWA-00031l-Vw for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52053) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5SWA-00031e-S3 for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i5SWA-00084E-O7 for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37302] [PATCH 2/7] daemon: Run 'guix authenticate' directly. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Sep 2019 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37302 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37302@debbugs.gnu.org Received: via spool by 37302-submit@debbugs.gnu.org id=B37302.156759284530923 (code B ref 37302); Wed, 04 Sep 2019 10:28:02 +0000 Received: (at 37302) by debbugs.gnu.org; 4 Sep 2019 10:27:25 +0000 Received: from localhost ([127.0.0.1]:60863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i5SVY-00082I-9t for submit@debbugs.gnu.org; Wed, 04 Sep 2019 06:27:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i5SVR-00081j-64 for 37302@debbugs.gnu.org; Wed, 04 Sep 2019 06:27:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i5SVM-0002b9-24; Wed, 04 Sep 2019 06:27:12 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42128 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i5SVK-0002xK-HU; Wed, 04 Sep 2019 06:27:11 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 4 Sep 2019 12:26:58 +0200 Message-Id: <20190904102703.19705-2-ludo@gnu.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904102703.19705-1-ludo@gnu.org> References: <20190904102703.19705-1-ludo@gnu.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * nix/scripts/authenticate.in: Remove. * nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove scripts/authenticate. * config-daemon.ac: Don't output 'nix/scripts/authenticate'. * nix/libstore/local-store.cc (runAuthenticationProgram): Run 'guix authenticate'. --- config-daemon.ac | 2 -- nix/libstore/local-store.cc | 5 +++-- nix/local.mk | 3 --- nix/scripts/authenticate.in | 11 ----------- 4 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 nix/scripts/authenticate.in diff --git a/config-daemon.ac b/config-daemon.ac index f1d26af3a7..907457f478 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -152,8 +152,6 @@ if test "x$guix_build_daemon" = "xyes"; then [chmod +x nix/scripts/download]) AC_CONFIG_FILES([nix/scripts/substitute], [chmod +x nix/scripts/substitute]) - AC_CONFIG_FILES([nix/scripts/authenticate], - [chmod +x nix/scripts/authenticate]) AC_CONFIG_FILES([nix/scripts/offload], [chmod +x nix/scripts/offload]) fi diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index 892d9300b1..951c35faf3 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc @@ -1224,8 +1224,9 @@ static void checkSecrecy(const Path & path) static std::string runAuthenticationProgram(const Strings & args) { - return runProgram(settings.nixLibexecDir + "/authenticate", - false, args); + Strings fullArgs = { "authenticate" }; + fullArgs.insert(fullArgs.end(), args.begin(), args.end()); // append + return runProgram(settings.guixProgram, false, fullArgs); } void LocalStore::exportPath(const Path & path, bool sign, diff --git a/nix/local.mk b/nix/local.mk index fd7379b5ff..cdcd9eb1c2 100644 --- a/nix/local.mk +++ b/nix/local.mk @@ -165,9 +165,6 @@ nodist_pkglibexec_SCRIPTS += \ endif BUILD_DAEMON_OFFLOAD -nodist_pkglibexec_SCRIPTS += \ - %D%/scripts/authenticate - # The '.service' files for systemd. systemdservicedir = $(libdir)/systemd/system nodist_systemdservice_DATA = etc/guix-daemon.service etc/guix-publish.service diff --git a/nix/scripts/authenticate.in b/nix/scripts/authenticate.in deleted file mode 100644 index 5ce57915f0..0000000000 --- a/nix/scripts/authenticate.in +++ /dev/null @@ -1,11 +0,0 @@ -#!@SHELL@ -# A shorthand for "guix authenticate", for use by the daemon. - -if test "x$GUIX_UNINSTALLED" = "x" -then - prefix="@prefix@" - exec_prefix="@exec_prefix@" - exec "@bindir@/guix" authenticate "$@" -else - exec guix authenticate "$@" -fi