* Re: [PATCH] Add a "make rpmball" target
2014-03-03 14:59 [PATCH] Add a "make rpmball" target George Dunlap
@ 2014-03-03 16:07 ` George Dunlap
2014-03-03 22:34 ` Don Slutz
2014-03-03 16:23 ` Olaf Hering
` (2 subsequent siblings)
3 siblings, 1 reply; 24+ messages in thread
From: George Dunlap @ 2014-03-03 16:07 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, M A Young
On 03/03/2014 02:59 PM, George Dunlap wrote:
> Build a simplistic dummy package, similar to "make debball", for
> developers on rpm-based systems.
>
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
I meant to add, I've tested this running as root, but not as a normal
user -- I'd appreciate it if someone could give it a try...
-George
> ---
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Ian Campbell <ian.campbell@citrix.com>
> CC: Dario Faggioli <dario.faggioli@citrix.com>
> ---
> Makefile | 7 +++++
> tools/misc/mkrpm | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 89 insertions(+)
> create mode 100644 tools/misc/mkrpm
>
> diff --git a/Makefile b/Makefile
> index 4e48457..75e845b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -152,6 +152,13 @@ world:
> debball: dist
> fakeroot sh ./tools/misc/mkdeb $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
>
> +# Package a build in an rpmball file, that is inside a .rpm format
> +# container to allow for easy and clean removal. This is not intended
> +# to be a full featured policy compliant .rpm package.
> +.PHONY: rpmball
> +rpmball: dist
> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
> +
> # clean doesn't do a kclean
> .PHONY: clean
> clean::
> diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
> new file mode 100644
> index 0000000..7d20788
> --- /dev/null
> +++ b/tools/misc/mkrpm
> @@ -0,0 +1,82 @@
> +#!/bin/sh
> +#
> +# mkrpm: package the dist/install output of a Xen build in an .rpm
> +#
> +# Takes 2 arguments, the path to the dist directory and the version
> +
> +set -e
> +
> +if test -z "$1" -o -z "$2" ; then
> + echo "usage: $0 path-to-XEN_ROOT xen-version"
> + exit 1
> +fi
> +
> +xenroot="$1"
> +
> +cd $xenroot
> +version=$2
> +
> +# Prepare the directory to package
> +cd dist
> +rm -rf rpm
> +
> +# Fill in the rpm boilerplate
> +mkdir -p rpm/SPEC
> +cat >rpm/SPEC/xen.spec <<EOF
> +Summary: Xen development build, version $version
> +Name: xen
> +Version: $version
> +Release: unstable
> +License: GPL
> +Group: System/Hypervisor
> +URL: http://xenbits.xenproject.org/xen.git
> +
> +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
> +%define __spec_install_post /usr/lib/rpm/brp-compress || :
> +%define debug_package %{nil}
> +
> +%description
> +This package contains the Xen hypervisor and associated tools, built
> +from a source tree. It is not a fully packaged and supported Xen, just
> +the output of a xen "make dist" wrapped in an .rpm to make it easy to
> +uninstall.
> +
> +%build
> +
> +%install
> +rm -rf \$RPM_BUILD_ROOT
> +mkdir -p \$RPM_BUILD_ROOT
> +cd %{_xenroot}
> +dist/install.sh \$RPM_BUILD_ROOT/
> +
> +cd \$RPM_BUILD_ROOT
> +
> +# Don't include xen-syms
> +rm -f boot/xen-syms*
> +# Remove all the "linked" xen-*.gz files
> +rm -f \$(find boot/ -type l)
> +# Rename the real xen.gz binary, if necessary.
> +if [[ ! -e boot/%{name}-%{version}-%{release}.gz ]] ; then
> + mv boot/xen-*.gz boot/%{name}-%{version}-%{release}.gz
> +fi
> +
> +
> +%clean
> +rm -rf \$RPM_BUILD_ROOT
> +
> +%files
> +%defattr(-,root,root,-)
> +/*
> +
> +%post
> +# Point xen.gz to the real binary.
> +cd /boot
> +ln -sf %{name}-%{version}-%{release}.gz xen.gz
> +EOF
> +
> +# Package it up
> +rpmbuild --define "_xenroot $xenroot" --define "_topdir $PWD/rpm" -bb rpm/SPEC/xen.spec
> +
> +# Tidy up after ourselves
> +mv rpm/RPMS/*/*.rpm .
> +rm -rf rpm
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 16:07 ` George Dunlap
@ 2014-03-03 22:34 ` Don Slutz
2014-03-03 23:08 ` Don Slutz
0 siblings, 1 reply; 24+ messages in thread
From: Don Slutz @ 2014-03-03 22:34 UTC (permalink / raw)
To: George Dunlap, xen-devel
Cc: Ian Jackson, Dario Faggioli, Ian Campbell, M A Young
On 03/03/14 11:07, George Dunlap wrote:
> On 03/03/2014 02:59 PM, George Dunlap wrote:
>> Build a simplistic dummy package, similar to "make debball", for
>> developers on rpm-based systems.
>>
>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>
> I meant to add, I've tested this running as root, but not as a normal user -- I'd appreciate it if someone could give it a try...
>
As a user I get:
...
sh ./tools/misc/mkrpm /home/don/xen $(make -C xen xenversion | grep -v :)
error: line 3: Illegal char '-' in: Version: 4.5-unstable
make: *** [rpmball] Error 1
-Don Slutz
> -George
>
>> ---
>> CC: Ian Jackson <ian.jackson@citrix.com>
>> CC: Ian Campbell <ian.campbell@citrix.com>
>> CC: Dario Faggioli <dario.faggioli@citrix.com>
>> ---
>> Makefile | 7 +++++
>> tools/misc/mkrpm | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 89 insertions(+)
>> create mode 100644 tools/misc/mkrpm
>>
>> diff --git a/Makefile b/Makefile
>> index 4e48457..75e845b 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -152,6 +152,13 @@ world:
>> debball: dist
>> fakeroot sh ./tools/misc/mkdeb $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
>> +# Package a build in an rpmball file, that is inside a .rpm format
>> +# container to allow for easy and clean removal. This is not intended
>> +# to be a full featured policy compliant .rpm package.
>> +.PHONY: rpmball
>> +rpmball: dist
>> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
>> +
>> # clean doesn't do a kclean
>> .PHONY: clean
>> clean::
>> diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
>> new file mode 100644
>> index 0000000..7d20788
>> --- /dev/null
>> +++ b/tools/misc/mkrpm
>> @@ -0,0 +1,82 @@
>> +#!/bin/sh
>> +#
>> +# mkrpm: package the dist/install output of a Xen build in an .rpm
>> +#
>> +# Takes 2 arguments, the path to the dist directory and the version
>> +
>> +set -e
>> +
>> +if test -z "$1" -o -z "$2" ; then
>> + echo "usage: $0 path-to-XEN_ROOT xen-version"
>> + exit 1
>> +fi
>> +
>> +xenroot="$1"
>> +
>> +cd $xenroot
>> +version=$2
>> +
>> +# Prepare the directory to package
>> +cd dist
>> +rm -rf rpm
>> +
>> +# Fill in the rpm boilerplate
>> +mkdir -p rpm/SPEC
>> +cat >rpm/SPEC/xen.spec <<EOF
>> +Summary: Xen development build, version $version
>> +Name: xen
>> +Version: $version
>> +Release: unstable
>> +License: GPL
>> +Group: System/Hypervisor
>> +URL: http://xenbits.xenproject.org/xen.git
>> +
>> +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
>> +%define __spec_install_post /usr/lib/rpm/brp-compress || :
>> +%define debug_package %{nil}
>> +
>> +%description
>> +This package contains the Xen hypervisor and associated tools, built
>> +from a source tree. It is not a fully packaged and supported Xen, just
>> +the output of a xen "make dist" wrapped in an .rpm to make it easy to
>> +uninstall.
>> +
>> +%build
>> +
>> +%install
>> +rm -rf \$RPM_BUILD_ROOT
>> +mkdir -p \$RPM_BUILD_ROOT
>> +cd %{_xenroot}
>> +dist/install.sh \$RPM_BUILD_ROOT/
>> +
>> +cd \$RPM_BUILD_ROOT
>> +
>> +# Don't include xen-syms
>> +rm -f boot/xen-syms*
>> +# Remove all the "linked" xen-*.gz files
>> +rm -f \$(find boot/ -type l)
>> +# Rename the real xen.gz binary, if necessary.
>> +if [[ ! -e boot/%{name}-%{version}-%{release}.gz ]] ; then
>> + mv boot/xen-*.gz boot/%{name}-%{version}-%{release}.gz
>> +fi
>> +
>> +
>> +%clean
>> +rm -rf \$RPM_BUILD_ROOT
>> +
>> +%files
>> +%defattr(-,root,root,-)
>> +/*
>> +
>> +%post
>> +# Point xen.gz to the real binary.
>> +cd /boot
>> +ln -sf %{name}-%{version}-%{release}.gz xen.gz
>> +EOF
>> +
>> +# Package it up
>> +rpmbuild --define "_xenroot $xenroot" --define "_topdir $PWD/rpm" -bb rpm/SPEC/xen.spec
>> +
>> +# Tidy up after ourselves
>> +mv rpm/RPMS/*/*.rpm .
>> +rm -rf rpm
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 22:34 ` Don Slutz
@ 2014-03-03 23:08 ` Don Slutz
2014-03-03 23:37 ` M A Young
0 siblings, 1 reply; 24+ messages in thread
From: Don Slutz @ 2014-03-03 23:08 UTC (permalink / raw)
To: Don Slutz, George Dunlap, xen-devel
Cc: Ian Jackson, Dario Faggioli, Ian Campbell, M A Young
On 03/03/14 17:34, Don Slutz wrote:
> On 03/03/14 11:07, George Dunlap wrote:
>> On 03/03/2014 02:59 PM, George Dunlap wrote:
>>> Build a simplistic dummy package, similar to "make debball", for
>>> developers on rpm-based systems.
>>>
>>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>>
>> I meant to add, I've tested this running as root, but not as a normal user -- I'd appreciate it if someone could give it a try...
>>
>
> As a user I get:
> ...
> sh ./tools/misc/mkrpm /home/don/xen $(make -C xen xenversion | grep -v :)
> error: line 3: Illegal char '-' in: Version: 4.5-unstable
> make: *** [rpmball] Error 1
>
> -Don Slutz
>
>
And applying a version "fix":
From 40c6b19abf44aaf7496b4c77536677fc0d463931 Mon Sep 17 00:00:00 2001
From: Don Slutz <dslutz@verizon.com>
Date: Mon, 3 Mar 2014 17:59:17 -0500
Subject: [PATCH] Adjust version
Signed-off-by: Don Slutz <dslutz@verizon.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 75e845b..6def25d 100644
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,7 @@ debball: dist
# to be a full featured policy compliant .rpm package.
.PHONY: rpmball
rpmball: dist
- sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
+ sh ./tools/misc/mkrpm $(XEN_ROOT) $$(git describe --long --dirty | tr - _)
# clean doesn't do a kclean
.PHONY: clean
--
1.7.11.7
Leads me to:
...
Wrote: /home/don/xen/dist/rpm/RPMS/x86_64/xen-4.4.0_rc5_45_g40c6b19-unstable.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.yagtO6
+ umask 022
+ cd /home/don/xen/dist/rpm/BUILD
+ rm -rf /home/don/xen/dist/rpm/BUILDROOT/xen-4.4.0_rc5_45_g40c6b19-unstable.x86_64
+ exit 0
dcs-xen-54:~/xen>ls -l /home/don/xen/dist/rpm/RPMS/x86_64/xen-4.4.0_rc5_45_g40c6b19-unstable.x86_64.rpm
ls: cannot access /home/don/xen/dist/rpm/RPMS/x86_64/xen-4.4.0_rc5_45_g40c6b19-unstable.x86_64.rpm: No such file or directory
dcs-xen-54:~/xen>find dist/rpm
find: `dist/rpm': No such file or directory
So after building the rpm you delete it.
-Don Slutz
>> -George
>>
>>> ---
>>> CC: Ian Jackson <ian.jackson@citrix.com>
>>> CC: Ian Campbell <ian.campbell@citrix.com>
>>> CC: Dario Faggioli <dario.faggioli@citrix.com>
>>> ---
>>> Makefile | 7 +++++
>>> tools/misc/mkrpm | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> 2 files changed, 89 insertions(+)
>>> create mode 100644 tools/misc/mkrpm
>>>
>>> diff --git a/Makefile b/Makefile
>>> index 4e48457..75e845b 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -152,6 +152,13 @@ world:
>>> debball: dist
>>> fakeroot sh ./tools/misc/mkdeb $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
>>> +# Package a build in an rpmball file, that is inside a .rpm format
>>> +# container to allow for easy and clean removal. This is not intended
>>> +# to be a full featured policy compliant .rpm package.
>>> +.PHONY: rpmball
>>> +rpmball: dist
>>> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
>>> +
>>> # clean doesn't do a kclean
>>> .PHONY: clean
>>> clean::
>>> diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
>>> new file mode 100644
>>> index 0000000..7d20788
>>> --- /dev/null
>>> +++ b/tools/misc/mkrpm
>>> @@ -0,0 +1,82 @@
>>> +#!/bin/sh
>>> +#
>>> +# mkrpm: package the dist/install output of a Xen build in an .rpm
>>> +#
>>> +# Takes 2 arguments, the path to the dist directory and the version
>>> +
>>> +set -e
>>> +
>>> +if test -z "$1" -o -z "$2" ; then
>>> + echo "usage: $0 path-to-XEN_ROOT xen-version"
>>> + exit 1
>>> +fi
>>> +
>>> +xenroot="$1"
>>> +
>>> +cd $xenroot
>>> +version=$2
>>> +
>>> +# Prepare the directory to package
>>> +cd dist
>>> +rm -rf rpm
>>> +
>>> +# Fill in the rpm boilerplate
>>> +mkdir -p rpm/SPEC
>>> +cat >rpm/SPEC/xen.spec <<EOF
>>> +Summary: Xen development build, version $version
>>> +Name: xen
>>> +Version: $version
>>> +Release: unstable
>>> +License: GPL
>>> +Group: System/Hypervisor
>>> +URL: http://xenbits.xenproject.org/xen.git
>>> +
>>> +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
>>> +%define __spec_install_post /usr/lib/rpm/brp-compress || :
>>> +%define debug_package %{nil}
>>> +
>>> +%description
>>> +This package contains the Xen hypervisor and associated tools, built
>>> +from a source tree. It is not a fully packaged and supported Xen, just
>>> +the output of a xen "make dist" wrapped in an .rpm to make it easy to
>>> +uninstall.
>>> +
>>> +%build
>>> +
>>> +%install
>>> +rm -rf \$RPM_BUILD_ROOT
>>> +mkdir -p \$RPM_BUILD_ROOT
>>> +cd %{_xenroot}
>>> +dist/install.sh \$RPM_BUILD_ROOT/
>>> +
>>> +cd \$RPM_BUILD_ROOT
>>> +
>>> +# Don't include xen-syms
>>> +rm -f boot/xen-syms*
>>> +# Remove all the "linked" xen-*.gz files
>>> +rm -f \$(find boot/ -type l)
>>> +# Rename the real xen.gz binary, if necessary.
>>> +if [[ ! -e boot/%{name}-%{version}-%{release}.gz ]] ; then
>>> + mv boot/xen-*.gz boot/%{name}-%{version}-%{release}.gz
>>> +fi
>>> +
>>> +
>>> +%clean
>>> +rm -rf \$RPM_BUILD_ROOT
>>> +
>>> +%files
>>> +%defattr(-,root,root,-)
>>> +/*
>>> +
>>> +%post
>>> +# Point xen.gz to the real binary.
>>> +cd /boot
>>> +ln -sf %{name}-%{version}-%{release}.gz xen.gz
>>> +EOF
>>> +
>>> +# Package it up
>>> +rpmbuild --define "_xenroot $xenroot" --define "_topdir $PWD/rpm" -bb rpm/SPEC/xen.spec
>>> +
>>> +# Tidy up after ourselves
>>> +mv rpm/RPMS/*/*.rpm .
>>> +rm -rf rpm
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 23:08 ` Don Slutz
@ 2014-03-03 23:37 ` M A Young
2014-03-03 23:46 ` Don Slutz
0 siblings, 1 reply; 24+ messages in thread
From: M A Young @ 2014-03-03 23:37 UTC (permalink / raw)
To: Don Slutz
Cc: George Dunlap, Ian Jackson, Dario Faggioli, Ian Campbell,
xen-devel
On Mon, 3 Mar 2014, Don Slutz wrote:
> On 03/03/14 17:34, Don Slutz wrote:
>> On 03/03/14 11:07, George Dunlap wrote:
>>> On 03/03/2014 02:59 PM, George Dunlap wrote:
>>>> Build a simplistic dummy package, similar to "make debball", for
>>>> developers on rpm-based systems.
>>>>
>>>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>>>
>>> I meant to add, I've tested this running as root, but not as a normal user
>>> -- I'd appreciate it if someone could give it a try...
>>>
>>
>> As a user I get:
>> ...
>> sh ./tools/misc/mkrpm /home/don/xen $(make -C xen xenversion | grep -v :)
>> error: line 3: Illegal char '-' in: Version: 4.5-unstable
>> make: *** [rpmball] Error 1
>>
>> -Don Slutz
>>
>>
>
> And applying a version "fix":
>
>
>
> From 40c6b19abf44aaf7496b4c77536677fc0d463931 Mon Sep 17 00:00:00 2001
> From: Don Slutz <dslutz@verizon.com>
> Date: Mon, 3 Mar 2014 17:59:17 -0500
> Subject: [PATCH] Adjust version
>
> Signed-off-by: Don Slutz <dslutz@verizon.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 75e845b..6def25d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -157,7 +157,7 @@ debball: dist
> # to be a full featured policy compliant .rpm package.
> .PHONY: rpmball
> rpmball: dist
> - sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep
> -v :)
> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$(git describe --long --dirty | tr
> - _)
You can't assume git will work; it doesn't for the tarball releases.
Michael Young
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 23:37 ` M A Young
@ 2014-03-03 23:46 ` Don Slutz
2014-03-03 23:52 ` M A Young
0 siblings, 1 reply; 24+ messages in thread
From: Don Slutz @ 2014-03-03 23:46 UTC (permalink / raw)
To: M A Young, Don Slutz
Cc: George Dunlap, Ian Jackson, Dario Faggioli, Ian Campbell,
xen-devel
On 03/03/14 18:37, M A Young wrote:
> On Mon, 3 Mar 2014, Don Slutz wrote:
>
>> On 03/03/14 17:34, Don Slutz wrote:
>>> On 03/03/14 11:07, George Dunlap wrote:
>>>> On 03/03/2014 02:59 PM, George Dunlap wrote:
>>>>> Build a simplistic dummy package, similar to "make debball", for
>>>>> developers on rpm-based systems.
>>>>>
>>>>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>>>>
>>>> I meant to add, I've tested this running as root, but not as a normal user -- I'd appreciate it if someone could give it a try...
>>>>
>>>
>>> As a user I get:
>>> ...
>>> sh ./tools/misc/mkrpm /home/don/xen $(make -C xen xenversion | grep -v :)
>>> error: line 3: Illegal char '-' in: Version: 4.5-unstable
>>> make: *** [rpmball] Error 1
>>>
>>> -Don Slutz
>>>
>>>
>>
>> And applying a version "fix":
>>
>>
>>
>> From 40c6b19abf44aaf7496b4c77536677fc0d463931 Mon Sep 17 00:00:00 2001
>> From: Don Slutz <dslutz@verizon.com>
>> Date: Mon, 3 Mar 2014 17:59:17 -0500
>> Subject: [PATCH] Adjust version
>>
>> Signed-off-by: Don Slutz <dslutz@verizon.com>
>> ---
>> Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 75e845b..6def25d 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -157,7 +157,7 @@ debball: dist
>> # to be a full featured policy compliant .rpm package.
>> .PHONY: rpmball
>> rpmball: dist
>> - sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
>> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$(git describe --long --dirty | tr - _)
>
> You can't assume git will work; it doesn't for the tarball releases.
>
> Michael Young
How about "| cut -d- -f1":
dcs-xen-54:~/xen>make -C xen xenversion | grep -v : | cut -d- -f1
4.5
-Don Slutz
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 23:46 ` Don Slutz
@ 2014-03-03 23:52 ` M A Young
2014-03-04 10:26 ` George Dunlap
0 siblings, 1 reply; 24+ messages in thread
From: M A Young @ 2014-03-03 23:52 UTC (permalink / raw)
To: Don Slutz
Cc: George Dunlap, Ian Jackson, Dario Faggioli, Ian Campbell,
xen-devel
On Mon, 3 Mar 2014, Don Slutz wrote:
> On 03/03/14 18:37, M A Young wrote:
>> On Mon, 3 Mar 2014, Don Slutz wrote:
>>
>>> On 03/03/14 17:34, Don Slutz wrote:
>>>> On 03/03/14 11:07, George Dunlap wrote:
>>>>> On 03/03/2014 02:59 PM, George Dunlap wrote:
>>>>>> Build a simplistic dummy package, similar to "make debball", for
>>>>>> developers on rpm-based systems.
>>>>>>
>>>>>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>>>>>
>>>>> I meant to add, I've tested this running as root, but not as a normal
>>>>> user -- I'd appreciate it if someone could give it a try...
>>>>>
>>>>
>>>> As a user I get:
>>>> ...
>>>> sh ./tools/misc/mkrpm /home/don/xen $(make -C xen xenversion | grep -v :)
>>>> error: line 3: Illegal char '-' in: Version: 4.5-unstable
>>>> make: *** [rpmball] Error 1
>>>>
>>>> -Don Slutz
>>>>
>>>>
>>>
>>> And applying a version "fix":
>>>
>>>
>>>
>>> From 40c6b19abf44aaf7496b4c77536677fc0d463931 Mon Sep 17 00:00:00 2001
>>> From: Don Slutz <dslutz@verizon.com>
>>> Date: Mon, 3 Mar 2014 17:59:17 -0500
>>> Subject: [PATCH] Adjust version
>>>
>>> Signed-off-by: Don Slutz <dslutz@verizon.com>
>>> ---
>>> Makefile | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/Makefile b/Makefile
>>> index 75e845b..6def25d 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -157,7 +157,7 @@ debball: dist
>>> # to be a full featured policy compliant .rpm package.
>>> .PHONY: rpmball
>>> rpmball: dist
>>> - sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion |
>>> grep -v :)
>>> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$(git describe --long --dirty |
>>> tr - _)
>>
>> You can't assume git will work; it doesn't for the tarball releases.
>>
>> Michael Young
>
> How about "| cut -d- -f1":
>
> dcs-xen-54:~/xen>make -C xen xenversion | grep -v : | cut -d- -f1
> 4.5
or you could do
make -C xen xenversion XEN_EXTRAVERSION="" | grep -v :
or even
make --no-print-directory -C xen xenversion XEN_EXTRAVERSION=""
Michael Young
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 23:52 ` M A Young
@ 2014-03-04 10:26 ` George Dunlap
0 siblings, 0 replies; 24+ messages in thread
From: George Dunlap @ 2014-03-04 10:26 UTC (permalink / raw)
To: M A Young, Don Slutz; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, xen-devel
On 03/03/2014 11:52 PM, M A Young wrote:
>
>
> On Mon, 3 Mar 2014, Don Slutz wrote:
>
>> On 03/03/14 18:37, M A Young wrote:
>>> On Mon, 3 Mar 2014, Don Slutz wrote:
>>>
>>>> On 03/03/14 17:34, Don Slutz wrote:
>>>>> On 03/03/14 11:07, George Dunlap wrote:
>>>>>> On 03/03/2014 02:59 PM, George Dunlap wrote:
>>>>>>> Build a simplistic dummy package, similar to "make debball", for
>>>>>>> developers on rpm-based systems.
>>>>>>>
>>>>>>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>>>>>>
>>>>>> I meant to add, I've tested this running as root, but not as a
>>>>>> normal user -- I'd appreciate it if someone could give it a try...
>>>>>>
>>>>>
>>>>> As a user I get:
>>>>> ...
>>>>> sh ./tools/misc/mkrpm /home/don/xen $(make -C xen xenversion | grep
>>>>> -v :)
>>>>> error: line 3: Illegal char '-' in: Version: 4.5-unstable
>>>>> make: *** [rpmball] Error 1
>>>>>
>>>>> -Don Slutz
>>>>>
>>>>>
>>>>
>>>> And applying a version "fix":
>>>>
>>>>
>>>>
>>>> From 40c6b19abf44aaf7496b4c77536677fc0d463931 Mon Sep 17 00:00:00 2001
>>>> From: Don Slutz <dslutz@verizon.com>
>>>> Date: Mon, 3 Mar 2014 17:59:17 -0500
>>>> Subject: [PATCH] Adjust version
>>>>
>>>> Signed-off-by: Don Slutz <dslutz@verizon.com>
>>>> ---
>>>> Makefile | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/Makefile b/Makefile
>>>> index 75e845b..6def25d 100644
>>>> --- a/Makefile
>>>> +++ b/Makefile
>>>> @@ -157,7 +157,7 @@ debball: dist
>>>> # to be a full featured policy compliant .rpm package.
>>>> .PHONY: rpmball
>>>> rpmball: dist
>>>> - sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen
>>>> xenversion | grep -v :)
>>>> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$(git describe --long
>>>> --dirty | tr - _)
>>>
>>> You can't assume git will work; it doesn't for the tarball releases.
>>>
>>> Michael Young
>>
>> How about "| cut -d- -f1":
>>
>> dcs-xen-54:~/xen>make -C xen xenversion | grep -v : | cut -d- -f1
>> 4.5
>
> or you could do
> make -C xen xenversion XEN_EXTRAVERSION="" | grep -v :
> or even
> make --no-print-directory -C xen xenversion XEN_EXTRAVERSION=""
Yes, sorry about that -- I tested "make rpmball", then changed
something, then tested calling "mkrpm" directly without testing the
whole thing. :-/
What I did instead was modify the mkrpm script to parse "xxxx-yy" as
"version-release". (And if there's no "-yy", to just make it "0".) New
iteration coming.
-George
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 14:59 [PATCH] Add a "make rpmball" target George Dunlap
2014-03-03 16:07 ` George Dunlap
@ 2014-03-03 16:23 ` Olaf Hering
2014-03-03 16:34 ` George Dunlap
2014-03-03 20:51 ` Don Slutz
2014-03-03 22:52 ` Dario Faggioli
3 siblings, 1 reply; 24+ messages in thread
From: Olaf Hering @ 2014-03-03 16:23 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, xen-devel
On Mon, Mar 03, George Dunlap wrote:
> +%install
> +rm -rf \$RPM_BUILD_ROOT
> +mkdir -p \$RPM_BUILD_ROOT
Newer rpms are supposed to do that automatically, but I dont know what
"newer" actually means. And certainly it does not hurt to keep this.
> +cd %{_xenroot}
> +dist/install.sh \$RPM_BUILD_ROOT/
> +
> +cd \$RPM_BUILD_ROOT
> +
> +# Don't include xen-syms
> +rm -f boot/xen-syms*
> +# Remove all the "linked" xen-*.gz files
> +rm -f \$(find boot/ -type l)
"find $paht -type l -delete"?
> +%files
> +%defattr(-,root,root,-)
> +/*
In this case, to avoid package conflicts, add some tags like:
Obsoletes: xen-libs
Obsoletes: xen-tools
Also "Release: unstable" could be some automatically increasing number,
like 'date +%s'. This avoids the need for "rpm -Uvh --force xen.rpm".
Not sure how package managers deal with missing digits in the Release:
tag. If in doubt, set it to 0.
Olaf
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 16:23 ` Olaf Hering
@ 2014-03-03 16:34 ` George Dunlap
2014-03-03 16:36 ` George Dunlap
2014-03-03 17:23 ` Olaf Hering
0 siblings, 2 replies; 24+ messages in thread
From: George Dunlap @ 2014-03-03 16:34 UTC (permalink / raw)
To: Olaf Hering; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, xen-devel
On 03/03/2014 04:23 PM, Olaf Hering wrote:
> On Mon, Mar 03, George Dunlap wrote:
>
>
>> +%install
>> +rm -rf \$RPM_BUILD_ROOT
>> +mkdir -p \$RPM_BUILD_ROOT
> Newer rpms are supposed to do that automatically, but I dont know what
> "newer" actually means. And certainly it does not hurt to keep this.
>
>> +cd %{_xenroot}
>> +dist/install.sh \$RPM_BUILD_ROOT/
>> +
>> +cd \$RPM_BUILD_ROOT
>> +
>> +# Don't include xen-syms
>> +rm -f boot/xen-syms*
>> +# Remove all the "linked" xen-*.gz files
>> +rm -f \$(find boot/ -type l)
> "find $paht -type l -delete"?
Ack.
>
>> +%files
>> +%defattr(-,root,root,-)
>> +/*
> In this case, to avoid package conflicts, add some tags like:
>
> Obsoletes: xen-libs
> Obsoletes: xen-tools
What exactly would this be for?
> Also "Release: unstable" could be some automatically increasing number,
> like 'date +%s'. This avoids the need for "rpm -Uvh --force xen.rpm".
> Not sure how package managers deal with missing digits in the Release:
> tag. If in doubt, set it to 0.
I'll give this a think.
Thanks for the feedback!
-George
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 16:34 ` George Dunlap
@ 2014-03-03 16:36 ` George Dunlap
2014-03-03 17:31 ` Olaf Hering
2014-03-03 17:23 ` Olaf Hering
1 sibling, 1 reply; 24+ messages in thread
From: George Dunlap @ 2014-03-03 16:36 UTC (permalink / raw)
To: Olaf Hering; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, xen-devel
On 03/03/2014 04:34 PM, George Dunlap wrote:
> On 03/03/2014 04:23 PM, Olaf Hering wrote:
>> On Mon, Mar 03, George Dunlap wrote:
>>
>>
>>> +%install
>>> +rm -rf \$RPM_BUILD_ROOT
>>> +mkdir -p \$RPM_BUILD_ROOT
>> Newer rpms are supposed to do that automatically, but I dont know what
>> "newer" actually means. And certainly it does not hurt to keep this.
>>
>>> +cd %{_xenroot}
>>> +dist/install.sh \$RPM_BUILD_ROOT/
>>> +
>>> +cd \$RPM_BUILD_ROOT
>>> +
>>> +# Don't include xen-syms
>>> +rm -f boot/xen-syms*
>>> +# Remove all the "linked" xen-*.gz files
>>> +rm -f \$(find boot/ -type l)
>> "find $paht -type l -delete"?
>
> Ack.
>
>>
>>> +%files
>>> +%defattr(-,root,root,-)
>>> +/*
>> In this case, to avoid package conflicts, add some tags like:
>>
>> Obsoletes: xen-libs
>> Obsoletes: xen-tools
>
> What exactly would this be for?
"remove another named package(s) when this package is installed" -- I
think that's a bit more than we want in the rpmball. I'd much rather
the developer have to remove the conflicting packages themselves, rather
than have it done automatically.
-George
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 16:36 ` George Dunlap
@ 2014-03-03 17:31 ` Olaf Hering
0 siblings, 0 replies; 24+ messages in thread
From: Olaf Hering @ 2014-03-03 17:31 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, xen-devel
On Mon, Mar 03, George Dunlap wrote:
> "remove another named package(s) when this package is installed" -- I think
> that's a bit more than we want in the rpmball. I'd much rather the
> developer have to remove the conflicting packages themselves, rather than
> have it done automatically.
It would mean "rpm -e --nodeps xen-tools xen-libs" has to be used. If
any other package depends on the xen-libs for example, then in my
opinion its better to get a clear "libxl.so.4 is required by XY" when
doing "rpm -U xen.rpm".
Olaf
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 16:34 ` George Dunlap
2014-03-03 16:36 ` George Dunlap
@ 2014-03-03 17:23 ` Olaf Hering
2014-03-03 17:27 ` Dario Faggioli
1 sibling, 1 reply; 24+ messages in thread
From: Olaf Hering @ 2014-03-03 17:23 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, xen-devel
On Mon, Mar 03, George Dunlap wrote:
> >In this case, to avoid package conflicts, add some tags like:
> >Obsoletes: xen-libs
> >Obsoletes: xen-tools
> What exactly would this be for?
In my case it would replace the distro xen,xen-libs,xen-tools.rpm with
the new xen.rpm. If none of these packages are installed, its a nop.
Olaf
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 17:23 ` Olaf Hering
@ 2014-03-03 17:27 ` Dario Faggioli
2014-03-03 17:30 ` George Dunlap
0 siblings, 1 reply; 24+ messages in thread
From: Dario Faggioli @ 2014-03-03 17:27 UTC (permalink / raw)
To: Olaf Hering; +Cc: George Dunlap, Ian Jackson, Ian Campbell, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1002 bytes --]
On lun, 2014-03-03 at 18:23 +0100, Olaf Hering wrote:
> On Mon, Mar 03, George Dunlap wrote:
>
> > >In this case, to avoid package conflicts, add some tags like:
> > >Obsoletes: xen-libs
> > >Obsoletes: xen-tools
> > What exactly would this be for?
>
> In my case it would replace the distro xen,xen-libs,xen-tools.rpm with
> the new xen.rpm. If none of these packages are installed, its a nop.
>
+1
In principle, I'd agree with George on the fact that is should well be
the developer to take care of this.
However, having the system thinking that, e.g., xen-libs is installed,
would allow one to install xen related libvirt distro packages, and test
them with the latest Xen, which would be pretty cool!
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 17:27 ` Dario Faggioli
@ 2014-03-03 17:30 ` George Dunlap
2014-03-03 17:59 ` Ian Jackson
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: George Dunlap @ 2014-03-03 17:30 UTC (permalink / raw)
To: Dario Faggioli, Olaf Hering; +Cc: Ian Jackson, Ian Campbell, xen-devel
On 03/03/2014 05:27 PM, Dario Faggioli wrote:
> On lun, 2014-03-03 at 18:23 +0100, Olaf Hering wrote:
>> On Mon, Mar 03, George Dunlap wrote:
>>
>>>> In this case, to avoid package conflicts, add some tags like:
>>>> Obsoletes: xen-libs
>>>> Obsoletes: xen-tools
>>> What exactly would this be for?
>> In my case it would replace the distro xen,xen-libs,xen-tools.rpm with
>> the new xen.rpm. If none of these packages are installed, its a nop.
>>
> +1
>
> In principle, I'd agree with George on the fact that is should well be
> the developer to take care of this.
>
> However, having the system thinking that, e.g., xen-libs is installed,
> would allow one to install xen related libvirt distro packages, and test
> them with the latest Xen, which would be pretty cool!
Ah, you mean, it *also* counts as one of those packages for dependency
tracking?
I can definitely see how that could be useful.
Any opinions, Ian / Ian?
-George
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 17:30 ` George Dunlap
@ 2014-03-03 17:59 ` Ian Jackson
2014-03-03 22:53 ` Dario Faggioli
2014-03-03 23:11 ` Olaf Hering
2014-03-03 18:19 ` Ian Campbell
2014-03-03 23:06 ` Olaf Hering
2 siblings, 2 replies; 24+ messages in thread
From: Ian Jackson @ 2014-03-03 17:59 UTC (permalink / raw)
To: George Dunlap; +Cc: Dario Faggioli, Olaf Hering, Ian Campbell, xen-devel
George Dunlap writes ("Re: [Xen-devel] [PATCH] Add a "make rpmball" target"):
> On 03/03/2014 05:27 PM, Dario Faggioli wrote:
> >>>> In this case, to avoid package conflicts, add some tags like:
> >>>> Obsoletes: xen-libs
> >>>> Obsoletes: xen-tools
> >>> What exactly would this be for?
> >> In my case it would replace the distro xen,xen-libs,xen-tools.rpm with
> >> the new xen.rpm. If none of these packages are installed, its a nop.
> >>
> > +1
> >
> > In principle, I'd agree with George on the fact that is should well be
> > the developer to take care of this.
> >
> > However, having the system thinking that, e.g., xen-libs is installed,
> > would allow one to install xen related libvirt distro packages, and test
> > them with the latest Xen, which would be pretty cool!
>
> Ah, you mean, it *also* counts as one of those packages for dependency
> tracking?
>
> I can definitely see how that could be useful.
Quite.
> Any opinions, Ian / Ian?
I'm no expert on rpm. Is there a way to get the desirable effect
(satisfying dependencies) without the undesirable one (unexpectedly
deinstalling the sysadmin's other xen packages) ?
Ian.
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 17:59 ` Ian Jackson
@ 2014-03-03 22:53 ` Dario Faggioli
2014-03-03 23:11 ` Olaf Hering
1 sibling, 0 replies; 24+ messages in thread
From: Dario Faggioli @ 2014-03-03 22:53 UTC (permalink / raw)
To: Ian Jackson; +Cc: George Dunlap, Olaf Hering, Ian Campbell, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1105 bytes --]
On lun, 2014-03-03 at 17:59 +0000, Ian Jackson wrote:
> George Dunlap writes ("Re: [Xen-devel] [PATCH] Add a "make rpmball" target"):
> > Ah, you mean, it *also* counts as one of those packages for dependency
> > tracking?
> >
> > I can definitely see how that could be useful.
>
> Quite.
>
Indeed. :-)
> > Any opinions, Ian / Ian?
>
> I'm no expert on rpm. Is there a way to get the desirable effect
> (satisfying dependencies) without the undesirable one (unexpectedly
> deinstalling the sysadmin's other xen packages) ?
>
I think something like "Provides: xxx" can help with this, at least on
Fedora:
http://fedoraproject.org/wiki/How_to_create_an_RPM_package#Other_tags
As soon as rpmball builds for me (see the other e-mail I just sent),
I'll be happy to help experimenting with it.
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 17:59 ` Ian Jackson
2014-03-03 22:53 ` Dario Faggioli
@ 2014-03-03 23:11 ` Olaf Hering
2014-03-04 12:19 ` Ian Jackson
1 sibling, 1 reply; 24+ messages in thread
From: Olaf Hering @ 2014-03-03 23:11 UTC (permalink / raw)
To: Ian Jackson; +Cc: George Dunlap, Dario Faggioli, Ian Campbell, xen-devel
On Mon, Mar 03, Ian Jackson wrote:
> I'm no expert on rpm. Is there a way to get the desirable effect
> (satisfying dependencies) without the undesirable one (unexpectedly
> deinstalling the sysadmin's other xen packages) ?
rpm does that itself because the new xen.rpm has a provides
"libxyz.so.0() (64bit)" and other packages linking against that SONAME
have a requires "libxyz.so.0() (64bit)" so rpm and package managers
above rpm can find the relationship between the two packages.
I dont see an undesirable effect because the selfcompiled xen.rpm
contains everything required to run a dom0.
Olaf
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 23:11 ` Olaf Hering
@ 2014-03-04 12:19 ` Ian Jackson
0 siblings, 0 replies; 24+ messages in thread
From: Ian Jackson @ 2014-03-04 12:19 UTC (permalink / raw)
To: Olaf Hering; +Cc: George Dunlap, Dario Faggioli, Ian Campbell, xen-devel
Olaf Hering writes ("Re: [Xen-devel] [PATCH] Add a "make rpmball" target"):
> On Mon, Mar 03, Ian Jackson wrote:
> > I'm no expert on rpm. Is there a way to get the desirable effect
> > (satisfying dependencies) without the undesirable one (unexpectedly
> > deinstalling the sysadmin's other xen packages) ?
>
> rpm does that itself because the new xen.rpm has a provides
> "libxyz.so.0() (64bit)" and other packages linking against that SONAME
> have a requires "libxyz.so.0() (64bit)" so rpm and package managers
> above rpm can find the relationship between the two packages.
>
> I dont see an undesirable effect because the selfcompiled xen.rpm
> contains everything required to run a dom0.
I think it's undesirable if installing this rpmball causes (by
default) the deinstallation or replacement of distro-provided Xen
packages.
Ian.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 17:30 ` George Dunlap
2014-03-03 17:59 ` Ian Jackson
@ 2014-03-03 18:19 ` Ian Campbell
2014-03-03 23:06 ` Olaf Hering
2 siblings, 0 replies; 24+ messages in thread
From: Ian Campbell @ 2014-03-03 18:19 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Dario Faggioli, Olaf Hering, xen-devel
On Mon, 2014-03-03 at 17:30 +0000, George Dunlap wrote:
> Any opinions, Ian / Ian?
The approach we have taken with the .deb equivalent is that the result
is basically "a tarball which can be cleanly uninstalled, for developer
use" not "a package which is well integrated with the overall system".
People who want an integrated "end user" package should use the one from
the proper package maintainer for the distro.
In other words I think it should be up to the person installing this
thing to not install packaged Xen from the distro at the same time and
deal with any resulting conflicts etc themselves.
Ian.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 17:30 ` George Dunlap
2014-03-03 17:59 ` Ian Jackson
2014-03-03 18:19 ` Ian Campbell
@ 2014-03-03 23:06 ` Olaf Hering
2 siblings, 0 replies; 24+ messages in thread
From: Olaf Hering @ 2014-03-03 23:06 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell, xen-devel
On Mon, Mar 03, George Dunlap wrote:
> Ah, you mean, it *also* counts as one of those packages for dependency
> tracking?
No. Obsoletes does just what the name suggests: It means the new
xen.rpm will replace an existing xen.rpm and also packages providing or
being named like the strings in the Obsoletes: tag.
Adding a Provides: tag is just for package managers above rpm as a hint
during dist upgrade to track package renames.
For the purpose of xen-unstable a "Name: xen" and "Obsoletes: xen-xyz"
is the right way to replace the distro provided xen related packages
with the catch-all single selfcompiled xen.rpm.
Olaf
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 14:59 [PATCH] Add a "make rpmball" target George Dunlap
2014-03-03 16:07 ` George Dunlap
2014-03-03 16:23 ` Olaf Hering
@ 2014-03-03 20:51 ` Don Slutz
2014-03-04 11:41 ` George Dunlap
2014-03-03 22:52 ` Dario Faggioli
3 siblings, 1 reply; 24+ messages in thread
From: Don Slutz @ 2014-03-03 20:51 UTC (permalink / raw)
To: George Dunlap, xen-devel; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell
On 03/03/14 09:59, George Dunlap wrote:
> Build a simplistic dummy package, similar to "make debball", for
> developers on rpm-based systems.
>
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Ian Campbell <ian.campbell@citrix.com>
> CC: Dario Faggioli <dario.faggioli@citrix.com>
> ---
> Makefile | 7 +++++
> tools/misc/mkrpm | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 89 insertions(+)
> create mode 100644 tools/misc/mkrpm
>
> diff --git a/Makefile b/Makefile
> index 4e48457..75e845b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -152,6 +152,13 @@ world:
> debball: dist
> fakeroot sh ./tools/misc/mkdeb $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
>
> +# Package a build in an rpmball file, that is inside a .rpm format
> +# container to allow for easy and clean removal. This is not intended
> +# to be a full featured policy compliant .rpm package.
> +.PHONY: rpmball
> +rpmball: dist
> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
> +
> # clean doesn't do a kclean
> .PHONY: clean
> clean::
> diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
> new file mode 100644
> index 0000000..7d20788
> --- /dev/null
> +++ b/tools/misc/mkrpm
> @@ -0,0 +1,82 @@
> +#!/bin/sh
> +#
> +# mkrpm: package the dist/install output of a Xen build in an .rpm
> +#
> +# Takes 2 arguments, the path to the dist directory and the version
> +
> +set -e
> +
> +if test -z "$1" -o -z "$2" ; then
> + echo "usage: $0 path-to-XEN_ROOT xen-version"
> + exit 1
> +fi
> +
> +xenroot="$1"
> +
> +cd $xenroot
> +version=$2
> +
> +# Prepare the directory to package
> +cd dist
> +rm -rf rpm
> +
> +# Fill in the rpm boilerplate
> +mkdir -p rpm/SPEC
> +cat >rpm/SPEC/xen.spec <<EOF
> +Summary: Xen development build, version $version
> +Name: xen
> +Version: $version
> +Release: unstable
> +License: GPL
> +Group: System/Hypervisor
> +URL: http://xenbits.xenproject.org/xen.git
> +
> +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
> +%define __spec_install_post /usr/lib/rpm/brp-compress || :
> +%define debug_package %{nil}
Does this correctly stop the striping of debug symbols? Or does it just prevent the debuginfo packaging.
> +
> +%description
> +This package contains the Xen hypervisor and associated tools, built
> +from a source tree. It is not a fully packaged and supported Xen, just
> +the output of a xen "make dist" wrapped in an .rpm to make it easy to
> +uninstall.
> +
> +%build
> +
> +%install
> +rm -rf \$RPM_BUILD_ROOT
> +mkdir -p \$RPM_BUILD_ROOT
> +cd %{_xenroot}
> +dist/install.sh \$RPM_BUILD_ROOT/
> +
> +cd \$RPM_BUILD_ROOT
> +
> +# Don't include xen-syms
> +rm -f boot/xen-syms*
But this is an important file if you want to use crash on /proc/vmcore. So removing it for a developer rpm does not make sense to me.
> +# Remove all the "linked" xen-*.gz files
> +rm -f \$(find boot/ -type l)
> +# Rename the real xen.gz binary, if necessary.
> +if [[ ! -e boot/%{name}-%{version}-%{release}.gz ]] ; then
> + mv boot/xen-*.gz boot/%{name}-%{version}-%{release}.gz
> +fi
> +
> +
> +%clean
> +rm -rf \$RPM_BUILD_ROOT
> +
> +%files
> +%defattr(-,root,root,-)
> +/*
> +
> +%post
> +# Point xen.gz to the real binary.
> +cd /boot
> +ln -sf %{name}-%{version}-%{release}.gz xen.gz
So 1st you unlink, then you make a new (maybe the same) link?
-Don Slutz
> +EOF
> +
> +# Package it up
> +rpmbuild --define "_xenroot $xenroot" --define "_topdir $PWD/rpm" -bb rpm/SPEC/xen.spec
> +
> +# Tidy up after ourselves
> +mv rpm/RPMS/*/*.rpm .
> +rm -rf rpm
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Add a "make rpmball" target
2014-03-03 20:51 ` Don Slutz
@ 2014-03-04 11:41 ` George Dunlap
0 siblings, 0 replies; 24+ messages in thread
From: George Dunlap @ 2014-03-04 11:41 UTC (permalink / raw)
To: Don Slutz, xen-devel; +Cc: Ian Jackson, Dario Faggioli, Ian Campbell
On 03/03/2014 08:51 PM, Don Slutz wrote:
> On 03/03/14 09:59, George Dunlap wrote:
>> Build a simplistic dummy package, similar to "make debball", for
>> developers on rpm-based systems.
>>
>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>> ---
>> CC: Ian Jackson <ian.jackson@citrix.com>
>> CC: Ian Campbell <ian.campbell@citrix.com>
>> CC: Dario Faggioli <dario.faggioli@citrix.com>
>> ---
>> Makefile | 7 +++++
>> tools/misc/mkrpm | 82
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 89 insertions(+)
>> create mode 100644 tools/misc/mkrpm
>>
>> diff --git a/Makefile b/Makefile
>> index 4e48457..75e845b 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -152,6 +152,13 @@ world:
>> debball: dist
>> fakeroot sh ./tools/misc/mkdeb $(XEN_ROOT) $$($(MAKE) -C xen
>> xenversion | grep -v :)
>> +# Package a build in an rpmball file, that is inside a .rpm format
>> +# container to allow for easy and clean removal. This is not intended
>> +# to be a full featured policy compliant .rpm package.
>> +.PHONY: rpmball
>> +rpmball: dist
>> + sh ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion |
>> grep -v :)
>> +
>> # clean doesn't do a kclean
>> .PHONY: clean
>> clean::
>> diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
>> new file mode 100644
>> index 0000000..7d20788
>> --- /dev/null
>> +++ b/tools/misc/mkrpm
>> @@ -0,0 +1,82 @@
>> +#!/bin/sh
>> +#
>> +# mkrpm: package the dist/install output of a Xen build in an .rpm
>> +#
>> +# Takes 2 arguments, the path to the dist directory and the version
>> +
>> +set -e
>> +
>> +if test -z "$1" -o -z "$2" ; then
>> + echo "usage: $0 path-to-XEN_ROOT xen-version"
>> + exit 1
>> +fi
>> +
>> +xenroot="$1"
>> +
>> +cd $xenroot
>> +version=$2
>> +
>> +# Prepare the directory to package
>> +cd dist
>> +rm -rf rpm
>> +
>> +# Fill in the rpm boilerplate
>> +mkdir -p rpm/SPEC
>> +cat >rpm/SPEC/xen.spec <<EOF
>> +Summary: Xen development build, version $version
>> +Name: xen
>> +Version: $version
>> +Release: unstable
>> +License: GPL
>> +Group: System/Hypervisor
>> +URL: http://xenbits.xenproject.org/xen.git
>> +
>> +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
>> +%define __spec_install_post /usr/lib/rpm/brp-compress || :
>> +%define debug_package %{nil}
>
> Does this correctly stop the striping of debug symbols? Or does it just
> prevent the debuginfo packaging.
Don't know actually -- this was taken from the XenServer xen.spec.
>
>> +
>> +%description
>> +This package contains the Xen hypervisor and associated tools, built
>> +from a source tree. It is not a fully packaged and supported Xen, just
>> +the output of a xen "make dist" wrapped in an .rpm to make it easy to
>> +uninstall.
>> +
>> +%build
>> +
>> +%install
>> +rm -rf \$RPM_BUILD_ROOT
>> +mkdir -p \$RPM_BUILD_ROOT
>> +cd %{_xenroot}
>> +dist/install.sh \$RPM_BUILD_ROOT/
>> +
>> +cd \$RPM_BUILD_ROOT
>> +
>> +# Don't include xen-syms
>> +rm -f boot/xen-syms*
>
> But this is an important file if you want to use crash on /proc/vmcore.
> So removing it for a developer rpm does not make sense to me.
Yes, you're right. Actually, the reason I deleted this file is that the
auto-install CentOS image I used to install my test machine creates a
separate /boot partition that is tiny -- and if I included xen-syms, I
couldn't install the rpm.
But that's something I should work around / fix in my own system.
>
>> +# Remove all the "linked" xen-*.gz files
>> +rm -f \$(find boot/ -type l)
>> +# Rename the real xen.gz binary, if necessary.
>> +if [[ ! -e boot/%{name}-%{version}-%{release}.gz ]] ; then
>> + mv boot/xen-*.gz boot/%{name}-%{version}-%{release}.gz
>> +fi
>> +
>> +
>> +%clean
>> +rm -rf \$RPM_BUILD_ROOT
>> +
>> +%files
>> +%defattr(-,root,root,-)
>> +/*
>> +
>> +%post
>> +# Point xen.gz to the real binary.
>> +cd /boot
>> +ln -sf %{name}-%{version}-%{release}.gz xen.gz
>
> So 1st you unlink, then you make a new (maybe the same) link?
Again, this is an artifact of the way I had my system configured. The
reason I did this was so that I could install this while keeping the
xen4centos xen-hypervisor package installed. But I think you're right,
it would be better to just uninstall the old package, and leave the
links as they are.
Thanks for the review -- v2 coming soon.
-George
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Add a "make rpmball" target
2014-03-03 14:59 [PATCH] Add a "make rpmball" target George Dunlap
` (2 preceding siblings ...)
2014-03-03 20:51 ` Don Slutz
@ 2014-03-03 22:52 ` Dario Faggioli
3 siblings, 0 replies; 24+ messages in thread
From: Dario Faggioli @ 2014-03-03 22:52 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Ian Campbell, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1593 bytes --]
On lun, 2014-03-03 at 14:59 +0000, George Dunlap wrote:
> Build a simplistic dummy package, similar to "make debball", for
> developers on rpm-based systems.
>
Importing this produced the following output:
$ stg import -M /home/dario/patch-export.mbox
Checking for changes in the working directory ... done
Importing patch "add-a-make-rpmball-target" ... <stdin>:43: trailing whitespace.
if test -z "$1" -o -z "$2" ; then
<stdin>:46: trailing whitespace.
fi
<stdin>:106: trailing whitespace.
# Point xen.gz to the real binary.
<stdin>:108: trailing whitespace.
ln -sf %{name}-%{version}-%{release}.gz xen.gz
warning: 4 lines add whitespace errors.
done
Now at patch "add-a-make-rpmball-target"
Trying to `make rpmball' both on debian (after having installed the
relevant rpm* packages) and on Fedora tells me this:
install -d -m0755 -p /home/dario/Sources/xen/xen/xen.git/dist/
install -m0644 -p ./COPYING /home/dario/Sources/xen/xen/xen.git/dist
install -m0644 -p ./README /home/dario/Sources/xen/xen/xen.git/dist
install -m0755 -p ./install.sh /home/dario/Sources/xen/xen/xen.git/dist
sh ./tools/misc/mkrpm /home/dario/Sources/xen/xen/xen.git $(make -C xen xenversion | grep -v :)
error: line 3: Illegal char '-' in: Version: 4.5-unstable
make: *** [rpmball] Error 1
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 24+ messages in thread