4

I'm facing a hard time with Linux 3.13 from Trusty but, it is another topic (http://www.mail-archive.com/ubuntu-server@lists.ubuntu.com/msg06775.html), so, I decided to backport the Linux 3.16 from Utopic.

Also, I'll need to sign my Linux version with my GPG key and upload it to my PPA later but, first, I am unable to bump +1 to Linux revision version... Can someone help me with that?!

Here is the procedure to manually backport it (which works, as-is, without bumping +1 to revision version):

Instructions from: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

1- Add Utopic's deb-src to Trusty's sources.list:

deb-src http://us.archive.ubuntu.com/ubuntu/ utopic main restricted universe multiverse

2- Run the following commands:

mkdir ~/linux/source -p
cd ~/linux/source
sudo apt-get install fakeroot
sudo apt-get build-dep linux
apt-get source linux
cd linux-3.16.0/
debuild -uc -us
cd ..
sudo dpkg -i linux-headers-3.16.0-4_3.16.0-4.9_all.deb linux-headers-3.16.0-4-generic_3.16.0-4.9_amd64.deb linux-image-3.16.0-4-generic_3.16.0-4.9_amd64.deb linux-image-extra-3.16.0-4-generic_3.16.0-4.9_amd64.deb

3- Done! Linux 3.16 from Utopic, compiled and installed into Trusty! First phase okay...

But now, I need to bump its revision version to, something like this: "3.16.0-5.0". To sign it with my GPG and upload it to my PPA.

Then, to achieve this, before compiling and packaging it, I edited the "debian changelog" file:

cd linux-3.16.0/
vi debian.master/changelog

...to add:

linux (3.16.0-5.0) trusty; urgency=low

  [ Thiago Martins ]

  * Backporting it to Trusty

 -- Thiago Martins <thiagocmartinsc@gmail.com.br>  Sat, 19 Jul 2014 20:42:13 -0300

Now, the command debuild fails to package it, the following error appear at near the end of the process:

debuild
...
Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 410.
dh_systemd_start
Can't stat debian/linux-tools-3.16.0-5: No such file or directory
 at /usr/bin/dh_systemd_start line 127.
Can't stat debian/linux-cloud-tools-3.16.0-5: No such file or directory
 at /usr/bin/dh_systemd_start line 127.
Can't stat debian/linux-image-3.16.0-5-generic: No such file or directory
 at /usr/bin/dh_systemd_start line 127.
Can't stat debian/linux-image-extra-3.16.0-5-generic: No such file or directory
...
...
Can't stat debian/vlan-modules-3.16.0-5-generic-di: No such file or directory
 at /usr/bin/dh_systemd_start line 127.
Can't stat debian/ipmi-modules-3.16.0-5-generic-di: No such file or directory
 at /usr/bin/dh_systemd_start line 127.
Debug: install-indep
Debug: binary-indep
dh_installchangelogs -i
dh_installdocs -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
flock -w 60 /home/tmartins/linux/source/linux-3.16.0/debian/.LOCK dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
dpkg-deb: building package `linux-source-3.16.0' in `../linux-source-3.16.0_3.16.0-5.0_all.deb'.
dpkg-deb: building package `linux-doc' in `../linux-doc_3.16.0-5.0_all.deb'.
dpkg-deb: building package `linux-headers-3.16.0-5' in `../linux-headers-3.16.0-5_3.16.0-5.0_all.deb'.
dpkg-deb: building package `linux-tools-common' in `../linux-tools-common_3.16.0-5.0_all.deb'.
dpkg-deb: building package `linux-cloud-tools-common' in `../linux-cloud-tools-common_3.16.0-5.0_all.deb'.
Debug: install-perarch
# Add the tools.
...
...
dpkg-deb: building package `linux-tools-3.16.0-5' in `../linux-tools-3.16.0-5_3.16.0-5.0_amd64.deb'.
dh_strip -plinux-cloud-tools-3.16.0-5
dh_installchangelogs -plinux-cloud-tools-3.16.0-5
dh_installdocs -plinux-cloud-tools-3.16.0-5
dh_compress -plinux-cloud-tools-3.16.0-5
dh_fixperms -plinux-cloud-tools-3.16.0-5
dh_shlibdeps -plinux-cloud-tools-3.16.0-5
dh_installdeb -plinux-cloud-tools-3.16.0-5
flock -w 60 /home/tmartins/linux/source/linux-3.16.0/debian/.LOCK dh_gencontrol -plinux-cloud-tools-3.16.0-5
dh_md5sums -plinux-cloud-tools-3.16.0-5
dh_builddeb -plinux-cloud-tools-3.16.0-5
dpkg-deb: building package `linux-cloud-tools-3.16.0-5' in `../linux-cloud-tools-3.16.0-5_3.16.0-5.0_amd64.deb'.
Debug: module-check-generic
install -d /home/tmartins/linux/source/linux-3.16.0/debian.master/abi/3.16.0-5.0/amd64
find /home/tmartins/linux/source/linux-3.16.0/debian/build/build-generic/ -name \*.ko | \
                sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > /home/tmartins/linux/source/linux-3.16.0/debian.master/abi/3.16.0-5.0/amd64/generic.modules
II: Checking modules for generic...previous or current modules file missing!
   /home/tmartins/linux/source/linux-3.16.0/debian.master/abi/3.16.0-5.0/amd64/generic.modules
   /home/tmartins/linux/source/linux-3.16.0/debian.master/abi/3.16.0-4.9/amd64/generic.modules
make: *** [module-check-generic] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed

What more should I need to change, to bump +1 for my Linux release version (from 4.9 to 5.0)? So, debuild process will finish okay... I think that there is something to do with abi but, I'm not a Ubuntu Linux Kernel maintainer (or a coder), so, I don't know how to proceed from here...

I really appreciate any help!

Thanks in advance!

  • I am guessing by looking at those errors, half the problem is that directories the source are in will probably be called something like *3.16.0-4, not *3.16.0-5 as it expects from your changes to what version it is. The other issue it likely is that *3.16.0-5 will need dependencies to match that version, which probably don't exist/aren't compatible... N.B. using the existing packages for Utopic might work - I had vaguely similar success installing a Fedora 20 kernel in Fedora 19 (not Ubuntu though) – Wilf Jul 20 '14 at 1:22
  • Do you absolutely have to do a +1? You could instead append ~1 (~ is considered less than everything), and so have the version string be 3.16.0-4.9~1. You could also look at the backportpackage tool in the ubuntu-dev-tools package, which automates the process of backporting a package, adjusting the version number so that the new package is between Trusty and Utopic, and uploading it to a PPA (if you want to). The syntax to save the source package locally would be backportpackage -s utopic -d trusty -w . --dont-sign linux. – saiarcot895 Jul 20 '14 at 2:02
  • Good point!! I'm trying it with 4.9.1 now... I'll take a look into ubuntu-dev-tools.... Tks! ^_^ – ThiagoCMC Jul 20 '14 at 2:09
  • Bumping it to "4.9.1" didn't worked either, trying "4.9~1" now... Next, I'll try "backportpackage -b -s utopic -d trusty -w . linux"... – ThiagoCMC Jul 20 '14 at 2:50
  • Bumping it to "4.9~1" didn't worked either... :-( – ThiagoCMC Jul 20 '14 at 4:11
1

The build fails at module checking, which I think is because /home/tmartins/linux/source/linux-3.16.0/debian.master/abi/3.16.0-4.9 does not exist. You can skip the checking by using the skipmodule=true parameter. When I build with fakeroot debian/rules, I will do this:

$ fakeroot debian/rules binary-headers binary-generic skipmodule=true

This parameter should also apply to debuild.

But in later stage, the build may fail again at ABI check, so you will have to use skipabi=true as well, so the full command will become:

$ fakeroot debian/rules binary-headers binary-generic skipmodule=true skipabi=true
1

I encountered the same error when trying to build my own Ubuntu kernel.

I had updated debian.master/changelog to:

linux (3.13.0-107.154+studog-01) trusty; urgency=low

The build failed (paraphrased, I lost the original output):

find /home/studog/linux-3.16.0/debian/build/build-generic/ -name \*.ko | \
            sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > /home/studog/linux-3.16.0/debian.master/abi/3.16.0-studog-0.0/amd64/generic.modules
II: Checking modules for generic...previous or current modules file missing!

Note the extraversion wasn't quite right in the attempted path reference, although the correct path (debian.master/abi/3.13.0-107.154+studog-01) did exist. I changed the changelog to be instead

linux (3.13.0-107.154+studog01) trusty; urgency=low

and it worked. It seems like the build system doesn't enjoy extra-versions that contain dashes.

Anthony Wong's workaround with skipmodule and skipabi worked to correct the problem as well, but I preferred changing the extra-version instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.