No DEB packages when setlocalversion echos non-empty

Bug #602405 reported by Ancoron Luziferis on 2010-07-06
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kernel-package (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: kernel-package

I use make-kpkg for compiling my kernels and building DEB packages, which I can then transfer over to other machines. I'm using upstream sources for this (e.g. the torvalds git tree).

The thing is that there is a script "scripts/setlocalversion" which might generate output like a simple "+" in cases the source differs from the upstream version (e.g. self included patches aso.). If that is the case the generated version string looks like "2.6.35-rc4-amd64+" if the appended version string is just "-amd64".

This was not a problem before but now I get the following situation: when make-kpkg runs it replaces the placeholders inside the debian/control file with the version string unmodified and so the additional "+" sign don't make it into the "debian/control" file and one will get the same error as in issue #58307, comment #7:

dpkg-gencontrol -DArchitecture=amd64 -isp \
                        -plinux-image-2.6.35-rc4-amd64+ -P/srv/dev/kernel/torvalds/linux-2.6/debian/linux-image-2.6.35-rc4-amd64+/
dpkg-gencontrol: error: package linux-image-2.6.35-rc4-amd64+ not in control info
make[2]: *** [debian/stamp/binary/linux-image-2.6.35-rc4-amd64+] Error 255
make[2]: Leaving directory `/srv/dev/kernel/torvalds/linux-2.6'
make[1]: *** [debian/stamp/binary/pre-linux-image-2.6.35-rc4-amd64+] Error 2
make[1]: Leaving directory `/srv/dev/kernel/torvalds/linux-2.6'
make: *** [kernel-image] Error 2

The output explains this:
...
sed -e 's/=V/2.6.35-rc4-amd64/g' \
                -e 's/=D/2.6.35-rc4-amd64+-10.00.Custom/g' -e 's/=A/amd64/g' \
  -e 's/=SA//g' \
  -e 's/=I//g' \
  -e 's/=CV/2.6/g' \
  -e 's/=M/Unknown Kernel Package Maintainer <email address hidden>/g' \
  -e 's/=ST/linux/g' -e 's/=B/x86_64/g' \
                  /usr/share/kernel-package/Control > debian/control
...

And as the placeholder for the package includes "V": "Package: =ST-image-=V=SA" it surely can't make it in. So in the end the version string that is generated into "include/config/kernel.release":

echo "2.6.35-rc4-amd64$(/bin/bash scripts/setlocalversion /srv/dev/kernel/torvalds/linux-2.6)" > include/config/kernel.release

...does not match the variable "version" that is used in /usr/share/kernel-package/ruleset/minimal.mk:

        test -f debian/control || sed -e 's/=V/$(version)/g' \

Ancoron Luziferis (ancoron) wrote :

Additional note:
neither "make-kpkg clean" nor "make distclean" nor manually editing the "debian/control" file before running make-kpkg fixes this issue. The only thing one can do is to completely vanish all local changes to the upstream sources which is not possible if you want to test some patches.

Ancoron Luziferis (ancoron) wrote :

$ lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04

$ dpkg -s kernel-package | egrep '^Version'
Version: 12.032

cmcx_linux (cmcx-linux) wrote :

Hy all, I manage to find somewhat of a fix. Edit kernelsource/script/setlocalversion . At line 54 in my kernel I have
if $short; then
  echo "+"
return
According to the comments if only the short version is required don't bother running further git commands.
This from what I saw appears only on compilations from git sources ( I compiled tar balls without a problem), and it's the plus that gets appended to the kernel name at compile time.
Just delete the +, save and compile with make-kpkg.

Changed in kernel-package (Ubuntu):
status: New → Confirmed

Hello,
I am Inga,
I am online now, let`s chat?
Here it is my new photo and message for you:

http://brides-hot.ru

kisses,
Inga

Nikolaus Demmel (nikolaus) wrote :

I believe this has been fixed upstream, and at least in the Xenial version of kernel-package. That version works fine for me with localversion.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers