summaryrefslogtreecommitdiff
path: root/sys-process/unixtop
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-28 20:02:04 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-28 20:02:04 +0100
commita4e2a46beb5e4858ef27bdedbb0ff6d2ced430ad (patch)
tree852c90a4bf354c30ea66504f70bfab5401fba18d /sys-process/unixtop
parent5e8702bcbbed438e6c6cce023e7ef0cc9baa3e02 (diff)
gentoo resync : 28.04.2018
Diffstat (limited to 'sys-process/unixtop')
-rw-r--r--sys-process/unixtop/Manifest10
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch115
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch68
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch4
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch4
-rw-r--r--sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild21
6 files changed, 87 insertions, 135 deletions
diff --git a/sys-process/unixtop/Manifest b/sys-process/unixtop/Manifest
index 6064774558c7..34e447df1306 100644
--- a/sys-process/unixtop/Manifest
+++ b/sys-process/unixtop/Manifest
@@ -1,9 +1,9 @@
-AUX unixtop-3.8_beta1-high-threadid-crash.patch 2261 BLAKE2B 46398841ae8a36885e72f104a4b0d0a6501d8bd5251a043e886d25b508281c27783360d98fc3127484b0703eeaa6a10ce3413cc56cfc1d5d4dd8ea6cc9c8c5fc SHA512 d25ce022391db06eeef794062bd49cb4c20f4a544bbd389fed566e172c58025cfc79ba6128ebdac2c9c97c21782842922834138d8a754e20c88d64ee65ccf2c7
-AUX unixtop-3.8_beta1-memleak-fix-v2.patch 1060 BLAKE2B fa60f1e4563ac7f5c5f02625af76c4f1b5fad788bfc2c91eee67acc7a193b469d2a430f53f23b9d9256cd89defc8d62b6365ff93b305b2482a487951a74668b9 SHA512 83ac5d5c61adeb839d45af91c5a52dce38a66abea5f14407dcb988e29c297f7fd36a6c6d845cd90110a003471aba9ed0f715b68beaf6cbb15f433597a6273c8c
-AUX unixtop-3.8_beta1-ncurses.patch 436 BLAKE2B 73e4cfe1b4152d95cff5a876fc5af9c9eed50bda19f16c279048c41da1aa1768303d9901fc6fc0576b3cf829e18197f749242c1bba780e74c09a57c442ab183d SHA512 1d5e63cadcc3c69ed4e92973cd0e8bd2de69d19a4dc7cf92ba30e669ece9e9c70b7ec8f0cfb621e101abd850470b75e388f70ceb46dfc9746ab04442ec98f68a
-AUX unixtop-3.8_beta1-no-AX-macros.patch 609 BLAKE2B 0e5cb54a109ca1a9353c13c5d58176dac85997899edfbedc25a79a8c20e775b65b90c43201438f125d32fab42dc77ddb77f34047fe2ee91bb84170beb286b02d SHA512 a55e9c5b4f337365b24b99f2412ad69edc51a610a4cf831592183d284c83202149342c52e1f09fbdb78dc468484510d3d67902386358aa85eb45c5e8a092ff8e
+AUX unixtop-3.8_beta1-high-threadid-crash.patch 1649 BLAKE2B 1a4a01b99ab4c404406451017ab88d74081617edb4400368ce2ab638bd54e0bc70b298c43e641f827c63150b73547c25eb5e513816237721a8afb0b5734ec124 SHA512 44d02d0f7843379674cf55b0c8250833b53741bbe39ab33eb72ca24745b1b71363402641a6f365862f8b671e8e34e36e17a0cab9889892d30ba23ca08685de32
+AUX unixtop-3.8_beta1-memleak-fix-v2.patch 730 BLAKE2B 483f161fb64ec1c9bd2e3e86c604026e7b7e84540bf3ef02393e8f58569231e7ba0613d227ef7930d8c748e5e4cc24c9c1ffa26ce067096f975e36f4bd2b355c SHA512 e4c83d939fcd29726f63c34483fc60dd09cc6c777f8cff0469a5c386acfdf85a49dacfa5e2e0ea44c78b7abb139a0933c72db87a3100524011d09d69838d767e
+AUX unixtop-3.8_beta1-ncurses.patch 440 BLAKE2B 9036fe2ff33e610cf210e9819c4d67b4463b0cb919042d58d73a23e10dfd6229c143e634978f9823e71009a182756c64e54966f4e5096f315fc2cbbceed4213c SHA512 b3d1f5e30a38fc2a7516258f264c18a2aafae4ee38bd65efdba9bb1617399aa31a9b6582388de38551437a84fefdd73226989d80e4381adfb172b08062034ba8
+AUX unixtop-3.8_beta1-no-AX-macros.patch 613 BLAKE2B 1e33613a9956527ecd3248c56d98a31b9191945f4eef4758cc31f32d9350b6db12a8750520ad1ac0cd0fbb1c309f1d7838a86f78de49022d04dc1d0162e78a13 SHA512 49af9bac713bd64af5cd0162090e1aab9c9af3d331574f0786f565715841b8c9fe0ae0fa29d1309d2b9ffe442a522bd1eecb295fc1e026e5fd4a70d804579255
AUX unixtop-3.8_beta1-percent-cpu.patch 903 BLAKE2B 57873c687e6a3ddf62c79524738bbb30984ebc85db5c8dd36aeb3d33284da1c621a7bbb8e1d178ee4e00f377cee9684e47f31150d16e72b89fa691d80c71ea7d SHA512 6867b2c9951e801aeefc464e7903b719c6acfee7db33e65c7c51da2055daef5990d5a8d1131dc069334bca54f866b25db2891fdb7c15a9d8c468047f090e327c
AUX unixtop-3.8_beta1-renice-segfault.patch 518 BLAKE2B fb81d2053fd5de006b9a229f0cc6bb6be6107fa26d22488e20ba76ca021a98298f035af3daee5d5cecb1d68100d5dd3062399578c60e83fe2b4f90052f0c838f SHA512 2d74ee0e67136a59d6745522ea7671404a9d0a026311f6dfa47dc78d12ecb12da63aab915b969cdecbdf9f3ba9dd86babeebc5c1b61713adbb7c98f70adf56f6
DIST top-3.8beta1.tar.bz2 233880 BLAKE2B 126ed2ef1e89bcd00e989350d0bdd2b78308400eadf0208d7c1bb1abac6b46cecfb0db514576cf6a272038329b1bc0fce4ada37bed42a2e2a662778bcdaf465b SHA512 c66d786e34070afd00dc2225ce4cddcf0fdaee0e2a6c6e2dfadadcd97bbe84c6668041ff5b075137630b99240c711fbfda8b85fb09c6a39e3067798cbe612671
-EBUILD unixtop-3.8_beta1-r3.ebuild 1092 BLAKE2B c3dc431216208c0d72ebe6ee2198f351f54137071b21df10bae291b0cab5c26bf035fb0d3ec0044c9604ed15f4bbfb8bacf96e39002e7d7204377e5e7449f6bd SHA512 25c86d0658a57534c6c90b976761205dcd5c2385a0ba5c1571b292da2d63546e505ff9df2e60688151a9d2ac396941be7c900e7f81b017fb957bbb3c964680d1
+EBUILD unixtop-3.8_beta1-r3.ebuild 1118 BLAKE2B 5d0a0e094b63a144e0fc40ad0bfd66b88bff75225f0c702fdb4466c425016ca3e1c011f3edea03f4dea6b359d1a77d74b80efa77d3dc20cbf4ce3581c26c4263 SHA512 c5c35c6f707f6a1ba15d7429e675822f8478927ad13ba7a3c5815aa3e6ae0139d8782670fc2dbcb1009823b0d54af1dcebf988b90123b22dd4646607efee8661
MISC metadata.xml 324 BLAKE2B 3fc9d4e7659f62ded757066d234e3ae7182283c646807988045ade34f146fb490ae01748196ef0a9535daa01ab578d6e5ccdc1cc03fc5a1b952092ac99b1f11c SHA512 9d0285bab5e9e40597de61a2dd87370aa693ea943f63a6163d5fc3100e9ca8dd7198a309e0d4735a9cb6bbfdb850a06f1e082758d71df21ab1eb0af34361968d
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch
index 734826a647dd..00f19536e388 100644
--- a/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch
@@ -1,75 +1,40 @@
-https://sourceforge.net/tracker/index.php?func=detail&aid=2815842&group_id=72892&atid=536042
-
-*** hash.c-old Thu Jul 2 15:30:55 2009
---- hash.c Thu Jul 2 15:48:39 2009
-***************
-*** 1354,1360 ****
- hi->value = value;
-
- /* hash to the bucket */
-! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
-
- /* walk the list to make sure we do not have a duplicate */
- ll = &(bucket->list);
---- 1354,1360 ----
- hi->value = value;
-
- /* hash to the bucket */
-! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
-
- /* walk the list to make sure we do not have a duplicate */
- ll = &(bucket->list);
-***************
-*** 1408,1414 ****
- pidthr_t k1;
-
- /* find the bucket */
-! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
-
- /* walk the list until we find the existing item */
- ll = &(bucket->list);
---- 1408,1414 ----
- pidthr_t k1;
-
- /* find the bucket */
-! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
-
- /* walk the list until we find the existing item */
- ll = &(bucket->list);
-***************
-*** 1460,1466 ****
- pidthr_t k1;
-
- result = NULL;
-! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
- {
- ll = &(bucket->list);
- li = LL_FIRST(ll);
---- 1460,1466 ----
- pidthr_t k1;
-
- result = NULL;
-! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
- {
- ll = &(bucket->list);
- li = LL_FIRST(ll);
-***************
-*** 1499,1505 ****
- pidthr_t k1;
-
- result = NULL;
-! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
- {
- ll = &(bucket->list);
- li = LL_FIRST(ll);
---- 1499,1505 ----
- pidthr_t k1;
-
- result = NULL;
-! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
- {
- ll = &(bucket->list);
- li = LL_FIRST(ll);
-
-
-
+https://sourceforge.net/p/unixtop/bugs/43/
+
+--- a/hash.c
++++ b/hash.c
+@@ -1354,7 +1354,7 @@ hash_add_pidthr(hash_table *ht, pidthr_t
+ hi->value = value;
+
+ /* hash to the bucket */
+- bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
++ bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
+
+ /* walk the list to make sure we do not have a duplicate */
+ ll = &(bucket->list);
+@@ -1408,7 +1408,7 @@ hash_replace_pidthr(hash_table *ht, pidt
+ pidthr_t k1;
+
+ /* find the bucket */
+- bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
++ bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
+
+ /* walk the list until we find the existing item */
+ ll = &(bucket->list);
+@@ -1460,7 +1460,7 @@ hash_lookup_pidthr(hash_table *ht, pidth
+ pidthr_t k1;
+
+ result = NULL;
+- if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
++ if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
+ {
+ ll = &(bucket->list);
+ li = LL_FIRST(ll);
+@@ -1499,7 +1499,7 @@ hash_remove_pidthr(hash_table *ht, pidth
+ pidthr_t k1;
+
+ result = NULL;
+- if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
++ if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
+ {
+ ll = &(bucket->list);
+ li = LL_FIRST(ll);
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch
index 76042bb4c1a6..2d79c7293f9d 100644
--- a/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch
@@ -1,44 +1,28 @@
https://hg.openindiana.org/upstream/oracle/userland-gate/raw-file/23c55a2f8a8e/components/top/patches/03.sunos5.patch
-*** top-3.8beta1/machine/m_sunos5.c.orig Wed Aug 31 05:23:52 2011
---- top-3.8beta1/machine/m_sunos5.c Wed Aug 31 05:25:25 2011
-***************
-*** 2064,2070 ****
-
- /* read the whole file */
- p = malloc(st.st_size);
-! (void)pread(fd, p, st.st_size, 0);
-
- /* cache the file descriptor if we can */
- if (fd < maxfiles)
---- 2064,2076 ----
-
- /* read the whole file */
- p = malloc(st.st_size);
-! if (pread(fd, p, st.st_size, 0) != st.st_size)
-! {
-! (void) close(fd);
-! op->fd_lpsinfo = -1;
-! free(p);
-! continue;
-! }
-
- /* cache the file descriptor if we can */
- if (fd < maxfiles)
-***************
-*** 2148,2154 ****
- op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
- op->seen = 1;
- }
-! free(p);
- }
- #endif
-
---- 2154,2160 ----
- op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
- op->seen = 1;
- }
-! free(prp);
- }
- #endif
-
+--- a/machine/m_sunos5.c
++++ b/machine/m_sunos5.c
+@@ -2064,7 +2064,13 @@ getptable (struct prpsinfo *baseptr)
+
+ /* read the whole file */
+ p = malloc(st.st_size);
+- (void)pread(fd, p, st.st_size, 0);
++ if (pread(fd, p, st.st_size, 0) != st.st_size)
++ {
++ (void) close(fd);
++ op->fd_lpsinfo = -1;
++ free(p);
++ continue;
++ }
+
+ /* cache the file descriptor if we can */
+ if (fd < maxfiles)
+@@ -2148,7 +2154,7 @@ getptable (struct prpsinfo *baseptr)
+ op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
+ op->seen = 1;
+ }
+- free(p);
++ free(prp);
+ }
+ #endif
+
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
index 73cd88b72826..a2da4b47da6a 100644
--- a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
@@ -1,8 +1,8 @@
* check ncurses first, such that we only link agains (system) termcap if
necessary (never the case in prefix) -- grobian@gentoo.org
---- configure.ac
-+++ configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -174,7 +174,7 @@
AC_CHECK_LIB(kvm, kvm_open)
# -lmld -lmach
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch
index f5d34a4a9ae9..88fd475fe61d 100644
--- a/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch
@@ -1,8 +1,8 @@
* no idea where these macros are, but we can surely do without this, for
now -- grobian@gentoo.org
---- configure.ac
-+++ configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -504,16 +504,6 @@
AC_MSG_RESULT($result)
diff --git a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
index d32e3863a6f7..c4f9598cf00b 100644
--- a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
+++ b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit eutils autotools
+inherit autotools
DESCRIPTION="top for UNIX systems"
HOMEPAGE="http://unixtop.sourceforge.net/"
@@ -19,14 +19,17 @@ DEPEND="${RDEPEND}"
S=${WORKDIR}/top-${PV/_/}
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.8_beta1-ncurses.patch
+ "${FILESDIR}"/${PN}-3.8_beta1-no-AX-macros.patch
+ "${FILESDIR}"/${PN}-3.8_beta1-renice-segfault.patch
+ "${FILESDIR}"/${PN}-3.8_beta1-memleak-fix-v2.patch
+ "${FILESDIR}"/${PN}-3.8_beta1-high-threadid-crash.patch
+ "${FILESDIR}"/${PN}-3.8_beta1-percent-cpu.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${P}-ncurses.patch
- epatch "${FILESDIR}"/${P}-no-AX-macros.patch
- epatch "${FILESDIR}"/${P}-renice-segfault.patch
- epatch "${FILESDIR}"/${P}-memleak-fix-v2.patch
- epatch "${FILESDIR}"/${P}-high-threadid-crash.patch
- epatch "${FILESDIR}"/${P}-percent-cpu.patch
- eapply_user
+ default
eautoreconf
}