Hi all,
as mentioned by Jarrod on the mailing list with respect to building xCAT, and having external repos, I have been trying to buid the src.rpms from the repos on copr, and OBS without any luck.
After delving, I found that the following patch, allowed me to first create the src.rpm, and then use copr to build
diff --git a/makerpm b/makerpm
index 2266e78..224bf44 100755
--- a/makerpm
+++ b/makerpm
@@ -98,6 +98,7 @@ function makexcat {
echo "Unrecognized rpm: $RPMNAME"
exit 2
fi
+ cp Version $RPMROOT/SOURCES
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER-snap*.$ARCH.rpm $EMBEDTXT..."
diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec
index 54bea22..f47dd1c 100644
--- a/xCAT/xCAT.spec
+++ b/xCAT/xCAT.spec
@@ -1,6 +1,6 @@
Summary: Meta-package for a common, default xCAT setup
Name: xCAT
-Version: %(cat Version)
+Version: %(cat %_sourcedir/Version)
Release: snap%(date +"%Y%m%d%H%M")
License: EPL
Group: Applications/System
@@ -14,6 +14,7 @@ Source1: xcat.conf
Source2: postscripts.tar.gz
Source3: templates.tar.gz
Source5: xCATMN
+Source8: Version
%ifos linux
Source4: prescripts.tar.gz
After this, doing the makerpm xCAT x86_64 creates the srpm, and allows me to import it correctly into copr, as shown in the build in the URL below
https://copr.fedoraproject.org/coprs/arifali/xcat-org/builds/
If you need me to continue to update the rest, and provide a patch if that makes sense
/cc @jbjohnso
I have also tried the OBS system on opensuse, and here are my links to the builds
https://build.opensuse.org/package/show/home:arif-ali80/xCAT
https://software.opensuse.org/download.html?project=home%3Aarif-ali80&package=xCAT
We need to update the spec files for suse so that the defattr is used for files, otherwise it doesn't build.
Let me know your thoughts
More updates,
I have been experimenting on the OBS and trying to build xCAT-server and xCAT-vlan as a test, and they seem to be ok, after a few modifications to the spec files
You can see the relevant builds, and mods in the following URLs
https://build.opensuse.org/package/show/home:arif-ali80/xCAT-server
https://build.opensuse.org/package/show/home:arif-ali80/xCAT-vlan
I have managed to build the ubuntu RPMs as well, just need to fine tune the debian rules and spec files to build for Debian and SLES, and then we should be good to go on the SuSE's OBS system
Thanks Arif, the development is working on this based on the discussion on mailing list and the information in this bug.
Hi Guang,
Below is a full diff of all the spec files that need to be changed for this to work. This are the 6 packages I have tested and got working. The only issue I faced was with perl-xCAT, as that was grabbing information from git; as there was no easy way of doing that, I temporarily changed the value to obs-build. Also the per-xCAT needed BuildRequires for it to build correctly as well.
I hope that this is useful
xCAT 2.10 is now in restricted mode, moving this bug to 2.11 for further investigation.