diff --git a/confluent_osdeploy/confluent_osdeploy.spec.tmpl b/confluent_osdeploy/confluent_osdeploy.spec.tmpl index a39e540a..1eb70404 100644 --- a/confluent_osdeploy/confluent_osdeploy.spec.tmpl +++ b/confluent_osdeploy/confluent_osdeploy.spec.tmpl @@ -21,9 +21,11 @@ This contains support utilities for enabling deployment of x86_64 architecture s %build mkdir -p opt/confluent/bin +mkdir -p stateless-bin cd utils make all cp copernicus clortho autocons ../opt/confluent/bin +cp start_root urlmount ../stateless/ cd .. for os in rhvh4 el7 genesis el8 suse15 ubuntu20.04 coreos; do mkdir ${os}out @@ -35,6 +37,17 @@ for os in rhvh4 el7 genesis el8 suse15 ubuntu20.04 coreos; do mv ../addons.cpio . cd .. done +for stateless in el8; do + mkdir ${os}disklessout + cd ${os}disklessout + cp -a ../opt . + cp -a ../${os}/initramfs/* . + cp -a ../common/* . + cp -a ../stateless-bin/* opt/confluent/bin + find . | cpio -H newc -o > ../addons.cpio + mv ../addons.cpio . + cd .. +done mkdir esxi7out cd esxi7out cp -a ../opt . @@ -52,6 +65,10 @@ for os in rhvh4 el7 el8 genesis suse15 ubuntu20.04 esxi6 esxi7 coreos; do mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles cp ${os}out/addons.* %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs + if [ -d ${os}disklessout ]; then + mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/${os}-diskless/initramfs + cp ${os}disklessout/addons.* %{buildroot}/opt/confluent/lib/osdeploy/${os}-diskless/initramfs + fi cp -a $os/profiles/* %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles find %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles -name .gitignore -exec rm -f {} + done diff --git a/confluent_osdeploy/utils/Makefile b/confluent_osdeploy/utils/Makefile index dccb3bc9..e9cb8773 100644 --- a/confluent_osdeploy/utils/Makefile +++ b/confluent_osdeploy/utils/Makefile @@ -2,7 +2,11 @@ CC := gcc CFLAGS := -Os TARGETS := copernicus autocons start_root -all: $(TARGETS) clortho +all: $(TARGETS) clortho urlmount + +urlmount: urlmount.c + $(CC) $(CFLAGS) -o $@ $^ -D_FILE_OFFSET_BITS=64 -lcurl -lm -lfuse -lpthread + strip -s $@ clortho: clortho.c $(CC) $(CFLAGS) -o $@ $^ -lcrypt diff --git a/misc/urlmount.c b/confluent_osdeploy/utils/urlmount.c similarity index 100% rename from misc/urlmount.c rename to confluent_osdeploy/utils/urlmount.c