Package: open-iscsi
Version: 2.0.874-5ubuntu7
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)

Current build of open-iscsi (2.0.874-5ubuntu7) will fail to build from
source.

Build fails with:

  ./iscsiuio/src/unix/libs/bnx2x.c:754: undefined reference to `minor'
  collect2: error: ld returned 1 exit status


This is reported to Ubuntu in bug 1791154
  https://bugs.launchpad.net/bugs/1791154

Attached is the fix I am uploading to Ubuntu.

-- System Information:
Debian Release: buster/sid
  APT prefers cosmic
  APT policy: (500, 'cosmic')
Architecture: amd64 (x86_64)

Kernel: Linux 4.17.0-9-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages open-iscsi depends on:
ii  debconf [debconf-2.0]  1.5.69
ii  libc6                  2.28-0ubuntu1
ii  libisns0               0.97-2build1
ii  libmount1              2.32-0.1ubuntu1
ii  lsb-base               9.20170808ubuntu1
ii  udev                   239-7ubuntu7

Versions of packages open-iscsi recommends:
ii  busybox-initramfs  1:1.27.2-2ubuntu4
ii  finalrd            3

open-iscsi suggests no packages.

-- debconf information excluded
commit e8ddf2765525522924a03f668220ba8f256a58d8
Author: Scott Moser <smo...@brickies.net>
Date:   Thu Sep 6 15:38:20 2018 -0400

    Include <sys/sysmacros.h> to properly define minor()
    
    LP: #1791154

diff --git 
a/debian/patches/bugfixes/include-sys-sysmacros.h-to-properly-define-minor.patch
 
b/debian/patches/bugfixes/include-sys-sysmacros.h-to-properly-define-minor.patch
new file mode 100644
index 00000000..ba92af5f
--- /dev/null
+++ 
b/debian/patches/bugfixes/include-sys-sysmacros.h-to-properly-define-minor.patch
@@ -0,0 +1,28 @@
+Description: Include <sys/sysmacros.h> to properly define minor()
+Author: Scott Moser <smo...@ubuntu.com>
+Bug-Debian: https://bugs.launchpad.net/bugs/1791154
+Last-Update: 2018-09-06
+Origin: upstream, 
https://github.com/open-iscsi/open-iscsi/commit/6d68ef5871c94c6ebbbe6e6b1fe0bc2dce711052
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+
+--- a/iscsiuio/src/unix/libs/bnx2x.c
++++ b/iscsiuio/src/unix/libs/bnx2x.c
+@@ -50,6 +50,7 @@
+ #include <sys/user.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+ 
+ #include "config.h"
+ 
+--- a/iscsiuio/src/unix/libs/bnx2.c
++++ b/iscsiuio/src/unix/libs/bnx2.c
+@@ -46,6 +46,7 @@
+ #include <sys/user.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+ 
+ #include "config.h"
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 34608a68..d98a5c63 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@ security/Ensure-strings-from-peer-are-copied-correctly.patch
 security/Skip-useless-strcopy-and-validate-CIDR-length.patch
 security/Check-iscsiuio-ping-data-length-for-validity.patch
 iscid-conf-use-systemd.socket-patch
+bugfixes/include-sys-sysmacros.h-to-properly-define-minor.patch

Reply via email to