diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 58fa030..d82a86d 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -14,8 +14,6 @@ jobs: os: - version: "ubuntu-20.04" native-python: "3.8" - - version: "ubuntu-22.04" - native-python: "3.10" python-version: - "3.7" - "3.8" diff --git a/CHANGELOG.md b/CHANGELOG.md index c0a1a89..03e76da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## [Unreleased] +### Fixed +- Reverted invalid fix ([#255]) for libnssfix link failure ([#262]) + + ## [0.14.0] - 2023-07-10 ### Fixed - Fixed issue causing libnssfix link failure when building on GLIBC 2.34 ([#255]) @@ -339,3 +344,4 @@ Initial release [#238]: https://github.com/JonathonReinhart/staticx/pull/238 [#247]: https://github.com/JonathonReinhart/staticx/pull/247 [#255]: https://github.com/JonathonReinhart/staticx/pull/255 +[#262]: https://github.com/JonathonReinhart/staticx/pull/262 diff --git a/SConstruct b/SConstruct index f3d4325..44bb3b2 100644 --- a/SConstruct +++ b/SConstruct @@ -66,18 +66,6 @@ conf = base_env.Configure(custom_tests=custom_tests) # Does our default libc have NSS? conf.env["HAS_NSS"] = conf.CheckNSS() -# Starting in GLIBC 2.34, some NSS modules (files, dns) can be built-in to -# libc.so. Determine which ones are builtin. See #245. -conf.env["NSS_MODS_BUILTIN"] = [] -if conf.env["HAS_NSS"]: - maybe_builtin_nss_modules = ["files", "dns"] - for mod in maybe_builtin_nss_modules: - libname = "libnss_" + mod - # It the library doesn't exist, assume it is built-in. - if not conf.BasicCheckLib(libname): - conf.env.Append(NSS_MODS_BUILTIN=libname) - print("Builtin NSS modules:", conf.env["NSS_MODS_BUILTIN"]) - base_env = conf.Finish() ################################################################################ diff --git a/libnssfix/SConscript b/libnssfix/SConscript index 7d4912f..08f2fa6 100644 --- a/libnssfix/SConscript +++ b/libnssfix/SConscript @@ -22,16 +22,6 @@ env.NsswitchConfH( source = nsswitch_conf, ) - -# Link against the configured NSS module libraries. -# These aren't needed directly for the library itself, but this ensures -# that they will be available for nss at runtime (via dlopen), and -# allows their paths to be easily discovered via ldd(1). -nss_libs = set(env.GetNsswitchLibs(nsswitch_conf)) - -# Exclude those already built-in to glibc. -nss_libs -= set(env["NSS_MODS_BUILTIN"]) - # Build libnssfix.so libnssfix = env.SharedLibrary( target = 'nssfix', @@ -60,7 +50,12 @@ libnssfix = env.SharedLibrary( ], LIBS = [ libc_stub, - ] + list(nss_libs), + + # These aren't needed directly for the library itself, but this ensures + # that they will be available for nss at runtime (via dlopen), and + # allows their paths to be easily discovered via ldd(1). + env.GetNsswitchLibs(nsswitch_conf), + ], ) Return('libnssfix') diff --git a/site_scons/conftest.py b/site_scons/conftest.py index fb139dd..dc09809 100644 --- a/site_scons/conftest.py +++ b/site_scons/conftest.py @@ -14,26 +14,6 @@ def CheckNSS(context): return ok -def BasicCheckLib(context, libname): - """Check for a C library. - - Similar to built-in CheckLib but works around - https://github.com/SCons/scons/issues/4373. - """ - context.Message("Checking for library %s... " % libname) - - oldLIBS = context.AppendLIBS([libname]) - ok = context.TryLink( - "int main(void) { return 0; }", - ".c" - ) - context.SetLIBS(oldLIBS) - - context.Result(ok) - return ok - - custom_tests = dict( CheckNSS = CheckNSS, - BasicCheckLib = BasicCheckLib, )