Skip to contentSkip to conversation

ifupdown-ng: Add recipe

PATCH In review Alex Kiernan 4 participants 9 messages Jan 3, 2022 – Jan 5, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ifupdown-ng: Add recipe

ifupdown-ng is a network device manager that is largely compatible with Debian ifupdown, BusyBox ifupdown and Cumulus Networks' ifupdown2.

---
Changes in v2:
- drop merged upstream SBINDIR patch

 .../ifupdown-ng/ifupdown-ng_0.11.3.bb         | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 meta-networking/recipes-support/ifupdown-ng/ifupdown-ng_0.11.3.bb
meta-networking/recipes-support/ifupdown-ng/ifupdown-ng_0.11.3.bb new file +45 -0
new file mode 100644
index 000000000000..42bf1c235b61
@@ -0,0 +1,45 @@
+SUMMARY = "Flexible ifup/ifdown implementation"
+DESCRIPTION = "ifupdown-ng is a network device manager that is largely \
+compatible with Debian ifupdown, BusyBox ifupdown and Cumulus Networks' \
+ifupdown2."
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYING;md5=451f521abe917914139c9739ea0f2bc5"
+
+DEPENDS = "libbsd"
+
+PV .= "+git${SRCPV}"
+
+SRC_URI = "git://github.com/ifupdown-ng/ifupdown-ng.git;protocol=https;branch=main"
+SRCREV = "553f056ed9fccdf08709ea4d3087df5e7d590ff1"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig update-alternatives
+
+LIBBSD_CFLAGS = "`pkg-config --cflags libbsd-overlay`"
+LIBBSD_LIBS = "`pkg-config --cflags --libs libbsd-overlay`"
+
+EXTRA_OEMAKE = "\
+    CC='${CC} ${CFLAGS} ${LDFLAGS}' \
+    LD='${LD} ${LDFLAGS}' \
+    SBINDIR='${base_sbindir}' \
+    LIBBSD_CFLAGS='${LIBBSD_CFLAGS}' \
+    LIBBSD_LIBS='${LIBBSD_LIBS}' \
+    INTERFACES_FILE='${sysconfdir}/network/interfaces' \
+    CONFIG_FILE='${sysconfdir}/network/ifupdown-ng.conf' \
+    EXECUTOR_PATH='${libexecdir}/${BPN}' \
+"
+
+do_compile () {
+	oe_runmake
+}
+
+do_install () {
+	oe_runmake 'DESTDIR=${D}' install
+}
+
+ALTERNATIVE_PRIORITY = "120"
+ALTERNATIVE:${PN} = "ifup ifdown"
+
+ALTERNATIVE_LINK_NAME[ifup] = "${base_sbindir}/ifup"
+ALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 2 lines · Alex Kiernan

ifupdown-ng is a network device manager that is largely compatible with Debian ifupdown, BusyBox ifupdown and Cumulus Networks' ifupdown2.

If this is a superior alternative, should this be merged into oe-core as the replacement for the existing ifupdown scripts?

Ross

#2 lore raw

Hello Ross,

Em ter., 4 de jan. de 2022 às 07:28, Ross Burton <[email protected]> escreveu:

Quoted 6 lines · Alex Kiernan
Quoted 2 lines

ifupdown-ng is a network device manager that is largely compatible with Debian ifupdown, BusyBox ifupdown and Cumulus Networks' ifupdown2.

If this is a superior alternative, should this be merged into oe-core as the replacement for the existing ifupdown scripts?

I think we could consider it but it'd be interesting to check the size difference between both so we can have a clear idea on the impact of it.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 11 lines · Otavio Salvador

Hello Ross,

Em ter., 4 de jan. de 2022 às 07:28, Ross Burton <[email protected]> escreveu:

Quoted 6 lines · Alex Kiernan
Quoted 2 lines

ifupdown-ng is a network device manager that is largely compatible with Debian ifupdown, BusyBox ifupdown and Cumulus Networks' ifupdown2.

If this is a superior alternative, should this be merged into oe-core as the replacement for the existing ifupdown scripts?

I suspect it's too early, though I guess there's already ifupdown in busybox, so three is possibly excessive.

Quoted 4 lines

I think we could consider it but it'd be interesting to check the size difference between both so we can have a clear idea on the impact of it.

Smaller if anything (though I've just realised I've not dealt the ALTERNATIVES paths correctly):

Signature · 1 line
Alex Kiernan
#4 lore raw
Quoted 2 lines · Alex Kiernan

Smaller if anything (though I've just realised I've not dealt the ALTERNATIVES paths correctly):

There's a case to be made for just conflicting with ifupdown and not bothering with alternatives.

Ross

#5 lore raw
Quoted 6 lines · Ross Burton
Quoted 2 lines · Alex Kiernan

Smaller if anything (though I've just realised I've not dealt the ALTERNATIVES paths correctly):

There's a case to be made for just conflicting with ifupdown and not bothering with alternatives.

thats works for me.

Quoted 13 lines

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#94662): https://lists.openembedded.org/g/openembedded-devel/message/94662
Mute This Topic: https://lists.openembedded.org/mt/88115930/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw

btw. it fails to compile with musl

https://errors.yoctoproject.org/Errors/Details/621451/

Quoted 26 lines · Khem Raj
Quoted 6 lines · Ross Burton
Quoted 2 lines · Alex Kiernan

Smaller if anything (though I've just realised I've not dealt the ALTERNATIVES paths correctly):

There's a case to be made for just conflicting with ifupdown and not bothering with alternatives.

thats works for me.

Quoted 13 lines

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#94662): https://lists.openembedded.org/g/openembedded-devel/message/94662
Mute This Topic: https://lists.openembedded.org/mt/88115930/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#7 lore raw

Yeah, I realised that w/ some more testing locally... will pick that up along with RCONFLICTing on ifupdown

Quoted 32 lines · Khem Raj

btw. it fails to compile with musl

https://errors.yoctoproject.org/Errors/Details/621451/

Quoted 26 lines · Khem Raj
Quoted 6 lines · Ross Burton
Quoted 2 lines · Alex Kiernan

Smaller if anything (though I've just realised I've not dealt the ALTERNATIVES paths correctly):

There's a case to be made for just conflicting with ifupdown and not bothering with alternatives.

thats works for me.

Quoted 13 lines

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#94662): https://lists.openembedded.org/g/openembedded-devel/message/94662
Mute This Topic: https://lists.openembedded.org/mt/88115930/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 1 line
Alex Kiernan
#8 lore raw
In reply to Alex Kiernan

Em seg., 3 de jan. de 2022 às 13:37, Alex Kiernan
<[email protected]> escreveu:

Quoted 16 lines

ifupdown-ng is a network device manager that is largely compatible with Debian ifupdown, BusyBox ifupdown and Cumulus Networks' ifupdown2.

---
Changes in v2:
- drop merged upstream SBINDIR patch

 .../ifupdown-ng/ifupdown-ng_0.11.3.bb         | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 meta-networking/recipes-support/ifupdown-ng/ifupdown-ng_0.11.3.bb
meta-networking/recipes-support/ifupdown-ng/ifupdown-ng_0.11.3.bb new file +0 -0
new file mode 100644

...

meta-networking/recipes-support/ifupdown-ng/ifupdown-ng_0.11.3.bb line 39

Quoted 7 lines
meta-networking/recipes-support/ifupdown-ng/ifupdown-ng_0.11.3.bb new file +7 -0
+do_compile () {
+       oe_runmake
+}
+
+do_install () {
+       oe_runmake 'DESTDIR=${D}' install
+}

The do_compile and do_install could be dropped as this is the default.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750