6

I'm trying to rebuild a package (specifically grub2) to overcome some bugs that have been fixed upstream but not fixed in Ubuntu, and have the package integrate into Ubuntu properly. The package is hosted in bzr both on Launchpad and GNU Savannah.

How can convert a "raw" upstream source package into an "Ubuntu" version and recompile/repackage it? I've worked out that I can get the latest Ubuntu version of the package source with apt-get source, but there are significant differences to the upstream version. What is the best course of action here?

3 Answers 3

2

You may want to try this trick after installing bzr and bzr-builddeb:

bzr branch ubuntu:yourrelease/grub2
cd grub2
[ -d debian/patches ] && quilt pop -a
bzr commit -m 'reverting all patches' || :
bzr merge-upstream lp:grub2
dch -i
# Here edit the version info to match upstream..
bzr bd

That should build you a new grub2 from upstream source purely (no patches). You may find that you need some of those patches, so its worthwhile to look at the list and decide.

note that the 'ubuntu:yourrelease/grub2' may not work on older versions of bzr. If that balks, try 'lp:ubuntu/yourrelease/grub2'

1
0

It could be that the version of Grub that's packaged in Ubuntu is older than what is in the upstream Grub branch.

The Ubuntu branch will also have a "debian/" directory which contains Debian/Ubuntu-specific metadata for the package, and possibly some patches with backports of bug fixes or further integration for Ubuntu. For more information, read http://developer.ubuntu.com/packaging/html/

0

For my own packaging requirement which is similar to the question, I followed this method: https://wiki.ubuntu.com/PackagingGuide/Complete#Updating_an_Ubuntu_Package

You may want to focus on the pbuilder links in order to speed things up.

As for me, I followed the instruction up to step 5 in the method. Then I did:

apt-get build-dep <package> #since I had not configured pbuilder
dpkg-buildpackage -k<key id> 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .