unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32193: Java packages are indeterministic (due to order in jar?)
@ 2018-07-17 21:09 Björn Höfling
  2018-07-19 17:51 ` Julien Lepiller
  0 siblings, 1 reply; 2+ messages in thread
From: Björn Höfling @ 2018-07-17 21:09 UTC (permalink / raw)
  To: 32193


[-- Attachment #1.1: Type: text/plain, Size: 1255 bytes --]

/pre-inst-env  guix build --check java-eclipse-jdt-core -K
./pre-inst-env  guix build --check -K java-httpcomponents-httpcore-nio

both fail.

diffoscope /gnu/store/6r2x0fbsj9kwvljrdx2nc8nbrvd9d78m-java-eclipse-jdt-core-3.12.3 /gnu/store/6r2x0fbsj9kwvljrdx2nc8nbrvd9d78m-java-eclipse-jdt-core-3.12.3-check/  >java-eclipse-jdt-core-3.12.3_diffoscope.log

This looks like:

│ │ │ │ +org/eclipse/jdt/core/formatter
│ │ │ │  org/eclipse/jdt/core/eval
│ │ │ │ +org/eclipse/jdt/core/jdom
│ │ │ │  org/eclipse/jdt/core/dom
│ │ │ │  org/eclipse/jdt/core/dom/rewrite
│ │ │ │ -org/eclipse/jdt/core/formatter
│ │ │ │ -org/eclipse/jdt/core/jdom
│ │ │ │ -org/eclipse/jdt/core/search
│ │ │ │ -org/eclipse/jdt/core/compiler
│ │ │ │ -org/eclipse/jdt/core/compiler/batch
│ │ │ │  org/eclipse/jdt/core/index

i.e. order is wrong. Full diff attached.

In 'strip-jar-timestamps the jars are repacked the last time, with
find-files and zip.

I made some experiments: zip is sensitive to the order of inputs.

I tried some examples from a Guile-REPL with
find-files from guix/build/utils.scm, but they worked as expected,
returning files in order.

Björn

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: java-eclipse-jdt-core-3.12.3_diffoscope.log --]
[-- Type: text/x-log, Size: 6623 bytes --]

--- /gnu/store/6r2x0fbsj9kwvljrdx2nc8nbrvd9d78m-java-eclipse-jdt-core-3.12.3
+++ /gnu/store/6r2x0fbsj9kwvljrdx2nc8nbrvd9d78m-java-eclipse-jdt-core-3.12.3-check/
├── share
│ ├── java
│ │ ├── eclipse-jdt-core.jar
│ │ │ ├── zipinfo -v {}
│ │ │ │ @@ -54,15 +54,15 @@
│ │ │ │    version of encoding software:                   3.0
│ │ │ │    minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
│ │ │ │    minimum software version required to extract:   1.0
│ │ │ │    compression method:                             none (stored)
│ │ │ │    file security status:                           not encrypted
│ │ │ │    extended local header:                          no
│ │ │ │    file last modified on (DOS date/time):          1980 Jan 1 00:00:00
│ │ │ │ -  32-bit CRC value (hex):                         2bf4f7e9
│ │ │ │ +  32-bit CRC value (hex):                         702a8ee6
│ │ │ │    compressed size:                                1922 bytes
│ │ │ │    uncompressed size:                              1922 bytes
│ │ │ │    length of filename:                             19 characters
│ │ │ │    length of extra field:                          0 bytes
│ │ │ │    length of file comment:                         0 characters
│ │ │ │    disk number on which file begins:               disk 1
│ │ │ │    apparent file type:                             binary
│ │ │ ├── META-INF/INDEX.LIST
│ │ │ │┄ ordering differences only
│ │ │ │ @@ -1,55 +1,55 @@
│ │ │ │  JarIndex-Version: 1.0
│ │ │ │  
│ │ │ │  /gnu/store/6r2x0fbsj9kwvljrdx2nc8nbrvd9d78m-java-eclipse-jdt-core-3.12.3/share/java/eclipse-jdt-core.jar
│ │ │ │  org
│ │ │ │  org/eclipse
│ │ │ │  org/eclipse/jdt
│ │ │ │  org/eclipse/jdt/core
│ │ │ │ +org/eclipse/jdt/core/formatter
│ │ │ │  org/eclipse/jdt/core/eval
│ │ │ │ +org/eclipse/jdt/core/jdom
│ │ │ │  org/eclipse/jdt/core/dom
│ │ │ │  org/eclipse/jdt/core/dom/rewrite
│ │ │ │ -org/eclipse/jdt/core/formatter
│ │ │ │ -org/eclipse/jdt/core/jdom
│ │ │ │ -org/eclipse/jdt/core/search
│ │ │ │ -org/eclipse/jdt/core/compiler
│ │ │ │ -org/eclipse/jdt/core/compiler/batch
│ │ │ │  org/eclipse/jdt/core/index
│ │ │ │  org/eclipse/jdt/core/util
│ │ │ │ +org/eclipse/jdt/core/compiler
│ │ │ │ +org/eclipse/jdt/core/compiler/batch
│ │ │ │ +org/eclipse/jdt/core/search
│ │ │ │  org/eclipse/jdt/internal
│ │ │ │ +org/eclipse/jdt/internal/codeassist
│ │ │ │ +org/eclipse/jdt/internal/codeassist/complete
│ │ │ │ +org/eclipse/jdt/internal/codeassist/select
│ │ │ │ +org/eclipse/jdt/internal/codeassist/impl
│ │ │ │ +org/eclipse/jdt/internal/formatter
│ │ │ │ +org/eclipse/jdt/internal/formatter/linewrap
│ │ │ │ +org/eclipse/jdt/internal/formatter/old
│ │ │ │  org/eclipse/jdt/internal/eval
│ │ │ │ +org/eclipse/jdt/internal/antadapter
│ │ │ │  org/eclipse/jdt/internal/core
│ │ │ │  org/eclipse/jdt/internal/core/eval
│ │ │ │ -org/eclipse/jdt/internal/core/hierarchy
│ │ │ │ +org/eclipse/jdt/internal/core/jdom
│ │ │ │  org/eclipse/jdt/internal/core/dom
│ │ │ │  org/eclipse/jdt/internal/core/dom/rewrite
│ │ │ │  org/eclipse/jdt/internal/core/dom/rewrite/imports
│ │ │ │  org/eclipse/jdt/internal/core/builder
│ │ │ │ -org/eclipse/jdt/internal/core/jdom
│ │ │ │ -org/eclipse/jdt/internal/core/search
│ │ │ │ -org/eclipse/jdt/internal/core/search/matching
│ │ │ │ -org/eclipse/jdt/internal/core/search/indexing
│ │ │ │ -org/eclipse/jdt/internal/core/search/processing
│ │ │ │  org/eclipse/jdt/internal/core/index
│ │ │ │ +org/eclipse/jdt/internal/core/hierarchy
│ │ │ │  org/eclipse/jdt/internal/core/util
│ │ │ │ -org/eclipse/jdt/internal/codeassist
│ │ │ │ -org/eclipse/jdt/internal/codeassist/complete
│ │ │ │ -org/eclipse/jdt/internal/codeassist/select
│ │ │ │ -org/eclipse/jdt/internal/codeassist/impl
│ │ │ │ -org/eclipse/jdt/internal/formatter
│ │ │ │ -org/eclipse/jdt/internal/formatter/old
│ │ │ │ -org/eclipse/jdt/internal/formatter/linewrap
│ │ │ │ +org/eclipse/jdt/internal/core/search
│ │ │ │ +org/eclipse/jdt/internal/core/search/processing
│ │ │ │ +org/eclipse/jdt/internal/core/search/indexing
│ │ │ │ +org/eclipse/jdt/internal/core/search/matching
│ │ │ │  org/eclipse/jdt/internal/compiler
│ │ │ │ -org/eclipse/jdt/internal/compiler/lookup
│ │ │ │ -org/eclipse/jdt/internal/compiler/batch
│ │ │ │ -org/eclipse/jdt/internal/compiler/flow
│ │ │ │ -org/eclipse/jdt/internal/compiler/codegen
│ │ │ │ -org/eclipse/jdt/internal/compiler/ast
│ │ │ │ -org/eclipse/jdt/internal/compiler/classfmt
│ │ │ │ -org/eclipse/jdt/internal/compiler/impl
│ │ │ │ -org/eclipse/jdt/internal/compiler/env
│ │ │ │  org/eclipse/jdt/internal/compiler/parser
│ │ │ │  org/eclipse/jdt/internal/compiler/parser/diagnose
│ │ │ │  org/eclipse/jdt/internal/compiler/problem
│ │ │ │ +org/eclipse/jdt/internal/compiler/impl
│ │ │ │ +org/eclipse/jdt/internal/compiler/codegen
│ │ │ │ +org/eclipse/jdt/internal/compiler/ast
│ │ │ │  org/eclipse/jdt/internal/compiler/util
│ │ │ │ -org/eclipse/jdt/internal/antadapter
│ │ │ │ +org/eclipse/jdt/internal/compiler/env
│ │ │ │ +org/eclipse/jdt/internal/compiler/classfmt
│ │ │ │ +org/eclipse/jdt/internal/compiler/batch
│ │ │ │ +org/eclipse/jdt/internal/compiler/lookup
│ │ │ │ +org/eclipse/jdt/internal/compiler/flow
│ │ │ ├── /gnu/store/as7vb5xx7vqdwmmqj9543470r49b4c0c-coreutils-8.28/bin/stat {}
│ │ │ │ @@ -1,8 +1,8 @@
│ │ │ │  
│ │ │ │    Size: 9537736   	Blocks: 18632      IO Block: 4096   regular file
│ │ │ │ -Links: 2
│ │ │ │ +Links: 1
│ │ │ │  Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
│ │ │ │  
│ │ │ │  Modify: 1970-01-01 00:00:01.000000000 +0000
│ │ │ │  
│ │ │ │   Birth: -

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#32193: Java packages are indeterministic (due to order in jar?)
  2018-07-17 21:09 bug#32193: Java packages are indeterministic (due to order in jar?) Björn Höfling
@ 2018-07-19 17:51 ` Julien Lepiller
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Lepiller @ 2018-07-19 17:51 UTC (permalink / raw)
  To: 32193-done

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

This was due to an ordering issue in META-INF/INDEX.LIST. The file is
generated before running strip-jar-timestamps, so the order of the
content is not deterministic when the file is generated. In
79d4d47b99591e4edd8cefee907fbb0d930f78aa I added a phase before that,
that runs strip-jar-timestamps before and after generating INDEX.LIST
(after because INDEX.LIST otherwise has a timestamp).

The fix was pushed to staging.

[-- Attachment #2: Signature digitale OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-19 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 21:09 bug#32193: Java packages are indeterministic (due to order in jar?) Björn Höfling
2018-07-19 17:51 ` Julien Lepiller

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).