Skip to contentSkip to conversation

9pfs patches for QEMU 5.0

GIT PULL Applied Greg Kurz 2 participants 7 messages Dec 12, 2019 – Dec 13, 2019 Kbuild

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

The following changes since commit fb2246882a2c8d7f084ebe0617e97ac78467d156:

.travis.yml: drop xcode9.4 from build matrix (2019-11-29 15:51:52 +0000)

are available in the Git repository at:

https://github.com/gkurz/qemu.git tags/9p-next-2019-12-12

for you to fetch changes up to b3e2bb9458af556cb8aa0558f59222f462b81069:

virtfs: Remove the deprecated "-virtfs_synth" option (2019-12-09 18:00:35 +0100)

----------------------------------------------------------------
- conversion of virtfs-proxy-helper from libcap to libcap-ng
- removal of libcap-dev from docker, travis and gitlab CI
- removal of deprecate "-virtfs_synth" option

----------------------------------------------------------------
Dr. David Alan Gilbert (1):
ci: Use libcap-ng

Greg Kurz (1):
travis.yml: Drop libcap-dev

Paolo Bonzini (2):
virtfs-proxy-helper: switch from libcap to libcap-ng
docker: remove libcap development packages

Thomas Huth (1):
virtfs: Remove the deprecated "-virtfs_synth" option

 .gitlab-ci.yml                             |   2 +-
 .travis.yml                                |   1 -
 Makefile                                   |   1 -
 configure                                  |  20 +-----
 fsdev/virtfs-proxy-helper.c                | 100 +++++++++++++----------------
 qemu-deprecated.texi                       |   5 --
 qemu-options.hx                            |  10 ---
 tests/docker/dockerfiles/fedora.docker     |   1 -
 tests/docker/dockerfiles/ubuntu.docker     |   1 -
 tests/docker/dockerfiles/ubuntu1804.docker |   1 -
 vl.c                                       |  23 -------
 11 files changed, 48 insertions(+), 117 deletions(-)
Signature · 1 line
2.21.0
author
#1 lore raw

[PULL 1/5] virtfs-proxy-helper: switch from libcap to libcap-ng

From: Paolo Bonzini <[email protected]>

virtfs-proxy-helper is the only user of libcap; everyone else is using the simpler libcap-ng API. Switch and remove the configure code to detect libcap.

[groug: - drop remaining -lcap from Makefile
- fix error message in configure]

---
 Makefile                    |   1 -
 configure                   |  20 +-------
 fsdev/virtfs-proxy-helper.c | 100 ++++++++++++++++--------------------
 3 files changed, 47 insertions(+), 74 deletions(-)
Makefile +0 -1
index b437a346d71a..1361def1441c 100644
@@ -575,7 +575,6 @@ qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
 qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS)
 
 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
-fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
 
 scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 ifdef CONFIG_MPATH
configure +2 -18
index 6099be1d848c..2c72e04d23f3 100755
@@ -3863,22 +3863,6 @@ else
   mpathpersist=no
 fi
 
-##########################################
-# libcap probe
-
-if test "$cap" != "no" ; then
-  cat > $TMPC <<EOF
-#include <stdio.h>
-#include <sys/capability.h>
-int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; }
-EOF
-  if compile_prog "" "-lcap" ; then
-    cap=yes
-  else
-    cap=no
-  fi
-fi
-
 ##########################################
 # pthread probe
 PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2"
@@ -6204,12 +6188,12 @@ if test "$want_tools" = "yes" ; then
 fi
 if test "$softmmu" = yes ; then
   if test "$linux" = yes; then
-    if test "$virtfs" != no && test "$cap" = yes && test "$attr" = yes ; then
+    if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then
       virtfs=yes
       tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
     else
       if test "$virtfs" = yes; then
-        error_exit "VirtFS requires libcap devel and libattr devel"
+        error_exit "VirtFS requires libcap-ng devel and libattr devel"
       fi
       virtfs=no
     fi
fsdev/virtfs-proxy-helper.c +45 -55

139 lines not on this page · raw message

Signature · 1 line
2.21.0
author
#2 lore raw

[PULL 4/5] travis.yml: Drop libcap-dev

In reply to Greg Kurz

Commit 7e46261368d1 converted virtfs-proxy-helper to using libcap-ng. There aren't any users of libcap anymore. No need to install libcap-dev.

---
 .travis.yml | 1 -
 1 file changed, 1 deletion(-)
.travis.yml +0 -1
index 445b0646c18a..6cb8af6fa599 100644
@@ -26,7 +26,6 @@ addons:
       - libaio-dev
       - libattr1-dev
       - libbrlapi-dev
-      - libcap-dev
       - libcap-ng-dev
       - libgcc-4.8-dev
       - libgnutls28-dev
Signature · 1 line
2.21.0
author
#3 lore raw

[PULL 2/5] docker: remove libcap development packages

In reply to Greg Kurz

From: Paolo Bonzini <[email protected]>

Libcap was dropped from virtio-9p (commit 7e46261368d1), so remove it from the dockerfiles as well.

[groug, mention SHA1 that dropped libcap]
---
 tests/docker/dockerfiles/fedora.docker     | 1 -
 tests/docker/dockerfiles/ubuntu.docker     | 1 -
 tests/docker/dockerfiles/ubuntu1804.docker | 1 -
 3 files changed, 3 deletions(-)
tests/docker/dockerfiles/fedora.docker +0 -1
index 4ddc7dd112a2..47732fc5d565 100644
@@ -25,7 +25,6 @@ ENV PACKAGES \
     libasan \
     libattr-devel \
     libblockdev-mpath-devel \
-    libcap-devel \
     libcap-ng-devel \
     libcurl-devel \
     libfdt-devel \
tests/docker/dockerfiles/ubuntu.docker +0 -1
index f4864922240b..ecea155646ea 100644
@@ -23,7 +23,6 @@ ENV PACKAGES flex bison \
     libbrlapi-dev \
     libbz2-dev \
     libcacard-dev \
-    libcap-dev \
     libcap-ng-dev \
     libcurl4-gnutls-dev \
     libdrm-dev \
tests/docker/dockerfiles/ubuntu1804.docker +0 -1
index 3cc4f492c4a7..32a607471a0c 100644
@@ -12,7 +12,6 @@ ENV PACKAGES flex bison \
     libbrlapi-dev \
     libbz2-dev \
     libcacard-dev \
-    libcap-dev \
     libcap-ng-dev \
     libcurl4-gnutls-dev \
     libdrm-dev \
Signature · 1 line
2.21.0
author
#4 lore raw

[PULL 3/5] ci: Use libcap-ng

In reply to Greg Kurz

From: "Dr. David Alan Gilbert" <[email protected]>

We currently enable libcap-dev in build-clang to pick up the 9p proxy helper. Paolo's patch changes (commit 7e46261368d1) that to use libcap-ng, so switch to using it. This also means we'll be testing the scsi pr manager and the bridge helper.

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index be57c6a454a5..62a96097983d 100644
@@ -59,7 +59,7 @@ build-user:
 
 build-clang:
  script:
- - apt-get install -y -qq clang libsdl2-dev libattr1-dev libcap-dev
+ - apt-get install -y -qq clang libsdl2-dev libattr1-dev libcap-ng-dev
       xfslibs-dev libiscsi-dev libnfs-dev libseccomp-dev gnutls-dev librbd-dev
  - ./configure --cc=clang --cxx=clang++ --enable-werror
       --target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
Signature · 1 line
2.21.0
author
#5 lore raw

[PULL 5/5] virtfs: Remove the deprecated "-virtfs_synth" option

In reply to Greg Kurz

From: Thomas Huth <[email protected]>

It's been marked as deprecated since QEMU v4.1, time to remove it now.

---
 qemu-deprecated.texi |  5 -----
 qemu-options.hx      | 10 ----------
 vl.c                 | 23 -----------------------
 3 files changed, 38 deletions(-)
qemu-deprecated.texi +0 -5
index 4b4b7425ac1e..8471eef9c22d 100644
@@ -89,11 +89,6 @@ error in the future.
 The @code{-realtime mlock=on|off} argument has been replaced by the
 @code{-overcommit mem-lock=on|off} argument.
 
-@subsection -virtfs_synth (since 4.1)
-
-The ``-virtfs_synth'' argument is now deprecated. Please use ``-fsdev synth''
-and ``-device virtio-9p-...'' instead.
-
 @subsection -numa node,mem=@var{size} (since 4.1)
 
 The parameter @option{mem} of @option{-numa node} is used to assign a part of
qemu-options.hx +0 -10
index 65c9473b7325..4cf7751adeba 100644
@@ -1468,16 +1468,6 @@ would still return entries from other devices).
 @end table
 ETEXI
 
-DEF("virtfs_synth", 0, QEMU_OPTION_virtfs_synth,
-    "-virtfs_synth Create synthetic file system image\n",
-    QEMU_ARCH_ALL)
-STEXI
-@item -virtfs_synth
-@findex -virtfs_synth
-Create synthetic file system image. Note that this option is now deprecated.
-Please use @code{-fsdev synth} and @code{-device virtio-9p-...} instead.
-ETEXI
-
 DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi,
     "-iscsi [user=user][,password=password]\n"
     "       [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE\n"
vl.c +0 -23
index 6a65a64bfd64..c0904b365b55 100644
@@ -3374,29 +3374,6 @@ int main(int argc, char **argv, char **envp)
                              qemu_opt_get(opts, "mount_tag"), &error_abort);
                 break;
             }
-            case QEMU_OPTION_virtfs_synth: {
-                QemuOpts *fsdev;
-                QemuOpts *device;
-
-                warn_report("'-virtfs_synth' is deprecated, please use "
-                             "'-fsdev synth' and '-device virtio-9p-...' "
-                            "instead");
-
-                fsdev = qemu_opts_create(qemu_find_opts("fsdev"), "v_synth",
-                                         1, NULL);
-                if (!fsdev) {
-                    error_report("duplicate option: %s", "virtfs_synth");
-                    exit(1);
-                }
-                qemu_opt_set(fsdev, "fsdriver", "synth", &error_abort);
-
-                device = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
-                                          &error_abort);
-                qemu_opt_set(device, "driver", "virtio-9p-pci", &error_abort);
-                qemu_opt_set(device, "fsdev", "v_synth", &error_abort);
-                qemu_opt_set(device, "mount_tag", "v_synth", &error_abort);
-                break;
-            }
             case QEMU_OPTION_serial:
                 add_device_config(DEV_SERIAL, optarg);
                 default_serial = 0;
Signature · 1 line
2.21.0
#6 lore raw
In reply to Greg Kurz
Quoted 9 lines · Greg Kurz

The following changes since commit fb2246882a2c8d7f084ebe0617e97ac78467d156:

.travis.yml: drop xcode9.4 from build matrix (2019-11-29 15:51:52 +0000)

are available in the Git repository at:

https://github.com/gkurz/qemu.git tags/9p-next-2019-12-12

Quoted 9 lines

for you to fetch changes up to b3e2bb9458af556cb8aa0558f59222f462b81069:

virtfs: Remove the deprecated "-virtfs_synth" option (2019-12-09 18:00:35 +0100)

----------------------------------------------------------------
- conversion of virtfs-proxy-helper from libcap to libcap-ng
- removal of libcap-dev from docker, travis and gitlab CI
- removal of deprecate "-virtfs_synth" option

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM