diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2014-07-15 16:42:21 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2014-07-15 16:42:21 +0000 |
commit | 12ae9d3b32ed42d80c34dd48c20d7c6aca5c5d7e (patch) | |
tree | a147369390d1dca467c4e0ff30a5e52c1351a681 /sys-block | |
parent | Stable for amd64 wrt bug #509944 (diff) | |
download | historical-12ae9d3b32ed42d80c34dd48c20d7c6aca5c5d7e.tar.gz historical-12ae9d3b32ed42d80c34dd48c20d7c6aca5c5d7e.tar.bz2 historical-12ae9d3b32ed42d80c34dd48c20d7c6aca5c5d7e.zip |
Cleanups to run better.
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/megactl/ChangeLog | 12 | ||||
-rw-r--r-- | sys-block/megactl/Manifest | 5 | ||||
-rw-r--r-- | sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch | 46 | ||||
-rw-r--r-- | sys-block/megactl/files/megactl-0.4.1-tracefix.patch | 232 | ||||
-rw-r--r-- | sys-block/megactl/megactl-0.4.1-r2.ebuild | 37 |
5 files changed, 328 insertions, 4 deletions
diff --git a/sys-block/megactl/ChangeLog b/sys-block/megactl/ChangeLog index 5e423483a413..b8436b06a9a7 100644 --- a/sys-block/megactl/ChangeLog +++ b/sys-block/megactl/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-block/megactl -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/megactl/ChangeLog,v 1.6 2014/07/14 00:52:23 robbat2 Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/megactl/ChangeLog,v 1.7 2014/07/15 16:42:16 robbat2 Exp $ + +*megactl-0.4.1-r2 (15 Jul 2014) + + 15 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> + +files/megactl-0.4.1-gcc-fixes.patch, +files/megactl-0.4.1-tracefix.patch, + +megactl-0.4.1-r2.ebuild: + Cleanups to run better. *megactl-0.4.1-r1 (21 Nov 2009) @@ -19,4 +26,3 @@ 10 Feb 2008; Wolfram Schlich <wschlich@gentoo.org> +files/megactl-0.4.1.patch, +metadata.xml, +megactl-0.4.1.ebuild: initial import - diff --git a/sys-block/megactl/Manifest b/sys-block/megactl/Manifest index f2e5432f598d..83e786aa58eb 100644 --- a/sys-block/megactl/Manifest +++ b/sys-block/megactl/Manifest @@ -1,6 +1,9 @@ AUX megactl-0.4.1-Makefile.patch 829 SHA256 adc9b926c9914bdf5f4fce787cd7f20fe764df9f5858398873bdf19ea74a8020 SHA512 1e458f68149fe4d1bfd9f77cb76adcfb3202f05b7c363ff1a73803db208493f901de377b65938c043245fd503410905d03b06810eeef6e2fa0039759797497a7 WHIRLPOOL aa1e959b55cda9d65b3795ee58b602a085443d68aa0943cee9958e6bc0588e5dc5aa54f1f37ceb704043919134054f9a4d64cecf17b10e6c5614ddefdc146a27 +AUX megactl-0.4.1-gcc-fixes.patch 2074 SHA256 651a116977589996194c4b728bf96a9d968d4615ce755a31d94279d5e6ed20ae SHA512 9e8ecc86db0189c6754b23da6126cb236d9a14550126efb9a86b1d7432bde0d0a68d2fd7f04e224e561b4ba04182768ae684bbf39e30b1891c0c1c0ad1c294c9 WHIRLPOOL 9814e31beb056fcfd2e6b92ac78e5be3cfadfcf0d2e476595f2232feed133a9999b855658a8e8ade88fb8fdcb5e3a50ad81c50d44926b3c7537f8a6da236acbe +AUX megactl-0.4.1-tracefix.patch 6650 SHA256 1f2f05185cfbc235085ce263cd0515160ba3eeb42a4524c48327acfb5651ca5c SHA512 c62bc15b9fe29b38415c7e632686f842fac2632ce7be5db5e3132ae6f024f43ef813133fa2c9038dba43ee70b322e27768e16054df550c871f817f827553c526 WHIRLPOOL 371519da996e329d7eb5eb29c6fc455cf119604262199d4eef1b187857d0d7d6b91de6858bfb23a3d176ed94e89017ef485442038c9ddb7a25097edae79a4fa0 AUX megactl-0.4.1.patch 1297 SHA256 7f57c47b137f8774aff79fc9b192e11b4227e620a13c4c7ed3e2a1475f927eb4 SHA512 6992e585bc3a8528d45aea9f57de296c67323489d74b48f2365b6052e51a525ac5a118d652f1c2ed924cf92424ef16de8f08ff146930f25a3acd14941cab3faf WHIRLPOOL 5d7c2c5c2f575683ac57158284a7fa0d9ac8bb04cd4decfa27a667f3334de8621c790a9c2ca5c6e8d44424fde409ec09d7e2f9f015fd971582c3d6e78b05ab5e DIST megactl-0.4.1.tar.gz 179173 SHA256 d7aee98035c97a1ff098450192f073565c4f2355079763f6dc6202be121720e8 SHA512 65a97f03fbe1c76375d2e16016c1e57c7e4544bfd7185b13a330560819caf48ecad8e9f1feb1d448b45d4f862abf2799868bd357d120019a709088c90b58ac92 WHIRLPOOL 61094c1cec453b5ee4a2e0f72d95d6e0ce0dacb3b6d56f6dca51e13fdd70f969021eb4f39934c29dd6124f1768896076cb495e8a2397bae521bd387db3badf21 EBUILD megactl-0.4.1-r1.ebuild 893 SHA256 2beaf2276996e76fe09c96698dc262839967f8544f46e0ee67331a3bec7512a4 SHA512 7e6d49d4df7ebbde6a92c74c1d532578897444f7b1957ec6f02c6e946a95fa25d4712fe5688c1c7bbde7f3873bbe0b60b824e5f66466beaaedabe6a660f1f5b7 WHIRLPOOL c24682ecb18838367c50160cbf05d747c39ce00c0736190494a7bc21adba4088adda7e476b35b4d511a5719886d2b6524638ba57b73075877675862feee5ef2d -MISC ChangeLog 741 SHA256 e614d4c4ab1620d6ba529420a536f545a365da63f755df7b26273b2360897c41 SHA512 ffe6fa6374bbf62731df0da2b34b095c17e06098ddce4fcf21e40ef1661f6fddacbe71da5c91a0a00bcc515e59097422e2f6abe3f2ab6fc05666c198add6ff83 WHIRLPOOL 148c1c1f39a71c1e789cfffd03d15e491e938b40c8c72f6911a9b379c11e3a43bb029aae422e90d57adb74754d47f07e10e365b5c2fb25a6831de889610e1ad7 +EBUILD megactl-0.4.1-r2.ebuild 928 SHA256 e9eae6981289c4f48b6bd8bc86dc7c645c0cfda34fc7c02c17adb8521e94368c SHA512 d275d669e97661aed94e2e203236f37ac33a67ec64d1bc93019320889b7435faa05ea2263131182281e37c7318befca3cebce5392457cfb9eae8e76e5cfcfb47 WHIRLPOOL 27dd762e1d3d5d8c7419856be5ea1223acc595668447369362a052106744365a35680a6ed90c392776b69fbbbdef64022950cce18cbb629f2bc47ca1faa9febd +MISC ChangeLog 958 SHA256 125439a973e7d06f1f79c7d246a5b4f1b6aceb3a879108c7e9d03b252b496cd7 SHA512 8c916232bbb86625ff798cb96548b96d13da3fb5cfdc88d866d5be9de955361c04f879bde51916290c1398805339c6b93789639bd71e465d5e1b52f6a0b2699d WHIRLPOOL 484d87c8b996633cfb5bf74904307e729099f5d79144972db8d79f999aee586827ec628ffef2c971e771464716ca39c167ff5097a6005b4e82e30edcf8ba58be MISC metadata.xml 436 SHA256 f6c31cd2da8da478fd3bd454b8c55d91d4091d3b3cc06a656c42a35a264dbd57 SHA512 e18822e331ca7bc7d2922bc2a222cd7e4e3dab354321f3d504e17bfb81eb2ab3a6bff946b9de668c7d28ea3bb0cadf3dc5f33c7591fec85a3cf4d87ff612de04 WHIRLPOOL 73ffe4572ba91c37cf5bb0c2e1746d74fedceabe0f73517608cfe38a1e7187f57acc31f95bb2d75a3b9426a60f00ab66694ad24d8fe76ebea6cf767e5a5f17b9 diff --git a/sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch b/sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch new file mode 100644 index 000000000000..7ea6e8cac453 --- /dev/null +++ b/sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch @@ -0,0 +1,46 @@ +diff -Nuar --exclude '*.swp' --exclude '*.o' megactl-0.4.1.orig/src/callinfo.c megactl-0.4.1/src/callinfo.c +--- megactl-0.4.1.orig/src/callinfo.c 2007-08-21 00:19:53.000000000 -0700 ++++ megactl-0.4.1/src/callinfo.c 2014-07-13 22:05:06.585598812 -0700 +@@ -255,7 +255,12 @@ + { SYS_setfsgid32, 0, "setfsgid32" }, + { SYS_pivot_root, 0, "pivot_root" }, + { SYS_mincore, 0, "mincore" }, ++#ifdef SYS_madvise ++ { SYS_madvise, 0, "madvise" }, ++#endif ++#ifdef SYS_madvise1 + { SYS_madvise1, 0, "madvise1" }, ++#endif + { SYS_getdents64, 0, "getdents64" }, + { SYS_fcntl64, 0, "fcntl64" }, + { 222, 0, NULL }, +diff -Nuar --exclude '*.swp' --exclude '*.o' megactl-0.4.1.orig/src/logpage.c megactl-0.4.1/src/logpage.c +--- megactl-0.4.1.orig/src/logpage.c 2007-08-21 00:19:53.000000000 -0700 ++++ megactl-0.4.1/src/logpage.c 2014-07-13 21:58:34.010848677 -0700 +@@ -20,6 +20,8 @@ + * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + ++#define __STDC_FORMAT_MACROS ++#include <inttypes.h> + + #include "megaioctl.h" + #include "logpage.h" +@@ -107,7 +109,7 @@ + + for (k = 0; (b >= 1024) && (k < sizeof (suffix) / sizeof (suffix[0]) - 1); ++k, b /= 1024) + ; +- snprintf (bytes, sizeof bytes, "%3llu%s%s", b, suffix[k], unit); ++ snprintf (bytes, sizeof bytes, "%3" PRIu64 "%s%s", b, suffix[k], unit); + return bytes; + } + +@@ -378,7 +380,7 @@ + default: result = "unknown result"; notice = 0; break; + } + if (verbosity > notice) +- fprintf (f, " %2d: timestamp %4ud%02uh: %10s %-30s seg:%u lba:%-8lld sk:%u asc:%u ascq:%u vs:%u\n", k, t->timestamp / 24, t->timestamp % 24, test, result, t->number, t->lba, t->sense_key, t->additional_sense_code, t->additional_sense_code_qualifier, t->vendor_specific); ++ fprintf (f, " %2d: timestamp %4ud%02uh: %10s %-30s seg:%u lba:%-8"PRIu64" sk:%u asc:%u ascq:%u vs:%u\n", k, t->timestamp / 24, t->timestamp % 24, test, result, t->number, t->lba, t->sense_key, t->additional_sense_code, t->additional_sense_code_qualifier, t->vendor_specific); + } + } + break; diff --git a/sys-block/megactl/files/megactl-0.4.1-tracefix.patch b/sys-block/megactl/files/megactl-0.4.1-tracefix.patch new file mode 100644 index 000000000000..915cc2d2a20d --- /dev/null +++ b/sys-block/megactl/files/megactl-0.4.1-tracefix.patch @@ -0,0 +1,232 @@ +diff -Nuar megactl-0.4.1.orig/src/megactl.c megactl-0.4.1/src/megactl.c +--- megactl-0.4.1.orig/src/megactl.c 2007-08-21 00:19:53.000000000 -0700 ++++ megactl-0.4.1/src/megactl.c 2014-07-14 11:15:14.538745305 -0700 +@@ -45,6 +45,9 @@ + + ********************************************************************/ + ++#define __STDC_FORMAT_MACROS ++#include <inttypes.h> ++ + #include "mega.h" + #include "megaioctl.h" + #include "adapter.h" +@@ -207,7 +210,7 @@ + + for (k = 0; (b >= 1024) && (k < sizeof (suffix) / sizeof (suffix[0]) - 1); ++k, b /= 1024) + ; +- snprintf (bytes, sizeof bytes, "%3llu%s%s", b, suffix[k], unit); ++ snprintf (bytes, sizeof bytes, "%3"PRIu64"%s%s", b, suffix[k], unit); + return bytes; + } + +@@ -604,6 +607,8 @@ + fprintf (stderr, "megaraid driver version %x too old.\n", driverVersion); + return 1; + } ++#else ++ driverVersion = 0; + #endif + + if (megaGetNumAdapters (fd, &numAdapters, sas) < 0) +diff -Nuar megactl-0.4.1.orig/src/megaioctl.c megactl-0.4.1/src/megaioctl.c +--- megactl-0.4.1.orig/src/megaioctl.c 2014-07-14 11:30:03.590781305 -0700 ++++ megactl-0.4.1/src/megaioctl.c 2014-07-14 11:31:36.410258930 -0700 +@@ -87,7 +87,11 @@ + m->cmd = cmd; + m->opcode = opcode; + m->subopcode = subopcode; ++#ifdef __x86_64__ ++ m->xferaddr = (uint64_t) data; ++#else + m->xferaddr = (uint32_t) data; ++#endif + if (data) + memset (data, 0, len); + +@@ -115,7 +119,11 @@ + m->cmd = cmd; + m->opcode = opcode; + m->subopcode = subopcode; ++#ifdef __x86_64__ ++ m->xferaddr = (uint64_t) data; ++#else + m->xferaddr = (uint32_t) data; ++#endif + if (data) + memset (data, 0, len); + +@@ -178,11 +186,19 @@ + u.ui.fcs.adapno = MKADAP(adapter->adapno); + u.data = data; + m->cmd = MBOXCMD_PASSTHRU; ++#ifdef __x86_64__ ++ m->xferaddr = (uint64_t) p; ++#else + m->xferaddr = (uint32_t) p; ++#endif + p->timeout = 3; + p->ars = 1; + p->target = target; +- p->dataxferaddr = (uint32_t) data; ++#ifdef __x86_64__ ++ p->dataxferaddr = (uint64_t) data; ++#else ++ p->dataxferaddr = (uint32_t) data; ++#endif + p->dataxferlen = len; + p->scsistatus = 239; /* HMMM */ + memcpy (p->cdb, cdb, cdblen); +diff -Nuar megactl-0.4.1.orig/src/megatrace.c megactl-0.4.1/src/megatrace.c +--- megactl-0.4.1.orig/src/megatrace.c 2014-07-14 01:31:47.704312799 -0700 ++++ megactl-0.4.1/src/megatrace.c 2014-07-14 11:37:20.570755832 -0700 +@@ -170,7 +170,11 @@ + fprintf (stderr, "ptrace:getregs: %s\n", strerror (errno)); + exit (1); + } ++#ifdef __x86_64__ ++ call = r.orig_rax; ++#else + call = r.orig_eax; ++#endif + /*printthis = call == SYS_ioctl;*/ + + if (state == INBOUND) +@@ -188,18 +192,30 @@ + { + if ((call < 0) || (call > callmax) || (callinfo[call].name == NULL)) + { ++#ifdef __x86_64__ ++ fprintf (stderr, "= 0x%08llx\n", (unsigned long long) r.rax); ++#else + fprintf (stderr, "= 0x%08lx\n", (unsigned long) r.eax); ++#endif + } + else + { + if (callinfo[call].ptrval) + { + if (printcalls || printthis) ++#ifdef __x86_64__ ++ fprintf (stderr, " = 0x%08llx\n", r.rax); ++#else + fprintf (stderr, " = 0x%08lx\n", r.eax); ++#endif + } + else + { ++#ifdef __x86_64__ ++ long rv = r.rax; ++#else + long rv = r.eax; ++#endif + if (rv < 0) + { + if (printcalls || printthis) +@@ -219,16 +235,22 @@ + unsigned int len = 16; + unsigned char buf[65536]; + ++#ifdef __x86_64__ ++ unsigned long long fd = r.rbx; ++ unsigned long long ioc = r.rcx; ++ unsigned long long arg = r.rdx; ++#else + unsigned long fd = r.ebx; +- + unsigned long ioc = r.ecx; ++ unsigned long arg = r.edx; ++#endif ++ + unsigned int iocdir = _IOC_DIR(ioc); + unsigned char ioctype = _IOC_TYPE(ioc); + unsigned int iocnr = _IOC_NR(ioc); + unsigned int iocsize = _IOC_SIZE(ioc); + char *iocdirname; + +- unsigned long arg = r.edx; + + switch (iocdir) + { +@@ -240,7 +262,11 @@ + + fprintf (stderr, "%s: ioctl(%ld, _IOC(\"%s\",'%c',0x%02x,0x%02x), 0x%08lx)", tbuf, fd, iocdirname, ioctype, iocnr, iocsize, arg); + if (state == OUTBOUND) ++#ifdef __x86_64__ ++ fprintf (stderr, " = %lld\n", r.rax); ++#else + fprintf (stderr, " = %ld\n", r.eax); ++#endif + if (getenv ("LOG_INBOUND")) + fprintf (stderr, "\n"); + +@@ -249,10 +275,18 @@ + if (len > sizeof buf) + len = sizeof buf; + ++#ifdef __x86_64__ ++ if (printregs) ++ fprintf (stderr, " rbx=%08llx rcx=%08llx rdx=%08llx rsi=%08llx rdi=%08llx rbp=%08llx rax=%08llx ds=%08llx es=%08llx fs=%08llx gs=%08llx orig_rax=%08llx rip=%08llx cs=%08llx eflags=%08llx rsp=%08llx ss=%08llx\n", r.rbx, r.rcx, r.rdx, r.rsi, r.rdi, r.rbp, r.rax, r.ds, r.es, r.fs, r.gs, r.orig_rax, r.rip, r.cs, r.eflags, r.rsp, r.ss); ++ ++ copyout (buf, len, pid, r.rdx); ++#else + if (printregs) + fprintf (stderr, " ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx eax=%08lx xds=%08lx xes=%08lx xfs=%08lx xgs=%08lx orig_eax=%08lx eip=%08lx xcs=%08lx eflags=%08lx esp=%08lx xss=%08lx\n", r.ebx, r.ecx, r.edx, r.esi, r.edi, r.ebp, r.eax, r.xds, r.xes, r.xfs, r.xgs, r.orig_eax, r.eip, r.xcs, r.eflags, r.esp, r.xss); + + copyout (buf, len, pid, r.edx); ++#endif ++ + + if ((ioctype == 'm') && (iocnr == 0) && (iocsize == sizeof (struct uioctl_t))) + { +@@ -405,7 +439,11 @@ + else + { + fprintf (stderr, " host %d, off 0x%04x, count %d, sense_off 0x%08x, sense_len 0x%08x\n", iocp->host_no, iocp->sgl_off, iocp->sge_count, iocp->sense_off, iocp->sense_len); ++#ifdef __x86_64__ ++ dumpbytes (stderr, buf, len, (void *) r.rdx, NULL); ++#else + dumpbytes (stderr, buf, len, (void *) r.edx, NULL); ++#endif + } + if (log) + { +@@ -427,23 +465,38 @@ + } + else + { ++#ifdef __x86_64__ ++ dumpbytes (stderr, buf, len, (void *) r.rdx, NULL); ++#else + dumpbytes (stderr, buf, len, (void *) r.edx, NULL); ++#endif + } + fprintf (stderr, "\n"); + } + + switch (state) + { ++#ifdef __x86_64__ ++ static u64 lastrip = 0; ++#else + static u32 lasteip = 0; ++#endif ++ + + case UNTRACED: + /* We don't know whether we were inbound or outbound on the first signal; this + appears to differ between kernels. So we defer until we see the same eip in + two successive traps, at which point we know we were outbound, so the next + trap is inbound. */ ++#ifdef __x86_64__ ++ if (lastrip == r.rip) ++ state = INBOUND; ++ lastrip = r.rip; ++#else + if (lasteip == r.eip) + state = INBOUND; + lasteip = r.eip; ++#endif + break; + case INBOUND: state = OUTBOUND; break; + case OUTBOUND: state = INBOUND; break; diff --git a/sys-block/megactl/megactl-0.4.1-r2.ebuild b/sys-block/megactl/megactl-0.4.1-r2.ebuild new file mode 100644 index 000000000000..41dc4c388a1f --- /dev/null +++ b/sys-block/megactl/megactl-0.4.1-r2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/megactl/megactl-0.4.1-r2.ebuild,v 1.1 2014/07/15 16:42:16 robbat2 Exp $ + +EAPI=2 + +inherit eutils + +IUSE="" +DESCRIPTION="LSI MegaRAID control utility" +HOMEPAGE="http://sourceforge.net/projects/megactl/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +src_prepare() { + epatch "${FILESDIR}"/${P}.patch + epatch "${FILESDIR}"/${P}-Makefile.patch + epatch "${FILESDIR}"/${P}-gcc-fixes.patch + epatch "${FILESDIR}"/${P}-tracefix.patch +} + +src_compile() { + cd src + use x86 && MY_MAKEOPTS="ARCH=-m32" + use amd64 && MY_MAKEOPTS="ARCH=-m64" + emake ${MY_MAKEOPTS} || die "make failed" +} + +src_install() { + cd src + dosbin megactl megasasctl megarpt megasasrpt + # it's not quite fixed yet + [ -x megatrace ] && dosbin megatrace + dodoc ../README +} |