package/usb_modeswitch: fix installation of systemd unit file
PATCH 1/1 package/usb_modeswitch: fix installation of systemd unit file
The upstream Makefile failed to detect systemd being present in some (maybe all) builds, resulting in the unit file not being installed. Without the unit file, the udev rules in usb_modeswitch-data don't work as expected (no modeswitch is performed).
This commit adds a patch that modifies the Makefile to include '$(PREFIX)/bin/systemctl' in the list of paths checked, which makes the installation phase work as intended. I will also submit this patch upstream.
--- .../usb_modeswitch/0001-fix-systemd-detection.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 package/usb_modeswitch/0001-fix-systemd-detection.patch
package/usb_modeswitch/0001-fix-systemd-detection.patch new file +13 -0
@@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 22bd0e0..72321a4 100755 +--- a/Makefile ++++ b/Makefile +@@ -62,7 +62,7 @@ + install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher + install -d $(DESTDIR)/var/lib/usb_modeswitch + test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1 +- test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1 ++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1 + + install: install-script +
Signature · 6 lines
2.36.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
s-ol, All,
On 2022-05-14 14:42 +0200, s-ol via buildroot spake thusly:
Quoted 10 lines
The upstream
Makefilefailed to detect systemd being present in some (maybe all) builds, resulting in the unit file not being installed. Without the unit file, the udev rules in usb_modeswitch-data don't work as expected (no modeswitch is performed).This commit adds a patch that modifies the
Makefileto include '$(PREFIX)/bin/systemctl' in the list of paths checked, which makes the installation phase work as intended. I will also submit this patch upstream.Signed-off-by s-ol <[email protected]>
We'll need that you use you real name to sign-off your changes.
package/usb_modeswitch/0001-fix-systemd-detection.patch
Quoted 10 lines
--- .../usb_modeswitch/0001-fix-systemd-detection.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 package/usb_modeswitch/0001-fix-systemd-detection.patchpackage/usb_modeswitch/0001-fix-systemd-detection.patch new file +0
-0
The patch itself should contain a commit log of its own, and must be signed off too.
package/usb_modeswitch/0001-fix-systemd-detection.patch line 10
Quoted 11 lines
package/usb_modeswitch/0001-fix-systemd-detection.patch new file +10
-0@@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 22bd0e0..72321a4 100755 +--- a/Makefile ++++ b/Makefile +@@ -62,7 +62,7 @@ + install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher + install -d $(DESTDIR)/var/lib/usb_modeswitch + test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1 +- test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1 ++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1
This is not very clean, but this is in line with how the rest of the Makefile is written, so this is OK for me.
Can you please resubmit using your your real name, please?
Regards,
Yann E. MORIN.
Quoted 10 lines
package/usb_modeswitch/0001-fix-systemd-detection.patch new file +3
-0+ + install: install-script +Signature · 6 lines
2.36.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/usb_modeswitch: fix installation of systemd unit file
From: s-ol <[email protected]>
The upstream Makefile failed to detect systemd being present in some (maybe all) builds, resulting in the unit file not being installed. Without the unit file, the udev rules in usb_modeswitch-data don't work as expected (no modeswitch is performed).
This commit adds a patch that modifies the Makefile to include '$(PREFIX)/bin/systemctl' in the list of paths checked, which makes the installation phase work as intended. I will also submit this patch upstream.
---
As requested by Yann E. Morin, both this patch and the patch-file it adds are commented and signed off with my full name.
.../0001-fix-systemd-detection.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 package/usb_modeswitch/0001-fix-systemd-detection.patch
package/usb_modeswitch/0001-fix-systemd-detection.patch new file +18 -0
@@ -0,0 +1,18 @@ +Modify the Makefile to include '$(PREFIX)/bin/systemctl' in the list of paths. +This makes the udev intgeration work as intended when using systemd. + +Signed-off-by: Sol Bekic <[email protected]> + +diff --git a/Makefile b/Makefile +index 22bd0e0..72321a4 100755 +--- a/Makefile ++++ b/Makefile +@@ -62,7 +62,7 @@ + install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher + install -d $(DESTDIR)/var/lib/usb_modeswitch + test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1 +- test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1 ++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1 + + install: install-script +
Signature · 6 lines
2.36.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedOn 2022-05-14 16:26 +0200, Sol Bekic spake thusly:
Quoted 7 lines
From: s-ol <[email protected]>
The upstream
Makefilefailed to detect systemd being present in some (maybe all) builds, resulting in the unit file not being installed. Without the unit file, the udev rules in usb_modeswitch-data don't work as expected (no modeswitch is performed).
Quoted 8 lines
This commit adds a patch that modifies the
Makefileto include '$(PREFIX)/bin/systemctl' in the list of paths checked, which makes the installation phase work as intended. I will also submit this patch upstream.Signed-off-by Sol Bekic <[email protected]>---
As requested by Yann E. Morin, both this patch and the patch-file it adds are commented and signed off with my full name.
Thanks. I also amended the authorship to use your full name too.
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 31 lines
.../0001-fix-systemd-detection.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 package/usb_modeswitch/0001-fix-systemd-detection.patchpackage/usb_modeswitch/0001-fix-systemd-detection.patch new file +18
-0@@ -0,0 +1,18 @@ +Modify the Makefile to include '$(PREFIX)/bin/systemctl' in the list of paths. +This makes the udev intgeration work as intended when using systemd. + +Signed-off-by: Sol Bekic <[email protected]> + +diff --git a/Makefile b/Makefile +index 22bd0e0..72321a4 100755 +--- a/Makefile ++++ b/Makefile +@@ -62,7 +62,7 @@ + install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher + install -d $(DESTDIR)/var/lib/usb_modeswitch + test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1 +- test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1 ++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 [email protected] $(SYSDIR) || test 1 + + install: install-script +Signature · 1 line
2.36.1
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sol" == Sol Bekic via buildroot <[email protected]> writes:
From: s-ol <[email protected]>
The upstreamMakefilefailed to detect systemd being present in some (maybe all) builds, resulting in the unit file not being installed. Without the unit file, the udev rules in usb_modeswitch-data don't work as expected (no modeswitch is performed).
Quoted 8 lines
This commit adds a patch that modifies the
Makefileto include '$(PREFIX)/bin/systemctl' in the list of paths checked, which makes the installation phase work as intended. I will also submit this patch upstream.Signed-off-by Sol Bekic <[email protected]>---
As requested by Yann E. Morin, both this patch and the patch-file it adds are commented and signed off with my full name.
Committed to 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot