Bug#954639: gftp: FTBFS: pty.c:65:10: fatal error: stropts.h: No such file or directory

2020-03-22 Thread Logan Rosen
Package: gftp
Version: 2.0.19-5
Followup-For: Bug #954639
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu focal ubuntu-patch

Hi,

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

  * d/p/glibc-2.30.patch: Fix FTBFS against glibc >= 2.30 with cherrypicked
patch from upstream Git.

Thanks for considering the patch.

Logan

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

Kernel: Linux 5.4.0-18-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
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 /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru gftp-2.0.19/debian/patches/glibc-2.30.patch 
gftp-2.0.19/debian/patches/glibc-2.30.patch
--- gftp-2.0.19/debian/patches/glibc-2.30.patch 1969-12-31 19:00:00.0 
-0500
+++ gftp-2.0.19/debian/patches/glibc-2.30.patch 2020-03-22 20:49:10.0 
-0400
@@ -0,0 +1,24 @@
+From 371c494a34c1820544d6563fb7ef5ca51a0ee199 Mon Sep 17 00:00:00 2001
+From: Brian Masney 
+Date: Thu, 21 Jul 2016 05:05:18 -0400
+Subject: [PATCH] fixed compiling on some versions of Linux. Patch picked up
+ from the Fedora Project at
+ https://github.com/repoforge/rpms/blob/master/specs/gftp/gftp-stropts.patch
+
+---
+ lib/pty.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/pty.c b/lib/pty.c
+index f7cb1f9..f9d609b 100644
+--- a/lib/pty.c
 b/lib/pty.c
+@@ -61,7 +61,7 @@ _gftp_ptys_open (int fdm, int fds, char *pts_name)
+ 
+ #elif HAVE_GRANTPT
+ 
+-#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__))
++#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || 
defined(__linux__))
+ #include 
+ #endif
+ 
diff -Nru gftp-2.0.19/debian/patches/series gftp-2.0.19/debian/patches/series
--- gftp-2.0.19/debian/patches/series   2016-11-29 14:24:17.0 -0500
+++ gftp-2.0.19/debian/patches/series   2020-03-22 20:49:23.0 -0400
@@ -1,3 +1,4 @@
 01-hurd_do_not_use_PATH_MAX.patch
 desktop-file-binary
 fix-configure.in.patch
+glibc-2.30.patch


Bug#954639: gftp: FTBFS: pty.c:65:10: fatal error: stropts.h: No such file or directory

2020-03-22 Thread Lucas Nussbaum
Source: gftp
Version: 2.0.19-5
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200321 ftbfs-bullseye

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

This is most likely due to the upgrade to glibc 2.30. 
>From https://lists.gnu.org/archive/html/info-gnu/2019-08/msg0.html:
> * The obsolete and never-implemented XSI STREAMS header files 
>   and  have been removed.

Relevant part (hopefully):
> gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D_REENTRANT -I../intl 
> -DSHARE_DIR=\"/usr/share/gftp\" -DLOCALE_DIR=\"/usr/share/locale\"  
> -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fdebug-prefix-map=/<>=. 
> -fstack-protector-strong -Wformat -Werror=format-security -c -o rfc959.o 
> rfc959.c
> pty.c:65:10: fatal error: stropts.h: No such file or directory
>65 | #include 
>   |  ^~~
> compilation terminated.
> make[4]: *** [Makefile:506: pty.o] Error 1

The full build log is available from:
   http://qa-logs.debian.net/2020/03/21/gftp_2.0.19-5_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.