diff options
| author | Robert Yang <liezhi.yang@windriver.com> | 2024-11-24 04:13:58 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-25 22:23:25 +0000 |
| commit | 6dd306b88d6e16286e7aaa050b631c4dac7fbfd9 (patch) | |
| tree | f82e9273ed9eec3ac4eeae1ca49ffa73305b90a8 /meta | |
| parent | e14835ce9dc2ad16ca5415aece2d5063e777f681 (diff) | |
| download | poky-6dd306b88d6e16286e7aaa050b631c4dac7fbfd9.tar.gz | |
bootchart2: Several fixes
Fixed Ross' comments:
* Add -n to gzip to make the resulting files reproducible, so we don't need to
decompress them.
* Makefile: Let bootchartd.conf use EARLY_PREFIX, so that bootchartd.conf can
install to correct location.
* Set MANDIR and DOCDIR to make the files install to correct location for
bootchart2-native.
(From OE-Core rev: 5354966a92cd522a3312c870aefa239d5c564a9f)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 76 insertions, 3 deletions
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/0001-Makefile-Let-bootchartd.conf-use-EARLY_.patch b/meta/recipes-devtools/bootchart2/bootchart2/0001-Makefile-Let-bootchartd.conf-use-EARLY_.patch new file mode 100644 index 0000000000..8209a776ba --- /dev/null +++ b/meta/recipes-devtools/bootchart2/bootchart2/0001-Makefile-Let-bootchartd.conf-use-EARLY_.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From 0ba0986f1ebc5ac1ad0a3d51e8039dbdccb31c25 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Thu, 14 Nov 2024 07:33:56 +0000 | ||
| 4 | Subject: [PATCH 1/2] Makefile: Let bootchartd.conf use EARLY_PREFIX | ||
| 5 | |||
| 6 | So that bootchartd.conf can install to correct location when cross build. | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [https://github.com/xrmx/bootchart/pull/105] | ||
| 9 | |||
| 10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 11 | --- | ||
| 12 | Makefile | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/Makefile b/Makefile | ||
| 16 | index b99b141..99a3ec7 100644 | ||
| 17 | --- a/Makefile | ||
| 18 | +++ b/Makefile | ||
| 19 | @@ -100,7 +100,7 @@ install-chroot: | ||
| 20 | |||
| 21 | install-collector: all install-chroot | ||
| 22 | install -m 755 -D bootchartd $(DESTDIR)$(EARLY_PREFIX)/sbin/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX) | ||
| 23 | - install -m 644 -D bootchartd.conf $(DESTDIR)/etc/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).conf | ||
| 24 | + install -m 644 -D bootchartd.conf $(DESTDIR)$(EARLY_PREFIX)/etc/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).conf | ||
| 25 | install -m 755 -D bootchart-collector $(DESTDIR)$(PKGLIBDIR)/$(PROGRAM_PREFIX)bootchart$(PROGRAM_SUFFIX)-collector | ||
| 26 | |||
| 27 | install-docs: | ||
| 28 | -- | ||
| 29 | 2.44.1 | ||
| 30 | |||
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/0002-Makefile-Add-n-to-gzip.patch b/meta/recipes-devtools/bootchart2/bootchart2/0002-Makefile-Add-n-to-gzip.patch new file mode 100644 index 0000000000..baa338759b --- /dev/null +++ b/meta/recipes-devtools/bootchart2/bootchart2/0002-Makefile-Add-n-to-gzip.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From aec8c971e09a28a5f8cd655ccd2f0cf1b057d756 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Thu, 14 Nov 2024 07:35:11 +0000 | ||
| 4 | Subject: [PATCH 2/2] Makefile: Add -n to gzip | ||
| 5 | |||
| 6 | To make the resulting files reproducible. | ||
| 7 | |||
| 8 | -n --no-name | ||
| 9 | When compressing, do not save the original file name and timestamp by default. | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://github.com/xrmx/bootchart/pull/106] | ||
| 12 | |||
| 13 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 14 | --- | ||
| 15 | Makefile | 6 +++--- | ||
| 16 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/Makefile b/Makefile | ||
| 19 | index 99a3ec7..87de486 100644 | ||
| 20 | --- a/Makefile | ||
| 21 | +++ b/Makefile | ||
| 22 | @@ -107,9 +107,9 @@ install-docs: | ||
| 23 | install -m 644 -D README $(DESTDIR)$(DOCDIR)/README | ||
| 24 | install -m 644 -D README.pybootchart $(DESTDIR)$(DOCDIR)/README.pybootchart | ||
| 25 | mkdir -p $(DESTDIR)$(MANDIR) | ||
| 26 | - gzip -c bootchart2.1 > $(DESTDIR)$(MANDIR)/bootchart2.1.gz | ||
| 27 | - gzip -c bootchartd.1 > $(DESTDIR)$(MANDIR)/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).1.gz | ||
| 28 | - gzip -c pybootchartgui.1 > $(DESTDIR)$(MANDIR)/pybootchartgui.1.gz | ||
| 29 | + gzip -n -c bootchart2.1 > $(DESTDIR)$(MANDIR)/bootchart2.1.gz | ||
| 30 | + gzip -n -c bootchartd.1 > $(DESTDIR)$(MANDIR)/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).1.gz | ||
| 31 | + gzip -n -c pybootchartgui.1 > $(DESTDIR)$(MANDIR)/pybootchartgui.1.gz | ||
| 32 | |||
| 33 | install-service: | ||
| 34 | mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR) | ||
| 35 | -- | ||
| 36 | 2.44.1 | ||
| 37 | |||
diff --git a/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb b/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb index 8a211366bf..06625d099e 100644 --- a/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb +++ b/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb | |||
| @@ -94,6 +94,8 @@ SRC_URI = "git://github.com/xrmx/bootchart.git;branch=master;protocol=https \ | |||
| 94 | file://0001-collector-Allocate-space-on-heap-for-chunks.patch \ | 94 | file://0001-collector-Allocate-space-on-heap-for-chunks.patch \ |
| 95 | file://0001-bootchartd.in-make-sure-only-one-bootchartd-process.patch \ | 95 | file://0001-bootchartd.in-make-sure-only-one-bootchartd-process.patch \ |
| 96 | file://0001-Do-not-include-linux-fs.h.patch \ | 96 | file://0001-Do-not-include-linux-fs.h.patch \ |
| 97 | file://0001-Makefile-Let-bootchartd.conf-use-EARLY_.patch \ | ||
| 98 | file://0002-Makefile-Add-n-to-gzip.patch \ | ||
| 97 | " | 99 | " |
| 98 | 100 | ||
| 99 | S = "${WORKDIR}/git" | 101 | S = "${WORKDIR}/git" |
| @@ -129,18 +131,22 @@ do_install () { | |||
| 129 | export DESTDIR="${D}" | 131 | export DESTDIR="${D}" |
| 130 | export LIBDIR="/${baselib}" | 132 | export LIBDIR="/${baselib}" |
| 131 | export EARLY_PREFIX="${root_prefix}" | 133 | export EARLY_PREFIX="${root_prefix}" |
| 134 | export MANDIR="${mandir}/man1" | ||
| 135 | export DOCDIR="${docdir}" | ||
| 132 | 136 | ||
| 133 | oe_runmake install NO_PYTHON_COMPILE=1 | 137 | oe_runmake install NO_PYTHON_COMPILE=1 |
| 134 | install -d ${D}${sysconfdir}/init.d | 138 | install -d ${D}${sysconfdir}/init.d |
| 135 | install -m 0755 ${UNPACKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d | 139 | install -m 0755 ${UNPACKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d |
| 136 | 140 | ||
| 141 | if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then | ||
| 142 | mv ${D}${EARLY_PREFIX}${sysconfdir}/bootchartd.conf ${D}${sysconfdir}/bootchartd.conf | ||
| 143 | rmdir ${D}${EARLY_PREFIX}${sysconfdir} | ||
| 144 | fi | ||
| 145 | |||
| 137 | echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf | 146 | echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf |
| 138 | 147 | ||
| 139 | # Use python 3 instead of python 2 | 148 | # Use python 3 instead of python 2 |
| 140 | sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' ${D}${bindir}/pybootchartgui | 149 | sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' ${D}${bindir}/pybootchartgui |
| 141 | |||
| 142 | # The timestamps embedded in compressed man pages is not reproducible | ||
| 143 | gzip -d ${D}${mandir}/man1/*.gz | ||
| 144 | } | 150 | } |
| 145 | 151 | ||
| 146 | PACKAGES =+ "pybootchartgui" | 152 | PACKAGES =+ "pybootchartgui" |
