mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH 2/2] minicom: version bump 2.6.2. -> 2.8
Date: Mon, 24 May 2021 23:21:29 +0200	[thread overview]
Message-ID: <20210524212129.8277-2-rhi@pengutronix.de> (raw)
In-Reply-To: <20210524212129.8277-1-rhi@pengutronix.de>

Add two patches for reproducible builds and compatibility with GCC 11,
renovate the variable names, sort the config options in the order in
which they appear in configure.ac for configure_helper.py, and pin them
down so that configure does not try to autodetect paths on the build
host. Also make it work with ckermit if desired.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 .../minicom-2.8/0001-build-reproducibly.patch | 33 +++++++++++++++++++
 ...b-usleep.c-fix-error-NULL-undeclared.patch | 27 +++++++++++++++
 patches/minicom-2.8/series                    |  5 +++
 rules/minicom.in                              |  6 ++++
 rules/minicom.make                            | 22 +++++++++----
 5 files changed, 86 insertions(+), 7 deletions(-)
 create mode 100644 patches/minicom-2.8/0001-build-reproducibly.patch
 create mode 100644 patches/minicom-2.8/0002-lib-usleep.c-fix-error-NULL-undeclared.patch
 create mode 100644 patches/minicom-2.8/series

diff --git a/patches/minicom-2.8/0001-build-reproducibly.patch b/patches/minicom-2.8/0001-build-reproducibly.patch
new file mode 100644
index 000000000000..2d48c129aee1
--- /dev/null
+++ b/patches/minicom-2.8/0001-build-reproducibly.patch
@@ -0,0 +1,33 @@
+From: unknown author <unknown.author@example.com>
+Date: Mon, 24 May 2021 22:44:25 +0200
+Subject: [PATCH] build reproducibly
+
+Origin: Debian, https://sources.debian.org/patches/minicom/2.8-1/04reproducible.diff/
+---
+ src/minicom.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/minicom.c b/src/minicom.c
+index cfdb76396968..bf3ad17ca089 100644
+--- a/src/minicom.c
++++ b/src/minicom.c
+@@ -1248,9 +1248,6 @@ int main(int argc, char **argv)
+       switch(c) {
+         case 'v':
+           printf(_("%s version %s"), PACKAGE, VERSION);
+-#ifdef __DATE__
+-          printf(_(" (compiled %s)"), __DATE__);
+-#endif
+           printf("\n");
+           printf(_("Copyright (C) Miquel van Smoorenburg.\n\n"));
+           printf(_("This program is free software; you can redistribute it and/or\n"
+@@ -1580,9 +1577,6 @@ int main(int argc, char **argv)
+ 
+   mc_wprintf(us, "\n%s %s\r\n", _("Welcome to minicom"), VERSION);
+   mc_wprintf(us, "\n%s: %s\r\n", _("OPTIONS"), option_string);
+-#if defined (__DATE__) && defined (__TIME__)
+-  mc_wprintf(us, "%s %s, %s.\r\n",_("Compiled on"), __DATE__,__TIME__);
+-#endif
+   {
+     struct stat st;
+     char port_date[20] = "";
diff --git a/patches/minicom-2.8/0002-lib-usleep.c-fix-error-NULL-undeclared.patch b/patches/minicom-2.8/0002-lib-usleep.c-fix-error-NULL-undeclared.patch
new file mode 100644
index 000000000000..79e414295dc9
--- /dev/null
+++ b/patches/minicom-2.8/0002-lib-usleep.c-fix-error-NULL-undeclared.patch
@@ -0,0 +1,27 @@
+From: Roland Hieber <rhi@pengutronix.de>
+Date: Mon, 24 May 2021 22:52:00 +0200
+Subject: [PATCH] lib/usleep.c: fix error: 'NULL' undeclared
+
+This fixes compilation with GCC 11:
+
+    usleep.c: In function 'usleep':
+    usleep.c:14:12: error: 'NULL' undeclared (first use in this function)
+    usleep.c:14:12: note: 'NULL' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
+    usleep.c:14:12: note: each undeclared identifier is reported only once for each function it appears in
+    make[2]: *** [Makefile:365: usleep.o] Error 1
+---
+ lib/usleep.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/usleep.c b/lib/usleep.c
+index af9dd0326024..861c00ad97d1 100644
+--- a/lib/usleep.c
++++ b/lib/usleep.c
+@@ -2,6 +2,7 @@
+ # include <config.h>
+ #endif
+ 
++#include <stddef.h>
+ #include <sys/time.h>
+ #include <sys/select.h>
+ 
diff --git a/patches/minicom-2.8/series b/patches/minicom-2.8/series
new file mode 100644
index 000000000000..259f67ccf675
--- /dev/null
+++ b/patches/minicom-2.8/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-build-reproducibly.patch
+0002-lib-usleep.c-fix-error-NULL-undeclared.patch
+# beb4273308afd0935d7b8b27ba4f2497  - git-ptx-patches magic
diff --git a/rules/minicom.in b/rules/minicom.in
index f1ba05417934..d3580bda069a 100644
--- a/rules/minicom.in
+++ b/rules/minicom.in
@@ -4,6 +4,9 @@ menuconfig MINICOM
 	tristate
 	prompt "minicom                       "
 	select NCURSES
+	select ROOTFS
+	select ROOTFS_VAR_LOCK
+	select CKERMIT			if MINICOM_KERMIT
         help
 	  friendly menu driven serial communication program
 
@@ -19,4 +22,7 @@ config MINICOM_DEFCONFIG
 	help
           Install /etc/minirc.dfl config file from projectroot or ptxdist generic.
 
+config MINICOM_KERMIT
+	bool
+	prompt "ckermit support"
 endif
diff --git a/rules/minicom.make b/rules/minicom.make
index 8722f0e29f69..e757b323018a 100644
--- a/rules/minicom.make
+++ b/rules/minicom.make
@@ -2,6 +2,7 @@
 #
 # Copyright (C) 2007 by Carsten Schlote <c.schlote@konzeptpark.de>
 #               2009, 2010 by Marc Kleine-Budde <mkl@pengutronix.de>
+#               2021 Roland Hieber, Pengutronix <rhi@pengutronix.de>
 #
 # For further information about the PTXdist project and license conditions
 # see the README file.
@@ -15,12 +16,12 @@ PACKAGES-$(PTXCONF_MINICOM) += minicom
 #
 # Paths and names
 #
-MINICOM_VERSION	:= 2.6.2
-MINICOM_MD5	:= 203c56c4b447f45e2301b0cc4e83da3c
-MINICOM_SUFFIX	:= tar.gz
+MINICOM_VERSION	:= 2.8
+MINICOM_MD5	:= d32eb2e615f286611c4d1877a25939be
+MINICOM_SUFFIX	:= tar.bz2
 MINICOM		:= minicom-$(MINICOM_VERSION)
 MINICOM_TARBALL	:= minicom_$(MINICOM_VERSION).orig.$(MINICOM_SUFFIX)
-MINICOM_URL	:= http://snapshot.debian.org/archive/debian/20130208T032801Z/pool/main/m/minicom/$(MINICOM_TARBALL)
+MINICOM_URL	:= http://snapshot.debian.org/archive/debian/20210524T032801Z/pool/main/m/minicom/$(MINICOM_TARBALL)
 MINICOM_SOURCE	:= $(SRCDIR)/$(MINICOM).$(MINICOM_SUFFIX)
 MINICOM_DIR	:= $(BUILDDIR)/$(MINICOM)
 MINICOM_LICENSE	:= LGPL-2.0-or-later AND xinetd AND GPL-2.0-or-later
@@ -37,12 +38,19 @@ MINICOM_LICENSE_FILES	:= \
 #
 # autoconf
 #
-MINICOM_AUTOCONF := \
+MINICOM_CONF_TOOL	:= autoconf
+MINICOM_CONF_OPT	:= \
 	$(CROSS_AUTOCONF_USR) \
-	--disable-nls \
 	--disable-rpath \
+	--disable-music \
 	--enable-socket \
-	--disable-music
+	--enable-lock-dir=/var/lock \
+	--enable-dfl-port=/dev/modem \
+	--enable-dfl-baud=115200 \
+	--enable-cfg-dir=/etc \
+	--enable-kermit=$(call ptx/ifdef,PTXCONF_MINICOM_KERMIT,/usr/bin/ckermit,/usr/bin/false) \
+	--disable-nls \
+	--without-dmalloc
 
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  reply	other threads:[~2021-05-24 21:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 21:21 [ptxdist] [PATCH 1/2] minicom: add license files Roland Hieber
2021-05-24 21:21 ` Roland Hieber [this message]
2021-05-28  7:01   ` [ptxdist] [APPLIED] minicom: version bump 2.6.2. -> 2.8 Michael Olbrich
2021-05-28  7:01 ` [ptxdist] [APPLIED] minicom: add license files Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210524212129.8277-2-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox