xemu/tests/docker/dockerfiles/opensuse-leap.docker
Richard W.M. Jones 3d212b41e9 nbd/server: Add --selinux-label option
Under SELinux, Unix domain sockets have two labels.  One is on the
disk and can be set with commands such as chcon(1).  There is a
different label stored in memory (called the process label).  This can
only be set by the process creating the socket.  When using SELinux +
SVirt and wanting qemu to be able to connect to a qemu-nbd instance,
you must set both labels correctly first.

For qemu-nbd the options to set the second label are awkward.  You can
create the socket in a wrapper program and then exec into qemu-nbd.
Or you could try something with LD_PRELOAD.

This commit adds the ability to set the label straightforwardly on the
command line, via the new --selinux-label flag.  (The name of the flag
is the same as the equivalent nbdkit option.)

A worked example showing how to use the new option can be found in
this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1984938

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1984938
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

[eblake: rebase to configure changes, reject --selinux-label if it is
not compiled in or not used on a Unix socket]
Note that we may relax some of these restrictions at a later date,
such as making it possible to label a TCP socket, although it may be
smarter to do so as a generic QMP action rather than more one-off
command lines in qemu-nbd.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20211115202944.615966-1-eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
[eblake: adjust meson output as suggested by thuth]
Signed-off-by: Eric Blake <eblake@redhat.com>
2021-11-16 10:16:38 -06:00

115 lines
2.2 KiB
Docker

FROM registry.opensuse.org/opensuse/leap:15.2
# Please keep this list sorted alphabetically
ENV PACKAGES \
Mesa-devel \
alsa-lib-devel \
bc \
brlapi-devel \
bzip2 \
ca-certificates \
ccache \
clang \
ctags \
cyrus-sasl-devel \
dbus-1 \
diffutils \
findutils \
gcc \
gcc-c++ \
gcovr \
gettext-runtime \
git \
glib2-devel \
glibc-locale \
glibc-static \
glusterfs-devel \
gtk3-devel \
hostname \
jemalloc-devel \
libSDL2-devel \
libSDL2_image-devel \
libaio-devel \
libasan6 \
libattr-devel \
libbpf-devel \
libbz2-devel \
libcacard-devel \
libcap-ng-devel \
libcurl-devel \
libdrm-devel \
libepoxy-devel \
libfdt-devel \
libffi-devel \
libgcrypt-devel \
libgnutls-devel \
libiscsi-devel \
libjpeg8-devel \
libndctl-devel \
libnettle-devel \
libnfs-devel \
libnuma-devel \
libpixman-1-0-devel \
libpmem-devel \
libpng16-devel \
libpulse-devel \
librbd-devel \
libseccomp-devel \
libselinux-devel \
libspice-server-devel \
libssh-devel \
libtasn1-devel \
libubsan1 \
libudev-devel \
libusb-1_0-devel \
libxml2-devel \
libzstd-devel \
llvm \
lttng-ust-devel \
lzo-devel \
make \
mkisofs \
ncat \
ncurses-devel \
ninja \
openssh \
pam-devel \
perl-Test-Harness \
perl-base \
pkgconfig \
python3-Pillow \
python3-PyYAML \
python3-Sphinx \
python3-base \
python3-numpy \
python3-opencv \
python3-pip \
python3-setuptools \
python3-sphinx_rtd_theme \
python3-virtualenv \
python3-wheel \
rdma-core-devel \
rpm \
sed \
snappy-devel \
sparse \
spice-protocol-devel \
systemd-devel \
systemtap-sdt-devel \
tar \
tesseract-ocr \
tesseract-ocr-traineddata-english \
texinfo \
usbredir-devel \
util-linux \
virglrenderer-devel \
vte-devel \
which \
xen-devel \
xfsprogs-devel \
zlib-devel
ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3.6
RUN zypper update -y && zypper --non-interactive install -y $PACKAGES
RUN rpm -q $PACKAGES | sort > /packages.txt