diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-block/megactl | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-block/megactl')
-rw-r--r-- | sys-block/megactl/Manifest | 1 | ||||
-rw-r--r-- | sys-block/megactl/files/megactl-0.4.1-Makefile.patch | 26 | ||||
-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/files/megactl-0.4.1.patch | 21 | ||||
-rw-r--r-- | sys-block/megactl/megactl-0.4.1-r1.ebuild | 35 | ||||
-rw-r--r-- | sys-block/megactl/megactl-0.4.1-r2.ebuild | 37 | ||||
-rw-r--r-- | sys-block/megactl/metadata.xml | 14 |
8 files changed, 412 insertions, 0 deletions
diff --git a/sys-block/megactl/Manifest b/sys-block/megactl/Manifest new file mode 100644 index 000000000000..65af2ba804f0 --- /dev/null +++ b/sys-block/megactl/Manifest @@ -0,0 +1 @@ +DIST megactl-0.4.1.tar.gz 179173 SHA256 d7aee98035c97a1ff098450192f073565c4f2355079763f6dc6202be121720e8 SHA512 65a97f03fbe1c76375d2e16016c1e57c7e4544bfd7185b13a330560819caf48ecad8e9f1feb1d448b45d4f862abf2799868bd357d120019a709088c90b58ac92 WHIRLPOOL 61094c1cec453b5ee4a2e0f72d95d6e0ce0dacb3b6d56f6dca51e13fdd70f969021eb4f39934c29dd6124f1768896076cb495e8a2397bae521bd387db3badf21 diff --git a/sys-block/megactl/files/megactl-0.4.1-Makefile.patch b/sys-block/megactl/files/megactl-0.4.1-Makefile.patch new file mode 100644 index 000000000000..f1ee2f9bb2a4 --- /dev/null +++ b/sys-block/megactl/files/megactl-0.4.1-Makefile.patch @@ -0,0 +1,26 @@ +diff -urN megactl-0.4.1.orig/src/Makefile megactl-0.4.1/src/Makefile +--- megactl-0.4.1.orig/src/Makefile 2007-08-21 09:19:53.000000000 +0200 ++++ megactl-0.4.1/src/Makefile 2009-11-21 12:30:44.242501898 +0100 +@@ -1,11 +1,17 @@ + +-SRCS= megactl.c adapter.c megaioctl.c megatrace.c callinfo.c dumpbytes.c logpage.c ntrim.c ++SRCS= megactl.c adapter.c megaioctl.c callinfo.c dumpbytes.c logpage.c ntrim.c + INC= -I./schily -Iincludes-hack + HDRS= mega.h adapter.h megaioctl.h callinfo.h logpage.h dumpbytes.h +-ARCH= -m32 +-CFLAGS= -g -Wall $(INC) $(ARCH) +-LDFLAGS= -g $(ARCH) +-PROGRAMS= megactl megasasctl megatrace ++ARCH?= -m32 ++CFLAGS?= -g -Wall ++CFLAGS+= $(INC) $(ARCH) ++LDFLAGS?= -g ++LDFLAGS+= $(ARCH) ++PROGRAMS= megactl megasasctl ++ifeq ($(ARCH),-m32) ++PROGRAMS+= megatrace ++SRCS+= megatrace.c ++endif + + all: $(PROGRAMS) + 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/files/megactl-0.4.1.patch b/sys-block/megactl/files/megactl-0.4.1.patch new file mode 100644 index 000000000000..3d857c9c1c57 --- /dev/null +++ b/sys-block/megactl/files/megactl-0.4.1.patch @@ -0,0 +1,21 @@ +diff -urN megactl-0.4.1.orig/src/megatrace.c megactl-0.4.1/src/megatrace.c +--- megactl-0.4.1.orig/src/megatrace.c 2007-08-21 09:19:53.000000000 +0200 ++++ megactl-0.4.1/src/megatrace.c 2008-02-10 21:27:24.416919438 +0100 +@@ -49,7 +49,7 @@ + #include <signal.h> + #include <sys/ptrace.h> + #include <sys/wait.h> +-#include <asm/user.h> ++#include <sys/user.h> + #include <sys/syscall.h> + #include <sys/ioctl.h> + #include <sys/time.h> +@@ -250,7 +250,7 @@ + len = sizeof buf; + + if (printregs) +- fprintf (stderr, " ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx eax=%08lx ds=%04x __ds=%04x es=%04x __es=%04x fs=%04x __fs=%04x gs=%04x __gs=%04x orig_eax=%08lx eip=%08lx cs=%04x __cs=%04x eflags=%08lx esp=%08lx ss=%04x __ss=%04x\n", r.ebx, r.ecx, r.edx, r.esi, r.edi, r.ebp, r.eax, r.ds, r.__ds, r.es, r.__es, r.fs, r.__fs, r.gs, r.__gs, r.orig_eax, r.eip, r.cs, r.__cs, r.eflags, r.esp, r.ss, r.__ss); ++ 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); + diff --git a/sys-block/megactl/megactl-0.4.1-r1.ebuild b/sys-block/megactl/megactl-0.4.1-r1.ebuild new file mode 100644 index 000000000000..75feffe51724 --- /dev/null +++ b/sys-block/megactl/megactl-0.4.1-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 +} + +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 + use x86 && dosbin megatrace + use amd64 && ewarn "megatrace was not installed because it does not compile on amd64" + dodoc megarpt megasasrpt ../README +} 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..73e8b9ba2eab --- /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 +# $Id$ + +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 +} diff --git a/sys-block/megactl/metadata.xml b/sys-block/megactl/metadata.xml new file mode 100644 index 000000000000..3591081b02d5 --- /dev/null +++ b/sys-block/megactl/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- used by infra, please do not non-maintainer drop --> + <herd>sysadmin</herd> + <longdescription> +This project is a small collection of programs for examining configuration and +status of LSI megaraid adapters, especially Dell PERC RAID adapters, and +attached storage devices. +</longdescription> + <upstream> + <remote-id type="sourceforge">megactl</remote-id> + </upstream> +</pkgmetadata> |