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

setup a cleaner build environment #665

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rickysarraf
Copy link

Multiple packages have run into build failures on our OBS. On closer
inspection, it was concluded to be issues with the locale settings.
These issues were never seen on the Debian buildd infrastructure because
there the locale setting LC_ALL=C.UTF-8 is in use.

This change keeps us closer to what is used in Debian buildds.

Signed-off-by: Ritesh Raj Sarraf [email protected]

@mlschroe
Copy link
Member

C.UTF-8 does not exist in older distros, so I'm not sure if it is a good idea to set it unconditionally.

@coolo
Copy link
Member

coolo commented Feb 23, 2021

https://unix.stackexchange.com/questions/597962/how-widespread-is-the-c-utf-8-locale suggests Arch Linux does not have it - so it's not about the age of the distro

@mlschroe
Copy link
Member

True, but this pull request just patches the build-recipe-dsc file...

@coolo
Copy link
Member

coolo commented Feb 23, 2021

but it's about the distribution executing it, or do I get this wrong?

@andrewshadura
Copy link

andrewshadura commented Feb 26, 2021

The change only affects DSC_BUILD_CMD which runs in a Debian (or a Debian derivative) chroot, so I think what other distributions do isn’t relevant in this case.

build-recipe-dsc Outdated
@@ -95,7 +95,7 @@ dsc_build() {
# this allows the build environment to be manipulated
# and alternate build commands can be used
DSC_BUILD_CMD="$(queryconfig --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$CONFIG_DIR" substitute dsc:build_cmd)"
test -z "$DSC_BUILD_CMD" && DSC_BUILD_CMD="dpkg-buildpackage -us -uc"
test -z "$DSC_BUILD_CMD" && DSC_BUILD_CMD="LC_ALL=C.UTF-8 dpkg-buildpackage -us -uc"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right place?

Shouldn't we change build-pkg-deb instead?

(but I am not sure who calls who to be honest)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably both need to be changed; also build-pkg-deb needs to consistently run deb_chroot.

@andrewshadura
Copy link

Any update on this?

em- and others added 4 commits February 1, 2022 18:56
Multiple packages have run into build failures on our OBS. On closer
inspection, it was concluded to be issues with the locale settings.

These issues were never seen on the Debian buildd infrastructure because
there the locale setting LC_ALL=C.UTF-8 is in use.

This change keeps us closer to what is used in Debian buildds.

openSUSE#665

Signed-off-by: Emanuele Aina <[email protected]>
To make the build environment a bit more reproducible, ensure the local
timezone is set to UTC when building packages.

Signed-off-by: Emanuele Aina <[email protected]>
…ilds

Our OBS workers run under a `screen` session, which gives them an actual
`$TERM` variable.

Some packages like `color.js` then enable colored output, which confuses
some other packages like `node-grunt-legacy-log` which use it in their
testsuite and do not expect colored output.

To avoid that, unset `TERM`.

Signed-off-by: Emanuele Aina <[email protected]>
spymemcached package is FTBFS because a test expects a reverse lookup of
127.0.0.1 to return localhost, but current /etc/hosts configuration
returns the hostname instead.

Let's move this `hostname/ip` entry to the end of /etc/hosts so the
reverse lookup of 127.0.0.1 returns localhost, which makes sense to be
the default case usually.

Signed-off-by: Ariel D'Alessandro <[email protected]>
@rickysarraf
Copy link
Author

Also added a couple of fixes we've been carrying in our setup for a while.

@rickysarraf rickysarraf changed the title Set LC_ALL to C.UTF-8 setup a cleaner build envronment Feb 1, 2022
@rickysarraf rickysarraf changed the title setup a cleaner build envronment setup a cleaner build environment Feb 1, 2022
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.

5 participants