@@ -25,19 +25,29 @@ XSCONTAINER_STAMP := $(MY_OBJ_DIR)/.rpmbuild.stamp
2525DOM0_RPMS :=
2626# source packages
2727DOM0_SRPMS :=
28- # source packages compiled and installed on dom0
29- DOM0_BUILD_SRPMS :=
28+
29+ PARAMIKO_NAME = python-paramiko
30+ PARAMIKO_VERSION = 1.7.6-1
31+ PARAMIKO_FULLNAME = $(PARAMIKO_NAME ) -$(PARAMIKO_VERSION )
32+ PARAMIKO_SOURCE = /distfiles/xscontainer/epel/2015-02-13/5/SRPMS/$(PARAMIKO_FULLNAME ) .el5.src.rpm
33+ GMP_NAME = gmp
34+ GMP_VERSION = 5.1.1-5
35+ GMP_FULLNAME = $(GMP_NAME ) -$(GMP_VERSION )
36+ GMP_SOURCE = /distros/CentOS/7.0.1406/os/Source/SPackages/$(GMP_FULLNAME ) .el7.src.rpm
37+ PYCRYPTO_NAME = python-crypto
38+ PYCRYPTO_VERSION = 2.6.1-1
39+ PYCRYPTO_FULLNAME = $(PYCRYPTO_NAME ) -$(PYCRYPTO_VERSION )
40+ PYCRYPTO_SOURCE = /distros/CentOS/7.0.1406/EPEL-20140902/SRPMS/p/$(PYCRYPTO_FULLNAME ) .el7.src.rpm
3041
3142DOM0_RPMS += /distros/CentOS/5.10/os/$(DOMAIN0_ARCH ) /CentOS/mkisofs-2.01-10.7.el5.$(DOMAIN0_ARCH ) .rpm
3243DOM0_SRPMS += /distros/CentOS/5.10/os/SRPMS/cdrtools-2.01-10.7.el5.src.rpm
33- DOM0_RPMS += /distros/CentOS/5.10/os/$(DOMAIN0_ARCH ) /CentOS/gmp-4.1.4-10.el5.$(DOMAIN0_ARCH ) .rpm
34- DOM0_SRPMS += /distros/CentOS/5.10/os/SRPMS/gmp-4.1.4-10.el5.src.rpm
35- DOM0_RPMS += /usr/src/redhat/RPMS/noarch/python-paramiko-1.7.6-1.noarch.rpm
36- DOM0_SRPMS += /distfiles/xscontainer/epel/2015-02-13/5/SRPMS/python-paramiko-1.7.6-1.el5.src.rpm
37- DOM0_RPMS += /usr/src/redhat/RPMS/$(DOMAIN0_ARCH ) /python-crypto-2.0.1-5.$(DOMAIN0_ARCH ) .rpm
38- DOM0_SRPMS += /distfiles/xscontainer/epel/2015-02-13/5/SRPMS/python-crypto-2.0.1-5.el5.src.rpm
39- DOM0_BUILD_SRPMS += /distfiles/xscontainer/epel/2015-02-13/5/SRPMS/python-crypto-2.0.1-5.el5.src.rpm
40- DOM0_BUILD_SRPMS += /distfiles/xscontainer/epel/2015-02-13/5/SRPMS/python-paramiko-1.7.6-1.el5.src.rpm
44+ DOM0_RPMS += /usr/src/redhat/RPMS/noarch/$(PARAMIKO_FULLNAME ) .noarch.rpm
45+ DOM0_SRPMS += $(PARAMIKO_SOURCE )
46+ DOM0_RPMS += /usr/src/redhat/RPMS/$(DOMAIN0_ARCH ) /$(GMP_FULLNAME ) .$(DOMAIN0_ARCH ) .rpm
47+ DOM0_SRPMS += $(GMP_SOURCE )
48+ DOM0_RPMS += /usr/src/redhat/RPMS/$(DOMAIN0_ARCH ) /$(PYCRYPTO_FULLNAME ) .$(DOMAIN0_ARCH ) .rpm
49+ DOM0_SRPMS += $(PYCRYPTO_SOURCE )
50+
4151
4252.PHONY : build
4353build : $(XSCONTAINER_STAMP ) $(SUPP_PACK )
@@ -63,13 +73,32 @@ clean:
6373 rm -f $(OUTPUT )
6474 $(MAKE ) -C $(REPO ) clean
6575
76+ .PHONY : $(MY_SOURCES ) /dependencies
77+ $(MY_SOURCES ) /dependencies :
78+ # Paramiko can be build straight away
79+ rpmbuild --rebuild $(PARAMIKO_SOURCE )
80+ # GMP needs the nomd5-workaround as it is from el7
81+ rpm -i $(GMP_SOURCE ) --nomd5
82+ rpmbuild -bs /usr/src/redhat/SPECS/$(GMP_NAME ) .spec
83+ rpmbuild --rebuild /usr/src/redhat/SRPMS/$(GMP_FULLNAME ) .src.rpm
84+ # Extract GMP for compiling pycrypto - avoid installing inside the build system
85+ mkdir -p /usr/src/redhat/BUILD/gmp-root
86+ (cd /usr/src/redhat/BUILD/gmp-root && rpm2cpio /usr/src/redhat/RPMS/x86_64/gmp-devel-5.1.1-5.x86_64.rpm | cpio -idmv)
87+ (cd /usr/src/redhat/BUILD/gmp-root && rpm2cpio /usr/src/redhat/RPMS/x86_64/gmp-5.1.1-5.x86_64.rpm | cpio -idmv)
88+ # pycrypto needs the nomd5-workaround as it is from el7
89+ rpm -i $(PYCRYPTO_SOURCE ) --nomd5
90+ # patch pycrypto to use the gmp extracted in the above
91+ patch -d / -p1 < python-crypto-gmp-version-workaround.patch
92+ rpmbuild -bs /usr/src/redhat/SPECS/$(PYCRYPTO_NAME ) .spec --nodeps
93+ rpmbuild --rebuild /usr/src/redhat/SRPMS/$(PYCRYPTO_FULLNAME ) .src.rpm --nodeps
94+ touch $@
95+
6696.PHONY : $(SUPP_PACK )
67- $(SUPP_PACK ) : $(XSCONTAINER_STAMP )
97+ $(SUPP_PACK ) : $(XSCONTAINER_STAMP ) $( MY_SOURCES ) /dependencies
6898 mkdir -p $(MY_OBJ_DIR ) /ISO-SOURCES
6999 cp -f $(MY_OUTPUT_DIR ) /$(SRPM ) $(MY_OBJ_DIR ) /ISO-SOURCES/
70100 cp -f $(DOM0_SRPMS ) $(MY_OBJ_DIR ) /ISO-SOURCES/
71101 mkisofs -A " Citrix" -V " xscontainer" -J -joliet-long -r -o $(SUPP_PACK_SOURCES ) $(MY_OBJ_DIR ) /ISO-SOURCES
72- @for f in $(DOM0_BUILD_SRPMS ) ; do rpmbuild --rebuild $$ f; done
73102 ./make-supp-pack --out $(dir $@ ) \
74103 --pdn $(PRODUCT_BRAND ) \
75104 --pdv $(COMPLETE_VERSION ) \
0 commit comments