--append-to-version breaks make-kpkg kernel build

Bug #58307 reported by Zooko Wilcox-O'Hearn
116
This bug affects 23 people
Affects Status Importance Assigned to Milestone
kernel-package (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Stephan Diestelhorst
Nominated for Maverick by Stephan Diestelhorst

Bug Description

Binary package hint: kernel-package

According to this bug report:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348264

This bug is supposed to be fixed in kernelpackage 10.x. I installed kernelpackage 10.049ubuntu4 from edgy onto my dapper system (changing no other packages), and I got the same bug or a similar one:

time sudo make-kpkg --initrd --append-to-version=-yumyum1 kernel_image kernel-headers

...

dpkg-gencontrol: error: package linux-headers-2.6.15.7-ubuntu1-yumyum1 not in control
info
dh_gencontrol: command returned error code 65280
make: *** [install/linux-image-2.6.15.7-ubuntu1-yumyum1] Error 1

I worked around it in the same way that the original bug reported for the debian bug did -- by editing the debian/control file.

Revision history for this message
risktaker (marcobenecke) wrote :

Same here, i also installed the kernel-package 10.049ubuntu5 on my dapper system:

-terminal----8<-
Aikido:/tmp/linux-source-2.6.17-2.6.17$ AUTOBUILD=1 fakeroot debian/rules binary-debs flavours=generic

<after some time>

28 blocks
dpkg-gencontrol -isp -DArchitecture=i386 -plinux-headers-2.6.17-10-da7 \
                                          -P/home/risk/Projekte/undervolt/linux-source-2.6.17-2.6.17/debian/build/linux-source-2.6.17/debian/linux-headers-2.6.17-10-da7/
dpkg-gencontrol: error: package linux-headers-2.6.17-10-da7 not in control info
make[2]: *** [debian/linux-headers-2.6.17-10-da7] Fehler 255
make[2]: Verlasse Verzeichnis '/home/risk/Projekte/undervolt/linux-source-2.6.17-2.6.17/debian/build/linux-source-2.6.17'
make[1]: *** [binary/linux-headers-2.6.17-10-da7] Fehler 2
make[1]: Verlasse Verzeichnis '/home/risk/Projekte/undervolt/linux-source-2.6.17-2.6.17/debian/build/linux-source-2.6.17'
make: *** [binary-debs] Fehler 2
-terminal----8<-

Revision history for this message
Scott Merrilees (scott.merrilees) wrote :

Still present in Feisty / 2.6.20.

Revision history for this message
Scott Merrilees (scott.merrilees) wrote :

However when I start from a clean linux-source package and specify -append-to-version with the first make-kpkg, it works.

Revision history for this message
RJ Clay (rjclay) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Changed in kernel-package:
status: New → Incomplete
Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

This problem is fixed now -- I can use --append-to-version and it works.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Closing per submitter feedback.

Changed in kernel-package:
status: Incomplete → Fix Released
Revision history for this message
gyurman (j-launchpad-20-gyurman-spamgourmet-com) wrote :

Again not working well in Karmic

> fakeroot make-kpkg --initrd --append-to-version=-v4l1-compat kernel-image kernel-headers
dpkg-gencontrol: error: package linux-image-2.6.31.9-v4l1-compat not in control info
make[2]: *** [debian/stamp/binary/linux-image-2.6.31.9-v4l1-compat] Error 255
make[2]: Leaving directory `../linux-source-2.6.31'
make[1]: *** [debian/stamp/binary/pre-linux-image-2.6.31.9-v4l1-compat] Error 2
make[1]: Leaving directory `../linux-source-2.6.31'
make: *** [kernel-image] Error 2

What can I do?

Changed in kernel-package (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Shuduo Sang (sangshuduo) wrote :

still happen in lucid ...

dpkg-gencontrol: error: package linux-image-2.6.35-custom+ not in control info
make[2]: *** [debian/stamp/binary/linux-image-2.6.35-custom+] Error 255
make[2]: Leaving directory `/home/sangshuduo/work/kernel/linux-2.6'
make[1]: *** [debian/stamp/binary/pre-linux-image-2.6.35-custom+] Error 2
make[1]: Leaving directory `/home/sangshuduo/work/kernel/linux-2.6'
make: *** [kernel_image] Error 2

Revision history for this message
Charles Manning (manningc2) wrote :

Got exactly the same problem here...

====== making target debian/stamp/build/kernel [new prereqs: vars]======
This is kernel package version 12.032.
The changelog says we are creating 2.6.35custom
However, I thought the version is 2.6.35custom+
exit 1

Anyone know of a work around?

Revision history for this message
Charles Manning (manningc2) wrote :

Actually this fails even without --append-to-version

Revision history for this message
Stephan Diestelhorst (syon) wrote :
summary: - --append-to-version made it fail
+ --append-to-version breaks make-kpkg kernel build
Revision history for this message
Stephan Diestelhorst (syon) wrote :

Currently testing kernel-package/12.036 from Debian/testing, which has the fix, according to their bug tracker. If this is confirmed, Ubuntu should update the package, too!

Revision history for this message
Stephan Diestelhorst (syon) wrote :

Confirming that kernel-package 12.036 fixes the issue. Ubuntu package maintainers, please consider upgrading.

Changed in kernel-package (Ubuntu):
status: In Progress → Fix Released
Changed in kernel-package (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Bryan Hundven (bryanhundven) wrote :

I am also able to confirm the problem with 12.033, and the fix with 12.036, on maverick.

Revision history for this message
Wes Garner (wesgarner) wrote :

Occurring in 10.04 LTS
dpkg-gencontrol: error: package linux-image-2.6.36-rc2-wg-next-20100827 not in control info
make[2]: *** [debian/stamp/binary/linux-image-2.6.36-rc2-wg-next-20100827] Error 255
make[2]: Leaving directory `/home/wesgarner/src/linux-next'
make[1]: *** [debian/stamp/binary/pre-linux-image-2.6.36-rc2-wg-next-20100827] Error 2
make[1]: Leaving directory `/home/wesgarner/src/linux-next'
make: *** [kernel-image] Error 2

Changed in kernel-package (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
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.

Revision history for this message
Brian Rogers (brian-rogers) wrote :

12.036 fixes this. I have it in my PPA: https://launchpad.net/~brian-rogers/+archive/ppa

Changed in kernel-package (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

thanks, your repo version worked properly

Revision history for this message
Vinco (vincomaldini) wrote :

Thanks Brian, your repo version fixed this in maverick

Revision history for this message
mokabar (tim-klingt) wrote :

could brian's package be merged into maverick?

Revision history for this message
Joel Wirāmu Pauling (aenertia) (aenertia) wrote :

confirm brians ppa and newer version fixes in maverick

Revision history for this message
Peter Davoust (worldgnat) wrote :

I also confirm that this worked for me in Maverick.

Revision history for this message
Craig Ringer (ringerc) wrote :

Brian Rogers' PPA addresses this in Mavrick. Please push into -updates !

Revision history for this message
Muhammad Negm (ravingeek) wrote :

It's Broke again in mavrick
dpkg-gencontrol: error: package linux-image-2.6.36-netbook not in control info

Revision history for this message
J D (jmantra) wrote :

Just compiled Kernel version 2.6.28.1 from stable branch. I had similar issue. I had to comment out few lines at end of scripts/setlocalversion

      52 # If only the short version is requested, don't bother
     53 # running further git commands
     54 if $short; then
     55 echo ""
     56 return

and

    158 # scm version string if not at a tagged commit
    159 if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
    160 # full scm version string
    161 res="$res$(scm_version)"
    162 #else
    163 # append a plus sign if the repository is not in a clean
    164 # annotated or signed tagged state (as git describe only
    165 # looks at signed or annotated tags - git tag -a/-s) and
    166 # LOCALVERSION= is not specified
    167 #if test "${LOCALVERSION+set}" != "set"; then
    168 # scm=$(scm_version --short)
    169 # res="$res${scm:++}"
    170 #fi
    171 fi
    172
    173 echo "$res"

echo "$res"

For sake of clarity I also edited scripts/setlocalversione

and it worked.

Revision history for this message
J D (jmantra) wrote :

sorry correction, it should be 2.6.38 for Kernel version, compiled on Ubuntu 10.10

Revision history for this message
Matthew Morgan (lytithwyn) wrote :

I can confirm that JD's corrections work for me building 2.6.38 on 10.10 also.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Does anyone still have this issue?

Changed in kernel-package (Ubuntu):
status: Confirmed → Incomplete
Changed in kernel-package (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Étienne BERSAC (bersace) wrote :

Hi,

I confirm this bug when building a git tree :

-----8<-----------
root@test1:/usr/src/linux-head# apt-cache policy kernel-package
kernel-package:
  Installé : 12.036+nmu3
  Candidat : 12.036+nmu3
 Table de version :
 *** 12.036+nmu3 0
        500 http://fr.archive.ubuntu.com/ubuntu/ raring/universe amd64 Packages
        100 /var/lib/dpkg/status
root@test1:/usr/src/linux-head#
---------->8----------

I get this error :

---------------8<-
root@test1:/usr/src/linux-head# make-kpkg --jobs 4 buildpackage
...
The changelog says we are creating 3.9.0-rc4-00139-g6c0af46
However, I thought the version is 3.9.0-rc4
exit 4

--------------->8-

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.