xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/mkrpm: allow custom rpm package name
@ 2014-07-28 10:19 Olaf Hering
  2014-07-30 13:08 ` George Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2014-07-28 10:19 UTC (permalink / raw)
  To: xen-devel
  Cc: george.dunlap, Olaf Hering, Ian Jackson, Ian Campbell,
	Stefano Stabellini

Even if xen is configured and compiled with different --prefix= so that
it operates entirely below $prefix, the resulting package from 'make
rpmball' is always called "xen.rpm".

Use an environment name to give a different name.
This can be used like this:

suffix=-bugN
prefix=/opx/xen/staging${suffix}
./configure --prefix=${prefix}
make rpmball XEN_RPMPKG_SUFFIX=${suffix} \
    BOOT_DIR=${prefix}/boot \
    CONFIG_DIR=${prefix}/etc \
    INITD_DIR=${prefix}/etc/init.d

The result will be "xen-bugN.rpm" instead of "xen.rpm". The benefit is that
many xen${suffix}.rpm packages can be installed at the same time.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---

To be really independent: the package has to be compiled with RPATH,
xencommons has to be started manually, and the udev rule for backend
drivers has to be hooked manually into the systems rules.d dir.

 tools/misc/mkrpm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
index a9aa5e2..70f6488 100644
--- a/tools/misc/mkrpm
+++ b/tools/misc/mkrpm
@@ -31,7 +31,7 @@ rm -rf rpm
 mkdir -p rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
 cat >rpm/SPECS/xen.spec <<EOF
 Summary: Xen development build, version $version
-Name: xen
+Name: xen$XEN_RPMPKG_SUFFIX
 Version: $version
 Release: $release
 License: GPL

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/mkrpm: allow custom rpm package name
  2014-07-28 10:19 [PATCH] tools/mkrpm: allow custom rpm package name Olaf Hering
@ 2014-07-30 13:08 ` George Dunlap
  2014-07-30 13:21   ` Olaf Hering
  2014-07-30 13:42   ` Ian Campbell
  0 siblings, 2 replies; 7+ messages in thread
From: George Dunlap @ 2014-07-30 13:08 UTC (permalink / raw)
  To: Olaf Hering, xen-devel; +Cc: Ian Jackson, Ian Campbell, Stefano Stabellini

On 07/28/2014 11:19 AM, Olaf Hering wrote:
> Even if xen is configured and compiled with different --prefix= so that
> it operates entirely below $prefix, the resulting package from 'make
> rpmball' is always called "xen.rpm".
>
> Use an environment name to give a different name.
> This can be used like this:
>
> suffix=-bugN
> prefix=/opx/xen/staging${suffix}
> ./configure --prefix=${prefix}
> make rpmball XEN_RPMPKG_SUFFIX=${suffix} \
>      BOOT_DIR=${prefix}/boot \
>      CONFIG_DIR=${prefix}/etc \
>      INITD_DIR=${prefix}/etc/init.d
>
> The result will be "xen-bugN.rpm" instead of "xen.rpm". The benefit is that
> many xen${suffix}.rpm packages can be installed at the same time.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

This sounds useful, but would it make more sense to name it 
"XEN_PKG_SUFFIX" (i.e., not specify RPM)?  That way some motivated 
person (not necessarily you) could add the same functionality to the 
mkdeb script.

  -George

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/mkrpm: allow custom rpm package name
  2014-07-30 13:08 ` George Dunlap
@ 2014-07-30 13:21   ` Olaf Hering
  2014-07-30 13:42   ` Ian Campbell
  1 sibling, 0 replies; 7+ messages in thread
From: Olaf Hering @ 2014-07-30 13:21 UTC (permalink / raw)
  To: George Dunlap; +Cc: Stefano Stabellini, Ian Jackson, Ian Campbell, xen-devel

On Wed, Jul 30, George Dunlap wrote:

> This sounds useful, but would it make more sense to name it "XEN_PKG_SUFFIX"
> (i.e., not specify RPM)?  That way some motivated person (not necessarily
> you) could add the same functionality to the mkdeb script.

Good idea. I will resend with XEN_PKG_SUFFIX.

Olaf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/mkrpm: allow custom rpm package name
  2014-07-30 13:08 ` George Dunlap
  2014-07-30 13:21   ` Olaf Hering
@ 2014-07-30 13:42   ` Ian Campbell
  2014-07-30 14:06     ` Olaf Hering
  1 sibling, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-07-30 13:42 UTC (permalink / raw)
  To: George Dunlap; +Cc: Olaf Hering, Stefano Stabellini, Ian Jackson, xen-devel

On Wed, 2014-07-30 at 14:08 +0100, George Dunlap wrote:
> On 07/28/2014 11:19 AM, Olaf Hering wrote:
> > Even if xen is configured and compiled with different --prefix= so that
> > it operates entirely below $prefix, the resulting package from 'make
> > rpmball' is always called "xen.rpm".
> >
> > Use an environment name to give a different name.
> > This can be used like this:
> >
> > suffix=-bugN
> > prefix=/opx/xen/staging${suffix}
> > ./configure --prefix=${prefix}
> > make rpmball XEN_RPMPKG_SUFFIX=${suffix} \
> >      BOOT_DIR=${prefix}/boot \
> >      CONFIG_DIR=${prefix}/etc \
> >      INITD_DIR=${prefix}/etc/init.d
> >
> > The result will be "xen-bugN.rpm" instead of "xen.rpm". The benefit is that
> > many xen${suffix}.rpm packages can be installed at the same time.

I thought RPM allowed multiple packages with the same name (but
different versions) to be installed at the same time already. e.g. the
kernel packages on such systems are just "kernel", in contrast with
Debian which encodes the uname-r into the package name to allow
coinstallation.

Am I misremembering?

> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> 
> This sounds useful, but would it make more sense to name it 
> "XEN_PKG_SUFFIX" (i.e., not specify RPM)?  That way some motivated 
> person (not necessarily you) could add the same functionality to the 
> mkdeb script.
> 
>   -George
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/mkrpm: allow custom rpm package name
  2014-07-30 13:42   ` Ian Campbell
@ 2014-07-30 14:06     ` Olaf Hering
  2014-07-30 15:02       ` George Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2014-07-30 14:06 UTC (permalink / raw)
  To: Ian Campbell; +Cc: George Dunlap, Stefano Stabellini, Ian Jackson, xen-devel

On Wed, Jul 30, Ian Campbell wrote:

> I thought RPM allowed multiple packages with the same name (but
> different versions) to be installed at the same time already. e.g. the
> kernel packages on such systems are just "kernel", in contrast with
> Debian which encodes the uname-r into the package name to allow
> coinstallation.
> 
> Am I misremembering?

Sure. Its very cumbersome to update a single such xen.rpm. And,
depending on the branch, they will be all named xen-4.5-0.rpm. After a
'zypper patch' installs a security update for Xen my private xen.rpm
packages will be all gone.

I have a quick look at mkdeb, it looks like the same change could be
applied there. But I dont run Debian so its hard to tell if that
approach would work as expected.

diff --git a/tools/misc/mkdeb b/tools/misc/mkdeb
index 3bbf881..db7a003 100644
--- a/tools/misc/mkdeb
+++ b/tools/misc/mkdeb
@@ -33,8 +33,8 @@ fi
 # Fill in the debian boilerplate
 mkdir -p deb/DEBIAN
 cat >deb/DEBIAN/control <<EOF
-Package: xen-upstream
-Source: xen-upstream
+Package: xen-upstream$XEN_PKG_SUFFIX
+Source: xen-upstream$XEN_PKG_SUFFIX
 Version: $version
 Architecture: $arch
 Maintainer: Unmaintained snapshot


Olaf

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/mkrpm: allow custom rpm package name
  2014-07-30 14:06     ` Olaf Hering
@ 2014-07-30 15:02       ` George Dunlap
  2014-07-30 15:34         ` Olaf Hering
  0 siblings, 1 reply; 7+ messages in thread
From: George Dunlap @ 2014-07-30 15:02 UTC (permalink / raw)
  To: Olaf Hering, Ian Campbell; +Cc: Stefano Stabellini, Ian Jackson, xen-devel

On 07/30/2014 03:06 PM, Olaf Hering wrote:
> On Wed, Jul 30, Ian Campbell wrote:
>
>> I thought RPM allowed multiple packages with the same name (but
>> different versions) to be installed at the same time already. e.g. the
>> kernel packages on such systems are just "kernel", in contrast with
>> Debian which encodes the uname-r into the package name to allow
>> coinstallation.
>>
>> Am I misremembering?
>
> Sure. Its very cumbersome to update a single such xen.rpm. And,
> depending on the branch, they will be all named xen-4.5-0.rpm. After a
> 'zypper patch' installs a security update for Xen my private xen.rpm
> packages will be all gone.
>
> I have a quick look at mkdeb, it looks like the same change could be
> applied there. But I dont run Debian so its hard to tell if that
> approach would work as expected.

So my recent "make src-tarball" patches I had two build targets: one 
where it would make a tarball with a "release-like" name based on "make 
-C xen version" (e.g., xen-4.4.1.tar.gz), and another where it would 
make a tarball with a "developer-like" version based on "git describe". 
  You might think about adding an option like that to the rpm / deb make 
targets as well, so you don't have to invent your own name / remember 
what changeset a particular rpm is based on.

  -George

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/mkrpm: allow custom rpm package name
  2014-07-30 15:02       ` George Dunlap
@ 2014-07-30 15:34         ` Olaf Hering
  0 siblings, 0 replies; 7+ messages in thread
From: Olaf Hering @ 2014-07-30 15:34 UTC (permalink / raw)
  To: George Dunlap; +Cc: Stefano Stabellini, Ian Jackson, Ian Campbell, xen-devel

On Wed, Jul 30, George Dunlap wrote:

> So my recent "make src-tarball" patches I had two build targets: one where
> it would make a tarball with a "release-like" name based on "make -C xen
> version" (e.g., xen-4.4.1.tar.gz), and another where it would make a tarball
> with a "developer-like" version based on "git describe".  You might think
> about adding an option like that to the rpm / deb make targets as well, so
> you don't have to invent your own name / remember what changeset a
> particular rpm is based on.

Are you saying there should be a 'make distpkg GITREV=<rev|tag>'?

For me the "name info" is in my wrapper script, which sets both
--prefix=/some/xen/suffix during configure and the package name during
make. The rpm release is just 'date +%s' to make 'rpm -F *.rpm' easier.
The changeset info is most likely bogus due to repeated 'git rebase'.

Olaf

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-07-30 15:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 10:19 [PATCH] tools/mkrpm: allow custom rpm package name Olaf Hering
2014-07-30 13:08 ` George Dunlap
2014-07-30 13:21   ` Olaf Hering
2014-07-30 13:42   ` Ian Campbell
2014-07-30 14:06     ` Olaf Hering
2014-07-30 15:02       ` George Dunlap
2014-07-30 15:34         ` Olaf Hering

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).