You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rayees Namathponnan <ra...@citrix.com> on 2013/07/23 05:24:07 UTC

CloudStack 4.2 – Build and Packaging on RHEL 5.4

Hi All,

I am trying to create  4.2  build and  then package on RHEL 5.4,  initially  faced some issue with RPM “topdir”,  fixed those issue in local machine (changes are below)


mkdir -p $RPMDIR/SPECS
+mkdir -p $RPMDIR/BUILD
mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION

(cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
@@ -55,7 +56,7 @@ mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
 cp cloud.spec $RPMDIR/SPECS
-(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
+(cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" -ba SPECS/cloud.spec)
 exit
}


After fixing this, I am able to start the build; unfortunately build getting failed during packaging; observed below error


Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) <= 3.0.3-1
Requires(pre): /bin/sh
Requires: /bin/bash /usr/bin/python cloudstack-management = 4.2.0
Obsoletes: cloud-aws-api < 4.1.0
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/cloudstack-4.2.0-SNAPSHOT-SNAPSHOT.el5-build
error: Could not open /root/jenkins/build/workspace/XXXXX-4.2-rhel5/XXXXXX/cloudstack/dist/rpmbuild/SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm: No such file or directory
cp: cannot stat `/root/jenkins/build/workspace/XXXXXX-4.2-rhel5/XXXXXX/cloudstack/dist/rpmbuild/RPMS/x86_64/*.rpm': No such file or directory


Here build unable to find “SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm”; I physically checked on the build path;  I cannot the folder “RPMS and SRPMS” under … cloudstack/dist/rpmbuild;

Any idea about this ?


Regards,
Rayees


RE: CloudStack 4.2 – Build and Packaging on RHEL 5.4

Posted by Rayees Namathponnan <ra...@citrix.com>.
Submitted patch to support RHEL 5 and 6.2 packaging; someone  please review this ? 

https://reviews.apache.org/r/13003/ 


Also I think we can change the packaging folder name form "cloudstack/packaging/centos63"  to "cloudstack/packaging/centos"; after the merge.


Regards,
Rayees 

-----Original Message-----
From: Rayees Namathponnan [mailto:rayees.namathponnan@citrix.com] 
Sent: Friday, July 26, 2013 11:14 AM
To: dev@cloudstack.apache.org
Subject: RE: CloudStack 4.2 – Build and Packaging on RHEL 5.4

There are some hardcoded python version (Python2.6)  in cloud.spec file;  

it should be get from environment variable or get from build machines Python version; then only we can support RHEL 5 packaging, since RHEL 5 using Python 2.4.

Regard,
Rayees 


-----Original Message-----
From: Hugo Trippaers [mailto:trippie@gmail.com]
Sent: Monday, July 22, 2013 10:09 PM
To: dev@cloudstack.apache.org
Subject: Re: CloudStack 4.2 – Build and Packaging on RHEL 5.4

If i remember correctly these directories are not automagically created on redhat 5.x systems.

You need to use the default location in the var directory probably so you need to make some changes to the package script to deal with that.

Cheers,

Hugo

Sent from my iPhone

On 23 jul. 2013, at 05:24, Rayees Namathponnan <ra...@citrix.com> wrote:

> Hi All,
> 
> I am trying to create  4.2  build and  then package on RHEL 5.4, 
> initially  faced some issue with RPM “topdir”,  fixed those issue in 
> local machine (changes are below)
> 
> 
> mkdir -p $RPMDIR/SPECS
> +mkdir -p $RPMDIR/BUILD
> mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
> 
> (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C 
> $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x ) @@ -55,7 +56,7 @@ mkdir -p 
> $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
> cp cloud.spec $RPMDIR/SPECS
> -(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" 
> "$DEFVER" "$DEFREL" "$DEFPRE")
> +(cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "$DEFVER" "$DEFREL" 
> +"$DEFPRE" -ba SPECS/cloud.spec)
> exit
> }
> 
> 
> After fixing this, I am able to start the build; unfortunately build 
> getting failed during packaging; observed below error
> 
> 
> Requires(interp): /bin/sh
> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
> rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) 
> <= 3.0.3-1
> Requires(pre): /bin/sh
> Requires: /bin/bash /usr/bin/python cloudstack-management = 4.2.0
> Obsoletes: cloud-aws-api < 4.1.0
> Checking for unpackaged file(s): /usr/lib/rpm/check-files 
> /var/tmp/cloudstack-4.2.0-SNAPSHOT-SNAPSHOT.el5-build
> error: Could not open
> /root/jenkins/build/workspace/XXXXX-4.2-rhel5/XXXXXX/cloudstack/dist/r
> pmbuild/SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm: No such file or 
> directory
> cp: cannot stat
> `/root/jenkins/build/workspace/XXXXXX-4.2-rhel5/XXXXXX/cloudstack/dist
> /rpmbuild/RPMS/x86_64/*.rpm': No such file or directory
> 
> 
> Here build unable to find 
> “SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm”; I physically checked on 
> the build path;  I cannot the folder “RPMS and SRPMS” under … 
> cloudstack/dist/rpmbuild;
> 
> Any idea about this ?
> 
> 
> Regards,
> Rayees
> 

RE: CloudStack 4.2 – Build and Packaging on RHEL 5.4

Posted by Rayees Namathponnan <ra...@citrix.com>.
There are some hardcoded python version (Python2.6)  in cloud.spec file;  

it should be get from environment variable or get from build machines Python version; then only we can support RHEL 5 packaging, since RHEL 5 using Python 2.4.

Regard,
Rayees 


-----Original Message-----
From: Hugo Trippaers [mailto:trippie@gmail.com] 
Sent: Monday, July 22, 2013 10:09 PM
To: dev@cloudstack.apache.org
Subject: Re: CloudStack 4.2 – Build and Packaging on RHEL 5.4

If i remember correctly these directories are not automagically created on redhat 5.x systems.

You need to use the default location in the var directory probably so you need to make some changes to the package script to deal with that.

Cheers,

Hugo

Sent from my iPhone

On 23 jul. 2013, at 05:24, Rayees Namathponnan <ra...@citrix.com> wrote:

> Hi All,
> 
> I am trying to create  4.2  build and  then package on RHEL 5.4,  
> initially  faced some issue with RPM “topdir”,  fixed those issue in 
> local machine (changes are below)
> 
> 
> mkdir -p $RPMDIR/SPECS
> +mkdir -p $RPMDIR/BUILD
> mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
> 
> (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C 
> $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x ) @@ -55,7 +56,7 @@ mkdir -p 
> $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
> cp cloud.spec $RPMDIR/SPECS
> -(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" 
> "$DEFVER" "$DEFREL" "$DEFPRE")
> +(cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "$DEFVER" "$DEFREL" 
> +"$DEFPRE" -ba SPECS/cloud.spec)
> exit
> }
> 
> 
> After fixing this, I am able to start the build; unfortunately build 
> getting failed during packaging; observed below error
> 
> 
> Requires(interp): /bin/sh
> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 
> rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) 
> <= 3.0.3-1
> Requires(pre): /bin/sh
> Requires: /bin/bash /usr/bin/python cloudstack-management = 4.2.0
> Obsoletes: cloud-aws-api < 4.1.0
> Checking for unpackaged file(s): /usr/lib/rpm/check-files 
> /var/tmp/cloudstack-4.2.0-SNAPSHOT-SNAPSHOT.el5-build
> error: Could not open 
> /root/jenkins/build/workspace/XXXXX-4.2-rhel5/XXXXXX/cloudstack/dist/r
> pmbuild/SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm: No such file or 
> directory
> cp: cannot stat 
> `/root/jenkins/build/workspace/XXXXXX-4.2-rhel5/XXXXXX/cloudstack/dist
> /rpmbuild/RPMS/x86_64/*.rpm': No such file or directory
> 
> 
> Here build unable to find 
> “SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm”; I physically checked on 
> the build path;  I cannot the folder “RPMS and SRPMS” under … 
> cloudstack/dist/rpmbuild;
> 
> Any idea about this ?
> 
> 
> Regards,
> Rayees
> 

Re: CloudStack 4.2 – Build and Packaging on RHEL 5.4

Posted by Hugo Trippaers <tr...@gmail.com>.
If i remember correctly these directories are not automagically created on redhat 5.x systems.

You need to use the default location in the var directory probably so you need to make some changes to the package script to deal with that.

Cheers,

Hugo

Sent from my iPhone

On 23 jul. 2013, at 05:24, Rayees Namathponnan <ra...@citrix.com> wrote:

> Hi All,
> 
> I am trying to create  4.2  build and  then package on RHEL 5.4,  initially  faced some issue with RPM “topdir”,  fixed those issue in local machine (changes are below)
> 
> 
> mkdir -p $RPMDIR/SPECS
> +mkdir -p $RPMDIR/BUILD
> mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
> 
> (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
> @@ -55,7 +56,7 @@ mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
> cp cloud.spec $RPMDIR/SPECS
> -(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
> +(cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" -ba SPECS/cloud.spec)
> exit
> }
> 
> 
> After fixing this, I am able to start the build; unfortunately build getting failed during packaging; observed below error
> 
> 
> Requires(interp): /bin/sh
> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) <= 3.0.3-1
> Requires(pre): /bin/sh
> Requires: /bin/bash /usr/bin/python cloudstack-management = 4.2.0
> Obsoletes: cloud-aws-api < 4.1.0
> Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/cloudstack-4.2.0-SNAPSHOT-SNAPSHOT.el5-build
> error: Could not open /root/jenkins/build/workspace/XXXXX-4.2-rhel5/XXXXXX/cloudstack/dist/rpmbuild/SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm: No such file or directory
> cp: cannot stat `/root/jenkins/build/workspace/XXXXXX-4.2-rhel5/XXXXXX/cloudstack/dist/rpmbuild/RPMS/x86_64/*.rpm': No such file or directory
> 
> 
> Here build unable to find “SRPMS/cloudstack-4.2.0-SNAPSHOT.el5.src.rpm”; I physically checked on the build path;  I cannot the folder “RPMS and SRPMS” under … cloudstack/dist/rpmbuild;
> 
> Any idea about this ?
> 
> 
> Regards,
> Rayees
>