Backporting Packages In Detail October 09, 2007 08:30AM | Moderator Registered: 16 years ago Posts: 9 |
$ apt-get -t testing install packagenameThis will not always work because it this is build against the test repository and
$ apt-get -t stable install debootstrapThen install a directory to become our "jail" for this package so we don't mess up our actual root.
# su password: $ cd /var $ mkdir jailroots $ chmod 700 jailroots $ cd jailroots $ mkdir jail1 $ debootstrap –arch i386 etch jail1 file:///media/cdromIn this case we specify file:///media/cdrom the cdrom as a location to get the basic packages for etch.
$ chroot /var/jailroots/jail1 /bin/su -Now let's add a user whitch will be our builder
$ adduser builder pasword: …
chroot /var/jailroots/jail1 /bin/su - builder
deb [mirrors.kernel.org] stable main contrib non-free deb-src [mirrors.kernel.org] stable main contrib non-free deb [mirrors.kernel.org] testing main contrib non-free deb-src [mirrors.kernel.org] testing main contrib non-free deb [mirrors.kernel.org] unstable main contrib non-free deb-src [mirrors.kernel.org] unstable main contrib non-free # If you have a debian dvd at heand please uncomment the below line and make # sure the path is correct. # You MUST mount the cdrom from outside the chroot if you use one because # there will be no cdrom in the chroot's /dev # deb file:///media/cdrom stable main contrib
APT { Cache-Limit “41943040?; Default-Release “stable”; };This code will make sure the default repo used is "stable" instead of testing or unstable.
apt-get update
$ cd ~ $ mkdir packagename-tmp $ cd packagename-tmp/ $ apt-get -t testing source packagename Getting list of packages... done Checking dependancies... done Need to get 10.9MB of archives. Get:1 [mirrors.kernel.org] testing/main packagename-0.0.0 (dsc) [1234B] Get:2 [mirrors.kernel.org] testing/main packagename-0.0.0 (tar) [10,8MB] Get:3 [mirrors.kernel.org] testing/main packagename-0.0.0 (diff) [37,4kB] Downloaded 10,9MB in 1s (10.9MB/s) dpkg-source: extracting packagename in packagename-0.0.0 dpkg-source: unpacking packagename-0.0.0.orig.tar.gz dpkg-source: applying ./packagename-0.0.0.diff.gz
$ apt-cache showsrc packagename | grep Build-Depends:
#Note this is -t STABLE otherwise it wont build for your system. apt-get -t stable install depends_listed_from_above_command
$ apt-get -t stable install autotools-dev debhelper devscripts dh-make $ apt-get -t stable install build-essential fakeroot debian-keyring #I'd also reccomend installing solitare on your base system to play while it's all compiling.
# go into source directory $ cd packagename-0.0.0 $ fakeroot debian/rules binary
$ cd … $ ls *deb packagename-0.0.0_i386.deb packagename-dbg_0.0.0_i386.deb packagename-data_0.0.0_all.deb packagename-dev_0.0.0_all.deb
# dpkg -i packagename-0.0.0_i386.deb packagename-data_0.0.0_all.deb
# dpkg -r packagename