Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[build] Make a separate noarch.spec.in for noarch RPMs

Unfortunately old versions of RPM don't seem to like having noarch
subpackages. Work around this with a whole new spec file.
Unfortunately this means compiling the code twice.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
  • Loading branch information...
commit 06be7e43aebdd933d7a45913804209ac00a46f5b 1 parent cddf779
@djs55 djs55 authored
View
16 Makefile
@@ -74,6 +74,10 @@ lib-uninstall:
sdk-install: doc
omake sdk-install
+.PHONY: noarch-install
+noarch-install: doc
+ omake noarch-install
+
.PHONY: clean
clean:
omake clean
@@ -139,23 +143,27 @@ ocaml/fhs.ml :
.PHONY: clean
clean:
-.PHONY: xapi.spec
xapi.spec: xapi.spec.in
+noarch.spec: noarch.spec.in
+
+%.spec: %.spec.in
sed -e 's/@RPM_RELEASE@/$(shell git rev-list HEAD | wc -l)/g' < $< > $@
sed -i "s!@OPTDIR@!${OPTDIR}!g" $@
.PHONY: srpm
-srpm: xapi.spec
+srpm: xapi.spec noarch.spec
mkdir -p $(RPM_SOURCESDIR) $(RPM_SPECSDIR) $(RPM_SRPMSDIR)
while ! [ -d .git ]; do cd ..; done; \
git archive --prefix=xapi-0.2/ --format=tar HEAD | bzip2 -z > $(RPM_SOURCESDIR)/xapi-0.2.tar.bz2 # xen-api/Makefile
+ git archive --prefix=xapi-noarch-0.2/ --format=tar HEAD | bzip2 -z > $(RPM_SOURCESDIR)/xapi-noarch-0.2.tar.bz2 # xen-api/Makefile
cp $(JQUERY) $(JQUERY_TREEVIEW) $(RPM_SOURCESDIR)
make -C $(REPO) version
rm -f $(RPM_SOURCESDIR)/xapi-version.patch
(cd $(REPO); diff -u /dev/null ocaml/util/version.ml > $(RPM_SOURCESDIR)/xapi-version.patch) || true
- cp -f xapi.spec $(RPM_SPECSDIR)/
- chown root.root $(RPM_SPECSDIR)/xapi.spec || true
+ cp -f xapi.spec noarch.spec $(RPM_SPECSDIR)/
+ chown root.root $(RPM_SPECSDIR)/xapi.spec $(RPM_SPECSDIR)/noarch.spec || true
$(RPMBUILD) -bs --nodeps $(RPM_SPECSDIR)/xapi.spec
+ $(RPMBUILD) -bs --nodeps $(RPM_SPECSDIR)/noarch.spec
.PHONY: build
View
4 javascript/OMakefile
@@ -1,6 +1,6 @@
-.PHONY: install
-install:
+.PHONY: noarch-install
+noarch-install:
mkdir -p $(DESTDIR)$(OPTDIR)/debug/www
cp *.js *.html *.css $(DESTDIR)$(OPTDIR)/debug/www
mkdir -p $(DESTDIR)$(OPTDIR)/debug/www/jquery
View
6 mk/Makefile
@@ -69,7 +69,7 @@ $(OUTPUT_CLI_RT) $(OUTPUT_SDK): $(MY_MAIN_PACKAGES)/.dirstamp $(RPM_DIRECTORIES)
# extract the xapi-docs
mkdir -p $(OUTPUT_SDK_DIR)/tmp
- (cd $(OUTPUT_SDK_DIR)/tmp; rpm2cpio $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-docs*.rpm | cpio -i --make-directories; tar -zcf $(OUTPUT_SDK) .;zip -9rv $(OUTPUT_WEBZIP) .)
+ (cd $(OUTPUT_SDK_DIR)/tmp; rpm2cpio $(RPM_RPMSDIR)/noarch/xapi-noarch-docs*.rpm | cpio -i --make-directories; tar -zcf $(OUTPUT_SDK) .;zip -9rv $(OUTPUT_WEBZIP) .)
rm -rf $(OUTPUT_SDK_DIR)/tmp
# Unpack the xapi-datamodel-devel RPM for now
@@ -82,11 +82,11 @@ $(OUTPUT_CLI_RT) $(OUTPUT_SDK): $(MY_MAIN_PACKAGES)/.dirstamp $(RPM_DIRECTORIES)
# Make sure the right RPMs appear on the install CD
mkdir $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-core-*.rpm $(MY_MAIN_PACKAGES)
- cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-backend-udev-*.rpm $(MY_MAIN_PACKAGES)
+ cp $(RPM_RPMSDIR)/noarch/xapi-noarch-backend-udev-*.rpm $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-networkd-*.rpm $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-squeezed-*.rpm $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-tests-*.rpm $(MY_MAIN_PACKAGES)
- cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-www-*.rpm $(MY_MAIN_PACKAGES)
+ cp $(RPM_RPMSDIR)/noarch/xapi-noarch-www-*.rpm $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-xe-*.rpm $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-xenops-*.rpm $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-xenopsd-*.rpm $(MY_MAIN_PACKAGES)
View
133 noarch.spec.in
@@ -0,0 +1,133 @@
+# -*- rpm-spec -*-
+
+Summary: xapi-noarch - xen toolstack for XCP
+Name: xapi-noarch
+Version: 0.2
+Release: @RPM_RELEASE@
+Group: System/Hypervisor
+License: LGPL+linking exception
+URL: http://www.xen.org
+Source0: xapi-noarch-%{version}.tar.bz2
+Source1: jquery-1.1.3.1.pack.js
+Source2: jquery.treeview.zip
+Patch0: xapi-version.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: pam-devel tetex-latex xapi-libs-devel ocaml omake ocaml-findlib ocaml-xmlm ocaml-type-conv ocaml-xmlm-devel xen-devel zlib-devel
+BuildArch: noarch
+
+%description
+XCP toolstack.
+
+%package backend-udev
+Summary: The udev rules and scripts needed by a network/block driver domain
+Group: System/Hypervisor
+Requires: util-linux ethtool bridge-utils iproute
+# + openvswitch
+# + a package with xenstore-{ls,read,write}
+
+%description backend-udev
+The udev rules are triggered by blkback/netback and implement part of the disk/network hotplug protocol. All driver domains must install this package (or a similar one)
+
+%package www
+Summary: The XenAPI www interface
+Group: System/Hypervisor
+
+%description www
+This package contains the XenAPI www interface
+
+%package docs
+Summary: Xen-API documentation and examples
+Group: Development/Documentation
+
+%description docs
+This package contains Xen-API documentation and examples in several programming languages.
+
+%prep
+%setup -q
+cp $RPM_SOURCE_DIR/jquery* $RPM_BUILD_DIR/xapi-noarch-0.2/ocaml/idl
+%patch0 -p0 -b xapi-version.patch
+
+%build
+COMPILE_JAVA=no %{__make}
+
+%install
+rm -rf %{buildroot}
+
+DESTDIR=$RPM_BUILD_ROOT %{__make} noarch-install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files backend-udev
+%defattr(-,root,root,-)
+/etc/udev/rules.d/xen-backend.rules
+/etc/udev/rules.d/xen-frontend.rules
+/etc/udev/xen-backend.rules
+/etc/udev/xen-frontend.rules
+/etc/xensource/scripts/block-frontend
+/etc/xensource/scripts/tap
+/etc/xensource/scripts/vif
+/etc/xensource/scripts/block
+@OPTDIR@/libexec/setup-vif-rules
+
+%files www
+%defattr(-,root,root,-)
+#@OPTDIR@/debug/www/XenServerConsole.jar
+@OPTDIR@/debug/www/api.js
+@OPTDIR@/debug/www/apicall.css
+@OPTDIR@/debug/www/apicall.js
+@OPTDIR@/debug/www/construct_tree.js
+@OPTDIR@/debug/www/devweb.css
+@OPTDIR@/debug/www/devweb.js
+@OPTDIR@/debug/www/editables.js
+@OPTDIR@/debug/www/graphs.js
+@OPTDIR@/debug/www/haplan.css
+@OPTDIR@/debug/www/haplan.js
+@OPTDIR@/debug/www/images/xen_logo.gif
+@OPTDIR@/debug/www/index.html
+@OPTDIR@/debug/www/jquery/jqDnR.css
+@OPTDIR@/debug/www/jquery/jqDnR.js
+@OPTDIR@/debug/www/jquery/jqModal.css
+@OPTDIR@/debug/www/jquery/jqModal.js
+@OPTDIR@/debug/www/jquery/jquery-1.3.2.js
+@OPTDIR@/debug/www/jquery/jquery-dom.js
+@OPTDIR@/debug/www/jquery/jquery.autocomplete.css
+@OPTDIR@/debug/www/jquery/jquery.autocomplete.js
+@OPTDIR@/debug/www/jquery/jquery.bgiframe.js
+@OPTDIR@/debug/www/jquery/jquery.color.js
+@OPTDIR@/debug/www/jquery/jquery.cookie.js
+@OPTDIR@/debug/www/jquery/jquery.jeditable.js
+@OPTDIR@/debug/www/jquery/jquery.rpc.js
+@OPTDIR@/debug/www/jquery/jquery.treeview.js
+@OPTDIR@/debug/www/main.js
+@OPTDIR@/debug/www/messages.js
+@OPTDIR@/debug/www/networks.css
+@OPTDIR@/debug/www/networks.js
+@OPTDIR@/debug/www/objectviewoverrides.js
+@OPTDIR@/debug/www/offline.js
+@OPTDIR@/debug/www/process_rrd.js
+@OPTDIR@/debug/www/tree.css
+@OPTDIR@/debug/www/vmsearch.js
+@OPTDIR@/debug/www/xenapi.js
+
+%files docs
+%defattr(-,root,root,-)
+/usr/share/doc/xapi/*
+#/usr/share/doc/xapi/client-examples/*/*
+#/usr/share/doc/xapi/docs/html/API/Classes/*/index.html
+#/usr/share/doc/xapi/docs/html/API/Classes/*/Explicit/*
+#/usr/share/doc/xapi/docs/html/API/Classes/*/Implicit/*
+#/usr/share/doc/xapi/docs/html/API/Classes/*/Fields/*
+#/usr/share/doc/xapi/docs/html/*
+#/usr/share/doc/xapi/docs/html/images/*
+#/usr/share/doc/xapi/docs/pdf/xenenterpriseapi.pdf
+
+%changelog
+
+
+
+
+
+
+
+
View
4 ocaml/doc/OMakefile
@@ -19,7 +19,7 @@ doc: jsapi
sdk-install: doc
mkdir -p $(SDK)/docs/html/xcp
sh -c 'cp -r -L api $(SDK)/docs/html/xcp/'
- sh -c 'cp -r -L content $(SDK)/docs/html/xcp/'
+ sh -c 'cp -r -L content $(SDK)/docs/html/xcp/ || true'
cp *.js *.html *.css *.png $(SDK)/docs/html/xcp/
mkdir -p $(SDK)/docs/html/xenserver
@@ -27,6 +27,8 @@ sdk-install: doc
cp *.js *.html *.css *.png $(SDK)/docs/html/xenserver/
cp xenserver/* $(SDK)/docs/html/xenserver/
+noarch-install: sdk-install
+
.PHONY: clean
clean:
rm -f *~ *.cmi *.cmx *.cmo *.a *.cma *.cmxa *.run *.opt *.annot *.o *.omc
View
4 ocaml/idl/js_backend/OMakefile
@@ -27,7 +27,7 @@ js_binding: main
./main > api.js
cp api.js ../../../js/
-.PHONY: install
-install:
+.PHONY: noarch-install
+noarch-install:
mkdir -p $(DESTDIR)$(OPTDIR)/debug/www
cp api.js $(DESTDIR)$(OPTDIR)/debug/www
View
26 scripts/OMakefile
@@ -1,5 +1,20 @@
.SUBDIRS: examples templates host-backup-restore poweron
+.PHONY: noarch-install
+noarch-install:
+ mkdir -p $(DESTDIR)/etc/udev ### FHS_FIXME
+ $(IPROG) xen-backend.rules $(DESTDIR)/etc/udev ### FHS_FIXME
+ $(IPROG) xen-frontend.rules $(DESTDIR)/etc/udev ### FHS_FIXME
+ mkdir -p $(DESTDIR)/etc/udev/rules.d ### FHS_FIXME
+ sh -c \
+ 'cd $(DESTDIR)/etc/udev/rules.d; \
+ ln -sf ../xen-backend.rules; \
+ ln -sf ../xen-frontend.rules'
+ mkdir -p $(DESTDIR)$(SCRIPTSDIR)
+ $(IPROG) block-frontend vif tap block $(DESTDIR)$(SCRIPTSDIR)
+ mkdir -p $(DESTDIR)$(LIBEXECDIR)
+ $(IPROG) setup-vif-rules $(DESTDIR)$(LIBEXECDIR)
+
.PHONY: install
install:
mkdir -p $(DESTDIR)$(BINDIR)
@@ -56,9 +71,6 @@ install:
$(IPROG) mpathalert-daemon $(DESTDIR)$(ETCDIR)/master.d/03-mpathalert-daemon
mkdir -p $(DESTDIR)/etc/sysconfig
$(IPROG) sysconfig-xapi $(DESTDIR)/etc/sysconfig/xapi
- mkdir -p $(DESTDIR)/etc/udev ### FHS_FIXME
- $(IPROG) xen-backend.rules $(DESTDIR)/etc/udev ### FHS_FIXME
- $(IPROG) xen-frontend.rules $(DESTDIR)/etc/udev ### FHS_FIXME
$(IPROG) generate_ssl_cert $(DESTDIR)$(LIBEXECDIR)
$(IPROG) fix_firewall.sh $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(OPTDIR)/debug
@@ -73,13 +85,6 @@ install:
$(IPROG) xe-get-network-backend $(DESTDIR)$(BINDIR)
$(IPROG) static-vdis $(DESTDIR)$(BINDIR)
$(IPROG) with-vdi $(DESTDIR)$(OPTDIR)/debug
- mkdir -p $(DESTDIR)/etc/udev/rules.d ### FHS_FIXME
- sh -c \
- 'cd $(DESTDIR)/etc/udev/rules.d; \
- ln -sf ../xen-backend.rules; \
- ln -sf ../xen-frontend.rules'
- mkdir -p $(DESTDIR)$(SCRIPTSDIR)
- $(IPROG) block-frontend vif tap block $(DESTDIR)$(SCRIPTSDIR)
$(IPROG) pool.conf $(DESTDIR)$(ETCDIR)
mkdir -p $(DESTDIR)/etc/pam.d
$(IPROG) pam.d-xapi $(DESTDIR)/etc/pam.d/xapi
@@ -117,7 +122,6 @@ install:
mkdir -p $(DESTDIR)$(HOOKSDIR)/host-post-declare-dead
$(IPROG) 10resetvdis $(DESTDIR)$(HOOKSDIR)/host-post-declare-dead
$(IPROG) pci-info $(DESTDIR)$(LIBEXECDIR)
- $(IPROG) setup-vif-rules $(DESTDIR)$(LIBEXECDIR)
.PHONY: sdk-install
sdk-install: install
View
93 xapi.spec.in
@@ -24,16 +24,6 @@ Group: System/Hypervisor
%description core
This package contains the xapi toolstack.
-%package backend-udev
-Summary: The udev rules and scripts needed by a network/block driver domain
-Group: System/Hypervisor
-Requires: util-linux ethtool bridge-utils iproute
-# + openvswitch
-# + a package with xenstore-{ls,read,write}
-
-%description backend-udev
-The udev rules are triggered by blkback/netback and implement part of the disk/network hotplug protocol. All driver domains must install this package (or a similar one)
-
%package xe
Summary: The xapi toolstack CLI
Group: System/Hypervisor
@@ -41,13 +31,6 @@ Group: System/Hypervisor
%description xe
The command-line interface for controlling XCP hosts.
-%package www
-Summary: The XenAPI www interface
-Group: System/Hypervisor
-
-%description www
-This package contains the XenAPI www interface
-
%package tests
Summary: Toolstack test programs
Group: System/Hypervisor
@@ -108,16 +91,8 @@ Group: Development/Libraries
This package contains the internal xapi datamodel as a library suitable
for writing additional code generators.
-%package docs
-Summary: Xen-API documentation and examples
-Group: Development/Documentation
-
-%description docs
-This package contains Xen-API documentation and examples in several programming languages.
-
%prep
%setup -q
-cp $RPM_SOURCE_DIR/jquery* $RPM_BUILD_DIR/xapi-0.2/ocaml/idl
%patch0 -p0 -b xapi-version.patch
%build
@@ -128,7 +103,6 @@ COMPILE_JAVA=no %{__make} test
rm -rf %{buildroot}
DESTDIR=$RPM_BUILD_ROOT %{__make} install
-DESTDIR=$RPM_BUILD_ROOT %{__make} sdk-install
%clean
rm -rf $RPM_BUILD_ROOT
@@ -166,7 +140,6 @@ rm -rf $RPM_BUILD_ROOT
/etc/rc.d/init.d/xapi-domains
/etc/rc.d/init.d/xapissl
/etc/rc.d/init.d/xenservices
-/etc/rc.d/init.d/sdkinit
/etc/rc.d/init.d/genptoken
/etc/sysconfig/perfmon
/etc/sysconfig/xapi
@@ -286,24 +259,10 @@ rm -rf $RPM_BUILD_ROOT
/usr/lib/python2.4/site-packages/inventory.py
/usr/lib/python2.4/site-packages/inventory.pyo
/usr/lib/python2.4/site-packages/inventory.pyc
-%exclude /usr/lib/python2.4/site-packages/xen/*
-%exclude /usr/lib/python2.4/site-packages/xen/lowlevel/*
/var/xapi/udhcpd.skel
@OPTDIR@/debug/rbac_static.csv
/etc/xapi.d/host-post-declare-dead/10resetvdis
-%files backend-udev
-%defattr(-,root,root,-)
-/etc/udev/rules.d/xen-backend.rules
-/etc/udev/rules.d/xen-frontend.rules
-/etc/udev/xen-backend.rules
-/etc/udev/xen-frontend.rules
-/etc/xensource/scripts/block-frontend
-/etc/xensource/scripts/tap
-/etc/xensource/scripts/vif
-/etc/xensource/scripts/block
-@OPTDIR@/libexec/setup-vif-rules
-
%files xe
%defattr(-,root,root,-)
@OPTDIR@/bin/xe
@@ -364,46 +323,6 @@ rm -rf $RPM_BUILD_ROOT
@OPTDIR@/debug/with-vdi
@OPTDIR@/debug/xs
-%files www
-%defattr(-,root,root,-)
-#@OPTDIR@/debug/www/XenServerConsole.jar
-@OPTDIR@/debug/www/api.js
-@OPTDIR@/debug/www/apicall.css
-@OPTDIR@/debug/www/apicall.js
-@OPTDIR@/debug/www/construct_tree.js
-@OPTDIR@/debug/www/devweb.css
-@OPTDIR@/debug/www/devweb.js
-@OPTDIR@/debug/www/editables.js
-@OPTDIR@/debug/www/graphs.js
-@OPTDIR@/debug/www/haplan.css
-@OPTDIR@/debug/www/haplan.js
-@OPTDIR@/debug/www/images/xen_logo.gif
-@OPTDIR@/debug/www/index.html
-@OPTDIR@/debug/www/jquery/jqDnR.css
-@OPTDIR@/debug/www/jquery/jqDnR.js
-@OPTDIR@/debug/www/jquery/jqModal.css
-@OPTDIR@/debug/www/jquery/jqModal.js
-@OPTDIR@/debug/www/jquery/jquery-1.3.2.js
-@OPTDIR@/debug/www/jquery/jquery-dom.js
-@OPTDIR@/debug/www/jquery/jquery.autocomplete.css
-@OPTDIR@/debug/www/jquery/jquery.autocomplete.js
-@OPTDIR@/debug/www/jquery/jquery.bgiframe.js
-@OPTDIR@/debug/www/jquery/jquery.color.js
-@OPTDIR@/debug/www/jquery/jquery.cookie.js
-@OPTDIR@/debug/www/jquery/jquery.jeditable.js
-@OPTDIR@/debug/www/jquery/jquery.rpc.js
-@OPTDIR@/debug/www/jquery/jquery.treeview.js
-@OPTDIR@/debug/www/main.js
-@OPTDIR@/debug/www/messages.js
-@OPTDIR@/debug/www/networks.css
-@OPTDIR@/debug/www/networks.js
-@OPTDIR@/debug/www/objectviewoverrides.js
-@OPTDIR@/debug/www/offline.js
-@OPTDIR@/debug/www/process_rrd.js
-@OPTDIR@/debug/www/tree.css
-@OPTDIR@/debug/www/vmsearch.js
-@OPTDIR@/debug/www/xenapi.js
-
%files tests
%defattr(-,root,root,-)
/etc/xapi.d/plugins/lvhdrt-helper
@@ -430,18 +349,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
/usr/lib/ocaml/xapi-datamodel/*
-%files docs
-%defattr(-,root,root,-)
-/usr/share/doc/xapi/*
-#/usr/share/doc/xapi/client-examples/*/*
-#/usr/share/doc/xapi/docs/html/API/Classes/*/index.html
-#/usr/share/doc/xapi/docs/html/API/Classes/*/Explicit/*
-#/usr/share/doc/xapi/docs/html/API/Classes/*/Implicit/*
-#/usr/share/doc/xapi/docs/html/API/Classes/*/Fields/*
-#/usr/share/doc/xapi/docs/html/*
-#/usr/share/doc/xapi/docs/html/images/*
-#/usr/share/doc/xapi/docs/pdf/xenenterpriseapi.pdf
-
%changelog
Please sign in to comment.
Something went wrong with that request. Please try again.