[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Uniqueness of .deb versions/filenames over distributions



On 02/27/2016 04:05 PM, Tim Landscheidt wrote:
> http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.html#GBP.BRANCH.NAMING
> recommends using different Git branches for jessie, stretch,
> etc., but I fear that such a layout could easily cause them
> to go out of sync as it puts the burden on the committer to
> repeat his changes on another branch.

Hi Tim,

Just to add on that, since I discovered it more by chance myself:  Using
dpkg-mergechangelogs from dpkg-dev package, keeping those branches in
sync becomes really trivial.  Just activate it (see manpage) and feeding
the changes from master into backports becomes as simple as:

git checkout jessie-backports
git merge master
dch --bpo


And to the original question:

>From my understanding, within Debian you can assume that
package_0.1_amd64.deb is the binary created in sid when it was initially
uploaded.  Any new upload (even a binary-only) will add something to the
version number.  So within Debian, same filename means same contents.


Note that Ubuntu will copy the source and if I remember correctly
recompile it into their current development snapshot *without* adding
something to the version number.  So the Debian and Ubuntu binary will
have the same filename, but possibly different contents, depending on
the toolchain.  If the linked binary libs have different ABIs, you're
running into undefined behaviour if you would try to execute a binary
compiled against sid under precise.  Due to the way Ubuntu changes their
GCC version at a different schedule than Debian, this is more likely
than you might think.

It is most likely safe to assume that other Debian-based distributions
do a recompiliation without changing the filename too.


tl,dr:  As soon as we're talking about multiple Distributions (Debian vs
Ubuntu being the most common example), assume same file means different
contents.  *Within* one distribution (Debian jessie vs. stretch, or
Ubuntu precise vs. trusty), same filename will mean same contents.


If you want to avoid yourself some hassle, either only upload to
debian/sid, and ask an Ubuntu dev to auto-sync your package into the
current ubuntu development version, or keep multiple branches for
multiple distributions and treat them all as backports of sid.

Note your sources won't be 100% identical (think of the first line in
d/changelog, it contains the suite name), so keeping the (even small)
diff's in version control is not necessarily a bad thing.

If you treat precise the same as jessie-backports, your workflow will
produce a d/changelog similar to the following:

package (1.0~precise1) precise

* Port to precise
* No source changes

 -- Yourname Timestamp

package (1.0) unstable

* What changed in 1.0

 -- Yourname Timestamp

package (0.9~precise1) precise

* Port to precise
* changed d/rules to be compatible with older dpkg-dev

 -- Yourname Timestamp


Using the above git commands, maintaining them only costs you seconds,
but to the user of your package it's clear that active development
occurs on Debian unstable and is then ported to precise.  And since you
have it all in git, the "changed d/rules" will get correctly merged
and/or trigger a merge conflict, alerting you to the issue.


Hope this helps a little,

- Danny


Reply to: