* Re: "make rpm" failed with parameter "--scm-only" [not found] <A24AE1FFE7AEC5489F83450EE98351BF1BD77643B1@shsmsx502.ccr.corp.intel.com> @ 2010-07-15 8:42 ` Michal Marek 2010-07-20 13:28 ` Michal Marek 0 siblings, 1 reply; 4+ messages in thread From: Michal Marek @ 2010-07-15 8:42 UTC (permalink / raw) To: Zheng, Jiajia; +Cc: Guy, Wey-Yi W, linux-kernel, linux-kbuild On Thu, Jul 15, 2010 at 11:23:19AM +0800, Zheng, Jiajia wrote: > Hi Marek, > > This is jiajia, Intel Wireless QA. > When I was compiling iwlwifi-2.6, "make rpm" failed. > > # make rpm > make clean > set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl > /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > /usr/src/iwlwifi-2.6/.scmversion > cat: .scmversion: input file is output file > make[1]: *** [rpm] Error 1 > make: *** [rpm] Error 2 > > If the "--scm-only" parameter is removed from iwlwifi-2.6/scripts/package/Makefile, "make rpm" works. > > I noticed that it was introduced by commit#09155120cf0ffe6f0c8aba3aa625831405b65996. Ah crap :-/. The following patch should fix it. BTW, if you remove the --scm-only option and use the LOCALVERSION mechanism, then the resulting kernel release string will have the localversion twice. >From 1df62f9175665a0573fe9708cb8604584a9b7bd5 Mon Sep 17 00:00:00 2001 From: Michal Marek <mmarek@suse.cz> Date: Thu, 15 Jul 2010 10:36:37 +0200 Subject: [PATCH] kbuild: Fix make rpm make rpm was broken by commit 0915512: make clean set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > /usr/src/iwlwifi-2.6/.scmversion cat: .scmversion: input file is output file make[1]: *** [rpm] Error 1 Reported-by: "Zheng, Jiajia" <jiajia.zheng@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz> diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 3a681ef..d2c29b6 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE fi $(MAKE) clean $(PREV) ln -sf $(srctree) $(KERNELPATH) - $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion + $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. $(PREV) rm $(KERNELPATH) rm -f $(objtree)/.scmversion diff --git a/scripts/setlocalversion b/scripts/setlocalversion index d6a866e..951b067 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -10,13 +10,13 @@ # usage() { - echo "Usage: $0 [--scm-only] [srctree]" >&2 + echo "Usage: $0 [--save-scmversion] [srctree]" >&2 exit 1 } scm_only=false srctree=. -if test "$1" = "--scm-only"; then +if test "$1" = "--save-scmversion"; then scm_only=true shift fi @@ -131,7 +131,10 @@ collect_files() } if $scm_only; then - scm_version + if test ! -e .scmversion; then + res=$(scm_version) + echo "$res" >.scmversion + fi exit fi ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: "make rpm" failed with parameter "--scm-only" 2010-07-15 8:42 ` "make rpm" failed with parameter "--scm-only" Michal Marek @ 2010-07-20 13:28 ` Michal Marek 2010-07-21 1:30 ` Zheng, Jiajia 0 siblings, 1 reply; 4+ messages in thread From: Michal Marek @ 2010-07-20 13:28 UTC (permalink / raw) To: Zheng, Jiajia; +Cc: Guy, Wey-Yi W, linux-kernel, linux-kbuild On Thu, Jul 15, 2010 at 10:42:33AM +0200, Michal Marek wrote: > On Thu, Jul 15, 2010 at 11:23:19AM +0800, Zheng, Jiajia wrote: > > # make rpm > > make clean > > set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl > > /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > /usr/src/iwlwifi-2.6/.scmversion > > cat: .scmversion: input file is output file > > make[1]: *** [rpm] Error 1 > > make: *** [rpm] Error 2 > > Ah crap :-/. The following patch should fix it. BTW, if you remove the > --scm-only option and use the LOCALVERSION mechanism, then the resulting > kernel release string will have the localversion twice. Hi jiajia, were you able to test the fix? I'd like to send it to Linus. Michal > From 1df62f9175665a0573fe9708cb8604584a9b7bd5 Mon Sep 17 00:00:00 2001 > From: Michal Marek <mmarek@suse.cz> > Date: Thu, 15 Jul 2010 10:36:37 +0200 > Subject: [PATCH] kbuild: Fix make rpm > > make rpm was broken by commit 0915512: > make clean > set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl > /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > > /usr/src/iwlwifi-2.6/.scmversion > cat: .scmversion: input file is output file > make[1]: *** [rpm] Error 1 > > Reported-by: "Zheng, Jiajia" <jiajia.zheng@intel.com> > Signed-off-by: Michal Marek <mmarek@suse.cz> > > diff --git a/scripts/package/Makefile b/scripts/package/Makefile > index 3a681ef..d2c29b6 100644 > --- a/scripts/package/Makefile > +++ b/scripts/package/Makefile > @@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE > fi > $(MAKE) clean > $(PREV) ln -sf $(srctree) $(KERNELPATH) > - $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion > + $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion > $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. > $(PREV) rm $(KERNELPATH) > rm -f $(objtree)/.scmversion > diff --git a/scripts/setlocalversion b/scripts/setlocalversion > index d6a866e..951b067 100755 > --- a/scripts/setlocalversion > +++ b/scripts/setlocalversion > @@ -10,13 +10,13 @@ > # > > usage() { > - echo "Usage: $0 [--scm-only] [srctree]" >&2 > + echo "Usage: $0 [--save-scmversion] [srctree]" >&2 > exit 1 > } > > scm_only=false > srctree=. > -if test "$1" = "--scm-only"; then > +if test "$1" = "--save-scmversion"; then > scm_only=true > shift > fi > @@ -131,7 +131,10 @@ collect_files() > } > > if $scm_only; then > - scm_version > + if test ! -e .scmversion; then > + res=$(scm_version) > + echo "$res" >.scmversion > + fi > exit > fi > ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: "make rpm" failed with parameter "--scm-only" 2010-07-20 13:28 ` Michal Marek @ 2010-07-21 1:30 ` Zheng, Jiajia 2010-07-21 13:42 ` Michal Marek 0 siblings, 1 reply; 4+ messages in thread From: Zheng, Jiajia @ 2010-07-21 1:30 UTC (permalink / raw) To: Michal Marek Cc: Guy, Wey-Yi W, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Hi Michal, Michal Marek wrote: > On Thu, Jul 15, 2010 at 10:42:33AM +0200, Michal Marek wrote: >> On Thu, Jul 15, 2010 at 11:23:19AM +0800, Zheng, Jiajia wrote: >>> # make rpm >>> make clean >>> set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl >>> /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > >>> /usr/src/iwlwifi-2.6/.scmversion cat: .scmversion: input file is >>> output file >>> make[1]: *** [rpm] Error 1 >>> make: *** [rpm] Error 2 >> >> Ah crap :-/. The following patch should fix it. BTW, if you remove >> the --scm-only option and use the LOCALVERSION mechanism, then the >> resulting >> kernel release string will have the localversion twice. > > Hi jiajia, > > were you able to test the fix? I'd like to send it to Linus. > > Michal Thank you. This patch works OK. But I still saw below warnings. Of course, it was not introduced by your patch because that I saw such warnings before. Could you also take a look if there's some problem with Makefile? ... + make clean make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. + make -j4 make[2]: warning: -jN forced in submake: disabling jobserver mode. ... I got a RPM package: kernel-2.6.35rc5wl+-6.x86_64.rpm bests, jiajia > >> From 1df62f9175665a0573fe9708cb8604584a9b7bd5 Mon Sep 17 00:00:00 >> 2001 >> From: Michal Marek <mmarek@suse.cz> >> Date: Thu, 15 Jul 2010 10:36:37 +0200 >> Subject: [PATCH] kbuild: Fix make rpm >> >> make rpm was broken by commit 0915512: >> make clean >> set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl >> /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > >> /usr/src/iwlwifi-2.6/.scmversion >> cat: .scmversion: input file is output file >> make[1]: *** [rpm] Error 1 >> >> Reported-by: "Zheng, Jiajia" <jiajia.zheng@intel.com> >> Signed-off-by: Michal Marek <mmarek@suse.cz> >> >> diff --git a/scripts/package/Makefile b/scripts/package/Makefile >> index 3a681ef..d2c29b6 100644 >> --- a/scripts/package/Makefile >> +++ b/scripts/package/Makefile >> @@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE fi >> $(MAKE) clean >> $(PREV) ln -sf $(srctree) $(KERNELPATH) >> - $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > >> $(objtree)/.scmversion + $(CONFIG_SHELL) >> $(srctree)/scripts/setlocalversion --save-scmversion $(PREV) tar >> -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. >> $(PREV) rm $(KERNELPATH) rm -f $(objtree)/.scmversion >> diff --git a/scripts/setlocalversion b/scripts/setlocalversion >> index d6a866e..951b067 100755 >> --- a/scripts/setlocalversion >> +++ b/scripts/setlocalversion >> @@ -10,13 +10,13 @@ >> # >> >> usage() { >> - echo "Usage: $0 [--scm-only] [srctree]" >&2 >> + echo "Usage: $0 [--save-scmversion] [srctree]" >&2 exit 1 >> } >> >> scm_only=false >> srctree=. >> -if test "$1" = "--scm-only"; then >> +if test "$1" = "--save-scmversion"; then >> scm_only=true >> shift >> fi >> @@ -131,7 +131,10 @@ collect_files() >> } >> >> if $scm_only; then >> - scm_version >> + if test ! -e .scmversion; then >> + res=$(scm_version) >> + echo "$res" >.scmversion >> + fi >> exit >> fi ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "make rpm" failed with parameter "--scm-only" 2010-07-21 1:30 ` Zheng, Jiajia @ 2010-07-21 13:42 ` Michal Marek 0 siblings, 0 replies; 4+ messages in thread From: Michal Marek @ 2010-07-21 13:42 UTC (permalink / raw) To: Zheng, Jiajia Cc: Guy, Wey-Yi W, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org On 21.7.2010 03:30, Zheng, Jiajia wrote: > Michal Marek wrote: >> were you able to test the fix? I'd like to send it to Linus. >> > Thank you. This patch works OK. Thanks a lot for testing it. > But I still saw below warnings. Of course, it was not introduced by your patch because that I saw such warnings before. Could you also take a look if there's some problem with Makefile? > ... > + make clean > make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. I found the explanation in the make info page: `warning: jobserver unavailable: using -j1. Add `+' to parent make rule.' In order for `make' processes to communicate, the parent will pass information to the child. Since this could result in problems if the child process isn't actually a `make', the parent will only do this if it thinks the child is a `make'. The parent uses the normal algorithms to determine this (*note How the `MAKE' Variable Works: MAKE Variable.). If the makefile is constructed such that the parent doesn't know the child is a `make' process, then the child will receive only part of the information necessary. [...] Which is our case: The parent make only sees the rpmbuild call. The fix would probably be to clear all make environment variables before running rpmbuild. > + make -j4 > make[2]: warning: -jN forced in submake: disabling jobserver mode. Another symptom of the same problem. > I got a RPM package: kernel-2.6.35rc5wl+-6.x86_64.rpm Great :). Michal ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-21 13:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <A24AE1FFE7AEC5489F83450EE98351BF1BD77643B1@shsmsx502.ccr.corp.intel.com>
2010-07-15 8:42 ` "make rpm" failed with parameter "--scm-only" Michal Marek
2010-07-20 13:28 ` Michal Marek
2010-07-21 1:30 ` Zheng, Jiajia
2010-07-21 13:42 ` Michal Marek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).