Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: document openSUSE gotcha #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

petershh
Copy link
Contributor

No description provided.

@heatd
Copy link
Owner

heatd commented Mar 12, 2024

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).

@petershh
Copy link
Contributor Author

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

@heatd
Copy link
Owner

heatd commented Mar 16, 2024

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
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants