diff --git a/lxd-3.13.tar.gz b/lxd-3.13.tar.gz deleted file mode 100644 index 7c50ea1..0000000 --- a/lxd-3.13.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:025138d2ac7ade6e34446f90f2d25ded86aedcad726d85ba8f2b7188dab75acd -size 28049572 diff --git a/lxd-3.13.tar.gz.asc b/lxd-3.13.tar.gz.asc deleted file mode 100644 index fc96662..0000000 --- a/lxd-3.13.tar.gz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEEYC9WdmPlk7y9FPM4xjiXTWR5LWcFAlzULZcACgkQxjiXTWR5 -LWd2bRAAzkfiOrynp9pipW9HqSnGldCAU6s9vpn6IuWcblx1XYXzEOEoCxJsa/aQ -WOxUx8KsqfKMidyLSGONDBhfp4aqvGMjgD6jSTSPa2OBnOTlG9hQbdkStTky6s8Y -Rv3ZsiHcCf5WSvrfnPvB5hlLqAkQUkkC/eiUavJzC6zeiHG1Jpyf4fQp4cn2Knrp -ztcoHCSu9srpjlw5yG2kJARnWkpdSFRTd22acIJU5uMxvG6usb+W236PJZPLx47g -SMoYGeUu/8ZSZdm93kCmrQXpOkm/BR3eZ+1KqzNxhRncF3EMgQf10JUGjBzx1Tko -sIqPhWbwTs2NlszYmYURAGzTbImTB9pl3lMEcVSoDc5AXXnyYrszqHJTBCmGH43V -v6jzEfUn+Mwu6FpCfCMUbSdGS7FOB211EjTgwUIleigQ5yGXEMG/scILou8Xt99J -ztxgw7QcpOitdwm9GSgE0jxrsAb6cmlZmdF8G1sXq7FKmAxHYx0aOwJQIjTB5XGv -CoBcM1MAEc07+FYgvhGf1/nFMstfh5Z8kcoi7E/UxUVdXfst4PglYdIfsdhbmgiu -PRuFjmHyPfFUR1/u6zTP9pWEz5yIJGgj3/j/y9L5ZsA+QXZ2cfEnq9J8BHhgS4TE -DdaufUczXghBhaYrOd2BE0M6rFv3zNZxVrsEG8N+pLkvJ92FugU= -=bH7F ------END PGP SIGNATURE----- diff --git a/lxd-3.17.tar.gz b/lxd-3.17.tar.gz new file mode 100644 index 0000000..45097a0 --- /dev/null +++ b/lxd-3.17.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9484acb489b91f58ae8fe4518e5a09bdf2460808817efd32765ad9241ef729ef +size 23494267 diff --git a/lxd-3.17.tar.gz.asc b/lxd-3.17.tar.gz.asc new file mode 100644 index 0000000..47f48c8 --- /dev/null +++ b/lxd-3.17.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEYC9WdmPlk7y9FPM4xjiXTWR5LWcFAl1xitgACgkQxjiXTWR5 +LWdE7A//Zfjh5PPnzIAd+It5ACVjApJ7ya+cprP3lUBVhh4ZUouawjJXkD6ZwvGw +3LFXYTXHmtcZZV26Yq/9akppI/6Ag12EEr/Ejg6UA9I9Zbni+hAD44elTpzMYJUQ +jzfAHc1D9yu6st/RJl3mi10vAdUVSa07WqfrSWBFQycbFoFI6Ec2WBAgbLmTcfJ8 +9vQNMb/Uo1LJWW/lrNaRvg0+PZPz86XH8lM19m75rTYlKpSchkvJiDkJbMzweVCx +rs/RYCBjn99+nthl5i3uv9VvVecWUitU1pPFJDQqFVsp1FkaFwVdDztttfLCpa2A +MN/F0gr5IZMdw2R4n6HalPzUatvs4s5+zreJU33mUkhl+P821Ljn0R34Dh0Y3SXx +OrV+xQ928+vrvDmEEZcC+Ql/T+9bjKRXN6wCMU6hcyTFZYK/5DMHv9K7iXto5vkv +6fAEl4SRuBTOaF63raVy1eV09auOHiZPKMWiJ6SQfP1H2cmguQJD2ccEQsF8LenL +zD2E3g40daCBAOpcp3x9WQJnoc6QqeVnBDvTUzexRPPM/4a2jfGcFZ4+oPTco0pr +CAizSdjdaS4McKfJ5qoQZqKbdG78jpgZQBNHQDBnjKy2nGMa+fTrHDtUzYntmaaf +OIB50d9POjv1POyCey23kg7AaQbKpL2Ta+Zo1mPlkiCyg64YmAo= +=oI/X +-----END PGP SIGNATURE----- diff --git a/lxd.changes b/lxd.changes index d980af6..72a1034 100644 --- a/lxd.changes +++ b/lxd.changes @@ -1,8 +1,52 @@ +------------------------------------------------------------------- +Tue Sep 24 12:31:21 UTC 2019 - Aleksa Sarai + +- Completely drop all stripping -- it appears to cause all sorts of problems + with unresolved symbol errors. +- Update to LXD 3.17. The full upstream changelog is available from: + https://discuss.linuxcontainers.org/t/lxd-3-17-has-been-released/5679 + boo#1151874 + + Storage pool backed image tarballs and backups + + Container configuration as YAML on lxc init and lxc launch + * Ported to final Dqlite 1.0 + * Database rework + * Container devices rework + * Storage rework + +------------------------------------------------------------------- +Mon Jul 15 06:40:30 UTC 2019 - Aleksa Sarai + +- Update to LXD 3.15. The full upstream changelog is available from: + https://discuss.linuxcontainers.org/t/lxd-3-15-has-been-released/5218 + + Switch to dqlite 1.0. + * Reworked DHCP lease handling + * Reworked cluster heartbeat handling + * Better syscall interception framework + * More reliable unix socket proxying + + Hardware VLAN and MAC filtering on SR-IOV + + New storage-size option for lxd-p2c + + IPv4 and IPv6 filtering (spoof protection) + * Reworked resources API (host hardware) + + Control over uid, gid and cwd during command execution + + Quota support for custom storage volumes on dir backend + * Lots of bug fixes... + +------------------------------------------------------------------- +Wed Jun 19 07:21:29 UTC 2019 - Aleksa Sarai + +- Update to LXD 3.14. The full upstream changelog is available from: + https://discuss.linuxcontainers.org/t/lxd-3-14-has-been-released/5045 + boo#1138770 + + Cluster: Re-worked DNS forwarding + + Script to factory reset LXD + + Improvements to syscall interception + * Lots of bug fixes... + ------------------------------------------------------------------- Wed Jun 19 03:16:40 UTC 2019 - Aleksa Sarai - Update build to use go_nostrip, in order to attempt to fix the broken - binaries on Leap 15.1. + binaries on Leap 15.1. boo#1138769 ------------------------------------------------------------------- Sun Jun 9 08:21:19 UTC 2019 - Aleksa Sarai diff --git a/lxd.spec b/lxd.spec index 1e8c662..b1eb187 100644 --- a/lxd.spec +++ b/lxd.spec @@ -23,7 +23,7 @@ %define import_path github.com/lxc/lxd Name: lxd -Version: 3.13 +Version: 3.17 Release: 0 Summary: Container hypervisor based on LXC License: Apache-2.0 @@ -86,52 +86,92 @@ Bash command line completion support for %{name}. %prep %setup -q -# Move dist/src (which is LXD's variant of vendoring) to vendor/. -mv -v dist/src vendor + +# If there is a vendor/ move it to _dist/src/. +if [ -d vendor ] +then + cp -at _dist/src vendor/* + rm -rf vendor/ +fi +# Move _dist/src (which is LXD's variant of vendoring) to vendor/. +mv -v _dist/src vendor %build # Make sure any leftover go build caches are gone. go clean -cache +# Keep track of the current set of paths needed to generate the include-related +# variables for later stages. +declare -a CURRENT_DEPLIST + # Set up GOPATH. export GOPATH="$PWD/.gopath" export PKGDIR="$GOPATH/src/%{import_path}" mkdir -p "$PKGDIR" cp -a * "$PKGDIR" -# First we need to build the sqlite fork and dqlite. We build them as static -# libs because they are only ever going to be used for LXD, and so it makes no -# sense to go through the pain of packaging them properly (hopefully the code -# will one day be merged into upstream sqlite). +# First we need to build the sqlite fork and dqlite. We need to build them +# dynamically (to avoid binary bloat), but we also then need to mess with +# patchelf to stop us from breaking openSUSE packaging. export CFLAGS="%{optflags} -fPIC -DPIC" +# We have a temporary-install directory which contains our pkg-configs. +export PKG_CONFIG_SYSROOT_DIR="$PKGDIR/.install" +export PKG_CONFIG_PATH="$PKG_CONFIG_SYSROOT_DIR/%{_libdir}/%{name}/pkgconfig:$PKG_CONFIG_SYSROOT_DIR/%{_datadir}/pkgconfig" + # SQLite -pushd "$PKGDIR/dist/sqlite" +pushd "$PKGDIR/_dist/deps/sqlite" autoreconf -fiv %configure \ --libdir="%{_libdir}/%{name}" \ --disable-static \ --enable-replication \ - --disable-tcl \ + --disable-tcl make clean make %{?_smp_mflags} +make DESTDIR="$PKGDIR/.install" install +# Add sqlite to dependency list. +CURRENT_DEPLIST+=("$PWD") +popd + +# libco +pushd "$PKGDIR/_dist/deps/libco" +make \ + CFLAGS="$CFLAGS" \ + PREFIX="" \ + INCLUDEDIR="%{_includedir}" \ + LIBDIR="%{_libdir}/%{name}" \ + DESTDIR="$PKGDIR/.install" \ + all install +# Add libco to dependency list. +CURRENT_DEPLIST+=("$PWD") +popd + +# raft +pushd "$PKGDIR/_dist/deps/raft" +autoreconf -fiv +%configure \ + --libdir="%{_libdir}/%{name}" \ + --disable-static +make %{?_smp_mflags} +make DESTDIR="$PKGDIR/.install" install +# Add raft to dependency list. +CURRENT_DEPLIST+=("$PWD") popd # dqlite -pushd "$PKGDIR/dist/dqlite" +pushd "$PKGDIR/_dist/deps/dqlite" ( -# We need to make sure *our* sqlite build is used. -export PKG_CONFIG_PATH="$PWD/../sqlite/" -export CPPFLAGS="-I$PWD/../sqlite/" -export LDFLAGS="-L$PWD/../sqlite/.libs/" - autoreconf -fiv %configure \ --libdir="%{_libdir}/%{name}" \ --disable-static make clean make %{?_smp_mflags} +make DESTDIR="$PKGDIR/.install" install ) +# Add raft to dependency list. +CURRENT_DEPLIST+=("$PWD") popd # Find all of the main packages using go-list. @@ -149,17 +189,16 @@ do # We need to link against sqlite and dqlite only when dealing with lxd proper. [ "$binary" == "lxd" ] && export \ BUILDTAGS="libsqlite3" \ - CGO_CFLAGS="%{optflags} -I$PKGDIR/dist/sqlite/ -I$PKGDIR/dist/dqlite/include/" \ - CGO_LDFLAGS="-L$PKGDIR/dist/sqlite/.libs/ -L$PKGDIR/dist/dqlite/.libs/" \ - PKG_CONFIG_PATH="$PKGDIR/dist/sqlite:$PKGDIR/dist/dqlite" ||: + CGO_CFLAGS="-I $PKGDIR/.install/%{_includedir}" \ + CGO_LDFLAGS="-L $PKGDIR/.install/%{_libdir}/%{name}" ||: go build -buildmode=pie -tags "$BUILDTAGS" -o "bin/$binary" "$mainpkg" ) done # This part is quite ugly, so I apologise upfront. # -# We want to have our dist/* libraries be dylibs so that we don't bloat our lxd -# binary. Unfortunately, we are presented with a few challenges: +# We want to have our _dist/deps/* libraries be dylibs so that we don't bloat +# our lxd binary. Unfortunately, we are presented with a few challenges: # # * Doing this naively (put it in {_libdir}) results in sqlite3 package # conflicts -- and we aren't going to maintain sqlite3 for all of openSUSE @@ -173,30 +212,58 @@ done # # So, the only reasonable choice left is to use absolute paths as DT_NEEDED # entries -- which bypasses the need for RUNPATH and allows us to set garbage -# sonames for our dist/* libraries. Absolute paths for DT_NEEDED is *slightly* -# undefined behaviour, but glibc has had this behaviour for a very long time -- -# and others have considered using it in a similar manner[1]. +# sonames for our _dist/deps/* libraries. Absolute paths for DT_NEEDED is +# *slightly* undefined behaviour, but glibc has had this behaviour for a very +# long time -- and others have considered using it in a similar manner[1]. # # What F U N. # # [1]: https://github.com/NixOS/nixpkgs/issues/24844 -# Give our libraries unrecognisable DT_SONAME entries. -patchelf --set-soname '._LXD_INTERNAL-libsqlite3.so.0' "$PKGDIR/dist/sqlite/.libs/libsqlite3.so.0" -patchelf --set-soname '._LXD_INTERNAL-libdqlite.so.0' "$PKGDIR/dist/dqlite/.libs/libdqlite.so.0" +( + # A simple check that lxd isn't broken. We can't do this after patchelf + # because we'd need to chroot(2) into {buildroot} which isn't permitted due + # to user namespaces being blocked inside rpmbuild. boo#1138769 + export LD_LIBRARY_PATH="$PKGDIR/.install/%{_libdir}/%{name}" + ./bin/lxd help >/dev/null +) -# Switch to absolute DT_NEEDED for the lxd binary. -patchelf --remove-rpath bin/lxd -patchelf --replace-needed {,%{_libdir}/%{name}/}'libsqlite3.so.0' bin/lxd -patchelf --replace-needed {,%{_libdir}/%{name}/}'libdqlite.so.0' bin/lxd -# Just to be sure, fix libdqlite.so as well. -patchelf --remove-rpath "$PKGDIR/dist/dqlite/.libs/libdqlite.so" -patchelf --replace-needed {,%{_libdir}/%{name}/}'libsqlite3.so.0' "$PKGDIR/dist/dqlite/.libs/libdqlite.so" +for lib in $PKGDIR/.install/%{_libdir}/%{name}/lib*.so +do + # Strip off last two version digits. + name="$(basename "$(readlink "$lib")" | sed -E 's/\.[0-9]+\.[0-9]+$//')" + # Give our libraries unrecognisable DT_SONAME entries. + patchelf --set-soname "._LXD_INTERNAL-$name" "$lib" +done + +# Switch to absolute DT_NEEDED for all dylibs we have as well as the main LXD +# binary. We do this for all dylibs to make sure we don't end up with weird +# chain-loading problems. +for target in bin/lxd $PKGDIR/.install/%{_libdir}/%{name}/lib*.so +do + # Drop RPATH in case it got included during builds. + patchelf --remove-rpath "$target" + # And now replace all the possible DT_NEEDEDs to absolute paths. + for lib in $PKGDIR/.install/%{_libdir}/%{name}/lib*.so + do + # Strip off last two version digits. + name="$(basename "$(readlink "$lib")" | sed -E 's/\.[0-9]+\.[0-9]+$//')" + patchelf --replace-needed {,%{_libdir}/%{name}/}"$name" "$target" + done +done # Generate man pages. mkdir man ./bin/lxc manpage man/ +pushd bin/ +for bin in * +do + # Ensure that all our binaries are dynamic. boo#1138769 + file "$bin" | grep 'dynamically linked' +done +popd + %install export GOPATH="$PWD/.gopath" export PKGDIR="$GOPATH/src/%{import_path}" @@ -204,8 +271,7 @@ export PKGDIR="$GOPATH/src/%{import_path}" install -d -m 0755 %{buildroot}%{_libdir}/%{name} pushd "$PKGDIR" # We can't use install because *.so.$n are symlinks. -cp -avt %{buildroot}%{_libdir}/%{name}/ dist/sqlite/.libs/libsqlite3.so.* -cp -avt %{buildroot}%{_libdir}/%{name}/ dist/dqlite/.libs/libdqlite.so.* +cp -avt %{buildroot}%{_libdir}/%{name}/ $PKGDIR/.install/%{_libdir}/%{name}/lib*.so.* popd # Install all the binaries.