Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package multipath-tools for openSUSE:Factory checked in at 2022-08-25 15:33:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/multipath-tools (Old) and /work/SRC/openSUSE:Factory/.multipath-tools.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "multipath-tools" Thu Aug 25 15:33:08 2022 rev:144 rq:999007 version:0.9.0+55+suse.33d8854 Changes: -------- --- /work/SRC/openSUSE:Factory/multipath-tools/multipath-tools.changes 2022-07-21 11:33:13.862939678 +0200 +++ /work/SRC/openSUSE:Factory/.multipath-tools.new.2083/multipath-tools.changes 2022-08-25 15:33:11.527936944 +0200 @@ -1,0 +2,7 @@ +Wed Aug 24 09:28:55 UTC 2022 - mwi...@suse.com + +- Update to version 0.9.0+55+suse.33d8854: + * Avoid linking to libreadline to avoid licensing issue + (bsc#1202616) + +------------------------------------------------------------------- Old: ---- multipath-tools-0.9.0+39+suse.51a2ab1.obscpio New: ---- multipath-tools-0.9.0+55+suse.33d8854.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ multipath-tools.spec ++++++ --- /var/tmp/diff_new_pack.NCTZ8g/_old 2022-08-25 15:33:12.359938761 +0200 +++ /var/tmp/diff_new_pack.NCTZ8g/_new 2022-08-25 15:33:12.363938769 +0200 @@ -34,7 +34,7 @@ %define libdmmp_version %(echo %{_libdmmp_version} | tr . _) Name: multipath-tools -Version: 0.9.0+39+suse.51a2ab1 +Version: 0.9.0+55+suse.33d8854 Release: 0 Summary: Tools to Manage Multipathed Devices with the device-mapper License: GPL-2.0-only @@ -55,7 +55,6 @@ %if 0%{?with_libdmmp} == 1 BuildRequires: pkgconfig(json-c) %endif -BuildRequires: readline-devel BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(liburcu) @@ -86,6 +85,7 @@ + # Currently, it makes no sense to split out libmpathpersist and libmpathcmd # separately. libmultipath has no stable API at all, and it depends ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.NCTZ8g/_old 2022-08-25 15:33:12.439938935 +0200 +++ /var/tmp/diff_new_pack.NCTZ8g/_new 2022-08-25 15:33:12.443938945 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/multipath-tools.git</param> - <param name="changesrevision">51a2ab1841b543b3e457fe73da5d2fd21f168c9b</param></service></servicedata> + <param name="changesrevision">33d88543aa67186adf5fff4556a9bd21ba7ea324</param></service></servicedata> (No newline at EOF) ++++++ multipath-tools-0.9.0+39+suse.51a2ab1.obscpio -> multipath-tools-0.9.0+55+suse.33d8854.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/abi.yaml new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/abi.yaml --- old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/abi.yaml 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/abi.yaml 2022-08-23 12:23:47.000000000 +0200 @@ -30,7 +30,7 @@ sudo apt-get install --yes gcc gcc make pkg-config abigail-tools libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev - libudev-dev libjson-c-dev liburcu-dev libcmocka-dev + libudev-dev libjson-c-dev liburcu-dev libcmocka-dev libedit-dev - name: create ABI run: make -O -j$(grep -c ^processor /proc/cpuinfo) abi.tar.gz - name: save ABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/build-and-unittest.yaml new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/build-and-unittest.yaml --- old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/build-and-unittest.yaml 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/build-and-unittest.yaml 2022-08-23 12:23:47.000000000 +0200 @@ -30,7 +30,7 @@ sudo apt-get install --yes gcc make perl-base pkg-config valgrind libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev - libudev-dev libjson-c-dev liburcu-dev libcmocka-dev + libudev-dev libjson-c-dev liburcu-dev libcmocka-dev libedit-dev - name: build run: make -O -j$(grep -c ^processor /proc/cpuinfo) - name: test @@ -58,7 +58,7 @@ sudo apt-get install --yes gcc-10 make perl-base pkg-config valgrind libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev - libudev-dev libjson-c-dev liburcu-dev libcmocka-dev + libudev-dev libjson-c-dev liburcu-dev libcmocka-dev libedit-dev - name: set CC run: echo CC=gcc-10 >> $GITHUB_ENV - name: build @@ -88,7 +88,7 @@ sudo apt-get install --yes clang make perl-base pkg-config valgrind libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev - libudev-dev libjson-c-dev liburcu-dev libcmocka-dev + libudev-dev libjson-c-dev liburcu-dev libcmocka-dev libedit-dev - name: set CC run: echo CC=clang >> $GITHUB_ENV - name: build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/coverity.yaml new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/coverity.yaml --- old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/coverity.yaml 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/coverity.yaml 2022-08-23 12:23:47.000000000 +0200 @@ -15,7 +15,7 @@ sudo apt-get install --yes gcc make pkg-config libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev - libudev-dev libjson-c-dev liburcu-dev libcmocka-dev + libudev-dev libjson-c-dev liburcu-dev libcmocka-dev libedit-dev - name: download coverity run: > curl -o cov-analysis-linux64.tar.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/foreign.yaml new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/foreign.yaml --- old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/foreign.yaml 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/foreign.yaml 2022-08-23 12:23:47.000000000 +0200 @@ -16,7 +16,7 @@ runs-on: ubuntu-20.04 strategy: matrix: - os: [buster] + os: [bullseye] arch: ['ppc64le', 'aarch64', 's390x'] container: mwilck/multipath-build-${{ matrix.os }}-${{ matrix.arch }} steps: @@ -47,7 +47,7 @@ needs: build strategy: matrix: - os: [buster] + os: [bullseye] arch: ['ppc64le', 'aarch64', 's390x'] steps: - name: get binaries diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/native.yaml new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/native.yaml --- old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/native.yaml 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/native.yaml 2022-08-23 12:23:47.000000000 +0200 @@ -25,13 +25,24 @@ - name: checkout uses: actions/checkout@v1 - name: build and test + if: ${{ matrix.os != 'jessie' }} run: make test + - name: build and test (jessie) + # On jessie, we use libreadline 5 (no licensing issue) + if: ${{ matrix.os == 'jessie' }} + run: make READLINE=libreadline test - name: clean run: make clean - name: clang + if: ${{ matrix.os != 'jessie' }} env: CC: clang run: make test + - name: clang (jessie) + if: ${{ matrix.os == 'jessie' }} + env: + CC: clang + run: make READLINE=libreadline test rolling: runs-on: ubuntu-20.04 @@ -59,12 +70,13 @@ libjson-c-dev liburcu-dev libcmocka-dev + libedit-dev - name: dependencies-alpine if: ${{ matrix.os == 'alpine' }} run: > apk add make gcc clang cmocka musl-dev lvm2-dev libaio-dev readline-dev ncurses-dev eudev-dev - userspace-rcu-dev json-c-dev cmocka-dev + userspace-rcu-dev json-c-dev cmocka-dev libedit-dev - name: dependencies-fedora if: ${{ matrix.os == 'fedora:rawhide' }} run: > @@ -79,6 +91,7 @@ userspace-rcu-devel json-c-devel libcmocka-devel + libedit-devel - name: checkout uses: actions/checkout@v1 - name: build and test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/sles.yaml new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/sles.yaml --- old/multipath-tools-0.9.0+39+suse.51a2ab1/.github/workflows/sles.yaml 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/.github/workflows/sles.yaml 2022-08-23 12:23:47.000000000 +0200 @@ -5,13 +5,14 @@ - sles* - factory - next + - edge jobs: build-and-test: runs-on: ubuntu-20.04 strategy: matrix: - os: ['leap15.2', 'leap15.4'] + os: ['tumbleweed', '15.3', '15.4'] # We have -arm too (for armv7l) # But tests fail with qemu-user (readdir() returns -EOVERFLOW), see # https://gitlab.com/qemu-project/qemu/-/issues/263 @@ -19,14 +20,7 @@ # Attempts to fix this with -D_FILE_OFFSET_BITS=64 failed, too # this means replacing cmocka wrappers like __wrap_lseek() with # __wrap_lseek64() - - arch: ['', '-ppc64le', '-arm64', '-s390x'] - include: - - os: 'leap15.3' - arch: '-s390x' - exclude: - - os: 'leap15.2' - arch: '-s390x' + arch: ['x86_64', 'ppc64le', 'aarch64', 's390x'] steps: - name: checkout uses: actions/checkout@v1 @@ -38,6 +32,6 @@ # See https://github.community/t/expressions-in-docker-uri/16271 uses: mosteo-actions/docker-run@v1 with: - image: mwilck/multipath-build-${{ matrix.os }}${{ matrix.arch }} + params: --platform ${{ matrix.arch }} + image: registry.opensuse.org/home/mwilck/containers/${{ matrix.os }}/containers/multipath-build command: test - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/.obs/workflows.yml new/multipath-tools-0.9.0+55+suse.33d8854/.obs/workflows.yml --- old/multipath-tools-0.9.0+39+suse.51a2ab1/.obs/workflows.yml 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/.obs/workflows.yml 2022-08-23 12:23:47.000000000 +0200 @@ -16,20 +16,25 @@ - i586 - name: openSUSE_Leap_15.4 paths: - - target_project: openSUSE:Tools - target_repository: 15.4 - target_project: openSUSE:Leap:15.4 target_repository: standard architectures: - x86_64 - name: SLE_15_SP4 paths: - - target_project: openSUSE:Tools - target_repository: 15.4 - target_project: SUSE:SLE-15-SP4:GA target_repository: pool architectures: - x86_64 + - s390x + - ppc64le + - aarch64 + - name: SLE_15_SP3 + paths: + - target_project: SUSE:SLE-15-SP3:GA + target_repository: pool + architectures: + - x86_64 - s390x - ppc64le - aarch64 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/Makefile.inc new/multipath-tools-0.9.0+55+suse.33d8854/Makefile.inc --- old/multipath-tools-0.9.0+39+suse.51a2ab1/Makefile.inc 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/Makefile.inc 2022-08-23 12:23:47.000000000 +0200 @@ -8,6 +8,11 @@ # # Uncomment to disable dmevents polling support # ENABLE_DMEVENTS_POLL = 0 +# +# Readline library to use, libedit, libreadline, or empty +# Caution: Using libreadline may make the multipathd binary undistributable, +# see https://github.com/opensvc/multipath-tools/issues/36 +READLINE := # List of scsi device handler modules to load on boot, e.g. # SCSI_DH_MODULES_PRELOAD := scsi_dh_alua scsi_dh_rdac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/README.licenses new/multipath-tools-0.9.0+55+suse.33d8854/README.licenses --- old/multipath-tools-0.9.0+39+suse.51a2ab1/README.licenses 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/README.licenses 2022-08-23 12:23:47.000000000 +0200 @@ -12,24 +12,24 @@ THIS IS A BEST-EFFORT ASSESSMENT MADE BY A DEVELOPER. THIS DOCUMENT IS NOT INTENDED AS LEGAL ADVICE. -# Statistics +# Licenses of multipath-tools Binaries - * LGPLv2.0 ("default license", see below): 120 - * GPLv2.0+: 35 - * GPLv2.0: 23 (under libmultipath and kpartx) - * GPLv3.0+: 12 (only libdmmp) - * LGPLv2.0+: 2 (libmpathcmd, recently changed to LGPLv2.1) - * LGPLv2.1: 1 (libmultipath/checkers/rbd.c) - * GPL (any version): 7 (only in libmultipath/prioritizers) - * zlib (BSD-like): 2 (valgrind) +- libmpathcmd: LGPL-2.1-or-later +- libmultipath: GPL-2.0-only +- libmpathpersist: LGPL-2.0 (see below) +- libdmmp: GPL-3.0-or-later +- kpartx: GPL-2.0-only +- multipath: GPL-2.0-only +- multipathd: GPL-2.0-only +- mpathpersist: GPL-2.0-only -## License propagation for libraries and binaries +## Explanation Because libmultipath contains code covered by GPLv2.0 code, it's effectively under GPLv2.0. The same holds for the multipath and multipathd executables, -and also for mpathpersist, as they need to link with -libmultipath. libmpathpersist itself is under LGPLv2.0, but as it needs to -be linked with libmultipath, all executables linking with it must be under +and also for mpathpersist, as they need to link with libmultipath. +libmpathpersist itself is under LGPLv2.0, but as it needs to be +linked with libmultipath, all executables linking with it must be under GPLv2.0-compatible licenses. The "plugins" in the "checkers", "prioritizers", and "foreign" subdirectories @@ -46,6 +46,25 @@ libdmmp is under GPLv3.0+. That's no problem because it communicates with libmultipath only through the socket. +# Licenses in source code, from fossology analysis (see below). + +The analysis was carried out in April 2018, for multipath-tools 0.7.6. + + * LGPLv2.0 ("default license", see below): 120 + * GPLv2.0-or-later: 35 + * GPLv2.0-only: 5 files in libmultipath: + - uevent.c + - sysfs.c + - list.h + - prioritizers/ontap.c + - prioritizers/datacore.c + 18 files under kpartx. + * GPLv3.0-or-later: 12 (only libdmmp) + * LGPLv2.0-or-later: 2 (libmpathcmd, recently changed to LGPLv2.1) + * LGPLv2.1: 1 (libmultipath/checkers/rbd.c) + * GPL (any version): 7 (only in libmultipath/prioritizers) + * zlib (BSD-like): 2 (valgrind) + # Notes on the assessment The code has been scanned with fossology #c6260f, and the results manually @@ -65,13 +84,48 @@ ## Default license The default license for source files without an explicit license header -was assumed to be LGPL v2.0, which was the license in COPYING since May 1, -2005. Some files contain hints like "copied from xyz" that make it +was assumed to be LGPL v2.0, which was the license in COPYING since Nov 12, +2003, preceding the git history. The file was added by Greg Kroah-Hartmann +to the former [udev git repository](https://git.kernel.org/pub/scm/linux/hotplug/udev.git) +with the message + + commit 04a091d47e32d6480b99424e41db093b013dfaf5 + Author: g...@kroah.com <g...@kroah.com> + Date: Thu Nov 13 06:30:57 2003 -0800 + + [PATCH] Add multipath "extra" program from Christophe Varoqui, <christophe.varo...@free.fr> + +I couldn't find a mailing-list posting of this program pre-dating this commit. +It has been the default license since then, and all contributions not +explicitly stating otherwise can be assumed to be made under this license. + +### LGPL-2.0 vs. LGPL-2.1 + +The main difference between the LGPL-2.0 and LGPL-2.1 (other than the +substitution of the word "library" by "lesser") was the addition of ??6b +in section 6, which lists the prerequisites for "works using the library": + +> Use a suitable shared library mechanism for linking with the Library. A +> suitable mechanism is one that (1) uses at run time a copy of the library +> already present on the user's computer system, rather than copying library +> functions into the executable, and (2) will operate properly with a modified +> version of the library, if the user installs one, as long as the modified +> version is interface-compatible with the version that the work was made with. + +This paragraph mainly clarifies what "combine or link" in the initial +paragraph of section 6 technically means. It forbids copying and static +linking, and guarantees the user's freedom to modify the library and still +retain a working "work using the library". The LGPL-2.0 doesn't contain +similar requirements, at least not explicitly. + +## Other licenses + +Some files contain hints like "copied from xyz" that make it possible to infer other original licenses. Whether or not that original license still applies is a matter of discussion, but by nature of the GPL, I assume that a file that emerged from GPL'd code remains under GPL, even if the changes far outweigh the original import - unless the -differntly licensed sections are clearly identified in the file (e.g. +differently licensed sections are clearly identified in the file (e.g. libmultipath/util.c). ## "Irrelevant" files @@ -94,7 +148,9 @@ * multipathd/uxclnt.c: header says some code was imported from Samba, which would mean GPL-2.0+. But it's highly unclear what actually came from samba. - * libmultipath/list.h: copied from kernel => GPLv2.0 + * libmultipath/uevent.c: copied from udev code, GPLv2.0-only + * libmultipath/sysfs.c: copied from udev code, GPLv2.0-only + * libmultipath/list.h: copied from kernel => GPLv2.0-only * libmultipath/sg_include.h: dito. * libmultipath/callout.[hc]: refers to udev, I couldn't identify the original (early udev) code, assuming GPLv2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/libmultipath/strbuf.c new/multipath-tools-0.9.0+55+suse.33d8854/libmultipath/strbuf.c --- old/multipath-tools-0.9.0+39+suse.51a2ab1/libmultipath/strbuf.c 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/libmultipath/strbuf.c 2022-08-23 12:23:47.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 2021 SUSE LLC - * SPDX-License-Identifier: GPL-2.0-only + * SPDX-License-Identifier: GPL-2.0-or-later */ #include <inttypes.h> #include <stdint.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/libmultipath/strbuf.h new/multipath-tools-0.9.0+55+suse.33d8854/libmultipath/strbuf.h --- old/multipath-tools-0.9.0+39+suse.51a2ab1/libmultipath/strbuf.h 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/libmultipath/strbuf.h 2022-08-23 12:23:47.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 2021 SUSE LLC - * SPDX-License-Identifier: GPL-2.0-only + * SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef _STRBUF_H #define _STRBUF_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/multipathd/Makefile new/multipath-tools-0.9.0+55+suse.33d8854/multipathd/Makefile --- old/multipath-tools-0.9.0+39+suse.51a2ab1/multipathd/Makefile 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/multipathd/Makefile 2022-08-23 12:23:47.000000000 +0200 @@ -22,7 +22,16 @@ LDFLAGS += $(BIN_LDFLAGS) LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \ -L$(mpathcmddir) -lmpathcmd -ludev -ldl -lurcu -lpthread \ - -ldevmapper -lreadline + -ldevmapper + +ifeq ($(READLINE),libedit) +CPPFLAGS += -DUSE_LIBEDIT +LIBDEPS += -ledit +endif +ifeq ($(READLINE),libreadline) +CPPFLAGS += -DUSE_LIBREADLINE +LIBDEPS += -lreadline +endif ifdef SYSTEMD CPPFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/multipathd/cli.c new/multipath-tools-0.9.0+55+suse.33d8854/multipathd/cli.c --- old/multipath-tools-0.9.0+39+suse.51a2ab1/multipathd/cli.c 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/multipathd/cli.c 2022-08-23 12:23:47.000000000 +0200 @@ -11,7 +11,12 @@ #include "parser.h" #include "util.h" #include "version.h" +#ifdef USE_LIBEDIT +#include <editline/readline.h> +#endif +#ifdef USE_LIBREADLINE #include <readline/readline.h> +#endif #include "mpath_cmd.h" #include "cli.h" @@ -454,6 +459,7 @@ keys = NULL; } +#if defined(USE_LIBREADLINE) || defined(USE_LIBEDIT) static int key_match_fingerprint (struct key * kw, uint64_t fp) { @@ -559,3 +565,4 @@ */ return ((char *)NULL); } +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/multipath-tools-0.9.0+39+suse.51a2ab1/multipathd/uxclnt.c new/multipath-tools-0.9.0+55+suse.33d8854/multipathd/uxclnt.c --- old/multipath-tools-0.9.0+39+suse.51a2ab1/multipathd/uxclnt.c 2022-07-13 22:18:20.000000000 +0200 +++ new/multipath-tools-0.9.0+55+suse.33d8854/multipathd/uxclnt.c 2022-08-23 12:23:47.000000000 +0200 @@ -8,6 +8,7 @@ #include <stdlib.h> #include <unistd.h> #include <stdarg.h> +#include <ctype.h> #include <fcntl.h> #include <errno.h> #include <sys/ioctl.h> @@ -15,14 +16,21 @@ #include <sys/socket.h> #include <sys/un.h> #include <poll.h> + +#ifdef USE_LIBEDIT +#include <editline/readline.h> +#endif +#ifdef USE_LIBREADLINE #include <readline/readline.h> #include <readline/history.h> +#endif #include "mpath_cmd.h" #include "uxsock.h" #include "defaults.h" #include "vector.h" +#include "util.h" #include "cli.h" #include "uxclnt.h" @@ -70,35 +78,52 @@ */ static void process(int fd, unsigned int timeout) { - char *line; - char *reply; - int ret; - cli_init(); +#if defined(USE_LIBREADLINE) || defined(USE_LIBEDIT) rl_readline_name = "multipathd"; rl_completion_entry_function = key_generator; - while ((line = readline("multipathd> "))) { - size_t llen = strlen(line); +#endif - if (!llen) { - free(line); + cli_init(); + for(;;) + { + char *line __attribute__((cleanup(cleanup_charp))) = NULL; + char *reply __attribute__((cleanup(cleanup_charp))) = NULL; + ssize_t llen; + int ret; + +#if defined(USE_LIBREADLINE) || defined(USE_LIBEDIT) + line = readline("multipathd> "); + if (!line) + break; + llen = strlen(line); + if (!llen) continue; +#else + size_t lsize = 0; + + fputs("multipathd> ", stdout); + errno = 0; + llen = getline(&line, &lsize, stdin); + if (llen == -1) { + if (errno != 0) + fprintf(stderr, "Error in getline: %m"); + break; } + if (!llen || !strcmp(line, "\n")) + continue; +#endif if (need_quit(line, llen)) break; - if (send_packet(fd, line) != 0) break; + if (send_packet(fd, line) != 0) + break; ret = recv_packet(fd, &reply, timeout); - if (ret != 0) break; + if (ret != 0) + break; print_reply(reply); - - if (line && *line) - add_history(line); - - free(line); - free(reply); } } ++++++ multipath-tools.obsinfo ++++++ --- /var/tmp/diff_new_pack.NCTZ8g/_old 2022-08-25 15:33:12.859939852 +0200 +++ /var/tmp/diff_new_pack.NCTZ8g/_new 2022-08-25 15:33:12.867939870 +0200 @@ -1,5 +1,5 @@ name: multipath-tools -version: 0.9.0+39+suse.51a2ab1 -mtime: 1657743500 -commit: 51a2ab1841b543b3e457fe73da5d2fd21f168c9b +version: 0.9.0+55+suse.33d8854 +mtime: 1661250227 +commit: 33d88543aa67186adf5fff4556a9bd21ba7ea324