Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lxd for openSUSE:Factory checked in at 2021-06-16 20:35:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lxd (Old) and /work/SRC/openSUSE:Factory/.lxd.new.32437 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lxd" Wed Jun 16 20:35:00 2021 rev:33 rq:900296 version:4.15 Changes: -------- --- /work/SRC/openSUSE:Factory/lxd/lxd.changes 2021-06-07 22:44:27.920582890 +0200 +++ /work/SRC/openSUSE:Factory/.lxd.new.32437/lxd.changes 2021-06-16 20:36:51.443326643 +0200 @@ -1,0 +2,7 @@ +Tue Jun 8 02:25:02 UTC 2021 - Aleksa Sarai <asa...@suse.com> + +- Build lxd-agent and lxd-p2c statically to match upstream LXD build scripts + (and to make VMs work properly -- lxd-agent is injected into the VM). +- Update lxd-rpmlintrc to match this. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lxd.spec ++++++ --- /var/tmp/diff_new_pack.u5PRJI/_old 2021-06-16 20:36:51.975327551 +0200 +++ /var/tmp/diff_new_pack.u5PRJI/_new 2021-06-16 20:36:51.979327558 +0200 @@ -196,12 +196,34 @@ then binary="lxd-$binary" fi + case "$binary" in + lxd-agent) + build_static=1 + build_tags="agent,netgo" + ;; + lxd-p2c) + build_static=1 + build_tags="netgo" + ;; + *) + build_static= + build_tags="libsqlite3" + ;; + esac ( # We need to link against our particular dylib deps. export \ CGO_CFLAGS="-I $INSTALL_INCLUDEDIR" \ CGO_LDFLAGS="-L $INSTALL_LIBDIR" ||: - go build -buildmode=pie -tags "libsqlite3" -o "bin/$binary" "$mainpkg" + + if [ -n "$build_static" ] + then + CGO_ENABLED=0 go build -ldflags "-extldflags -static" \ + -tags "$build_tags" -o "bin/$binary" "$mainpkg" + else + go build -buildmode=pie \ + -tags "$build_tags" -o "bin/$binary" "$mainpkg" + fi ) done @@ -253,6 +275,16 @@ # chain-loading problems. for target in bin/* "$INSTALL_LIBDIR"/lib*.so do + case "$(basename "$target")" in + lxd-agent|lxd-p2c) + # Cannot patch static binaries, and the patching isn't necessary + # for them anyway. + continue + ;; + *) + ;; + esac + # Drop RPATH in case it got included during builds. patchelf --remove-rpath "$target" # And now replace all the possible DT_NEEDEDs to absolute paths. @@ -272,10 +304,18 @@ pushd bin/ for bin in * do - # Ensure that all our binaries are dynamic. boo#1138769 + # Ensure that all our binaries are dynamic (except for lxd-p2c and + # lxd-agent, which must be static). boo#1138769 + case "$(basename $bin)" in + lxd-agent|lxd-p2c) + file "$bin" | grep 'statically linked' + ;; + *) file "$bin" | grep 'dynamically linked' # Check what they are linked against. ldd "$bin" + ;; + esac done popd ++++++ lxd-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.u5PRJI/_old 2021-06-16 20:36:52.019327626 +0200 +++ /var/tmp/diff_new_pack.u5PRJI/_new 2021-06-16 20:36:52.023327633 +0200 @@ -2,3 +2,7 @@ # our shared libraries are internal and aren't meant to be used outside LXD. # This error only appears in old SLE versions. addFilter ("^lxd.* E: invalid-filepath-dependency .* /usr/lib(32|64)?/lxd/") + +# We need lxd-agent and lxd-p2c to be statically linked. +addFilter ("^lxd.*: W: statically-linked-binary /usr/bin/lxd-(agent|p2c)") +addFilter ("^lxd.*: W: position-independent-executable-suggested /usr/bin/lxd-(agent|p2c)")