Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] alternative iotop
@ 2022-03-11  0:34 dmarto
  2022-03-12 23:32 ` CameronNemo
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dmarto @ 2022-03-11  0:34 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dmarto/void-packages iotop
https://github.com/void-linux/void-packages/pull/36086

alternative iotop
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc

Not sure, if I handled the `alternatives` correctly, so I am open to suggestions; I have tested switching back-and-forth and using both with no issues.

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

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

From e7738412d0fe1e1a9f19cebd9b2f15555a1555f5 Mon Sep 17 00:00:00 2001
From: Martin Dimov <martin@dmarto.com>
Date: Fri, 11 Mar 2022 02:23:01 +0200
Subject: [PATCH 1/2] iotop: introduce alternatives support, switch to upstream
 distfile

---
 srcpkgs/iotop/template | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/iotop/template b/srcpkgs/iotop/template
index 7119d9420dcb..9ce0324430c0 100644
--- a/srcpkgs/iotop/template
+++ b/srcpkgs/iotop/template
@@ -1,18 +1,24 @@
 # Template file for 'iotop'
 pkgname=iotop
 version=0.6
-revision=9
+revision=10
 build_style=python3-module
 hostmakedepends="python3"
 depends="${hostmakedepends}"
-short_desc="View I/O usage of processes"
+short_desc="View I/O usage of processes; the original iotop"
 maintainer="teldra <teldra@rotce.de>"
 license="GPL-2.0-or-later"
 homepage="http://guichaz.free.fr/iotop"
-#distfiles="http://guichaz.free.fr/iotop/files/iotop-${version}.tar.bz2"
-distfiles="https://void.johnnynator.dev/iotop-0.6.tar.bz2"
+distfiles="http://guichaz.free.fr/iotop/files/iotop-${version}.tar.bz2"
 checksum=3adea2a24eda49bbbaeb4e6ed2042355b441dbd7161e883067a02bfc8dcef75b
+alternatives="
+ iotop:iotop:/usr/bin/py-iotop
+ iotop:iotop.8:/usr/share/man/man8/py-iotop.8
+"
 
 post_install() {
-	chmod 644 ${DESTDIR}/usr/share/man/man8/iotop.8
+	mv ${DESTDIR}/usr/bin/{iotop,py-iotop}
+	mv ${DESTDIR}/usr/share/man/man8/{iotop.8,py-iotop.8}
+
+	chmod 644 ${DESTDIR}/usr/share/man/man8/py-iotop.8
 }

From d758c903bd0dc90fb7823537740670b53168cd28 Mon Sep 17 00:00:00 2001
From: Martin Dimov <martin@dmarto.com>
Date: Fri, 11 Mar 2022 02:24:19 +0200
Subject: [PATCH 2/2] New package: c-iotop-1.21

---
 srcpkgs/c-iotop/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/c-iotop/template

diff --git a/srcpkgs/c-iotop/template b/srcpkgs/c-iotop/template
new file mode 100644
index 000000000000..283e097fd786
--- /dev/null
+++ b/srcpkgs/c-iotop/template
@@ -0,0 +1,24 @@
+# Template file for 'c-iotop'
+pkgname=c-iotop
+version=1.21
+revision=1
+wrksrc="iotop-${version}"
+build_style=gnu-makefile
+hostmakedepends="pkg-config"
+makedepends="ncurses-devel"
+short_desc="View I/O usage of processes"
+maintainer="Martin Dimov <martin@dmarto.com>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/Tomas-M/iotop"
+distfiles="https://github.com/Tomas-M/iotop/archive/v${version}.tar.gz"
+checksum=90c11f984d5fdb7471b811c869919548e8aab969b516642ddc30441582cfe776
+alternatives="
+ iotop:iotop:/usr/bin/c-iotop
+ iotop:iotop.8:/usr/share/man/man8/c-iotop.8
+"
+conflicts="iotop<=0.6_9"
+
+do_install() {
+	vman iotop.8 c-iotop.8
+	vbin iotop c-iotop
+}

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

* Re: alternative iotop
  2022-03-11  0:34 [PR PATCH] alternative iotop dmarto
@ 2022-03-12 23:32 ` CameronNemo
  2022-03-13 18:34 ` dmarto
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: CameronNemo @ 2022-03-12 23:32 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/36086#issuecomment-1065984382

Comment:
the alternatives changes will not work correctly from what I can tell

see e.g. https://github.com/void-linux/xbps/pull/253

just the new package, without adding or messing with the alternatives, would be more likely to be accepted.

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

* Re: alternative iotop
  2022-03-11  0:34 [PR PATCH] alternative iotop dmarto
  2022-03-12 23:32 ` CameronNemo
@ 2022-03-13 18:34 ` dmarto
  2022-05-03  0:20 ` [PR PATCH] [Updated] " dmarto
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dmarto @ 2022-03-13 18:34 UTC (permalink / raw)
  To: ml

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

New comment by dmarto on void-packages repository

https://github.com/void-linux/void-packages/pull/36086#issuecomment-1066158102

Comment:
Hey, thanks for the suggestion, honestly I was split between several options:
 - this one, that should cover everything and hopefully work (based on my knowledge of xbps)
 - having both iotop pkgs conflict with one another, and adding some info in the pkg desc
 - what you suggested and using another name for the binary and keeping the old pkg as is
 - removing the old one and leaving only the iotop-c

I ended up on this path, as I don't feel the other two are proper or quality solutions.

---

My "view" of the process, may be very, very wrong, but "It worked on my Machine (ТМ)" :D

The old iotop is replaced before the new one; and thanks to the `conflicts` of the c-iotop pkgs, the group can't be registered before the old one gets handled by its own pkg and registers the group. That way, there is no need to worry about order of operations.

Anyway, I am willing to wait on a comment from the guys that better know the internals of xbps and figuring out a way to make it work with `alternatives` - as the OG iotop is a de-facto standard and well at least in some cases I can see the preference to have them both. 

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

* Re: [PR PATCH] [Updated] alternative iotop
  2022-03-11  0:34 [PR PATCH] alternative iotop dmarto
  2022-03-12 23:32 ` CameronNemo
  2022-03-13 18:34 ` dmarto
@ 2022-05-03  0:20 ` dmarto
  2022-07-14 15:07 ` Alternative support for iotop; add c-iotop leahneukirchen
  2022-07-14 15:31 ` [PR PATCH] [Closed]: " dmarto
  4 siblings, 0 replies; 6+ messages in thread
From: dmarto @ 2022-05-03  0:20 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dmarto against master on the void-packages repository

https://github.com/dmarto/void-packages iotop
https://github.com/void-linux/void-packages/pull/36086

alternative iotop
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc

Not sure, if I handled the `alternatives` correctly, so I am open to suggestions; I have tested switching back-and-forth and using both with no issues.

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

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

From 0ebb791d0bab51e57a582790529fcb485ac2623d Mon Sep 17 00:00:00 2001
From: Martin Dimov <martin@dmarto.com>
Date: Fri, 11 Mar 2022 02:23:01 +0200
Subject: [PATCH 1/2] iotop: introduce alternatives support, switch to upstream
 distfile

---
 srcpkgs/iotop/template | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/iotop/template b/srcpkgs/iotop/template
index 7119d9420dcb..9ce0324430c0 100644
--- a/srcpkgs/iotop/template
+++ b/srcpkgs/iotop/template
@@ -1,18 +1,24 @@
 # Template file for 'iotop'
 pkgname=iotop
 version=0.6
-revision=9
+revision=10
 build_style=python3-module
 hostmakedepends="python3"
 depends="${hostmakedepends}"
-short_desc="View I/O usage of processes"
+short_desc="View I/O usage of processes; the original iotop"
 maintainer="teldra <teldra@rotce.de>"
 license="GPL-2.0-or-later"
 homepage="http://guichaz.free.fr/iotop"
-#distfiles="http://guichaz.free.fr/iotop/files/iotop-${version}.tar.bz2"
-distfiles="https://void.johnnynator.dev/iotop-0.6.tar.bz2"
+distfiles="http://guichaz.free.fr/iotop/files/iotop-${version}.tar.bz2"
 checksum=3adea2a24eda49bbbaeb4e6ed2042355b441dbd7161e883067a02bfc8dcef75b
+alternatives="
+ iotop:iotop:/usr/bin/py-iotop
+ iotop:iotop.8:/usr/share/man/man8/py-iotop.8
+"
 
 post_install() {
-	chmod 644 ${DESTDIR}/usr/share/man/man8/iotop.8
+	mv ${DESTDIR}/usr/bin/{iotop,py-iotop}
+	mv ${DESTDIR}/usr/share/man/man8/{iotop.8,py-iotop.8}
+
+	chmod 644 ${DESTDIR}/usr/share/man/man8/py-iotop.8
 }

From 561fed67487d5fa75a70b9c9624f00ac77cf096a Mon Sep 17 00:00:00 2001
From: Martin Dimov <martin@dmarto.com>
Date: Fri, 11 Mar 2022 02:24:19 +0200
Subject: [PATCH 2/2] New package: c-iotop-1.21

---
 srcpkgs/c-iotop/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/c-iotop/template

diff --git a/srcpkgs/c-iotop/template b/srcpkgs/c-iotop/template
new file mode 100644
index 000000000000..283e097fd786
--- /dev/null
+++ b/srcpkgs/c-iotop/template
@@ -0,0 +1,24 @@
+# Template file for 'c-iotop'
+pkgname=c-iotop
+version=1.21
+revision=1
+wrksrc="iotop-${version}"
+build_style=gnu-makefile
+hostmakedepends="pkg-config"
+makedepends="ncurses-devel"
+short_desc="View I/O usage of processes"
+maintainer="Martin Dimov <martin@dmarto.com>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/Tomas-M/iotop"
+distfiles="https://github.com/Tomas-M/iotop/archive/v${version}.tar.gz"
+checksum=90c11f984d5fdb7471b811c869919548e8aab969b516642ddc30441582cfe776
+alternatives="
+ iotop:iotop:/usr/bin/c-iotop
+ iotop:iotop.8:/usr/share/man/man8/c-iotop.8
+"
+conflicts="iotop<=0.6_9"
+
+do_install() {
+	vman iotop.8 c-iotop.8
+	vbin iotop c-iotop
+}

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

* Re: Alternative support for iotop; add c-iotop.
  2022-03-11  0:34 [PR PATCH] alternative iotop dmarto
                   ` (2 preceding siblings ...)
  2022-05-03  0:20 ` [PR PATCH] [Updated] " dmarto
@ 2022-07-14 15:07 ` leahneukirchen
  2022-07-14 15:31 ` [PR PATCH] [Closed]: " dmarto
  4 siblings, 0 replies; 6+ messages in thread
From: leahneukirchen @ 2022-07-14 15:07 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/36086#issuecomment-1184562584

Comment:
Provided in 6c14d25596 as iotop-c like the other distros.

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

* Re: [PR PATCH] [Closed]: Alternative support for iotop; add c-iotop.
  2022-03-11  0:34 [PR PATCH] alternative iotop dmarto
                   ` (3 preceding siblings ...)
  2022-07-14 15:07 ` Alternative support for iotop; add c-iotop leahneukirchen
@ 2022-07-14 15:31 ` dmarto
  4 siblings, 0 replies; 6+ messages in thread
From: dmarto @ 2022-07-14 15:31 UTC (permalink / raw)
  To: ml

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

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

Alternative support for iotop; add c-iotop.
https://github.com/void-linux/void-packages/pull/36086

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc

Not sure, if I handled the `alternatives` correctly, so I am open to suggestions; I have tested switching back-and-forth and using both with no issues.

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

end of thread, other threads:[~2022-07-14 15:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11  0:34 [PR PATCH] alternative iotop dmarto
2022-03-12 23:32 ` CameronNemo
2022-03-13 18:34 ` dmarto
2022-05-03  0:20 ` [PR PATCH] [Updated] " dmarto
2022-07-14 15:07 ` Alternative support for iotop; add c-iotop leahneukirchen
2022-07-14 15:31 ` [PR PATCH] [Closed]: " dmarto

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).