Skip to contentSkip to conversation

systemd cleanups v2

Buildroot New Mike Williams 2 participants 36 messages Mar 20, 2015 – Apr 10, 2015

lore
Share & tools
lore
#0 lore raw

Changes:
v1 -> v2:
* numerous packages adjusted to put udev rules in /usr/lib instead of /lib
* use relative symlinks everywhere
* avahi: AVAHI_EXTRA_CFLAGS -> AVAHI_CFLAGS
* OpenSSH: enable by linking to multi-user.target.wants in /etc instead of /usr/lib
* systemd: create dir /etc/systemd/system/getty.target.wants
* thttpd: add systemd support, fix line wraps from separate v1 patch
* gpsd: fix systemd and udev support
* lighttpd: use upstream service file
* wpa_supplicant: rolled into series from separate patch

#1 lore raw

PATCH v2 1/25 lighttpd: use upstream systemd service file

---
 package/lighttpd/lighttpd.mk      |  6 +++---
 package/lighttpd/lighttpd.service | 10 ----------
 2 files changed, 3 insertions(+), 13 deletions(-)
 delete mode 100644 package/lighttpd/lighttpd.service
package/lighttpd/lighttpd.mk +3 -3
index 8f34561..cdbf91d 100644
@@ -84,12 +84,12 @@ define LIGHTTPD_INSTALL_INIT_SYSV
 endef
 
 define LIGHTTPD_INSTALL_INIT_SYSTEMD
-	$(INSTALL) -D -m 0644 package/lighttpd/lighttpd.service \
-		$(TARGET_DIR)/etc/systemd/system/lighttpd.service
+	$(INSTALL) -D -m 0644 $(@D)/doc/systemd/lighttpd.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/lighttpd.service
 
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
-	ln -fs ../lighttpd.service \
+	ln -fs ../../../../usr/lib/systemd/lighttpd.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
 endef
 
package/lighttpd/lighttpd.service deleted +0 -10
deleted file mode 100644
index 0ca5357..0000000
@@ -1,10 +0,0 @@
-[Unit]
-Description=Lighttpd Web Server
-After=network.target
-
-[Service]
-ExecStart=/usr/sbin/lighttpd-angel -f /etc/lighttpd/lighttpd.conf -D
-ExecReload=/bin/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target
Signature · 1 line
2.1.0
#2 lore raw

PATCH v2 2/25 ntp: move systemd service file to /usr/lib

In reply to Mike Williams
---
 package/ntp/ntp.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/ntp/ntp.mk +3 -2
index 7d5644a..36dea79 100644
@@ -71,9 +71,10 @@ define NTP_INSTALL_INIT_SYSV
 endef
 
 define NTP_INSTALL_INIT_SYSTEMD
-	$(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/etc/systemd/system/ntpd.service
+	$(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs ../ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
+	ln -fs ../../../../usr/lib/systemd/system/ntpd.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
 endef
 endif
 
Signature · 1 line
2.1.0
#3 lore raw

PATCH v2 3/25 openvmtools: move systemd service to /usr/lib

In reply to Mike Williams
---
 package/openvmtools/openvmtools.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/openvmtools/openvmtools.mk +2 -2
index e0ec6d6..f8230b2 100644
@@ -67,9 +67,9 @@ endef
 
 define OPENVMTOOLS_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/openvmtools/vmtoolsd.service \
-		$(TARGET_DIR)/etc/systemd/system/vmtoolsd.service
+		$(TARGET_DIR)/usr/lib/systemd/system/vmtoolsd.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs ../vmtoolsd.service \
+	ln -fs ../../../../usr/lib/systemd/system/vmtoolsd.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vmtoolsd.service
 endef
 
Signature · 1 line
2.1.0
#4 lore raw

PATCH v2 4/25 psplash: move systemd service files to /usr/lib

In reply to Mike Williams
---
 package/psplash/psplash.mk | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
package/psplash/psplash.mk +7 -5
index 5901547..0e78c8c 100644
@@ -10,16 +10,18 @@ PSPLASH_LICENSE = GPLv2+
 PSPLASH_AUTORECONF = YES
 
 define PSPLASH_INSTALL_INIT_SYSTEMD
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
 	$(INSTALL) -D -m 644 package/psplash/psplash-start.service \
-		$(TARGET_DIR)/etc/systemd/system/psplash-start.service
-	$(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
-	ln -sf  ../psplash-start.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service
+	$(INSTALL) -d $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants
+	ln -sf  ../../../../usr/lib/systemd/system/psplash-start.service \
 		 $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/
 
 	$(INSTALL) -D -m 644 package/psplash/psplash-quit.service \
-		$(TARGET_DIR)/etc/systemd/system/psplash-quit.service
+		$(TARGET_DIR)/usr/lib/systemd/system/psplash-quit.service
 	$(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -sf  ../psplash-quit.service \
+	ln -sf  ../../../../usr/lib/systemd/system/psplash-quit.service \
 		 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
 endef
 
Signature · 1 line
2.1.0
#5 lore raw

PATCH v2 4/25 psplash: move systemd service files to /usr/lib

Dear Mike Williams,

package/psplash/psplash.mk PSPLASH_LICENSE = GPLv2+ · line 17

Quoted 9 lines · Mike Williams

define PSPLASH_INSTALL_INIT_SYSTEMD

package/psplash/psplash.mk +4 -3
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
 	$(INSTALL) -D -m 644 package/psplash/psplash-start.service \
-		$(TARGET_DIR)/etc/systemd/system/psplash-start.service
-	$(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
-	ln -sf  ../psplash-start.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service
+	$(INSTALL) -d $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants

Why are we creating this directory?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v2 4/25 psplash: move systemd service files to /usr/lib

Mike,

Ping ?

Thomas

Quoted 19 lines · Thomas Petazzoni

Dear Mike Williams,

package/psplash/psplash.mk PSPLASH_LICENSE = GPLv2+ · line 17

Quoted 9 lines · Mike Williams

define PSPLASH_INSTALL_INIT_SYSTEMD

package/psplash/psplash.mk +4 -3
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
 	$(INSTALL) -D -m 644 package/psplash/psplash-start.service \
-		$(TARGET_DIR)/etc/systemd/system/psplash-start.service
-	$(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
-	ln -sf  ../psplash-start.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service
+	$(INSTALL) -d $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants

Why are we creating this directory?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH v2 4/25 psplash: move systemd service files to /usr/lib

Thomas,

I'll take a look at all of those patches with comments next week, I'm working on another project for a bit.

Thanks,
Mike

Quoted 33 lines · Thomas Petazzoni

Mike,

Ping ?

Thomas

Quoted 14 lines · Thomas Petazzoni

Dear Mike Williams,

package/psplash/psplash.mk PSPLASH_LICENSE = GPLv2+ · line 17

Quoted 9 lines · Mike Williams

define PSPLASH_INSTALL_INIT_SYSTEMD

package/psplash/psplash.mk +4 -3
+   mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
    $(INSTALL) -D -m 644 package/psplash/psplash-start.service \
-           $(TARGET_DIR)/etc/systemd/system/psplash-start.service
-   $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
-   ln -sf  ../psplash-start.service \
+           $(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service
+   $(INSTALL) -d $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants
Quoted 5 lines

Why are we creating this directory?

Thanks,

Thomas

--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#8 lore raw

PATCH v2 5/25 openntpd: move systemd service files to /usr/lib

In reply to Mike Williams
---
 package/openntpd/openntpd.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/openntpd/openntpd.mk +2 -2
index 60f025c..41e3399 100644
@@ -11,9 +11,9 @@ OPENNTPD_LICENSE_FILES = COPYING
 
 define OPENNTPD_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 0644 package/openntpd/ntpd.service \
-		$(TARGET_DIR)/etc/systemd/system/ntpd.service
+		$(TARGET_DIR)/usr/lib/systemd/system/ntpd.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs ../ntpd.service \
+	ln -fs ../../../../usr/lib/systemd/system/ntpd.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
 endef
 
Signature · 1 line
2.1.0
#9 lore raw

PATCH v2 6/25 dbus: move systemd service files to /usr/lib

In reply to Mike Williams
---
 package/dbus/dbus.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dbus/dbus.mk +1 -1
index 200084f..c810800 100644
@@ -54,7 +54,7 @@ endif
 ifeq ($(BR2_INIT_SYSTEMD),y)
 DBUS_CONF_OPTS += \
 	--enable-systemd \
-	--with-systemdsystemunitdir=/lib/systemd/system
+	--with-systemdsystemunitdir=/usr/lib/systemd/system
 DBUS_DEPENDENCIES += systemd
 else
 DBUS_CONF_OPTS += --disable-systemd
Signature · 1 line
2.1.0
#10 lore raw

PATCH v2 7/25 irqbalance: move systemd service file to /usr/lib

In reply to Mike Williams
---
 package/irqbalance/irqbalance.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/irqbalance/irqbalance.mk +2 -2
index e3ef0bb..4e6b181 100644
@@ -26,9 +26,9 @@ endef
 
 define IRQBALANCE_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/irqbalance/irqbalance.service \
-		$(TARGET_DIR)/etc/systemd/system/irqbalance.service
+		$(TARGET_DIR)/usr/lib/systemd/system/irqbalance.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs ../irqbalance.service \
+	ln -fs ../../../../usr/lib/systemd/system/irqbalance.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/irqbalance.service
 endef
 
Signature · 1 line
2.1.0
#11 lore raw

PATCH v2 8/25 openssh: move systemd service files to /usr/lib

In reply to Mike Williams
---
 package/openssh/openssh.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/openssh/openssh.mk +2 -2
index 08f3fa0..24af079 100644
@@ -36,9 +36,9 @@ endif
 
 define OPENSSH_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/openssh/sshd.service \
-		$(TARGET_DIR)/etc/systemd/system/sshd.service
+		$(TARGET_DIR)/usr/lib/systemd/system/sshd.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs ../sshd.service \
+	ln -fs ../../../../usr/lib/systemd/system/sshd.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service
 endef
 
Signature · 1 line
2.1.0
#12 lore raw

PATCH v2 9/25 rsyslog: fix systemd service installation

In reply to Mike Williams
---
 package/rsyslog/rsyslog.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/rsyslog/rsyslog.mk +3 -3
index c6758eb..e3c9d1a 100644
@@ -65,11 +65,11 @@ define RSYSLOG_INSTALL_INIT_SYSV
 endef
 
 define RSYSLOG_INSTALL_INIT_SYSTEMD
-	ln -sf /lib/systemd/system/rsyslog.service \
+	ln -fs ../../../usr/lib/systemd/system/rsyslog.service \
 		$(TARGET_DIR)/etc/systemd/system/syslog.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -sf ../syslog.service \
-		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/syslog.service
+	ln -fs ../../../../usr/lib/systemd/system/rsyslog.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rsyslog.service
 endef
 
 define RSYSLOG_INSTALL_CONF
Signature · 1 line
2.1.0
#13 lore raw

PATCH v2 9/25 rsyslog: fix systemd service installation

Dear Mike Williams,

package/rsyslog/rsyslog.mk define RSYSLOG_INSTALL_INIT_SYSV · line 69

Quoted 4 lines · Mike Williams

define RSYSLOG_INSTALL_INIT_SYSTEMD

package/rsyslog/rsyslog.mk +1 -1
-	ln -sf /lib/systemd/system/rsyslog.service \
+	ln -fs ../../../usr/lib/systemd/system/rsyslog.service \
 		$(TARGET_DIR)/etc/systemd/system/syslog.service

Are you sure?

Isn't the syslog.service -> rsyslog.service symbolic link meant to have kind of a "compatibility" service name? If so, shouldn't this symlink be in /usr/lib/systemd/system/ instead ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#14 lore raw

PATCH v2 9/25 rsyslog: fix systemd service installation

Thomas,

Quoted 9 lines · Thomas Petazzoni

Dear Mike Williams,

package/rsyslog/rsyslog.mk define RSYSLOG_INSTALL_INIT_SYSV · line 69

Quoted 4 lines · Mike Williams

define RSYSLOG_INSTALL_INIT_SYSTEMD

package/rsyslog/rsyslog.mk +1 -1
-     ln -sf /lib/systemd/system/rsyslog.service \
+     ln -fs ../../../usr/lib/systemd/system/rsyslog.service \
              $(TARGET_DIR)/etc/systemd/system/syslog.service
Quoted 5 lines

Are you sure?

Isn't the syslog.service -> rsyslog.service symbolic link meant to have kind of a "compatibility" service name? If so, shouldn't this symlink be in /usr/lib/systemd/system/ instead ?

I enabled it on the target with 'systemctl enable' and duplicated the steps in the .mk file

# systemctl enable rsyslog.service
Created symlink from /etc/systemd/system/syslog.service to
/usr/lib/systemd/system/rsyslog.service.
Created symlink from
/etc/systemd/system/multi-user.target.wants/rsyslog.service to
/usr/lib/systemd/system/rsyslog.service.

However, we should add a mkdir -p /etc/systemd/system before. Would you like me to send a new patch?

Mike

#15 lore raw

PATCH v2 10/25 dropbear: move systemd service file to /usr/lib

In reply to Mike Williams
---
 package/dropbear/dropbear.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/dropbear/dropbear.mk +2 -2
index f2ae403..bc65d69 100644
@@ -53,9 +53,9 @@ endef
 
 define DROPBEAR_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/dropbear/dropbear.service \
-		$(TARGET_DIR)/lib/systemd/system/dropbear.service
+		$(TARGET_DIR)/usr/lib/systemd/system/dropbear.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs /lib/systemd/system/dropbear.service \
+	ln -fs ../../../../usr/lib/systemd/system/dropbear.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dropbear.service
 endef
 
Signature · 1 line
2.1.0
#16 lore raw

PATCH v2 11/25 postgresql: move systemd service file to /usr/lib

In reply to Mike Williams
---
 package/postgresql/postgresql.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/postgresql/postgresql.mk +2 -2
index 7dc3f0b..8e07cf0 100644
@@ -85,9 +85,9 @@ endef
 
 define POSTGRESQL_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/postgresql/postgresql.service \
-		$(TARGET_DIR)/etc/systemd/system/postgresql.service
+		$(TARGET_DIR)/usr/lib/systemd/system/postgresql.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs ../postgresql.service \
+	ln -fs ../../../../usr/lib/systemd/system/postgresql.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/postgresql.service
 endef
 
Signature · 1 line
2.1.0
#17 lore raw

PATCH v2 12/25 libiio: move systemd service file to /usr/lib

In reply to Mike Williams
---
 package/libiio/libiio.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/libiio/libiio.mk +2 -2
index abcddba..7082e89 100644
@@ -41,8 +41,8 @@ endef
 define LIBIIO_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 	$(INSTALL) -D -m 0644 $(@D)/debian/iiod.service \
-		$(TARGET_DIR)/lib/systemd/system/iiod.service
-	ln -fs /lib/systemd/system/iiod.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/iiod.service
+	ln -fs ../../../../usr/lib/systemd/system/iiod.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/iiod.service
 endef
 endif
Signature · 1 line
2.1.0
#18 lore raw

PATCH v2 13/25 dhcp: move systemd service file to /usr/lib

In reply to Mike Williams
---
 package/dhcp/dhcp.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/dhcp/dhcp.mk +2 -2
index f01a5fa..e6465ed 100644
@@ -78,11 +78,11 @@ endef
 ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
 define DHCP_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/dhcp/dhcpd.service \
-		$(TARGET_DIR)/lib/systemd/system/dhcpd.service
+		$(TARGET_DIR)/usr/lib/systemd/system/dhcpd.service
 
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
-	ln -sf ../../../../lib/systemd/system/dhcpd.service \
+	ln -sf ../../../../usr/lib/systemd/system/dhcpd.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpd.service
 
 	echo "d /var/lib/dhcp 0755 - - - -" > \
Signature · 1 line
2.1.0
#19 lore raw

PATCH v2 14/25 kodi: move systemd service file to /usr/lib

In reply to Mike Williams
---
 package/kodi/kodi.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/kodi/kodi.mk +2 -2
index f40fc31..e0d49e6 100644
@@ -256,11 +256,11 @@ endef
 
 define KODI_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/kodi/kodi.service \
-		$(TARGET_DIR)/etc/systemd/system/kodi.service
+		$(TARGET_DIR)/usr/lib/systemd/system/kodi.service
 
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
-	ln -fs ../kodi.service \
+	ln -fs ../../../../usr/lib/systemd/system/kodi.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/kodi.service
 endef
 
Signature · 1 line
2.1.0
#20 lore raw

PATCH v2 15/25 modem-manager: move udev rules to /usr/lib

In reply to Mike Williams
---
 package/modem-manager/modem-manager.mk | 2 ++
 1 file changed, 2 insertions(+)
package/modem-manager/modem-manager.mk +2 -0
index a6e1b36..ce282b0 100644
@@ -12,6 +12,8 @@ MODEM_MANAGER_LICENSE_FILES = COPYING
 MODEM_MANAGER_DEPENDENCIES = host-pkgconf udev dbus-glib host-intltool
 MODEM_MANAGER_INSTALL_STAGING = YES
 
+MODEM_MANAGER_CONF_OPTS += --with-udev-base-dir=/usr/lib/udev/
+
 ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBQMI),y)
 	MODEM_MANAGER_DEPENDENCIES += libqmi
 	MODEM_MANAGER_CONF_OPTS += --with-qmi
Signature · 1 line
2.1.0
#21 lore raw

PATCH v2 16/25 usbmount: move udev rules to /usr/lib

In reply to Mike Williams
---
 package/usbmount/usbmount.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/usbmount/usbmount.mk +1 -1
index 9e893c8..54fcffe 100644
@@ -19,7 +19,7 @@ define USBMOUNT_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink 	\
 		$(TARGET_DIR)/etc/usbmount/usbmount.d/00_remove_model_symlink
 
-	$(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules
+	$(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/usr/lib/udev/rules.d/usbmount.rules
 	$(INSTALL) -m 0644 -D $(@D)/usbmount.conf $(TARGET_DIR)/etc/usbmount/usbmount.conf
 
 	mkdir -p $(addprefix $(TARGET_DIR)/media/usb,0 1 2 3 4 5 6 7)
Signature · 1 line
2.1.0
#22 lore raw

PATCH v2 17/25 bcache-tools: move udev rules to /usr/lib

In reply to Mike Williams
---
 package/bcache-tools/bcache-tools.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/bcache-tools/bcache-tools.mk +2 -2
index 666a02f..7f11528 100644
@@ -17,10 +17,10 @@ define BCACHE_TOOLS_BUILD_CMDS
 endef
 
 # The bcache-tools Makefile expects the man8 directory to exist
-# expects the /lib/udev/rules.d directory to exist.
+# expects the /usr/lib/udev/rules.d directory to exist.
 define BCACHE_TOOLS_CREATE_MISSING_DIRS
 	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
-	$(INSTALL) -m 0755 -d $(TARGET_DIR)/lib/udev/rules.d
+	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/lib/udev/rules.d
 endef
 
 BCACHE_TOOLS_PRE_INSTALL_TARGET_HOOKS += BCACHE_TOOLS_CREATE_MISSING_DIRS
Signature · 1 line
2.1.0
#23 lore raw

PATCH v2 18/25 triggerhappy: move udev rules to /usr/lib

In reply to Mike Williams
---
 package/triggerhappy/triggerhappy.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/triggerhappy/triggerhappy.mk +1 -1
index d3dfc6a..bff6a7a 100644
@@ -18,7 +18,7 @@ endef
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 define TRIGGERHAPPY_INSTALL_UDEV_RULE
 	$(INSTALL) -D -m 0644 $(@D)/udev/triggerhappy-udev.rules \
-		$(TARGET_DIR)/lib/udev/rules.d/triggerhappy.rules
+		$(TARGET_DIR)/usr/lib/udev/rules.d/triggerhappy.rules
 endef
 endif
 
Signature · 1 line
2.1.0
#24 lore raw

PATCH v2 19/25 systemd: change install path to /usr/lib

In reply to Mike Williams

/usr/lib is the default path for upstream systemd.

---
 package/systemd/systemd.mk | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
package/systemd/systemd.mk +13 -13
index 98bda02..b2e69cc 100644
@@ -27,8 +27,6 @@ SYSTEMD_DEPENDENCIES += busybox
 endif
 
 SYSTEMD_CONF_OPTS += \
-	--with-rootprefix= \
-	--with-rootlibdir=/lib \
 	--enable-static=no \
 	--disable-manpages \
 	--disable-selinux \
@@ -107,9 +105,9 @@ else
 SYSTEMD_CONF_OPTS += --disable-networkd
 define SYSTEMD_INSTALL_SERVICE_NETWORK
 	$(INSTALL) -D -m 644 package/systemd/network.service \
-		$(TARGET_DIR)/etc/systemd/system/network.service
+		$(TARGET_DIR)/usr/lib/systemd/system/network.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -fs ../network.service \
+	ln -fs ../../../../usr/lib/systemd/system/network.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service
 endef
 endif
@@ -118,7 +116,7 @@ ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
 SYSTEMD_CONF_OPTS += --enable-timesyncd
 define SYSTEMD_INSTALL_SERVICE_TIMESYNC
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
-	ln -sf ../../../../lib/systemd/system/systemd-timesyncd.service \
+	ln -sf ../../../../usr/lib/systemd/system/systemd-timesyncd.service \
 		$(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
 endef
 else
@@ -144,12 +142,13 @@ SYSTEMD_MAKE_OPTS += LIBS=-lrt
 SYSTEMD_MAKE_OPTS += LDFLAGS+=-ldl
 
 define SYSTEMD_INSTALL_INIT_HOOK
-	ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init
-	ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt
-	ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff
-	ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot
+	ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init
+	ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt
+	ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff
+	ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/reboot
 
-	ln -fs ../../../lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
+	ln -fs ../../../usr/lib/systemd/system/multi-user.target \
+		$(TARGET_DIR)/etc/systemd/system/default.target
 endef
 
 define SYSTEMD_INSTALL_MACHINEID_HOOK
@@ -157,14 +156,14 @@ define SYSTEMD_INSTALL_MACHINEID_HOOK
 endef
 
 define SYSTEMD_SANITIZE_PATH_IN_UNITS
-	find $(TARGET_DIR)/lib/systemd/system -name '*.service' \
+	find $(TARGET_DIR)/usr/lib/systemd/system -name '*.service' \
 		-exec $(SED) 's,$(HOST_DIR),,g' {} \;
 endef
 
 # Disable ldconfig.service, as /sbin/ldconfig is not available when the
 # target is built with a glibc-based toolchain.
 define SYSTEMD_DISABLE_LDCONFIG_SERVICE_HOOK
-	rm -f $(TARGET_DIR)/lib/systemd/system/sysinit.target.wants/ldconfig.service
+	rm -f $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants/ldconfig.service
 endef
 
 SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
@@ -199,7 +198,8 @@ define SYSTEMD_INSTALL_SERVICE_TTY
 	else \
 		SERVICE="serial-getty"; \
 	fi; \
-	ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/getty.target.wants
+	ln -fs ../../../../usr/lib/systemd/system/$${SERVICE}@.service \
 		$(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service
 endef
 endif
Signature · 1 line
2.1.0
#25 lore raw

PATCH v2 20/25 thttpd: add systemd service file

In reply to Mike Williams

Based on Arch service file, adjusted to point to /usr/sbin.

---
 package/thttpd/thttpd.mk      |  8 ++++++++
 package/thttpd/thttpd.service | 10 ++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 package/thttpd/thttpd.service
package/thttpd/thttpd.mk +8 -0
index 1a028c8..5b4b0c4 100644
@@ -44,4 +44,12 @@ define THTTPD_INSTALL_INIT_SYSV
 	$(SED) 's:/usr/local/sbin:/usr/sbin:g' $(TARGET_DIR)/etc/init.d/S90thttpd
 endef
 
+define THTTPD_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0644 package/thttpd/thttpd.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/thttpd.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
+	ln -fs ../../../../usr/lib/systemd/system/thttpd.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/thttpd.service
+endef
+
 $(eval $(autotools-package))
package/thttpd/thttpd.service new file +10 -0
new file mode 100644
index 0000000..e3c93e7
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tiny HTTP Daemon
+
+[Service]
+PIDFile=/run/thttpd.pid
+ExecStart=/usr/sbin/thttpd -D -C /etc/thttpd.conf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
2.1.0
#26 lore raw

PATCH v2 21/25 usb_modeswitch: fix udev location

In reply to Mike Williams
---
 package/usb_modeswitch/0001-fix-udev-location.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/usb_modeswitch/0001-fix-udev-location.patch
package/usb_modeswitch/0001-fix-udev-location.patch new file +13 -0
new file mode 100644
index 0000000..1ae78a2
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 1e77765..f9c8d58 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@ PREFIX      = $(DESTDIR)/usr
+ ETCDIR      = $(DESTDIR)/etc
+ SYSDIR      = $(ETCDIR)/systemd/system
+ UPSDIR      = $(ETCDIR)/init
+-UDEVDIR     = $(DESTDIR)/lib/udev
++UDEVDIR     = $(DESTDIR)/usr/lib/udev
+ SBINDIR     = $(PREFIX)/sbin
+ MANDIR      = $(PREFIX)/share/man/man1
+ VPATH       = jimtcl
Signature · 1 line
2.1.0
#27 lore raw

PATCH v2 22/25 usb_modeswitch_data: install udev rules in /usr/lib

In reply to Mike Williams
---
 .../usb_modeswitch_data/0002-fix-udev-rules-location.patch  | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/usb_modeswitch_data/0002-fix-udev-rules-location.patch
package/usb_modeswitch_data/0002-fix-udev-rules-location.patch new file +13 -0
new file mode 100644
index 0000000..3735af3
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index cd42a6f..1b1ff29 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,7 @@ VERS        = 20150115
+ RM          = /bin/rm -f
+ PREFIX      = $(DESTDIR)/usr
+ ETCDIR      = $(DESTDIR)/etc
+-RULESDIR    = $(DESTDIR)/lib/udev/rules.d
++RULESDIR    = $(DESTDIR)/usr/lib/udev/rules.d
+ 
+ 
+ .PHONY:     clean
Signature · 1 line
2.1.0
#28 lore raw

PATCH v2 23/25 avahi: systemd cleanups

In reply to Mike Williams

* Move service files to /usr/lib/systemd/system/
* Only disable systemd support on non-systemd systems

---
 package/avahi/0002-disable-systemd-support.patch | 22 ----------------------
 package/avahi/avahi.mk                           |  8 ++++++--
 2 files changed, 6 insertions(+), 24 deletions(-)
 delete mode 100644 package/avahi/0002-disable-systemd-support.patch
package/avahi/0002-disable-systemd-support.patch deleted +0 -22
deleted file mode 100644
index 909795a..0000000
@@ -1,22 +0,0 @@
-[PATCH] avahi-daemon: disable systemd support
-
-Disable systemd support as it isn't needed for BR, and uses SOCK_CLOEXEC
-which isn't available on uClibc.
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- avahi-daemon/sd-daemon.h |    1 +
- 1 file changed, 1 insertion(+)
-
-Index: avahi-0.6.27/avahi-daemon/sd-daemon.h
-===================================================================
---- avahi-0.6.27.orig/avahi-daemon/sd-daemon.h
-+++ avahi-0.6.27/avahi-daemon/sd-daemon.h
-@@ -66,6 +66,7 @@ extern "C" {
- 
-   See sd-daemon(7) for more information.
- */
-+#define DISABLE_SYSTEMD /* no systemd support in BR */
- 
- #if __GNUC__ >= 4
- #define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
package/avahi/avahi.mk +6 -2
index 10c9915..53bbab7 100644
@@ -88,6 +88,10 @@ AVAHI_DEPENDENCIES = \
 	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
 	host-pkgconf host-gettext
 
+ifneq ($(BR2_PACKAGE_SYSTEMD),y)
+AVAHI_CFLAGS += -DDISABLE_SYSTEMD
+endif
+
 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
 AVAHI_DEPENDENCIES += libdaemon
 else
@@ -185,10 +189,10 @@ ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
 define AVAHI_INSTALL_INIT_SYSTEMD
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
-	ln -fs /lib/systemd/system/avahi-daemon.service \
+	ln -fs ../../../../usr/lib/systemd/system/avahi-daemon.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
 
-	ln -fs /lib/systemd/system/avahi-dnsconfd.service \
+	ln -fs ../../../../usr/lib/systemd/system/avahi-dnsconfd.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service
 
 	$(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
Signature · 1 line
2.1.0
#29 lore raw

PATCH v2 23/25 avahi: systemd cleanups

Dear Mike Williams,

package/avahi/avahi.mk AVAHI_DEPENDENCIES = \ · line 93

Quoted 3 lines · Mike Williams
package/avahi/avahi.mk +3 -0
+ifneq ($(BR2_PACKAGE_SYSTEMD),y)
+AVAHI_CFLAGS += -DDISABLE_SYSTEMD
+endif

Seriously, do you test the patches you send? I really value the contributions you're making around systemd support: it's great to have someone finally picking up this topic and doing some cleanup/refactoring. But please, test your patches at least minimally.

The <pkg>_CFLAGS variable does not exist and has no effect.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#30 lore raw

PATCH v2 23/25 avahi: systemd cleanups

Thomas,

Quoted 4 lines · Thomas Petazzoni

Dear Mike Williams,

On Fri, 20 Mar 2015 15:14:14 -0400, Mike Williams wrote:

Quoted 8 lines

package/avahi/avahi.mk AVAHI_DEPENDENCIES = \ · line 93

Quoted 3 lines
package/avahi/avahi.mk +3 -0
+ifneq ($(BR2_PACKAGE_SYSTEMD),y)
+AVAHI_CFLAGS += -DDISABLE_SYSTEMD
+endif

Seriously, do you test the patches you send? I really value the contributions you're making around systemd support: it's great to have someone finally picking up this topic and doing some cleanup/refactoring. But please, test your patches at least minimally.

Yes, I built, booted it, and verified that systemd started it without error. I mistakenly assumed that meant it the patch was working correctly; I don't use avahi for anything and have no experience with it.

Quoted 1 line

The <pkg>_CFLAGS variable does not exist and has no effect.

I see that now. I fgrep'd for _CFLAGS initially to find out how other packages were doing it, and didn't realize this common convention wasn't part of buildroot.

Quoted 8 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#31 lore raw

PATCH v2 23/25 avahi: systemd cleanups

Dear Mike Williams,

Quoted 9 lines · Mike Williams
Quoted 4 lines

Seriously, do you test the patches you send? I really value the contributions you're making around systemd support: it's great to have someone finally picking up this topic and doing some cleanup/refactoring. But please, test your patches at least minimally.

Yes, I built, booted it, and verified that systemd started it without error. I mistakenly assumed that meant it the patch was working correctly; I don't use avahi for anything and have no experience with it.

Right, I also assumed you tested the systemd case. But here it's the non-systemd case that can be problematic.

Quoted 5 lines
Quoted 1 line

The <pkg>_CFLAGS variable does not exist and has no effect.

I see that now. I fgrep'd for _CFLAGS initially to find out how other packages were doing it, and didn't realize this common convention wasn't part of buildroot.

Right, the <pkg>_CFLAGS variable doesn't mean anything for the Buildroot package infrastructure. You have to do something like:

<pkg>_CFLAGS = $(TARGET_CFLAGS)
...
<pkg>_CFLAGS += -something
...
<pkg>_CONF_ENV += CFLAGS="$(<pkg>_CFLAGS)"

The default value of CFLAGS being $(TARGET_CFLAGS), this allows to add some more flags in a correct fashion.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#32 lore raw

PATCH v2 24/25 wpa_supplicant: install systemd service files

In reply to Mike Williams

Unlike other systemd services, these are not enabled by default, as the most likely configuration is that they will be managed by something like NetworkManager.

---
 package/wpa_supplicant/wpa_supplicant.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)
package/wpa_supplicant/wpa_supplicant.mk +11 -0
index 5a81a91..4b2ec16 100644
@@ -165,4 +165,15 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
 	$(WPA_SUPPLICANT_INSTALL_DBUS)
 endef
 
+define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant.service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211 at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211 at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-wired at .service
+endef
+
 $(eval $(generic-package))
Signature · 1 line
2.1.0
#33 lore raw

PATCH v2 25/25 gpsd: fix udev and systemd support

In reply to Mike Williams

systemd should be enabled based on buildroot configuration, not host systemd presence. SConstruct file had to be patched to install systemd service files in /usr/lib; passed systemd_dir is overridden.

---
 package/gpsd/0004-fix-systemd-service-path.patch | 13 +++++++++++++
 package/gpsd/gpsd.mk                             | 15 ++++++++++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 package/gpsd/0004-fix-systemd-service-path.patch
package/gpsd/0004-fix-systemd-service-path.patch new file +13 -0
new file mode 100644
index 0000000..2f1d8e7
@@ -0,0 +1,13 @@
+diff --git a/SConstruct b/SConstruct
+index 1afd28a..4be0189 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -90,7 +90,7 @@ def _getoutput(cmd, input=None, cwd=None, env=None):
+ # Start by reading configuration variables from the cache
+ opts = Variables('.scons-option-cache')
+ 
+-systemd_dir = '/lib/systemd/system'
++systemd_dir = '/usr/lib/systemd/system'
+ systemd = os.path.exists(systemd_dir)
+ 
+ # Set distribution-specific defaults here
package/gpsd/gpsd.mk +14 -1
index 3e6411b..e662eab 100644
@@ -21,7 +21,14 @@ GPSD_SCONS_OPTS = \
 	prefix=/usr\
 	sysroot=$(STAGING_DIR)\
 	strip=no\
-	python=no
+	python=no\
+	udevdir=/usr/lib/udev
+
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+	GPSD_SCONS_OPTS += systemd=yes
+else
+	GPSD_SCONS_OPTS += systemd=no
+endif
 
 ifeq ($(BR2_PACKAGE_NCURSES),y)
 	GPSD_DEPENDENCIES += ncurses
@@ -213,6 +220,12 @@ define GPSD_INSTALL_INIT_SYSV
 	$(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd
 endef
 
+define GPSD_INSTALL_INIT_SYSTEMD
+	mkdir -p /etc/systemd/system/multi-user.target.wants
+	ln -fs ../../../../usr/lib/systemd/system/gpsd.socket \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+endef
+
 define GPSD_INSTALL_STAGING_CMDS
 	(cd $(@D); \
 		$(GPSD_SCONS_ENV) \
Signature · 1 line
2.1.0
#34 lore raw
In reply to Mike Williams

Dear Mike Williams,

Quoted 11 lines · Mike Williams

Changes:
v1 -> v2:
* numerous packages adjusted to put udev rules in /usr/lib instead of /lib
* use relative symlinks everywhere
* avahi: AVAHI_EXTRA_CFLAGS -> AVAHI_CFLAGS
* OpenSSH: enable by linking to multi-user.target.wants in /etc instead of /usr/lib
* systemd: create dir /etc/systemd/system/getty.target.wants
* thttpd: add systemd support, fix line wraps from separate v1 patch
* gpsd: fix systemd and udev support
* lighttpd: use upstream service file
* wpa_supplicant: rolled into series from separate patch

Next time you may want to use "git format-patch --cover" which generates for you a cover letter that has a list of the patches.

So, I have applied:

c85b3fca39e9a3361a3202037010211566d152fd thttpd: add systemd service file 1c74c8431341006d063f40b7436cc529d4378ae2 wpa_supplicant: install systemd service files af17811662595ad1db0a992a3a7446c79d40d578 kodi: move systemd service file to /usr/lib b054815ee5fd023d7123f35633688eb56c9514d9 dhcp: move systemd service file to /usr/lib 1dd088ca16f4daacad33b8e7c218dc9055c47c97 libiio: move systemd service file to /usr/lib 173f15e62b4539e670690a03e3a1f59a83923656 postgresql: move systemd service file to /usr/lib 3aa96c1e5ad51c9dfb3a50af8ef1fc958d7f655f dropbear: move systemd service file to /usr/lib 6111d478d2ef180eeb80c1a3b42deb625f5594b8 openssh: move systemd service files to /usr/lib 2702ac5016cca013350f6c2d5639c4a4263bfdd3 irqbalance: move systemd service file to /usr/lib 40f0d87374aea8371f1612fca3ed12b4b152f1b7 dbus: move systemd service files to /usr/lib 407e542d777e1de3dca2e6c2e0e87ee7b753b4df openntpd: move systemd service files to /usr/lib ad56242ae3ef6997b7c30b940065ae8f1ba85978 openvmtools: move systemd service to /usr/lib 7afccf677621c557d0db100117833b1dfdf4d071 ntp: move systemd service file to /usr/lib c986d663d77ad50c59f3191d49c51cb4da4d3198 lighttpd: use upstream systemd service file

I have left on the side:

[v2,04/25] psplash: move systemd service files to /usr/lib [v2,09/25] rsyslog: fix systemd service installation [v2,23/25] avahi: systemd cleanups

because I made some comments on them.

And I have also left on the side all the patches moving the udev rules from /lib/udev to /usr/lib/udev because for now, I'm not sure to understand the motivation behind this change, which seems a bit pointless to me at first sight.

For systemd, I do understand the idea of having .service files themselves in /usr and only the symlinks to enable the services in /etc. But for udev, I'm not sure.

Opinions from others are welcome.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#35 lore raw

Thomas,

Quoted 4 lines

And I have also left on the side all the patches moving the udev rules from /lib/udev to /usr/lib/udev because for now, I'm not sure to understand the motivation behind this change, which seems a bit pointless to me at first sight.

Testing using 'udevadm test', udev only searches /etc/udev and /usr/lib/udev, not /lib/udev. eudev is searching all three paths, but I'm not sure if that's a eudev difference or because it is installed to /lib.

udev's path searching behavior is documented here:
http://www.freedesktop.org/software/systemd/man/udev.html

Thanks,
Mike