Accepting request 711033 from home:cyphar:lxc

Fix builds.

OBS-URL: https://build.opensuse.org/request/show/711033
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=20
This commit is contained in:
Aleksa Sarai 2019-06-20 08:36:13 +00:00 committed by Git OBS Bridge
parent 6d889db61f
commit 6a00d13f46

View File

@ -188,6 +188,14 @@ done
#
# [1]: https://github.com/NixOS/nixpkgs/issues/24844
(
# 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/"
./bin/lxd help >/dev/null
)
# 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"
@ -204,6 +212,14 @@ patchelf --replace-needed {,%{_libdir}/%{name}/}'libsqlite3.so.0' "$PKGDIR/dist/
mkdir man
./bin/lxc manpage man/
# Ensure that all our binaries are dynamic. boo#1138769
pushd bin/
for bin in *
do
file "$bin" | grep 'dynamically linked'
done
popd
%install
export GOPATH="$PWD/.gopath"
export PKGDIR="$GOPATH/src/%{import_path}"
@ -250,11 +266,6 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
%fdupes %{buildroot}
%check
# Make sure the main binaries work enough to print help information. boo#1138769
%{_bindir}/lxd help >/dev/null
%{_bindir}/lxc help >/dev/null
%pre
# Group which owns the lxd socket, which allows people to administer it.
getent group %{name} >/dev/null || groupadd -r %{name}