Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts
@ 2023-09-14 23:50 Yanghao Cheng
  2023-09-14 23:50 ` [Buildroot] [PATCH 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-14 23:50 UTC (permalink / raw)
  To: buildroot; +Cc: Yanghao Cheng

From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

xdm package also installs a init script that utimately starts X server

Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
---
Backport to: 2023.02.x
 .../xserver_xorg-server/xserver_xorg-server.mk     | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 593bbd4276..e5df7f7e93 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -181,12 +181,14 @@ define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
 endef
 
-# init script conflicts with S90nodm
-ifneq ($(BR2_PACKAGE_NODM),y)
-define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
-	$(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
-		$(TARGET_DIR)/etc/init.d/S40xorg
-endef
+# init script conflicts with S90nodm and S99xdm
+ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
+    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
+else
+    define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
+        $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
+            $(TARGET_DIR)/etc/init.d/S40xorg
+    endef
 endif
 
 $(eval $(autotools-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled.
  2023-09-14 23:50 [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts Yanghao Cheng
@ 2023-09-14 23:50 ` Yanghao Cheng
  2023-09-15 10:21 ` [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts Thomas Petazzoni via buildroot
  2023-09-15 17:24 ` [Buildroot] [PATCH v2 1/3] " Yanghao Cheng
  2 siblings, 0 replies; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-14 23:50 UTC (permalink / raw)
  To: buildroot; +Cc: Yanghao Cheng

From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
---
Backport to: 2023.02.x
 .../xserver_xorg-server/xserver_xorg-server.mk      | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index e5df7f7e93..7566541067 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -176,10 +176,15 @@ XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1
 XSERVER_XORG_SERVER_DEPENDENCIES += libsha1
 endif
 
-define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
-	$(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \
-		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
-endef
+# Systemd unit conflicts with nodm and xdm
+ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
+    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
+else
+	define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
+		$(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \
+			$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
+	endef
+endif
 
 # init script conflicts with S90nodm and S99xdm
 ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts
  2023-09-14 23:50 [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts Yanghao Cheng
  2023-09-14 23:50 ` [Buildroot] [PATCH 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
@ 2023-09-15 10:21 ` Thomas Petazzoni via buildroot
  2023-09-15 17:24 ` [Buildroot] [PATCH v2 1/3] " Yanghao Cheng
  2 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-09-15 10:21 UTC (permalink / raw)
  To: Yanghao Cheng; +Cc: Yanghao Cheng, buildroot

Hello,

On Thu, 14 Sep 2023 16:50:43 -0700
Yanghao Cheng <yanghaobillcheng@gmail.com> wrote:

> From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
> 
> xdm package also installs a init script that utimately starts X server
> 
> Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

Thanks for your patch, see below one suggestion.

> ---
> Backport to: 2023.02.x
>  .../xserver_xorg-server/xserver_xorg-server.mk     | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> index 593bbd4276..e5df7f7e93 100644
> --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> @@ -181,12 +181,14 @@ define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
>  		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
>  endef
>  
> -# init script conflicts with S90nodm
> -ifneq ($(BR2_PACKAGE_NODM),y)
> -define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
> -	$(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
> -		$(TARGET_DIR)/etc/init.d/S40xorg
> -endef
> +# init script conflicts with S90nodm and S99xdm
> +ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
> +    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
> +else
> +    define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
> +        $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
> +            $(TARGET_DIR)/etc/init.d/S40xorg
> +    endef
>  endif

Can be simplified as:

ifeq ($(BR2_PACKAGE_NODM)$(BR2_PACKAGE_XAPP_XDM),)
define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
	$(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
		$(TARGET_DIR)/etc/init.d/S40xorg
endef
endif

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/xserver_xorg-server: fix init script conflicts
  2023-09-14 23:50 [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts Yanghao Cheng
  2023-09-14 23:50 ` [Buildroot] [PATCH 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
  2023-09-15 10:21 ` [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts Thomas Petazzoni via buildroot
@ 2023-09-15 17:24 ` Yanghao Cheng
  2023-09-15 17:24   ` [Buildroot] [PATCH v2 2/3] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
                     ` (3 more replies)
  2 siblings, 4 replies; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-15 17:24 UTC (permalink / raw)
  To: buildroot; +Cc: Yanghao Cheng

From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

xdm package also installs a init script that utimately starts X server

Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
---
 .../xserver_xorg-server/xserver_xorg-server.mk     | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 593bbd4276..e5df7f7e93 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -181,12 +181,14 @@ define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
 endef
 
-# init script conflicts with S90nodm
-ifneq ($(BR2_PACKAGE_NODM),y)
-define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
-	$(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
-		$(TARGET_DIR)/etc/init.d/S40xorg
-endef
+# init script conflicts with S90nodm and S99xdm
+ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
+    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
+else
+    define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
+        $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
+            $(TARGET_DIR)/etc/init.d/S40xorg
+    endef
 endif
 
 $(eval $(autotools-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2 2/3] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled.
  2023-09-15 17:24 ` [Buildroot] [PATCH v2 1/3] " Yanghao Cheng
@ 2023-09-15 17:24   ` Yanghao Cheng
  2023-09-15 17:24   ` [Buildroot] [PATCH v2 3/3] package/xserver_xorg-server: fix init script conflicts Yanghao Cheng
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-15 17:24 UTC (permalink / raw)
  To: buildroot; +Cc: Yanghao Cheng

From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
---
 .../xserver_xorg-server/xserver_xorg-server.mk      | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index e5df7f7e93..7566541067 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -176,10 +176,15 @@ XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1
 XSERVER_XORG_SERVER_DEPENDENCIES += libsha1
 endif
 
-define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
-	$(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \
-		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
-endef
+# Systemd unit conflicts with nodm and xdm
+ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
+    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
+else
+	define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
+		$(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \
+			$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
+	endef
+endif
 
 # init script conflicts with S90nodm and S99xdm
 ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/xserver_xorg-server: fix init script conflicts
  2023-09-15 17:24 ` [Buildroot] [PATCH v2 1/3] " Yanghao Cheng
  2023-09-15 17:24   ` [Buildroot] [PATCH v2 2/3] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
@ 2023-09-15 17:24   ` Yanghao Cheng
  2023-09-15 21:19   ` [Buildroot] [PATCH v2 1/3] " Yann E. MORIN
  2023-09-15 22:27   ` [Buildroot] [PATCH v3 1/2] " Yanghao Cheng
  3 siblings, 0 replies; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-15 17:24 UTC (permalink / raw)
  To: buildroot; +Cc: Yanghao Cheng

From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

Simplify the condition per Thomas's suggestion

Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
---
Changes v1 -> v2:
    - Simplify the condition per Thomas's suggestion

 .../x11r7/xserver_xorg-server/xserver_xorg-server.mk   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 7566541067..6be9eee099 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -177,9 +177,8 @@ XSERVER_XORG_SERVER_DEPENDENCIES += libsha1
 endif
 
 # Systemd unit conflicts with nodm and xdm
-ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
-    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
-else
+ifeq ($(BR2_PACKAGE_NODM)$(BR2_PACKAGE_XAPP_XDM),)
+# Install the systemd unit only when nodm nor xdm are enabled
 	define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
 		$(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \
 			$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
@@ -187,9 +186,8 @@ else
 endif
 
 # init script conflicts with S90nodm and S99xdm
-ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
-    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
-else
+ifeq ($(BR2_PACKAGE_NODM)$(BR2_PACKAGE_XAPP_XDM),)
+# Install the init script only when nodm nor xdm are enabled
     define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
         $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
             $(TARGET_DIR)/etc/init.d/S40xorg
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v2 1/3] package/xserver_xorg-server: fix init script conflicts
  2023-09-15 17:24 ` [Buildroot] [PATCH v2 1/3] " Yanghao Cheng
  2023-09-15 17:24   ` [Buildroot] [PATCH v2 2/3] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
  2023-09-15 17:24   ` [Buildroot] [PATCH v2 3/3] package/xserver_xorg-server: fix init script conflicts Yanghao Cheng
@ 2023-09-15 21:19   ` Yann E. MORIN
  2023-09-15 22:27   ` [Buildroot] [PATCH v3 1/2] " Yanghao Cheng
  3 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2023-09-15 21:19 UTC (permalink / raw)
  To: Yanghao Cheng; +Cc: Yanghao Cheng, buildroot

Yanghao Cheng, All,

On 2023-09-15 10:24 -0700, Yanghao Cheng spake thusly:
> From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
> 
> xdm package also installs a init script that utimately starts X server
> 
> Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

Thanks for this v2, but there are still a few issues, see below...

> ---
>  .../xserver_xorg-server/xserver_xorg-server.mk     | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> index 593bbd4276..e5df7f7e93 100644
> --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> @@ -181,12 +181,14 @@ define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
>  		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
>  endef
>  
> -# init script conflicts with S90nodm
> -ifneq ($(BR2_PACKAGE_NODM),y)
> -define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
> -	$(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
> -		$(TARGET_DIR)/etc/init.d/S40xorg
> -endef
> +# init script conflicts with S90nodm and S99xdm
> +ifneq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)

Thomas suggested you change the condition to positive logic. I see you
did that in patch 3/3, but it should have been done right here in this
patch, not in a separate patch.

> +    # NODM or XDM is defined, do not define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
> +else
> +    define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
> +        $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
> +            $(TARGET_DIR)/etc/init.d/S40xorg
> +    endef

    $ make check-package
    package/x11r7/xserver_xorg-server/xserver_xorg-server.mk:189: expected indent with tabs
    package/x11r7/xserver_xorg-server/xserver_xorg-server.mk:190: expected indent with tabs

Also, the "define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV" and "endef"
lines should not be indented: we do not indent the Makefile code, even
when it is in a conditional block.

Can you look into that, and also check patch 2 about systemd, to follow
the same suggestions?

Thanks!

Regards,
Yann E. MORIN.

>  endif
>  
>  $(eval $(autotools-package))
> -- 
> 2.25.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] 13+ messages in thread

* [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts
  2023-09-15 17:24 ` [Buildroot] [PATCH v2 1/3] " Yanghao Cheng
                     ` (2 preceding siblings ...)
  2023-09-15 21:19   ` [Buildroot] [PATCH v2 1/3] " Yann E. MORIN
@ 2023-09-15 22:27   ` Yanghao Cheng
  2023-09-15 22:27     ` [Buildroot] [PATCH v3 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk Yanghao Cheng
                       ` (2 more replies)
  3 siblings, 3 replies; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-15 22:27 UTC (permalink / raw)
  To: buildroot; +Cc: Yanghao Cheng

From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

xdm package also installs a init script that utimately starts X server

Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
---
Changes v1 -> v2:
    - Simplify the condition per Thomas's suggestion

Changes v2 -> v3: (Suggested by Yann)
	- Revert indent added in original patch
	- Keep the original number of patches

 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 593bbd4276..0390519d6a 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -181,8 +181,9 @@ define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
 endef
 
-# init script conflicts with S90nodm
-ifneq ($(BR2_PACKAGE_NODM),y)
+# init script conflicts with S90nodm and S99xdm
+ifeq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
+# Install the init script only when nodm nor xdm aren't enabled
 define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
 		$(TARGET_DIR)/etc/init.d/S40xorg
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v3 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk
  2023-09-15 22:27   ` [Buildroot] [PATCH v3 1/2] " Yanghao Cheng
@ 2023-09-15 22:27     ` Yanghao Cheng
  2023-09-24 21:07       ` Peter Korsgaard
  2023-09-16 13:19     ` [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts Yann E. MORIN
  2023-09-24 21:06     ` Peter Korsgaard
  2 siblings, 1 reply; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-15 22:27 UTC (permalink / raw)
  To: buildroot; +Cc: Yanghao Cheng

From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>

Does not install systemd unit if nodm or xdm is enabled.

Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
---
Changes v1 -> v2:
    - Simplify the condition per Thomas's suggestion

Changes v2 -> v3: (Suggested by Yann)
	- Revert indent added in original patch
	- Keep the original number of patches

 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 0390519d6a..4019e1e280 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -176,10 +176,14 @@ XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1
 XSERVER_XORG_SERVER_DEPENDENCIES += libsha1
 endif
 
+# Systemd unit conflicts with nodm and xdm
+ifeq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
+# Install the systemd unit only when nodm nor xdm aren't enabled
 define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
 endef
+endif
 
 # init script conflicts with S90nodm and S99xdm
 ifeq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts
  2023-09-15 22:27   ` [Buildroot] [PATCH v3 1/2] " Yanghao Cheng
  2023-09-15 22:27     ` [Buildroot] [PATCH v3 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk Yanghao Cheng
@ 2023-09-16 13:19     ` Yann E. MORIN
  2023-09-18 17:12       ` Yanghao Cheng
  2023-09-24 21:06     ` Peter Korsgaard
  2 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2023-09-16 13:19 UTC (permalink / raw)
  To: Yanghao Cheng; +Cc: Yanghao Cheng, buildroot

Yanghao Cheng, All,

On 2023-09-15 15:27 -0700, Yanghao Cheng spake thusly:
> From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
> 
> xdm package also installs a init script that utimately starts X server
> 
> Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
> ---
> Changes v1 -> v2:
>     - Simplify the condition per Thomas's suggestion
> 
> Changes v2 -> v3: (Suggested by Yann)
> 	- Revert indent added in original patch
> 	- Keep the original number of patches
> 
>  package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> index 593bbd4276..0390519d6a 100644
> --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> @@ -181,8 +181,9 @@ define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
>  		$(TARGET_DIR)/usr/lib/systemd/system/xorg.service
>  endef
>  
> -# init script conflicts with S90nodm
> -ifneq ($(BR2_PACKAGE_NODM),y)
> +# init script conflicts with S90nodm and S99xdm
> +ifeq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)

As Thomas mentioned, in this situation, we do not use $(or ...), but we
just concatenate the values:

    ifeq ($(BR2_PACKAGE_NODM)$(BR2_PACKAGE_XAPP_XDM),)
    ...

> +# Install the init script only when nodm nor xdm aren't enabled

I slightly reworded the comment, bcasue it did not make much sense to
have two similar comments, one outsode, the other inside the conditional
block.

I did the same in the systemd-related change in patch 2.

Both applied to master, thanks.

Regards,
Yann E. MORIN.

>  define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
>  	$(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
>  		$(TARGET_DIR)/etc/init.d/S40xorg
> -- 
> 2.25.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] 13+ messages in thread

* Re: [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts
  2023-09-16 13:19     ` [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts Yann E. MORIN
@ 2023-09-18 17:12       ` Yanghao Cheng
  0 siblings, 0 replies; 13+ messages in thread
From: Yanghao Cheng @ 2023-09-18 17:12 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Yanghao Cheng, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 3169 bytes --]

Thank you!

This is my first time submitting a patch, and I am happy to see that it's
committed.
I added the maintenance branch to the patch per the buildroot manual, but I
think I lost it when I reworked the patch for changes.
The maintenance branch I am on is 2023.02.x

Best,
Yanghao

On Sat, Sep 16, 2023 at 6:19 AM Yann E. MORIN <yann.morin.1998@free.fr>
wrote:

> Yanghao Cheng, All,
>
> On 2023-09-15 15:27 -0700, Yanghao Cheng spake thusly:
> > From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
> >
> > xdm package also installs a init script that utimately starts X server
> >
> > Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
> > ---
> > Changes v1 -> v2:
> >     - Simplify the condition per Thomas's suggestion
> >
> > Changes v2 -> v3: (Suggested by Yann)
> >       - Revert indent added in original patch
> >       - Keep the original number of patches
> >
> >  package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> > index 593bbd4276..0390519d6a 100644
> > --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> > +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> > @@ -181,8 +181,9 @@ define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
> >               $(TARGET_DIR)/usr/lib/systemd/system/xorg.service
> >  endef
> >
> > -# init script conflicts with S90nodm
> > -ifneq ($(BR2_PACKAGE_NODM),y)
> > +# init script conflicts with S90nodm and S99xdm
> > +ifeq ($(or $(BR2_PACKAGE_NODM), $(BR2_PACKAGE_XAPP_XDM)),)
>
> As Thomas mentioned, in this situation, we do not use $(or ...), but we
> just concatenate the values:
>
>     ifeq ($(BR2_PACKAGE_NODM)$(BR2_PACKAGE_XAPP_XDM),)
>     ...
>
> > +# Install the init script only when nodm nor xdm aren't enabled
>
> I slightly reworded the comment, bcasue it did not make much sense to
> have two similar comments, one outsode, the other inside the conditional
> block.
>
> I did the same in the systemd-related change in patch 2.
>
> Both applied to master, thanks.
>
> Regards,
> Yann E. MORIN.
>
> >  define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
> >       $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
> >               $(TARGET_DIR)/etc/init.d/S40xorg
> > --
> > 2.25.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.  |
>
> '------------------------------^-------^------------------^--------------------'
>

[-- Attachment #1.2: Type: text/html, Size: 4683 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts
  2023-09-15 22:27   ` [Buildroot] [PATCH v3 1/2] " Yanghao Cheng
  2023-09-15 22:27     ` [Buildroot] [PATCH v3 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk Yanghao Cheng
  2023-09-16 13:19     ` [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts Yann E. MORIN
@ 2023-09-24 21:06     ` Peter Korsgaard
  2 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2023-09-24 21:06 UTC (permalink / raw)
  To: Yanghao Cheng; +Cc: Yanghao Cheng, buildroot

>>>>> "Yanghao" == Yanghao Cheng <yanghaobillcheng@gmail.com> writes:

 > From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
 > xdm package also installs a init script that utimately starts X server

 > Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
 > ---
 > Changes v1 -> v2:
 >     - Simplify the condition per Thomas's suggestion

 > Changes v2 -> v3: (Suggested by Yann)
 > 	- Revert indent added in original patch
 > 	- Keep the original number of patches

Committed to 2023.02.x, 2023.05.x and 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v3 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk
  2023-09-15 22:27     ` [Buildroot] [PATCH v3 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk Yanghao Cheng
@ 2023-09-24 21:07       ` Peter Korsgaard
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2023-09-24 21:07 UTC (permalink / raw)
  To: Yanghao Cheng; +Cc: Yanghao Cheng, buildroot

>>>>> "Yanghao" == Yanghao Cheng <yanghaobillcheng@gmail.com> writes:

 > From: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
 > Does not install systemd unit if nodm or xdm is enabled.

 > Signed-off-by: Yanghao Cheng <yanghao.cheng@aioi-atg.com>
 > ---
 > Changes v1 -> v2:
 >     - Simplify the condition per Thomas's suggestion

 > Changes v2 -> v3: (Suggested by Yann)
 > 	- Revert indent added in original patch
 > 	- Keep the original number of patches

Committed to 2023.02.x, 2023.05.x and 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-09-24 21:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 23:50 [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts Yanghao Cheng
2023-09-14 23:50 ` [Buildroot] [PATCH 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
2023-09-15 10:21 ` [Buildroot] [PATCH 1/2] package/xserver_xorg-server: fix init script conflicts Thomas Petazzoni via buildroot
2023-09-15 17:24 ` [Buildroot] [PATCH v2 1/3] " Yanghao Cheng
2023-09-15 17:24   ` [Buildroot] [PATCH v2 2/3] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk, and not install systemd unit if nodm or xdm is enabled Yanghao Cheng
2023-09-15 17:24   ` [Buildroot] [PATCH v2 3/3] package/xserver_xorg-server: fix init script conflicts Yanghao Cheng
2023-09-15 21:19   ` [Buildroot] [PATCH v2 1/3] " Yann E. MORIN
2023-09-15 22:27   ` [Buildroot] [PATCH v3 1/2] " Yanghao Cheng
2023-09-15 22:27     ` [Buildroot] [PATCH v3 2/2] package/xserver_xorg-server: Add condition in xserver_xorg-server.mk Yanghao Cheng
2023-09-24 21:07       ` Peter Korsgaard
2023-09-16 13:19     ` [Buildroot] [PATCH v3 1/2] package/xserver_xorg-server: fix init script conflicts Yann E. MORIN
2023-09-18 17:12       ` Yanghao Cheng
2023-09-24 21:06     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox