diff --git a/lxd.changes b/lxd.changes index 3dea55b..1ac4042 100644 --- a/lxd.changes +++ b/lxd.changes @@ -16,6 +16,9 @@ Fri Mar 5 16:31:52 UTC 2021 - Aleksa Sarai - 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 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 diff --git a/lxd.spec b/lxd.spec index 34b194c..c734843 100644 --- a/lxd.spec +++ b/lxd.spec @@ -171,7 +171,12 @@ export GOPATH="$GOPATH:$PKGDIR/_dist" mkdir bin for mainpkg in "${mainpkgs[@]}" do + # Make sure all binaries *except* "lxc" have an lxd- prefix. binary="$(basename "$mainpkg")" + if ( echo "$binary" | grep -Eqv '^lx[cd].*$' ) + then + binary="lxd-$binary" + fi ( # We need to link against our particular dylib deps. export \ @@ -244,6 +249,7 @@ done mkdir man ./bin/lxc manpage man/ +# Final sanity-check during build. pushd bin/ for bin in * do @@ -353,7 +359,7 @@ grep -q '^root:' /etc/subgid || \ %defattr(-,root,root) %doc AUTHORS README.md doc/ %license COPYING -%{_bindir}/* +%{_bindir}/lx{c,d}* %{_mandir}/man*/* %{_libdir}/%{name}