problems packaging kernel

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

problems packaging kernel

Hajo Locke
Hello List,

hope this is the right place for this question. If not please give me a hint.
I try to compile and package current 4.4.0 kernel from Ubuntu 16 in an Ubuntu 14 Environment. Compiling itself works, but packaging fails with weird message.
I explain my procedure.
On Ubuntu 16 i aquired sources with: apt-get source linux-image-unsigned-4.4.0-154-generic
I transfered this to a Ubuntu 14 Server, installed all dependencies and start packaging with: dpkg-buildpackage
Compiling works, late i get this error:

echo "interest linux-update-4.4.0-154-generic" >"debian/linux-image-unsigned-4.4.0-154-generic.triggers"
# Install the postinit/postrm scripts in the extras package.
if [ -f debian.master/control.d/generic.inclusion-list ] ; then \
                ; \
        fi
/bin/bash: -c: line 1: syntax error near unexpected token `;'
make: *** [install-generic] Fehler 2
dpkg-buildpackage: Fehler: Fehler-Exitstatus von debian/rules binary war 2


This sequence can be found in debian/rules.d/2-binary-arch.mk and for me there is nothing unusual:

ifeq ($(do_extras_package),true)
        # Install the postinit/postrm scripts in the extras package.
        if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then   \
                $(call install_control,$(mods_extra_pkg_name)-$*,extra,postinst postrm); \
        fi
endif

I have no idea why this is happening. I upgraded bash and some other compile-packages to Ubuntu16 level, but this has no  effect and error message repeats.
Does anybody have a hint? I expect that an unknown package should be upgraded too or some system env is required. not a clue...
What do you think?

Thanks,
Hajo

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Oliver Grawert
hi,
Am Donnerstag, den 04.07.2019, 15:23 +0200 schrieb Hajo Locke:
> Hello List, 
>
> hope this is the right place for this question. If not please give me
> a hint. 
> I try to compile and package current 4.4.0 kernel from Ubuntu 16 in
> an Ubuntu 14 Environment.

is there any particular reason you do not simply use the 4.4 kernel
from the HWE enablement stack ?

https://wiki.ubuntu.com/Kernel/LTSEnablementStack#Ubuntu_14.04_LTS_-_Tr
usty_Tahr

ciao
        oli
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Hajo Locke
Hello,

Am 04.07.2019 um 15:52 schrieb Oliver Grawert:
hi,
Am Donnerstag, den 04.07.2019, 15:23 +0200 schrieb Hajo Locke:
Hello List, 

hope this is the right place for this question. If not please give me
a hint. 
I try to compile and package current 4.4.0 kernel from Ubuntu 16 in
an Ubuntu 14 Environment.
is there any particular reason you do not simply use the 4.4 kernel
from the HWE enablement stack ?
yes. since end of support for trusty, this kernel also is outdated and is not receiving any (security)- updates.
This is a try of a private backport.
https://wiki.ubuntu.com/Kernel/LTSEnablementStack#Ubuntu_14.04_LTS_-_Tr
usty_Tahr

ciao
	oli


Thanks,
Hajo

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Dr Rainer Woitok
In reply to this post by Hajo Locke
Hajo,

On Thursday, 2019-07-04 15:23:56 +0200, you wrote:

> ...
> if [ -f debian.master/control.d/generic.inclusion-list ] ; then \
>                  ; \
>          fi

This "if" clause is indeed syntactically incorrect: the "then" part must
not be empty!  Shells provide an empty command ":" for this purpose.

> ...
> This sequence can be found in debian/rules.d/2-binary-arch.mk and for me
> there is nothing unusual:
>
> ifeq ($(do_extras_package),true)
>          # Install the postinit/postrm scripts in the extras package.
>          if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ]
> ; then   \
>                  $(call
> install_control,$(mods_extra_pkg_name)-$*,extra,postinst postrm); \
>          fi
> endif

Obviously the "$(call ...)" returns an empty string.

Sincerely,
  Rainer

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Hajo Locke
Hello,

Am 04.07.2019 um 18:26 schrieb Dr Rainer Woitok:

> Hajo,
>
> On Thursday, 2019-07-04 15:23:56 +0200, you wrote:
>
>> ...
>> if [ -f debian.master/control.d/generic.inclusion-list ] ; then \
>>                   ; \
>>           fi
> This "if" clause is indeed syntactically incorrect: the "then" part must
> not be empty!  Shells provide an empty command ":" for this purpose.
>
>> ...
>> This sequence can be found in debian/rules.d/2-binary-arch.mk and for me
>> there is nothing unusual:
>>
>> ifeq ($(do_extras_package),true)
>>           # Install the postinit/postrm scripts in the extras package.
>>           if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ]
>> ; then   \
>>                   $(call
>> install_control,$(mods_extra_pkg_name)-$*,extra,postinst postrm); \
>>           fi
>> endif
> Obviously the "$(call ...)" returns an empty string.
yes, sure. But significant question is why. Same package works on
Ubuntu16 without problems. There must be a specific difference between
the two OS here.
mods_extra_pkg_name is declared in a file in a rules.d folder and
install_control is called multiple time before this line.
I wanted to ask this question in a devel-list, but it was denied,
because iam not an official developer.
>
> Sincerely,
>    Rainer
>
Thanks,
Hajo

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
On Mon, 8 Jul 2019 08:05:35 +0200, Hajo Locke wrote:
>I wanted to ask this question in a devel-list, but it was denied,
>because iam not an official developer.

Hi,

the users mailing list is

1. definitively the right mailing list for this kinds of questions.

2. even if the developers list would be the right place (again, it
   isn't), your request is missing all the information to reproduce it.

Why are you trying to build a kernel package exactly that way:

On Thu, 4 Jul 2019 15:23:56 +0200, Hajo Locke wrote:
>On Ubuntu 16 i aquired sources with: apt-get source
>linux-image-unsigned-4.4.0-154-generic I transfered this to a Ubuntu
>14 Server, installed all dependencies and start packaging with:
>dpkg-buildpackage

?

And way more important, how about posting the used commands with all of
their output?

Did you try to build the kernel without control and rules files the
source file might contain? You could use the config provided by the
source, you could apply patches manually, assuming the source does
contain any patches and then build a package the old faithful Debian
way.

Assuming the source contains control and rules files, then you might
need to do some editing.

Actually nobody knows what you really did. That's fine for a user's
list, but doesn't fit to the requirements of a developers list, even if
it would be the right place to ask (again, even then it wouldn't be the
right mailing list, this one is the right place for your request).

Maybe we are able to help, if you post all steps, with complete
commands, output, editing.

Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Hajo Locke
Hello,

Am 08.07.2019 um 08:59 schrieb Ralf Mardorf via ubuntu-users:

> On Mon, 8 Jul 2019 08:05:35 +0200, Hajo Locke wrote:
>> I wanted to ask this question in a devel-list, but it was denied,
>> because iam not an official developer.
> Hi,
>
> the users mailing list is
>
> 1. definitively the right mailing list for this kinds of questions.
>
> 2. even if the developers list would be the right place (again, it
>     isn't), your request is missing all the information to reproduce it.
>
> Why are you trying to build a kernel package exactly that way:
We still have ~3000 Servers with ubuntu14, this is just a try to bridge
a short time until we upgrade them.

>
> On Thu, 4 Jul 2019 15:23:56 +0200, Hajo Locke wrote:
>> On Ubuntu 16 i aquired sources with: apt-get source
>> linux-image-unsigned-4.4.0-154-generic I transfered this to a Ubuntu
>> 14 Server, installed all dependencies and start packaging with:
>> dpkg-buildpackage
> ?
>
> And way more important, how about posting the used commands with all of
> their output?
I just can extend my first posting, there are only a few steps i do.
- On Ubuntu 16 i aquire the kernel source by: apt-get source
linux-image-unsigned-4.4.0-154-generic
- I tar this and transfer to a ubuntu14 server where i untar again.
- On this ubuntu14 server all typical dependencies to compile are installed.
I upgraded gcc to 4.9 using a ppa repo because 4.8 was not sufficient.
(add-apt-repository ppa:ubuntu-toolchain-r/test)
- packaging just starts with: dpkg-buildpackage  I do not a manual
compilation.

There is a lot of output, many pages, so i restricted to error itself.
compilation itself works, so i expect problem in dpkg or debhelper
environment.

>
> Did you try to build the kernel without control and rules files the
> source file might contain? You could use the config provided by the
> source, you could apply patches manually, assuming the source does
> contain any patches and then build a package the old faithful Debian
> way.
>
> Assuming the source contains control and rules files, then you might
> need to do some editing.
>
> Actually nobody knows what you really did. That's fine for a user's
> list, but doesn't fit to the requirements of a developers list, even if
> it would be the right place to ask (again, even then it wouldn't be the
> right mailing list, this one is the right place for your request).

I dont expect that you really reproduce this. I think this is too much
effort. So i just hoped that some pro gives me a short hint ala " you
need package a in version b as well to package"

> Maybe we are able to help, if you post all steps, with complete
> commands, output, editing.
>
> Regards,
> Ralf
>
>
Thanks,
Hajo

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
While I used make-kpkg to build kernel packages for Ubuntu in the past
without issues, but I didn't use an Ubuntu source, instead I downloaded
sources for the kernels and in my case the rt patches from kernel.org,
you could try to do it as described by the Ubuntu Wiki, that was last
edited 2019-06-23 01:33:55, https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel.



[weremouse@moonstudio tmp]$ apt-get source linux-image-unsigned-4.4.0-154-generic
[snip]
[weremouse@moonstudio tmp]$ ls -hAl
total 142M
drwxrwxr-x 29 weremouse weremouse  840 Jul  8 10:34 linux-4.4.0
-rw-r--r--  1 weremouse weremouse  15M Jun 25 18:58 linux_4.4.0-154.181.diff.gz
-rw-r--r--  1 weremouse weremouse  12K Jun 25 18:58 linux_4.4.0-154.181.dsc
-rw-r--r--  1 weremouse weremouse 127M Jan 21  2016 linux_4.4.0.orig.tar.gz



linux-4.4.0/ contains a README, I ignored it and extracted the tarball:



[weremouse@moonstudio tmp]$ tar xzf linux_4.4.0.orig.tar.gz
[weremouse@moonstudio tmp]$ ls -hAl
total 142M
drwxrwxr-x 24 weremouse weremouse  700 Jan 11  2016 linux-4.4
drwxrwxr-x 29 weremouse weremouse  840 Jul  8 10:34 linux-4.4.0
-rw-r--r--  1 weremouse weremouse  15M Jun 25 18:58 linux_4.4.0-154.181.diff.gz
-rw-r--r--  1 weremouse weremouse  12K Jun 25 18:58 linux_4.4.0-154.181.dsc
-rw-r--r--  1 weremouse weremouse 127M Jan 21  2016 linux_4.4.0.orig.tar.gz
[weremouse@moonstudio tmp]$ diff -r linux-4.4/ linux-4.4.0/
[snip]
[weremouse@moonstudio tmp]$ diff linux-4.4/ linux-4.4.0/ | grep -e Only\ in -e Common\ subdirectories
Common subdirectories: linux-4.4/arch and linux-4.4.0/arch
Common subdirectories: linux-4.4/block and linux-4.4.0/block
Common subdirectories: linux-4.4/certs and linux-4.4.0/certs
Common subdirectories: linux-4.4/crypto and linux-4.4.0/crypto
Only in linux-4.4.0/: debian
Only in linux-4.4.0/: debian.master
Common subdirectories: linux-4.4/Documentation and linux-4.4.0/Documentation
Common subdirectories: linux-4.4/drivers and linux-4.4.0/drivers
Only in linux-4.4.0/: dropped.txt
Common subdirectories: linux-4.4/firmware and linux-4.4.0/firmware
Common subdirectories: linux-4.4/fs and linux-4.4.0/fs
Common subdirectories: linux-4.4/include and linux-4.4.0/include
Common subdirectories: linux-4.4/init and linux-4.4.0/init
Common subdirectories: linux-4.4/ipc and linux-4.4.0/ipc
Common subdirectories: linux-4.4/kernel and linux-4.4.0/kernel
Common subdirectories: linux-4.4/lib and linux-4.4.0/lib
Common subdirectories: linux-4.4/mm and linux-4.4.0/mm
Common subdirectories: linux-4.4/net and linux-4.4.0/net
Common subdirectories: linux-4.4/samples and linux-4.4.0/samples
Common subdirectories: linux-4.4/scripts and linux-4.4.0/scripts
Common subdirectories: linux-4.4/security and linux-4.4.0/security
Only in linux-4.4.0/: snapcraft.yaml
Common subdirectories: linux-4.4/sound and linux-4.4.0/sound
Only in linux-4.4.0/: spl
Common subdirectories: linux-4.4/tools and linux-4.4.0/tools
Only in linux-4.4.0/: ubuntu
Common subdirectories: linux-4.4/usr and linux-4.4.0/usr
Common subdirectories: linux-4.4/virt and linux-4.4.0/virt
Only in linux-4.4.0/: zfs



Consider to try the way described by the Wiki and don't use the tarball, but the linux-4.4.0/ directory, since it contains additional information.

FWIW, I found a script, but don't remember if it worked, probably I did it manually in a similar way, but for sure using make-kpkg:



[root@archlinux rocketmouse]# cat /mnt/q/usr/src/ubuntu_quantal_rt.sh
#!/bin/sh
# sh ubuntu_quantal_rt.sh
TODAY=2013-Aug-27

 GENERIC=3.6.5-rt14
 ARCH=x86_64
 export CONCURRENCY_LEVEL=2

 # Kernel to build is version
 KMAJOR=3.10
 KMINOR=.9
 KMICRO=-rt5
 KERNEL_UNAME=${KMAJOR}${KMINOR}${KMICRO}

 # Directory where the source codes should be saved
 SRC_DIR=/usr/src

clear
if [ $USER = "root" ] ; then
 if [ $(uname -m) != ${ARCH} ] ; then
  echo "#######################################"
  echo "You're running the wrong architecture"
  echo "Continuing anyway"
  echo "#######################################"
 fi
 if [ $(uname -r) != ${GENERIC} ] ; then
  echo "#######################################"
  echo "You're running the wrong kernel"
  echo "Continuing anyway"
  echo "#######################################"
 fi

 # Backup configuration, delete sources and packages in SRC_DIR
 cd $SRC_DIR
 cp linux-${KERNEL_UNAME}/.config config-${KERNEL_UNAME}_$(date +"%b-%d-%Y_%H-%M-%S")
 rm -r linux-${KERNEL_UNAME}
 rm linux-headers-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
 rm linux-image-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
 rm linux-${KMAJOR}${KMINOR}.tar.bz2 patch-${KERNEL_UNAME}.patch.bz2
 
 # Download all sources to source directory
 wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.9.tar.bz2
 wget https://www.kernel.org/pub/linux/kernel/projects/rt/3.10/patch-3.10.9-rt5.patch.bz2

 # Extracting and patching
 tar -jxf linux-${KMAJOR}${KMINOR}.tar.bz2
 mv linux-${KMAJOR}${KMINOR} linux-${KERNEL_UNAME}
 cd linux-${KERNEL_UNAME}
 bzip2 -dc ../patch-${KERNEL_UNAME}.patch.bz2 | patch -p1
 rm ../linux-${KMAJOR}${KMINOR}.tar.bz2
 rm ../patch-${KERNEL_UNAME}.patch.bz2

 # Configuration
 cp /boot/config-$(uname -r) .config
 # Optimize to CPU
 # e.g. set to CONFIG_MK8=y (Opteron/Athlon64/Hammer/K8), command out for default
 echo "CONFIG_MK8=y" >> .config
 
 # 32-bit only
 # HIGHMEM from 4G to 64G
 # echo "CONFIG_HIGHMEM4G is not set" >> .config
 # echo "CONFIG_HIGHMEM64G=y" >> .config
 
 # [...]
 SECONDS=0
 make oldconfig
 sec_oldconfig=$SECONDS
 SECONDS=0

 # Building the kernel
 make-kpkg clean
 make-kpkg --rootcmd fakeroot --initrd kernel-image kernel-headers

 # Installing new packages
 make-kpkg clean
 dpkg -i ../linux-headers-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
 dpkg -i ../linux-image-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
 echo "-------------------------------"
 echo "Config           : $sec_oldconfig sec"
 echo "Build and install: $SECONDS sec"
else
 echo "Run as \"root\""
fi
exit 0



I definitively build the rt kernels exactly like that or at least very
similar for Ubuntu 12.10 (Quantal Quetzal), it's still installed and I
still can boot vmlinuz-3.6.5-rt14 and I most likely build rt kernels
like that for Ubuntu 14.04 LTS (Trusty Tahr), too, but it's not installed anymore.



[root@archlinux rocketmouse]# ls -hld /mnt/q/usr/src/*linux*3*
drwxrwxr-x 23 root root 4.0K Dec 28  2017 /mnt/q/usr/src/linux-3.10.9-rt5
-rw-r--r--  1 root root 8.4M Aug 27  2013 /mnt/q/usr/src/linux-headers-3.10.9-rt5_3.10.9-rt5-10.00.Custom_amd64.deb
drwxr-xr-x 24 root root 4.0K Dec 28  2017 /mnt/q/usr/src/linux-headers-3.5.0-18
drwxr-xr-x  7 root root 4.0K Dec 28  2017 /mnt/q/usr/src/linux-headers-3.5.0-18-lowlatency
drwxr-xr-x 23 root root 4.0K Dec 28  2017 /mnt/q/usr/src/linux-headers-3.6.5-rt14
-rw-r--r--  1 root root  40M Aug 27  2013 /mnt/q/usr/src/linux-image-3.10.9-rt5_3.10.9-rt5-10.00.Custom_amd64.deb
[root@archlinux rocketmouse]# ls -hl /.boot/ubuntu_q/boot/vmlinuz-*
-rw-r--r-- 1 root root 5.1M Aug 27  2013 /.boot/ubuntu_q/boot/vmlinuz-3.10.9-rt5
-rw------- 1 root root 5.0M Oct 20  2012 /.boot/ubuntu_q/boot/vmlinuz-3.5.0-18-lowlatency
-rw-r--r-- 1 root root 5.0M Nov  2  2012 /.boot/ubuntu_q/boot/vmlinuz-3.6.5-rt14
[root@archlinux rocketmouse]# grep LABEL\ Light -A4 /boot/syslinux/syslinux.cfg
LABEL Light
    MENU LABEL Ubuntu ^Q LightScribe Rt (no bind to /boot)
    LINUX /.boot/ubuntu_q/boot/vmlinuz-3.6.5-rt14
    APPEND root=LABEL=q ro nomodeset
    INITRD /.boot/ubuntu_q/boot/initrd.img-3.6.5-rt14



Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
In reply to this post by Hajo Locke
On Thu, 4 Jul 2019 15:23:56 +0200, Hajo Locke wrote:
>/bin/bash: -c: line 1: syntax error near unexpected token `;'
>make: *** [install-generic] Fehler 2
>dpkg-buildpackage: Fehler: Fehler-Exitstatus von debian/rules binary
>war 2

"fakeroot debian/rules editconfigs # you need to go through each (Y, Exit, Y, Exit..) or get a complaint about config later"
- https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Oliver Grawert
In reply to this post by Hajo Locke
hi,
Am Donnerstag, den 04.07.2019, 16:22 +0200 schrieb Hajo Locke:

> > is there any particular reason you do not simply use the 4.4 kernel
> > from the HWE enablement stack ?
>  yes. since end of support for trusty, this kernel also is outdated
> and is not receiving any (security)- updates.
> This is a try of a private backport.

try following the kernel build guide from the ubuntu kernel team then:

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

(note that you should not use dpkg-buildpackage but:
fakeroot debian/rules binary-headers binary-generic binary-perarch
(though typically binary-headers and binary-generic is enough)
)

also, the kernel team has its own mailing list if you want to ask about
more details:

https://lists.ubuntu.com/mailman/listinfo/kernel-team

ciao
        oli
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
On Mon, 08 Jul 2019 12:01:13 +0200, Oliver Grawert wrote:
>https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

Yes, however, I guess the main mistake already was, that the OP used
the tarball. Take a look at the diff, the "rules" file obviously is
provided by the directory that isn't packed, not by the tarball:
https://lists.ubuntu.com/archives/ubuntu-users/2019-July/297498.html

It might even work the way tried by the OP and even without editing the
rules file, as long as a rules files does exist at all.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Liam Proven
In reply to this post by Hajo Locke
On Thu, 4 Jul 2019 at 16:24, Hajo Locke <[hidden email]> wrote:

> yes. since end of support for trusty, this kernel also is outdated and is not receiving any (security)- updates.

OK. Good answer.

> This is a try of a private backport.

OK, so, next question. If you need to run something on 14.04 and it's
out of support: why? What are you using that makes it necessary to
keep an old version around?

Depending on the answer:

Could you run it in an LXD container on 18.04? That way your app runs
on a newer, current, supported kernel.

--
Liam Proven - Profile: https://about.me/liamproven
Email: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
On Mon, 8 Jul 2019 13:37:43 +0200, Liam Proven wrote:
>OK, so, next question. If you need to run something on 14.04 and it's
>out of support: why?

The OP mentioned that it's a temporary solution:

On Mon, 8 Jul 2019 09:38:50 +0200, Hajo Locke wrote:
>We still have ~3000 Servers with ubuntu14, this is just a try to bridge
>a short time until we upgrade them.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Hajo Locke
Hello,

Am 08.07.2019 um 14:03 schrieb Ralf Mardorf via ubuntu-users:
> On Mon, 8 Jul 2019 13:37:43 +0200, Liam Proven wrote:
>> OK, so, next question. If you need to run something on 14.04 and it's
>> out of support: why?
> The OP mentioned that it's a temporary solution:
>
> On Mon, 8 Jul 2019 09:38:50 +0200, Hajo Locke wrote:
>> We still have ~3000 Servers with ubuntu14, this is just a try to bridge
>> a short time until we upgrade them.
yes, thanks Ralf for explaining.

I do some tests with the stuff and write back if i know something better.
I followed the steps here: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
I received xenial sources that way and compiled like described, but ends
up with same errormessage:

# Some initramfs-tools specific modules
install -d
/usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/initrd
if [ -f
/usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/kernel/drivers/video/vesafb.ko
]; then\
           ln -sf
/usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/kernel/drivers/video/vesafb.ko
\
/usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/initrd/;
\
         fi
echo "interest linux-update-4.4.0-154-generic"
 >"debian/linux-image-unsigned-4.4.0-154-generic.triggers"
# Install the postinit/postrm scripts in the extras package.
if [ -f debian.master/control.d/generic.inclusion-list ] ; then \
                 ; \
         fi
/bin/bash: -c: line 1: syntax error near unexpected token `;'
make: *** [install-generic] Fehler 2

same tripwires... may be ubuntu needs some reasons for selling
esm-service ;)

Last week i tried another appoach. i kept original-kernel (3.13) and
created patches  with quilt from debian jessie (3.16 - still maintained)
package. basically i did the same way and this was working but compared
to just recompiling a xenial-package much more effort. and effort will
increase with growing differences between a maintained and outdated kernel.
Its just a try to be prepared for next kernel bug which can not be
resolved with a workaround.

Hmm, i try some other ideas...
>
Thanks,
Hajo

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
On Mon, 2019-07-08 at 14:59 +0200, Hajo Locke wrote:
> some other ideas...

Hi,

I would try to build longterm 4.4.184 from https://www.kernel.org/ by
downloading and extracting the source (perhaps verifying, too, see
https://www.kernel.org/category/signatures.html) cd into the extracted
directory and run

 sudo -i

theoretically, since fakeroot is involved, it should work without root
privileges, but IIRC there was an issue and I tend to build with root
privileges

 cp /boot/config-$(uname -r) .config
 
if already provided run

 make olddefconfig

if not run

 make oldconfig

then continue by running

 make-kpkg clean
 make-kpkg --rootcmd fakeroot --initrd kernel-image kernel-headers
 make-kpkg clean
 dpkg -i ../linux-headers-*.deb
 dpkg -i ../linux-image-*.deb

Regards,
Ralf



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
On Mon, 08 Jul 2019 16:03:13 +0200, Ralf Mardorf via ubuntu-users wrote:
>I would try to build longterm 4.4.184 from https://www.kernel.org/
>[snip]

Or try building longterm 3.16.69 from kernel.org.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
In reply to this post by Hajo Locke
On Mon, 8 Jul 2019 14:59:43 +0200, Hajo Locke wrote:
>3.16 - still maintained

It still maintained by Debian, since it's a longterm kernel, see
https://www.kernel.org/:

mainline: 5.2      2019-07-07
stable:   5.1.16   2019-07-03
longterm: 4.19.57  2019-07-03
longterm: 4.14.132 2019-07-03
longterm: 4.9.184  2019-06-27
longterm: 4.4.184  2019-06-27
longterm: 3.16.69  2019-06-20


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Oliver Grawert
In reply to this post by ubuntu-users mailing list
hi,
Am Montag, den 08.07.2019, 16:03 +0200 schrieb Ralf Mardorf via ubuntu-
users:
> On Mon, 2019-07-08 at 14:59 +0200, Hajo Locke wrote:
> >
> > some other ideas...
> Hi,
>
> I would try to build longterm 4.4.184 from https://www.kernel.org/

if you want mainline kernels to just dpkg -i them, better use:

https://wiki.ubuntu.com/Kernel/MainlineBuilds

but these kernels will miss a good bunch of (security related) patches
that ubuntus userspace expects and will also likely not come with the
ubuntu-geneic config that sets various configs that are expected
defaults for the userspace as well (indeed you can workout the missing
bits from teh upstream defconfig, but the "Ubuntu Sauce" patches
specifically for LSM/apparmor as well as a good bunch of HWE patches
will simply be missing) ... 

in any case, as i said before, i'd rather ask on the kernel mailing
list than on ubuntu-users if i was hajo, over there are the experts ...

ciao
        oli
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

ubuntu-users mailing list
In reply to this post by ubuntu-users mailing list
The described make-kpkg method at least still worked for Ubuntu 15.10
Wily Werewolf. By a quick search I found this:

https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2015-August/015777.html

# export CONCURRENCY_LEVEL=2;wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.61.tar.gz https://www.kernel.org/pub/linux/kernel/projects/rt/3.10/older/patch-3.10.61-rt65.patch.gz
&& tar zxf linux-3.10.61.tar.gz
&& mv linux-3.10.61 linux-3.10.61-rt65
&& cd linux-3.10.61-rt65 && gzip -dc ../patch-3.10.61-rt65.patch.gz | patch -p1
&& cp ../config-3.10.61-rt65-1-rt-lts.01.edit .config
&& make oldconfig && make menuconfig && make oldconfig
&& date
&& make-kpkg clean && make-kpkg --initrd kernel-image kernel-headers && make-kpkg clean
&& date


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: problems packaging kernel

Hajo Locke
In reply to this post by Hajo Locke
Hello,

Am 08.07.2019 um 14:59 schrieb Hajo Locke:

> Hello,
>
> Am 08.07.2019 um 14:03 schrieb Ralf Mardorf via ubuntu-users:
>> On Mon, 8 Jul 2019 13:37:43 +0200, Liam Proven wrote:
>>> OK, so, next question. If you need to run something on 14.04 and it's
>>> out of support: why?
>> The OP mentioned that it's a temporary solution:
>>
>> On Mon, 8 Jul 2019 09:38:50 +0200, Hajo Locke wrote:
>>> We still have ~3000 Servers with ubuntu14, this is just a try to bridge
>>> a short time until we upgrade them.
> yes, thanks Ralf for explaining.
>
> I do some tests with the stuff and write back if i know something better.
> I followed the steps here:
> https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
> I received xenial sources that way and compiled like described, but ends
> up with same errormessage:
>
> # Some initramfs-tools specific modules
> install -d
> /usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/initrd
>
> if [ -f
> /usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/kernel/drivers/video/vesafb.ko
>
> ]; then\
>           ln -sf
> /usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/kernel/drivers/video/vesafb.ko
>
> \
> /usr/src/ubuntu-xenial/debian/linux-modules-4.4.0-154-generic/lib/modules/4.4.0-154-generic/initrd/;
>
> \
>         fi
> echo "interest linux-update-4.4.0-154-generic"
> >"debian/linux-image-unsigned-4.4.0-154-generic.triggers"
> # Install the postinit/postrm scripts in the extras package.
> if [ -f debian.master/control.d/generic.inclusion-list ] ; then \
>                 ; \
>         fi
> /bin/bash: -c: line 1: syntax error near unexpected token `;'
> make: *** [install-generic] Fehler 2
>
> same tripwires... may be ubuntu needs some reasons for selling
> esm-service ;)
>
> Last week i tried another appoach. i kept original-kernel (3.13) and
> created patches  with quilt from debian jessie (3.16 - still maintained)
> package. basically i did the same way and this was working but compared
> to just recompiling a xenial-package much more effort. and effort will
> increase with growing differences between a maintained and outdated
> kernel.
> Its just a try to be prepared for next kernel bug which can not be
> resolved with a workaround.
>
> Hmm, i try some other ideas...
I had a progress here. I figured out thats only necessary to upgrade gcc
and make to Ubuntu16 niveau. make is recompiled under Ubuntu14 from a
Ubuntu16 sourcepackage and gcc came from ppa repo. So Ubuntu16
sourcepackage of kernel 4.4.0-154.181 compiled and packaged down
succesfully under Ubuntu14. I just cleaned control-file and replaced
some versions of dependencies and thats it. I tried some installations
and server are rebooting fine, showing new kernel.
May be there are other ways, but working with sourcepackages from other
versions is a good solution and stays close to original packagelayout.
Thanks to all people who tried to help, hope this result helps other people.

Thanks,
Hajo

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
12