From a90cd8515e8b3496ee3cfd6507ac82430fe59d3f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 27 Jan 2023 10:43:29 -0500 Subject: [PATCH] Tweak osdeploy for ARM setup --- confluent_osdeploy/buildrpm-aarch64 | 32 +++++++++++++++++++ .../confluent_osdeploy-aarch64.spec.tmpl | 11 +++---- 2 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 confluent_osdeploy/buildrpm-aarch64 diff --git a/confluent_osdeploy/buildrpm-aarch64 b/confluent_osdeploy/buildrpm-aarch64 new file mode 100644 index 00000000..867c0102 --- /dev/null +++ b/confluent_osdeploy/buildrpm-aarch64 @@ -0,0 +1,32 @@ +VERSION=`git describe|cut -d- -f 1` +NUMCOMMITS=`git describe|cut -d- -f 2` +if [ "$NUMCOMMITS" != "$VERSION" ]; then + VERSION=$VERSION.dev$NUMCOMMITS.g`git describe|cut -d- -f 3` +fi +sed -e "s/#VERSION#/$VERSION/" confluent_osdeploy-aarch64.spec.tmpl > confluent_osdeploy-aarch64.spec +cd .. +cp ../LICENSE . +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 +mkdir -p el8bin/opt/confluent/bin +mkdir -p el8bin/stateless-bin +podman run --privileged --rm -v $(pwd)/utils:/buildutils -i -t el9builder make -C /buildutils +cd utils +mv confluent_imginfo copernicus clortho autocons ../el9bin/opt/confluent/bin +mv start_root urlmount ../el9bin/stateless-bin/ +cd .. +podman run --privileged --rm -v $(pwd)/utils:/buildutils -i -t el8builder make -C /buildutils +cd utils +mv confluent_imginfo copernicus clortho autocons ../el8bin/opt/confluent/bin +mv start_root urlmount ../el8bin/stateless-bin/ +cd .. +tar Jcvf confluent_el9bin.tar.xz el9bin/ +tar Jcvf confluent_el8bin.tar.xz el8bin/ +mv confluent_el8bin.tar.xz ~/rpmbuild/SOURCES/ +mv confluent_el9bin.tar.xz ~/rpmbuild/SOURCES/ +rm -rf el9bin +rm -rf el8bin +rpmbuild -ba confluent_osdeploy-aarch64.spec diff --git a/confluent_osdeploy/confluent_osdeploy-aarch64.spec.tmpl b/confluent_osdeploy/confluent_osdeploy-aarch64.spec.tmpl index d282acad..c5ce6710 100644 --- a/confluent_osdeploy/confluent_osdeploy-aarch64.spec.tmpl +++ b/confluent_osdeploy/confluent_osdeploy-aarch64.spec.tmpl @@ -7,6 +7,7 @@ License: Apache2 URL: https://hpc.lenovo.com/ Source0: confluent_osdeploy.tar.xz Source1: confluent_el9bin.tar.xz +Source2: confluent_el8bin.tar.xz BuildArch: noarch Requires: confluent_ipxe mtools tar BuildRoot: /tmp @@ -23,11 +24,7 @@ This contains support utilities for enabling deployment of aarch64 architecture %build mkdir -p opt/confluent/bin mkdir -p stateless-bin -cd utils -make all -cp confluent_imginfo copernicus clortho autocons ../opt/confluent/bin -cp start_root urlmount ../stateless-bin/ -cd .. +cp -a el8bin/* . ln -s el8 el9 for os in rhvh4 el7 genesis el8 suse15 ubuntu20.04 ubuntu22.04 coreos el9; do mkdir ${os}out @@ -78,7 +75,7 @@ cp -a esxi7 esxi8 %install mkdir -p %{buildroot}/opt/confluent/share/licenses/confluent_osdeploy/ -cp LICENSE %{buildroot}/opt/confluent/share/licenses/confluent_osdeploy/ +#cp LICENSE %{buildroot}/opt/confluent/share/licenses/confluent_osdeploy/ for os in rhvh4 el7 el8 el9 genesis suse15 ubuntu20.04 ubuntu22.04 esxi6 esxi7 esxi8 coreos; do mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs cp ${os}out/addons-aarch64.* %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs @@ -91,4 +88,4 @@ find %{buildroot}/opt/confluent/lib/osdeploy/ -name .gitignore -exec rm -f {} + %files /opt/confluent/lib/osdeploy -%license /opt/confluent/share/licenses/confluent_osdeploy/LICENSE +#%license /opt/confluent/share/licenses/confluent_osdeploy/LICENSE