[OE-core] [PATCH] sysstat: Fixed the compiling error when configured with '--enable-install-cron'

Haiqing Bai Haiqing.Bai at windriver.com
Thu Apr 4 03:18:14 UTC 2019


Remove the handling of enable/disable sysstat.service self-start in Makefile.in.
The code will trigger below error when cross compiling with
'--enable-install-cron':
| if [ -x "/path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl" ]; then \
|       /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl enable sysstat.service; \
| fi
| Started /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl enable sysstat.service
| Try to find location of sysstat.service...
| 'sysstat.service' couldn't be found; exiting with error

It's better to let user enable/disable the service with
'systemctl enable/disable sysstat.service'

Signed-off-by: Haiqing Bai <Haiqing.Bai at windriver.com>
---
 ...code-of-handling-enable-disable-self-star.patch | 55 ++++++++++++++++++++++
 meta/recipes-extended/sysstat/sysstat_11.7.1.bb    |  3 +-
 2 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch

diff --git a/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch b/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
new file mode 100644
index 0000000..1d099c9
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
@@ -0,0 +1,55 @@
+From 85813d1648b03ba0497635c45e90d7edf4dc204c Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai at windriver.com>
+Date: Fri, 29 Mar 2019 11:00:09 +0800
+Subject: [PATCH] Remove the code of handling enable/disable self-start service
+ in Makefile.in
+
+Remove the handling of enable/disable sysstat.service self-start in Makefile.in.
+The code will trigger below error when cross compiling with
+'--enable-install-cron':
+| if [ -x "/path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl" ]; then \
+|       /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl enable sysstat.service; \
+| fi
+| Started /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl enable sysstat.service
+| Try to find location of sysstat.service...
+| 'sysstat.service' couldn't be found; exiting with error
+
+It's better for user to enable/disable the service with
+'systemctl enable/disable sysstat.service'
+
+Upstream-Status: Inappropriate [ embedded specific ]
+
+Signed-off-by: Haiqing Bai <Haiqing.Bai at windriver.com>
+---
+ Makefile.in | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index edaea3f..2186155 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -454,11 +454,6 @@ endif
+ 			fi \
+ 		fi \
+ 	fi
+-ifeq ($(COPY_ONLY),n)
+-	if [ -x "$(SYSTEMCTL)" ]; then \
+-		$(SYSTEMCTL) enable sysstat.service; \
+-	fi
+-endif
+ 
+ uninstall_man:
+ ifeq ($(INSTALL_DOC),y)
+@@ -541,9 +536,6 @@ ifeq ($(COPY_ONLY),n)
+ 		@echo "USER'S CRONTAB SAVED IN CURRENT DIRECTORY (USING .old SUFFIX)." ; \
+ 		-su $(CRON_OWNER) -c "crontab -r" ; \
+ 	fi
+-	if [ -x $(SYSTEMCTL) ]; then \
+-		$(SYSTEMCTL) disable sysstat.service; \
+-	fi
+ endif
+ 	if [ -n "$(SYSTEMD_UNIT_DIR)" -a -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) ]; then \
+ 		rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysstat.service; \
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/sysstat/sysstat_11.7.1.bb b/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
index 86738e7..26be619 100644
--- a/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
+++ b/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
@@ -2,7 +2,8 @@ require sysstat.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
 
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch \
+	file://0001-Remove-the-code-of-handling-enable-disable-self-star.patch"
 
 SRC_URI[md5sum] = "bdcda7c9048c7c22fb1f30f75285d13d"
 SRC_URI[sha256sum] = "303a595b1af0330b183a0f1febfccf89f183b9575ae0562b91fdb876f3ef1feb"
-- 
1.9.1



More information about the Openembedded-core mailing list