From patchwork Sun Jan 5 05:47:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward E X-Patchwork-Id: 1429 X-Patchwork-Delegate: johannes@kyriasis.com Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 2783616099FBF for ; Sun, 5 Jan 2020 05:48:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.3 (2019-12-06) on apollo.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FROM=0.5, MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001, T_DMARC_POLICY_NONE=0.01,T_DMARC_SIMPLE_DKIM=0.01 autolearn=ham autolearn_force=no version=3.4.3 X-Spam-BL-Results: [127.0.0.14] [127.0.9.2] [127.0.0.10, 127.0.0.4] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Sun, 5 Jan 2020 05:48:54 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 532BB17D67D1C1; Sun, 5 Jan 2020 05:48:51 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: luna) by orion.archlinux.org (Postfix) with ESMTPSA id 2AAF017D67D1BD; Sun, 5 Jan 2020 05:48:51 +0000 (UTC) Authentication-Results: orion.archlinux.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=vUmK3Ckx Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 1E8572BE62; Sun, 5 Jan 2020 05:48:51 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=vUmK3Ckx Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 67DEA2BE61 for ; Sun, 5 Jan 2020 05:48:47 +0000 (UTC) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sun, 5 Jan 2020 05:48:47 +0000 (UTC) Received: by mail-yb1-xb2f.google.com with SMTP id a2so20658036ybr.7 for ; Sat, 04 Jan 2020 21:48:47 -0800 (PST) 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=UQ6YKDT2T3zt1h9VHXBLaVPrLE7XGBDQdEwwtmzqkvc=; b=vUmK3CkxjVcKFqQhrWOjS2zWkUEzheBSNJviWqd5tLbvUM9On9Ino/4alQ181/tebD +usNxEqYvtQuzIvU/NTtTUHn79C+KgaNk6i0onTE5/A8GvS1QdJ+N+nwIX/ol4p/1tCb ZelVHYPPttF47FL/W4zvhbZl484tfpwNwmuV8HemIE4towxuh+F9Wx9zXc58W83vWdh7 FgKy4Fajvzy9F68pmlBvD48un6yl3m3GJSeL0eZvrCWeXGu5phWiW3OVuzGji8Nm7tg2 m/QCXVqFeX1H6J3QllEl4C7HAmMRBDtV2/LShwRmUNOos6fz8gqo/NfNAq4MLZ1cxeVC 5L6g== 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=UQ6YKDT2T3zt1h9VHXBLaVPrLE7XGBDQdEwwtmzqkvc=; b=cjLuekoY/VDGWKnxt4zXywkmzOuxIlz01jCUDT1uMXMt+WNXdnzEMZWhwIXKrhA+dG V9j9lM8OLmkWkWU4jDziduT7376ROVAtZFTKmsizl2l/R8KZfYZATS2fi2tP25hJxEsb KBXip/Rw+iNoKRASErn8KD43Q0+oYC0f1R2jjkeQPlOG44LI9Ktd7redcieNOmyj+NZV FJTGul874htGfXiI8MmgcW9COCWOPMnp+K2LfYDdIhq885+/nyyP1rREZLb73uN4BI5v fEenrPSVkWXUpdU6gi7jPz4Esv+x6X8CY0LiyhvcywubHYqt6njutbF0Tow5eIO8MMWA oubA== X-Gm-Message-State: APjAAAXaAGVRhmq3GNZJVum19e3YQkU2xGXZfUWDamMoWRgW8HpU6/TR SVFxozYAqqn0xplU5p8cMCbt6Idn X-Google-Smtp-Source: APXvYqwGlCAPZLn8sKB4SbV6SQ3+js8TnSx5V/c2HPf90qeRZ9zn+OWIOBYlfVQilMp5bTmrVX4o0w== X-Received: by 2002:a25:3b10:: with SMTP id i16mr71143614yba.72.1578203325934; Sat, 04 Jan 2020 21:48:45 -0800 (PST) Received: from localhost.localdomain ([172.58.142.178]) by smtp.gmail.com with ESMTPSA id m16sm25647625ywa.90.2020.01.04.21.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2020 21:48:45 -0800 (PST) From: Edward E To: pacman-contrib@lists.archlinux.org Subject: [PATCH 2/2] pactree: Set the gpg directory Date: Sat, 4 Jan 2020 23:47:24 -0600 Message-Id: <20200105054724.11590-2-develinthedetail@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200105054724.11590-1-develinthedetail@gmail.com> References: <20200105054724.11590-1-develinthedetail@gmail.com> MIME-Version: 1.0 X-BeenThere: pacman-contrib@lists.archlinux.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for pacman-contrib development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Edward E Errors-To: pacman-contrib-bounces@lists.archlinux.org Sender: "pacman-contrib" Addresses https://github.com/msys2/MSYS2-packages/issues/1720 Signed-off-by: Edward E --- gpgdir is hardcoded here. Also 'plagiarized' from pacman. src/Makefile.am | 4 +++- src/pactree.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 8d33be8..eef0590 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,7 @@ DIST_SUBDIRS = $(SUBDIRS) # paths set at make time conffile = ${sysconfdir}/pacman.conf dbpath = ${localstatedir}/lib/pacman/ +gpgdir = ${sysconfdir}/pacman.d/gnupg/ bin_SCRIPTS = \ $(OURSCRIPTS) @@ -82,7 +83,8 @@ endif AM_CPPFLAGS = \ -DLOCALEDIR=\"@localedir@\" \ -DCONFFILE=\"$(conffile)\" \ - -DDBPATH=\"$(dbpath)\" + -DDBPATH=\"$(dbpath)\" \ + -DGPGDIR=\"$(gpgdir)\" AM_CFLAGS = \ -pedantic \ diff --git a/src/pactree.c b/src/pactree.c index 8b77f05..f7c4d39 100644 --- a/src/pactree.c +++ b/src/pactree.c @@ -125,6 +125,7 @@ static int searchsyncs = 0; static int debug = 0; static const char *dbpath = DBPATH; static const char *configfile = CONFFILE; +static const char *gpgdir = GPGDIR; void cb_log(alpm_loglevel_t level, const char *fmt, va_list args) { @@ -545,6 +546,9 @@ int main(int argc, char *argv[]) alpm_option_set_logcb(handle, cb_log); } + /* no need to fail on error */ + alpm_option_set_gpgdir(handle, gpgdir); + if(searchsyncs) { if(register_syncs() != 0) { cleanup(1);