Skip to contentSkip to conversation

openresolv: new package

PATCH New Matt Weber 2 participants 4 messages Aug 7, 2018 – Aug 14, 2018

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH 1/1 openresolv: new package

From: Paresh Chaudhary <[email protected]>

This patch added 'openresolv' package support. This tool provides a dns management framework to track currently available nameservers.

A key feature of this tool vs resolvconf is the ability to manage multiple name server input configuration files and generate the /etc/resolv.conf. This is handy when you have multiple dynamic communication paths providing nameserver information.

REF: https://github.com/rsmarples/openresolv

---
 package/Config.in                  |  1 +
 package/openresolv/Config.in       | 13 +++++++++++++
 package/openresolv/openresolv.hash |  3 +++
 package/openresolv/openresolv.mk   | 12 ++++++++++++
 4 files changed, 29 insertions(+)
 create mode 100644 package/openresolv/Config.in
 create mode 100644 package/openresolv/openresolv.hash
 create mode 100644 package/openresolv/openresolv.mk
package/Config.in +1 -0
index f5a1749..2ad6687 100644
@@ -1843,6 +1843,7 @@ endif
 	source "package/open-plc-utils/Config.in"
 	source "package/openntpd/Config.in"
 	source "package/openobex/Config.in"
+	source "package/openresolv/Config.in"
 	source "package/openssh/Config.in"
 	source "package/openswan/Config.in"
 	source "package/openvpn/Config.in"
package/openresolv/Config.in new file +13 -0
new file mode 100644
index 0000000..3eb736f
@@ -0,0 +1,13 @@
+comment "openresolv needs a bash shell"
+	depends on !BR2_SYSTEM_BIN_SH_BASH
+
+config BR2_PACKAGE_OPENRESOLV
+	bool "openresolv"
+	depends on BR2_SYSTEM_BIN_SH_BASH # bash runtime dependency
+	select BR2_PACKAGE_BASH
+	help
+	  openresolv is a resolvconf implementation which
+	  manages resolv.conf. This tool provides a dns management
+	  framework to track currently available nameservers.
+
+	  https://github.com/rsmarples/openresolv
package/openresolv/openresolv.hash new file +3 -0
new file mode 100644
index 0000000..e1a1fb5
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 96b3f84435a183426c622db7097a930fb0d48a99e82cd87ce83bd343b8c20574 openresolv-fe4e1ec4e2be2adfc1530ade94ebb30aa6f51540.tar.gz
+sha256 d1f9dcd2dac4e095b14caab517cfe791a6e0785346164b7d0cafc13c714f8aa5 LICENSE
package/openresolv/openresolv.mk new file +12 -0
new file mode 100644
index 0000000..2faa6e1
@@ -0,0 +1,12 @@
+################################################################################
+#
+# openresolv
+#
+################################################################################
+
+OPENRESOLV_VERSION = fe4e1ec4e2be2adfc1530ade94ebb30aa6f51540
+OPENRESOLV_SITE = $(call github,rsmarples,openresolv,$(OPENRESOLV_VERSION))
+OPENRESOLV_LICENSE = BSD-2-Clause
+OPENRESOLV_LICENSE_FILES = LICENSE
+
+$(eval $(autotools-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 openresolv: new package

Hello Matt,

Quoted 5 lines · Matt Weber
 package/Config.in                  |  1 +
 package/openresolv/Config.in       | 13 +++++++++++++
 package/openresolv/openresolv.hash |  3 +++
 package/openresolv/openresolv.mk   | 12 ++++++++++++
 4 files changed, 29 insertions(+)

Entry in DEVELOPERS file is missing.

Quoted 18 lines
package/Config.in +1 -0
index f5a1749..2ad6687 100644
@@ -1843,6 +1843,7 @@ endif
 	source "package/open-plc-utils/Config.in"
 	source "package/openntpd/Config.in"
 	source "package/openobex/Config.in"
+	source "package/openresolv/Config.in"
 	source "package/openssh/Config.in"
 	source "package/openswan/Config.in"
 	source "package/openvpn/Config.in"
package/openresolv/Config.in new file +0 -0
new file mode 100644
index 0000000..3eb736f

package/openresolv/Config.in line 2

Quoted 2 lines
package/openresolv/Config.in new file +2 -0
@@ -0,0 +1,13 @@
+comment "openresolv needs a bash shell"
+	depends on !BR2_SYSTEM_BIN_SH_BASH

Are you sure it needs a bash shell ? Indeed in
https://github.com/rsmarples/openresolv, the #1 argument for resolvconf compared to its Debian variant is:

""
Works with POSIX shell and userland
""

Quoted 1 line

$(eval $(autotools-package))

This package is not using the autotools. The configure script is not generated by autoconf, the Makefile is not generated by automake. So, generic-package should be used, and not autotools-package.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 openresolv: new package

Thomas,

Quoted 5 lines · Thomas Petazzoni

Hello Matt,

On Tue, 7 Aug 2018 08:29:46 -0500, Matt Weber wrote:

Quoted 7 lines
Quoted 5 lines
 package/Config.in                  |  1 +
 package/openresolv/Config.in       | 13 +++++++++++++
 package/openresolv/openresolv.hash |  3 +++
 package/openresolv/openresolv.mk   | 12 ++++++++++++
 4 files changed, 29 insertions(+)

Entry in DEVELOPERS file is missing.

Ah yes, will add.

Quoted 26 lines
Quoted 19 lines
package/Config.in +1 -0
index f5a1749..2ad6687 100644
@@ -1843,6 +1843,7 @@ endif
      source "package/open-plc-utils/Config.in"
      source "package/openntpd/Config.in"
      source "package/openobex/Config.in"
+     source "package/openresolv/Config.in"
      source "package/openssh/Config.in"
      source "package/openswan/Config.in"
      source "package/openvpn/Config.in"
package/openresolv/Config.in new file +0 -0
new file mode 100644
index 0000000..3eb736f

package/openresolv/Config.in line 2

Quoted 2 lines
package/openresolv/Config.in new file +2 -0
@@ -0,0 +1,13 @@
+comment "openresolv needs a bash shell"
+     depends on !BR2_SYSTEM_BIN_SH_BASH

Are you sure it needs a bash shell ? Indeed in
https://github.com/rsmarples/openresolv, the #1 argument for resolvconf compared to its Debian variant is:

Quoted 3 lines

""
Works with POSIX shell and userland
""

This dialog should have been included in the description related to use of getopts vs getopt in the script.

https://github.com/rsmarples/openresolv/commit/a694a49c41ffdc0e215320459af009d44482b065#commitcomment-29850615

Quoted 6 lines
Quoted 2 lines

$(eval $(autotools-package))

This package is not using the autotools. The configure script is not generated by autoconf, the Makefile is not generated by automake. So, generic-package should be used, and not autotools-package.

Missed this, looks like they are mimic'n a configure script. It is working as a autotools pkg, but I'll pull the commands over to a generic.

Matt

#3 lore raw

PATCH 1/1 openresolv: new package

Hello,

Quoted 4 lines · Matthew Weber
Quoted 4 lines

Are you sure it needs a bash shell ? Indeed in
https://github.com/rsmarples/openresolv, the #1 argument for resolvconf compared to its Debian variant is:

Quoted 8 lines
Quoted 3 lines

""
Works with POSIX shell and userland
""

This dialog should have been included in the description related to use of getopts vs getopt in the script.

https://github.com/rsmarples/openresolv/commit/a694a49c41ffdc0e215320459af009d44482b065#commitcomment-29850615

I think Paresh got it wrong somehow. Busybox provides both getopt and getopts. getopt is non-POSIX, while getopts is POSIX (see
https://en.wikipedia.org/wiki/Getopt#Shell and
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/getopts.html).

Minimal Buildroot system with our default Busybox configuration:

# getopts
-sh: getopts: usage: getopts optstring var [arg]
# getopt
getopt: missing optstring argument

Both are provided. getopt is a separate program, getopts is a shell built-in.

I added a comment on the Github issue.

Quoted 3 lines

Missed this, looks like they are mimic'n a configure script. It is working as a autotools pkg, but I'll pull the commands over to a generic.

Please don't pull the full commands from autotools-package with all the environment variables and options that only make sense for real-autotools based packages: only include the minimal set of variables/options.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com