Makefile: Store OS release in /usr/lib/os-release
authorChris Lesiak <chris.lesiak@licor.com>
Tue, 23 Jan 2018 23:13:50 +0000 (17:13 -0600)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 28 Jan 2018 20:45:19 +0000 (21:45 +0100)
It is recommended that vendor trees store OS release information
in /usr/lib/os-release and that /etc/os-release should be a relative
symlink to /usr/lib/os-release.

For more details, see:

http://0pointer.de/public/systemd-man/os-release.html

[Peter: don't hide command, simplify ln invocation]
Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile

index 7d8ab51a8cabea83f9936c8365f53e7a9b8e2744..1825d0af8188fa90ae2ec66b1bd9c481fa4bc336 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -729,7 +729,8 @@ endif
                echo "ID=buildroot"; \
                echo "VERSION_ID=$(BR2_VERSION)"; \
                echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
-       ) >  $(TARGET_DIR)/etc/os-release
+       ) >  $(TARGET_DIR)/usr/lib/os-release
+       ln -sf ../usr/lib/os-release $(TARGET_DIR)/etc
 
        @$(call MESSAGE,"Sanitizing RPATH in target tree")
        $(TOPDIR)/support/scripts/fix-rpath target