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

PACKAGE_BUILDING is not defined when doing poud jail -b #1196

Open
arrowd opened this issue Dec 28, 2024 · 0 comments
Open

PACKAGE_BUILDING is not defined when doing poud jail -b #1196

arrowd opened this issue Dec 28, 2024 · 0 comments
Labels

Comments

@arrowd
Copy link
Contributor

arrowd commented Dec 28, 2024

src/share/poudriere/jail.sh contains following code in the install_from_src() function:

	if [ ${BUILD} -eq 0 ]; then
		setup_build_env
		installworld
	else
		buildworld
		installworld
		if [ ${BUILD_PKGBASE} -eq 1 ]; then
			build_pkgbase
		fi
	fi

Here the BUILD var is controlled by the -b flag. Since setup_build_env() is called only when we're not passing -b it results in the PACKAGE_BUILDING=yes variable being missing. This in turn leads to the following block of share/mk/src.sys.mk being omitted:

.if defined(PACKAGE_BUILDING)
CFLAGS+=	-fmacro-prefix-map=${SRCTOP}=/usr/src -fdebug-prefix-map=${SRCTOP}=/usr/src
.endif

Which finally leads to wrong debugging info paths written into resulting binaries.

I'm not 100% sure this is a bug on the Poudriere side, but it feels like it is.

@arrowd arrowd added the bug label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant