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

update glibc to 2.35 #1977

Merged
merged 2 commits into from
Mar 22, 2022
Merged

update glibc to 2.35 #1977

merged 2 commits into from
Mar 22, 2022

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Mar 2, 2022

Issue number:
#1976

Description of changes:
Updated glibc to 2.35. Refreshed patches, adjusted configure options, and added C.UTF-8 to installed files.

Testing done:
Verified that aarch64 and x86_64 variants built, joined a cluster, and passed conformance testing.

Confirmed that the C.UTF-8 locale was working as expected:

bash-5.0# touch /etc/ßash
bash-5.0# LANG=C ls -1 /etc/ßash
'/etc/'$'\303\237''ash'
bash-5.0# LANG=C.UTF-8 ls -1 /etc/ßash
/etc/ßash

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@bcressey
Copy link
Contributor Author

bcressey commented Mar 2, 2022

For x86_64:

  #19 118.8 + make -j1 install_root=/home/builder/rpmbuild/BUILDROOT/bottlerocket-x86_64-glibc-2.35-1.x86_64 install-files-C.UTF-8/UTF-8 -C localedata objdir=/home/builder/rpmbuild/BUILD/glibc-2.35/build
  #19 118.8 FATAL: kernel too old
  #19 118.8 make: *** [Makefile:475: install-files-C.UTF-8/UTF-8] Error 127

For aarch64:

  #19 111.5 + make -j1 install_root=/home/builder/rpmbuild/BUILDROOT/bottlerocket-aarch64-glibc-2.35-1.x86_64 install-files-C.UTF-8/UTF-8 -C localedata objdir=/home/builder/rpmbuild/BUILD/glibc-2.35/build
  #19 111.5 /bin/sh: line 2: /home/builder/rpmbuild/BUILD/glibc-2.35/build/elf/ld-linux-aarch64.so.1: cannot execute binary file: Exec format error
  #19 111.5 make: *** [Makefile:475: install-files-C.UTF-8/UTF-8] Error 126

Pretty clear that the cross-compiling path isn't being taken, or else we'd skip these tests.

@bcressey
Copy link
Contributor Author

bcressey commented Mar 2, 2022

Trying a slightly different invocation for installing the C.UTF-8 locale, under the theory that we're not finding config.make with the right cross-compiling = yes entry.

@bcressey
Copy link
Contributor Author

bcressey commented Mar 2, 2022

Ugh. I promise this all works fine locally! Something strange is happening on the CI build hosts.

@bcressey
Copy link
Contributor Author

bcressey commented Mar 2, 2022

"Something strange" is that I have a newer kernel on my development host, and also ended up with the QEMU static programs installed, which masks both these errors.

@bcressey bcressey force-pushed the glibc-bump branch 4 times, most recently from 28c85a0 to 9f0f84e Compare March 3, 2022 16:31
@bcressey
Copy link
Contributor Author

bcressey commented Mar 9, 2022

Need this fix for chronyd's seccomp filter:
https://git.tuxfamily.org/chrony/chrony.git/commit/?id=8bb8f15a

Add current patches from the release branch.

The C.UTF-8 locale is now upstream, so we no longer need the Fedora
patches that add it. Since it's not built-in, we need to generate and
install the corresponding files, which means building `localedef` for
the build host's architecture as well.

`--enable-static-pie` is now the default for architectures where it's
supported, so we no longer need to pass that option.

Exclude the new `ld.so` link since we don't need it, and `ldd` since
it's a shell script. `catchsegv` and `libSegFault.so` were removed
upstream.

Signed-off-by: Ben Cressey <[email protected]>
@bcressey
Copy link
Contributor Author

(rebase only)

@bcressey
Copy link
Contributor Author

(add chronyd patch for glibc 2.3.5, add latest glibc patches)

@bcressey bcressey marked this pull request as ready for review March 16, 2022 16:09
Copy link
Contributor

@arnaldo2792 arnaldo2792 left a comment

Choose a reason for hiding this comment

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

🎉

packages/glibc/glibc.spec Show resolved Hide resolved
Copy link
Contributor

@cbgbt cbgbt left a comment

Choose a reason for hiding this comment

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

Nice work!

🌶️

@bcressey bcressey merged commit bf0404c into bottlerocket-os:develop Mar 22, 2022
@bcressey bcressey deleted the glibc-bump branch March 22, 2022 21:23
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.

4 participants