Build (backport) an newer Ubuntu package to run on an older Ubuntu version
You are running the tried-and-true Dapper stable release. You notice that Edgy has a newer version of a package you want. What do you do? Well, prior to this, your would head over to the Backports folks and ask for the package. Some packages are deemed by Backporters to be too bleeding-edge or incompatible to be considered for backporting to Dapper. Now what? Welcome prevu! prevu is like your personal Backports developer, building backports with just a single command.
This is a quick guide to using prevu. We will use gdebi as an example package.
1. Get Prevu! Debs are available at http://sourceforge.net/project/showf...kage_id=206140
2. Edit your /etc/apt/sources.list. You need a deb-src line for the development distro of Ubuntu, such as:
Code:
deb-src http://archive.ubuntu.com/ubuntu feisty main restricted universe multiverse
Of course, run apt-get update afterwards.
3. Initialize prevu. You need to run sudo prevu-init when you install prevu for the first time. You don't need to run this again -- only the first time.
4. Build package. Run prevu gdebi
5. Wait patiently. Sit and twiddle your thumbs while your machine compiles away.
6. When completed, look in /var/cache/prevu/edgy-debs. There, you will find freshly generated deb packages! This location is also an APT repository, which can be added to your sources.list like so:
Code:
deb file:/var/cache/prevu/edgy-debs ./
Replace edgy with whatever distro you are running.
Note that not all packages will build. If you don't know how to fix it to build, you probably shouldn't try to do it, because chances are you'll screw up your computer :)
Also, note that building our own backports is an unsupported thing to do. Please do not bug Ubuntu developers about your broken system or packages if prevu could be the cause.
By default, prevu will build debs for the current distro version you are running. If you would like to build for another distro, just run, for example, DIST=breezy prevu gdebi. Note you need to run DIST=breezy prevu-init first.
Filing bugs
Prevu is hosted on Launchpad. Please file bugs to launchpad, product 'prevu'.
-----
Uninstallation:
Prevu does take up some space. Mine takes up around 100MB of space. Depending on how many packages you have, /var/cache/pbuilder/aptcache might be quite full, too. To remove prevu:
1. Uninstall the prevu package
2. Run sudo rm -rf /var/cache/prevu
3. Run sudo rm /var/cache/pbuilder/aptcache/*
Re: Build (backport) an Edgy package to run on Dapper
When I have free time I'll play around with it and will file any bugs I find on Launchpad. Thanks for doing this!
Re: Build (backport) an Edgy package to run on Dapper
I have uploaded a new version of prevu that does not need the build command to be executed as root. This prevents malicious build scripts from screwing with your system.
Note the new .deb download link. After installing the update, run sudo prevu-update to effect the changes. Now, you can just do prevu gdebi, no sudo, but you need to be in the admin group.
Note that sudo is _still_ used to enter the build environment, but root access is dropped as soon as it's possible.
Re: Build (backport) an Edgy package to run on Dapper
Thanks for this tut! I was able to build gdebi but I'm not sure I got it to build correctly. Can anyone provide the MD5 for the two?
Code:
dcdd3ff33fd849bb2f2aca62a4772695 gdebi_0.1.6ubuntu1~6.06prevu1.tar.gz
f57d9a92178be9683ff4fe3bea3d7c2c gdebi_0.1.6ubuntu1~6.06prevu1_all.deb
I'm also try to build the Edgy version of firefox-themes-ubuntu (2.0b2) but it keeps building the older firefox version. Any clue?
Re: Build (backport) an Edgy package to run on Dapper
I get:
Code:
e32a3c1206811bdbb57276b066e7db03 gdebi_0.1.6ubuntu1~6.06prevu1_all.deb
As far as building firefox-themes-ubuntu, it seems like it first needs human-icon-theme. This is a two-step backport, and prevu 0.2.1 and below do not support it yet. Please wait for prevu 0.2.2 to be released.
Subscribe to bug https://launchpad.net/products/prevu/+bug/63255 for notification.
When upgrading prevu, you need to run "sudo prevu-update". You also need to run this command between two-step backports for the debs repository to refresh.
Re: Build (backport) an Edgy package to run on Dapper
Thanks for the prompt reply. It looks like I'm not building correctly since our checksum don't match. I'm thinking I'll need to retry the steps again. Thanks for the heads up on firefox-themes-ubuntu and I'll wait for an updated prevu version.
Re: Build (backport) an Edgy package to run on Dapper
Our checksums don't have to match. The timestamps on all the files and changelogs are likely different, which will throw off your MD5. With prevu, I don't think you can do it wrong!
0.2.2 has been released, debs @ sourceforge. After installing, do prevu-update as described.
Note that firefox-themes-ubuntu still doesn't build, with error:
Code:
Fatal error: default theme source directory /usr/share/firefox/chrome/classic not found
make[1]: *** [all] Error 1
make[1]: Leaving directory `/tmp/buildd/firefox-themes-ubuntu-0.5.3~6.06prevu1/src'
This looks like a packaging bug. I will investigate.
Re: Build (backport) an Edgy package to run on Dapper
yea I updated prevu the second I saw the new build.
I can't seem to find your fatal error on my build. I had to pick a package that takes 15min to build ](*,) Anyway, after installing the theme package, firefox and swiftfox still does not support the theme.
If I can be of any help, just holler. I'm already running edgy on another box and I don't plan on upgrading this box any time soon.
Quote:
I don't think you can do it wrong!
So glad to hear that. :cool:
Re: Build (backport) an Edgy package to run on Dapper
Hi jdong, it is very cool! Now I am thinking about staying with Dapper a wee longer.
What about packages which are not in Dapper? I am trying to build brasero/bonfire and have the following error:
Code:
:~$ prevu brasero
Package brasero:
0.4.4-0ubuntu1 ==> 0.4.4-0ubuntu1~6.06prevu1
Continue? [Y/n]
Preparing source package for build...
Reading package lists... Done
Building dependency tree... Done
Need to get 1009kB of source archives.
Get: 1 http://archive.ubuntu.com edgy/universe brasero 0.4.4-0ubuntu1 (dsc) [1711B]
Get: 2 http://archive.ubuntu.com edgy/universe brasero 0.4.4-0ubuntu1 (tar) [1004kB]
Get: 3 http://archive.ubuntu.com edgy/universe brasero 0.4.4-0ubuntu1 (diff) [2729B]
Fetched 1009kB in 8s (115kB/s)
dpkg-source: extracting brasero in brasero-0.4.4
dpkg-source: unpacking brasero_0.4.4.orig.tar.gz
dpkg-source: applying ./brasero_0.4.4-0ubuntu1.diff.gz
dch warning: new version (0.4.4-0ubuntu1~6.06prevu1) is less than
the current version number (0.4.4-0ubuntu1).
W: /home/alex/.pbuilderrc does not exist
dpkg-checkbuilddeps: Unmet build dependencies: cdbs gnome-pkg-tools libnautilus-burn-dev (>= 2.14.0) libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libtotem-plparser-dev libgdl-1-dev libnotify-dev
W: Unmet build-dependency in source
dpkg-buildpackage: source package is brasero
dpkg-buildpackage: source version is 0.4.4-0ubuntu1~6.06prevu1
dpkg-buildpackage: source changed by alex <alex@localhost>
fakeroot debian/rules clean
debian/rules:5: /usr/share/cdbs/1/rules/debhelper.mk: No such file or directory
debian/rules:6: /usr/share/cdbs/1/rules/simple-patchsys.mk: No such file or directory
debian/rules:7: /usr/share/cdbs/1/rules/utils.mk: No such file or directory
debian/rules:8: /usr/share/cdbs/1/class/gnome.mk: No such file or directory
debian/rules:9: /usr/share/gnome-pkg-tools/1/rules/uploaders.mk: No such file or directory
make: *** No rule to make target `/usr/share/gnome-pkg-tools/1/rules/uploaders.mk'. Stop.
Traceback (most recent call last):
File "/usr/bin/prevu", line 75, in ?
do_build()
File "/usr/bin/prevu", line 50, in do_build
raise ValueError("Build failed.")
ValueError: Build failed.
Re: Build (backport) an Edgy package to run on Dapper
To build that particular package, you need to have "cdbs" installed on your machine.