diff -Nru tgt-1.0.79/debian/changelog tgt-1.0.79/debian/changelog --- tgt-1.0.79/debian/changelog 2019-07-31 19:25:34.000000000 +0000 +++ tgt-1.0.79/debian/changelog 2020-09-30 11:30:55.000000000 +0000 @@ -1,3 +1,26 @@ +tgt (1:1.0.79-3ubuntu1) groovy; urgency=medium + + * Merge with Debian unstable. Remaining changes: + - Drop glusterfs support, package not in main. + + debian/control: drop build depends and package + + debian/rules: disable feature + + debian/tests/{control, storage}: remove related tests + + debian/tgt-glusterfs.install (Deleted) + * Add changes: + - d/rules: avoid FTFBS on s390x due to glibc 2.32 triggering more + gcc-10 errors on tgt build + + -- Christian Ehrhardt Wed, 30 Sep 2020 13:30:55 +0200 + +tgt (1:1.0.79-3) unstable; urgency=medium + + * Fix FTBFS with GCC 10 (Closes: #957874) + * Bump Standards-Version to 4.5.0; no changes needed + * Bump debhelper-compat to 13; no changes needed + * d/copyright: bump debian/ years + + -- Apollon Oikonomopoulos Thu, 17 Sep 2020 12:38:22 +0300 + tgt (1:1.0.79-2ubuntu1) eoan; urgency=medium * Merge with Debian unstable. Remaining changes: diff -Nru tgt-1.0.79/debian/compat tgt-1.0.79/debian/compat --- tgt-1.0.79/debian/compat 2019-07-31 19:25:34.000000000 +0000 +++ tgt-1.0.79/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -12 diff -Nru tgt-1.0.79/debian/control tgt-1.0.79/debian/control --- tgt-1.0.79/debian/control 2019-07-31 19:25:34.000000000 +0000 +++ tgt-1.0.79/debian/control 2020-09-30 11:30:55.000000000 +0000 @@ -3,12 +3,12 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Apollon Oikonomopoulos -Build-Depends: debhelper (>= 12~), libibverbs-dev, librdmacm-dev (>= 1.0.16), +Build-Depends: debhelper-compat (= 13), libibverbs-dev, librdmacm-dev (>= 1.0.16), xsltproc, docbook-xsl, librbd-dev, uuid-dev, bash-completion, libsystemd-dev, libaio-dev, pkg-config Vcs-Git: https://salsa.debian.org/debian/tgt.git Vcs-Browser: https://salsa.debian.org/debian/tgt -Standards-Version: 4.4.0 +Standards-Version: 4.5.0 Homepage: http://stgt.sourceforge.net/ Package: tgt diff -Nru tgt-1.0.79/debian/copyright tgt-1.0.79/debian/copyright --- tgt-1.0.79/debian/copyright 2019-07-31 19:25:34.000000000 +0000 +++ tgt-1.0.79/debian/copyright 2020-09-30 11:27:52.000000000 +0000 @@ -10,7 +10,7 @@ Files: debian/* Copyright: Copyright © 2007-2011 Frederik Schüler Copyright © 2007-2011 Ben Hutchings - Copyright © 2014-2018 Apollon Oikonomopoulos + Copyright © 2014-2020 Apollon Oikonomopoulos License: GPL-2+ Files: usr/bs_aio.c usr/work.c diff -Nru tgt-1.0.79/debian/patches/0008-Fix-build-with-gcc-10.patch tgt-1.0.79/debian/patches/0008-Fix-build-with-gcc-10.patch --- tgt-1.0.79/debian/patches/0008-Fix-build-with-gcc-10.patch 1970-01-01 00:00:00.000000000 +0000 +++ tgt-1.0.79/debian/patches/0008-Fix-build-with-gcc-10.patch 2020-09-30 11:27:52.000000000 +0000 @@ -0,0 +1,46 @@ +From: Apollon Oikonomopoulos +Date: Thu, 17 Sep 2020 12:12:56 +0300 +Subject: Fix build with gcc-10 + +iscsi_add_portal sometimes passes a NULL pointer as a %s argument to +printf. This is considered an error by -Werror=format-overflow and GCC-10 has +become much smarter in detecting these cases: + + In file included from iscsi/iscsid.h:29, + from iscsi/iscsi_tcp.c:35: + In function 'iscsi_add_portal', + inlined from 'iscsi_add_portal' at iscsi/iscsi_tcp.c:408:5, + inlined from 'iscsi_tcp_init' at iscsi/iscsi_tcp.c:449:3: + ./log.h:90:2: error: '%s' directive argument is null [-Werror=format-overflow=] + 90 | log_error("%s(%d) " fmt, __FUNCTION__, __LINE__, ##args); \ + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + iscsi/iscsi_tcp.c:411:3: note: in expansion of macro 'eprintf' + 411 | eprintf("failed to create/bind to portal %s:%d\n", addr, port); + | ^~~~~~~ + +Fix this by passing the empty string to eprintf() if addr is NULL. + +Closes: #957874 +--- + usr/iscsi/iscsi_tcp.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/usr/iscsi/iscsi_tcp.c b/usr/iscsi/iscsi_tcp.c +index 2bb8356..cb4e23c 100644 +--- a/usr/iscsi/iscsi_tcp.c ++++ b/usr/iscsi/iscsi_tcp.c +@@ -407,8 +407,13 @@ int iscsi_tcp_init_portal(char *addr, int port, int tpgt) + + int iscsi_add_portal(char *addr, int port, int tpgt) + { ++ const char *addr_str = ""; ++ + if (iscsi_tcp_init_portal(addr, port, tpgt)) { +- eprintf("failed to create/bind to portal %s:%d\n", addr, port); ++ if (addr) { ++ addr_str = addr; ++ } ++ eprintf("failed to create/bind to portal %s:%d\n", addr_str, port); + return -1; + } + diff -Nru tgt-1.0.79/debian/patches/0009-Replace-__packed-with-__attribute__.patch tgt-1.0.79/debian/patches/0009-Replace-__packed-with-__attribute__.patch --- tgt-1.0.79/debian/patches/0009-Replace-__packed-with-__attribute__.patch 1970-01-01 00:00:00.000000000 +0000 +++ tgt-1.0.79/debian/patches/0009-Replace-__packed-with-__attribute__.patch 2020-09-30 11:27:52.000000000 +0000 @@ -0,0 +1,39 @@ +From: Apollon Oikonomopoulos +Date: Thu, 17 Sep 2020 12:45:19 +0300 +Subject: Replace __packed with __attribute__(...) + +GCC 10 changed the default from -fcommon to -fno-common. This makes the +tgt build fail because of multiple definitions of __packed. Change all +instances of __packed to __attribute__((__packed__)), which is the +canonical attribute form. +--- + usr/iscsi/iscsid.c | 2 +- + usr/iscsi/iser.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c +index a54a46e..476a760 100644 +--- a/usr/iscsi/iscsid.c ++++ b/usr/iscsi/iscsid.c +@@ -1074,7 +1074,7 @@ void iscsi_rsp_set_residual(struct iscsi_cmd_rsp *rsp, struct scsi_cmd *scmd) + struct iscsi_sense_data { + uint16_t length; + uint8_t data[0]; +-} __packed; ++} __attribute__((__packed__)); + + static int iscsi_cmd_rsp_build(struct iscsi_task *task) + { +diff --git a/usr/iscsi/iser.c b/usr/iscsi/iser.c +index c7c43b2..2abb872 100644 +--- a/usr/iscsi/iser.c ++++ b/usr/iscsi/iser.c +@@ -92,7 +92,7 @@ char *iser_portal_addr; + struct iscsi_sense_data { + uint16_t length; + uint8_t data[0]; +-} __packed; ++} __attribute__((__packed__)); + + static size_t buf_pool_sz_mb = DEFAULT_POOL_SIZE_MB; + static int cq_vector = -1; diff -Nru tgt-1.0.79/debian/patches/series tgt-1.0.79/debian/patches/series --- tgt-1.0.79/debian/patches/series 2019-07-31 19:25:34.000000000 +0000 +++ tgt-1.0.79/debian/patches/series 2020-09-30 11:27:52.000000000 +0000 @@ -5,3 +5,5 @@ 0005-fix-aio-detection.patch 0006-fix-pie-build 0007-Fix-compilation-with-glusterfs-6.patch +0008-Fix-build-with-gcc-10.patch +0009-Replace-__packed-with-__attribute__.patch diff -Nru tgt-1.0.79/debian/rules tgt-1.0.79/debian/rules --- tgt-1.0.79/debian/rules 2019-07-31 19:25:34.000000000 +0000 +++ tgt-1.0.79/debian/rules 2020-09-30 11:30:55.000000000 +0000 @@ -4,6 +4,9 @@ FEATURES = ISCSI_RDMA=1 CEPH_RBD=1 SD_NOTIFY=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all +# avoid FTFBS due to glibc 2.32 triggering more gcc-10 errors +# in the usage of its functions by tgt +export DEB_CFLAGS_MAINT_APPEND = -Wno-maybe-uninitialized -Wno-stringop-truncation %: dh $@ --with bash-completion