All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Olaf Hering <olaf@aepfle.de>, xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH 1/5] tools/mkrpm: improve version.release handling
Date: Mon, 23 Mar 2015 16:15:58 +0000	[thread overview]
Message-ID: <55103C3E.3000302@eu.citrix.com> (raw)
In-Reply-To: <1426872279-5001-2-git-send-email-olaf@aepfle.de>

On 03/20/2015 05:24 PM, Olaf Hering wrote:
> An increasing version and/or release number helps to update existing
> packages without --force as in "rpm Uvh --force xen.rpm". Instead its
> possible to do "rpm -Fvh *.rpm" to update only already installed
> packages.
> 
> The usage of --force disables essentials checks such as file conflict
> detection. As a result the new xen.rpm may overwrite files owned by
> other packages.
> 
> With the current way of calculating version-release it is difficult to
> get an increasing release number into the spec file. The release is
> always zero unless "make make XEN_VENDORVERSION=`date +.%s`" is used,
> which has the bad side effect that xen.gz always gets a different
> filename every time.
> 
> Since the value of release has no meaning its fine to have an ever
> increasing number. This could be either the number of seconds (+%s), or
> some representation which could mean something to a human. The change
> uses a representation of date+time.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>

Hey Olaf,

Sorry for not getting back to you with this before.

I applied this patch, and the name came out looking like this:

xen-4.6_unstable-20150323160547.x86_64.rpm

I'm not really happy with having the massive number show up
automatically when anyone makes an rpm.  What would you think about
adding a variable where you could set this as part of the build process?
 e.g.,
  XEN_RPM_RELEASE="$(date +%Y%m%d%H%M%S)" make rpmball

 -George

> ---
>  tools/misc/mkrpm | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
> index 9b8c6d9..b54de24 100644
> --- a/tools/misc/mkrpm
> +++ b/tools/misc/mkrpm
> @@ -13,13 +13,11 @@ fi
>  
>  xenroot="$1"
>  
> -# rpmbuild doesn't like dashes in the version; break it down into
> -# version and release.  Default to "0" if there isn't a release.
> -v=(${2/-/ })
> -version=${v[0]}
> -release=${v[1]}
> -
> -[[ -n "$release" ]] || release="0"
> +# rpmbuild doesn't support dashes in the version;
> +version=${2//-/_}
> +# Use an ever increasing release number for this devel pkg.
> +# This makes sure rpm -Fvh xen$PKG_SUFFIX.rpm can be updated wihtout --force.
> +release="`date +%Y%m%d%H%M%S`"
>  
>  cd $xenroot
>  
> 

  reply	other threads:[~2015-03-23 16:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 17:24 [PATCH 0/5] tools: various changes Olaf Hering
2015-03-20 17:24 ` [PATCH 1/5] tools/mkrpm: improve version.release handling Olaf Hering
2015-03-23 16:15   ` George Dunlap [this message]
2015-03-23 17:05     ` Olaf Hering
2015-03-23 17:52     ` Olaf Hering
2015-03-23 18:07       ` George Dunlap
2015-03-23 18:49         ` Olaf Hering
2015-03-23 19:00           ` George Dunlap
2015-03-24 12:15             ` Olaf Hering
2015-03-20 17:24 ` [PATCH 2/5] tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file Olaf Hering
2015-03-24 15:53   ` Ian Campbell
2015-03-20 17:24 ` [PATCH 3/5] INSTALL: mention variables for reproducible builds Olaf Hering
2015-03-24 15:55   ` Ian Campbell
2015-03-25  8:49     ` Olaf Hering
2015-03-25 10:55       ` Ian Campbell
2015-03-20 17:24 ` [PATCH 4/5] hvmloader: add knob for fixed SMBIOS date string Olaf Hering
2015-03-23  8:36   ` Jan Beulich
2015-03-23  9:15     ` Olaf Hering
2015-03-23 12:24       ` Jan Beulich
2015-03-23 12:25   ` Jan Beulich
2015-03-20 17:24 ` [PATCH 5/5] hvmloader: add knob for fixed VGABIOS " Olaf Hering
2015-03-24 15:57   ` Ian Campbell
2015-03-25  8:46     ` Olaf Hering
2015-03-25 10:55       ` Ian Campbell

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=55103C3E.3000302@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=olaf@aepfle.de \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.