Bug#969753: diffoscope: autopkgtest failures

2020-09-07 Thread Gianfranco Costamagna
Source: diffoscope
Version: 159
Severity: serious

Hello, autopkgtests looks sad, pytest-with-recommends works, while pytest 
doesn't, because of missing pgpdump

I did add some @skip_unless_tools_exist("pgpdump") around the failing tests 
(attached the diff), however I don't know
if this is the right solution, or something better has to be implemented.

G.
diff -Nru diffoscope-158/debian/changelog diffoscope-158ubuntu1/debian/changelog
--- diffoscope-158/debian/changelog 2020-08-28 12:53:10.0 +0200
+++ diffoscope-158ubuntu1/debian/changelog  2020-09-07 20:46:23.0 
+0200
@@ -1,3 +1,9 @@
+diffoscope (159ubuntu1) groovy; urgency=medium
+
+  * Skip some tests if pgpdump is not installed
+
+ -- Gianfranco Costamagna   Mon, 07 Sep 2020 
20:46:23 +0200
+
 diffoscope (159) unstable; urgency=medium
 
   [ Chris Lamb ]
diff -Nru diffoscope-158/tests/comparators/test_binary.py 
diffoscope-158ubuntu1/tests/comparators/test_binary.py
--- diffoscope-158/tests/comparators/test_binary.py 2020-08-28 
12:53:10.0 +0200
+++ diffoscope-158ubuntu1/tests/comparators/test_binary.py  2020-09-07 
20:01:52.0 +0200
@@ -48,10 +48,12 @@
 binary2 = init_fixture(TEST_FILE2_PATH)
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_same_content(binary1):
 assert binary1.has_same_content_as(binary1) is True
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_not_same_content(binary1, binary2):
 assert binary1.has_same_content_as(binary2) is False
 
@@ -76,18 +78,20 @@
 assert File.guess_encoding(TEST_ISO8859_PATH) == "iso-8859-1"
 
 
-def test_no_differences_with_xxd(binary1):
+@skip_unless_tools_exist("pgpdump")
+def test_no_differences_with_xxd(binary1):
 difference = binary1.compare_bytes(binary1)
 assert difference is None
 
 
-@skip_unless_tools_exist("xxd")
+@skip_unless_tools_exist("xxd", "pgpdump")
 def test_compare_with_xxd(binary1, binary2):
 difference = binary1.compare_bytes(binary2)
 expected_diff = get_data("binary_expected_diff")
 assert normalize_zeros(difference.unified_diff) == expected_diff
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_compare_non_existing_with_xxd(binary1):
 difference = binary1.compare_bytes(MissingFile("/nonexisting", binary1))
 assert difference.source2 == "/nonexisting"
@@ -101,11 +105,13 @@
 monkeypatch.setattr(Xxd, "cmdline", mock_cmdline)
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_no_differences_without_xxd(xxd_not_found, binary1):
 difference = binary1.compare_bytes(binary1)
 assert difference is None
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_compare_without_xxd(xxd_not_found, binary1, binary2):
 difference = binary1.compare(binary2)
 expected_diff = get_data("binary_hexdump_expected_diff")
diff -Nru diffoscope-158/tests/comparators/test_haskell.py 
diffoscope-158ubuntu1/tests/comparators/test_haskell.py
--- diffoscope-158/tests/comparators/test_haskell.py2020-08-28 
12:53:10.0 +0200
+++ diffoscope-158ubuntu1/tests/comparators/test_haskell.py 2020-09-07 
20:03:29.0 +0200
@@ -38,6 +38,7 @@
 assert isinstance(haskell1, HiFile)
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_no_differences(haskell1):
 assert haskell1.compare(haskell1) is None
 
diff -Nru diffoscope-158/tests/comparators/test_pgp.py 
diffoscope-158ubuntu1/tests/comparators/test_pgp.py
--- diffoscope-158/tests/comparators/test_pgp.py2020-08-28 
12:53:10.0 +0200
+++ diffoscope-158ubuntu1/tests/comparators/test_pgp.py 2020-09-07 
20:43:15.0 +0200
@@ -70,6 +70,7 @@
 assert len(difference.details) == 1
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_signed_identification(signed1):
 assert isinstance(signed1, PgpFile)
 
diff -Nru diffoscope-158/tests/comparators/test_ppu.py 
diffoscope-158ubuntu1/tests/comparators/test_ppu.py
--- diffoscope-158/tests/comparators/test_ppu.py2020-08-28 
12:53:10.0 +0200
+++ diffoscope-158ubuntu1/tests/comparators/test_ppu.py 2020-09-07 
20:44:53.0 +0200
@@ -51,6 +51,7 @@
 assert isinstance(file1, PpuFile)
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_no_differences(file1):
 assert file1.compare(file1) is None
 
diff -Nru diffoscope-158/tests/comparators/test_rlib.py 
diffoscope-158ubuntu1/tests/comparators/test_rlib.py
--- diffoscope-158/tests/comparators/test_rlib.py   2020-08-28 
12:53:10.0 +0200
+++ diffoscope-158ubuntu1/tests/comparators/test_rlib.py2020-09-07 
20:46:22.0 +0200
@@ -80,12 +80,12 @@
 return get_data(diff_file)
 
 
-@skip_unless_tools_exist("nm")
+@skip_unless_tools_exist("nm", "pgpdump")
 def test_num_items(differences):
 assert len(differences) == 4
 
 
-@skip_unless_tools_exist("nm")
+@skip_unless_tools_exist("nm", "pgpdump")
 @skip_if_binutils_does_not_support_x86()
 def test_item0_armap(differences):
 assert differences[0].source1 == "nm -s {}"
@@ -94,7 +94,7 @@
 assert differences[0].unified_diff == expected_d

Bug#969753: diffoscope: autopkgtest failures

2020-09-07 Thread Gianfranco Costamagna
Hello,

another additional diff:

--- diffoscope-159ubuntu1/tests/comparators/test_directory.py   2020-09-04 
12:12:52.0 +0200
+++ diffoscope-159ubuntu2/tests/comparators/test_directory.py   2020-09-07 
20:46:23.0 +0200
@@ -33,6 +33,7 @@
 TEST_FILE2_PATH = data("text_ascii2")
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_no_differences():
 difference = compare_directories(
 os.path.dirname(__file__), os.path.dirname(__file__)
@@ -40,6 +41,7 @@
 assert difference is None
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_no_differences_with_extra_slash():
 difference = compare_directories(
 os.path.dirname(__file__) + "/", os.path.dirname(__file__)
diff -Nru diffoscope-159ubuntu1/tests/comparators/test_rlib.py 
diffoscope-159ubuntu2/tests/comparators/test_rlib.py
--- diffoscope-159ubuntu1/tests/comparators/test_rlib.py2020-09-07 
20:46:23.0 +0200
+++ diffoscope-159ubuntu2/tests/comparators/test_rlib.py2020-09-07 
20:46:23.0 +0200
@@ -51,6 +51,7 @@
 assert isinstance(rlib1, ArFile)
 
 
+@skip_unless_tools_exist("pgpdump")
 def test_no_differences(rlib1):
 difference = rlib1.compare(rlib1)
 assert difference is None
@@ -121,6 +122,6 @@
 )
 
 
-@skip_unless_tools_exist("nm")
+@skip_unless_tools_exist("nm", "pgpdump")
 def test_compare_non_existing(monkeypatch, rlib1):
 assert_non_existing(monkeypatch, rlib1)


On Mon, 7 Sep 2020 20:53:13 +0200 Gianfranco Costamagna 
 wrote:
> Source: diffoscope
> Version: 159
> Severity: serious
> 
> Hello, autopkgtests looks sad, pytest-with-recommends works, while pytest 
> doesn't, because of missing pgpdump
> 
> I did add some @skip_unless_tools_exist("pgpdump") around the failing tests 
> (attached the diff), however I don't know
> if this is the right solution, or something better has to be implemented.
> 
> G.

___
Reproducible-builds mailing list
Reproducible-builds@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/reproducible-builds

Re: Enabling -ffile-prefix-map by default

2020-09-07 Thread Vagrant Cascadian
On 2020-08-31, Lucas Nussbaum wrote:
> On 31/08/20 at 09:35 -0700, Vagrant Cascadian wrote:
>> On 2020-08-31, Lucas Nussbaum wrote:
>> > On 30/08/20 at 19:15 -0700, Vagrant Cascadian wrote:
>> >> I'm looking into proposing to enable dpkg's
>> >> DEB_BUILD_OPTIONS=reproducible=+fixfilepath by default
>> ...
>> >> It would be nice to try an archive-wide rebuild with +fixfilepath
>> >> enabled and on failure,
>> >
>> > Could you provide a dpkg package in a private repo (or in experimental)
>> > with that enabled by default? And ideally a script similar to
>> > https://salsa.debian.org/lucas/collab-qa-tools/-/blob/master/modes/gcc10
>> > to install that package?
>> 
>> I could build and upload an updated dpkg somewhere...
>> 
>> I see that modes/clang10 mangles some files directly, and while this
>> makes me cringe a bit, what about instead adding a
>> modes/dpkg-fixfilepath doing something like:
>> 
>>   sed -i -e 's,fixfilepath => 0,fixfilepath => 1,g' 
>> /usr/share/perl5/Dpkg/Vendor/Debian.pm
>> 
>> Is this an acceptible way forward?
>
> Ah, yes, totally!

Proposed merge request adding a script that does just that:

  https://salsa.debian.org/lucas/collab-qa-tools/-/merge_requests/9


live well,
  vagrant


signature.asc
Description: PGP signature
___
Reproducible-builds mailing list
Reproducible-builds@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/reproducible-builds