Re: [Reproducible-builds] [RFC] debbindiff

2014-09-30 Thread Patrick Schleizer
Hi!

Jérémy Bobbio:
> It's missing Debian packaging. I guess I should learn how to write a
> setup.cfg or similar. Pointers or patches welcome.

How do you like the "Generic Packaging" [1] method?

To me it is easier than setup.cfg.

Files in etc/... in root source folder will be installed to /etc/...,
files in usr/... will be installed to /usr/... and so forth. This should
make renaming, moving files around, packaging, etc. very simple.

See example package, make file, debian/ folder. [1]

Cheers,
Patrick

[1] https://github.com/Whonix/bootclockrandomization#generic-packaging


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


Re: [Reproducible-builds] [RFC] debbindiff

2014-09-30 Thread Jérémy Bobbio
Hans-Christoph Steiner:
> Also, I updated the setup.py for two small things. I recommend using code
> checkers like pyflakes and pylint:
> 
> $ pyflakes *.py debbindiff/*.py
> debbindiff/difference.py:20: 'difflib' imported but unused
> debbindiff/difference.py:41: redefinition of function 'comment' from line 37
> hans@palatschinken debbindiff $ pylint *.py debbindiff/*.py
> ...

Done. Thanks for the tips and setup.py.

-- 
Lunar.''`. 
lu...@debian.org: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   


signature.asc
Description: Digital signature
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Re: [Reproducible-builds] [RFC] debbindiff

2014-09-30 Thread Hans-Christoph Steiner

Comparing jars gives a stacktrace, looks like a missing import.

$ ./debbindiff.py
~/code/guardianproject/cacheword/cachewordlib/cachewordlib-v0.1-1-g04cb18e.jar
/tmp/cachewordlib-v0.1-1-g04cb18e.jar
Traceback (most recent call last):
  File "./debbindiff.py", line 53, in 
main()
  File "./debbindiff.py", line 43, in main
differences = debbindiff.comparators.compare_files(parsed_args.file1,
parsed_args.file2)
  File
"/media/share/code/reproducible/debbindiff/debbindiff/comparators/__init__.py", 
line
85, in compare_files
return comparator(path1, path2, source)
  File
"/media/share/code/reproducible/debbindiff/debbindiff/comparators/utils.py",
line 51, in with_fallback
inside_differences = original_function(path1, path2, source)
  File
"/media/share/code/reproducible/debbindiff/debbindiff/comparators/zip.py",
line 57, in compare_zip_files
zipinfo1 = get_zipinfo(path1)
  File
"/media/share/code/reproducible/debbindiff/debbindiff/comparators/zip.py",
line 31, in get_zipinfo
return re.sub(re.escape(path), os.path.basename(path), output)
NameError: global name 're' is not defined


Also, I updated the setup.py for two small things. I recommend using code
checkers like pyflakes and pylint:

$ pyflakes *.py debbindiff/*.py
debbindiff/difference.py:20: 'difflib' imported but unused
debbindiff/difference.py:41: redefinition of function 'comment' from line 37
hans@palatschinken debbindiff $ pylint *.py debbindiff/*.py
...


.hc

Hans-Christoph Steiner wrote:
> 
> Definitely use setup.py.  It makes the packaging easy and standardized, and it
> is the standard way to build python.  It also makes it easy to publish
> releases to pypi, the central package repository for python.  I attached a
> quick untested one for you.
> 
> .hc
> 
> Jérémy Bobbio wrote:
>> Hi!
>>
>> I've been working at high pace since Sunday on a replacement for the
>> diffp script [1]. These GPLv3 lines of Python are called debbindiff.
>>
>> Get it from Git:
>>
>> https://anonscm.debian.org/cgit/reproducible/debbindiff.git/
>>
>> Attached is an output produced for the attr package. The new tool is at
>> least as capable as diffp, is way more extensible, and the result is
>> more readable.
>>
>> Example usage:
>>
>> $ ./debbindiff.py --html /tmp/debbindiff.html b1/*.changes b2/*.changes
>>
>> There's no requirements for actually comparing .changes. You can use it
>> to compare jar files directly if that's your kick.
>>
>> I'd love to see reviews of the code. It's scarce on comments but names
>> should be explicit enough, or so I hope.
>>
>> It's missing Debian packaging. I guess I should learn how to write a
>> setup.cfg or similar. Pointers or patches welcome.
>>
>> One thing this codebase should enable is writing “hints”. Once the tree
>> of differences is generated, it should be doable to run through it to
>> generate statements like: “Many files in data.tar have different
>> timestamps, dh_fixmtimes has probably not been called. Are you
>> using dh?” This still needs to be done though.
>>
>> Last note: I've been pushing everything else aside while I had the
>> thrills to work on this. It's unclear when will be the next time, so
>> patches are preferred rather than suggestion.
>>
>>  [1]: https://anonscm.debian.org/cgit/reproducible/misc.git/tree/diffp
>>
>>
>>
>> ___
>> Reproducible-builds mailing list
>> Reproducible-builds@lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
>>
> 

-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81
#!/usr/bin/env python2

from setuptools import setup

setup(name='debbindiff',
  version='0.1',
  description='display differences between files',
  long_description=open('README').read(),
  author='Lunar',
  author_email='lu...@debian.org',
  url='https://wiki.debian.org/ReproducibleBuilds',
  packages=['debbindiff'],
  scripts=['debbindiff.py'],
  install_requires=[
  'python-debian',
  ],
  classifiers=[
  'Development Status :: 3 - Alpha',
  'Intended Audience :: Developers',
  'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
  'Operating System :: POSIX',
  'Topic :: Utilities',
  ],
  )


signature.asc
Description: OpenPGP digital signature
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Re: [Reproducible-builds] [RFC] debbindiff

2014-09-30 Thread Hans-Christoph Steiner

Definitely use setup.py.  It makes the packaging easy and standardized, and it
is the standard way to build python.  It also makes it easy to publish
releases to pypi, the central package repository for python.  I attached a
quick untested one for you.

.hc

Jérémy Bobbio wrote:
> Hi!
> 
> I've been working at high pace since Sunday on a replacement for the
> diffp script [1]. These GPLv3 lines of Python are called debbindiff.
> 
> Get it from Git:
> 
> https://anonscm.debian.org/cgit/reproducible/debbindiff.git/
> 
> Attached is an output produced for the attr package. The new tool is at
> least as capable as diffp, is way more extensible, and the result is
> more readable.
> 
> Example usage:
> 
> $ ./debbindiff.py --html /tmp/debbindiff.html b1/*.changes b2/*.changes
> 
> There's no requirements for actually comparing .changes. You can use it
> to compare jar files directly if that's your kick.
> 
> I'd love to see reviews of the code. It's scarce on comments but names
> should be explicit enough, or so I hope.
> 
> It's missing Debian packaging. I guess I should learn how to write a
> setup.cfg or similar. Pointers or patches welcome.
> 
> One thing this codebase should enable is writing “hints”. Once the tree
> of differences is generated, it should be doable to run through it to
> generate statements like: “Many files in data.tar have different
> timestamps, dh_fixmtimes has probably not been called. Are you
> using dh?” This still needs to be done though.
> 
> Last note: I've been pushing everything else aside while I had the
> thrills to work on this. It's unclear when will be the next time, so
> patches are preferred rather than suggestion.
> 
>  [1]: https://anonscm.debian.org/cgit/reproducible/misc.git/tree/diffp
> 
> 
> 
> ___
> Reproducible-builds mailing list
> Reproducible-builds@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
> 

-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81
#!/usr/bin/env python2

from setuptools import setup
import sys

setup(name='debbindiff',
  version='0.1',
  description='display differences between files',
  long_description=open('README').read(),
  author='Lunar',
  author_email='lu...@debian.org',
  url='https://wiki.debian.org/ReproducibleBuilds',
  packages=['debbindiff'],
  scripts=['debbindiff'],
  install_requires=[
  'python-debian',
  ],
  classifiers=[
  'Development Status :: 3 - Alpha',
  'Intended Audience :: Developers',
  'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
  'Operating System :: POSIX',
  'Topic :: Utilities',
  ],
  )


signature.asc
Description: OpenPGP digital signature
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

[Reproducible-builds] [RFC] debbindiff

2014-09-30 Thread Jérémy Bobbio
Hi!

I've been working at high pace since Sunday on a replacement for the
diffp script [1]. These GPLv3 lines of Python are called debbindiff.

Get it from Git:

https://anonscm.debian.org/cgit/reproducible/debbindiff.git/

Attached is an output produced for the attr package. The new tool is at
least as capable as diffp, is way more extensible, and the result is
more readable.

Example usage:

$ ./debbindiff.py --html /tmp/debbindiff.html b1/*.changes b2/*.changes

There's no requirements for actually comparing .changes. You can use it
to compare jar files directly if that's your kick.

I'd love to see reviews of the code. It's scarce on comments but names
should be explicit enough, or so I hope.

It's missing Debian packaging. I guess I should learn how to write a
setup.cfg or similar. Pointers or patches welcome.

One thing this codebase should enable is writing “hints”. Once the tree
of differences is generated, it should be doable to run through it to
generate statements like: “Many files in data.tar have different
timestamps, dh_fixmtimes has probably not been called. Are you
using dh?” This still needs to be done though.

Last note: I've been pushing everything else aside while I had the
thrills to work on this. It's unclear when will be the next time, so
patches are preferred rather than suggestion.

 [1]: https://anonscm.debian.org/cgit/reproducible/misc.git/tree/diffp

-- 
Lunar.''`. 
lu...@debian.org: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   
Title: ./debbindiff.py --html /tmp/debbindiff.html ../../rebuild/b1/attr_2.4.47-2_amd64.changes ../../rebuild/b2/attr_2.4.47-2_amd64.changes







/home/lunar/Documents/Debian/reproducible-builds/rebuild/b1/attr_2.4.47-2_amd64.changes vs.
/home/lunar/Documents/Debian/reproducible-builds/rebuild/b2/attr_2.4.47-2_amd64.changes
List of files does not match






1 
2  676ff93c6afee9535838855b19d49c49 42970 utils optional attr_2.4.47-2_amd64.deb
3  d2b0e6b57a6aa9528e2a8ddb9a63c53f 39944 libdevel extra libattr1-dev_2.4.47-2_amd64.deb
4  250a20030ba0ebc0d0936e5fbf4669ff 18286 libs required libattr1_2.4.47-2_amd64.deb
5  fcaf9c378a7e29330ce1c628e566539f 13822 debian-installer optional attr-udeb_2.4.47-2_amd64.udeb
6  2dfe838606f9370fd72c988f874cbb9e 7432 debian-installer optional libattr1-udeb_2.4.47-2_amd64.udeb
7  b67710f6be4bac3f77f522a30eb6c47c 1158 utils optional attr_2.4.47-2.dsc
8  875026a4a3d5984448662ca1784ea0fe 8064 utils optional attr_2.4.47-2.debian.tar.xz




1 
2  2878c188a4d4ea9c2e84b9383d6b64c5 42962 utils optional attr_2.4.47-2_amd64.deb
3  40c3e694fde044625c88d73f93a1150c 39932 libdevel extra libattr1-dev_2.4.47-2_amd64.deb
4  ee4c12a9c89f0f1ec5aa6b4bd68945a2 18280 libs required libattr1_2.4.47-2_amd64.deb
5  368fea0c74aad43602c9d87205d04f16 13814 debian-installer optional attr-udeb_2.4.47-2_amd64.udeb
6  54b58f93f378e889881df80bf7b0a3ed 7436 debian-installer optional libattr1-udeb_2.4.47-2_amd64.udeb
7  b67710f6be4bac3f77f522a30eb6c47c 1158 utils optional attr_2.4.47-2.dsc
8  875026a4a3d5984448662ca1784ea0fe 8064 utils optional attr_2.4.47-2.debian.tar.xz





attr-udeb_2.4.47-2_amd64.udeb

control.tar.gz

control.tar

metadata






1 -rwxr-xr-x root/root  0 2014-09-30 16:33:30 ./
2 -rw-r--r-- root/root343 2014-09-30 16:33:30 ./control 




1 -rwxr-xr-x root/root  0 2014-09-30 16:34:18 ./
2 -rw-r--r-- root/root343 2014-09-30 16:34:18 ./control 








data.tar.xz

data.tar

metadata






1 -rwxr-xr-x root/root  0 2014-09-30 16:33:27 ./
2 -rwxr-xr-x root/root  0 2014-09-30 16:33:26 ./usr/
3 -rwxr-xr-x root/root  0 2014-09-30 16:33:26 ./usr/bin/
4 -rwxr-xr-x root/root  10376 2014-09-30 16:33:26 ./usr/bin/attr
5 -rwxr-xr-x root/root  19360 2014-09-30 16:33:26 ./usr/bin/getfattr
6 -rwxr-xr-x root/root  14960 2014-09-30 16:33:26 ./usr/bin/setfattr




1 -rwxr-xr-x root/root  0 2014-09-30 16:34:15 ./
2 -rwxr-xr-x root/root  0 2014-09-30 16:34:13 ./usr/
3 -rwxr-xr-x root/root  0 2014-09-30 16:34:14 ./usr/bin/
4 -rwxr-xr-x root/root  10376 2014-09-30 16:34:14 ./usr/bin/attr
5 -rwxr-xr-x root/root  19360 2014-09-30 16:34:14 ./usr/bin/getfattr
6 -rwxr-xr-x root/root  14960 2014-09-30 16:34:14 ./usr/bin/setfattr








metadata






1 rw-r--r-- 0/0  4 Sep  8 09:27 2014 debian-binary
2 rw-r--r-- 0/0429 Sep  8 09:27 2014 control.tar.gz 
3 rw-r--r-- 0/0  13200 Sep  8 09:27 2014 data.tar.xz




1 rw-r--r-- 0/0  4 Sep  8 09:27 2014 debian-binary
2 rw-r--r-- 0/0426 Sep  8 09:27 2014 control.tar.gz