Onyx icon indicating copy to clipboard operation
Onyx copied to clipboard

Doc: document openSUSE gotcha

Open petershh opened this issue 2 years ago • 5 comments

petershh avatar Mar 12 '24 22:03 petershh

Thanks for the PR!

Can you remind me of what the original problem was? I think this solution isn't great, ideally we don't want to force the user to muck with their environment. If anything, we could just namespace HOST (so s/HOST/ONYX_HOST/g).

heatd avatar Mar 12 '24 23:03 heatd

Thanks for the PR!

Can you remind me of what the original problem was? I think this solution isn't great, ideally we don't want to force the user to muck with their environment. If anything, we could just namespace HOST (so s/HOST/ONYX_HOST/g).

OpenSUSE's /etc/profile sets HOST to $(hostname), and this overrides HOST in Makefile and breaks the build.

Namespacing is a good option indeed

petershh avatar Mar 14 '24 13:03 petershh

Thanks for the PR! Can you remind me of what the original problem was? I think this solution isn't great, ideally we don't want to force the user to muck with their environment. If anything, we could just namespace HOST (so s/HOST/ONYX_HOST/g).

OpenSUSE's /etc/profile sets HOST to $(hostname), and this overrides HOST in Makefile and breaks the build.

Namespacing is a good option indeed

Can you test this patch?

I think unconditionally setting HOST is an okay, minimally invasive solution. It's not like we actively lose anything, it'll still be set with regard to $ONYX_ARCH. Unless something in OpenSUSE actively breaks if HOST is messed up. But I doubt it.

diff --git a/Makefile b/Makefile
index a02bddd9..53c705e1 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ ALL_MODULES:=$(PROJECTS) $(SOURCE_PACKAGES) $(patsubst %, usystem/%, $(USYSTEM_P
 $(SOURCE_PACKAGES) build-cleanup musl
 
 export DESTDIR:=$(PWD)/sysroot
-export HOST?=$(shell scripts/arch-to-host.sh $(ONYX_ARCH))
+export HOST:=$(shell scripts/arch-to-host.sh $(ONYX_ARCH))
 export BUILDPKG_BIN?=$(PWD)/buildpkg/buildpkg
 export BUILDPKG_BIN_PY_WRAPPER?=$(PWD)/buildpkg/buildpkg_gn_wrapper
 

heatd avatar Mar 16 '24 23:03 heatd

@petershh do you still run OpenSUSE? Wondering if you could check that last patch so we can merge a final solution. Thanks!

heatd avatar Mar 20 '25 18:03 heatd

@petershh do you still run OpenSUSE? Wondering if you could check that last patch so we can merge a final solution. Thanks!

That patch indeed works. Sorry for not checking on time.

petershh avatar Mar 26 '25 20:03 petershh