Bug#910326: parted: include sys/sysmacros.h missing for major(), minor()

2018-10-05 Thread Colin Watson
On Thu, Oct 04, 2018 at 03:47:25PM -0400, Mathieu Trudel-Lapierre wrote:
> parted 3.2-21 FTBFS in latest test rebuild on ubuntu. major() and minor()
> macros are being used without include sys/sysmacros.h, leading to undefined
> symbols at linking for these macros.
> 
> In Ubuntu, the attached patch was applied to achieve the following:
> 
>   * debian/patches/sysmacros_for_major_minor.patch: include sys/sysmacros.h to
> account for the user of major() and minor() macros.

Thanks.  I took the similar upstream cherry-pick instead
(https://git.savannah.gnu.org/cgit/parted.git/commit/?id=ba5e0451b51c983e40afd123b6e0d3eddb55e610),
since that'll be slightly more convenient at the next upstream release
(git will automatically drop it rather than me having to resolve a
conflict).  It'll be in my next upload.

-- 
Colin Watson   [cjwat...@ubuntu.com]



Bug#910326: parted: include sys/sysmacros.h missing for major(), minor()

2018-10-04 Thread Mathieu Trudel-Lapierre
Package: parted
Version: 3.2-21
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Maintainer,

parted 3.2-21 FTBFS in latest test rebuild on ubuntu. major() and minor()
macros are being used without include sys/sysmacros.h, leading to undefined
symbols at linking for these macros.

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/sysmacros_for_major_minor.patch: include sys/sysmacros.h to
account for the user of major() and minor() macros.


Thanks for considering the patch.


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

Kernel: Linux 4.18.0-7-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru parted-3.2/debian/patches/series parted-3.2/debian/patches/series
--- parted-3.2/debian/patches/series2018-04-09 07:15:46.0 -0400
+++ parted-3.2/debian/patches/series2018-10-04 14:45:21.0 -0400
@@ -27,3 +27,4 @@
 libparted-dasd-add-test-cases-for-the-new-fdasd-func.patch
 fat-resize-long-path.patch
 fat-resize-retain-boot-code.patch
+sysmacros_for_major_minor.patch
diff -Nru parted-3.2/debian/patches/sysmacros_for_major_minor.patch 
parted-3.2/debian/patches/sysmacros_for_major_minor.patch
--- parted-3.2/debian/patches/sysmacros_for_major_minor.patch   1969-12-31 
19:00:00.0 -0500
+++ parted-3.2/debian/patches/sysmacros_for_major_minor.patch   2018-10-04 
14:55:03.0 -0400
@@ -0,0 +1,19 @@
+From: Mathieu Trudel-Lapierre 
+Subject: Incldue sys/sysmacros.h for major() and minor()
+
+---
+ libparted/arch/linux.c |   51 
-
+ 1 file changed, 26 insertions(+), 25 deletions(-)
+
+Index: b/libparted/arch/linux.c
+===
+--- a/libparted/arch/linux.c
 b/libparted/arch/linux.c
+@@ -40,6 +40,7 @@
+ #include 
+ #include 
+ #include /* for uname() */
++#include   /* for major(), minor() */
+ #include 
+ #include 
+ #ifdef ENABLE_DEVICE_MAPPER