You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Chanseok Oh (Jira)" <ji...@apache.org> on 2021/07/22 14:42:00 UTC

[jira] [Comment Edited] (COMPRESS-583) 1.21 generates different output binaries compared to older versions as well as on different OSes

    [ https://issues.apache.org/jira/browse/COMPRESS-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385550#comment-17385550 ] 

Chanseok Oh edited comment on COMPRESS-583 at 7/22/21, 2:41 PM:
----------------------------------------------------------------

That's fair. Nothing is a bug if you say if the logic is intended to work that way, but my point is that this is a regression from 1.20 and a breaking change. I don't see any relevant changelog entry for this fix (or breaking change). Previously, it was always setting UID:GID as {{0:0}} by default, and now with 1.21, I have to modify my code to call {{dir.setUserId(0)}}, etc. So my question is, did you really introduce this fix intentionally (if so, where's the doc?) or it happened to be like this (i.e., regression)?


was (Author: francium25):
That's fair. Nothing is a bug if you say if the logic is intended to work that way, but my point is that this is a regression from 1.20 and a breaking change. I don't see any relevant changelog entry for this fix (or breaking change). Previously, it's always setting UID:GID as {{0:0}} by default, and now with 1.21, I have to modify my code to call {{dir.setUserId(0);}}, etc. So my question is, did you really introduce this fix intentionally (if so, where's the doc?) or it happened to be like this (i.e., regression)?

> 1.21 generates different output binaries compared to older versions as well as on different OSes
> ------------------------------------------------------------------------------------------------
>
>                 Key: COMPRESS-583
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-583
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.21
>            Reporter: Chanseok Oh
>            Priority: Major
>
> Upgrading {{commons-compress}} had always been generating the same compressed output byte-to-byte for the same input (i.e., their SHA checksum didn't change between versions). However, starting with 1.21, we noticed it's generating different output than what previous versions are generating.
> We also noticed that the same code generates different binaries on different OSes. For example, 1.21 on Linux is different from 1.21 on Mac.
> However, at least on the same OS, 1.21 seems to reproducibly generate the same output.
> See the context at [https://github.com/GoogleContainerTools/jib/pull/3342]
> ----
> *UPDATE*: running diffoscope reveals that 1.21 is picking up the user and group of a local environment.
> (output below manually reformatted slightly for readability)
> {{$ diffoscope 6d2763b0f3940d324ea6b55386429e5b173899608abf7d1bff62e25dd2e4dcea.tar.gz 32258c626498c13412679442e3417811bc7ab801c6928da2c2a97e0bbc380a88.tar.gz}}
> {{--- 6d2763b0f3940d324ea6b55386429e5b173899608abf7d1bff62e25dd2e4dcea.tar.gz}}
> {{+++ 32258c626498c13412679442e3417811bc7ab801c6928da2c2a97e0bbc380a88.tar.gz}}
> {{│ --- 6d2763b0f3940d324ea6b55386429e5b173899608abf7d1bff62e25dd2e4dcea.tar}}
> {{├── +++ 32258c626498c13412679442e3417811bc7ab801c6928da2c2a97e0bbc380a88.tar}}
> {{│ ├── file list}}
> {{│ │ @@ -1,3 +1,3 @@}}
> {{│ │ {color:#de350b}-drwxr-xr-x 0                 0          0 0 1970-01-01 00:00:01.000000 app/{color}}}
> {{│ │ {color:#00875a}+drwxr-xr-x 0 chanseok (252384) eng (5000) 0 1970-01-01 00:00:01.000000 app/{color}}}
> {{│ │ -rw-r--r--  0                 0          0 0 1970-01-01 00:00:01.000000 app/fileB.txt}}
> {{│ │ -rw-r--r--  0                 0          0 0 1970-01-01 00:00:01.000000 app/fileC.txt}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)