Просмотр исходного кода

package/lrzsz: fix FTBFS by upgrading and applying Debian fix

This failure appeared when trying to build lrzsz:

lsyslog.c:73:5: error: implicit declaration of function ‘vasprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]

To fix the problem, let's follow Debian. Switch to 0.12.21rc (which is
already out there 25 years!) and import their patch adding includes.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[Peter: add Upstream tag to patch]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Wolfram Sang 8 месяцев назад
Родитель
Сommit
58ff0cb5c4

+ 9 - 7
package/lrzsz/0001-configure-fix-main-prototype.patch

@@ -1,4 +1,4 @@
-From 43b2b711fedd3a28d497b3a5c0e9054fa203ef3d Mon Sep 17 00:00:00 2001
+From c2758812867a52a6bb56b87d52c35ebff797e777 Mon Sep 17 00:00:00 2001
 From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 Date: Sun, 15 Sep 2024 15:12:07 +0200
 Subject: [PATCH] configure: fix main() prototype
@@ -10,23 +10,25 @@ configure script directly.
 
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 Upstream: N/A, patching generated file
+[wsa: rebased to 0.12.21rc]
+Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
 ---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure b/configure
-index db26726..d160e27 100755
+index cc586d5..16a259a 100755
 --- a/configure
 +++ b/configure
-@@ -1008,7 +1008,7 @@ cross_compiling=$ac_cv_prog_cc_cross
- cat > conftest.$ac_ext <<EOF
- #line 1010 "configure"
+@@ -1053,7 +1053,7 @@ cat > conftest.$ac_ext << EOF
+ #line 1054 "configure"
  #include "confdefs.h"
+ 
 -main(){return(0);}
 +int main(){return(0);}
  EOF
- if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ac_cv_prog_cc_works=yes
 -- 
-2.46.0
+2.45.2
 

+ 124 - 0
package/lrzsz/0004-FTBFS-fix-missing-includes.patch

@@ -0,0 +1,124 @@
+From a9faaf7f02811e7409074362700e963609885ba6 Mon Sep 17 00:00:00 2001
+From: Wolfram Sang <wsa+renesas@sang-engineering.com>
+Date: Fri, 29 Nov 2024 14:14:25 +0100
+Subject: [PATCH] FTBFS fix missing includes
+
+From: https://sources.debian.org/data/main/l/lrzsz/0.12.21rc-0.1/debian/patches/include.diff
+
+Description: Fixes FTBFS (missing includes)
+Author: Martin A. Godisch <godisch@debian.org>
+Bug-Debian: https://bugs.debian.org/1066514
+Forwarded: no
+
+Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
+Upstream: https://sources.debian.org/data/main/l/lrzsz/0.12.21rc-0.1/debian/patches/include.diff
+---
+ lib/error.c     | 1 +
+ src/canit.c     | 1 +
+ src/lrz.c       | 1 +
+ src/lsyslog.c   | 1 +
+ src/lsz.c       | 1 +
+ src/tcp.c       | 1 +
+ src/zperr.c     | 1 +
+ src/zreadline.c | 1 +
+ 8 files changed, 8 insertions(+)
+
+diff --git a/lib/error.c b/lib/error.c
+index 8b96b91..3861578 100644
+--- a/lib/error.c
++++ b/lib/error.c
+@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+ #endif
+ 
+ #include <stdio.h>
++#include <string.h>
+ 
+ #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC || defined(__cplusplus)
+ # if __STDC__ || defined(__cplusplus)
+diff --git a/src/canit.c b/src/canit.c
+index f947a25..ae91807 100644
+--- a/src/canit.c
++++ b/src/canit.c
+@@ -24,6 +24,7 @@
+ #define SS_NORMAL 0
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <signal.h>
+ #include <setjmp.h>
+ #include <ctype.h>
+diff --git a/src/lrz.c b/src/lrz.c
+index 2f6a5ad..63e1326 100644
+--- a/src/lrz.c
++++ b/src/lrz.c
+@@ -27,6 +27,7 @@
+ #define SS_NORMAL 0
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <signal.h>
+ #include <ctype.h>
+ #include <errno.h>
+diff --git a/src/lsyslog.c b/src/lsyslog.c
+index d21ab35..24d8cd1 100644
+--- a/src/lsyslog.c
++++ b/src/lsyslog.c
+@@ -18,6 +18,7 @@
+   02111-1307, USA.
+ 
+ */
++#define _GNU_SOURCE
+ #include "config.h"
+ #ifdef ENABLE_SYSLOG
+ #include "zglobal.h"
+diff --git a/src/lsz.c b/src/lsz.c
+index b9d2545..1598150 100644
+--- a/src/lsz.c
++++ b/src/lsz.c
+@@ -28,6 +28,7 @@
+ #define SS_NORMAL 0
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <signal.h>
+ #include <setjmp.h>
+ #include <ctype.h>
+diff --git a/src/tcp.c b/src/tcp.c
+index 7e1ba3f..cdf9187 100644
+--- a/src/tcp.c
++++ b/src/tcp.c
+@@ -33,6 +33,7 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <signal.h>
++#include <string.h>
+ 
+ #include "zglobal.h"
+ #include <stdlib.h>
+diff --git a/src/zperr.c b/src/zperr.c
+index 31963de..0b9dc29 100644
+--- a/src/zperr.c
++++ b/src/zperr.c
+@@ -22,6 +22,7 @@
+ #include "zglobal.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <errno.h>
+ 
+ #ifdef __STDC__
+diff --git a/src/zreadline.c b/src/zreadline.c
+index dd9736b..7bc3736 100644
+--- a/src/zreadline.c
++++ b/src/zreadline.c
+@@ -27,6 +27,7 @@
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <signal.h>
+ #include <ctype.h>
+ #include <errno.h>
+-- 
+2.45.2
+

+ 1 - 1
package/lrzsz/lrzsz.hash

@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1  lrzsz-0.12.20.tar.gz
+sha256  4d845f239ddcd86735b5dbf01f3869b072ffb6f6c8aa24c346dc4a3c95453c55  lrzsz-0.12.21rc.tar.gz
 sha256  dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa  COPYING

+ 2 - 2
package/lrzsz/lrzsz.mk

@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LRZSZ_VERSION = 0.12.20
-LRZSZ_SITE = http://www.ohse.de/uwe/releases
+LRZSZ_VERSION = 0.12.21rc
+LRZSZ_SITE = http://www.ohse.de/uwe/testing
 LRZSZ_CONF_OPTS = --disable-timesync
 LRZSZ_LICENSE = GPL-2.0+
 LRZSZ_LICENSE_FILES = COPYING