Accepting request 732945 from home:cyphar:lxc
- Update to LXD 3.17. The full upstream changelog is available from: https://discuss.linuxcontainers.org/t/lxd-3-17-has-been-released/5679 + 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 OBS-URL: https://build.opensuse.org/request/show/732945 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=23
This commit is contained in:
parent
4d592de923
commit
a76926536b
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:409e4758cbeb43b098d0265c4ce05aeeac5ae73f8914ceb1006e6a6d89fe1fe5
|
||||
size 26141949
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEYC9WdmPlk7y9FPM4xjiXTWR5LWcFAl0Cr30ACgkQxjiXTWR5
|
||||
LWeuWBAA3CXtmzJNItxK4E8tBLhSZHZQTzcU+Bef/q+FJJWGLT5HX+/VMdCgmaCZ
|
||||
JuR2KHkVx1t58oGD0TuxXWtnKzdV4HY1DLgUwaHcesEBbgjVxt2gKq/jBofmaqMu
|
||||
+WrWGOqBp925ZBTO2fR52ZisGAFR/CMB0csHeoAc8TR2MoJiARSWhIdGXKywZPLC
|
||||
/9XSS2XS0hU+/bRvSx76XYhVWtiiEl583K47GdEfN06cRVQ3CO72TZJ+SOq3ddeu
|
||||
Wlu3oqMoLxyMtLXDurNX4qScFt7A6XOs3ViHOAj4Y+hUeLkkYDQKHxs+mFfsO1uN
|
||||
pVeaqHk882gBDzlWsbOHkPcOTcsK/fLTBQhNc2+IiAkwNIR/GOqTE1NCtIrsXtZp
|
||||
idAu4BE8WQVKQxDA8wsjTwPqmLtRvi5CF5IDG7nl3U122fHRpiHa2y6WZu9Wx+CZ
|
||||
xLe3HEyE30w6fptKKk++JJjesp0k6WzEmAxs/+pJqAQUu0ZP+KzUmYcdJc5xrUXu
|
||||
0ZgzNAC6Ek00DlfDYIxX8aLnsnlDJFqDkPPnCetCemZO1gJSiCGC+6INhT22Dbve
|
||||
l2FyIYb1qPrWkvDND4pK4DFL5DYsIPGZEhGme/H8SrMCb5nwnALnFLxx0j8LGm9N
|
||||
NnAQFPIvRUXZ94V+dVm2/8e1olngXIxxKcUNuQm3IeGW+u5aIFY=
|
||||
=a5X+
|
||||
-----END PGP SIGNATURE-----
|
3
lxd-3.17.tar.gz
Normal file
3
lxd-3.17.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9484acb489b91f58ae8fe4518e5a09bdf2460808817efd32765ad9241ef729ef
|
||||
size 23494267
|
16
lxd-3.17.tar.gz.asc
Normal file
16
lxd-3.17.tar.gz.asc
Normal file
@ -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-----
|
30
lxd.changes
30
lxd.changes
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 12:31:21 UTC 2019 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update to LXD 3.17. The full upstream changelog is available from:
|
||||
https://discuss.linuxcontainers.org/t/lxd-3-17-has-been-released/5679
|
||||
+ 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 <asarai@suse.com>
|
||||
|
||||
- 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 <asarai@suse.com>
|
||||
|
||||
|
130
lxd.spec
130
lxd.spec
@ -23,7 +23,7 @@
|
||||
%define import_path github.com/lxc/lxd
|
||||
|
||||
Name: lxd
|
||||
Version: 3.14
|
||||
Version: 3.17
|
||||
Release: 0
|
||||
Summary: Container hypervisor based on LXC
|
||||
License: Apache-2.0
|
||||
@ -87,58 +87,91 @@ Bash command line completion support for %{name}.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
# If there is a vendor/ move it to dist/src/.
|
||||
# If there is a vendor/ move it to _dist/src/.
|
||||
if [ -d vendor ]
|
||||
then
|
||||
cp -at dist/src vendor/*
|
||||
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
|
||||
# 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.
|
||||
@ -156,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" ||:
|
||||
go build -buildmode=pie -tags "$BUILDTAGS" -ldflags "-s -w" -o "bin/$binary" "$mainpkg"
|
||||
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
|
||||
@ -180,9 +212,9 @@ 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.
|
||||
#
|
||||
@ -192,33 +224,46 @@ done
|
||||
# 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/dist/sqlite/.libs/:$PKGDIR/dist/dqlite/.libs/"
|
||||
export LD_LIBRARY_PATH="$PKGDIR/.install/%{_libdir}/%{name}"
|
||||
./bin/lxd help >/dev/null
|
||||
)
|
||||
|
||||
# Strip debug symbols (we disabled debuginfo so we must do it manually).
|
||||
strip "$PKGDIR/dist/sqlite/.libs/libsqlite3.so"
|
||||
strip "$PKGDIR/dist/dqlite/.libs/libdqlite.so"
|
||||
# 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"
|
||||
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 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"
|
||||
# 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"
|
||||
# Strip binaries manually.
|
||||
strip --strip-debug "$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/
|
||||
|
||||
# Ensure that all our binaries are dynamic. boo#1138769
|
||||
pushd bin/
|
||||
for bin in *
|
||||
do
|
||||
# Strip binaries manually.
|
||||
strip --strip-debug "$target"
|
||||
# Ensure that all our binaries are dynamic. boo#1138769
|
||||
file "$bin" | grep 'dynamically linked'
|
||||
done
|
||||
popd
|
||||
@ -230,8 +275,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.
|
||||
|
Loading…
Reference in New Issue
Block a user