# Pastebin QhF9iWhq # Issue with repackaged core and testing During spread testing we build a native package of snapd (for the current OS and architecture) and copy several files over from the native package to the core snap (the core snap is uncompressed and recompressed for this operation). This introduces several kinds of issues. ## Impact - Native C code has assumptions about directory structure of the host that may be incompatible with the fixed structure inside the core snap - Native C code was compiled and linked with the host toolchain which may use incompatible set of libraries, including more recent libc, additional libraries (e.g. selinux) that are not present in the core snap. This happened in Fedora 29 with libc 2.27 which is not present in Ubuntu 16.04-based core snap. - Native package may have performed interpreter path mangling that is not compatible with the core snap. This specifically includes rewriting `/bin/sh` to `/usr/bin/sh` which affects the `snap-device-helper` shell script. While the script itself uses absolute path names compatible with the core snap for the commands it invokes (and resorts to shell builtins for everything else) the interpreter path itself is broken. ## Possible solutions - A simple but costly solution is to restore the correct build environment. Snapd must be built with the Ubuntu 16.04 toolchain and build configuration if it ends up in a repackaged core snap. - We could adjust the core snap to have paths compatible with what is used in Fedora. This would also require updating the C library as the world moves on to ever-more-recent version of libc.