From a4fc64ea5634ba8b248a342b984eb15321492588 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 7 Oct 2021 09:18:24 -0400 Subject: [PATCH] Move el9bin build out of spec Since the rpm itself is built in an el7 container, build binary before spec driven build to be compatible. --- confluent_osdeploy/buildrpm | 11 +++++++++++ confluent_osdeploy/confluent_osdeploy.spec.tmpl | 9 ++------- confluent_osdeploy/utils/Makefile | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/confluent_osdeploy/buildrpm b/confluent_osdeploy/buildrpm index 531b49ff..84db3482 100755 --- a/confluent_osdeploy/buildrpm +++ b/confluent_osdeploy/buildrpm @@ -8,4 +8,15 @@ cd .. tar Jcvf confluent_osdeploy.tar.xz confluent_osdeploy mv confluent_osdeploy.tar.xz ~/rpmbuild/SOURCES/ cd - +mkdir -p el9bin/opt/confluent/bin +mkdir -p el9bin/stateless-bin +podman run --privileged --rm -v $(pwd)/utils:/buildutils -i -t fedorabuilder make -C /buildutils +cd utils +mv confluent_imginfo copernicus clortho autocons ../el9bin/opt/confluent/bin +mv start_root urlmount ../el9bin/stateless-bin/ +make clean +cd .. +tar Jcvf confluent_el9bin.tar.xz el9bin/ +mv confluent_el9bin.tar.xz ~/rpmbuild/SOURCES/ +rm -rf el9bin rpmbuild -ba confluent_osdeploy.spec diff --git a/confluent_osdeploy/confluent_osdeploy.spec.tmpl b/confluent_osdeploy/confluent_osdeploy.spec.tmpl index d6bdccaa..dd639762 100644 --- a/confluent_osdeploy/confluent_osdeploy.spec.tmpl +++ b/confluent_osdeploy/confluent_osdeploy.spec.tmpl @@ -6,6 +6,7 @@ Summary: OS Deployment support for confluent License: Apache2 URL: https://hpc.lenovo.com/ Source0: confluent_osdeploy.tar.xz +Source1: confluent_el9bin.tar.xz BuildArch: noarch Requires: confluent_ipxe mtools tar BuildRoot: /tmp @@ -17,18 +18,12 @@ This contains support utilities for enabling deployment of x86_64 architecture s %define debug_package %{nil} %prep -%setup -n confluent_osdeploy +%setup -n confluent_osdeploy -a 1 %build -mkdir -p el9bin/opt/confluent/bin -mkdir -p el9bin/stateless-bin mkdir -p opt/confluent/bin mkdir -p stateless-bin cd utils -podman run --privileged --rm -v $(pwd):/buildutils -i -t fedorabuilder make -C /buildutils -cp confluent_imginfo copernicus clortho autocons ../el9bin/opt/confluent/bin -cp start_root urlmount ../el9bin/stateless-bin/ -make clean make all cp confluent_imginfo copernicus clortho autocons ../opt/confluent/bin cp start_root urlmount ../stateless-bin/ diff --git a/confluent_osdeploy/utils/Makefile b/confluent_osdeploy/utils/Makefile index e863b810..516aa8f2 100644 --- a/confluent_osdeploy/utils/Makefile +++ b/confluent_osdeploy/utils/Makefile @@ -17,4 +17,4 @@ $(TARGETS): % : %.c strip -s $@ clean: - rm $(TARGETS) clortho + rm $(TARGETS) clortho urlmount