[arch-commits] Commit in open-iscsi/trunk (2 files)

Christian Hesse eworm at gemini.archlinux.org
Sun Sep 19 18:30:47 UTC 2021


    Date: Sunday, September 19, 2021 @ 18:30:47
  Author: eworm
Revision: 1017681

upgpkg: open-iscsi 2.1.5-1: new upstream release

Added:
  open-iscsi/trunk/0001-Fix-compiler-error-introduced-with-recent-IPv6-commit.patch
Modified:
  open-iscsi/trunk/PKGBUILD

------------------------------------------------------------------+
 0001-Fix-compiler-error-introduced-with-recent-IPv6-commit.patch |   35 ++++++++++
 PKGBUILD                                                         |   14 +++-
 2 files changed, 46 insertions(+), 3 deletions(-)

Added: 0001-Fix-compiler-error-introduced-with-recent-IPv6-commit.patch
===================================================================
--- 0001-Fix-compiler-error-introduced-with-recent-IPv6-commit.patch	                        (rev 0)
+++ 0001-Fix-compiler-error-introduced-with-recent-IPv6-commit.patch	2021-09-19 18:30:47 UTC (rev 1017681)
@@ -0,0 +1,35 @@
+From 424d5967e94f6adf4c0669d390779af8da0bef20 Mon Sep 17 00:00:00 2001
+From: Lee Duncan <lduncan at suse.com>
+Date: Sat, 18 Sep 2021 16:10:50 -0700
+Subject: Fix compiler error introduced with recent IPv6 commit.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 76350316de38 ("Handle IPv6 interfaces correctly.") added
+a string copy that creates this gcc-11 error message:
+
+> gcc-11 -O2 -g -Wall -Werror -Wextra -fvisibility=hidden -fPIC -I/usr/include/kmod    -c -o idbm.o idbm.c
+> idbm.c: In function ‘_idbm_node_rec_link’:
+> idbm.c:999:17: error: ‘strncpy’ specified bound 65 equals destination size [-Werror=stringop-truncation]
+>   999 |                 strncpy((*node).iface.name, iface_name, ISCSI_MAX_IFACE_LEN);
+>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+So copy one less character, maximum.
+---
+ libopeniscsiusr/idbm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libopeniscsiusr/idbm.c b/libopeniscsiusr/idbm.c
+index b2524ed..6f57e45 100644
+--- a/libopeniscsiusr/idbm.c
++++ b/libopeniscsiusr/idbm.c
+@@ -996,7 +996,7 @@ static void _idbm_node_rec_link(struct iscsi_node *node, struct idbm_rec *recs,
+ 
+ 	/* use the interface name passed in, if any */
+ 	if (iface_name)
+-		strncpy((*node).iface.name, iface_name, ISCSI_MAX_IFACE_LEN);
++		strncpy((*node).iface.name, iface_name, ISCSI_MAX_IFACE_LEN-1);
+ 
+ 	/*
+ 	 * Note: because we do not add the iface.iscsi_ifacename to

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-09-19 18:30:19 UTC (rev 1017680)
+++ PKGBUILD	2021-09-19 18:30:47 UTC (rev 1017681)
@@ -2,7 +2,7 @@
 # Maintainer: Stefan Kirrmann <stefan.kirrmann at gmail dot com>
 
 pkgname=open-iscsi
-pkgver=2.1.4
+pkgver=2.1.5
 pkgrel=1
 pkgdesc='iSCSI userland tools'
 arch=('x86_64')
@@ -14,9 +14,17 @@
 backup=('etc/iscsi/iscsid.conf'
 	'etc/iscsi/initiatorname.iscsi')
 options=('docs')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/open-iscsi/open-iscsi/archive/$pkgver.tar.gz")
-sha256sums=('a5a73f7c795d1dc214100b1eb70647d6c2ceccf8973e584f50ee7f92c40d2a8a')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/open-iscsi/open-iscsi/archive/$pkgver.tar.gz"
+        '0001-Fix-compiler-error-introduced-with-recent-IPv6-commit.patch')
+sha256sums=('d8a06c1ea86d2a312d598f52c151b210a34d82445a6f522f7c2bd6581b3a99af'
+            '4b0db394a45bc5a0cd68be840f0852e2d6cdba834cf2bf15e48a8ebf41e4b9d2')
 
+prepare() {
+  cd "$srcdir"/${pkgname}-${pkgver}
+
+  patch -Np1 < ../0001-Fix-compiler-error-introduced-with-recent-IPv6-commit.patch
+}
+
 build() {
   cd "$srcdir"/${pkgname}-${pkgver}
 



More information about the arch-commits mailing list