FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-20-2011, 02:49 PM
Harald Dunkel
 
Default problem with /etc/kernel scripts

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi folks,

I am using upstream's build procedure for creating Linux kernel packages
("make deb-pkg"). For 2.6.38 it gives you these packages:

linux-firmware-image_2.6.38-1_amd64.deb
linux-headers-2.6.38_2.6.38-1_amd64.deb
linux-image-2.6.38_2.6.38-1_amd64.deb
linux-libc-dev_2.6.38-1_amd64.deb

Problem: The run-parts scripts in /etc/kernel/postinst.d are run
by the linux-image postinst script before the header files are
installed. Of course this fails for the dkms script on the first
installation of a new kernel version.

Obviously the dkms script should not be run by the postinst script
of linux-image, but of linux-headers. Shouldn't we distinguish
between the hooks for linux-image and for linux-headers somehow?


Any helpful comment would be highly appreciated. Regards

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2GIesACgkQUTlbRTxpHjeRFgCff7rgJ6FfpL YHdbWlrR/yxuT8
8tEAoITgOAI5Rosk4+3aP2xzQoomveKC
=nl77
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D8621EC.2020903@afaics.de">http://lists.debian.org/4D8621EC.2020903@afaics.de
 
Old 03-20-2011, 04:23 PM
Ben Hutchings
 
Default problem with /etc/kernel scripts

On Sun, 2011-03-20 at 16:49 +0100, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi folks,
>
> I am using upstream's build procedure for creating Linux kernel packages
> ("make deb-pkg"). For 2.6.38 it gives you these packages:
>
> linux-firmware-image_2.6.38-1_amd64.deb
> linux-headers-2.6.38_2.6.38-1_amd64.deb
> linux-image-2.6.38_2.6.38-1_amd64.deb
> linux-libc-dev_2.6.38-1_amd64.deb
>
> Problem: The run-parts scripts in /etc/kernel/postinst.d are run
> by the linux-image postinst script before the header files are
> installed. Of course this fails for the dkms script on the first
> installation of a new kernel version.
>
> Obviously the dkms script should not be run by the postinst script
> of linux-image, but of linux-headers. Shouldn't we distinguish
> between the hooks for linux-image and for linux-headers somehow?

The headers package should invoke hook scripts in
/etc/kernel/header_postinst.d (etc). dkms already installs a hook
script there.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 
Old 03-21-2011, 04:17 AM
Harald Dunkel
 
Default problem with /etc/kernel scripts

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/20/11 18:23, Ben Hutchings wrote:
> On Sun, 2011-03-20 at 16:49 +0100, Harald Dunkel wrote:
>>
>> Obviously the dkms script should not be run by the postinst script
>> of linux-image, but of linux-headers. Shouldn't we distinguish
>> between the hooks for linux-image and for linux-headers somehow?
>
> The headers package should invoke hook scripts in
> /etc/kernel/header_postinst.d (etc). dkms already installs a hook
> script there.
>

Sorry, I missed that.

Do you think that dkms should drop its /etc/kernel/postinst.d/dkms
script? AFAICS this script might be called before the headers are
installed.


Regards

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2G31kACgkQUTlbRTxpHje7SwCgjFI42b9NNV RRFpcNzLUi5yLE
H+MAnjvERqxcaPe1aPdSxaXamzdorhJF
=yiES
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D86DF5F.3020609@afaics.de">http://lists.debian.org/4D86DF5F.3020609@afaics.de
 
Old 03-21-2011, 12:22 PM
Ben Hutchings
 
Default problem with /etc/kernel scripts

On Mon, 2011-03-21 at 06:17 +0100, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/20/11 18:23, Ben Hutchings wrote:
> > On Sun, 2011-03-20 at 16:49 +0100, Harald Dunkel wrote:
> >>
> >> Obviously the dkms script should not be run by the postinst script
> >> of linux-image, but of linux-headers. Shouldn't we distinguish
> >> between the hooks for linux-image and for linux-headers somehow?
> >
> > The headers package should invoke hook scripts in
> > /etc/kernel/header_postinst.d (etc). dkms already installs a hook
> > script there.
> >
>
> Sorry, I missed that.
>
> Do you think that dkms should drop its /etc/kernel/postinst.d/dkms
> script? AFAICS this script might be called before the headers are
> installed.

It presumably should not rebuild modules unless both the image and
header packages are installed. Depending on the order those packages
are installed, either hook may trigger this. Also, it may be useful to
warn the user when only the image package is upgraded.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 
Old 03-31-2011, 08:59 AM
Harald Dunkel
 
Default problem with /etc/kernel scripts

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/21/11 14:22, Ben Hutchings wrote:
> On Mon, 2011-03-21 at 06:17 +0100, Harald Dunkel wrote:
>>
>> Do you think that dkms should drop its /etc/kernel/postinst.d/dkms
>> script? AFAICS this script might be called before the headers are
>> installed.
>
> It presumably should not rebuild modules unless both the image and
> header packages are installed. Depending on the order those packages
> are installed, either hook may trigger this. Also, it may be useful to
> warn the user when only the image package is upgraded.
>

Doesn't this mean that the modules are built twice?

I don't see that the kernel itself would be necessary to build a kernel
module. linux-headers should be installed before linux-image (if selected).
The header's postinst scripts in /etc/kernel/header_postinst.d should do
their job building all necessary modules, and when the kernel is installed
the scripts in /etc/kernel/postinst.d should update the initrd using the
new modules.

Of course I understand that this is highly complex. Maybe it would help to
introduce some scheme to register event handlers to run after the installation
of all packages has been completed? linux-image could register a task
"build a new initrd, if there are new modules", for example. Grub2 could
register a task "update the grub config file, if there is a new kernel or a
new initrd". And so on.

The advantages would be that these actions would be run only once, and
the installation sequence might be different from the sequence of postinst
scripts to run.


Regards

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2UQlsACgkQUTlbRTxpHjf+JACbBrFzGebg9i R2m+4PAjauA/3+
1PYAnifK0pmhSadbybkbq7sBYOJsZmuC
=cTZh
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D94425B.70309@afaics.de">http://lists.debian.org/4D94425B.70309@afaics.de
 
Old 03-31-2011, 01:22 PM
Ben Hutchings
 
Default problem with /etc/kernel scripts

On Thu, 2011-03-31 at 10:59 +0200, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/21/11 14:22, Ben Hutchings wrote:
> > On Mon, 2011-03-21 at 06:17 +0100, Harald Dunkel wrote:
> >>
> >> Do you think that dkms should drop its /etc/kernel/postinst.d/dkms
> >> script? AFAICS this script might be called before the headers are
> >> installed.
> >
> > It presumably should not rebuild modules unless both the image and
> > header packages are installed. Depending on the order those packages
> > are installed, either hook may trigger this. Also, it may be useful to
> > warn the user when only the image package is upgraded.
> >
>
> Doesn't this mean that the modules are built twice?

No.

> I don't see that the kernel itself would be necessary to build a kernel
> module.

It isn't. However it is perhaps useful for dkms to warn you that your
OOT module will not be available for the new kernel.

[...]
> Of course I understand that this is highly complex. Maybe it would help to
> introduce some scheme to register event handlers to run after the installation
> of all packages has been completed?
[...]

We had an extensive discussion defining a policy for the kernel and
initramfs builder hooks only last year. It's a little late to comment
now.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 
Old 04-03-2011, 06:31 PM
Harald Dunkel
 
Default problem with /etc/kernel scripts

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ben,

On 03/31/11 15:22, Ben Hutchings wrote:
> On Thu, 2011-03-31 at 10:59 +0200, Harald Dunkel wrote:
> [...]
>> Of course I understand that this is highly complex. Maybe it would help to
>> introduce some scheme to register event handlers to run after the installation
>> of all packages has been completed?
> [...]
>
> We had an extensive discussion defining a policy for the kernel and
> initramfs builder hooks only last year. It's a little late to comment
> now.
>

Two points about this:

- - this is not a comment. Check my first message in this thread:
Something tries to build a kernel module before the headers are
installed. This is a bug. See #574758.
- - last year was Squeeze. Now we are working on Wheezy. In 12 months
when it is close to code freeze it will be too late. Today is the
right time to clean this up.

I would be glad to help.


Regards

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2YvQ4ACgkQUTlbRTxpHjdC3wCggmPZ1xTtgu pDUhBHN9/U4dcD
CSEAnRepWt8Ut5y6+YJ5Z1XjcV9R1VlB
=dGjg
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D98BD0E.5020207@afaics.de">http://lists.debian.org/4D98BD0E.5020207@afaics.de
 
Old 04-03-2011, 06:37 PM
Michael Gilbert
 
Default problem with /etc/kernel scripts

On Sun, Apr 3, 2011 at 2:31 PM, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Ben,
>
> On 03/31/11 15:22, Ben Hutchings wrote:
>> On Thu, 2011-03-31 at 10:59 +0200, Harald Dunkel wrote:
>> [...]
>>> Of course I understand that this is highly complex. Maybe it would help to
>>> introduce some scheme to register event handlers to run after the installation
>>> of all packages has been completed?
>> [...]
>>
>> We had an extensive discussion defining a policy for the kernel and
>> initramfs builder hooks only last year. *It's a little late to comment
>> now.
>>
>
> Two points about this:
>
> - - this is not a comment. Check my first message in this thread:
> *Something tries to build a kernel module before the headers are
> *installed. This is a bug. See #574758.
> - - last year was Squeeze. Now we are working on Wheezy. In 12 months
> *when it is close to code freeze it will be too late. Today is the
> *right time to clean this up.
>
> I would be glad to help.

What is the problem? If the modules are built in the kernel postinst,
then the build will be skipped in the headers postinst (even though
the same build command is issued in both locations, its smart enough
not to rebuild when modules already exist).

If there really is a problem, a patch that addresses the issue would
be the ideal way to help.

Best wishes,
Mike


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTim0VohWtXo0SGwnXZwfTPOarMR0uQ@mail.gmail.com ">http://lists.debian.org/BANLkTim0VohWtXo0SGwnXZwfTPOarMR0uQ@mail.gmail.com
 
Old 04-03-2011, 06:58 PM
Ben Hutchings
 
Default problem with /etc/kernel scripts

On Sun, 2011-04-03 at 20:31 +0200, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Ben,
>
> On 03/31/11 15:22, Ben Hutchings wrote:
> > On Thu, 2011-03-31 at 10:59 +0200, Harald Dunkel wrote:
> > [...]
> >> Of course I understand that this is highly complex. Maybe it would help to
> >> introduce some scheme to register event handlers to run after the installation
> >> of all packages has been completed?
> > [...]
> >
> > We had an extensive discussion defining a policy for the kernel and
> > initramfs builder hooks only last year. It's a little late to comment
> > now.
> >
>
> Two points about this:
>
> - - this is not a comment. Check my first message in this thread:
> Something tries to build a kernel module before the headers are
> installed. This is a bug. See #574758.
[...]

No, it's not. Thanks for reminding me to close it.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 

Thread Tools




All times are GMT. The time now is 12:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org