* [bug#57453] Add chrpath package
@ 2022-08-27 10:40 damaxi via Guix-patches via
2022-08-28 16:10 ` [bug#57453] Add new package chrpath damaxi via Guix-patches via
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: damaxi via Guix-patches via @ 2022-08-27 10:40 UTC (permalink / raw)
To: 57453
[-- Attachment #1.1: Type: text/plain, Size: 196 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 510 bytes --]
[-- Attachment #2: 0001-gnu-chrpath-Add-new-package.patch --]
[-- Type: text/x-patch, Size: 1933 bytes --]
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#57453] Add new package chrpath
2022-08-27 10:40 [bug#57453] Add chrpath package damaxi via Guix-patches via
@ 2022-08-28 16:10 ` damaxi via Guix-patches via
2022-08-28 16:33 ` [bug#57453] Add chrpath package Maxime Devos
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: damaxi via Guix-patches via @ 2022-08-28 16:10 UTC (permalink / raw)
To: 57453
[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #1.2: Type: text/html, Size: 140 bytes --]
[-- Attachment #2: 0001-gnu-chrpath-Add-new-package.patch --]
[-- Type: text/x-patch, Size: 1933 bytes --]
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#57453] Add chrpath package
2022-08-27 10:40 [bug#57453] Add chrpath package damaxi via Guix-patches via
2022-08-28 16:10 ` [bug#57453] Add new package chrpath damaxi via Guix-patches via
@ 2022-08-28 16:33 ` Maxime Devos
2022-08-28 19:16 ` [bug#57453] WIP daniel.maksymow--- via Guix-patches via
2022-09-11 13:28 ` daniel.maksymow--- via Guix-patches via
3 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-08-28 16:33 UTC (permalink / raw)
To: daniel.maksymow, 57453
[-- Attachment #1.1.1: Type: text/plain, Size: 1316 bytes --]
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.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#57453] WIP
2022-08-27 10:40 [bug#57453] Add chrpath package damaxi via Guix-patches via
2022-08-28 16:10 ` [bug#57453] Add new package chrpath damaxi via Guix-patches via
2022-08-28 16:33 ` [bug#57453] Add chrpath package Maxime Devos
@ 2022-08-28 19:16 ` daniel.maksymow--- via Guix-patches via
2022-08-28 22:24 ` Maxime Devos
2022-09-11 13:28 ` daniel.maksymow--- via Guix-patches via
3 siblings, 1 reply; 8+ messages in thread
From: daniel.maksymow--- via Guix-patches via @ 2022-08-28 19:16 UTC (permalink / raw)
To: 57453
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1186 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#57453] WIP
2022-08-28 19:16 ` [bug#57453] WIP daniel.maksymow--- via Guix-patches via
@ 2022-08-28 22:24 ` Maxime Devos
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-08-28 22:24 UTC (permalink / raw)
To: daniel.maksymow, 57453
[-- Attachment #1.1.1.1: Type: text/plain, Size: 1234 bytes --]
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.
[-- Attachment #1.1.1.2: Type: text/html, Size: 2615 bytes --]
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#57453] WIP
2022-08-27 10:40 [bug#57453] Add chrpath package damaxi via Guix-patches via
` (2 preceding siblings ...)
2022-08-28 19:16 ` [bug#57453] WIP daniel.maksymow--- via Guix-patches via
@ 2022-09-11 13:28 ` daniel.maksymow--- via Guix-patches via
2022-09-12 14:22 ` [bug#57453] WIP (chrpath) Maxime Devos
3 siblings, 1 reply; 8+ messages in thread
From: daniel.maksymow--- via Guix-patches via @ 2022-09-11 13:28 UTC (permalink / raw)
To: 57453
[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2613 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#57453] WIP (chrpath)
2022-09-11 13:28 ` daniel.maksymow--- via Guix-patches via
@ 2022-09-12 14:22 ` Maxime Devos
[not found] ` <NCBSkq3--3-2@tuta.io>
0 siblings, 1 reply; 8+ messages in thread
From: Maxime Devos @ 2022-09-12 14:22 UTC (permalink / raw)
To: daniel.maksymow, 57453
[-- Attachment #1.1.1: Type: text/plain, Size: 2454 bytes --]
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.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#57453] WIP (chrpath)
[not found] ` <NCBSkq3--3-2@tuta.io>
@ 2022-09-17 19:57 ` Maxime Devos
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-09-17 19:57 UTC (permalink / raw)
To: daniel.maksymow, 57453
[-- Attachment #1.1.1: Type: text/plain, Size: 2312 bytes --]
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.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-09-17 19:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27 10:40 [bug#57453] Add chrpath package damaxi via Guix-patches via
2022-08-28 16:10 ` [bug#57453] Add new package chrpath damaxi via Guix-patches via
2022-08-28 16:33 ` [bug#57453] Add chrpath package Maxime Devos
2022-08-28 19:16 ` [bug#57453] WIP daniel.maksymow--- via Guix-patches via
2022-08-28 22:24 ` Maxime Devos
2022-09-11 13:28 ` daniel.maksymow--- via Guix-patches via
2022-09-12 14:22 ` [bug#57453] WIP (chrpath) Maxime Devos
[not found] ` <NCBSkq3--3-2@tuta.io>
2022-09-17 19:57 ` Maxime Devos
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).