Skip to contentSkip to conversation

package/rlwrap: new package

PATCH In review Matt Silva 2 participants 2 messages Jan 26, 2024 – Feb 6, 2024

lore
Share & tools
lore

Matt Silva

author
#0 lore raw

PATCH 1/1 package/rlwrap: new package

---
 package/Config.in          |  1 +
 package/rlwrap/Config.in   | 58 ++++++++++++++++++++++++++++++++++++++
 package/rlwrap/rlwrap.hash |  6 ++++
 package/rlwrap/rlwrap.mk   | 48 +++++++++++++++++++++++++++++++
 4 files changed, 113 insertions(+)
 create mode 100644 package/rlwrap/Config.in
 create mode 100644 package/rlwrap/rlwrap.hash
 create mode 100644 package/rlwrap/rlwrap.mk
package/Config.in +1 -0
index 5b8b15fa54..0df3f49781 100644
@@ -2688,6 +2688,7 @@ comment "Utilities"
 	source "package/pinentry/Config.in"
 	source "package/qprint/Config.in"
 	source "package/ranger/Config.in"
+	source "package/rlwrap/Config.in"
 	source "package/rtty/Config.in"
 	source "package/screen/Config.in"
 	source "package/screenfetch/Config.in"
package/rlwrap/Config.in new file +58 -0

58 lines not on this page · raw message

package/rlwrap/rlwrap.hash new file +6 -0
new file mode 100644
index 0000000000..b7005e860e
@@ -0,0 +1,6 @@
+# from https://github.com/hanslub42/rlwrap/releases/tag/0.46.1
+sha256  2711986a1248f6ac59e2aecf5586205835970040d300a42b4bf8014397e73e37  rlwrap-0.46.1.tar.gz
+
+# license files, locally calculated
+sha256  656d25fab58016ac6ac11bb126709e4f860ea063d11795232eb55987172f78ff  AUTHORS
+sha256  32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670  COPYING
package/rlwrap/rlwrap.mk new file +48 -0

48 lines not on this page · raw message

Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Matt,

Quoted 1 line · On Thu, 25 Jan 2024 21:49:14 -0500 Matt Silva <[email protected]> wrote:

Thanks a lot for your contribution! I applied your patch to our master branch, after doing a number of changes, see below for the details.

Quoted 5 lines
 package/Config.in          |  1 +
 package/rlwrap/Config.in   | 58 ++++++++++++++++++++++++++++++++++++++
 package/rlwrap/rlwrap.hash |  6 ++++
 package/rlwrap/rlwrap.mk   | 48 +++++++++++++++++++++++++++++++
 4 files changed, 113 insertions(+)

For all new packages, we require to have an entry in the DEVELOPERS file, so that you get notified if there are build failures for this package, or if the package needs to be update for security issues, or when there's a new release upstream.

package/rlwrap/Config.in line 33

Quoted 2 lines
package/rlwrap/Config.in new file +2 -0
+config BR2_PACKAGE_RLWRAP_DEBUG
+	bool "enable debug"

This option is not needed, it should be controlled by BR2_ENABLE_RUNTIME_DEBUG. Actually, I thought BR2_ENABLE_RUNTIME_DEBUG was automatically passing --enable-debug to all packages, but it's not the case. So if you care about debugging, we would need a follow-up patch that passes --enable-debug when BR2_ENABLE_RUNTIME_DEBUG is set.

package/rlwrap/Config.in line 42

Quoted 3 lines
package/rlwrap/Config.in new file +3 -0
+config BR2_PACKAGE_RLWRAP_PROC_MOUNTPOINT
+	string "proc mountpoint"
+	default "/proc"

This option is not needed: Buildroot will always mount proc in /proc, and things will anyway break in all sorts of ways if proc is mounted elsewhere.

package/rlwrap/rlwrap.mk line 7

Quoted 13 lines
package/rlwrap/rlwrap.mk new file +7 -0
new file mode 100644
index 0000000000..6f9de8281c
@@ -0,0 +1,48 @@
+################################################################################
+#
+# rlwrap
+#
+################################################################################
+
+# https://github.com/hanslub42/rlwrap/releases/download/0.46.1/rlwrap-0.46.1.tar.gz

This comment is not needed.

package/rlwrap/rlwrap.mk line 10

Quoted 3 lines
package/rlwrap/rlwrap.mk new file +3 -0
+
+RLWRAP_VERSION = 0.46.1
+RLWRAP_SOURCE = rlwrap-$(RLWRAP_VERSION).tar.gz

This line is not needed, and actually triggers a "make check-package" warning.

package/rlwrap/rlwrap.mk line 12

Quoted 2 lines
package/rlwrap/rlwrap.mk new file +2 -0
+RLWRAP_SITE = https://github.com/hanslub42/rlwrap/releases/download/$(RLWRAP_VERSION)
+RLWRAP_LICENSE = GPL-2.0

The license really is GPL-2.0+.

Quoted 14 lines
package/rlwrap/rlwrap.mk new file +14 -0
+RLWRAP_LICENSE_FILES = AUTHORS COPYING
+
+RLWRAP_DEPENDENCIES = readline
+
+# --enable-spy-on-readline
+ifeq ($(BR2_PACKAGE_RLWRAP_SPY_ON_READLINE),y)
+RLWRAP_CONF_OPTS += --enable-spy-on-readline
+else
+RLWRAP_CONF_OPTS += --disable-spy-on-readline
+endif
+
+# --enable-homegrown-redisplay
+ifeq ($(BR2_PACKAGE_RLWRAP_HOMEGROWN_REDISPLAY),y)
+RLWRAP_CONF_OPTS += --enable-homegrown-redisplay

package/rlwrap/rlwrap.mk line 36

Quoted 10 lines
package/rlwrap/rlwrap.mk new file +10 -0
+else
+RLWRAP_CONF_OPTS += --disable-homegrown-redisplay
+endif
+
+# --enable-debug
+ifeq ($(BR2_PACKAGE_RLWRAP_DEBUG),y)
+RLWRAP_CONF_OPTS += --enable-debug
+else
+RLWRAP_CONF_OPTS += --disable-debug
+endif

I dropped this part.

package/rlwrap/rlwrap.mk line 39

Quoted 2 lines
package/rlwrap/rlwrap.mk new file +2 -0
+# --enable-proc-mountpoint
+RLWRAP_CONF_OPTS += --enable-proc-mountpoint=$(BR2_PACKAGE_RLWRAP_PROC_MOUNTPOINT)

And this part.

Also, I added this:

+define RLWRAP_REMOVE_FILTERS
+ $(RM) -rf $(TARGET_DIR)/usr/share/rlwrap/filters
+endef
+RLWRAP_POST_INSTALL_TARGET_HOOKS += RLWRAP_REMOVE_FILTERS

Indeed, those filters are written in Python or Perl, and your package does not depend on them. In addition, the documentation says:

Filters are perl or python plugins that enable complete (albeit somewhat fragile) control over rlwrap's input and output, echo, prompt, history and completion. They aren't used a lot, and remain therefore somewhat untested. rlwrap -z listing lists the installed filters, rlwrap -z <somefilter> displays a short help text for <somefilter>

"They aren't used a lot". So for now, we drop them unconditionally. We can always revisit if someone needs them later.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot