# fenriros only carries the base system, so copy the shared libraries authdb needs
# fenriros only carries the base system, so copy the shared libraries fenrirds needs
# (DT_NEEDED, resolved recursively against the build image) into the stage, plus the
# confplus backends, which are dlopen()'d and so never show up as DT_NEEDED (authdb's own
# confplus backends, which are dlopen()'d and so never show up as DT_NEEDED (fenrirds's own
# plugins are already in the stage). Every stage file is scanned: fresh's find has no
# -perm -u+x, and readelf skips whatever is not ELF.
RUN set-e;\
find_lib(){for d in /usr/lib /lib /usr/local/lib /stage/usr/local/lib /stage/usr/local/lib/authdb;do[-e"$d/$1"]&&{echo"$d/$1";return 0;};done;return 1;};\
find_lib(){for d in /usr/lib /lib /usr/local/lib /stage/usr/local/lib /stage/usr/local/lib/fenrirds;do[-e"$d/$1"]&&{echo"$d/$1";return 0;};done;return 1;};\