dpkg-buildpackage modifying *png file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dpkg-buildpackage modifying *png file

Weatherby,Gerard

I'm using dpkg-buildpackage -b -uc -us to prepare a *deb package for a private repository.

It seems to be modifying a byte PNG image file, as indicated by "cmp" 


./relax/docs/html/icons/index.png ./debian/relax/usr/software/relax/docs/html/icons/index.png differ: byte 82, line 3

My debian/install file looks like:
relax /usr/software

​I'd appreciate a hint as to what's going on.



-- 
Gerard Weatherby| Application Architect
NMRbox | Department of Molecular Biology and Biophysics | UConn Health
263 Farmington Avenue, Farmington, CT 06030-6406
Phone: 860 679 8484
uchc.edu 
Reply | Threaded
Open this post in threaded view
|

Re: dpkg-buildpackage modifying *png file

Niels Thykier
Weatherby,Gerard:

> I'm using dpkg-buildpackage -b -uc -us to prepare a *deb package for a private repository.
>
> It seems to be modifying a byte PNG image file, as indicated by "cmp"
>
> ./relax/docs/html/icons/index.png ./debian/relax/usr/software/relax/docs/html/icons/index.png differ: byte 82, line 3
>
> My debian/install file looks like:
> relax /usr/software
>
> ?I'd appreciate a hint as to what's going on.
>
>
> [...]

Hi,

I suspect it is not dpkg-buildpackage but the tools run from
debian/rules.  If you use the minimal debian/rules based on dh, then it
will run "dh_strip_nondeterminism" which among other will attempt to
normalize metadata in png files.

Assuming my guesses are correct so far, you can disable
dh_strip_nondeterminism by inserting an empty override for it.  Assuming
no existing override, this should be as simple as:

  echo "# Disable dh_strip_nondeterminism" >> debian/rules
  echo "override_dh_strip_nondeterminism:" >> debian/rules

Thanks,
~Niels

Reply | Threaded
Open this post in threaded view
|

Re: dpkg-buildpackage modifying *png file

Weatherby,Gerard
This resolved (and explained) this issue. I hadn't realized PNGs had embedded timestamps.
Thank you,
Gerard



________________________________________
From: Niels Thykier <[hidden email]>
Sent: Monday, February 19, 2018 3:41 PM
To: Weatherby,Gerard; [hidden email]
Subject: Re: dpkg-buildpackage modifying *png file

Weatherby,Gerard:

> I'm using dpkg-buildpackage -b -uc -us to prepare a *deb package for a private repository.
>
> It seems to be modifying a byte PNG image file, as indicated by "cmp"
>
> ./relax/docs/html/icons/index.png ./debian/relax/usr/software/relax/docs/html/icons/index.png differ: byte 82, line 3
>
> My debian/install file looks like:
> relax /usr/software
>
> ?I'd appreciate a hint as to what's going on.
>
>
> [...]

Hi,

I suspect it is not dpkg-buildpackage but the tools run from
debian/rules.  If you use the minimal debian/rules based on dh, then it
will run "dh_strip_nondeterminism" which among other will attempt to
normalize metadata in png files.

Assuming my guesses are correct so far, you can disable
dh_strip_nondeterminism by inserting an empty override for it.  Assuming
no existing override, this should be as simple as:

  echo "# Disable dh_strip_nondeterminism" >> debian/rules
  echo "override_dh_strip_nondeterminism:" >> debian/rules

Thanks,
~Niels