openSUSE / build-compare

Compare content of rpm package and find differences inside the files.
https://build.opensuse.org/package/show/openSUSE:Tools/build-compare
GNU General Public License v2.0
12 stars 20 forks source link

problem comparing .zip with absolute symlinks to .jar #65

Open bmwiedemann opened 1 year ago

bmwiedemann commented 1 year ago

Steps to reproduce:

curl https://rb.zq1.de/other/tycho-build-compare-bug.tar.gz | tar xf
/usr/lib/build/pkg-diff.sh tycho-build-compare-bug/*/*rpm

produces:

Missing in old package: /usr/share/java/tycho/tycho-bundles-external.zip/eclipse/plugins/org.apache.felix.scr.jar

This bug was found, while working on reproducible builds for openSUSE with fstrba.

bmwiedemann commented 11 months ago

found another affected package: eclipse-jgit

-/usr/share/eclipse/droplets/jgit/plugins/org.hamcrest_2.2.0.jar 0 (none) 120777 root root 0 4294967295 ../../../../java/hamcrest/library.jar
-/usr/share/eclipse/droplets/jgit/plugins/org.junit_4.13.2.jar 0 (none) 120777 root root 0 4294967295 ../../../../java/junit.jar
-/usr/share/eclipse/droplets/jgit/plugins/org.kohsuke.args4j_2.33.0.jar 0 (none) 120777 root root 0 4294967295 ../../../../java/args4j/args4j.jar
+/usr/share/eclipse/droplets/jgit/plugins/org.hamcrest_2.2.0.jar 0 (none) 120777 root root 0 4294967295 ../../../../java/hamcrest/hamcrest.jar
+/usr/share/eclipse/droplets/jgit/plugins/org.junit_4.13.2.jar 0 (none) 120777 root root 0 4294967295 ../../../../java/junit4.jar
+/usr/share/eclipse/droplets/jgit/plugins/org.kohsuke.args4j_2.33.0.jar 0 (none) 120777 root root 0 4294967295 ../../../../java/args4j.jar
olafhering commented 11 months ago

The code uses the file name to decide what file type it is. I think it should use file to decide, then a broken symlink could be detected.