File s_fix_systemd_detection.patch of Package golang-github-kardianos-service

Author: John Paul Adrian Glaubitz <glaubitz@suse.com>
Date: 2020-04-28
Description:
 Use /run/systemd for systemd detection as the system sub-folder
 is not available in the build chroot.

diff -Nru service-1.0.0+git20190208.56787a3.orig/service_systemd_linux.go service-1.0.0+git20190208.56787a3/service_systemd_linux.go
--- service-1.0.0+git20190208.56787a3.orig/service_systemd_linux.go	2019-02-08 18:29:24.000000000 +0100
+++ service-1.0.0+git20190208.56787a3/service_systemd_linux.go	2020-04-28 11:04:20.155553358 +0200
@@ -17,7 +17,7 @@
 )
 
 func isSystemd() bool {
-	if _, err := os.Stat("/run/systemd/system"); err == nil {
+	if _, err := os.Stat("/run/systemd"); err == nil {
 		return true
 	}
 	return false
openSUSE Build Service is sponsored by