From: Josh Hunt <josh@scalex86.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
kiran@scalex86.org, mingo@elte.hu
Subject: Re: [PATCH] Fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree
Date: Mon, 16 Feb 2009 16:10:49 -0800 [thread overview]
Message-ID: <20090217001049.GA16713@localhost.localdomain> (raw)
In-Reply-To: <20090215090301.GA29048@uranus.ravnborg.org>
On Sun, Feb 15, 2009 at 10:03:01AM +0100, Sam Ravnborg wrote:
>
> I had to hand apply your patch and ended up with the following.
Sorry, not sure what happened there.
>
> Changes:
> - renamed from autoversion to scmversion
> - simpler logic in top-level Makefile
> - removed "set -e;" in scripts/package/Makefile - they are not needed
>
> Please test.
The changes look good. All tested and works fine.
I'm still a little new to this - let me know if I need to resubmit
with your changes or if I need to provide anything else.
Thanks
Josh
>
> diff --git a/Makefile b/Makefile
> index 22d7584..3824446 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -903,12 +903,18 @@ localver = $(subst $(space),, $(string) \
> # and if the SCM is know a tag from the SCM is appended.
> # The appended tag is determined by the SCM used.
> #
> -# Currently, only git is supported.
> -# Other SCMs can edit scripts/setlocalversion and add the appropriate
> -# checks as needed.
> +# .scmversion is used when generating rpm packages so we do not loose
> +# the version information from the SCM when we do the build of the kernel
> +# from the copied source
> ifdef CONFIG_LOCALVERSION_AUTO
> - _localver-auto = $(shell $(CONFIG_SHELL) \
> - $(srctree)/scripts/setlocalversion $(srctree))
> +
> +ifeq ($(wildcard .scmversion),)
> + _localver-auto = $(shell $(CONFIG_SHELL) \
> + $(srctree)/scripts/setlocalversion $(srctree))
> +else
> + _localver-auto = $(shell cat .scmversion 2> /dev/null)
> +endif
> +
> localver-auto = $(LOCALVERSION)$(_localver-auto)
> endif
>
> diff --git a/scripts/package/Makefile b/scripts/package/Makefile
> index 8c6b7b0..fa4a0a1 100644
> --- a/scripts/package/Makefile
> +++ b/scripts/package/Makefile
> @@ -35,9 +35,10 @@ $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
> rpm-pkg rpm: $(objtree)/kernel.spec FORCE
> $(MAKE) clean
> $(PREV) ln -sf $(srctree) $(KERNELPATH)
> + $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion > $(objtree)/.scmversion
> $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
> $(PREV) rm $(KERNELPATH)
> -
> + rm -f $(objtree)/.scmversion
> set -e; \
> $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
> set -e; \
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2009-02-17 0:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 18:16 [PATCH] Fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree Josh Hunt
2009-02-15 9:03 ` Sam Ravnborg
2009-02-17 0:10 ` Josh Hunt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090217001049.GA16713@localhost.localdomain \
--to=josh@scalex86.org \
--cc=kiran@scalex86.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox