* [Buildroot] [PATCH 1/1] package/usb_modeswitch: fix installation of systemd unit file
@ 2022-05-14 12:42 s-ol via buildroot
2022-05-14 13:14 ` Yann E. MORIN
0 siblings, 1 reply; 5+ messages in thread
From: s-ol via buildroot @ 2022-05-14 12:42 UTC (permalink / raw)
To: buildroot; +Cc: s-ol
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.
Signed-off-by: s-ol <s+removethis@s-ol.nu>
---
.../usb_modeswitch/0001-fix-systemd-detection.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 package/usb_modeswitch/0001-fix-systemd-detection.patch
diff --git a/package/usb_modeswitch/0001-fix-systemd-detection.patch b/package/usb_modeswitch/0001-fix-systemd-detection.patch
new file mode 100644
index 0000000000..6d02c648eb
--- /dev/null
+++ b/package/usb_modeswitch/0001-fix-systemd-detection.patch
@@ -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 usb_modeswitch@.service $(SYSDIR) || test 1
++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1
+
+ install: install-script
+
--
2.36.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/usb_modeswitch: fix installation of systemd unit file
2022-05-14 12:42 [Buildroot] [PATCH 1/1] package/usb_modeswitch: fix installation of systemd unit file s-ol via buildroot
@ 2022-05-14 13:14 ` Yann E. MORIN
2022-05-14 14:26 ` [Buildroot] [PATCH v2 " Sol Bekic via buildroot
0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2022-05-14 13:14 UTC (permalink / raw)
To: s-ol; +Cc: buildroot
s-ol, All,
On 2022-05-14 14:42 +0200, s-ol via buildroot spake thusly:
> 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.
>
> Signed-off-by: s-ol <s+removethis@s-ol.nu>
We'll need that you use you real name to sign-off your changes.
> ---
> .../usb_modeswitch/0001-fix-systemd-detection.patch | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> create mode 100644 package/usb_modeswitch/0001-fix-systemd-detection.patch
>
> diff --git a/package/usb_modeswitch/0001-fix-systemd-detection.patch b/package/usb_modeswitch/0001-fix-systemd-detection.patch
> new file mode 100644
> index 0000000000..6d02c648eb
> --- /dev/null
> +++ b/package/usb_modeswitch/0001-fix-systemd-detection.patch
The patch itself should contain a commit log of its own, and must be
signed off too.
> @@ -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 usb_modeswitch@.service $(SYSDIR) || test 1
> ++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(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.
> +
> + install: install-script
> +
> --
> 2.36.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/usb_modeswitch: fix installation of systemd unit file
2022-05-14 13:14 ` Yann E. MORIN
@ 2022-05-14 14:26 ` Sol Bekic via buildroot
2022-05-14 21:53 ` Yann E. MORIN
2022-05-29 8:20 ` Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Sol Bekic via buildroot @ 2022-05-14 14:26 UTC (permalink / raw)
To: buildroot; +Cc: s-ol, Yann E . MORIN
From: s-ol <s+removethis@s-ol.nu>
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.
Signed-off-by: Sol Bekic <s+removethis@s-ol.nu>
---
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
diff --git a/package/usb_modeswitch/0001-fix-systemd-detection.patch b/package/usb_modeswitch/0001-fix-systemd-detection.patch
new file mode 100644
index 0000000000..d0b3e80aeb
--- /dev/null
+++ b/package/usb_modeswitch/0001-fix-systemd-detection.patch
@@ -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 <s+removethis@s-ol.nu>
+
+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 usb_modeswitch@.service $(SYSDIR) || test 1
++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1
+
+ install: install-script
+
--
2.36.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2 1/1] package/usb_modeswitch: fix installation of systemd unit file
2022-05-14 14:26 ` [Buildroot] [PATCH v2 " Sol Bekic via buildroot
@ 2022-05-14 21:53 ` Yann E. MORIN
2022-05-29 8:20 ` Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2022-05-14 21:53 UTC (permalink / raw)
To: Sol Bekic; +Cc: buildroot
On 2022-05-14 16:26 +0200, Sol Bekic spake thusly:
> From: s-ol <s+removethis@s-ol.nu>
>
> 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.
>
> Signed-off-by: Sol Bekic <s+removethis@s-ol.nu>
> ---
> 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.
> .../0001-fix-systemd-detection.patch | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> create mode 100644 package/usb_modeswitch/0001-fix-systemd-detection.patch
>
> diff --git a/package/usb_modeswitch/0001-fix-systemd-detection.patch b/package/usb_modeswitch/0001-fix-systemd-detection.patch
> new file mode 100644
> index 0000000000..d0b3e80aeb
> --- /dev/null
> +++ b/package/usb_modeswitch/0001-fix-systemd-detection.patch
> @@ -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 <s+removethis@s-ol.nu>
> +
> +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 usb_modeswitch@.service $(SYSDIR) || test 1
> ++ test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl -o -e $(PREFIX)/bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1
> +
> + install: install-script
> +
> --
> 2.36.1
>
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2 1/1] package/usb_modeswitch: fix installation of systemd unit file
2022-05-14 14:26 ` [Buildroot] [PATCH v2 " Sol Bekic via buildroot
2022-05-14 21:53 ` Yann E. MORIN
@ 2022-05-29 8:20 ` Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2022-05-29 8:20 UTC (permalink / raw)
To: Sol Bekic via buildroot; +Cc: Sol Bekic, Yann E . MORIN
>>>>> "Sol" == Sol Bekic via buildroot <buildroot@buildroot.org> writes:
> From: s-ol <s+removethis@s-ol.nu>
> 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.
> Signed-off-by: Sol Bekic <s+removethis@s-ol.nu>
> ---
> 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.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-29 8:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-14 12:42 [Buildroot] [PATCH 1/1] package/usb_modeswitch: fix installation of systemd unit file s-ol via buildroot
2022-05-14 13:14 ` Yann E. MORIN
2022-05-14 14:26 ` [Buildroot] [PATCH v2 " Sol Bekic via buildroot
2022-05-14 21:53 ` Yann E. MORIN
2022-05-29 8:20 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.