You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2022/11/13 10:14:19 UTC

[maven-assembly-plugin] 01/01: [MASSEMBLY-941] detect 775/664 vs 755/644

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MASSEMBLY-941
in repository https://gitbox.apache.org/repos/asf/maven-assembly-plugin.git

commit 17b8ad3a4898cd64ce6f0da1432682315c947db4
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Nov 13 10:55:35 2022 +0100

    [MASSEMBLY-941] detect 775/664 vs 755/644
---
 src/it/projects/reproducible/verify.groovy       | 14 ++++++++-----
 src/it/projects/reproducible/zip-content-755.txt | 25 ++++++++++++++++++++++++
 src/it/projects/reproducible/zip-content-775.txt | 25 ++++++++++++++++++++++++
 src/it/projects/reproducible/zip-content.txt     | 22 ---------------------
 4 files changed, 59 insertions(+), 27 deletions(-)

diff --git a/src/it/projects/reproducible/verify.groovy b/src/it/projects/reproducible/verify.groovy
index d4684bb1..67041cad 100644
--- a/src/it/projects/reproducible/verify.groovy
+++ b/src/it/projects/reproducible/verify.groovy
@@ -31,11 +31,15 @@ for( ZipArchiveEntry entry : zip.getEntries() )
 {
     sb.append( String.format("%o %s\n", entry.getUnixMode(), entry.getName() ) )
 }
+for( String type : [ "zip", "jar", "tar" ] )
+{
+    String name = "reproducible-1.0-src." + type + ".sha1"
+    sb.append( String.format("%s %s\n", new File( deployDir, name ).text, name ) )
+}
 
-content = new File( basedir, "zip-content.txt" ).text.replace( "\r\n", "\n" )
 effective = sb.toString()
-assert content == effective
 
-assert new File( deployDir, 'reproducible-1.0-src.zip.sha1' ).text == '50116502c6107740c2a35ef296b5abda08c5dec7'
-assert new File( deployDir, 'reproducible-1.0-src.tar.sha1' ).text == '3efc10ec9c3099ba061e58d5b2a935ba643da237'
-assert new File( deployDir, 'reproducible-1.0-src.jar.sha1' ).text == 'cc7e3a984179f63d6b37bc86c61e9cc461c62288'
+reference = "zip-content-" + ( effective.contains( "0775" ) ? "775" : "755" ) +  ".txt"
+content = new File( basedir, reference ).text.replace( "\r\n", "\n" )
+
+assert content == effective
diff --git a/src/it/projects/reproducible/zip-content-755.txt b/src/it/projects/reproducible/zip-content-755.txt
new file mode 100644
index 00000000..92aa7ecb
--- /dev/null
+++ b/src/it/projects/reproducible/zip-content-755.txt
@@ -0,0 +1,25 @@
+40755 dir-A/
+40755 dir-C/
+40755 dir-b/
+40755 dir-b/B2/
+40755 dir-b/B4/
+40755 dir-b/b1/
+40755 dir-b/b3/
+40755 dir-d/
+100644 Uppercase.txt
+100644 dir-A/A2.txt
+100644 dir-A/A4.txt
+100644 dir-A/a1.txt
+100644 dir-A/a3.txt
+100644 dir-C/C.txt
+100644 dir-b/B2/B2.txt
+100644 dir-b/B4/B4.txt
+100644 dir-b/b.txt
+100644 dir-b/b1/b1.txt
+100644 dir-b/b3/b3.txt
+100644 dir-d/d.txt
+100755 executable.txt
+100644 lowercase.txt
+97d0ea3b4a87cd3ea78edd1c3c25914d69ea97f3 reproducible-1.0-src.zip.sha1
+a0c4cf1ed244e60221e12367f50ff676066b8e65 reproducible-1.0-src.jar.sha1
+bf93dd529253157352b87097d9d23eba8c9ca61a reproducible-1.0-src.tar.sha1
diff --git a/src/it/projects/reproducible/zip-content-775.txt b/src/it/projects/reproducible/zip-content-775.txt
new file mode 100644
index 00000000..cb672762
--- /dev/null
+++ b/src/it/projects/reproducible/zip-content-775.txt
@@ -0,0 +1,25 @@
+40775 dir-A/
+40775 dir-C/
+40775 dir-b/
+40775 dir-b/B2/
+40775 dir-b/B4/
+40775 dir-b/b1/
+40775 dir-b/b3/
+40775 dir-d/
+100664 Uppercase.txt
+100664 dir-A/A2.txt
+100664 dir-A/A4.txt
+100664 dir-A/a1.txt
+100664 dir-A/a3.txt
+100664 dir-C/C.txt
+100664 dir-b/B2/B2.txt
+100664 dir-b/B4/B4.txt
+100664 dir-b/b.txt
+100664 dir-b/b1/b1.txt
+100664 dir-b/b3/b3.txt
+100664 dir-d/d.txt
+100775 executable.txt
+100664 lowercase.txt
+50116502c6107740c2a35ef296b5abda08c5dec7 reproducible-1.0-src.zip.sha1
+cc7e3a984179f63d6b37bc86c61e9cc461c62288 reproducible-1.0-src.jar.sha1
+3efc10ec9c3099ba061e58d5b2a935ba643da237 reproducible-1.0-src.tar.sha1
diff --git a/src/it/projects/reproducible/zip-content.txt b/src/it/projects/reproducible/zip-content.txt
deleted file mode 100644
index f45eb6a2..00000000
--- a/src/it/projects/reproducible/zip-content.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-1566404932000 40775 dir-A/
-1566404932000 40775 dir-C/
-1566404932000 40775 dir-b/
-1566404932000 40775 dir-b/B2/
-1566404932000 40775 dir-b/B4/
-1566404932000 40775 dir-b/b1/
-1566404932000 40775 dir-b/b3/
-1566404932000 40775 dir-d/
-1566404932000 100664 Uppercase.txt
-1566404932000 100664 dir-A/A2.txt
-1566404932000 100664 dir-A/A4.txt
-1566404932000 100664 dir-A/a1.txt
-1566404932000 100664 dir-A/a3.txt
-1566404932000 100664 dir-C/C.txt
-1566404932000 100664 dir-b/B2/B2.txt
-1566404932000 100664 dir-b/B4/B4.txt
-1566404932000 100664 dir-b/b.txt
-1566404932000 100664 dir-b/b1/b1.txt
-1566404932000 100664 dir-b/b3/b3.txt
-1566404932000 100664 dir-d/d.txt
-1566404932000 100775 executable.txt
-1566404932000 100664 lowercase.txt