Accepting request 768954 from home:cyphar:lxc
- Update to LXD 3.20. The full upstream changelog is available from: https://discuss.linuxcontainers.org/t/lxd-3-20-has-been-released/6673 boo#1162299 + Server side support of API collections + New unix-hotplug device type + Support for standby cluster members - Update packaging to use GOPATH="_dist" rather than trying to move everything to vendor/. This is the recommended approach by upstream (and makes our specfile marginally less horrific). OBS-URL: https://build.opensuse.org/request/show/768954 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=37
This commit is contained in:
26
lxd.spec
26
lxd.spec
@@ -23,7 +23,7 @@
|
||||
%define import_path github.com/lxc/lxd
|
||||
|
||||
Name: lxd
|
||||
Version: 3.19
|
||||
Version: 3.20
|
||||
Release: 0
|
||||
Summary: Container hypervisor based on LXC
|
||||
License: Apache-2.0
|
||||
@@ -42,6 +42,7 @@ BuildRequires: fdupes
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libudev-devel
|
||||
BuildRequires: patchelf
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: rsync
|
||||
@@ -88,28 +89,10 @@ Bash command line completion support for %{name}.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
# 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
|
||||
|
||||
# For some reason, some vendored packages have stored their vendored sources
|
||||
# within their source tree inside the vendor tree (?!). So we need to
|
||||
# workaround this, even though it's probably a bug in LXD packaging.
|
||||
for vendor in $(find vendor/* -type d -name vendor)
|
||||
do
|
||||
rsync -a "$vendor/" vendor/
|
||||
rm -rf "$vendor/"
|
||||
done
|
||||
|
||||
# Create fake "go mod"-like import paths. This is going to be really fun to
|
||||
# maintain but it's unfortunately necessary because openSUSE doesn't have nice
|
||||
# "go mod" support in OBS...
|
||||
ln -s . vendor/github.com/cpuguy83/go-md2man/v2
|
||||
ln -s . _dist/src/github.com/cpuguy83/go-md2man/v2
|
||||
|
||||
%build
|
||||
# Make sure any leftover go build caches are gone.
|
||||
@@ -188,6 +171,9 @@ readarray -t mainpkgs \
|
||||
awk -F: '$1 == "main" { print $2 }' | \
|
||||
grep -Ev '^github.com/lxc/lxd/(test|shared)')"
|
||||
|
||||
# We don't use
|
||||
export GOPATH="$GOPATH:$PKGDIR/_dist"
|
||||
|
||||
# And now we can finally build LXD and all of the related binaries.
|
||||
mkdir bin
|
||||
for mainpkg in "${mainpkgs[@]}"
|
||||
|
Reference in New Issue
Block a user