Hello community, here is the log from the commit of package target-isns for openSUSE:Factory checked in at 2020-06-03 20:36:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/target-isns (Old) and /work/SRC/openSUSE:Factory/.target-isns.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "target-isns" Wed Jun 3 20:36:10 2020 rev:11 rq:811205 version:0.6.8 Changes: -------- --- /work/SRC/openSUSE:Factory/target-isns/target-isns.changes 2020-05-26 17:19:26.339990111 +0200 +++ /work/SRC/openSUSE:Factory/.target-isns.new.3606/target-isns.changes 2020-06-03 20:36:46.625972759 +0200 @@ -1,0 +2,34 @@ +Wed Jun 03 17:06:10 UTC 2020 - [email protected] + +- Previous update to 0.6.8 did not work (see below), because of + an error in the _service file, now fixed. As a reminder, changes + since 0.6.7: + * Update the changelog for release 0.6.8 + * Bump version to 0.6.8 + * Remove useless variable spotted by clang-tidy + * Add Maurizio Lombardi to THANKS + * Fix compile error with GCC 10 + + Note that this did *NOT* change the name of the compressed tar + file used (target-isns-0.6.8.tar.xz), just its contents. + + This also fixes an issue in our OBS (build service), where + link-time optimization was detecting an issue with the "config" + structure, which had already been fixed upstream. + +- Modified and renamed a previous patch. Don't change zero- + length arrays to pointers, but intead change the declaration + to empty arrays, as per current coding practices for this + case, replacing: + * target-isns-Replace-zero-length-arrays-with-pointers.patch + with: + * target-isns-Replace-zero-length-arrays-with-empty-arrays.patch + +------------------------------------------------------------------- +Sat May 30 21:25:49 UTC 2020 - Lee Duncan <[email protected]> + +- Fix gcc-10 issue with zero-length arrays, converting them + to pointers, adding patch: + * target-isns-Replace-zero-length-arrays-with-pointers.patch + +------------------------------------------------------------------- New: ---- target-isns-Replace-zero-length-arrays-with-empty-arrays.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ target-isns.spec ++++++ --- /var/tmp/diff_new_pack.YKwraW/_old 2020-06-03 20:36:47.297974865 +0200 +++ /var/tmp/diff_new_pack.YKwraW/_new 2020-06-03 20:36:47.297974865 +0200 @@ -23,6 +23,7 @@ Version: 0.6.8 Release: 0 Source: %{name}-%{version}.tar.xz +Patch1: %{name}-Replace-zero-length-arrays-with-empty-arrays.patch URL: https://github.com/open-iscsi/target-isns BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake @@ -45,6 +46,7 @@ %prep %setup -n %{name}-%{version} +%patch1 -p1 %build %cmake -DSUPPORT_SYSTEMD=ON ++++++ _service ++++++ --- /var/tmp/diff_new_pack.YKwraW/_old 2020-06-03 20:36:47.321974941 +0200 +++ /var/tmp/diff_new_pack.YKwraW/_new 2020-06-03 20:36:47.325974953 +0200 @@ -5,7 +5,7 @@ <param name="subdir"></param> <param name="filename">target-isns</param> <param name="versionformat">0.6.8</param> - <param name="revision">v0.6.7</param> + <param name="revision">v0.6.8</param> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="disabled"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.YKwraW/_old 2020-06-03 20:36:47.337974991 +0200 +++ /var/tmp/diff_new_pack.YKwraW/_new 2020-06-03 20:36:47.337974991 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/open-iscsi/target-isns.git</param> - <param name="changesrevision">b22a20d597ec409130d0ffd94bc3389a75e71715</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">52e4fd427b1aff902ef4e7bce9a9c2f6b358a5eb</param></service></servicedata> \ No newline at end of file ++++++ target-isns-0.6.8.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/target-isns-0.6.8/CHANGELOG.md new/target-isns-0.6.8/CHANGELOG.md --- old/target-isns-0.6.8/CHANGELOG.md 2020-01-31 22:29:39.000000000 +0100 +++ new/target-isns-0.6.8/CHANGELOG.md 2020-05-08 16:10:21.000000000 +0200 @@ -6,6 +6,10 @@ ## [Unreleased] +## [0.6.8] - 2020-05-08 +### Fixed +- Fix compilation error with GCC 10. Contributed by Maurizio Lombardi. + ## [0.6.7] - 2020-01-31 ### Fixed - Register the correct alias when multiple iSCSI targets exist. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/target-isns-0.6.8/CMakeLists.txt new/target-isns-0.6.8/CMakeLists.txt --- old/target-isns-0.6.8/CMakeLists.txt 2020-01-31 22:29:39.000000000 +0100 +++ new/target-isns-0.6.8/CMakeLists.txt 2020-05-08 16:10:21.000000000 +0200 @@ -6,7 +6,7 @@ # project(target-isns "C") -set(TARGET_ISNS_VERSION "0.6.7") +set(TARGET_ISNS_VERSION "0.6.8") cmake_minimum_required(VERSION 3.1) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/target-isns-0.6.8/THANKS new/target-isns-0.6.8/THANKS --- old/target-isns-0.6.8/THANKS 2020-01-31 22:29:39.000000000 +0100 +++ new/target-isns-0.6.8/THANKS 2020-05-08 16:10:21.000000000 +0200 @@ -5,6 +5,7 @@ Hao Wu Kyle Fortin Lee Duncan +Maurizio Lombardi MostlyBrian Olaf Kirch Victor Dodon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/target-isns-0.6.8/src/configfs.c new/target-isns-0.6.8/src/configfs.c --- old/target-isns-0.6.8/src/configfs.c 2020-01-31 22:29:39.000000000 +0100 +++ new/target-isns-0.6.8/src/configfs.c 2020-05-08 16:10:21.000000000 +0200 @@ -60,6 +60,8 @@ static int inotify_fd = -1; static const char LIO_TARGET_ALIAS[] = "LIO Target"; +struct config config; + bool configfs_iscsi_path_exists(void) { DIR *dir = opendir(config.configfs_iscsi_path); @@ -146,7 +148,6 @@ static bool configfs_tpg_enabled(const struct target *tgt, uint16_t tpg_tag) { int fd; - ssize_t nr; char buf[8]; char *path; bool enabled = false; @@ -159,7 +160,7 @@ return false; } free(path); - if ((nr = read(fd, buf, sizeof(buf))) != -1) { + if (read(fd, buf, sizeof(buf)) != -1) { enabled = buf[0] == '1'; } close(fd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/target-isns-0.6.8/src/util.h new/target-isns-0.6.8/src/util.h --- old/target-isns-0.6.8/src/util.h 2020-01-31 22:29:39.000000000 +0100 +++ new/target-isns-0.6.8/src/util.h 2020-05-08 16:10:21.000000000 +0200 @@ -9,12 +9,14 @@ #include <inttypes.h> -struct { +struct config { char isns_server[64]; uint16_t isns_port; int log_level; char configfs_iscsi_path[256]; -} config; +}; + +extern struct config config; void pidfile_create(void); ++++++ target-isns-Replace-zero-length-arrays-with-empty-arrays.patch ++++++ >From 1f6b255f010014e69760766c07901bf0aad92027 Mon Sep 17 00:00:00 2001 From: Lee Duncan <[email protected]> Date: Sat, 30 May 2020 14:09:45 -0700 Subject: [PATCH] Replace zero-length arrays with pointers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two zero-length arrays used, in struct isns_hdr and struct isns_tlv, that are really meant as place-holders for allocated arrays. These should just be pointers. This fixes a gcc-10 warning that looks like: In function ‘isns_rsp_handle’, inlined from ‘isns_handle’ at .../src/isns.c:789:3: .../src/isns.c:724:34: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 724 | *((char *) tlv->value + slen) = '\0'; | ^ .../src/isns.c: In function ‘isns_handle’: .../src/isns_proto.h:33:11: note: at offset 0 to object ‘value’ with size 0 declared here 33 | uint32_t value[0]; | ^ --- src/isns_proto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/isns_proto.h b/src/isns_proto.h index a5c0f52b05e6..cc369c0e08b5 100644 --- a/src/isns_proto.h +++ b/src/isns_proto.h @@ -24,13 +24,13 @@ struct isns_hdr { uint16_t flags; uint16_t transaction; uint16_t sequence; - uint32_t pdu[0]; + uint32_t pdu[]; } __attribute__ ((packed)); struct isns_tlv { uint32_t tag; uint32_t length; - uint32_t value[0]; + uint32_t value[]; } __attribute__ ((packed)); /* X-macro describing iSNSP commands and responses (4.1.3) */ -- 2.26.2
