From patchwork Sun Dec 24 02:16:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Justin Veilleux X-Patchwork-Id: 58019 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 0D0DE27BBEA; Sun, 24 Dec 2023 02:18:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4542B27BBE9 for ; Sun, 24 Dec 2023 02:18:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHE3z-0007dy-Rh; Sat, 23 Dec 2023 21:17:59 -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 1rHE3x-0007dj-16 for guix-patches@gnu.org; Sat, 23 Dec 2023 21:17:57 -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 1rHE3w-0003a0-PZ for guix-patches@gnu.org; Sat, 23 Dec 2023 21:17:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rHE42-0002aP-9d for guix-patches@gnu.org; Sat, 23 Dec 2023 21:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68001] [PATCH] gnu: Add pacman. Resent-From: Justin Veilleux Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Dec 2023 02:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68001 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68001@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17033842669913 (code B ref -1); Sun, 24 Dec 2023 02:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Dec 2023 02:17:46 +0000 Received: from localhost ([127.0.0.1]:51541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rHE3l-0002Zo-SA for submit@debbugs.gnu.org; Sat, 23 Dec 2023 21:17:46 -0500 Received: from lists.gnu.org ([2001:470:142::17]:50226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rHE3i-0002ZZ-GZ for submit@debbugs.gnu.org; Sat, 23 Dec 2023 21:17:44 -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 1rHE3W-0007cX-VH for guix-patches@gnu.org; Sat, 23 Dec 2023 21:17:31 -0500 Received: from mail.cock.li ([37.120.193.123]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rHE3U-0003YX-4f for guix-patches@gnu.org; Sat, 23 Dec 2023 21:17:30 -0500 From: Justin Veilleux DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1703384241; bh=xLXhXEZm72QPbfedAev1gzlPn2kJiKrfG/pYV1PdX+8=; h=From:To:Subject:Date:From; b=HNIQ/DcdTKmqQ2V8pqjLJAHbQWFm7O6bxFxVceC8hJUy6Zj2kJouuiHWI6Aa1q+9y QjB7hruFTMeZ9o2k2weiteaTyIBi9IvAwRQHvbb+y33WAlvVp5G/djAV8oUomfUsjW i7QzJo871/J2HHcLbF/NTlGN6ytb2l5521KIe4/eRpN53WH2dEQlRdTsB83E6zEQek 1WvNAEXq36cC/nwPlXInLdUvaadd+yBYNny1wZVzbZX4c4mcU3bxSqNEllS3O4TTRV 6jGUXTf2yvs93RXa2KKGY980dYe5TeoO9yhCnLoT1g7WjOeouNZqs3p7DU7eqF92P/ tALQfuKvVlWZA== Date: Sat, 23 Dec 2023 21:16:55 -0500 Message-ID: <87o7eg73ag.fsf@cock.li> MIME-Version: 1.0 Received-SPF: pass client-ip=37.120.193.123; envelope-from=terramorpha@cock.li; helo=mail.cock.li 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is a patch to add arch linux's pacman package manager to guix. I was experimenting with having pacman as a package manager for regular FHS programs (on a guix system host), but there were too many dynamic library problems. In any case, the package manager itself works perfectly. Cheers. From 5d3be174c4e7fbd1db05f73147e1da2f17b6deb2 Mon Sep 17 00:00:00 2001 Message-ID: <5d3be174c4e7fbd1db05f73147e1da2f17b6deb2.1703383755.git.terramorpha@cock.li> From: terramorpha Date: Sat, 23 Dec 2023 21:07:55 -0500 Subject: [PATCH] gnu: Add pacman. * gnu/packages/package-management.scm (pacman): New variable. Change-Id: I2cedb84fc648ee5c4c07bee8bfb516861ffc1c22 --- gnu/packages/package-management.scm | 46 ++++++++++++++++++ .../patches/pacman-fix-meson-build.diff | 48 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 gnu/packages/patches/pacman-fix-meson-build.diff diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 97ea41df66..4d9b5f666f 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -23,6 +23,7 @@ ;;; Copyright © 2022, 2023 Zhu Zihao ;;; Copyright © 2023 jgart ;;; Copyright © 2023 Mădălin Ionel Patrașcu +;;; Copyright © 2023 Justin Veilleux ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +67,7 @@ (define-module (gnu packages package-management) #:use-module (gnu packages dejagnu) #:use-module (gnu packages dbm) #:use-module (gnu packages docbook) + #:use-module (gnu packages documentation) #:use-module (gnu packages file) #:use-module (gnu packages freedesktop) #:use-module (gnu packages flex) @@ -2326,3 +2328,47 @@ (define-public modules used on high-performance clusters to dynamically add and remove paths to specific versions of applications.") (license license:gpl2+))) + +(define-public pacman + (package + (name "pacman") + (version "6.0.2") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.archlinux.org/pacman/pacman.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0yxh6kljy19bc4wiphss3jq2nv7h3hw6vnrwbway5kbyqhbahx7p")) + (patches + (list + (search-patch "pacman-fix-meson-build.diff"))))) + (build-system meson-build-system) + (arguments + (list + #:tests? #f)) +(inputs + (list + curl + libarchive + gpgme + openssl)) + (native-inputs + (list + asciidoc + perl + python-3 + gnu-gettext + coreutils + pkg-config)) + (home-page "https://archlinux.org/pacman/") + (synopsis "Simple library-based package manager") + (description + "pacman is a utility which manages software packages in Linux. It uses +simple compressed files as a package format, and maintains a text-based +package database (more of a hierarchy), just in case some hand tweaking is +necessary.") + (license license:gpl2))) diff --git a/gnu/packages/patches/pacman-fix-meson-build.diff b/gnu/packages/patches/pacman-fix-meson-build.diff new file mode 100644 index 0000000000..47ce74739e --- /dev/null +++ b/gnu/packages/patches/pacman-fix-meson-build.diff @@ -0,0 +1,48 @@ +diff --git a/doc/meson.build b/doc/meson.build +index 5a8eb3a4..74ccf53e 100644 +--- a/doc/meson.build ++++ b/doc/meson.build +@@ -100,7 +100,7 @@ foreach page: manpages + sitepages + endforeach + + run_target('html', +- command : ['/bin/true'], ++ command : ['true'], + depends : html_targets) + + custom_target( +diff --git a/meson.build b/meson.build +index 37523b01..6c568020 100644 +--- a/meson.build ++++ b/meson.build +@@ -396,13 +396,13 @@ configure_file( + input : 'etc/makepkg.conf.in', + output : 'makepkg.conf', + configuration : substs, +- install_dir : SYSCONFDIR) ++ install_dir : join_paths(PREFIX, 'etc')) + + configure_file( + input : 'etc/pacman.conf.in', + output : 'pacman.conf', + configuration : substs, +- install_dir : SYSCONFDIR) ++ install_dir : join_paths(PREFIX, 'etc')) + + install_data( + 'proto/PKGBUILD-split.proto', +@@ -411,14 +411,6 @@ install_data( + 'proto/proto.install', + install_dir : join_paths(DATAROOTDIR, 'pacman')) + +-foreach path : [ +- join_paths(LOCALSTATEDIR, 'lib/pacman/'), +- join_paths(LOCALSTATEDIR, 'cache/pacman/pkg/'), +- join_paths(DATAROOTDIR, 'makepkg-template/'), +- join_paths(DATAROOTDIR, 'libalpm/hooks/'), +- ] +- meson.add_install_script('sh', '-c', 'mkdir -p "$DESTDIR/@0@"'.format(path)) +-endforeach + + TEST_ENV = environment() + TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.source_root(), 'scripts/library/')) base-commit: a8196632647b343f8e03c8f12fbdc0cc84ff90f6 -- 2.41.0