You are not logged in.
A lot of people break Debian by trying to install packages from these sources. Silly people! 8o Many packages can be fairly easily repackaged for jessie/Hydrogen.
The first thing you'll need is the source entry for the package you're building in your /etc/apt/sources.list file. So, for a package from testing, something like...
deb-src http://ftp.debian.org/debian/ testing main contrib non-free
For a package from Ubuntu Trusty, something like...
deb-src http://cz.archive.ubuntu.com/ubuntu trusty main
For a PPA, go to it's Launchpad page, click on the "Technical details about this PPA" link and choose a version there, so something like...
deb-src http://ppa.launchpad.net/light-locker/release/ubuntu trusty main
Then update your sources, you can ignore any warnings about signing keys...
sudo apt-get update
Some PPA packages don't require a deb-src line, but adding one just to be sure won't hurt anything. Make sure to remove it when you're done installing your deb and then update your sources again.
You'll also need an URL to the dsc file for the package you're building. For example on the following pages you'll find them in the right-column, the first link under "Download source package"...
https://packages.debian.org/stretch/light-locker
http://packages.ubuntu.com/trusty/light-locker
For a PPA, click on "View package details" and then expand the correct version you find under "Series", the link is under "Package files"...
https://launchpad.net/~light-locker/+ar … /+packages
We're almost set, we just need to install the necessary development tools...
sudo apt-get install packaging-dev debian-keyring devscripts equivs
Okey dokey. Let's say you've found package foo's PPA and want to package the Trusty version, we'll try to build it on jessie. Create a directory named foo-build and change into it...
mkdir foo-build && cd foo-build
Copy the link to the dsc file you want to import...
https://launchpad.net/~foo/+archive/ubuntu/release/+files/foo_1.2.0%2B3%2B5%7Eubuntu14.04.1.dsc
And dget that source, extracting it and allowing an unauthorized download...
dget -xu https://launchpad.net/~foo/+archive/ubuntu/release/+files/foo_1.2.0%2B3%2B5%7Eubuntu14.04.1.dsc
You now have a version folder to move into...
cd foo-2015.07.06
Install the build dependencies and create a meta-package to easily remove them when you're done (it's a good idea to make a note of the name for the build-dep package it installs)...
sudo mk-build-deps --install --remove
Update the changelog and file-name...
dch --local ~bpo70+ --distribution jessie-backports "Rebuild for jessie-backports."
Build the sucker...
dpkg-buildpackage -us -uc
That (hopefully) creates the deb(s) in the foo-build directory so move there and install it (or them)...
cd .. && sudo dpkg -i *.deb
If there is an error message at the end, see if apt will install some missing dependencies...
sudo apt-get -f install
Remove the meta-package and build dependencies...
sudo apt-get purge foo-build-deps && sudo apt-get --purge autoremove
Undo or comment out your changes to /etc/apt/sources.list, run sudo apt-get update and delete the foo-build folder you made (if you want).
Ta da! 8o
If you're having trouble with a particular package, open a thread in the System Administration section, maybe we can sort it out.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
By the way, my OP is a consolidation of these two Debian Wiki pages...
https://wiki.debian.org/SimpleBackportCreation
https://wiki.debian.org/CreatePackageFromPPA
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Thank you for this, hhh.
Offline
Brilliant HHH. I have the version of the program I wanted and I felt like a cool hacker-geek while I was doing it!
Offline
Absolutely rock-solid great How-to, @hhh !!!
I confess this has saved Bunsenlabs configured on my system more than one time!
Offline
To automate editing debian/changelog, try:
dch --bpo
Most of the stuff should be correctly filled in.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Online