Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] bootchart2 update to 0.14.9, fix dracut's bootchart modules
@ 2021-01-24  9:23 sgn
  2021-01-26 12:46 ` [PR PATCH] [Merged]: " sgn
  0 siblings, 1 reply; 2+ messages in thread
From: sgn @ 2021-01-24  9:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages bootchart2-0.14.9
https://github.com/void-linux/void-packages/pull/28136

bootchart2 update to 0.14.9, fix dracut's bootchart modules
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

---

- dracut 051 is out but I haven't tested, yet.
- dracut 051 still has support for bootchart, but upstream dropped bootchart support in the next release, so the patch couldn't be sent upstream
- both bootchart and bootcharts doesn't need accton, usleep is not available and isn't required as well.

A patch file from https://github.com/void-linux/void-packages/pull/28136.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bootchart2-0.14.9-28136.patch --]
[-- Type: text/x-diff, Size: 6836 bytes --]

From bb8a6b17d83bf99db5debebe470317b5ba821064 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 24 Jan 2021 14:53:18 +0700
Subject: [PATCH 1/2] bootchart2: update to 0.14.9.

---
 srcpkgs/bootchart2/patches/Makefile.patch     | 20 -----------
 srcpkgs/bootchart2/patches/python-3.9.patch   | 35 +++++++++++++++++++
 .../bootchart2/patches/rdinit-fix-panic.patch | 10 ++++++
 srcpkgs/bootchart2/template                   | 25 +++++++------
 4 files changed, 60 insertions(+), 30 deletions(-)
 delete mode 100644 srcpkgs/bootchart2/patches/Makefile.patch
 create mode 100644 srcpkgs/bootchart2/patches/python-3.9.patch
 create mode 100644 srcpkgs/bootchart2/patches/rdinit-fix-panic.patch

diff --git a/srcpkgs/bootchart2/patches/Makefile.patch b/srcpkgs/bootchart2/patches/Makefile.patch
deleted file mode 100644
index 52de44fad5a..00000000000
--- a/srcpkgs/bootchart2/patches/Makefile.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- Makefile.orig	2017-12-10 19:54:55.223497878 -0500
-+++ Makefile	2017-12-10 19:37:39.909790719 -0500
-@@ -19,7 +19,7 @@
- EARLY_PREFIX ?=
- 
- BINDIR ?= /usr/bin
--PYTHON ?= python
-+PYTHON ?= python2
- DOCDIR ?= /usr/share/docs/$(PROGRAM_PREFIX)bootchart$(PROGRAM_SUFFIX)
- MANDIR ?= /usr/share/man/man1
- # never contains /usr; typically /lib, /lib64 or e.g. /lib/x86_64-linux-gnu
-@@ -99,7 +99,7 @@
- 	install -d $(DESTDIR)$(PKGLIBDIR)/tmpfs
- 
- install-collector: all install-chroot
--	install -m 755 -D bootchartd $(DESTDIR)$(EARLY_PREFIX)/sbin/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX)
-+	install -m 755 -D bootchartd $(DESTDIR)$(EARLY_PREFIX)/bin/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX)
- 	install -m 644 -D bootchartd.conf $(DESTDIR)/etc/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).conf
- 	install -m 755 -D bootchart-collector $(DESTDIR)$(PKGLIBDIR)/$(PROGRAM_PREFIX)bootchart$(PROGRAM_SUFFIX)-collector
- 
diff --git a/srcpkgs/bootchart2/patches/python-3.9.patch b/srcpkgs/bootchart2/patches/python-3.9.patch
new file mode 100644
index 00000000000..617e2e1586b
--- /dev/null
+++ b/srcpkgs/bootchart2/patches/python-3.9.patch
@@ -0,0 +1,35 @@
+Index: pybootchartgui/draw.py
+===================================================================
+--- pybootchartgui/draw.py.orig
++++ pybootchartgui/draw.py
+@@ -508,7 +508,7 @@ def draw_processes_recursively(ctx, proc
+ 		cmdString = proc.cmd
+ 	else:
+ 		cmdString = ''
+-	if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0:
++	if (OPTIONS.show_pid or OPTIONS.show_all) and ipid != 0:
+ 		cmdString = cmdString + " [" + str(ipid // 1000) + "]"
+ 	if OPTIONS.show_all:
+ 		if proc.args:
+@@ -606,7 +606,7 @@ class CumlSample:
+ 		if self.color is None:
+ 			i = self.next() % HSV_MAX_MOD
+ 			h = 0.0
+-			if i is not 0:
++			if i != 0:
+ 				h = (1.0 * i) / HSV_MAX_MOD
+ 			s = 0.5
+ 			v = 1.0
+Index: pybootchartgui/parsing.py
+===================================================================
+--- pybootchartgui/parsing.py.orig
++++ pybootchartgui/parsing.py
+@@ -98,7 +98,7 @@ class Trace:
+     def compile(self, writer):
+ 
+         def find_parent_id_for(pid):
+-            if pid is 0:
++            if pid == 0:
+                 return 0
+             ppid = self.parent_map.get(pid)
+             if ppid:
diff --git a/srcpkgs/bootchart2/patches/rdinit-fix-panic.patch b/srcpkgs/bootchart2/patches/rdinit-fix-panic.patch
new file mode 100644
index 00000000000..2027d5d5b03
--- /dev/null
+++ b/srcpkgs/bootchart2/patches/rdinit-fix-panic.patch
@@ -0,0 +1,10 @@
+--- bootchartd.in.orig	2021-01-24 15:52:43.339735933 +0700
++++ bootchartd.in	2021-01-24 15:53:30.256889311 +0700
+@@ -32,6 +32,7 @@
+ # some initrds don't have usleep etc.
+ USLEEP="$COLLECTOR_BIN --usleep"
+ 
++: "${OLDPATH:=/sbin:/bin:/usr/sbin:/usr/bin}"
+ # we need to find our tools
+ PATH="/sbin:/bin:/usr/sbin:/usr/bin:$PATH"
+ 
diff --git a/srcpkgs/bootchart2/template b/srcpkgs/bootchart2/template
index 2131dd7d32a..62cd9d2116a 100644
--- a/srcpkgs/bootchart2/template
+++ b/srcpkgs/bootchart2/template
@@ -1,17 +1,22 @@
 # Template file for 'bootchart2'
 pkgname=bootchart2
-version=0.14.8.20170531
-revision=3
-_gitrev=331ada031f1d65f6d934d918f896e1c708c64bf7
-wrksrc="bootchart-${_gitrev}"
+version=0.14.9
+revision=1
+wrksrc="bootchart-${version}"
 build_style=gnu-makefile
-make_install_args="EARLY_PREFIX=/usr"
-makedepends="python"
-depends="pygtk git"
+make_install_args="EARLY_PREFIX=/usr DOCDIR=/usr/share/doc/bootchart2"
+hostmakedepends="python3"
+makedepends="python3"
+depends="python3-cairo"
 short_desc="Startup graphing tool"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2"
+license="GPL-3.0-or-later"
 homepage="https://github.com/xrmx/bootchart"
-distfiles="https://github.com/xrmx/bootchart/archive/${_gitrev}.tar.gz>${pkgname}-${version}.tar.gz"
-checksum=a8140cc690bd7d08ab9c030325cb075e154b7545083036ffb65bda8d740d85b4
+distfiles="https://github.com/xrmx/bootchart/archive/${version}.tar.gz"
+checksum=cec7871c3dba47a1165873b0acde30a82221fde1d3a942da5e7dd09b513d2017
+make_dirs="/usr/lib/bootchart/tmpfs 0755 root root"
 conflicts="bootchart>=0"
+
+post_patch() {
+	vsed -i -e 's,\$(EARLY_PREFIX)/sbin/,/usr/bin/,' Makefile
+}

From c5a0f498e9f43790e74c5e6c01d6ddf768538a20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 24 Jan 2021 16:09:02 +0700
Subject: [PATCH 2/2] dracut: fix 00bootchart's requirements

---
 .../dracut/patches/00bootchart-requirements.patch  | 14 ++++++++++++++
 srcpkgs/dracut/template                            |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/dracut/patches/00bootchart-requirements.patch

diff --git a/srcpkgs/dracut/patches/00bootchart-requirements.patch b/srcpkgs/dracut/patches/00bootchart-requirements.patch
new file mode 100644
index 00000000000..a617565a0c1
--- /dev/null
+++ b/srcpkgs/dracut/patches/00bootchart-requirements.patch
@@ -0,0 +1,14 @@
+--- modules.d/00bootchart/module-setup.sh.orig	2021-01-24 16:00:46.529880095 +0700
++++ modules.d/00bootchart/module-setup.sh	2021-01-24 16:00:56.134911133 +0700
+@@ -19,10 +19,8 @@
+ 
+     inst_multiple bootchartd bash \
+         /lib/bootchart/bootchart-collector /etc/bootchartd.conf \
+-        accton \
+         echo \
+-        grep \
+-        usleep
++        grep
+ 
+     inst /usr/bin/pkill /bin/pkill
+     inst /usr/bin/[  /bin/[
diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template
index 27743569eda..53cee6c4ff2 100644
--- a/srcpkgs/dracut/template
+++ b/srcpkgs/dracut/template
@@ -1,7 +1,7 @@
 # Template file for 'dracut'
 pkgname=dracut
 version=050
-revision=9
+revision=10
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc"
 conf_files="/etc/dracut.conf"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: bootchart2 update to 0.14.9, fix dracut's bootchart modules
  2021-01-24  9:23 [PR PATCH] bootchart2 update to 0.14.9, fix dracut's bootchart modules sgn
@ 2021-01-26 12:46 ` sgn
  0 siblings, 0 replies; 2+ messages in thread
From: sgn @ 2021-01-26 12:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]

There's a merged pull request on the void-packages repository

bootchart2 update to 0.14.9, fix dracut's bootchart modules
https://github.com/void-linux/void-packages/pull/28136

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

---

- dracut 051 is out but I haven't tested, yet.
- dracut 051 still has support for bootchart, but upstream dropped bootchart support in the next release, so the patch couldn't be sent upstream
- both bootchart and bootcharts doesn't need accton, usleep is not available and isn't required as well.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-26 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24  9:23 [PR PATCH] bootchart2 update to 0.14.9, fix dracut's bootchart modules sgn
2021-01-26 12:46 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).