Skip to contentSkip to conversation

bluez5_utils: Make systemd link correctly

PATCH New Trent Piepho 3 participants 4 messages Feb 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluez5_utils: Make systemd link correctly

The link in /etc/systemd/system/, named dbus-org.bluez.service, pointing to ../../../../usr/lib/systemd/system/bluetooth.service has one too many ".." in it. Likely the target was copied from the other link in /etc/systemd/system/bluetooth.target.wants/, which is one level deeper.

Adjust link to be correct.

---
 package/bluez5_utils/bluez5_utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/bluez5_utils/bluez5_utils.mk +1 -1
index 0634ec9f6f..395340a3e6 100644
@@ -116,7 +116,7 @@ define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
 	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
 		$(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
-	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
+	ln -fs ../../../usr/lib/systemd/system/bluetooth.service \
 		$(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
 endef
 
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/1 bluez5_utils: Make systemd link correctly

Trent, All,

On 2018-02-27 13:21 -0800, Trent Piepho spake thusly:

Quoted 8 lines

The link in /etc/systemd/system/, named dbus-org.bluez.service, pointing to ../../../../usr/lib/systemd/system/bluetooth.service has one too many ".." in it. Likely the target was copied from the other link in /etc/systemd/system/bluetooth.target.wants/, which is one level deeper.

Adjust link to be correct.

However, this should not have any real problem on the target: this succession of '..' will eventually reach / which has its own '..' pointing back to itself; that is /.. points to / and so everything should just work as expected. Only on the build machine does that have an impact.

So, can you confirm that this is not fixing any runtime issue, but just making the symlink "less incorrect"?

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 package/bluez5_utils/bluez5_utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/bluez5_utils/bluez5_utils.mk +1 -1
index 0634ec9f6f..395340a3e6 100644
@@ -116,7 +116,7 @@ define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
 	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
 		$(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
-	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
+	ln -fs ../../../usr/lib/systemd/system/bluetooth.service \
 		$(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
 endef
 
Signature · 6 lines
2.14.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 bluez5_utils: Make systemd link correctly

Quoted 12 lines · Yann E. MORIN

On 2018-02-27 13:21 -0800, Trent Piepho spake thusly:

Quoted 8 lines

The link in /etc/systemd/system/, named dbus-org.bluez.service, pointing to ../../../../usr/lib/systemd/system/bluetooth.service has one too many ".." in it. Likely the target was copied from the other link in /etc/systemd/system/bluetooth.target.wants/, which is one level deeper.

Adjust link to be correct.

Quoted 8 lines

However, this should not have any real problem on the target: this succession of '..' will eventually reach / which has its own '..' pointing back to itself; that is /.. points to / and so everything should just work as expected. Only on the build machine does that have an impact.

So, can you confirm that this is not fixing any runtime issue, but just making the symlink "less incorrect"?

Yes, it works on the target fs as the link bottoms out at /. It just breaks on the build machine to look at the file or if one runs a script looking for broken symlinks after discovering all the *.wants links are broken...

#3 lore raw

PATCH 1/1 bluez5_utils: Make systemd link correctly

In reply to Trent Piepho
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Trent" == Trent Piepho <[email protected]> writes:

The link in /etc/systemd/system/, named dbus-org.bluez.service, pointing to ../../../../usr/lib/systemd/system/bluetooth.service has one too many ".." in it. Likely the target was copied from the other link in /etc/systemd/system/bluetooth.target.wants/, which is one level deeper.

Adjust link to be correct.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard