gnu: criu: Reset timestamps in .egg file.
Ensure all files being built are dated no earlier than 1980 by copying in a modified (@@ (guix build python-build-system) ensure-no-mtimes-pre-1980) which is symlink-aware. This copy should be removed when the original procedure is modified to avoid calling UTIME on symlinks. * gnu/packages/virtualization.scm (criu)[arguments]: Add 'ensure-no-mtimes-pre-1980' phase. [inputs]: Remove python. [native-inputs]: Add python-toolchain. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
7ff9ca2201
commit
c9e1fff793
1 changed files with 15 additions and 2 deletions
|
@ -1697,6 +1697,8 @@ domains, their live performance and resource utilization statistics.")
|
||||||
(string-append "XMLTO="
|
(string-append "XMLTO="
|
||||||
(search-input-file %build-inputs
|
(search-input-file %build-inputs
|
||||||
"/bin/xmlto")))
|
"/bin/xmlto")))
|
||||||
|
#:modules ((ice-9 ftw)
|
||||||
|
,@%gnu-build-system-modules)
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(delete 'configure) ; no configure script
|
(delete 'configure) ; no configure script
|
||||||
|
@ -1719,6 +1721,17 @@ domains, their live performance and resource utilization statistics.")
|
||||||
(substitute* "criu/include/plugin.h"
|
(substitute* "criu/include/plugin.h"
|
||||||
(("/var") (string-append (assoc-ref outputs "out"))))
|
(("/var") (string-append (assoc-ref outputs "out"))))
|
||||||
))
|
))
|
||||||
|
;; TODO: use
|
||||||
|
;; (@@ (guix build python-build-system) ensure-no-mtimes-pre-1980)
|
||||||
|
;; when it no longer throws due to trying to call UTIME on symlinks.
|
||||||
|
(add-after 'unpack 'ensure-no-mtimes-pre-1980
|
||||||
|
(lambda _
|
||||||
|
(let ((early-1980 315619200)) ; 1980-01-02 UTC
|
||||||
|
(ftw "." (lambda (file stat flag)
|
||||||
|
(unless (or (<= early-1980 (stat:mtime stat))
|
||||||
|
(eq? (stat:type stat) 'symlink))
|
||||||
|
(utime file early-1980 early-1980))
|
||||||
|
#t)))))
|
||||||
(add-before 'build 'fix-symlink
|
(add-before 'build 'fix-symlink
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; The file 'images/google/protobuf/descriptor.proto' points to
|
;; The file 'images/google/protobuf/descriptor.proto' points to
|
||||||
|
@ -1748,7 +1761,6 @@ domains, their live performance and resource utilization statistics.")
|
||||||
(for-each delete-file (find-files out "\\.a$"))))))))
|
(for-each delete-file (find-files out "\\.a$"))))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("protobuf" ,protobuf)
|
`(("protobuf" ,protobuf)
|
||||||
("python" ,python)
|
|
||||||
("python-protobuf" ,python-protobuf)
|
("python-protobuf" ,python-protobuf)
|
||||||
("iproute" ,iproute)
|
("iproute" ,iproute)
|
||||||
("libaio" ,libaio)
|
("libaio" ,libaio)
|
||||||
|
@ -1763,7 +1775,8 @@ domains, their live performance and resource utilization statistics.")
|
||||||
asciidoc
|
asciidoc
|
||||||
xmlto
|
xmlto
|
||||||
docbook-xml
|
docbook-xml
|
||||||
docbook-xsl))
|
docbook-xsl
|
||||||
|
python-toolchain))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
;; included by 'rpc.pb-c.h'
|
;; included by 'rpc.pb-c.h'
|
||||||
(list protobuf-c))
|
(list protobuf-c))
|
||||||
|
|
Reference in a new issue