Re: [systemd-devel] kernel-install questions

2013-09-25 Thread Tom Gundersen
On Wed, Sep 25, 2013 at 3:35 PM, Tom Gundersen t...@jklm.no wrote:
  [1mdiff --git a/Makefile b/Makefile [m
  [1mindex 8d0668f..248d59c 100644 [m
  [1m--- a/Makefile [m
  [1m+++ b/Makefile [m
  [36m@@ -335,7 +335,7 @@ [m  [mOBJCOPY = $(CROSS_COMPILE)objcopy [m
  OBJDUMP = $(CROSS_COMPILE)objdump [m
  AWK = awk [m
  GENKSYMS = scripts/genksyms/genksyms [m
  [31m-INSTALLKERNEL  := installkernel [m
  [32m+ [m [32mINSTALLKERNEL  := kernel-install [m
  DEPMOD = /sbin/depmod [m
  PERL = perl [m
  CHECK = sparse [m
  [1mdiff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh [m
  [1mindex d13ec1c..4ce2240 100644 [m
  [1m--- a/arch/x86/boot/install.sh [m
  [1m+++ b/arch/x86/boot/install.sh [m
  [36m@@ -34,7 +34,7 @@ [m  [mverify $3 [m
  # User may have a custom install script [m
   [m
  if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} $@; fi 
 [m
  [31m-if [ -x /sbin/${INSTALLKERNEL} ]; then exec
 /sbin/${INSTALLKERNEL} $@; fi [m
  [32m+ [m [32mif [ -x /sbin/${INSTALLKERNEL} ]; then exec
 /sbin/${INSTALLKERNEL} add $@; fi [m
   [m
  # Default install - same as make zlilo [m
   [m

Bah, copy-paste fail. The important bit is: the binary needs to be
called installkernel rather than kernel-install, and it must work
also if the action add is implicit.

-t
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] kernel-install questions

2013-09-25 Thread Kay Sievers
On Wed, Sep 25, 2013 at 3:35 PM, Tom Gundersen t...@jklm.no wrote:
 I have been looking at integrating kernel-install with Arch and I ran
 across a few questions:

 *) With /boot on fat, 'add' fails for me due to not being able to use
 cp --preserve. How is this meant to work (or was it just not tested
 on fat)? Dropping --preserve makes it work for me.

Hmm, no problems here:
# cp --preserve /etc/hostname /boot; echo $?
0

# rpm -q coreutils
coreutils-8.21-11.fc19.x86_64

 *) How come the interface of kernel-install is not the same as what is
 used by make install in the kernel?

We need verbs, because the same interface is used to remove things,
and to provide a switch to reset the entire config.

 With the below kernel patch make
 install just works.

It's on our TODO list for long, but we haven't done it so far.

 Was there a reason for the different interface,
 or would you be open to adding compatibility with the kernel script?

What would compat mean? A symlink to kernel-install from installkernel
and checking argv[0]?

 (I could of course just ship a shim script, but I'd rather not).

We thought of letting the kernel Makefile look for kernel-install
first and fall back to installkernel, but we haven't look into details
so far.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] kernel-install questions

2013-09-25 Thread Tom Gundersen
On Wed, Sep 25, 2013 at 4:37 PM, Kay Sievers k...@vrfy.org wrote:
 On Wed, Sep 25, 2013 at 3:35 PM, Tom Gundersen t...@jklm.no wrote:
 *) With /boot on fat, 'add' fails for me due to not being able to use
 cp --preserve. How is this meant to work (or was it just not tested
 on fat)? Dropping --preserve makes it work for me.

 Hmm, no problems here:
 # cp --preserve /etc/hostname /boot; echo $?
 0

 # rpm -q coreutils
 coreutils-8.21-11.fc19.x86_64

Hm, interesting. I'll figure out what's going wrong here.

 With the below kernel patch make
 install just works.

 It's on our TODO list for long, but we haven't done it so far.

Ok. Good to know.

 Was there a reason for the different interface,
 or would you be open to adding compatibility with the kernel script?

 What would compat mean? A symlink to kernel-install from installkernel
 and checking argv[0]?

Precisely.

 (I could of course just ship a shim script, but I'd rather not).

 We thought of letting the kernel Makefile look for kernel-install
 first and fall back to installkernel, but we haven't look into details
 so far.

That would be fine for the future, but it would still be useful to
make stuff just work with old kernel builds for doing bisects and
stuff like that.

-t
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] kernel-install questions

2013-09-25 Thread Marc-Antoine Perennou
On 26 September 2013 00:20, Tom Gundersen t...@jklm.no wrote:
 On Wed, Sep 25, 2013 at 4:37 PM, Kay Sievers k...@vrfy.org wrote:
 On Wed, Sep 25, 2013 at 3:35 PM, Tom Gundersen t...@jklm.no wrote:
 *) With /boot on fat, 'add' fails for me due to not being able to use
 cp --preserve. How is this meant to work (or was it just not tested
 on fat)? Dropping --preserve makes it work for me.

 Hmm, no problems here:
 # cp --preserve /etc/hostname /boot; echo $?
 0

 # rpm -q coreutils
 coreutils-8.21-11.fc19.x86_64

 Hm, interesting. I'll figure out what's going wrong here.



FYI, here it fails with my kernel compiled as standards user and
kernel-install ran as root.
If I first copy the ekrnel as root and then kernel-install my
root-owned copy, it works.

 With the below kernel patch make
 install just works.

 It's on our TODO list for long, but we haven't done it so far.

 Ok. Good to know.

 Was there a reason for the different interface,
 or would you be open to adding compatibility with the kernel script?

 What would compat mean? A symlink to kernel-install from installkernel
 and checking argv[0]?

 Precisely.

 (I could of course just ship a shim script, but I'd rather not).

 We thought of letting the kernel Makefile look for kernel-install
 first and fall back to installkernel, but we haven't look into details
 so far.

 That would be fine for the future, but it would still be useful to
 make stuff just work with old kernel builds for doing bisects and
 stuff like that.

 -t
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] kernel-install questions

2013-09-25 Thread Colin Guthrie
'Twas brillig, and Marc-Antoine Perennou at 25/09/13 16:26 did gyre and
gimble:
 On 26 September 2013 00:20, Tom Gundersen t...@jklm.no wrote:
 On Wed, Sep 25, 2013 at 4:37 PM, Kay Sievers k...@vrfy.org wrote:
 On Wed, Sep 25, 2013 at 3:35 PM, Tom Gundersen t...@jklm.no wrote:
 *) With /boot on fat, 'add' fails for me due to not being able to use
 cp --preserve. How is this meant to work (or was it just not tested
 on fat)? Dropping --preserve makes it work for me.

 Hmm, no problems here:
 # cp --preserve /etc/hostname /boot; echo $?
 0

 # rpm -q coreutils
 coreutils-8.21-11.fc19.x86_64

 Hm, interesting. I'll figure out what's going wrong here.

 
 
 FYI, here it fails with my kernel compiled as standards user and
 kernel-install ran as root.
 If I first copy the ekrnel as root and then kernel-install my
 root-owned copy, it works.

Yup, same here:
[root@jimmy ~]# cp --preserve /etc/hostname /boot; echo $?
0
[root@jimmy ~]# cp --preserve /home/colin/.bashrc /boot/test; echo $?
cp: failed to preserve ownership for ‘/boot/test’: Operation not permitted
1

So it only works if the source file is already owned by root.

(coreutils 8.21 also)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] kernel-install questions

2013-09-25 Thread Kay Sievers
On Wed, Sep 25, 2013 at 9:50 PM, Colin Guthrie gm...@colin.guthr.ie wrote:

 [root@jimmy ~]# cp --preserve /etc/hostname /boot; echo $?
 0
 [root@jimmy ~]# cp --preserve /home/colin/.bashrc /boot/test; echo $?
 cp: failed to preserve ownership for ‘/boot/test’: Operation not permitted
 1

 So it only works if the source file is already owned by root.

Ah, I see. Makes sense.

Not sure what's the best behaviour here, maybe we should just make
everything 0600 root:root by default?

People with weird assumptions can probably just plug-in their own
snippet and post-process the stuff as they need.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel