Accepting request 877355 from home:cyphar:lxc

- Prefix all binaries with lxd- if they don't start with "lx[cd]". This is to
  avoid having cases like lxd-generate where there's a binary in /usr/bin that
  has a super-generic name.

OBS-URL: https://build.opensuse.org/request/show/877355
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=79
This commit is contained in:
Aleksa Sarai 2021-03-06 08:04:46 +00:00 committed by Git OBS Bridge
parent 68261b20a4
commit d4c91d6734
2 changed files with 10 additions and 1 deletions

View File

@ -16,6 +16,9 @@ Fri Mar 5 16:31:52 UTC 2021 - Aleksa Sarai <asarai@suse.com>
- Updated packaging to support VMs, though note that LXD's usage of QEMU causes - Updated packaging to support VMs, though note that LXD's usage of QEMU causes
issues with QEMU 5.2 on openSUSE (because of how we package it). See issues with QEMU 5.2 on openSUSE (because of how we package it). See
<https://github.com/lxc/lxd/issues/8416> for more details. bsc#1181549 <https://github.com/lxc/lxd/issues/8416> for more details. bsc#1181549
- Prefix all binaries with lxd- if they don't start with "lx[cd]". This is to
avoid having cases like lxd-generate where there's a binary in /usr/bin that
has a super-generic name.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 5 07:41:04 UTC 2021 - Aleksa Sarai <asarai@suse.com> Fri Feb 5 07:41:04 UTC 2021 - Aleksa Sarai <asarai@suse.com>

View File

@ -171,7 +171,12 @@ export GOPATH="$GOPATH:$PKGDIR/_dist"
mkdir bin mkdir bin
for mainpkg in "${mainpkgs[@]}" for mainpkg in "${mainpkgs[@]}"
do do
# Make sure all binaries *except* "lxc" have an lxd- prefix.
binary="$(basename "$mainpkg")" binary="$(basename "$mainpkg")"
if ( echo "$binary" | grep -Eqv '^lx[cd].*$' )
then
binary="lxd-$binary"
fi
( (
# We need to link against our particular dylib deps. # We need to link against our particular dylib deps.
export \ export \
@ -244,6 +249,7 @@ done
mkdir man mkdir man
./bin/lxc manpage man/ ./bin/lxc manpage man/
# Final sanity-check during build.
pushd bin/ pushd bin/
for bin in * for bin in *
do do
@ -353,7 +359,7 @@ grep -q '^root:' /etc/subgid || \
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS README.md doc/ %doc AUTHORS README.md doc/
%license COPYING %license COPYING
%{_bindir}/* %{_bindir}/lx{c,d}*
%{_mandir}/man*/* %{_mandir}/man*/*
%{_libdir}/%{name} %{_libdir}/%{name}