emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57146: closed ([PATCH] gnu: polkit: Fix cross-compiling)


From: GNU bug Tracking System
Subject: bug#57146: closed ([PATCH] gnu: polkit: Fix cross-compiling)
Date: Wed, 04 Jan 2023 05:17:02 +0000

Your message dated Wed, 04 Jan 2023 00:16:15 -0500
with message-id <87edsax4kg.fsf@gmail.com>
and subject line Re: bug#57146: [PATCH] gnu: polkit: Fix cross-compiling
has caused the debbugs.gnu.org bug report #57146,
regarding [PATCH] gnu: polkit: Fix cross-compiling
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
57146: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57146
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: polkit: Fix cross-compiling Date: Thu, 11 Aug 2022 19:11:00 -0400
The polkit package used to refer to docbook-xsl via inputs rather native inputs,
which obviously doesn't work when cross-compiling.
---
 gnu/packages/polkit.scm | 165 ++++++++++++++++++++--------------------
 1 file changed, 83 insertions(+), 82 deletions(-)

diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index a75608cd43..dd0cf42e5d 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Andrew Patterson <andrewpatt7@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,7 @@
 
 (define-module (gnu packages polkit)
   #:use-module ((guix licenses) #:select (lgpl2.0+))
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix memoization)
@@ -55,92 +57,91 @@ (define-public polkit-mozjs
     (name "polkit")
     (version "0.120")
     (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "https://www.freedesktop.org/software/polkit/releases/";
-                   name "-" version ".tar.gz"))
-             (sha256
-              (base32
-               "00zfg9b9ivkcj2jcf5b92cpvvyljz8cmfwj86lkvy5rihnd5jypf"))
-             (patches (search-patches "polkit-configure-elogind.patch"
-                                      "polkit-CVE-2021-4034.patch"))
-             (modules '((guix build utils)))
-             (snippet
-              '(begin
-                 (use-modules (guix build utils))
-                 ;; Disable broken test.
-                 (substitute* "test/Makefile.in"
-                   (("SUBDIRS = mocklibc . polkit polkitbackend")
-                    "SUBDIRS = mocklibc . polkit"))
-                 ;; Disable a test that requires Python, D-Bus and a few
-                 ;; libraries and fails with "ERROR: timed out waiting for bus
-                 ;; process to terminate".
-                 (substitute* "test/polkitbackend/Makefile.am"
-                   (("TEST_PROGS \\+= polkitbackendjsauthoritytest-wrapper.py")
-                    ""))
-                 ;; Guix System's polkit
-                 ;; service stores actions under /etc/polkit-1/actions.
-                 (substitute* 
"src/polkitbackend/polkitbackendinteractiveauthority.c"
-                   (("PACKAGE_DATA_DIR \"/polkit-1/actions\"")
-                    "PACKAGE_SYSCONF_DIR \"/polkit-1/actions\""))
-                 ;; Set the setuid helper's real location.
-                 (substitute* "src/polkitagent/polkitagentsession.c"
-                   (("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"")
-                    "\"/run/setuid-programs/polkit-agent-helper-1\""))))))
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.freedesktop.org/software/polkit/releases/";
+                    name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "00zfg9b9ivkcj2jcf5b92cpvvyljz8cmfwj86lkvy5rihnd5jypf"))
+              (patches (search-patches "polkit-configure-elogind.patch"
+                                       "polkit-CVE-2021-4034.patch"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          (use-modules (guix build utils))
+                          ;; Disable broken test.
+                          (substitute* "test/Makefile.in"
+                            (("SUBDIRS = mocklibc . polkit polkitbackend")
+                             "SUBDIRS = mocklibc . polkit"))
+                          ;; Disable a test that requires Python, D-Bus and a 
few
+                          ;; libraries and fails with "ERROR: timed out 
waiting for bus
+                          ;; process to terminate".
+                          (substitute* "test/polkitbackend/Makefile.am"
+                            (("TEST_PROGS \\+= 
polkitbackendjsauthoritytest-wrapper.py")
+                             ""))
+                          ;; Guix System's polkit
+                          ;; service stores actions under 
/etc/polkit-1/actions.
+                          (substitute* 
"src/polkitbackend/polkitbackendinteractiveauthority.c"
+                            (("PACKAGE_DATA_DIR \"/polkit-1/actions\"")
+                             "PACKAGE_SYSCONF_DIR \"/polkit-1/actions\""))
+                          ;; Set the setuid helper's real location.
+                          (substitute* "src/polkitagent/polkitagentsession.c"
+                            (("PACKAGE_PREFIX 
\"/lib/polkit-1/polkit-agent-helper-1\"")
+                             
"\"/run/setuid-programs/polkit-agent-helper-1\""))))))
     (build-system gnu-build-system)
-    (inputs
-     (list expat linux-pam elogind mozjs nspr))
-    (propagated-inputs
-     (list glib)) ; required by polkit-gobject-1.pc
-    (native-inputs
-     (list pkg-config
-           `(,glib "bin")                         ;for glib-mkenums
-           intltool
-           gobject-introspection
-           libxslt                                ;for man page generation
-           docbook-xsl))                          ;for man page generation
+    (inputs (list expat linux-pam elogind mozjs nspr))
+    (propagated-inputs (list glib)) ;required by polkit-gobject-1.pc
+    (native-inputs (list pkg-config
+                         `(,glib "bin") ;for glib-mkenums
+                         intltool
+                         gobject-introspection
+                         libxslt ;for man page generation
+                         docbook-xsl)) ;for man page generation
     (arguments
-     `(#:configure-flags '("--sysconfdir=/etc"
-                           "--enable-man-pages"
-                           ;; Prevent ‘configure: error: cannot check for
-                           ;; file existence when cross compiling’.
-                           ,@(if (%current-target-system)
-                                 '("--with-os-type=unknown")
-                                 '()))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after
-          'unpack 'fix-introspection-install-dir
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
-              (substitute* (find-files "." "Makefile.in")
-                (("@INTROSPECTION_GIRDIR@")
-                 (string-append out "/share/gir-1.0/"))
-                (("@INTROSPECTION_TYPELIBDIR@")
-                 (string-append out "/lib/girepository-1.0/"))))))
-         (add-after 'unpack 'fix-manpage-generation
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((xsldoc (string-append (assoc-ref inputs "docbook-xsl")
-                                          "/xml/xsl/docbook-xsl-"
-                                          ,(package-version docbook-xsl))))
-               (substitute* '("docs/man/Makefile.am" "docs/man/Makefile.in")
-                 (("http://docbook.sourceforge.net/release/xsl/current";)
-                  xsldoc)))))
-         (replace
-          'install
-          (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
-            ;; Override sysconfdir during "make install", to avoid attempting
-            ;; to install in /etc, and to instead install the skeletons in the
-            ;; output directory.
-            (let ((out (assoc-ref outputs "out")))
-             (apply invoke "make" "install"
-                           (string-append "sysconfdir=" out "/etc")
-                           (string-append "polkit_actiondir="
-                                          out "/share/polkit-1/actions")
-                           make-flags)))))))
+     (list #:configure-flags `(list "--sysconfdir=/etc" "--enable-man-pages"
+                                    ;; Prevent ‘configure: error: cannot check 
for
+                                    ;; file existence when cross compiling’.
+                                    ,@(if (%current-target-system)
+                                          '("--with-os-type=unknown")
+                                          '()))
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'fix-introspection-install-dir
+                          (lambda* (#:key outputs #:allow-other-keys)
+                            (let ((out (assoc-ref outputs "out")))
+                              (substitute* (find-files "." "Makefile.in")
+                                (("@INTROSPECTION_GIRDIR@")
+                                 (string-append out "/share/gir-1.0/"))
+                                (("@INTROSPECTION_TYPELIBDIR@")
+                                 (string-append out 
"/lib/girepository-1.0/"))))))
+                        (add-after 'unpack 'fix-manpage-generation
+                          (lambda* (#:key native-inputs #:allow-other-keys)
+                            (let ((xsldoc (string-append (assoc-ref
+                                                          native-inputs
+                                                          "docbook-xsl")
+                                           "/xml/xsl/docbook-xsl-"
+                                           #$(package-version docbook-xsl))))
+                              (substitute* '("docs/man/Makefile.am"
+                                             "docs/man/Makefile.in")
+                                
(("http://docbook.sourceforge.net/release/xsl/current";)
+                                 xsldoc)))))
+                        (replace 'install
+                          (lambda* (#:key outputs
+                                    (make-flags '()) #:allow-other-keys)
+                            ;; Override sysconfdir during "make install", to 
avoid attempting
+                            ;; to install in /etc, and to instead install the 
skeletons in the
+                            ;; output directory.
+                            (let ((out (assoc-ref outputs "out")))
+                              (apply invoke
+                                     "make"
+                                     "install"
+                                     (string-append "sysconfdir=" out "/etc")
+                                     (string-append "polkit_actiondir=" out
+                                                    "/share/polkit-1/actions")
+                                     make-flags)))))))
     (home-page "https://www.freedesktop.org/wiki/Software/polkit/";)
     (synopsis "Authorization API for privilege management")
-    (description "Polkit is an application-level toolkit for defining and
+    (description
+     "Polkit is an application-level toolkit for defining and
 handling the policy that allows unprivileged processes to speak to
 privileged processes.  It is a framework for centralizing the decision
 making process with respect to granting access to privileged operations
-- 
2.37.1




--- End Message ---
--- Begin Message --- Subject: Re: bug#57146: [PATCH] gnu: polkit: Fix cross-compiling Date: Wed, 04 Jan 2023 00:16:15 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Hi,

Andrew Patterson <andrewpatt7@gmail.com> writes:

> I haven't needed to cross-compile any guix images recently, but `guix
> build --target=aarch64-linux-gnu polkit-duktape` on an x86_64 machine
> just completed successfully, so I don't think there's any issue still
> here?

Thanks for checking.  I'll close the issue.  It can be reopen if
somethig w.r.t. cross-compilation and polkit is amiss.

-- 
Thanks,
Maxim


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]