Bug#1011530: FTBFS: fails to include system headers

2023-05-16 Thread John Paul Adrian Glaubitz
Hello!

On Tue, 2023-05-16 at 22:13 +0200, Bastian Germann wrote:
> I am uploading a NMU to fix this.
> Please find the debdiff attached.

Please don't do NMUs without using a delay [1]. I did not get
a chance to review your change.

Adrian

> [1] https://ftp-master.debian.org/deferred.html

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#1011530: FTBFS: fails to include system headers

2023-05-16 Thread Bastian Germann

I am uploading a NMU to fix this.
Please find the debdiff attached.diff -Nru mac-fdisk-0.1/debian/changelog mac-fdisk-0.1/debian/changelog
--- mac-fdisk-0.1/debian/changelog  2023-05-16 22:13:04.0 +0200
+++ mac-fdisk-0.1/debian/changelog  2023-05-16 21:26:00.0 +0200
@@ -1,3 +1,13 @@
+mac-fdisk (0.1-18.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Convert to source format 3.0 (quilt). (Closes: #1007407)
+  * Include system headers and prevent old error handling (Closes: #1011530)
+  * d/rules: Add missing targets.
+  * Change section to otherosfs.
+
+ -- Bastian Germann   Tue, 16 May 2023 21:26:00 +0200
+
 mac-fdisk (0.1-18) unstable; urgency=medium
 
   * New maintainer:
diff -Nru mac-fdisk-0.1/debian/control mac-fdisk-0.1/debian/control
--- mac-fdisk-0.1/debian/control2023-05-16 22:13:04.0 +0200
+++ mac-fdisk-0.1/debian/control2023-05-16 21:26:00.0 +0200
@@ -1,5 +1,5 @@
 Source: mac-fdisk
-Section: base
+Section: otherosfs
 Priority: optional
 Build-Depends: debhelper
 Maintainer: John Paul Adrian Glaubitz 
@@ -32,7 +32,6 @@
 
 Package: mac-fdisk-cross
 Architecture: i386 m68k
-Section: otherosfs
 Depends: ${shlibs:Depends}
 Description: Apple disk partition manipulation tool, cross version
  The fdisk utilities from the MkLinux project, adopted for Linux/m68k.
@@ -47,7 +46,6 @@
 
 Package: pmac-fdisk-cross
 Architecture: i386 m68k
-Section: otherosfs
 Depends: ${shlibs:Depends}
 Description: fdisk partition manipulation tool for PowerPC, cross version
  The fdisk utilities from the MkLinux project, adopted for Linux/ppc.
diff -Nru mac-fdisk-0.1/debian/mac-fdisk.8.in 
mac-fdisk-0.1/debian/mac-fdisk.8.in
--- mac-fdisk-0.1/debian/mac-fdisk.8.in 1970-01-01 01:00:00.0 +0100
+++ mac-fdisk-0.1/debian/mac-fdisk.8.in 2023-05-16 21:26:00.0 +0200
@@ -0,0 +1,262 @@
+.TH MAC-FDISK 8 "1 December 2001" "Debian" "Apple Disk Partitioning Manual"
+.SH NAME
+mac-fdisk \- Apple partition table editor for Linux
+.SH SYNOPSIS
+.B mac-fdisk
+.B "[ \-h | \--help ] [ \-v | \--version ] [ \-l | \--list device ... ]"
+.br
+.B mac-fdisk
+.B "[ \-r | \--readonly ] device ... "
+.SH DESCRIPTION
+.B mac-fdisk
+is a command line type program which partitions disks using the standard Apple
+disk partitioning scheme described in "Inside Macintosh: Devices".
+The
+.I device
+is usually one of the following:
+
+.nf
+.RS
+/dev/sda
+/dev/sdb
+/dev/sdc
+/dev/sdd
+/dev/sde
+/dev/sdf
+/dev/sdg
+/dev/hda
+/dev/hdb
+
+.RE
+.fi
+/dev/sda is the first hard disk on the SCSI bus (i.e. the
+one with the lowest id), /dev/sdb is the second hard disk, and so on.
+The
+.I partition
+is a
+.I device
+name followed by a partition number.
+The partition number is the index (starting from one) of the partition
+map entry in the partition map (and the partition map itself occupies the
+first entry).
+For example,
+.B /dev/sda2
+is the partition described by the second entry in the partiton map on /dev/sda.
+
+.SH OPTIONS
+.TP
+.B \-v | \--version
+Prints version number of the
+.B mac-fdisk
+program.
+.TP
+.B \-h | \--help
+Prints a list of available commands for the
+.B mac-fdisk
+program.
+.TP
+.B \-l | \--list
+Lists the partition tables for the specified
+.IR device(s).
+With no 
+.IR device(s)
+given, lists all SCSI and IDE devices found in the system.
+.TP
+.B \-r | \--readonly
+Prevents
+.B mac-fdisk
+from writing to the device.
+.SH "Editing Partition Tables"
+An argument which is simply the name of a
+.I device
+indicates that
+.B mac-fdisk
+should edit the partition table of that device. Once started, 
+.B mac-fdisk 
+presents an interactive command prompt to edit the partition table. 
+The partition editing commands are:
+
+.nf
+.RS
+hlist available commands
+pprint (list) the current edited partition table status
+Pprint ordered by base address
+iinitialize the partition map
+schange size of partition map
+bcreate new 800K Apple_Bootstrap partition (used by yaboot)
+ccreate new standard Linux type partition
+Ccreate new partition, specifying the partition type
+ddelete a partition
+rreorder partition entry
+wwrite the partition table to disk
+qquit 
+
+.RE
+.fi
+Commands which take arguments prompt for each argument in turn.
+You can also type the arguments separated by spaces
+and those prompts will be skipped. The
+.B i
+and
+.B w
+commands will prompt for confirmation. None of the editing you do will 
+actually affect the state of the disk you are partitioning until the 
+.B w 
+command is issued. Then the map in its edited state will be 
+permanently written to the disk.
+
+Partitions are always specified by their number, the index of the
+partition entry in the partition map.  Many commands will change the
+index numbers of partitions which follow the affected partition; you are
+encouraged to use the 
+.B p
+command to print the partition table as frequently as necessary. For SCSI
+disks, the partition 

Bug#1011530: FTBFS: fails to include system headers

2022-05-24 Thread Adam Borowski
Source: mac-fdisk
Version: 0.1-18
Severity: serious
Tags: ftbfs
Justification: fails to build from source

Hi!
I'm afraid that mac-fdisk fails to build with the toolchain in current
unstable.  It doesn't include public headers, which results in a lot
of warnings like:

pdisk.c:156:5: warning: implicit declaration of function ‘exit’ 
[-Wimplicit-function-declaration]
  156 | exit(err);
  | ^~~~
pdisk.c:52:1: note: include ‘’ or provide a declaration of ‘exit’
pdisk.c:469:13: warning: implicit declaration of function ‘strncmp’ 
[-Wimplicit-function-declaration]
  469 | if (strncmp(type_name, kFreeType, DPISTRLEN) == 0) {
  | ^~~
pdisk.c:52:1: note: include ‘’ or provide a declaration of ‘strncmp’
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
dump.c:319:21: warning: incompatible implicit declaration of built-in function 
‘malloc’ [-Wbuiltin-declaration-mismatch]
  319 | data = (DPME *) malloc(PBLOCK_SIZE);
  | ^~
dump.c:319:21: note: include ‘’ or provide a declaration of ‘malloc’

and some fatal errors:

errors.c: In function ‘fatal’:
errors.c:118:30: error: ‘sys_nerr’ undeclared (first use in this function)
  118 | if (value > 0 && value < sys_nerr) {
  |  ^~~~
errors.c:118:30: note: each undeclared identifier is reported only once for 
each func
tion it appears in
errors.c:119:37: error: ‘sys_errlist’ undeclared (first use in this function)
  119 | fprintf(stderr, "  (%s)\n", sys_errlist[value]);
  | ^~~

Full log attached.


Meow!
-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), 
(120, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.18.0-00017-g251fbd8b0fa2 (SMP w/64 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
sbuild (Debian sbuild) 0.83.1 (26 April 2022) on valinor.angband.pl

+==+
| mac-fdisk (i386) Tue, 24 May 2022 15:36:21 + |
+==+

Package: mac-fdisk
Distribution: unstable
Machine Architecture: amd64
Host Architecture: i386
Build Architecture: i386
Build Type: binary

I: NOTICE: Log filtering will replace 
'var/run/schroot/mount/unstable-i386-sbuild-c89c94f3-c7e0-4819-8956-a172ad00da2c'
 with '<>'
I: NOTICE: Log filtering will replace 'build/mac-fdisk-SIbUU1/resolver-pC5EEC' 
with '<>'

+--+
| Update chroot|
+--+

Hit:1 http://apt-rosy.angband.pl:3142/debian unstable InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

+--+
| Fetch source files   |
+--+


Check APT
-

Checking available source versions...

Download source files with APT
--

Reading package lists...
NOTICE: 'mac-fdisk' packaging is maintained in the 'Git' version control system 
at:
git://github.com/glaubitz/mac-fdisk-debian.git
Please use:
git clone git://github.com/glaubitz/mac-fdisk-debian.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 78.1 kB of source archives.
Get:1 http://apt-rosy.angband.pl:3142/debian unstable/main mac-fdisk 0.1-18 
(dsc) [2010 B]
Get:2 http://apt-rosy.angband.pl:3142/debian unstable/main mac-fdisk 0.1-18 
(tar) [55.8 kB]
Get:3 http://apt-rosy.angband.pl:3142/debian unstable/main mac-fdisk 0.1-18 
(diff) [20.3 kB]
Fetched 78.1 kB in 0s (299 kB/s)
Download complete and in download only mode
I: NOTICE: Log filtering will replace 'build/mac-fdisk-SIbUU1/mac-fdisk-0.1' 
with '<>'
I: NOTICE: Log filtering will replace 'build/mac-fdisk-SIbUU1' with 
'<>'

+--+
| Install package build dependencies   |
+--+


Setup apt archive
-

Merged Build-Depends: debhelper, build-essential, fakeroot
Filtered Build-Depends: