From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH] Add a "make rpmball" target Date: Tue, 4 Mar 2014 10:26:02 +0000 Message-ID: <5315AA3A.2090405@eu.citrix.com> References: <1393858780-11628-1-git-send-email-george.dunlap@eu.citrix.com> <5314A8AA.9000805@eu.citrix.com> <53150385.9020107@terremark.com> <53150B54.8070709@terremark.com> <53151465.7090608@terremark.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: M A Young , Don Slutz Cc: Ian Jackson , Dario Faggioli , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 >>>>>> >>>>>> 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 >>>> Date: Mon, 3 Mar 2014 17:59:17 -0500 >>>> Subject: [PATCH] Adjust version >>>> >>>> Signed-off-by: Don Slutz >>>> --- >>>> 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