* Problem with patching tar
@ 2015-05-05 6:52 Manolis Ragkousis
2015-05-05 16:13 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Manolis Ragkousis @ 2015-05-05 6:52 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
Good morning guix
When I try to patch tar I get "(vm-run "VM: Stack overflow" ())",
probably, because it tries to use patch but it does not yet exist and
I get the chicken-egg problem.
I created patch-final in commencement.scm and added it to %boot6-inputs
which are used to build %final-inputs. But I am still not able to patch tar.
After Ludo's suggestion I post the patch and the backtrace.
http://paste.lisp.org/display/147854
Any ideas?
Manolis
[-- Attachment #2: 0001-gnu-base-tar-bugfixes.patch --]
[-- Type: text/x-patch, Size: 3717 bytes --]
From 463d929cc3d6f07f86f4737a94679bf102a77661 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 5 May 2015 09:32:46 +0300
Subject: [PATCH] gnu: base: tar bugfixes
---
gnu-system.am | 1 +
gnu/packages/base.scm | 3 ++-
gnu/packages/commencement.scm | 10 ++++++++-
.../patches/tar-d_ino_in_dirent-bugfix.patch | 25 ++++++++++++++++++++++
4 files changed, 37 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/tar-d_ino_in_dirent-bugfix.patch
diff --git a/gnu-system.am b/gnu-system.am
index be09434..3f4100d 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -543,6 +543,7 @@ dist_patch_DATA = \
gnu/packages/patches/slim-sigusr1.patch \
gnu/packages/patches/soprano-find-clucene.patch \
gnu/packages/patches/superlu-dist-scotchmetis.patch \
+ gnu/packages/patches/tar-d_ino_in_dirent-bugfix.patch \
gnu/packages/patches/tcsh-fix-autotest.patch \
gnu/packages/patches/teckit-cstdio.patch \
gnu/packages/patches/texi2html-document-encoding.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 1cecc52..bbac3ac 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -139,7 +139,8 @@ implementation offers several extensions over the standard utility.")
version ".tar.xz"))
(sha256
(base32
- "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4"))))
+ "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4"))
+ (patches (list (search-patch "tar-d_ino_in_dirent-bugfix.patch")))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("CPPFLAGS=-DPATH_MAX=4096")))
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 4a9fc5b..762658b 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -614,6 +614,13 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
,@(fold alist-delete (package-inputs ld-wrapper-boot3)
'("guile" "bash"))))))
+(define patch-final
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs patch
+ %boot5-inputs
+ (current-source-location)
+ #:guile guile-final)))
+
(define coreutils-final
;; The final Coreutils. Treat them specially because some packages, such as
;; Findutils, keep a reference to the Coreutils they were built with.
@@ -639,7 +646,8 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define %boot6-inputs
;; Now use the final Coreutils.
- `(("coreutils" ,coreutils-final)
+ `(("patch" ,patch-final)
+ ("coreutils" ,coreutils-final)
("grep" ,grep-final)
,@%boot5-inputs))
diff --git a/gnu/packages/patches/tar-d_ino_in_dirent-bugfix.patch b/gnu/packages/patches/tar-d_ino_in_dirent-bugfix.patch
new file mode 100644
index 0000000..e115265
--- /dev/null
+++ b/gnu/packages/patches/tar-d_ino_in_dirent-bugfix.patch
@@ -0,0 +1,25 @@
+diff --git a/src/tar.c b/src/tar.c
+index 225c624..f8102e0 100644
+--- a/src/tar.c
++++ b/src/tar.c
+@@ -1341,14 +1341,18 @@ static char filename_terminator;
+ static char const *const sort_mode_arg[] = {
+ "none",
+ "name",
++#if D_INO_IN_DIRENT
+ "inode",
++#endif
+ NULL
+ };
+
+ static int sort_mode_flag[] = {
+ SAVEDIR_SORT_NONE,
+ SAVEDIR_SORT_NAME,
++#if D_INO_IN_DIRENT
+ SAVEDIR_SORT_INODE
++#endif
+ };
+
+ ARGMATCH_VERIFY (sort_mode_arg, sort_mode_flag);
+--
+2.3.7
\ No newline at end of file
--
2.3.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Problem with patching tar
2015-05-05 6:52 Problem with patching tar Manolis Ragkousis
@ 2015-05-05 16:13 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-05-05 16:13 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
Manolis Ragkousis <manolis837@gmail.com> skribis:
> When I try to patch tar I get "(vm-run "VM: Stack overflow" ())",
> probably, because it tries to use patch but it does not yet exist and
> I get the chicken-egg problem.
Indeed. The problem was that, by default, source patching in
‘patch-and-repack’ would use not the tar from ‘%final-inputs’, but the
tar built with ‘%final-inputs’. Hence the circular dependency: to apply
the patch of this tar, we would first need to built it.
So you first need this patch:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1204 bytes --]
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -315,8 +315,11 @@ representation."
(string-append (package-name package) "-" (package-version package)))
(define (%standard-patch-inputs)
- (let ((ref (lambda (module var)
- (module-ref (resolve-interface module) var))))
+ (let* ((canonical (module-ref (resolve-interface '(gnu packages base))
+ 'canonical-package))
+ (ref (lambda (module var)
+ (canonical
+ (module-ref (resolve-interface module) var)))))
`(("tar" ,(ref '(gnu packages base) 'tar))
("xz" ,(ref '(gnu packages compression) 'xz))
("bzip2" ,(ref '(gnu packages compression) 'bzip2))
@@ -324,8 +327,7 @@ representation."
("lzip" ,(ref '(gnu packages compression) 'lzip))
("unzip" ,(ref '(gnu packages zip) 'unzip))
("patch" ,(ref '(gnu packages base) 'patch))
- ("locales" ,(ref '(gnu packages commencement)
- 'glibc-utf8-locales-final)))))
+ ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales)))))
(define (default-guile)
"Return the default Guile package used to run the build code of
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
I just pushed it to wip-hurd.
Make sure to remind us to apply it in the next core-updates cycle.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-05 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-05 6:52 Problem with patching tar Manolis Ragkousis
2015-05-05 16:13 ` Ludovic Courtès
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).