lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Jul 2010 15:28:51 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	"Zheng, Jiajia" <jiajia.zheng@...el.com>
Cc:	"Guy, Wey-Yi W" <wey-yi.w.guy@...el.com>,
	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: Re: "make rpm" failed with parameter "--scm-only"

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@...e.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@...el.com>
> Signed-off-by: Michal Marek <mmarek@...e.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
>  
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ