* [PATCH] ikconfig - resolve rebuild permissions @ 2003-09-04 18:31 Stephen Hemminger 2003-09-04 19:13 ` Sam Ravnborg 0 siblings, 1 reply; 5+ messages in thread From: Stephen Hemminger @ 2003-09-04 18:31 UTC (permalink / raw) To: Linus Torvalds, Randy.Dunlap; +Cc: linux-kernel If ikconfig is enabled then the following annoying permission problem happens. $ make $ su # make install $ make make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/asm-i386/asm_offsets.h CHK include/linux/compile.h CC kernel/configs.o mv: overwrite `kernel/configs.o', overriding mode 0644? This patch fixes it by removing the configs.o file when needed. It applies against 2.6.0-test4 but is also needed even with the ikconfig patch already in -mm5 diff -Nru a/kernel/Makefile b/kernel/Makefile --- a/kernel/Makefile Thu Sep 4 10:33:49 2003 +++ b/kernel/Makefile Thu Sep 4 10:33:49 2003 @@ -36,5 +36,6 @@ $(obj)/ikconfig.h: scripts/mkconfigs .config Makefile FORCE $(call if_changed,ikconfig) + @rm -f $(obj)/configs.o $(obj)/configs.o: $(obj)/ikconfig.h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ikconfig - resolve rebuild permissions 2003-09-04 18:31 [PATCH] ikconfig - resolve rebuild permissions Stephen Hemminger @ 2003-09-04 19:13 ` Sam Ravnborg 2003-09-05 1:08 ` Randy.Dunlap 2003-09-05 1:48 ` Randy.Dunlap 0 siblings, 2 replies; 5+ messages in thread From: Sam Ravnborg @ 2003-09-04 19:13 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Linus Torvalds, Randy.Dunlap, linux-kernel On Thu, Sep 04, 2003 at 11:31:33AM -0700, Stephen Hemminger wrote: > This patch fixes it by removing the configs.o file when > needed. A better approach would be to remove the need for compile.h from configs.c. See attached patch for the makefile change. It just took the relevant part from mk_compile and used it in the Makefile. Example only - I expect Randy to integrate it properly. But what you see is also a more fundamental problem. Should we allow the kernel to be build by two distinct users - in this case a normal user and root. We could check for this early, and stop. But it would require too many changes in the top-level Makefile for my taste. Sam ===== kernel/Makefile 1.33 vs edited ===== --- 1.33/kernel/Makefile Mon Sep 1 01:13:58 2003 +++ edited/kernel/Makefile Thu Sep 4 21:05:29 2003 @@ -19,6 +19,7 @@ obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o obj-$(CONFIG_COMPAT) += compat.o obj-$(CONFIG_IKCONFIG) += configs.o +CFLAGS_configs.o = -DLINUX_COMPILER="$(shell $(CC) -v 2>&1 | tail -n 1)" ifneq ($(CONFIG_IA64),y) # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ikconfig - resolve rebuild permissions 2003-09-04 19:13 ` Sam Ravnborg @ 2003-09-05 1:08 ` Randy.Dunlap 2003-09-05 1:22 ` Randy.Dunlap 2003-09-05 1:48 ` Randy.Dunlap 1 sibling, 1 reply; 5+ messages in thread From: Randy.Dunlap @ 2003-09-05 1:08 UTC (permalink / raw) To: sam; +Cc: shemminger, torvalds, linux-kernel > On Thu, Sep 04, 2003 at 11:31:33AM -0700, Stephen Hemminger wrote: >> This patch fixes it by removing the configs.o file when >> needed. > > A better approach would be to remove the need for compile.h from > configs.c. See attached patch for the makefile change. > It just took the relevant part from mk_compile and > used it in the Makefile. > Example only - I expect Randy to integrate it properly. configs.o also wants UTS_RELEASE from compile.h, and I really dislike generating the same data in multiple places, so I prefer to continue to use compile.h. I'll see about other options or using Steve's patch. Thanks, ~Randy > ===== kernel/Makefile 1.33 vs edited ===== > --- 1.33/kernel/Makefile Mon Sep 1 01:13:58 2003 > +++ edited/kernel/Makefile Thu Sep 4 21:05:29 2003 > @@ -19,6 +19,7 @@ > obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o > obj-$(CONFIG_COMPAT) += compat.o > obj-$(CONFIG_IKCONFIG) += configs.o > +CFLAGS_configs.o = -DLINUX_COMPILER="$(shell $(CC) -v 2>&1 | tail -n 1)" > > ifneq ($(CONFIG_IA64),y) > # According to Alan Modra <alan@linuxcare.com.au>, the > -fno-omit-frame-pointer is > - ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ikconfig - resolve rebuild permissions 2003-09-05 1:08 ` Randy.Dunlap @ 2003-09-05 1:22 ` Randy.Dunlap 0 siblings, 0 replies; 5+ messages in thread From: Randy.Dunlap @ 2003-09-05 1:22 UTC (permalink / raw) To: sam; +Cc: shemminger, torvalds, linux-kernel >> On Thu, Sep 04, 2003 at 11:31:33AM -0700, Stephen Hemminger wrote: >>> This patch fixes it by removing the configs.o file when >>> needed. >> >> A better approach would be to remove the need for compile.h from >> configs.c. See attached patch for the makefile change. >> It just took the relevant part from mk_compile and >> used it in the Makefile. >> Example only - I expect Randy to integrate it properly. > > configs.o also wants UTS_RELEASE from compile.h, and UTS_RELEASE is not from compile.h.... so Sam's patch looks reasonable, working on it now. > I really dislike generating the same data in multiple places, > so I prefer to continue to use compile.h. > I'll see about other options or using Steve's patch. ~Randy ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ikconfig - resolve rebuild permissions 2003-09-04 19:13 ` Sam Ravnborg 2003-09-05 1:08 ` Randy.Dunlap @ 2003-09-05 1:48 ` Randy.Dunlap 1 sibling, 0 replies; 5+ messages in thread From: Randy.Dunlap @ 2003-09-05 1:48 UTC (permalink / raw) To: Sam Ravnborg; +Cc: shemminger, torvalds, linux-kernel On Thu, 4 Sep 2003 21:13:53 +0200 Sam Ravnborg <sam@ravnborg.org> wrote: | On Thu, Sep 04, 2003 at 11:31:33AM -0700, Stephen Hemminger wrote: | > This patch fixes it by removing the configs.o file when | > needed. | | A better approach would be to remove the need for compile.h from | configs.c. See attached patch for the makefile change. | It just took the relevant part from mk_compile and | used it in the Makefile. | Example only - I expect Randy to integrate it properly. Steve, can you test this? I don't have/see the problem. Anyway, configs.c no longer uses compile.h with this patch, so hopefully this will fix it. Thanks for the patch, Sam. This patch is against 2.6.0-test4-current of 2003-09-04 evening PST. -- ~Randy patch_name: no_compile_h.patch patch_version: 2003-09-04.18:36:25 author: Randy.Dunlap <rddunlap@osdl.org> description: don't use compile.h in kernel/configs.c product: Linux product_versions: 260-904 diffstat: = kernel/Makefile | 1 + kernel/configs.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(- diff -Naur ./kernel/Makefile~compile ./kernel/Makefile --- ./kernel/Makefile~compile 2003-09-04 16:34:58.000000000 -0700 +++ ./kernel/Makefile 2003-09-04 18:23:07.000000000 -0700 @@ -20,6 +20,7 @@ obj-$(CONFIG_COMPAT) += compat.o obj-$(CONFIG_IKCONFIG) += configs.o obj-$(CONFIG_IKCONFIG_PROC) += configs.o +CFLAGS_configs.o = -DLINUX_COMPILER="$(shell $(CC) -v 2>&1 | tail -n 1)" ifneq ($(CONFIG_IA64),y) # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is diff -Naur ./kernel/configs.c~compile ./kernel/configs.c --- ./kernel/configs.c~compile 2003-09-04 16:34:58.000000000 -0700 +++ ./kernel/configs.c 2003-09-04 18:30:40.000000000 -0700 @@ -28,8 +28,8 @@ #include <linux/module.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> +#include <linux/stringify.h> #include <linux/init.h> -#include <linux/compile.h> #include <linux/version.h> #include <asm/uaccess.h> @@ -81,7 +81,7 @@ { seq_printf(seq, "Kernel: %s\nCompiler: %s\nVersion_in_Makefile: %s\n", - ikconfig_build_info, LINUX_COMPILER, UTS_RELEASE); + ikconfig_build_info, __stringify(LINUX_COMPILER), UTS_RELEASE); return 0; } ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-05 1:50 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-09-04 18:31 [PATCH] ikconfig - resolve rebuild permissions Stephen Hemminger 2003-09-04 19:13 ` Sam Ravnborg 2003-09-05 1:08 ` Randy.Dunlap 2003-09-05 1:22 ` Randy.Dunlap 2003-09-05 1:48 ` Randy.Dunlap
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®