Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

building .debs with "+b1" on the end

236 views
Skip to first unread message

Brian Sammon

unread,
Jul 7, 2014, 1:50:02 AM7/7/14
to
I want to re-build a package for personal use, and have a special version number for my custom build.

Since I'm not planning on customizing the source or the debian control files, I think the ideal choice is to build a binary package with a suffix like "+b1" or "+local" on the end.

An example of this sort of thing is the current wheezy package of "libcrypt-blowfish-perl"
(https://packages.debian.org/wheezy/libcrypt-blowfish-perl)
As near as I can tell, the 2.12-1+b2 .debs of this package was created after the 2.12-1 .debs, but from the same source code, and without creating an entry in the changelog.

How would I do this? I've looked in various places, and I can't find any relevant documentation.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140707013717.19af5...@brisammon.fastmail.fm

Karl E. Jorgensen

unread,
Jul 7, 2014, 4:50:01 AM7/7/14
to
Hi

On Mon, Jul 07, 2014 at 01:37:17AM -0400, Brian Sammon wrote:
> I want to re-build a package for personal use, and have a special version number for my custom build.
>
> Since I'm not planning on customizing the source or the debian control files, I think the ideal choice is to build a binary package with a suffix like "+b1" or "+local" on the end.

If you make no changes to the source, nor the debian control files,
shouldn't you end up with the same package?

Or perhaps, you want to backport a package? Or compile for some
esoteric architecture? If so, there should be no need to change the
version number - this would introduce unnecessary confusion...

--
Karl E. Jorgensen


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140707084715.GA7545@hawking

Jonathan Dowland

unread,
Jul 7, 2014, 11:00:02 AM7/7/14
to
Packages in the archive with a "+bN" version suffix, such as "+b1", have been
'binNMUd': essentially rebuilt without any source changes because the
environment has changed (such as a version bump of a library dependency).

In your case it would be worthwhile documenting the fact your package differs
from the archive anyway; so I'd recommend just adding a new changelog stanza
with an NMU version number. If you have devscripts installed, 'dch -n' will
insert the correct stanza for you.

--
Jonathan Dowland


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/2014070714...@bryant.redmars.org

Brian Sammon

unread,
Jul 7, 2014, 3:00:03 PM7/7/14
to
On Mon, 7 Jul 2014 15:55:22 +0100
Jonathan Dowland <jm...@debian.org> wrote:

> Packages in the archive with a "+bN" version suffix, such as "+b1", have be
> 'binNMUd': essentially rebuilt without any source changes because the
> environment has changed (such as a version bump of a library dependency).

Ah! Thank you! "binNMU" is the magic word.

Found the following in google:
https://wiki.debian.org/binNMU
http://manpages.ubuntu.com/manpages/precise/man1/sbuild.1.html

So I would have to install/learn "sbuild".

> In your case it would be worthwhile documenting the fact your package diffe
> from the archive anyway; so I'd recommend just adding a new changelog stanz

I was wrong, it turns out that binNMUs _do_ (usually) add a changelog entry, but it's a sort of ephemeral entry (e.g. the changelog entry for 2.12-1+b2 won't show in the changelog for 2.12-2 because it doesn't go into the source package)


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140707145140.2989d...@brisammon.fastmail.fm

Sven Joachim

unread,
Jul 7, 2014, 3:10:02 PM7/7/14
to
On 2014-07-07 20:51 +0200, Brian Sammon wrote:

> On Mon, 7 Jul 2014 15:55:22 +0100
> Jonathan Dowland <jm...@debian.org> wrote:
>
>> Packages in the archive with a "+bN" version suffix, such as "+b1", have be
>> 'binNMUd': essentially rebuilt without any source changes because the
>> environment has changed (such as a version bump of a library dependency).
>
> Ah! Thank you! "binNMU" is the magic word.
>
> Found the following in google:
> https://wiki.debian.org/binNMU
> http://manpages.ubuntu.com/manpages/precise/man1/sbuild.1.html
>
> So I would have to install/learn "sbuild".

If you just want to rebuild packages locally, this is not really
necessary.

>> In your case it would be worthwhile documenting the fact your package diffe
>> from the archive anyway; so I'd recommend just adding a new changelog stanz
>
> I was wrong, it turns out that binNMUs _do_ (usually) add a changelog
> entry, but it's a sort of ephemeral entry (e.g. the changelog entry
> for 2.12-1+b2 won't show in the changelog for 2.12-2 because it
> doesn't go into the source package)

Right, the entry only ends up in the binary packages and you can see it
in /usr/share/doc/<package>, but packages.debian.org uses
debian/changelog from the source package, so you won't find it there.

Why do you want to rebuild the packages in the first place, and do you
want your local packages to be replaced by newer versions in the
archive?

Cheers,
Sven


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/87zjgl0...@turtle.gmx.de

Jonathan Dowland

unread,
Jul 7, 2014, 3:40:02 PM7/7/14
to
On Mon, Jul 07, 2014 at 02:51:40PM -0400, Brian Sammon wrote:
> So I would have to install/learn "sbuild".

sbuild can be used to do it, but you don't need sbuild. I think
dpkg-buildpackage would be sufficient, but you'd ideally do it in a chroot of
some sort, which sbuild manages. Another tool to do similar is pbuilder.

> I was wrong, it turns out that binNMUs _do_ (usually) add a changelog entry,
> but it's a sort of ephemeral entry (e.g. the changelog entry for 2.12-1+b2
> won't show in the changelog for 2.12-2 because it doesn't go into the source
> package)

You're right: but not only will that entry not be in 2.12-2, it won't be in
2.12-3 either; it also doesn't show up on (e.g.) packages.debian.org (which
shows the changelog from the source package, not binary packages). So there are
few places it *does* show up.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140707193...@bryant.redmars.org

Brian Sammon

unread,
Jul 8, 2014, 4:20:03 AM7/8/14
to
On Mon, 7 Jul 2014 20:39:06 +0100
Jonathan Dowland <jm...@debian.org> wrote:

> On Mon, Jul 07, 2014 at 02:51:40PM -0400, Brian Sammon wrote:
> > So I would have to install/learn "sbuild".
>
> sbuild can be used to do it, but you don't need sbuild. I think
> dpkg-buildpackage would be sufficient,

dpkg-buildpackage definitely doesn't have (at least, I don't see it in the manpage) anything as simple and straightforward as sbuild's "--binNMU" option.
But I'd be interested in hearing recipes for doing this with
dpkg-buildpackage.

> but you'd ideally do it in a chroot of
> some sort, which sbuild manages. Another tool to do similar is pbuilder.

Are you saying that you recommend I use a chroot? For a package I'm building just for myself (for just one machine)?
Hmm... I've never set up a chroot for building packages and it seems like this would be a lot of work, and a lot of disk space (my HDs are small by todays standards) for very little benefit (in my situation).
If it turns out there's more than one way to do this, I think I'd probably prefer a method that doesn't require a chroot.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140708041548.e7c0d...@brisammon.fastmail.fm

Brian Sammon

unread,
Jul 8, 2014, 4:40:02 AM7/8/14
to
On Mon, 07 Jul 2014 21:08:32 +0200
Sven Joachim <sven...@gmx.de> wrote:

> On 2014-07-07 20:51 +0200, Brian Sammon wrote:
>
> > So I would have to install/learn "sbuild".
>
> If you just want to rebuild packages locally, this is not really
> necessary.

Are you saying there's another way to do what I want to do? Or are you saying that the thing I think I want to do is maybe not really what I want to do?

> Why do you want to rebuild the packages in the first place, and do you
> want your local packages to be replaced by newer versions in the
> archive?

Well...the problem that I was trying to solve that prompted this question, has morphed into a different problem. If I decide to ask for help with that, I'll start another thread. But I thought this "+b1" technique might be useful in the future.

In general, the situation is something like: I have an unsupported (by debian) ARMv7/armhf device with an unsupported (by Debian) kernel on it, and I wanted to run version X of package Foo that I downloaded from archive.debian.org. Later versions of package Foo have new features I don't like. I found a armhf binary of version X, but it wouldn't run, so I thought I'd see if rebuilding it from the source packages would help. It did -- the program runs now, but as it turns out that didn't solve my entire problem.

Now my rebuilt version of package Foo -- that seems like exactly the right time to use a "+b1" version numbering trick. If it's not more trouble than it's worth.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140708043044.9763c...@brisammon.fastmail.fm

Jonathan Dowland

unread,
Jul 8, 2014, 7:10:02 AM7/8/14
to
On Tue, Jul 08, 2014 at 04:15:48AM -0400, Brian Sammon wrote:
> dpkg-buildpackage definitely doesn't have (at least, I don't see it in the
> manpage) anything as simple and straightforward as sbuild's "--binNMU"
> option. But I'd be interested in hearing recipes for doing this with
> dpkg-buildpackage.

No, you'd have to do it by hand. a binNMU is just a rebuild of arch-any
packages (dpkg-buildpackage -B) after having added the extra changelog stanza
(which, since it's a binary arch-any only build, means that stanza doesn't go
into any source package)

> Are you saying that you recommend I use a chroot? For a package I'm building
> just for myself (for just one machine)?

It's probably not necessary for a private package, but that's essentially what
sbuild gives you. It's a "good hygiene" thing to do if you ever plan to share
packages.

--
Jonathan Dowland


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140708105...@bryant.redmars.org
0 new messages