diff options
author | Fabian Groffen <grobian@gentoo.org> | 2010-01-25 18:36:50 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2010-01-25 18:36:50 +0000 |
commit | ac19df132248b4965bc3fb7a587cd6dee2cc48a8 (patch) | |
tree | 3352044fb109093a05568bdc800187850f503f21 /sys-process | |
parent | Initial import of bacon, needed for shotgun testing. (diff) | |
download | historical-ac19df132248b4965bc3fb7a587cd6dee2cc48a8.tar.gz historical-ac19df132248b4965bc3fb7a587cd6dee2cc48a8.tar.bz2 historical-ac19df132248b4965bc3fb7a587cd6dee2cc48a8.zip |
Add patch for top crashing when high thread-id's are involved, thanks calculuspenguin for the pointer in bug #302142
Package-Manager: portage-2.2.00.15200-prefix/cvs/Darwin powerpc
Diffstat (limited to 'sys-process')
-rw-r--r-- | sys-process/unixtop/ChangeLog | 10 | ||||
-rw-r--r-- | sys-process/unixtop/Manifest | 14 | ||||
-rw-r--r-- | sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch | 75 | ||||
-rw-r--r-- | sys-process/unixtop/unixtop-3.8_beta1-r2.ebuild | 48 |
4 files changed, 135 insertions, 12 deletions
diff --git a/sys-process/unixtop/ChangeLog b/sys-process/unixtop/ChangeLog index 0afb2cd53512..63d2d83881df 100644 --- a/sys-process/unixtop/ChangeLog +++ b/sys-process/unixtop/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-process/unixtop # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/unixtop/ChangeLog,v 1.2 2010/01/15 19:55:39 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/unixtop/ChangeLog,v 1.3 2010/01/25 18:36:49 grobian Exp $ + +*unixtop-3.8_beta1-r2 (25 Jan 2010) + + 25 Jan 2010; Fabian Groffen <grobian@gentoo.org> + +unixtop-3.8_beta1-r2.ebuild, + +files/unixtop-3.8_beta1-high-threadid-crash.patch: + Add patch for top crashing when high thread-id's are involved, thanks + calculuspenguin for the pointer in bug #302142 15 Jan 2010; Ulrich Mueller <ulm@gentoo.org> unixtop-3.8_beta1-r1.ebuild: LICENSE is identical with BSD, bug 301123. diff --git a/sys-process/unixtop/Manifest b/sys-process/unixtop/Manifest index 837892604f55..378ebda194ea 100644 --- a/sys-process/unixtop/Manifest +++ b/sys-process/unixtop/Manifest @@ -1,18 +1,10 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - +AUX unixtop-3.8_beta1-high-threadid-crash.patch 2260 RMD160 90ade9471efa1caecd0a62c77aa4db43fc77303b SHA1 3a8e7cb3e0bc9ba9cd17794e572bb50f6a0515aa SHA256 5bcfe0a03ab73e4204367da0988968988d338d8c35ac907cd82692d3ec3e005a AUX unixtop-3.8_beta1-memleak-fix.patch 732 RMD160 151dbd7cc2cadbf34fc9136df91bbd88c2f1eb8a SHA1 6849adb541636c4ea5fa530e4d882e6ed27b6792 SHA256 01bcab2902e0031aff71f033ec4d39b19e3d4e7dcf7657e3343ef24fcdfa3ff0 AUX unixtop-3.8_beta1-ncurses.patch 436 RMD160 07b267cc669f392c7d3923c48f6ccdac83b8d115 SHA1 3cefc53f2390b6028cda151794691ef93cb1fdb2 SHA256 26971db7940dd2aed33f523ea19c0084a679d4803f9f8fab8edcd822cad05e3c AUX unixtop-3.8_beta1-no-AX-macros.patch 609 RMD160 80fc04598d3ba2c361488d9352a5355a07074eed SHA1 0588fa050a1a302406d3be19e12da6f4dc517cb0 SHA256 ba24d9c3f3d361d6dfb55447fb2e7e270224868723121fefa7ebd04a1909129f AUX unixtop-3.8_beta1-renice-segfault.patch 518 RMD160 b1c0cfc908224d91695323be5222c8ac3578b149 SHA1 f1a8f5ecaff1b34449a6a90899b3c33ceac73caf SHA256 47ffd2879fa9d3e6eae4fd38191abc004540f04b54cf39a72ab2366802067c7e DIST top-3.8beta1.tar.bz2 233880 RMD160 9949ba3262efdc0c5a311ee03508e1ad7a3e9229 SHA1 790340c375300a2ce78e0b939af98638999d787f SHA256 1b5281071a4fcc132205e643fb2fe196cf839555874aaee507a7d07aa0076cda EBUILD unixtop-3.8_beta1-r1.ebuild 1189 RMD160 fc2e86ef12b4c6e593a308ee10d4d52b4549370f SHA1 244ad96a597e4bbf977048f6f446eb7b939f8499 SHA256 89b5ddfacd07d2fece89b027918239fbe08234658f6d7017f5f5b4666ca01531 -MISC ChangeLog 668 RMD160 c52ece80d640bb6743d8f58698c316ee94621025 SHA1 fce33a671ab5be98dc5ae78da6661c8a512b34c9 SHA256 2aa23c776e76e601bbb52f63a767374ff7aa41720e84ce8bbd83e7785ea734a1 +EBUILD unixtop-3.8_beta1-r2.ebuild 1246 RMD160 2fa3011c9074e05c71ebe94ce61b4121301aa5ad SHA1 c474c9142fcc335e33cbb8945d71026aa76c2e17 SHA256 54d64d8f18d2079c87a21344f81c7544238770a0ed9aec059d4541803cc256a5 +MISC ChangeLog 968 RMD160 e1284d231129ceb2c3e236e7d00cc87962abf08d SHA1 8dad10b358fd2d6f85ded3c2f6a5da604997e148 SHA256 79345929333c7d2399b087b29895052c75bfe0c38cd4b15c0b90fcd52bb1592e MISC metadata.xml 160 RMD160 baab82f4bc435813cfde4796d42840882a9a4f8f SHA1 144e248704973cfad031c92a930aad01a62a2fda SHA256 27667dd7db1d188c12342624ec5ff2155717821d646e442aef9a691c65539ac4 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.14 (GNU/Linux) - -iEYEARECAAYFAktQyOMACgkQOeoy/oIi7uyRYQCfeiTmpZGy9oD+gjjtz8q9zXlv -sb0An0HFPtQhQmWQRu/ptsQaOxcBlxJp -=Pshq ------END PGP SIGNATURE----- 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 new file mode 100644 index 000000000000..a5a3bc58546d --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch @@ -0,0 +1,75 @@ +http://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); + + + diff --git a/sys-process/unixtop/unixtop-3.8_beta1-r2.ebuild b/sys-process/unixtop/unixtop-3.8_beta1-r2.ebuild new file mode 100644 index 000000000000..4f5541a1580d --- /dev/null +++ b/sys-process/unixtop/unixtop-3.8_beta1-r2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/unixtop/unixtop-3.8_beta1-r2.ebuild,v 1.1 2010/01/25 18:36:49 grobian Exp $ + +inherit eutils autotools + +DESCRIPTION="top for UNIX systems" +HOMEPAGE="http://unixtop.sourceforge.net/" +SRC_URI="mirror://sourceforge/unixtop/top-${PV/_/}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="sys-libs/ncurses" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/top-${PV/_/} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-ncurses.patch + epatch "${FILESDIR}"/${P}-no-AX-macros.patch + epatch "${FILESDIR}"/${P}-renice-segfault.patch + epatch "${FILESDIR}"/${P}-memleak-fix.patch + epatch "${FILESDIR}"/${P}-high-threadid-crash.patch + eautoreconf +} + +src_compile() { + local myconf= + + # don't do bi-arch cruft on hosts that support that, such as Solaris + export enable_dualarch=no + + # configure demands an override because on OSX this is "experimental" + [[ ${CHOST} == *-darwin* ]] && myconf="${myconf} --with-module=macosx" + + econf ${myconf} || die + emake || die +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README FAQ Y2K +} |