Message ID | NATslO3--3-2@tuta.io |
---|---|
State | New |
Headers | show |
Series | [bug#57453] Add chrpath package | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
On 27-08-2022 12:40, damaxi via Guix-patches via wrote: > Hello, > > That's my first time when I am trying to apply patch to guix. > > That's a package which is required by some software like bitbake. So I > think it would be nice to have. > > Best Regards, > Daniel Looking at the README, it appears to be a Debian project. As such, I do not think the FSF directory entry can count as home page. The closest thing to a home page I found is: <https://tracker.debian.org/pkg/chrpath> (there's also https://packages.debian.org/source/sid/chrpath, but that's version-specific). It also contains some binaries (generated Autotools files) and bundled dependencies (configure, config.guess, config.h.in, depcomp, install-sh, missing, config.sub, acinclude.m4, aclocal.m4), try removing them (in a snippet). That way, the problem of old Autotools not supporting new architectures is avoided (it's sometimes encountered for aarch64, powerpc and riscv64). AFAICT no version of the GPL is specified anywhere. As such, by condition (9) of the GPL 2, > [...] If the Program does not specify a version number of > this License, you may choose any version ever published by the Free > Software > Foundation. , so it appears to be gpl1+, not gpl2-only. Geetings, Maxime.
Hello, Thank you for comments but there are few things: - https://tracker.debian.org/pkg/chrpath <<- this link doesn't work that's why I prefer FSF one, I hadn't found any other link - can you point out which are those: (generated Autotools files) and bundled dependencies (configure, config.guess, config.h.in, depcomp, install-sh, missing, config.sub, acinclude.m4, aclocal.m4) files? I am not autotool expert but I see that removing some files like configure broke build, are you able to point what exactly files I have to remove: acinclude.m4, aclocal.m4 << loks fine. - There is copyright file where GLP2 is specified Best Regards, Daniel
On 28-08-2022 21:16, daniel.maksymow--- via Guix-patches via wrote: > Hello, > > Thank you for comments but there are few things: > > - https://tracker.debian.org/pkg/chrpath <<- this link doesn't work > that's why I prefer FSF one, I hadn't found any other link > I cannot reproduce locally. What kind of errors do you get? > - can you point out which are those: > (generated Autotools files) and bundled > dependencies (configure, config.guess, config.h.in, depcomp, > install-sh, missing, config.sub, acinclude.m4, aclocal.m4) > files? That's the list. These are those, I don't think I can go any more specific. > I am not autotool expert but I see that removing some files like > configure broke build, are you able to point what exactly files I have > to remove: acinclude.m4, aclocal.m4 << loks fine. All of them. In the build error message, it will IIRC say something about 'autoconf not found' or such, when you encounter such a thing, you will need to add the autoconf package. > - There is copyright file where GLP2 is specified In the copyright file I found <https://sources.debian.org/src/chrpath/0.16-2/debian/copyright/>, GPL2 is not specified. Greetings, Maxime.
Finally I found the time for building this package. I removed those generated flags and added native-inputs autoconf automake. Looks like there is an error in configure.ac file But during build I get this error: ./configure: line 4921: syntax error near unexpected token `$flag,' ./configure: line 4921: ` JAPHAR_GREP_CFLAGS($flag, CFLAGS="$CFLAGS $flag" )' error: in phase 'configure': uncaught exception: %exception #<&invoke-error program: "/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" arguments: ("./configure" "CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "--prefix=/gnu/store/skdzrcbnmvafa5zk2i0jxw6sxl2b7hz9-chrpath-0.16" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu") exit-status: 2 term-signal: #f stop-signal: #f> phase `configure' failed after 1.5 seconds I checked configure.ac file and I found this: if eval "test x$GCC = xyes"; then for flag in \ -W \ -Wall \ -Wcast-align \ -Wcast-qual \ -Wcomments \ -Wmissing-declarations \ -Wmissing-prototypes \ -Wpointer-arith \ -Wreturn-type \ -Wstrict-prototypes do JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) done fi Have you idea what can be wrong here? Best Regards, Daniel
On 11-09-2022 15:28, daniel.maksymow--- via Guix-patches via wrote: > Finally I found the time for building this package. I removed those > generated flags and added > native-inputs autoconf automake. Looks like there is an error in > configure.ac file > > But during build I get this error: > ./configure: line 4921: syntax error near unexpected token `$flag,' > ./configure: line 4921: ` JAPHAR_GREP_CFLAGS($flag, CFLAGS="$CFLAGS > $flag" )' [...] > > Have you idea what can be wrong here? I included too many files in the list of files to remove. 'acinclude.m4' is fine -- it doesn't appear to be generated, it looks like source code. Tested with the following definition: (define-public chrpath (package (name "chrpath") (version "0.16") (source (origin (method url-fetch) (uri (string-append "https://deb.debian.org/debian/pool/main/c/chrpath/chrpath_" version ".orig.tar.gz")) (sha256 (base32 "0yvfq891mcdkf8g18gjjkn2m5rvs8z4z4cl1vwdhx6f2p9a4q3dv")) (modules '((guix build utils))) (snippet ;; Remove generated Autotools files -- they are generated ;; and additionally don't support new architectures. '(for-each delete-file (find-files "." "\\b(configure|config\\.sub|config.guess|Makefile\\.in|missing|depcomp|config\\.h\\.in|aclocal\\.m4|install-sh)$"))))) (build-system gnu-build-system) (native-inputs (list autoconf automake)) (home-page "https://tracker.debian.org/pkg/chrpath") (synopsis "Tool to edit the rpath of ELF binaries") (description "@code{chrpath} allows you to modify the dynamic library load path (rpath and runpath) of compiled programs and libraries") (license gpl1+))) ; condition (9) of the GPL 2 (no version is specified) Also, one additional thing: you are using the '.orig.tar.gz' tarball, but Debian often patches software. On https://packages.debian.org/sid/chrpath, there is a also a patch chrpath_0.16-2.diff.gz , fixing a MIPS-specific bug. Could you add it go gnu/local.mk, gnu/packages/patches and the 'patches' field (using the 'search-pathes' procedure)? (MIPS isn't a 'fully supported' system anymore according to (guix)GNU Distribution, but assuming the patch applies cleanly, might as well make it a tiny bit more supported.) Greetings, Maxime.
On 17-09-2022 21:23, daniel.maksymow@tuta.io wrote: > Thank it works! > > Regarding patch, I tried the following lines: > > (uri (list (string-append > > "https://deb.debian.org/debian/pool/main/c/chrpath/chrpath_ > <https://deb.debian.org/debian/pool/main/c/chrpath/chrpath_>" > version ".orig.tar.gz") > (string-append > > "http://deb.debian.org/debian/pool/main/c/chrpath/chrpath_ > <http://deb.debian.org/debian/pool/main/c/chrpath/chrpath_>" > version "-2.diff.gz"))) > (patches (search-patches "chrpath_0.16-2.diff")) > > but it looks like the second uri is not downloading. However I saw a > similar packages. Do you know what maybe wrong here? The URL second downloads fine for me (tried out in a browser) <http://deb.debian.org/debian/pool/main/c/chrpath/chrpath_0.16-2.diff.gz>. Taking the information at face value, I'm guessing temporarily did not have Internet access or that the Debian servers were down for a moment. As a general recommendation, when something doesn't work, I recommend sending a copy of the error message, that would be helpful for determining what's actually wrong. I'm guessing you got the following error message: [...] guix build: error: chrpath_0.16.2.diff: patch not found If so, you forgot to put the patch somewhere where it could be found by Guix. For that, I refer to my earlier response about gnu/local.mk and gnu/packages/patches. Another possibility is that you got a 'hash mismatch' error. In that case, the problem is that while the hash of the .orig.tar.gz is presumably correct, it is virtually guaranteed to be different than the hash of the .diff.gz -- all the 'uri' are supposed to be equivalent, this is not a place to put URLs of patches (aside from some edge cases like xvfb-run, which don't apply here). In that case, the solution is to remove the .diff.gz URL as you are already adding a local copy of the patch for 'search-patches' to find. If it's something else, you need to share the error message. Greetings, Maxime.
From f32d1154938e989177d59b32c91c5482bb127b0d Mon Sep 17 00:00:00 2001 Message-Id: <f32d1154938e989177d59b32c91c5482bb127b0d.1661596588.git.daniel.maksymow@tuta.io> From: Daniel Maksymow <daniel.maksymow@tuta.io> Date: Sat, 27 Aug 2022 12:25:49 +0200 Subject: [PATCH] gnu: chrpath: Add new package To: guix-patches@gnu.org * gnu/packages/elf.scm: New package added. --- gnu/packages/elf.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 8cc2ff3637..d1e878a6e6 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -31,7 +31,7 @@ (define-module (gnu packages elf) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) + #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+ gpl2)) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) @@ -282,3 +282,23 @@ (define-public patchelf (properties '((release-monitoring-url . "https://github.com/NixOS/patchelf/releases"))) (license gpl3+))) + +(define-public chrpath + (package + (name "chrpath") + (version "0.16") + (source (origin + (method url-fetch) + (uri (string-append + "https://deb.debian.org/debian/pool/main/c/chrpath/chrpath_" + version ".orig.tar.gz")) + (sha256 + (base32 + "0yvfq891mcdkf8g18gjjkn2m5rvs8z4z4cl1vwdhx6f2p9a4q3dv")))) + (build-system gnu-build-system) + (home-page "https://directory.fsf.org/wiki/Chrpath") + (synopsis "Tool to edit the rpath of ELF binaries") + (description + "@code{chrpath} allows you to modify the dynamic library load path + (rpath and runpath) of compiled programs and libraries") + (license gpl2))) -- 2.37.0