--- dmraid-1.0.0.rc16.orig/1.0.0.rc16/autoconf/config.guess +++ dmraid-1.0.0.rc16/1.0.0.rc16/autoconf/config.guess @@ -1,13 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2003-06-17' +timestamp='2016-10-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -16,24 +15,22 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -53,8 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -66,11 +62,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +100,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +119,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -136,12 +132,33 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -151,22 +168,33 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -176,7 +204,14 @@ fi ;; *) - os=netbsd + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release @@ -189,57 +224,50 @@ release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -247,72 +275,82 @@ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -320,32 +358,51 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -354,13 +411,13 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -369,10 +426,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -382,38 +439,41 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -437,35 +497,36 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -478,29 +539,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -508,7 +569,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -523,49 +584,54 @@ exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; - *:AIX:*:[45]) + exit ;; + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -574,74 +640,84 @@ 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -669,318 +745,357 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - mips64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -988,15 +1103,16 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1088,288 +1217,217 @@ else echo ns32k-sni-sysv fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; - esac + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - cat >&2 < in order to provide the needed -information to handle your system. +This script (version $timestamp), has failed to recognize the +operating system you are using. If your script is old, overwrite +config.guess and config.sub with the latest versions from: + + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +and + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp --- dmraid-1.0.0.rc16.orig/1.0.0.rc16/autoconf/config.sub +++ dmraid-1.0.0.rc16/1.0.0.rc16/autoconf/config.sub @@ -1,42 +1,40 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2003-06-17' +timestamp='2016-11-04' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# along with this program; if not, see . +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. + +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -55,8 +53,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -70,8 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -83,11 +79,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +95,7 @@ *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,10 +114,18 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -144,10 +148,13 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -162,13 +169,17 @@ os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -185,6 +196,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -202,6 +217,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -226,55 +247,115 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ + | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | openrisc | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -290,58 +371,90 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* \ - | m32r-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ - | v850-* | v850e-* | vax-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -359,6 +472,9 @@ basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -376,6 +492,9 @@ amd64) basic_machine=x86_64-pc ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -399,6 +518,13 @@ basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -407,10 +533,35 @@ basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -435,12 +586,27 @@ basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -463,6 +629,14 @@ basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -471,6 +645,14 @@ basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -574,7 +756,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -613,6 +794,17 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -624,10 +816,21 @@ basic_machine=ns32k-utek os=-sysv ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -641,10 +844,6 @@ mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -653,14 +852,29 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -725,9 +939,11 @@ np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem @@ -736,9 +952,12 @@ basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -756,6 +975,14 @@ basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -765,6 +992,12 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -794,11 +1027,12 @@ ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -808,7 +1042,7 @@ ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -821,6 +1055,14 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -847,6 +1089,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -858,6 +1104,9 @@ basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -879,6 +1128,9 @@ basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -935,17 +1187,9 @@ basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown @@ -960,6 +1204,10 @@ tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -1003,9 +1251,16 @@ basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1014,6 +1269,10 @@ basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1033,6 +1292,9 @@ romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1049,13 +1311,10 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1099,9 +1358,12 @@ if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1122,25 +1384,32 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1158,12 +1427,15 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1176,6 +1448,9 @@ -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1197,6 +1472,9 @@ -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; @@ -1219,6 +1497,9 @@ -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1252,8 +1533,15 @@ -aros*) os=-aros ;; - -kaos*) - os=-kaos + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -ios) ;; -none) ;; @@ -1277,6 +1565,12 @@ # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1286,9 +1580,24 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1307,13 +1616,13 @@ ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1332,9 +1641,15 @@ *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; @@ -1437,7 +1752,7 @@ -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) @@ -1467,9 +1782,15 @@ -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; @@ -1494,7 +1815,7 @@ esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) --- dmraid-1.0.0.rc16.orig/debian/README.source +++ dmraid-1.0.0.rc16/debian/README.source @@ -0,0 +1,135 @@ +dmraid subversion repository has been converted into a git repository, hosted +at git.debian.org. + +http://git.debian.org/?p=users/derevko-guest/dmraid.git +git://git.debian.org/git/users/derevko-guest/dmraid.git + +For dmraid-debian developers: + +git clone ssh://@git.debian.org/git/users/derevko-guest/dmraid.git + + +== Best practices == + +* debian/changelog + +Do not update your change in debian/changelog, we will use git-dch(1) before +doing a release or anytime between releases. + +The simplest way is doing all the changes to the debian-branch without touching +debian/changelog at all. Then, when done, do: + +git-dch --release + +This will look up the latest released version in the changelog, increment the +version in the Debian changelog, generate changelog messages from the +corresponding Git commit id up to the branch head and finally spawns an editor +for final changelog file editing by invoking dch --release. + +But what if you want to have an (unreleased) snapshot for intermediate testing: + +git-dch --snapshot + +will generate a snapshot release with a specially crafted version number and a +warning in the changelog that this is a snapshort release: + +git-buildpackage (0.3.7~1.gbp470ce2) UNRELEASED; urgency=low + + ** SNAPSHOT build @470ce29ec7877705c844474a2fd89869aea0406d ** + + * add support for automatic snapshot + +During subsequent calls with --snapshot this version number will continue to +increase. Since the snapshot banners contains the commit id of the current +branch head, git-dch can figure out what to append to the changelog by itself: + +git-dch --snapshot --auto + +will fetch the commit id and add changelog entries from that point to the +current HEAD - again auto incrementing the version number. If you don't want to +start at that commit id, you can specify any id or tag with: + +git-dch --since=e76a6a180a57701ae4ae381f74523cacb3152780 --snapshot + +After testing you can remove the snapshot header by a final git-dch call: + +git-dch --since=HEAD --release + +This will add no further entries but simply remove the specially crafted version +number and the snapshort header. Again you can use any commit id or tag instead +of HEAD if you want to add further changelog entries - or you can (of course) +use --auto again. + + +* git commit + +Usually changelog entries should correspond to a single Git commit. In this case +it's convenient to include the commit id in the changelog entry. This has the +advantage that it's easy for people to identify changes without having to write +very extensive changelog messages - the link back to Git can be automated via +the Vcs-Browser and Vcs-Git fields in debian/control. + +See Cl2vcs for how this looks: https://honk.sigxcpu.org/cl2vcs/index.cgi?pkg=dmraid + +For this reason it´s a good idea to begin the commit message with a single +line summarizing the change (it will be the changelog entry, so add the Close: +or LP: entry), followed by a blank line and then a more thorough description. + + +* Configuration files + +Here my configuration files, if you like cowbuilder you can use them. + +~/.gbp.conf : + +[DEFAULT] +builder = /usr/bin/git-pbuilder +cleaner = fakeroot debian/rules clean +pristine-tar = True + +[git-buildpackage] +export-dir = ../build-area/ +tarball-dir = ../tarballs/ +sign-tags = True +#keyid = 0xAE3BE9AA +[git-dch] +id-length=7 +meta=True + + + + +~/.gitconfig + +[user] + name = Giuseppe Iuculano + email = giuseppe@iuculano.it +[color] + diff = auto + status = auto + branch = auto +[branch "master"] + remote = origin + merge = refs/heads/master +[branch "upstream"] + remote = origin + merge = refs/heads/upstream +[branch "pristine-tar"] + remote = origin + merge = refs/heads/pristine-tar + + + + + +/usr/bin/git-pbuilder + +#!/bin/sh +# +# pbuilder helper for git-buildpackage +# use this as "builder" in gbp.conf +set -e + +# pass all options to dpkg-buildpackage: +pdebuild --pbuilder cowbuilder --auto-debsign --debsign-k AE3BE9AA $PBUILDER_OPTS --debbuildopts "-i\.git/ -I.git $*" + --- dmraid-1.0.0.rc16.orig/debian/changelog +++ dmraid-1.0.0.rc16/debian/changelog @@ -0,0 +1,856 @@ +dmraid (1.0.0.rc16-8ubuntu1) artful; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Depend on kpartx-boot to pull kpartx into the initramfs + - Depend on kpart-udeb + - Remove modprobe dm-raid45 from dmraid-activate. + - debian/dmraid-activate: Remove the special-casing of the root + device which breaks in many situations and leaves the raw devices + exposed. + - Do not assemble Intel Rapid (Matrix) Storage, if mdmon (mdadm) is + present and not disabled. + - Correct dmraid fallback ddf assembly warning message. + - debian/dmraid.udev: Removed |change udev rule for dmraid-activate + to prevent infinite udev event loop. + - Use kpartx to activate partitions + - Drop force loading dm-raid45 module in the initramfs hook. + - Fix initramfs hook to copy correct udev rules file with new priority of + 97 instead of 85 + - drop debian/patches/04_do_not_use_p_for_partition.patch, bringing our + device naming into line with upstream. + - Add 21_fix_testing.patch + - Fix once again the jmicron naming bug, upstream fix does not work + - Add 23_pdc_dump_extended_metadata.patch + - Add 24_drop_p_for_partition_conditional.patch + - Add 25_change-uuid.patch + - 27_ignore-too-small-devices.patch: ignore devices with less than 8 + sectors. + * Dropped changes: + - Breaks libparted0debian1 (<< 2.3-5ubuntu4): obsolete. + - Add breaks on mdadm: obsolete. + - Comment out "udevadm trigger" call in postinst: re-enable; this was + relevant only for mountall-using systems, and mountall is now + obsolete post-16.04. + - Setting configure executable in debian/rules to avoid odd FTBFS: this + should never happen with a proper build environment, fix your VCS + check-in instead. + * Dropped changes, included in Debian: + - Convert library to use the dm-raid upstream module instead of the + out-of-tree dm-raid45 one. + + -- Steve Langasek Mon, 15 May 2017 10:06:20 -0700 + +dmraid (1.0.0.rc16-8) unstable; urgency=medium + + * Fix library dev symlink (closes: 856946). + * Update paths in copyright. + + -- Laszlo Boszormenyi (GCS) Sun, 12 Mar 2017 10:07:09 +0000 + +dmraid (1.0.0.rc16-7) unstable; urgency=low + + * Sync with Ubuntu. + + [ Dimitri John Ledkov ] + * Drop force loading dm-raid45 module in the initramfs hook + (closes: #745697). + + -- Laszlo Boszormenyi (GCS) Sat, 07 Feb 2015 13:47:48 +0000 + +dmraid (1.0.0.rc16-6) unstable; urgency=low + + * New maintainer (closes: #613706). + + [ Simon Ward ] + * Fix manpage typos (closes: #525252). + + -- Laszlo Boszormenyi (GCS) Thu, 04 Dec 2014 20:44:01 +0000 + +dmraid (1.0.0.rc16-5) unstable; urgency=low + + * QA upload. + * debian/control: + - Maintainer field set to QA Group. + - Drop Uploaders field. + - Bump Standards-Version to 3.9.5. + * debian/rules: + - Export dpkg buildflags. + - Add missing targets: build-{arch,indep}. + * debian/compat: set debhelper compatibility level to 9. + * debian/watch updated. + + -- Emanuele Rocca Sun, 19 Jan 2014 17:59:25 +0100 + +dmraid (1.0.0.rc16-4.2ubuntu4) artful; urgency=medium + + * No-change rebuild to pick up -fPIE compiler default in static + libraries + + -- Steve Langasek Fri, 21 Apr 2017 20:47:33 +0000 + +dmraid (1.0.0.rc16-4.2ubuntu3) trusty; urgency=medium + + * Correct dmraid fallback imsm assembly logic. + * Correct dmraid fallback ddf assembly warning message. + + -- Dimitri John Ledkov Tue, 18 Feb 2014 15:55:06 +0000 + +dmraid (1.0.0.rc16-4.2ubuntu2) trusty; urgency=low + + [ Dimitri John Ledkov ] + * Do not assemble Intel Rapid (Matrix) Storage, if mdmon (mdadm) is + present and not disabled. + * Add breaks on mdadm, of versions which do not assembly fakeraid arrays + by default using mdmon. + * Drop force loading dm-raid45 module in the initramfs hook. + + [ Stefan Bader ] + * Convert library to use the dm-raid upstream module instead of the + out-of-tree dm-raid45 one. + * Hack to ignore devices with less than 8 sectors (which avoids error + messages when probing for meta-data). + * Remove modprobe dm-raid45 from dmraid-activate. + * Setting configure executable in debian/rules to avoid odd FTBS in + some cases. + + -- Dimitri John Ledkov Tue, 18 Feb 2014 08:17:24 +0000 + +dmraid (1.0.0.rc16-4.2ubuntu1) raring; urgency=low + + * Merge from debian. To pick up NMU. Everything else is still the same: + - Depend on kpartx-boot to pull kpartx into the initramfs (LP: #941874) + - Depend on kpart-udeb + - Breaks libparted0debian1 (<< 2.3-5ubuntu4) + - Use kpartx to activate partitions + - Add 25_change-uuid.patch + - Add 23_pdc_dump_extended_metadata.patch + - Add 21_fix_testing.patch + - Add 24_drop_p_for_partition_conditional.patch + - Fix once again the jmicron naming bug, upstream fix does not work + - debian/dmraid-activate: Remove the special-casing of the root + device which breaks in many situations and leaves the raw devices + exposed. + - debian/dmraid.postinst: Comment out "udevadm trigger" call in postinst + for now as it has severeconsequences when mountall is installed + (clears /tmp). + - debian/dmraid.udev: Removed |change udev rule for dmraid-activate + to prevent infinite udev event loop. + + -- Dmitrijs Ledkovs Fri, 11 Jan 2013 18:01:15 +0000 + +dmraid (1.0.0.rc16-4.2) unstable; urgency=low + + * Non-maintainer upload. + * Call udevadm settle before activating dmraid devices + (Closes: #677450) + + -- Ulrich Dangel Mon, 10 Sep 2012 17:35:50 +0100 + +dmraid (1.0.0.rc16-4.1ubuntu9) quantal; urgency=low + + * Rebuild for new armel compiler default of ARMv5t. + + -- Colin Watson Mon, 01 Oct 2012 21:00:29 +0100 + +dmraid (1.0.0.rc16-4.1ubuntu8) precise; urgency=low + + * Depend on kpartx-boot to pull kpartx into the initramfs (LP: #941874) + + -- Phillip Susi Tue, 20 Mar 2012 15:37:44 -0400 + +dmraid (1.0.0.rc16-4.1ubuntu7) precise; urgency=low + + * Fix Update initramfs hook to copy correct udev rules file with + new priority of 97 instead of 85 (LP: #941874) + + -- Phillip Susi Tue, 13 Mar 2012 14:12:07 -0400 + +dmraid (1.0.0.rc16-4.1ubuntu6) precise; urgency=low + + * Depend on kpartx-udeb rather than multipath-udeb, now that it exists + (LP: #922646). + + -- Colin Watson Sat, 28 Jan 2012 11:37:27 +0000 + +dmraid (1.0.0.rc16-4.1ubuntu5) precise; urgency=low + + * Switch to using kpartx to activate partitions. This + allows dmraid to work on gpt formatted disks. Change + priority of udev rule so it runs after kpartx. + * Add 25_change-uuid.patch: Change the UUID set on partitions + and internal subset devices ( each half of a raid10 ) to + differentiate them from the main disk so that parted will + not show the internal subset devices and kpartx will not + probe them for partitions. + + -- Phillip Susi Sun, 08 Jan 2012 16:28:52 -0500 + +dmraid (1.0.0.rc16-4.1ubuntu4) oneiric; urgency=low + + * Drop 22_add_pdc_64bit_addressing.patch: breaks some + pdc raid sets (LP: #770600) + + -- Phillip Susi Thu, 28 Apr 2011 20:28:07 -0400 + +dmraid (1.0.0.rc16-4.1ubuntu3) natty; urgency=low + + * Fix typo in 23_pdc_dump_extended_metadata.patch. + + -- Colin Watson Sat, 26 Mar 2011 00:32:44 +0000 + +dmraid (1.0.0.rc16-4.1ubuntu2) natty; urgency=low + + * Added 21_fix_testing.patch: Testing with dm devices was failing + on Ubuntu because /dev/dm-X is the actual device node, but the + code wanted it to be a symlink. Fixed dm_test_device() to test + that the file ( or node it points to ) is a block device, which + seems a much more appropriate test. + * Added 22_add_pdc_64bit_addressing.patch: PDC metadata locations for + high bytes of raid set sector count (LP: #599255) + [ Danny Wood ] + * Added 23_pdc_dump_extended_metadata.patch: PDC supports up to 4 + sets of metadata to describe different arrays. Only the first + set was being dumped with dmraid -rD or -n. Also fixes the + .offset file, which was always 0 instead of the actual offset. + * Added 24_drop_p_for_partition_conditional.patch: + dmraid was changed at one point to insert a 'p' between + the base device name and the partition number. For + some time debian and ubuntu reversed this change. This + patch modifies the behavior to add the 'p' iff the last + character of the base name is a digit. This makes + dmraid comply with the behavior used by kpartx and + "by linux since the dawn of time". + * Fix once again the jmicron naming bug, upstream fix does not work + (LP: #576289) + [ Danny Wood ] + * Breaks libparted0debian1 (<< 2.3-5ubuntu4) + + -- Phillip Susi Fri, 04 Mar 2011 13:42:01 -0500 + +dmraid (1.0.0.rc16-4.1ubuntu1) natty; urgency=low + + * Merge from debian unstable. Remaining changes: (LP: #707776) + - debian/dmraid-activate: Remove the special-casing of the root + device which breaks in many situations and leaves the raw devices + exposed. This was introduced in Debian to accommodate some broken + configurations which wanted to access "partitions" on the raid + raw devices. In Ubuntu, broken configurations has not been supported. + - debian/dmraid.postinst: Comment out "udevadm trigger" call in postinst + for now as it has severeconsequences when mountall is installed + (clears /tmp). If dmraid is installed, then presumably the important + system devices are up and one can be bothered with a reboot to take + the change into account. Let update-initramfs flag the system + as needing a reboot. + - debian/dmraid.udev: Removed |change udev rule for dmraid-activate + to prevent infinite udev event loop. + - debian/patches/04_do_not_use_p_for_partition.patch: Dropped, bringing + our device naming into line with upstream. + + -- Artur Rona Wed, 26 Jan 2011 16:30:29 +0100 + +dmraid (1.0.0.rc16-4.1) unstable; urgency=low + + * Non-maintainer upload. + * dmraid-active: properly handle the case when DDF1 virtual drive has a name. + (Closes: #603319) + + -- Modestas Vainius Sat, 18 Dec 2010 22:26:41 +0200 + +dmraid (1.0.0.rc16-4ubuntu2) natty; urgency=low + + * Drop 04_do_not_use_p_for_partition.patch, bringing our device naming + into line with upstream. + + -- Phillip Susi Mon, 29 Nov 2010 13:05:53 +0000 + +dmraid (1.0.0.rc16-4ubuntu1) natty; urgency=low + + * Merge from debian unstable (LP: #681391), remaining changes: + - debian/dmraid-activate: Remove the special-casing of the root + device which breaks in many situations and leaves the raw devices + exposed. This was introduced in Debian to accommodate some broken + configurations which wanted to access "partitions" on the raid + raw devices. In Ubuntu, broken configurations has not been supported. + - debian/dmraid.postinst: Comment out "udevadm trigger" call in postinst + for now as it has severeconsequences when mountall is installed + (clears /tmp). If dmraid is installed, then presumably the important + system devices are up and one can be bothered with a reboot to take + the change into account. Let update-initramfs flag the system + as needing a reboot. + - Removed |change udev rule for dmraid-activate to prevent infinite udev + event loop (LP: #534743). + + -- Lorenzo De Liso Thu, 25 Nov 2010 14:43:17 +0100 + +dmraid (1.0.0.rc16-4) unstable; urgency=low + + [ Modestas Vainius ] + * [7b2bf79] Make dmraid-activate work with DDF1 arrays by special- + casing their handling. Similar to ISW case, there do not seem to be + a way for getting raid subsets for the physical drive except parsing + native log. (Closes: #603319) + + -- Giuseppe Iuculano Mon, 22 Nov 2010 13:02:29 +0100 + +dmraid (1.0.0.rc16-3ubuntu2) lucid; urgency=low + + * Removed |change udev rule for dmraid-activate to prevent infinite udev + event loop (LP: #534743). + + -- Phillip Susi Wed, 07 Apr 2010 11:01:17 -0400 + +dmraid (1.0.0.rc16-3ubuntu1) lucid; urgency=low + + * Merge from debian testing. (LP: #503136) Remaining changes: + - debian/dmraid-activate: Remove the special-casing of the root + device which breaks in many situations and leaves the raw devices + exposed. This was introduced in Debian to accommodate some broken + configurations which wanted to access "partitions" on the raid + raw devices. In Ubuntu, broken configurations has not been supported. + - debian/dmraid.postinst: Comment out "udevadm trigger" call in postinst + for now as it has severeconsequences when mountall is installed + (clears /tmp). If dmraid is installed, then presumably the important + system devices are up and one canbe bothered with a reboot to take + the change into account. Let update-initramfs flag the system + as needing a reboot. + + -- Artur Rona Thu, 04 Feb 2010 21:34:22 +0100 + +dmraid (1.0.0.rc16-3) unstable; urgency=low + + * [3bea125] debian/patches/20_fix_isw_sectors_calculation.patch: Fix + isw raid0 incorrect sectors calculation (Closes: #561866) - thanks + to Valentin Pavlyuchenko + * [239630a] Added ${misc:Depends} in Depends + + -- Giuseppe Iuculano Mon, 28 Dec 2009 10:57:55 +0100 + +dmraid (1.0.0.rc16-2) unstable; urgency=low + + * [0819a82] debian/patches/18_pdc_raid10_failure..patch: fix pdc + metadata format handler to report the proper number of devices in a + subset + * [8418d6b] debian/patches/19_ddf1_lsi_persistent_name.patch: Because the + LSI bios changes the timestamp in the metadata on every boot, neutralize + it in order to allow for persistent names. + + -- Giuseppe Iuculano Thu, 26 Nov 2009 11:37:24 +0100 + +dmraid (1.0.0.rc16-1) experimental; urgency=low + + [ Tormod Volden ] + * [aed3ea8] Add support for "nodmraid" boot option + + [ Giuseppe Iuculano ] + * [6ae6d88] Imported Upstream version 1.0.0.rc16 + * [3bdcbf4] Remove old 1.0.0.rc15 directory + * [f2b47d1] Refreshed patches and deleted patches merged in upstream + * [27f877d] SONAME bump, libdmraid1.0.0.rc15 -> libdmraid1.0.0.rc16 + * [8ea0cf4] Updated symbols file + * [e2bd834] debian/patches/02_disable_dmreg.patch: Disabled all dmreg + stuff + * [7339f26] Added 951 disk offset for Promise FastTrak S150 TX2plus + (LP: #465198) - thanks to Even Ambjørnrud + * [fbe64d4] Updated my email address and removed DM-Upload-Allowed + control field + + -- Giuseppe Iuculano Sun, 01 Nov 2009 19:00:41 +0100 + +dmraid (1.0.0.rc15-11ubuntu3) karmic; urgency=low + + * Update changelog entry and postinst to mention correct bug for the + 1.0.0.rc15-11ubuntu2 changes. + + -- Loïc Minier Tue, 06 Oct 2009 18:54:28 +0200 + +dmraid (1.0.0.rc15-11ubuntu2) karmic; urgency=low + + * Comment out "udevadm trigger" call in postinst for now as it has severe + consequences when mountall is installed (clears /tmp). If dmraid is + installed, then presumably the important system devices are up and one can + be bothered with a reboot to take the change into account. Let + update-initramfs flag the system as needing a reboot. LP: #444252. + + -- Loïc Minier Tue, 06 Oct 2009 17:54:44 +0200 + +dmraid (1.0.0.rc15-11ubuntu1) karmic; urgency=low + + * debian/dmraid-activate: Remove the special-casing of the root + device which breaks in many situations and leaves the raw devices + exposed. This was introduced in Debian to accommodate some broken + configurations which wanted to access "partitions" on the raid + raw devices. In Ubuntu, broken configurations has not been supported. + * debian/dmraid-activate: Add support for "nodmraid" boot option, which + prevents automatic detection and activation of dmraid arrays. Useful + for broken configurations... Picked from Debian git. (LP: #392510) + + -- Tormod Volden Fri, 25 Sep 2009 21:29:36 +0200 + +dmraid (1.0.0.rc15-11) unstable; urgency=low + + * [ce4e2dc] 15_activate_multiple_raid_sets.patch: Continue onto all + raid sets instead of returning after processing the first. (LP: #401713) + * [58a1426] debian/initramfs/dmraid.initramfs-local-top/dmraid: Check + the exit code before parsing output, thanks to Tormod Volden. + (Closes: #542256) (LP: #415280, #376792) + * [91d2b67] Updated to standards version 3.8.3 (No changes needed) + + -- Giuseppe Iuculano Sun, 23 Aug 2009 18:06:13 +0200 + +dmraid (1.0.0.rc15-10) unstable; urgency=low + + * [1a1b752] debian/dmraid-activate: Use the -Z flag only if root + partition is mountd in a dmraid array. + (Closes: #533848) (LP: #392510) + + -- Giuseppe Iuculano Wed, 15 Jul 2009 18:53:52 +0200 + +dmraid (1.0.0.rc15-9) unstable; urgency=low + + [ Giuseppe Iuculano ] + * [ea0c659] debian/rules: Copy the autotools stuff before copying the + 1.0.0.rc15 directory to the build directory. (Closes: #533689) + + [ Luke Yelavich ] + * [317853a] debian/patches/17_isw-probe-hpa.patch: Probe isw disks + with [some] HPA awareness, thanks to Robert Collins + . (LP: #372170) + + [ Giuseppe Iuculano ] + * [89d15f3] debian/initramfs/dmraid.initramfs-hook/dmraid: copy grep + only if if BUSYBOX=n, thanks to Colin Watson (Closes: #534299) + * [a2f0730] Updated to standards version 3.8.2 (No changes needed). + + -- Giuseppe Iuculano Sat, 11 Jul 2009 10:47:47 +0200 + +dmraid (1.0.0.rc15-8) unstable; urgency=low + + * [68f05e2] Fixed some typos in dmraid man page, Thanks A. Costa. + (Closes: #525252) + * [c72bf51] Added grep in initrd, dmraid-activate needs it. (Closes: #528998) + + -- Giuseppe Iuculano Fri, 22 May 2009 19:06:09 +0200 + +dmraid (1.0.0.rc15-7) unstable; urgency=low + + * [c617e81] debian/dmraid.postinst: Do not run update-initramfs if it + is not installed (Closes: #522799) + * [3011c19] debian/patches/16_fix_isw_sectors_calculation.patch: Fix + isw raid0 incorrect sectors calculation, thanks to Valentin + Pavlyuchenko (Closes: #524637) (LP: #337284) + * [9cf5ed5] debian/patches/14_isw-serial-fix.patch: Use Hans de Goede + patch. + * [18ece89] debian/dmraid-activate: grep also for "formats discovered" + when assigns Raid_Name, and do not use "cut" to assign + Isw_Group_Name. In this way dmraid-activate works also for user + having multiple metadata signatures and/or not using initramfs. + (Closes: #523660) + + -- Giuseppe Iuculano Wed, 22 Apr 2009 11:55:49 +0200 + +dmraid (1.0.0.rc15-6) unstable; urgency=low + + * [6af052c] Remove 15_isw_incorrect_status_fix.patch, it causes a + segfault. (Closes: #521104) + + -- Giuseppe Iuculano Wed, 25 Mar 2009 22:34:59 +0100 + +dmraid (1.0.0.rc15-5) unstable; urgency=low + + * [ad6ac87] do not use basename in the local-top initramfs script + (Closes: #520875) + * [b1fc9ec] Added a bug submission control script. It allows Debian's bug + tools to include relevant information in bug reports. + + -- Giuseppe Iuculano Mon, 23 Mar 2009 14:22:17 +0100 + +dmraid (1.0.0.rc15-4) unstable; urgency=low + + * [546b293] debian/patches/05_jmicron-name-fix.patch: Fix segfault + when attempting to generate name for jmicron controllers. Thanks to + danwood76 (LP: #344215) + * [4b3dfa0] debian/patches/15_isw_incorrect_status_fix.patch: fix + incorrect status displayed when disk is missing (isw) + + -- Giuseppe Iuculano Sun, 22 Mar 2009 08:46:25 +0100 + +dmraid (1.0.0.rc15-3) unstable; urgency=low + + * [748a001] debian/patches/14_isw-serial-fix.patch: Change the serial + number scan to only look at the LAST 16 bytes rather than the first. + Thanks Sam Bingner (LP: #267953) + * [9f577ac] debian/patches/09_promise-add-offsets.patch: Added 591 + disk offset locations for Promise RAID metadata. (ASUS M3A equipped + with the SB600 south bridge) + * [7aef2ee] debian/control: Added ${misc:Depends} in Depends + * [7cac457] Updated to standards version 3.8.1 (No changes needed) + + -- Giuseppe Iuculano Sat, 14 Mar 2009 13:13:02 +0100 + +dmraid (1.0.0.rc15-2) unstable; urgency=low + + * [ac0f158] debian/dmraid-activate: Use the newly introduced -Z flag for + dmraid, to instruct the kernel to remove partition device nodes from array + member disks. This means that there is no chance of race conditions with + udev and creating UUID/label symbolic links either for member disk nodes, + or dmraid device-mapper nodes. + + -- Luke Yelavich Fri, 20 Feb 2009 17:31:09 +0100 + +dmraid (1.0.0.rc15-1) unstable; urgency=low + + * [fc70eec] debian/patches/13_rm_partitions.patch: Make -- + rm_partitions work with older kernels which return EINVAL when + trying to remove a partition with a number > 16 - Document -- + rm_partitions in the man page + * [68c7ed1] Added debian/README.source + * Upload to unstable. + + -- Giuseppe Iuculano Mon, 16 Feb 2009 13:50:55 +0100 + +dmraid (1.0.0.rc15-1~exp7) experimental; urgency=low + + [ Luke Yelavich ] + * [aaefbef] debian/initramfs/dmraid.initramfs-hook/dmraid: create udev + rules dir before copying each udev rule + * [fdef4bb] debian/dmraid-activate: Refactor code to allow for special + casing of raid groups and subsets + * [072319d] debian/patches/05_kernel-event-handling.patch: Drop, as + this was breaking RAID0 activation for all metadata types, and the kernel + event handling setup is present in rc15 anyway (Closes: #514798), + (LP: #310928) + * [e1f9960] debian/libdmraid-dev.links: Symlink libdmraid.so since + pointing to a broken symbolic link in the install file causes the + build to FTBFS + + [ Giuseppe Iuculano ] + * [fdd5c72] Bump to debhelper 7 compatibility levels + * [5c20ceb] debian/patches/11_isw-raid10.patch: Fix mismatch between + BIOS and dmraid's view of ISW raid 10 sets + * [4fce3ee] debian/patches/13_rm_partitions.patch: patch adding + rm_partitions cmdline option and functionality + * [ff07846] debian/rules: Use dh_clean -k is deprecated, use dh_prep + and fix dh-clean-k-is-deprecated lintian warning + + -- Giuseppe Iuculano Fri, 13 Feb 2009 09:00:09 +0100 + +dmraid (1.0.0.rc15-1~exp6) experimental; urgency=low + + * [51d68d1] debian/patches/07_isw_metadata_normal_state.patch: Fix + Metadata is not put in the NORMAL state after dmraid rebuild is + started manually + * [8165a84] debian/patches/08_isw_rebuild.patch: Fix ISW Metadata is + corrupted after rebuilding is started + * [0f588f5] debian/control: Fix Vcs-Browser field to play nice with + cl2vcs + * [d832984] Added libdmraid1.0.0.rc15 symbols file + * [f0e50b8] Added description in 07_isw_metadata_normal_state.patch + and 08_isw_rebuild.patch + * [492e108] debian/dmraid-activate: Activate unconditionally isw array + (LP: #310928) + + -- Giuseppe Iuculano Fri, 30 Jan 2009 08:40:41 +0100 + +dmraid (1.0.0.rc15-1~exp5) experimental; urgency=low + + * [f23f890] debian/patches: Deleted old patch 08_promise-metadata- + fixes.dpatch + * [db69b2c] Switch to quilt + * [e40b076] debian/initramfs/dmraid.initramfs-hook/dmraid: New udev in + Ubuntu has the default rules installed into /lib/udev/rules.d, so + refer also to udev rules file in /lib/udev/rules.d + * [fed9520] debian/dmraid-activate: Ignore case distinctions when grep + for "No RAID disks" + * [c85b78f] debian/dmraid.postinst: call udevadm with --action=change + (Closes: #512771), (LP: #320482) + * [8d88132] debian/control: Remove priority and section fields in the + binary package, and fix duplicate-short-description lintian warning + * [1fd2986] Fixed command-with-path-in-maintainer-script lintian + warning + * [36cd8e5] debian/control: Removed initramfs-tools depends + * [b3eb93f] debian/control: Fixed duplicate-long-description lintian + warning + + -- Giuseppe Iuculano Fri, 23 Jan 2009 19:55:42 +0100 + +dmraid (1.0.0.rc15-1~exp4) experimental; urgency=low + + * [e41f5e6] debian/patches/10_exit_code.dpatch: Fix exit-code for "No + RAID disks" and "no block devices found" errors (LP: #300825) + * [3d0a810] debian/rules: don't create a minimal binary for udeb, some + features required from the installer are missing + * [cadad71] debian/patches/07_fix_dmraid_mini_build.dpatch: Removed + + -- Giuseppe Iuculano Sat, 27 Dec 2008 09:26:28 +0100 + +dmraid (1.0.0.rc15-1~exp3) experimental; urgency=low + + * switch to git + * debian/control: + + enabled LED support + + removed pointless configure-initramfs flavour + * debian/patches/06_fix_led_support_compilation.dpatch: fix FTBFS when LED + support is enabled + * debian/patches/07_fix_dmraid_mini_build.dpatch: fix FTBFS with + --enable-mini + * debian/control: create a minimal binary for udeb (--enable-mini) + + -- Giuseppe Iuculano Tue, 23 Dec 2008 08:52:53 +0100 + +dmraid (1.0.0.rc15-1~exp2) experimental; urgency=low + + * debian/control: + + Made the long description for the udeb shorter + + Added initramfs-tools to dmraid Depends + * debian/initramfs/dmraid.initramfs-hook/dmraid: + + Removed blank line added before the 'fi' in the dmraid initramfs-hook. + + check if 85_dmraid.rules or 85-dmraid.rules exists, and then copy it + (LP: #306114) + * debian/patches/02_raid45_to_raid4-5.dpatch: Removed + * debian/dmraid.postinst: initramfs-tools is in Depends, do not check for + update-initramfs (fixed command-with-path-in-maintainer-script lintian + warning) + * debian/dmraid-activate: modprobe also dm_raid45 + * debian/patches/02_scsi_serial_remove_ws.dpatch: remove whitespace from + serial id (LP: #305011) + * debian/copyright: Updated + + -- Giuseppe Iuculano Sun, 14 Dec 2008 10:17:51 +0100 + +dmraid (1.0.0.rc15-1~exp1) experimental; urgency=low + + * New upstream release + * debian/control: + + Added Version Control System location + + Create new packages, libdmraid1, libdmraid-dev and libdmraid1-udeb + respectively. + + Added Luke Yelavich in Uploaders + * Removed debian/initramfs/dmraid.initramfs-local/ + * debian/patches: + + Removed 06_isw-metadata-fixes.dpatch, 10_jmicron-name-fix.dpatch, + 04_generate-uuids.dpatch, 07_isw-raid10-nested.dpatch, + 02_raid45_toraid456.dpatch, 11_fix_segfault_on_big_endian.dpatch + + Added 02_raid45_to_raid4-5.dpatch + + Updated all patches to work with 1.0.0.rc15 + + 04_do_not_use_p_for_partition.dpatch: Removed "p" from device name. A + proper upgrade script is needed before using it. + * debian/rules: + + copy config.sub and config.guess in the right location + + fix mandir location + + added --enable-shared_lib in configure + + Support cross-compiling + * Install dmraid-activate also in dmraid-udeb package + * debian/patches/01_fix_broken_linking.dpatch: + + Create correct symbolic links when building a shared library. + + libdmraid should be linked against libdevmapper when building the shared + library, not the dmraid executable. + * debian/initramfs/dmraid.initramfs-hook/dmraid: Use force_load instead of + manual_add_modules + + -- Giuseppe Iuculano Sat, 19 Nov 2008 21:10:18 +0100 + +dmraid (1.0.0.rc14-6) unstable; urgency=low + + * debian/rules: Added execution rights to + /usr/share/initramfs-tools/scripts/local-top/dmraid + * debian/patches/02_raid45_toraid456.dpatch: Remove, this not fix #411172 + and the new dm-raid45 (not yet in Debian) is using the target that the + dmraid code originally expected. + + -- Giuseppe Iuculano Thu, 06 Nov 2008 08:50:02 +0100 + +dmraid (1.0.0.rc14-5) unstable; urgency=low + + * debian/control: dmraid and dmraid-udeb should depend on dmsetup and + dmsetup-udeb respecitvely, to ensure UUID symlinks are correctly created. + * Place a script in the local-top directory of the initramfs, to catch any + arrays that have not been activated by udev and vol_id. This is because + vol_id does not yet have knowledge of newer array metadata. Thanks to Luke + Yelavich (Workaround for #500883) + * Removed pointless debian/initramfs/dmraid.initramfs-local directory + * debian/patches/12_support_virtio_devices.dpatch: Check virtio devices for + dmraid metadata, patch thanks to Colin Watson . + * Fixed a typo in the previous changelog entry + + -- Giuseppe Iuculano Wed, 22 Oct 2008 01:13:55 +0200 + +dmraid (1.0.0.rc14-4) unstable; urgency=high + + * debian/dmraid.postinst: Activate existing arrays once the package is + installed. (Closes: #498674). Thanks to Luke Yelavich + * debian/patches/00list: Removed 07_isw-raid10-nested.dpatch, it breaks some + Intel raid1 system (Closes: #494278) + * debian/dmraid.udev: watershed isn't in udev package, removed from RUN + command + * Do not install useless usr/share/initramfs-tools/scripts/local-top + * debian/dmraid-activate: Don't take out any locks, added -i + (--ignorelocking) option in every dmraid command executed by + dmraid-activate, and do not use /usr/bin/basename, it is pointless and + breaks fakeraid detection if /usr isn't mounted (Closes: 499060) + * debian/control: Removed lsb-base and added udev in dmraid Depends + + -- Giuseppe Iuculano Sun, 21 Sep 2008 15:54:38 +0200 + +dmraid (1.0.0.rc14-3) unstable; urgency=low + + * debian/patches/09_promise-add-offsets.dpatch: Added 974 disk offset + locations for Promise RAID metadata. (Closes: #489972) + * Run update-initramfs in postrm + * debian/control: Dropped zlib1g-dev build dependency. + * Merge from Ubuntu debian/dmraid.udev: Udev rule to allow dmraid arrays to + be brought up in the event that the member disks of an array are present. + * debian/dmraid.init: Drop, udev helps us start dmraid arrays now. + (Closes: #394399) + * Merge from Ubuntu debian/dmraid-activate: Script to reformat the output of + dmraid to be useful with udev (Do not install in udeb) + * debian/initramfs/dmraid.initramfs-hook/dmraid: Added dmraid-activate, new + udev rule needs it + + -- Giuseppe Iuculano Sun, 31 Aug 2008 14:51:38 +0200 + +dmraid (1.0.0.rc14-2) unstable; urgency=low + + * Merge the following patch from Ubuntu (thanks to Luke Yelavich): + + 04_generate-uuids.dpatch, Generate UUIDs with DMRAID prefix. + (Closes: #489967) + + 05_kernel-event-handling.dpatch, Add support for kernel driver event + handling support. (Closes: #489968) + + 06_isw-metadata-fixes.dpatch, Intel Software RAID metadata fixes. + (Closes: #489969) + + 07_isw-raid10-nested.dpatch, Add RAID10(0+1) nested RAID level support + for Intel Software RAID. (Closes: #489970) + + 08_promise-metadata-fixes.dpatch, Promise metadata fixes. + (Closes: #489971) + + 09_promise-add-offsets.dpatch, Add extra offsets where promise metadata + can be found. (Closes: #489972) + + 10_jmicron-name-fix.dpatch, Fix segfault when attempting to generate + name for jmicron controllers. (Closes: #489973) + * Added 11_fix_segfault_on_big_endian.dpatch (via upstream), it fixes a + segfault on big-endian platforms (ppc) + + -- Giuseppe Iuculano Wed, 09 Jul 2008 09:26:32 +0200 + +dmraid (1.0.0.rc14-1) unstable; urgency=low + + * New upstream release (Closes: #450809) + * New maintainer, thanks to Utnubu Team for the prior work on dmraid + (Closes: #459593) + * Switch to dpatch + - 01_statically_link_against_libz.dpatch (merged) + - 02_raid45_toraid456.dpatch Change raid45 target to raid456 + (Closes: #411172) + - 03_fix_hyphen-used-as-minus-sign.dpatch + * lintian cleaned: + - Calling dh_installdeb after dh_shlibdeps + - Added autotools-dev to Build-Depends, and fix + outdated-autotools-helper-file + - Added watch file + - Fix old-fsf-address-in-copyright-file + - Fix init.d-script-missing-lsb-short-description + - Updated to standards version 3.8.0 + * debian/dmraid.init: Check if /etc/default/rcS exists before sourcing it + * debian/rules: Using dh_install instead of cp for installing initrams + + -- Giuseppe Iuculano Tue, 24 Jun 2008 10:17:33 +0200 + +dmraid (1.0.0.rc13-2.1) unstable; urgency=low + + * Non-maintainer upload to solve release goal. + * Add LSB dependency header to init.d scripts (Closes: #458626) + + -- Petter Reinholdtsen Tue, 18 Mar 2008 17:57:38 +0100 + +dmraid (1.0.0.rc13-2) unstable; urgency=high + + * Apply patch to link libz statically, but only that; works only with GNU + linker, and might break full static linking in the future; thanks Steve + Langasek; catched by Frederic Briere; closes: #396762. + + -- Loic Minier Sun, 5 Nov 2006 17:08:55 +0100 + +dmraid (1.0.0.rc13-1) unstable; urgency=low + + * New upstream release; closes: #391499. + - Update copyright years and copyright holders. + - Update version in debian/rules. + - Supports some new NVIDIA RAID arrays; closes: #391125. + - Add a zlib1g-dev build-dep. + - Configure the standard flavour with --enable-libselinux + --enable-libsepol. + * Merge diff from 0.9.9+1.0.0.rc9-3.1 NMU; acknowledge NMU; thanks + Jonathan McDowell; closes: #367796, #367661. + * Add myself as Uploaders. + * Compute upstream version with dpkg-parsechangelog instead of hardcoding + it. + * Use $(CURDIR) instead of $(shell pwd). + * Fix bashisms; thanks Julien Danjou; closes: #374480. + * Pass --mandir to configure relative to ${prefix}; pass an absolute DESTDIR + to make install. + * Bump up Debhelper compatibility level to 5; partially addresses #375413. + * Bump up Standards-Version to 3.7.2. + * Build a new udeb flavour, configured without selinux and sepol; + closes: #375413. + * Add a .PHONY definition; create the list of configure-$flavour targets + dynamically; misc cleanups. + + -- Loic Minier Sun, 29 Oct 2006 12:01:36 +0100 + +dmraid (0.9.9+1.0.0.rc9-3.1) unstable; urgency=low + + * NMU with permission. + * Move init script from 03 to 04 to ensure we run after udev. + (Closes: #367796) + * Include the initramfs hook and script contributed by Tormod Volden, + so dmraid can integrate effortlessly (closes: launchpad.net/22107) + (Closes: #367661) + + -- Jonathan McDowell Mon, 24 Jul 2006 18:49:11 +0100 + +dmraid (0.9.9+1.0.0.rc9-3) unstable; urgency=low + + * add dmraid-udeb by popular request, looking forward for d-i integration + (Closes: #350250) + + -- Filippo Giunchedi Sat, 11 Feb 2006 13:25:55 +0100 + +dmraid (0.9.9+1.0.0.rc9-2) unstable; urgency=low + + * fix Description: to a more accurate one this closes: #334805 and correctly + indent the item list (closes: #334855) + * fix copyright file with additional informations as per policy 12.5 + (closes: #334856) + * add CHANGELOG to dh_installchangelogs + + -- Filippo Giunchedi Thu, 20 Oct 2005 22:12:42 +0200 + +dmraid (0.9.9+1.0.0.rc9-1) unstable; urgency=low + + * upload to debian on behalf of the utnubu team (closes: #306257) + + -- Filippo Giunchedi Sun, 16 Oct 2005 13:22:24 +0200 + +dmraid (0.9.9+1.0.0.rc9-0ubuntu1) breezy; urgency=low + + * New upstream releasse with tons of fixes. + + * Drop all our local patches (merged by upstream). + + -- Fabio M. Di Nitto Mon, 26 Sep 2005 06:57:21 +0200 + +dmraid (0.9.9+1.0.0.rc8-0ubuntu1) breezy; urgency=low + + * First release. + + * Fix aclocal.m4 to cope properly with --enable-klibc/--disable-klibc. + + * Fix make.tmpl.in to be very loud when building with klibc. + + * Fix make.tmpl.in to understand $(DESTDIR) for mandir and infodir. + + * Fix missing ] in lib/format/ataraid/pdc.c to compile on bigendian + machines. + + * Run init script before mdadm-raid and lvm and stop after. + + -- Fabio M. Di Nitto Thu, 22 Sep 2005 06:56:24 +0200 + --- dmraid-1.0.0.rc16.orig/debian/compat +++ dmraid-1.0.0.rc16/debian/compat @@ -0,0 +1 @@ +9 --- dmraid-1.0.0.rc16.orig/debian/control +++ dmraid-1.0.0.rc16/debian/control @@ -0,0 +1,84 @@ +Source: dmraid +Section: admin +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) +Standards-Version: 3.9.5 +Build-Depends: debhelper (>= 9), libdevmapper-dev, libklibc-dev, libselinux1-dev, quilt (>= 0.40), autotools-dev +Vcs-git: git://git.debian.org/git/users/derevko-guest/dmraid.git +Vcs-Browser: http://git.debian.org/?p=users/derevko-guest/dmraid.git +Homepage: http://people.redhat.com/~heinzm/sw/dmraid/ + +Package: dmraid +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, udev, dmsetup, kpartx-boot +Description: Device-Mapper Software RAID support tool + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + . + dmraid uses the Linux device-mapper to create devices with respective + mappings for the ATARAID sets discovered. + . + The following formats are supported: + Highpoint HPT37X/HPT45X + Intel Software RAID + LSI Logic MegaRAID + NVidia NForce RAID (nvraid) + Promise FastTrack + Silicon Image(tm) Medley(tm) + VIA Software RAID + . + Please read the documentation in /usr/share/doc/dmraid BEFORE attempting + any use of this software. Improper use can cause data loss! + +Package: dmraid-udeb +Architecture: any +Section: debian-installer +XC-Package-Type: udeb +Depends: ${shlibs:Depends}, dmsetup-udeb, kpartx-udeb +Description: Device-Mapper Software RAID support tool (udeb) + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + . + This is the minimal package (udeb) used by debian-installer + +Package: libdmraid1.0.0.rc16-udeb +Architecture: any +Section: debian-installer +XC-Package-Type: udeb +Depends: ${shlibs:Depends} +Description: Device-Mapper Software RAID support tool - shared library (udeb) + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + . + This is the minimal package (udeb shared library) used by debian-installer + +Package: libdmraid1.0.0.rc16 +Architecture: any +Section: libs +Depends: ${shlibs:Depends}, ${misc:Depends} +Replaces: libdmraid1.0.0.rc15 (<< 1.0.0.rc16-1) +Description: Device-Mapper Software RAID support tool - shared library + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + . + dmraid uses the Linux device-mapper to create devices with respective + mappings for the ATARAID sets discovered. + . + This package contains the dmraid shared library, which implements + the back half of dmraid, including on-disk metadata formats. + +Package: libdmraid-dev +Architecture: any +Section: libdevel +Depends: libdmraid1.0.0.rc16 (= ${binary:Version}), ${misc:Depends} +Description: Device-Mapper Software RAID support tool - header files + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + . + dmraid uses the Linux device-mapper to create devices with respective + mappings for the ATARAID sets discovered. + . + This package contains the header files needed to link programs against + dmraid. + --- dmraid-1.0.0.rc16.orig/debian/copyright +++ dmraid-1.0.0.rc16/debian/copyright @@ -0,0 +1,199 @@ +This is the Ubuntu / Debian GNU/Linux prepackaged version of dmraid. + +Packaged by Fabio M. Di Nitto . + +Re-debianized by Giuseppe Iuculano + +It was downloaded from http://people.redhat.com/heinzm/sw/dmraid/ +Upstream Author: Heinz Mauelshagen + +upstream LICENSE +**** + + Copyright (C) 2004-2008 Heinz Mauelshagen, Red Hat GmbH. + Copyright (C) 2006 Darrick Wong, James Simshaw, Adam DiCarlo IBM. + Copyright (c) 2001, 2002, 2004 Adaptec Inc. + Copyright (C) 2004 NVidia Corporation. All rights reserved. + All rights reserved. + + This dmraid code is free software; + you can redistribute and/or modify it under the terms of + the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + dmraid is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU (Lesser) General Public + License along with this dmraid code; if not, write to the Free + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA. + +**** + +On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU +General Public License can be found in `/usr/share/common-licenses/GPL'. +The complete text of the GNU Lesser General Public License can be found in +`/usr/share/common-licenses/LGPL'. + +The Debian packaging is © 2008, Giuseppe Iuculano and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + + +1.0.0.rc16/lib/metadata/reconfig.c: + + Copyright (C) 2006 IBM, all rights reserved. + Written by Darrick Wong , + James Simshaw , and + Adam DiCarlo + + Copyright (C) 2006-2008 Heinz Mauelshagen, Red Hat GmbH + All rights reserved + + LICENSE: GPL, see below + +1.0.0.rc16/lib/metadata/metadata.c, 1.0.0.rc16/lib/format/format.c, +1.0.0.rc16/lib/format/ataraid/isw.c, 1.0.0.rc16/lib/device/scsi.c, +1.0.0.rc16/lib/device/scsi.h, 1.0.0.rc16/lib/misc/misc.c, +1.0.0.rc16/lib/activate/activate.c, 1.0.0.rc16/lib/activate/devmapper.c, +1.0.0.rc16/tools/commands.c, 1.0.0.rc16/tools/commands.h, +1.0.0.rc16/tools/toollib.c, 1.0.0.rc16/include/dmraid/lib_context.h, +1.0.0.rc16/include/dmraid/list.h, 1.0.0.rc16/include/dmraid/misc.h, +1.0.0.rc16/include/dmraid/dmraid.h, 1.0.0.rc16/include/dmraid/metadata.h, +1.0.0.rc16/include/dmraid/format.h: + + Copyright (C) 2004-2008 Heinz Mauelshagen, Red Hat GmbH. + All rights reserved + Copyright (C) 2007 Intel Corporation. All rights reserved. + November, 2007 - additions for Create, Delete, Rebuild & Raid 10. + LICENSE: GPL, see below + +1.0.0.rc16/lib/metadata/log_ops.c: + + Copyright (C) 2006 Darrick Wong, IBM + All rights reserved + Copyright (C) 2006 Heinz Mauelshagen, Red Hat GmbH + All rights reserved + LICENSE: GPL, see below + +1.0.0.rc16/lib/format/ataraid/nv.c: + + Copyright (C) 2004 NVidia Corporation. All rights reserved. + Copyright (C) 2004-2008 Heinz Mauelshagen, Red Hat GmbH. + All rights reserved + LICENSE: GPL, see below + +1.0.0.rc16/lib/format/ataraid/asr.c: + + Copyright (C) 2005-2006 IBM, All rights reserved. + Written by Darrick Wong , + James Simshaw , and + Adam DiCarlo + Copyright (C) 2006 Heinz Mauelshagen, Red Hat GmbH + All rights reserved + LICENSE: GPL, see below + +1.0.0.rc16/lib/format/ataraid/nv.h: + + Copyright (C) 2004,2005 NVidia Corporation. All rights reserved. + dmraid extensions: + Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH. + LICENSE: GPL, see below + +1.0.0.rc16/lib/format/ataraid/isw.h + + Copyright (C) 2003,2004,2005 Intel Corporation. + dmraid extensions: + Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH. + All rights reserved + Authors: Boji Tony Kannanthanam < boji dot t dot kannanthanam at intel dot com > + Martins Krikis < martins dot krikis at intel dot com > + LICENSE: GPL, see below + +1.0.0.rc16/lib/format/ataraid/hpt37x.h: + + Copyright (c) 2000,2001 Søren Schmidt + All rights reserved. + dmraid modifications: + Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH. + All rights reserved + LICENSE: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer, + without modification, immediately at the beginning of the file. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +1.0.0.rc16/lib/format/ataraid/asr.h: + + Copyright (c) 2005-2006 IBM (actual code changes by Darrick Wong) + Copyright (c) 2001, 2002, 2004 Adaptec Inc. + All rights reserved. + + LICENSE: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer, + without modification, immediately at the beginning of the file. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + Alternatively, this software may be distributed under the terms of the + GNU General Public License ("GPL") version 2, see below + +1.0.0.rc16/lib/format/ddf/ddf1_dump.c, 1.0.0.rc16/lib/format/ddf/ddf1.c, +1.0.0.rc16/lib/format/ddf/ddf1_cvt.h, 1.0.0.rc16/lib/format/ddf/ddf1_cvt.c, +1.0.0.rc16/lib/format/ddf/ddf1.h, 1.0.0.rc16/lib/format/ddf/ddf1_lib.c, +1.0.0.rc16/lib/format/ddf/ddf1_lib.h, 1.0.0.rc16/lib/format/ddf/ddf1_dump.h: + + Copyright (C) 2005-2006 IBM, All rights reserved. + Written by Darrick Wong + Copyright (C) 2006 Heinz Mauelshagen, Red Hat GmbH + All rights reserved + LICENSE: GPL, see below + +1.0.0.rc16/lib/format/ddf/ddf1_crc.c: + + Copyright (C) 2005-2006 IBM, All rights reserved. + Written by James Simshaw + Copyright (C) 2006-2008 Heinz Mauelshagen, Red Hat GmbH + All rights reserved + LICENSE: GPL, see below + +1.0.0.rc16/include/dmraid/reconfig.h: + + Copyright (C) 2006 Darrick Wong, IBM. + All rights reserved + Copyright (C) 2006-2008 Heinz Mauelshagen Red Hat GmbH. + All rights reserved + LICENSE: GPL, see below + +debian/dmraid-activate: + + (c) 2008 Canonical Ltd. + LICENSE: GPL, see below --- dmraid-1.0.0.rc16.orig/debian/dmraid-activate +++ dmraid-1.0.0.rc16/debian/dmraid-activate @@ -0,0 +1,287 @@ +#!/bin/sh +# +# dmraid-activate: Script to reformat the output of dmraid to be useful with +# udev. +# +# (c) 2008 Canonical Ltd. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# Arguments: $1 = Name of array you want activated. +activate_array () +{ + Raid_Setinfo=$(dmraid -i -si "$1") + if [ -z "$Raid_Setinfo" ]; then + log_error "Cannot retrieve RAID set information for $1" + return 1 + fi + + Raid_Type=$(dmraid -i -si -ct "$1") + Raid_Nodevs=$(dmraid -i -si -cd "$1") + + case "$Raid_Type" in + stripe) + if [ "$Raid_Nodevs" -lt 2 ]; then + if [ -n "$Degraded" ]; then + log_error "Cannot bring up a RAID0 array in degraded mode, not all devices present." + fi + return 2 + fi + ;; + mirror) + if [ "$Raid_Nodevs" -lt 2 ]; then + if [ -z "$Degraded" ]; then + log_error "Raid set $Raid_Name is degraded. Not activating" + return 2 + else + log_warning "Activating $Raid_Name in degraded mode" + Return_Val=3 + fi + fi + ;; + raid5_*) + if [ "$Raid_Nodevs" -lt 3 ]; then + if [ -z "$Degraded" ]; then + log_error "Raid set $Raid_Name is degraded. Not activating" + return 2 + else + log_warning "Activating $Raid_Name in degraded mode" + Return_Val=3 + fi + fi + ;; + esac + + # At this point we have the required number of devs, or the user wants the + # array brought up in degraded mode, except in the case of striped arrays. + + dmraid -p -i -ay -Z "$1" + return $Return_Val +} + +log_warning() +{ + if type logger > /dev/null ; then + logger -t dmraid-activate "WARNING: $1" + else + echo "dmraid-activate: WARNING: $1" + fi +} + +log_error() +{ + if type logger > /dev/null ; then + logger -t dmraid-activate "ERROR: $1" + else + echo "dmraid-activate: ERROR: $1" + fi +} + +ddf1_virtual_drive_names() +{ + ddf1_awk_script="$(cat <<'EOF' +BEGIN { + section = "" + disk_ref = "" + guid_i = 0 + + # Heximal to decimal conversion array + for (i = 0; i <= 9; i++) hex2dec[i] = i + hex2dec["a"] = 10; hex2dec["b"] = 11; hex2dec["c"] = 12 + hex2dec["e"] = 13; hex2dec["d"] = 14; hex2dec["f"] = 15; +} + +function section_begins(name) +{ + section = name + vd_guid = "" + drive_map = 0 +} + +function extract_vd_guid(line, g) +{ + g = substr(line, match(line,/\[[0-9a-f ]+\]$/)+1, RLENGTH-2) + gsub(/ /, "", g) + # IF LSI, do timestamp substitution to get persistent name, see + # 19_ddf1_lsi_persistent_name.patch + if (g ~ /^4c5349/) + g = substr(g, 1, 32) "47114711" substr(g, 41) + return g +} + +function extract_vd_name(line, hex, n, max, i, d1, d2, sed) +{ + n = tolower(substr(line, match(line,/\[[0-9a-f ]+\]$/)+1, RLENGTH-2)) + max = split(n, hex, / /) + + if (max <= 0 || hex[0] == "00") return "" + + # Convert name from hex to string (16 bytes) + n = "" + for (i = 1; i <= max; i++) { + d1 = hex2dec[substr(hex[i], 1, 1)] + d2 = hex2dec[substr(hex[i], 2, 1)] + if ((d1 + d2) == 0) break + n = n sprintf("%c", d1 * 16 + d2) + } + # Shell-escape single quotes in the name + gsub(/'/,"'\\''", n) + # Finally strip non-graph chars from the end of the string + # mawk does not support character classes. Use sed. + sed = "echo '" n "' | sed 's/[^[:graph:]]\+$//'" + sed | getline n + close(sed) + return n +} + +{ + if (!/^0x/ && / at /) { + # Section begins + section_begins(substr($0, 1, match($0, / at /)-1)) + } else if (section == "Disk Data" && /^0x020 reference:[ \t]*[0-9A-Fx]+/) { + disk_ref = $3 + sub(/^0x/, "", disk_ref) + } else if (disk_ref) { + # We need to parse 'Virtual Drive' sections in order to extract VD + # names + if (section == "Virtual Drive") { + if (/^0x000 guid:/) { + vd_guid = extract_vd_guid($0) + } else if (/^0x030 name:/) { + vd_name = extract_vd_name($0) + if (vd_name) + vd_names[vd_guid] = vd_name + } + } else if (section == "Virtual Drive Config Record") { + if (/^0x008 guid:/) { + vd_guid = extract_vd_guid($0) + } else if (drive_map) { + # 0: 4BCBB980 @ 0 + if ($2 == disk_ref) { + guids[guid_i] = vd_guid + guid_i++ + } + } else if (vd_guid) { + drive_map = /^Drive map:/ + } + } + } +} +END { + # Print discovered virtual drive names (or GUIDs) which belong to this + # physical drive + for (guid_i in guids) { + guid = guids[guid_i] + if (guid in vd_names) { + print vd_names[guid] + } else { + print guid + } + } +} +EOF +)" + dmraid -i -n "$1" | awk "$ddf1_awk_script" +} + +if grep -qs "\" /proc/cmdline; then + log_warning "dmraid disabled by boot option" + exit 0 +fi + +if type mdmon > /dev/null ; then + if grep -qs "\" /proc/cmdline; then + AssembleISW=1 + log_warning "mdadm IMSM assembly disabled by boot option" + fi + + if grep -qs "\" /proc/cmdline; then + AssembleDDF=1 + log_warning "mdadm DDF assembly enabled by boot option" + fi +else + AssembleISW=1 + AssembleDDF=1 +fi + +modprobe -q dm_mod + +if [ -z "$1" ] || [ "$1" = "--degraded" ] && [ "$#" -lt 2 ]; then + echo "Node name not specified." >&2 + exit 1 +fi + +if [ "$1" = "--degraded" ]; then + Degraded=1 + Node_Name=$2 +else + Node_Name=$1 +fi + +Raid_Name=$(dmraid -i -r -cr /dev/$Node_Name | grep -vi "No RAID disks" | grep -vi "formats discovered") + +if [ -z "$Raid_Name" ]; then + exit 0 +fi + +newline=" +" + +case "$Raid_Name" in + isw_*) + if [ -n "$AssembleISW" ] + then + # We need a special case for isw arrays, since it is possible to have several + # subsets of a RAID group, of varying RAID types. + Isw_Group_Name=$Raid_Name + Isw_Subsets=$(dmraid -i -n "/dev/$Node_Name" | grep volume | sed 's/.*volume: " *\(.*\)"$/\1/') + + for isw_subset in $Isw_Subsets + do + activate_array "${Isw_Group_Name}_${isw_subset}" + done + + fi + break + ;; + .ddf1_disks) + if [ -n "$AssembleDDF" ] + then + # Dummy name for the main DDF1 group. Needs special handling to + # find RAID subsets (name or GUID) for this physical drive + Ddf1_names=`ddf1_virtual_drive_names "/dev/$Node_Name"` + + # Returned names might contain space characters. Therefore + # split fields at new line. Use $IFS to avoid forking a new shell + save_IFS="$IFS" + IFS="$newline" + for ddf1_name in $Ddf1_names + do + IFS="$save_IFS" + activate_array "ddf1_${ddf1_name}" + IFS="$newline" + done + IFS="$save_IFS" + + fi + break + ;; + *) + activate_array "$Raid_Name" + break + ;; +esac + +exit $Return_Val --- dmraid-1.0.0.rc16.orig/debian/dmraid-udeb.install +++ dmraid-1.0.0.rc16/debian/dmraid-udeb.install @@ -0,0 +1,2 @@ +debian/udeb/sbin/dmraid sbin +debian/dmraid-activate sbin --- dmraid-1.0.0.rc16.orig/debian/dmraid.bug +++ dmraid-1.0.0.rc16/debian/dmraid.bug @@ -0,0 +1,88 @@ +#!/bin/bash +# +# dmraid bug submission control script +# +# allows Debian's bug tools to include relevant information in bug reports. +# +# based on mdadm bug submission control script +# +set +eu + +if ! command -v yesno >/dev/null; then + if [ -r /usr/share/reportbug/handle_bugscript ]; then + exec /usr/share/reportbug/handle_bugscript ". $0" /dev/stdout + fi + yesno() { + read -n1 -p"$1" REPLY + case "$REPLY" in + [yY]) REPLY=yep;; + [nN]) REPLY=nop;; + ('') REPLY="$2";; + esac + } + exec 3>&1 +fi + +root=$(id -u) + +echo "--- dmraid -r -vvv output" >&3 +if ! [ "$root" = "0" ] ;then + echo "Only root can run dmraid -r -vvv, please type the root password" + su root -c "dmraid -r -vvv" >&3 +else + dmraid -r -vvv >&3 +fi + +echo >&3 + + +echo "--- dmraid -s -vv output" >&3 +if ! [ "$root" = "0" ] ;then + echo "Only root can run dmraid -s -vv, please type the root password" + su root -c "dmraid -s -vv" >&3 +else + dmraid -s -vv >&3 +fi +echo >&3 + +echo "--- /proc/partitions:" >&3 +cat /proc/partitions >&3 2>&3 || : +echo >&3 + +echo "--- initrd.img-$(uname -r):" >&3 +if [ -r /boot/initrd.img-$(uname -r) ]; then + zcat /boot/initrd.img-$(uname -r) 2>&3 | cpio -t 2>&3 | egrep '/md[a/]' >&3 +fi +echo >&3 + +if [ -r /proc/modules ]; then + echo "--- /proc/modules:" >&3 + grep 'dm_' < /proc/modules >&3 || : + echo >&3 +fi + +if [ -r /proc/cmdline ]; then + echo "--- /proc/cmdline" >&3 + cat /proc/cmdline >&3 + echo >&3 +fi + +if [ -f /boot/grub/menu.lst ]; then + echo "--- grub:" >&3 + if [ -r /boot/grub/menu.lst ]; then + grep '^[^#].*root=' /boot/grub/menu.lst >&3 || : + else + echo menu.lst file not readable. >&3 + fi + echo >&3 +fi + +if [ -f /etc/lilo.conf ]; then + echo "--- lilo:" >&3 + if [ -r /etc/lilo.conf ]; then + egrep '^([^#].*)?root=' /etc/lilo.conf >&3 || : + else + echo lilo.conf file not readable. >&3 + fi + echo >&3 +fi --- dmraid-1.0.0.rc16.orig/debian/dmraid.dirs +++ dmraid-1.0.0.rc16/debian/dmraid.dirs @@ -0,0 +1 @@ +usr/share/bug/dmraid --- dmraid-1.0.0.rc16.orig/debian/dmraid.install +++ dmraid-1.0.0.rc16/debian/dmraid.install @@ -0,0 +1,5 @@ +debian/initramfs/dmraid.initramfs-hook/dmraid usr/share/initramfs-tools/hooks +debian/initramfs/dmraid.initramfs-local-top/dmraid usr/share/initramfs-tools/scripts/local-top +debian/standard/sbin/dmraid sbin +debian/standard/usr/share/man usr/share +debian/dmraid-activate sbin --- dmraid-1.0.0.rc16.orig/debian/dmraid.postinst +++ dmraid-1.0.0.rc16/debian/dmraid.postinst @@ -0,0 +1,30 @@ +#! /bin/sh + +set -e + + +case "$1" in + configure) + if command -v update-initramfs >/dev/null 2>&1; then + update-initramfs -u + fi + # Activate existing arrays now. + udevadm trigger --subsystem-match=block --action=change + + if [ -f /etc/init.d/dmraid ]; then + update-rc.d -f dmraid remove + rm -f /etc/init.d/dmraid + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- dmraid-1.0.0.rc16.orig/debian/dmraid.postrm +++ dmraid-1.0.0.rc16/debian/dmraid.postrm @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +case "$1" in + remove|purge) + if command -v update-initramfs >/dev/null 2>&1; then + update-initramfs -u + fi + + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + + +#DEBHELPER# + + --- dmraid-1.0.0.rc16.orig/debian/dmraid.udev +++ dmraid-1.0.0.rc16/debian/dmraid.udev @@ -0,0 +1,8 @@ +# This file causes drives with dmraid arrays to be checked, and if all +# drives are present, brought up. +# See udev(8) for syntax + +SUBSYSTEM=="block", ACTION=="add", ENV{ID_TYPE}=="disk", ENV{ID_FS_USAGE}=="raid", KERNEL=="hd[a-z]|sd[a-z]", \ + RUN+="/sbin/dmraid-activate %k" +ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="DMRAID-*", \ + RUN+="/sbin/kpartx -a /dev/$kernel" \ No newline at end of file --- dmraid-1.0.0.rc16.orig/debian/initramfs/dmraid.initramfs-hook/dmraid +++ dmraid-1.0.0.rc16/debian/initramfs/dmraid.initramfs-hook/dmraid @@ -0,0 +1,46 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +if [ -x /sbin/dmraid ]; then + force_load dm-mod + force_load dm-mirror + copy_exec /sbin/dmraid sbin + copy_exec /sbin/dmraid-activate sbin + if [ "$BUSYBOX" = n ]; then + copy_exec /bin/grep bin + fi + if [ -f /etc/udev/rules.d/97_dmraid.rules ]; then + mkdir -p ${DESTDIR}/etc/udev/rules.d + cp -p /etc/udev/rules.d/97_dmraid.rules ${DESTDIR}/etc/udev/rules.d + fi + if [ -f /etc/udev/rules.d/97-dmraid.rules ]; then + mkdir -p ${DESTDIR}/etc/udev/rules.d + cp -p /etc/udev/rules.d/97-dmraid.rules ${DESTDIR}/etc/udev/rules.d + fi + if [ -f /lib/udev/rules.d/97_dmraid.rules ]; then + mkdir -p ${DESTDIR}/lib/udev/rules.d + cp -p /lib/udev/rules.d/97_dmraid.rules ${DESTDIR}/lib/udev/rules.d + fi + if [ -f /lib/udev/rules.d/97-dmraid.rules ]; then + mkdir -p ${DESTDIR}/lib/udev/rules.d + cp -p /lib/udev/rules.d/97-dmraid.rules ${DESTDIR}/lib/udev/rules.d + fi +fi + +exit 0 --- dmraid-1.0.0.rc16.orig/debian/initramfs/dmraid.initramfs-local-top/dmraid +++ dmraid-1.0.0.rc16/debian/initramfs/dmraid.initramfs-local-top/dmraid @@ -0,0 +1,28 @@ +#!/bin/sh + +# local-top script for dmraid. + +PREREQS="" +prereqs() +{ + echo $PREREQS +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /scripts/functions +wait_for_udev 30 + +# Activate any dmraid arrays that were not identified by udev and vol_id. + +if devices=$(dmraid -r -c); then + for dev in $devices; do + dmraid-activate $dev + done +fi --- dmraid-1.0.0.rc16.orig/debian/libdmraid-dev.install +++ dmraid-1.0.0.rc16/debian/libdmraid-dev.install @@ -0,0 +1,2 @@ +debian/standard/lib/*.a usr/lib +debian/standard/usr/include/dmraid usr/include --- dmraid-1.0.0.rc16.orig/debian/libdmraid-dev.links +++ dmraid-1.0.0.rc16/debian/libdmraid-dev.links @@ -0,0 +1 @@ +lib/libdmraid.so.1.0.0.rc16 usr/lib/libdmraid.so --- dmraid-1.0.0.rc16.orig/debian/libdmraid1.0.0.rc16-udeb.install +++ dmraid-1.0.0.rc16/debian/libdmraid1.0.0.rc16-udeb.install @@ -0,0 +1 @@ +debian/udeb/lib/*.so.* lib --- dmraid-1.0.0.rc16.orig/debian/libdmraid1.0.0.rc16.install +++ dmraid-1.0.0.rc16/debian/libdmraid1.0.0.rc16.install @@ -0,0 +1 @@ +debian/standard/lib/*.so.* lib --- dmraid-1.0.0.rc16.orig/debian/libdmraid1.0.0.rc16.symbols +++ dmraid-1.0.0.rc16/debian/libdmraid1.0.0.rc16.symbols @@ -0,0 +1,53 @@ +libdmraid.so.1.0.0.rc16 libdmraid1.0.0.rc16 #MINVER# + Base@Base 1.0.0.rc16 + _dbg_free@Base 1.0.0.rc16 + _dbg_malloc@Base 1.0.0.rc16 + _dbg_realloc@Base 1.0.0.rc16 + _dbg_strdup@Base 1.0.0.rc16 + add_delimiter@Base 1.0.0.rc16 + add_dev_to_array@Base 1.0.0.rc16 + change_set@Base 1.0.0.rc16 + check_valid_format@Base 1.0.0.rc16 + count_devices@Base 1.0.0.rc16 + count_devs@Base 1.0.0.rc16 + count_sets@Base 1.0.0.rc16 + delete_raidsets@Base 1.0.0.rc16 + discover_devices@Base 1.0.0.rc16 + discover_partitions@Base 1.0.0.rc16 + discover_raid_devices@Base 1.0.0.rc16 + display_devices@Base 1.0.0.rc16 + display_set@Base 1.0.0.rc16 + dm_version@Base 1.0.0.rc16 + dso_end_rebuild@Base 1.0.0.rc16 + dso_get_members@Base 1.0.0.rc16 + erase_metadata@Base 1.0.0.rc16 + find_set@Base 1.0.0.rc16 + get_dm_type@Base 1.0.0.rc16 + get_set_name@Base 1.0.0.rc16 + get_set_type@Base 1.0.0.rc16 + get_status@Base 1.0.0.rc16 + get_type@Base 1.0.0.rc16 + group_set@Base 1.0.0.rc16 + hot_spare_add@Base 1.0.0.rc16 + init_locking@Base 1.0.0.rc16 + lc_inc_opt@Base 1.0.0.rc16 + lc_list@Base 1.0.0.rc16 + lc_opt@Base 1.0.0.rc16 + lc_stralloc_opt@Base 1.0.0.rc16 + lc_strcat_opt@Base 1.0.0.rc16 + lib_perform@Base 1.0.0.rc16 + libdmraid_date@Base 1.0.0.rc16 + libdmraid_exit@Base 1.0.0.rc16 + libdmraid_init@Base 1.0.0.rc16 + libdmraid_make_table@Base 1.0.0.rc16 + libdmraid_version@Base 1.0.0.rc16 + list_formats@Base 1.0.0.rc16 + lock_resource@Base 1.0.0.rc16 + log_alloc_err@Base 1.0.0.rc16 + plog@Base 1.0.0.rc16 + process_sets@Base 1.0.0.rc16 + rebuild_raidset@Base 1.0.0.rc16 + remove_delimiter@Base 1.0.0.rc16 + remove_white_space@Base 1.0.0.rc16 + total_sectors@Base 1.0.0.rc16 + unlock_resource@Base 1.0.0.rc16 --- dmraid-1.0.0.rc16.orig/debian/patches/01_fix_broken_linking.patch +++ dmraid-1.0.0.rc16/debian/patches/01_fix_broken_linking.patch @@ -0,0 +1,121 @@ +Author: Luke Yelavich +Description: Fix library symbolic link creation and library linking. +--- a/1.0.0.rc16/configure ++++ b/1.0.0.rc16/configure +@@ -693,6 +693,7 @@ DEBUG_MALLOC + DMRAID_TEST + DMRAID_VERSION + DMRAID_LIB_VERSION ++DMRAID_LIB_MAJOR_VERSION + DIETLIBC + GROUP + JOBS +@@ -5767,8 +5768,10 @@ fi + + if test "-f lib/version.h"; then + DMRAID_LIB_VERSION="`sed --quiet 's/^.*\(DMRAID_LIB_VERSION\)[^_].*"\(.*\)"/\2/p' lib/version.h`" ++ DMRAID_LIB_MAJOR_VERSION="`grep DMRAID_LIB_MAJOR_VERSION lib/version.h | tr '\t' ' ' | cut -f 3 -d ' '`" + else + DMRAID_LIB_VERSION="Unknown" ++ DMRAID_LIB_MAJOR_VERSION="Unknown" + fi + + +--- a/1.0.0.rc16/configure.in ++++ b/1.0.0.rc16/configure.in +@@ -178,7 +178,7 @@ if test x$DEBUG_MALLOC = xyes; then + fi + + dnl Mess with default exec_prefix +-if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; ++if [ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]; + then exec_prefix=""; + fi; + +@@ -220,8 +220,10 @@ fi + + if test "-f lib/version.h"; then + DMRAID_LIB_VERSION="`sed --quiet 's/^.*\(DMRAID_LIB_VERSION\)[[^_]].*"\(.*\)"/\2/p' lib/version.h`" ++ DMRAID_LIB_MAJOR_VERSION="`grep DMRAID_LIB_MAJOR_VERSION lib/version.h | tr '\t' ' ' | cut -f 3 -d ' '`" + else + DMRAID_LIB_VERSION="Unknown" ++ DMRAID_LIB_MAJOR_VERSION="Unknown" + fi + + AC_SUBST(CC) +@@ -232,6 +234,7 @@ AC_SUBST(DEBUG_MALLOC) + AC_SUBST(DMRAID_TEST) + AC_SUBST(DMRAID_VERSION) + AC_SUBST(DMRAID_LIB_VERSION) ++AC_SUBST(DMRAID_LIB_MAJOR_VERSION) + AC_SUBST(DIETLIBC) + AC_SUBST(GROUP) + AC_SUBST(JOBS) +--- a/1.0.0.rc16/lib/Makefile.in ++++ b/1.0.0.rc16/lib/Makefile.in +@@ -65,6 +65,11 @@ ifeq ("@KLIBC@", "no") + LIB_EVENTS_SHARED=$(top_srcdir)/lib/$(LIB_EVENTS_NAME).so + TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) + INSTALL_TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) ++ ifeq ("@DIETLIBC@", "yes") ++ LIBDMRAIDLIBS += -ldevmapper_dietc ++ else ++ LIBDMRAIDLIBS += -ldevmapper ++ endif + endif + endif + +@@ -82,10 +87,11 @@ install_dmraid_libs: $(INSTALL_TARGETS) + for f in $(INSTALL_TARGETS); \ + do \ + n=$$(basename $${f}) ; \ +- if [[ "$$n" =~ '.so$$' ]]; then \ ++ if echo "$$n" | grep -q '.so$$'; then \ + $(INSTALL) -m 555 $(STRIP) \ + $$f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \ +- $(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(libdir)/$${n}; \ ++ mkdir -p $(prefix)/lib; \ ++ cd $(prefix)/lib/ && $(LN_S) -f /lib/$${n}.@DMRAID_LIB_VERSION@ $${n}; \ + else \ + $(INSTALL) -m 555 $(STRIP) $$f $(libdir)/$${n}; \ + fi \ +--- a/1.0.0.rc16/make.tmpl.in ++++ b/1.0.0.rc16/make.tmpl.in +@@ -44,6 +44,7 @@ endif + OWNER = @OWNER@ + GROUP = @GROUP@ + DMRAID_LIB_VERSION = @DMRAID_LIB_VERSION@ ++DMRAID_LIB_MAJOR_VERSION = @DMRAID_LIB_MAJOR_VERSION@ + + # The number of jobs to run, if blank, defaults to the make standard + ifndef MAKEFLAGS +@@ -136,7 +137,7 @@ $(TARGETS): $(OBJECTS) + + %.so: $(OBJECTS) + $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \ +- -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event ++ -Wl,--version-script,.export.sym $(OBJECTS) $(LIBDMRAIDLIBS) -o $@ -ldevmapper-event + + $(LIB_STATIC): $(OBJECTS) + $(RM) $@ +--- a/1.0.0.rc16/tools/Makefile.in ++++ b/1.0.0.rc16/tools/Makefile.in +@@ -34,12 +34,16 @@ ifeq ("@KLIBC@", "yes") + DMRAIDLIBS += -ldevmapper_klibc + else + ifeq ("@DIETLIBC@", "yes") +- DMRAIDLIBS += -ldevmapper_dietc ++ ifeq ("@LIB_SO@", "no") ++ DMRAIDLIBS += -ldevmapper_dietc ++ endif + ifeq ("@STATIC_LINK@", "no") + DMEVENTTOOLLIBS = -ldevmapper-event_dietc + endif + else +- DMRAIDLIBS += -ldevmapper ++ ifeq ("@LIB_SO@", "no") ++ DMRAIDLIBS += -ldevmapper ++ endif + ifeq ("@STATIC_LINK@", "no") + DMEVENTTOOLLIBS = -ldevmapper-event + endif --- dmraid-1.0.0.rc16.orig/debian/patches/02_disable_dmreg.patch +++ dmraid-1.0.0.rc16/debian/patches/02_disable_dmreg.patch @@ -0,0 +1,134 @@ +Disabled all dmreg stuff +--- a/1.0.0.rc16/lib/Makefile.in ++++ b/1.0.0.rc16/lib/Makefile.in +@@ -45,10 +45,6 @@ SOURCES=\ + format/ddf/ddf1_dump.c \ + format/partition/dos.c + +-ifeq ("@STATIC_LINK@", "no") +- SOURCES += register/dmreg.c +-endif +- + OBJECTS=$(SOURCES:%.c=%.o) + + LIB_STATIC=$(top_srcdir)/lib/libdmraid.a +@@ -63,8 +59,8 @@ ifeq ("@KLIBC@", "no") + ifeq ("@STATIC_LINK@", "no") + LIB_SHARED=$(top_srcdir)/lib/libdmraid.so + LIB_EVENTS_SHARED=$(top_srcdir)/lib/$(LIB_EVENTS_NAME).so +- TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) +- INSTALL_TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) ++ TARGETS += $(LIB_SHARED) ++ INSTALL_TARGETS += $(LIB_SHARED) + ifeq ("@DIETLIBC@", "yes") + LIBDMRAIDLIBS += -ldevmapper_dietc + else +--- a/1.0.0.rc16/make.tmpl.in ++++ b/1.0.0.rc16/make.tmpl.in +@@ -137,7 +137,7 @@ $(TARGETS): $(OBJECTS) + + %.so: $(OBJECTS) + $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \ +- -Wl,--version-script,.export.sym $(OBJECTS) $(LIBDMRAIDLIBS) -o $@ -ldevmapper-event ++ -Wl,--version-script,.export.sym $(OBJECTS) $(LIBDMRAIDLIBS) -o $@ + + $(LIB_STATIC): $(OBJECTS) + $(RM) $@ +--- a/1.0.0.rc16/tools/Makefile.in ++++ b/1.0.0.rc16/tools/Makefile.in +@@ -22,12 +22,6 @@ TARGETS=\ + + include $(top_srcdir)/make.tmpl + +-ifeq ("@KLIBC@", "no") +- ifeq ("@STATIC_LINK@", "no") +- TARGETS += dmevent_tool +- endif +-endif +- + DMRAIDLIBS=-ldmraid + + ifeq ("@KLIBC@", "yes") +@@ -37,16 +31,10 @@ else + ifeq ("@LIB_SO@", "no") + DMRAIDLIBS += -ldevmapper_dietc + endif +- ifeq ("@STATIC_LINK@", "no") +- DMEVENTTOOLLIBS = -ldevmapper-event_dietc +- endif + else + ifeq ("@LIB_SO@", "no") + DMRAIDLIBS += -ldevmapper + endif +- ifeq ("@STATIC_LINK@", "no") +- DMEVENTTOOLLIBS = -ldevmapper-event +- endif + endif + + ifeq ("@LIBSELINUX@", "yes") +--- a/1.0.0.rc16/lib/.export.sym ++++ b/1.0.0.rc16/lib/.export.sym +@@ -52,8 +52,6 @@ Base { + dso_end_rebuild; + hot_spare_add; + dso_get_members; +- dm_register_device; +- dm_unregister_device; + dm_all_monitored; + local: + *; +--- a/1.0.0.rc16/lib/activate/activate.c ++++ b/1.0.0.rc16/lib/activate/activate.c +@@ -849,18 +849,12 @@ enum dm_what { DM_ACTIVATE, DM_REGISTER + static int + dm_register_for_event(char *dev_name, char *lib_name) + { +-#ifdef DMRAID_AUTOREGISTER +- dm_register_device(dev_name, lib_name); +-#endif + return 1; + } + + static int + dm_unregister_for_event(char *dev_name, char *lib_name) + { +-#ifdef DMRAID_AUTOREGISTER +- dm_unregister_device(dev_name, lib_name); +-#endif + return 1; + } + +@@ -874,6 +868,8 @@ do_device(struct lib_context *lc, struct + if (OPT_TEST(lc)) + return 1; + ++ return 1; ++ + struct dmraid_format *fmt = get_format(rs); + + if (fmt->name != NULL) { +--- a/1.0.0.rc16/lib/metadata/reconfig.c ++++ b/1.0.0.rc16/lib/metadata/reconfig.c +@@ -242,20 +242,16 @@ add_dev_to_raid(struct lib_context *lc, + * metadata on disks to OK state. + */ + /* Create lib-events library name */ +- if (fmt->name) { ++ /*if (fmt->name) { + strncpy(lib_name, "libdmraid-events-", LIB_NAME_LENGTH); + strncat(lib_name, fmt->name, + LIB_NAME_LENGTH-strlen(fmt->name)-3); + strncat(lib_name, ".so", 3); + } else + goto err; +- +- /* Check registration */ +- if (!dm_monitored_events(&pending, sub_rs->name, lib_name)) { +- /* If NOT registered update metadata to OK state. */ ++*/ + if (check_rd->fmt->metadata_handler) + check_rd->fmt->metadata_handler(lc, UPDATE_REBUILD_STATE, NULL, (void *) rs); +- } + } + #endif + --- dmraid-1.0.0.rc16.orig/debian/patches/03_fix_hyphen-used-as-minus-sign.patch +++ dmraid-1.0.0.rc16/debian/patches/03_fix_hyphen-used-as-minus-sign.patch @@ -0,0 +1,291 @@ +Author: Giuseppe Iuculano +Description: Fix hyphen-used-as-minus-sign +--- a/1.0.0.rc16/man/dmraid.8 ++++ b/1.0.0.rc16/man/dmraid.8 +@@ -4,20 +4,20 @@ dmraid \- discover, configure and activa + .SH SYNOPSIS + .B dmraid + {-a|--activate} {y|n|yes|no} +- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] +- [-f|--format FORMAT[,FORMAT...]] ++ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] ++ [\-f|--format FORMAT[,FORMAT...]] + [{-P|--partchar} CHAR] +- [-p|--no_partitions] +- [-Z|--rm_partitions] ++ [\-p|--no_partitions] ++ [\-Z|--rm_partitions] + [--separator SEPARATOR] +- [-t|--test] ++ [\-t|--test] + [RAID-set...] + + .B dmraid + {-b|--block_devices} +- [-c|--display_columns][FIELD[,FIELD...]]... +- [-d|--debug]... [-v|--verbose]... +- [--separator SEPARATOR] ++ [\-c|--display_columns][FIELD[,FIELD...]]... ++ [\-d|--debug]... [\-v|--verbose]... ++ [\--separator SEPARATOR] + [device-path...] + + .B dmraid +@@ -25,60 +25,60 @@ dmraid \- discover, configure and activa + + .B dmraid + {-l|--list_formats} +- [-d|--debug]... [-v|--verbose]... ++ [\-d|--debug]... [\-v|--verbose]... + + .B dmraid + {-n|--native_log} +- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] +- [-f|--format FORMAT[,FORMAT...]] +- [--separator SEPARATOR] ++ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] ++ [\-f|--format FORMAT[,FORMAT...]] ++ [\--separator SEPARATOR] + [device-path...] + + .B dmraid +- {-R| --rebuild} ++ {-R| \--rebuild} + RAID-set + [device-path] + + .B dmraid +- {-x| --remove} ++ {-x| \--remove} + [RAID-set] + + .B dmraid +- -f FORMAT-handler +-{-C| --create} set +- --type raidlevel +- [--size=setsize --strip stridesize] +- --disk "device-path, device-path [, device-path ...]" ++ \-f FORMAT-handler ++{-C| \--create} set ++ \--type raidlevel ++ [\--size=setsize \--strip stridesize] ++ \--disk "device-path, device-path [, device-path ...]" + + .B dmraid +-[ -f|--format FORMAT-handler] +--S|--spare [RAID-set] +--M|--media "device-path" ++[ \-f|--format FORMAT-handler] ++\-S|--spare [RAID-set] ++\-M|--media "device-path" + + .B dmraid + {-r|--raid_devices} +- [-c|--display_columns][FIELD[,FIELD...]]... +- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] +- [-D|--dump_metadata] +- [-f|--format FORMAT[,FORMAT...]] +- [--separator SEPARATOR] ++ [\-c|--display_columns][FIELD[,FIELD...]]... ++ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] ++ [\-D|--dump_metadata] ++ [\-f|--format FORMAT[,FORMAT...]] ++ [\--separator SEPARATOR] + [device-path...] + + .B dmraid + {-r|--raid_devices} +- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] +- [-E|--erase_metadata] +- [-f|--format FORMAT[,FORMAT...]] +- [--separator SEPARATOR] ++ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] ++ [\-E|--erase_metadata] ++ [\-f|--format FORMAT[,FORMAT...]] ++ [\--separator SEPARATOR] + [device-path...] + + .B dmraid + {-s|--sets}...[a|i|active|inactive] +- [-c|--display_columns][FIELD[,FIELD...]]... +- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] +- [-f|--format FORMAT[,FORMAT...]] +- [-g|--display_group] +- [--separator SEPARATOR] ++ [\-c|--display_columns][FIELD[,FIELD...]]... ++ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] ++ [\-f|--format FORMAT[,FORMAT...]] ++ [\-g|--display_group] ++ [\--separator SEPARATOR] + [RAID-set...] + + .B dmraid +@@ -117,7 +117,7 @@ will make dmraid tell the kernel to remo + underlying the set, ie if sda is part of the set, remove sda1, sda2, etc. + This prevents applications from directly accessiong the disks bypassing dmraid. + RAID set names given on command line don't need to be fully specified +-(eg, "dmraid -ay sil" would activate all discovered Silicon Image Medley ++(eg, "dmraid \-ay sil" would activate all discovered Silicon Image Medley + RAID sets). + + .TP +@@ -134,7 +134,7 @@ See description of + below for FIELD identifiers. + + .TP +-.I [-d|--debug]... ++.I [\-d|--debug]... + Enable debugging output. Opion can be given multiple times + increasing the debug output level. + +@@ -214,18 +214,18 @@ is added to the system. + During system reboot, enter OROM and mark the new drive as the rebuild drive. + After booting to the OS, use the dmraid command to rebuild. + +- Example: dmraid -R raid_set ++ Example: dmraid \-R raid_set + + 2. Using dmraid to identify a new drive + Boot to the OS and use the dmraid command with the new drive as + the second parameter. + +- Example: dmraid -R raid_set /dev/sdc ++ Example: dmraid \-R raid_set /dev/sdc + + 3. Using hot spare drive +- Mark a drive as hot spare using the "dmraid -f isw -S" command. Then use the dmraid command to start the rebuild. ++ Mark a drive as hot spare using the "dmraid \-f isw \-S" command. Then use the dmraid command to start the rebuild. + +- Example: dmraid -R raid_set ++ Example: dmraid \-R raid_set + + .TP + .I {-x|--remove} [RAID-set] +@@ -235,11 +235,11 @@ Delete one or all existing software RAID + .I -f FORMAT-handler {-C|--create} --type raidlevel [--size=setsize --strip stripsize] --disk "device-path, device-path [,device-path]" + Delete one or all existing Configure a software RAID device and store the configuration data in a group of hard drive devices consisting of this array. This command requires the following options: + +--f FORMAT-handler ++\-f FORMAT-handler + .br +- metadata format (see "dmraid -l") ++ metadata format (see "dmraid \-l") + .br +---type digit[digit...] ++\--type digit[digit...] + .br + specify the raid level of the software RAID set. + .br +@@ -251,7 +251,7 @@ Delete one or all existing Configure a s + .br + 01: raid01 (isw raid10) + .br +---size: [digits[k|K|m|M|g|G][b|B]] ++\--size: [digits[k|K|m|M|g|G][b|B]] + .br + specify the size of the RAID set.The number is an integer followed by [kKmMgG] and/or [bB]. + .br +@@ -267,11 +267,11 @@ Delete one or all existing Configure a s + .br + If this option is missing, it's set to the default value pre-configured by the vendor. Note that different vendors may apply different constraints on the granularity of the size or the minimal value. + .br +---strip: [digits[k|K|m|M|g|G][b|B]] ++\--strip: [digits[k|K|m|M|g|G][b|B]] + .br + specify the strip size of a RAID1, RAID5, and RAID10 RAID set (as above) + .br +---disk: device-path[{,| }device-path...] ++\--disk: device-path[{,| }device-path...] + .br + specify the array of the hard drives, e.g. /dev/sda. + +@@ -349,7 +349,7 @@ Use SEPARATOR as a delimiter for all opt + .TP + .I -s... [a|i] [RAID-set...] + Display properties of RAID sets. Multiple RAID set names can be given +-on the command line which don't need to be fully specified (eg, "dmraid -s hpt" ++on the command line which don't need to be fully specified (eg, "dmraid \-s hpt" + would display all discovered Highpoint RAID sets). Enter + .B -s + twice to display RAID subsets too. +@@ -377,7 +377,7 @@ Enable verbose runtime information outpu + increasing the verbosity level. + + .SH EXAMPLES +-"dmraid -l" lists all supported metadata formats with their names along with ++"dmraid \-l" lists all supported metadata formats with their names along with + some descriptive information, eg: + .br + hpt37x : (+) Highpoint HPT37X +@@ -400,16 +400,16 @@ dos : (+) DOS partitions on SW RAIDs + .br + (0): Discover, (+): Discover+Activate + +-"dmraid -ay" activates all software RAID sets discovered. ++"dmraid \-ay" activates all software RAID sets discovered. + +-"dmraid -an" deactivates all active software RAID sets which are not open ++"dmraid \-an" deactivates all active software RAID sets which are not open + (eg, mounted filesystem on them). + +-"dmraid -ay -f pdc" (pdc looked up from "dmraid -l") activates all ++"dmraid \-ay \-f pdc" (pdc looked up from "dmraid \-l") activates all + software RAID sets with Promise format discovered and ignores all other + supported formats. + +-"dmraid -r" discovers all software RAID devices supported on your system, eg: ++"dmraid \-r" discovers all software RAID devices supported on your system, eg: + .br + /dev/dm-46: hpt45x, "hpt45x_chidjhaiaa-0", striped, ok, 320172928 sectors, data@ 0 + .br +@@ -420,7 +420,7 @@ supported formats. + /dev/dm-58: hpt45x, "hpt45x_chidjhaiaa-1", striped, ok, 320172928 sectors, data@ 0 + + +-"dmraid -s -s hpt45x_chidjhaiaa" displays properties of ++"dmraid \-s \-s hpt45x_chidjhaiaa" displays properties of + set "hpt45x_chidjhaiaa", eg: + .br + *** Superset +@@ -478,7 +478,7 @@ dev : 2 + spare : 0 + .br + +-"dmraid -s -ccs hpt45" displays properties in column format of all sets ++"dmraid \-s \-ccs hpt45" displays properties in column format of all sets + and subsets with hpt45* format, eg: + .br + hpt45x_chidjhaiaa,640345856,128,raid10,ok,4,0 +@@ -487,7 +487,7 @@ hpt45x_chidjhaiaa-a,640345856,128,stripe + .br + hpt45x_chidjhaiaa-b,640345856,128,stripe,ok,2,0 + +-"dmraid -r --sep : -cpath:size" display paths and sizes in sectors for ++"dmraid \-r \--sep : \-cpath:size" display paths and sizes in sectors for + RAID devices in column format using ':' as a delimiter, eg: + .br + /dev/dm-8:320173055 +@@ -518,18 +518,18 @@ RAID devices in column format using ':' + .br + /dev/dm-66:390624896 + +-"dmraid -f isw -C Raid0 --type 0 --strip 8k --size 20g --disk "/dev/sdb /dev/sdc"" creates an ISW volume with ++"dmraid \-f isw \-C Raid0 \--type 0 \--strip 8k \--size 20g \--disk "/dev/sdb /dev/sdc"" creates an ISW volume with + a name of "Raid0", 20Gig bytes in total, and 8kilo bytes strip size on two disks. + +-"dmraid -f isw -C Test0 --type 0 --disk "/dev/sdd /dev/sde"" creates an ISW volume with the default size and strip size. ++"dmraid \-f isw \-C Test0 \--type 0 \--disk "/dev/sdd /dev/sde"" creates an ISW volume with the default size and strip size. + +-"dmraid -f isw -C Test10 --type 01 --strip 128B --disk "/dev/sda /dev/sdb /dev/sdc /dev/sdd" creates a stacked ++"dmraid \-f isw \-C Test10 \--type 01 \--strip 128B \--disk "/dev/sda /dev/sdb /dev/sdc /dev/sdd" creates a stacked + RAID device, RAID10 (isw format), with a name of "Test10", 128 blocks (512bytes) strip size , and the default volume size on + 4 disks. + +-"dmraid -f isw -S -M /dev/sde" marks the device /dev/sde as a hot spare for rebuild ++"dmraid \-f isw \-S \-M /dev/sde" marks the device /dev/sde as a hot spare for rebuild + +-"dmraid -R isw_djaggchdde_RAID1 /dev/sde" starts rebuild of the RAID volume on device /dev/sde ++"dmraid \-R isw_djaggchdde_RAID1 /dev/sde" starts rebuild of the RAID volume on device /dev/sde + + .SH DIAGNOSTICS + dmraid returns an exit code of 0 for success or 1 for error. --- dmraid-1.0.0.rc16.orig/debian/patches/09_promise-add-offsets.patch +++ dmraid-1.0.0.rc16/debian/patches/09_promise-add-offsets.patch @@ -0,0 +1,13 @@ +Author: Luke Yelavich +Description: Add extra offsets where promise metadata can be found. +--- a/1.0.0.rc16/lib/format/ataraid/pdc.h ++++ b/1.0.0.rc16/lib/format/ataraid/pdc.h +@@ -13,7 +13,7 @@ + + #include + +-#define PDC_CONFIGOFFSETS 63,255,256,16,399,591,675,735,974,991 ++#define PDC_CONFIGOFFSETS 63,255,256,16,399,591,675,735,974,991,911,951 + #define PDC_DATAOFFSET 0 + + /* --- dmraid-1.0.0.rc16.orig/debian/patches/10_exit_code.patch +++ dmraid-1.0.0.rc16/debian/patches/10_exit_code.patch @@ -0,0 +1,22 @@ +Author: Giuseppe Iuculano +Description: Fix exit-code for "No RAID disks" and "no block devices found" errors (LP: #300825) +--- a/1.0.0.rc16/lib/metadata/metadata.c ++++ b/1.0.0.rc16/lib/metadata/metadata.c +@@ -2096,7 +2096,7 @@ get_metadata(struct lib_context *lc, enu + + if (!count_devices(lc, DEVICE)) { + log_print(lc, "no block devices found"); +- return 1; ++ return 0; + } + + if (!(M_RAID & p->metadata)) +@@ -2118,7 +2118,7 @@ get_metadata(struct lib_context *lc, enu + if (!OPT_HOT_SPARE_SET(lc) && !OPT_CREATE(lc) + && !count_devices(lc, RAID)) { + format_error(lc, "disks", argv); +- return 1; ++ return 0; + } + + if (M_SET & p->metadata) { --- dmraid-1.0.0.rc16.orig/debian/patches/12_support_virtio_devices.patch +++ dmraid-1.0.0.rc16/debian/patches/12_support_virtio_devices.patch @@ -0,0 +1,13 @@ +Author: Luke Yelavich +Description: Support for checking virtio devices for dmraid metadata. +--- a/1.0.0.rc16/lib/device/scan.c ++++ b/1.0.0.rc16/lib/device/scan.c +@@ -174,7 +174,7 @@ interested(struct lib_context *lc, char + * Whole IDE and SCSI disks only. + */ + return (!isdigit(name[strlen(name) - 1]) && +- (*(name + 1) == 'd' && (*name == 'h' || *name == 's'))) ++ (*(name + 1) == 'd' && (*name == 'h' || *name == 's' || *name == 'v'))) + #ifdef DMRAID_TEST + /* + * Include dm devices for testing. --- dmraid-1.0.0.rc16.orig/debian/patches/15_activate_multiple_raid_sets.patch +++ dmraid-1.0.0.rc16/debian/patches/15_activate_multiple_raid_sets.patch @@ -0,0 +1,12 @@ +Continue onto all raid sets instead of returning after processing the first. (LP: #401713) +--- a/1.0.0.rc16/lib/metadata/metadata.c ++++ b/1.0.0.rc16/lib/metadata/metadata.c +@@ -839,7 +839,7 @@ _discover_partitions(struct lib_context + */ + if (T_GROUP(rs)) { + _discover_partitions(lc, &rs->sets); +- return; ++ continue; + } + + /* --- dmraid-1.0.0.rc16.orig/debian/patches/15_isw_incorrect_status_fix.patch +++ dmraid-1.0.0.rc16/debian/patches/15_isw_incorrect_status_fix.patch @@ -0,0 +1,322 @@ +Patch include: + fix for "Incorrect status displayed when disk is missing" issue. + fix for "Missing supported RAID configuration in "-l" option" - Bugzilla bug +479395 + fix for "Wrong disk layout in raid01" - no Bugzilla bug. +--- a/1.0.0.rc15/lib/format/ataraid/isw.c ++++ b/1.0.0.rc15/lib/format/ataraid/isw.c +@@ -4,8 +4,11 @@ + * Copyright (C) 2004-2008 Heinz Mauelshagen, Red Hat GmbH. + * All rights reserved. + * +- * Copyright (C) 2007,2008 Intel Corporation. All rights reserved. ++ * Copyright (C) 2007,2009 Intel Corporation. All rights reserved. + * November, 2007 - additions for Create, Delete, Rebuild & Raid 10. ++ * March, 2008 - additions for hot-spare check ++ * August, 2008 - support for Activation, Rebuild checks ++ * January, 2009 - additions for Activation, Rebuild check + * + * See file LICENSE at the top of this source tree for license information. + */ +@@ -162,7 +165,7 @@ name(struct lib_context *lc, struct raid + + while (i--) { + if (disk == isw->disk + i) { +- id = i / 2; ++ id = i % 2; + goto ok; + } + } +@@ -479,7 +482,7 @@ isw_read_extended(struct lib_context *lc + /* Read extended metadata to offset ISW_DISK_BLOCK_SIZE */ + if (blocks > 1 && + !read_file(lc, handler, di->path, +- (void *) isw_tmp + ISW_DISK_BLOCK_SIZE, ++ (void *) (((uint8_t*)isw_tmp) + ISW_DISK_BLOCK_SIZE), + *size - ISW_DISK_BLOCK_SIZE, *isw_sboffset)) { + dbg_free(isw_tmp); + isw_tmp = NULL; +@@ -708,6 +711,7 @@ super_created(struct raid_set *super, vo + super->stride = ((struct isw_dev *) private)->vol.map.blocks_per_strip; + } + ++ + /* + * rs_group contains the top-level group RAID set (type: t_group) on entry + * and shall be returned on success (or NULL on error). +@@ -1112,6 +1116,15 @@ isw_metadata_handler(struct lib_context + + break; /* case GET_REBUILD_DRIVE_NO */ + ++ case ALLOW_ACTIVATE: /* same as ALLOW_REBUILD */ ++ case ALLOW_REBUILD: ++ /* Do not allow activate or rebuild, if the log is non-empty */ ++ isw = META (rd, isw); ++ ret = !isw->bbm_log_size; /* Is log empty */ ++ if (!ret) ++ log_err(lc, "BBM entries detected!"); ++ break; /* case ALLOW_REBUILD */ ++ + default: + LOG_ERR(lc, 0, "%u not yet supported", command); + +@@ -1144,16 +1157,25 @@ check_rd(struct lib_context *lc, struct + struct raid_dev *rd, void *context) + { + struct isw_dev *dev = rd->private.ptr; +- +- /* FIXME: more status checks ? */ +- if (dev->status) { ++ if (dev == NULL) ++ if (rd->type == t_spare) return 1; ++ else { ++ LOG_ERR(lc, 0, "No information about %s device on %s " ++ "in RAID set \"%s\"", ++ handler, rd->di->path, rs->name); ++ return 0; ++ } ++ /* if disk is ready to read and write return 1 */ ++ if ((dev->status & ISW_DEV_READ_COALESCING) ++ && (dev->status & ISW_DEV_WRITE_COALESCING)) { ++ return 1; ++ } ++ else { + LOG_ERR(lc, 0, "%s device for volume \"%s\" broken on %s " + "in RAID set \"%s\"", + handler, dev->volume, rd->di->path, rs->name); +- ++ return 0; + } +- +- return 1; + } + + static int +@@ -1622,6 +1644,7 @@ _isw_create_first_volume(struct lib_cont + isw->attributes = MPB_ATTRIB_CHECKSUM_VERIFY; + isw->num_raid_devs = (rs->type == ISW_T_SPARE) ? 0 : 1; + isw->family_num = isw->orig_family_num = _checksum(isw) + time(NULL); ++ isw->bbm_log_size = 0; + isw->check_sum = 0; + isw->check_sum = _checksum(isw); + return isw; +@@ -1719,6 +1742,7 @@ _isw_create_second_volume(struct lib_con + isw->generation_num++; + isw->attributes = MPB_ATTRIB_CHECKSUM_VERIFY; + isw->num_raid_devs++; ++ isw->bbm_log_size = 0; + isw->check_sum = 0; + isw->check_sum = _checksum(isw); + return isw; +@@ -1941,6 +1965,8 @@ _isw_log(struct lib_context *lc, struct + DP("error_log_pos: %u", isw, isw->error_log_pos); + DP("cache_size: %u", isw, isw->cache_size); + DP("orig_family_num: %u", isw, isw->orig_family_num); ++ DP ("power_cycle_count: %u", isw, isw->power_cycle_count); ++ DP ("bbm_log_size: %u", isw, isw->bbm_log_size); + + for (i = 0; i < ISW_FILLERS; i++) { + if (isw->filler[i]) +@@ -2296,7 +2322,7 @@ isw_delete(struct lib_context *lc, struc + static struct dmraid_format isw_format = { + .name = HANDLER, + .descr = "Intel Software RAID", +- .caps = "0,1,01", ++ .caps = "0,1,5,01", + .format = FMT_RAID, + .read = isw_read, + .write = isw_write, +--- a/1.0.0.rc15/lib/format/format.c ++++ b/1.0.0.rc15/lib/format/format.c +@@ -260,6 +260,7 @@ write_metadata(struct lib_context *lc, c + return 1; + } + ++ + /* + * Check devices in a RAID set. + * +@@ -277,7 +278,7 @@ _check_raid_set(struct lib_context *lc, + void *context), + void *f_check_context, const char *handler) + { +- unsigned int devs; ++ unsigned int dev_tot_qan; + uint64_t sectors; + struct raid_dev *rd; + +@@ -285,36 +286,73 @@ _check_raid_set(struct lib_context *lc, + return; + + sectors = total_sectors(lc, rs); +- rs->total_devs = devs = count_devs(lc, rs, ct_dev); ++ rs->total_devs = dev_tot_qan = count_devs(lc, rs, ct_dev); + list_for_each_entry(rd, &rs->devs, devs) { +- unsigned int devices = f_devices(rd, f_devices_context); ++ unsigned int dev_found_qan = f_devices(rd, f_devices_context); + /* FIXME: error if the metadatas aren't all the same? */ +- rs->found_devs = devices; ++ rs->found_devs = dev_found_qan; + + log_dbg(lc, "checking %s device \"%s\"", handler, rd->di->path); +- if (T_SPARE(rd) && rs->type == t_raid1 && /* FIXME: rs->type check ? */ +- rd->sectors != sectors) { +- rd->status = s_inconsistent; +- log_err(lc, "%s: size mismatch in set \"%s\", spare " +- "\"%s\"", handler, rs->name, rd->di->path); +- continue; +- } +- +- if (devs != devices && +- f_check && !f_check(lc, rs, rd, f_check_context)) { +- rd->status = s_broken; +- log_err(lc, "%s: wrong # of devices in RAID " +- "set \"%s\" [%u/%u] on %s", +- handler, rs->name, devs, devices, rd->di->path); +- } else +- rd->status = s_ok; ++ /* if disks number of found disks equals disk expected status status OK */ ++ if ((dev_tot_qan == dev_found_qan) && f_check ++ && f_check(lc, rs, rd, f_check_context)) { ++ rd->status = s_ok; ++ } ++ else { ++ if(dev_tot_qan != dev_found_qan) { ++ log_err(lc, "%s: wrong # of devices in RAID " ++ "set \"%s\" [%u/%u] on %s", ++ handler, rs->name, dev_tot_qan, dev_found_qan, rd->di->path); ++ } ++ /* if number of disks is incorrect, status depends on raid type: */ ++ switch(rs->type) { ++ case t_linear: ++ case t_raid0: /* raid 0 - always broken */ ++ rd->status = s_broken; ++ break; ++ case t_raid1: /* raid 1 - if at least 1 disk- inconsintent */ ++ if(dev_tot_qan >= 1) ++ rd->status = s_inconsistent; ++ else if (T_SPARE(rd) && rd->sectors != sectors) { ++ rd->status = s_inconsistent; ++ log_err(lc, "%s: size mismatch in set \"%s\", spare " ++ "\"%s\"", handler, rs->name, rd->di->path); ++ } ++ else rd->status = s_broken; ++ break; ++ case t_raid4: ++ case t_raid5_ls: ++ case t_raid5_rs: ++ case t_raid5_la: ++ case t_raid5_ra: /* raid 4/5 - if 1 disk missing- inconsistent */ ++ if((dev_tot_qan == (dev_found_qan-1) && dev_tot_qan > 1 ++ && f_check && f_check(lc, rs, rd, f_check_context)) ++ || (dev_tot_qan > dev_found_qan)) ++ rd->status = s_inconsistent; ++ else rd->status = s_broken; ++ break; ++ case t_raid6: /* raid 6 - if up to 2 disks missing- inconsistent */ ++ if((dev_tot_qan >= (dev_found_qan-2) ++ && f_check && f_check(lc, rs, rd, f_check_context)) ++ || (dev_tot_qan > dev_found_qan)) ++ rd->status = s_inconsistent; ++ else rd->status = s_broken; ++ break; ++ ++ case t_spare: /* spare - always broken */ ++ rd->status = s_broken; ++ break; ++ default: /* other - undef */ ++ rd->status = s_undef; ++ } ++ } + } + } + + /* + * Update RAID set state based on operational subsets/devices. + * +- * In case of a RAID set hierachy, check availability of subsets ++ f a RAID set hierachy, check availability of subsets + * and set superset to broken in case *all* subsets are broken. + * If at least one is still available, set to inconsistent. + * +@@ -323,12 +361,19 @@ _check_raid_set(struct lib_context *lc, + */ + static void + _set_rs_status(struct lib_context *lc, struct raid_set *rs, +- unsigned int i, unsigned int operational) ++ unsigned int i, unsigned int operational, ++ unsigned int inconsist, unsigned int subsets_raid01) + { +- if (operational == i) ++ if (subsets_raid01 == 1) { ++ rs->status = s_broken; ++ return; ++ } ++ if (operational == i) + rs->status = s_ok; + else if (operational) + rs->status = s_inconsistent; ++ else if (inconsist) ++ rs->status = s_inconsistent; + else + rs->status = s_broken; + +@@ -338,26 +383,30 @@ _set_rs_status(struct lib_context *lc, s + static int + set_rs_status(struct lib_context *lc, struct raid_set *rs) + { +- unsigned int i = 0, operational = 0; ++ unsigned int i = 0, operational = 0, subsets_raid01 = 0, inconsist = 0; + struct raid_set *r; + struct raid_dev *rd; + + /* Set status of subsets. */ + list_for_each_entry(r, &rs->sets, list) { + /* Check subsets to set status of superset. */ +- i++; ++ if((rs->type == t_raid0) && (r->type == t_raid1)) ++ subsets_raid01++; /* Count subsets for raid 01 */ ++ i++; /* Count subsets*/ + if (S_OK(r->status) || S_INCONSISTENT(r->status)) +- operational++; ++ operational++; /* Count operational subsets*/ + } + + /* Check status of devices... */ + list_for_each_entry(rd, &rs->devs, devs) { +- i++; ++ i++; /* Count disks*/ + if (S_OK(rd->status)) +- operational++; ++ operational++; /* Count disks in "ok" raid*/ ++ if (S_INCONSISTENT(rd->status)) ++ inconsist++; /* Count disks in degraded raid*/ + } + +- _set_rs_status(lc, rs, i, operational); ++ _set_rs_status(lc, rs, i, operational, inconsist, subsets_raid01); + return S_BROKEN(rs->status) ? 0 : 1; + } + +--- a/1.0.0.rc15/include/dmraid/format.h ++++ b/1.0.0.rc15/include/dmraid/format.h +@@ -75,6 +75,8 @@ enum handler_commands { + GET_REBUILD_DRIVE, + GET_REBUILD_DRIVE_NO, + CHECK_HOT_SPARE, ++ ALLOW_ACTIVATE, ++ ALLOW_REBUILD, + /* ... */ + }; + +--- a/1.0.0.rc15/lib/format/ataraid/isw.h ++++ b/1.0.0.rc15/lib/format/ataraid/isw.h +@@ -188,6 +188,8 @@ struct isw_dev { + + struct isw { + int8_t sig[MAX_SIGNATURE_LENGTH]; /* 0x0 - 0x1F */ ++ uint32_t bbm_log_size; ++ uint32_t power_cycle_count; + uint32_t check_sum; /* 0x20 - 0x23 MPB Checksum */ + uint32_t mpb_size; /* 0x24 - 0x27 Size of MPB */ + uint32_t family_num; /* 0x28 - 0x2B Checksum from first time this config was written */ --- dmraid-1.0.0.rc16.orig/debian/patches/17_isw-probe-hpa.patch +++ dmraid-1.0.0.rc16/debian/patches/17_isw-probe-hpa.patch @@ -0,0 +1,144 @@ +Probe isw disks with [some] HPA awareness, thanks to Robert Collins . (LP: #372170) +--- a/1.0.0.rc16/lib/format/ataraid/isw.c ++++ b/1.0.0.rc16/lib/format/ataraid/isw.c +@@ -353,6 +353,7 @@ raiddev(struct isw *isw, unsigned i) + enum convert { FULL, FIRST, LAST }; + #if BYTE_ORDER == LITTLE_ENDIAN + # define to_cpu(x, y) ++# define CVT16(x) + #else + /* + * We can differ from the read_raid_dev template here, +@@ -547,15 +548,16 @@ disk_ok(struct lib_context *lc, struct d + } + + static void * +-isw_read_metadata(struct lib_context *lc, struct dev_info *di, +- size_t * sz, uint64_t * offset, union read_info *info) ++isw_try_sboffset(struct lib_context *lc, struct dev_info *di, ++ size_t * sz, uint64_t * offset, union read_info *info, ++ uint64_t const isw_sboffset) + { + size_t size = ISW_DISK_BLOCK_SIZE; +- uint64_t isw_sboffset = ISW_CONFIGOFFSET(di); + struct isw *isw; ++ uint64_t temp_isw_sboffset = isw_sboffset; + + if (!(isw = alloc_private_and_read(lc, handler, size, +- di->path, isw_sboffset))) ++ di->path, temp_isw_sboffset))) + goto out; + + /* +@@ -565,9 +567,15 @@ isw_read_metadata(struct lib_context *lc + to_cpu(isw, FIRST); + + /* Check Signature and read optional extended metadata. */ +- if (!is_isw(lc, di, isw) || +- !isw_read_extended(lc, di, &isw, &isw_sboffset, &size)) ++ if (!is_isw(lc, di, isw)) { ++ log_dbg(lc, "not isw at %ld", isw_sboffset); + goto bad; ++ } ++ if (!isw_read_extended(lc, di, &isw, &temp_isw_sboffset, &size)) { ++ log_err(lc, "isw metadata, but extended read failed at %ld", ++ isw_sboffset); ++ goto bad; ++ } + + /* + * Now that we made sure, that we've got all the +@@ -578,6 +586,8 @@ isw_read_metadata(struct lib_context *lc + if (disk_ok(lc, di, isw)) { + *sz = size; + *offset = info->u64 = isw_sboffset; ++ log_dbg(lc, "isw metadata found at %ld from probe at %ld\n", ++ *offset, isw_sboffset); + goto out; + } + +@@ -589,6 +599,54 @@ out: + return (void *) isw; + } + ++/* HPA on a disk shifts everything down. This is a 'works-enough' approach to ++ * handling that. There is a better long term approach requiring kernel ++ * patches - see the lkml patches for alt_size. ++ */ ++static void * ++isw_try_hpa(struct lib_context *lc, struct dev_info *di, ++ size_t * sz, uint64_t * offset, union read_info *info) ++{ ++ struct isw10 *isw10; ++ void *result = NULL; ++ uint64_t actual_offset; ++ if (!(isw10 = alloc_private_and_read(lc, handler, ISW_DISK_BLOCK_SIZE, ++ di->path, ISW_10_CONFIGOFFSET(di)))) ++ goto out; ++ if (strncmp((const char *)isw10->sig, ISW10_SIGNATURE, ISW10_SIGNATURE_SIZE)) ++ goto out_free; ++ log_dbg(lc, "Found isw 10 gafr signature."); ++ CVT16(isw10->offset); ++ actual_offset = isw10->offset + 2; ++ log_dbg(lc, "isw 10 sector offset calculated at %hd.", actual_offset); ++ if (actual_offset > di->sectors) ++ goto out_free; ++ result = isw_try_sboffset(lc, di, sz, offset, info, ++ ISW_SECTOR_TO_OFFSET(di->sectors - actual_offset)); ++ out_free: ++ dbg_free(isw10); ++ out: ++ return result; ++} ++ ++ ++static void * ++isw_read_metadata(struct lib_context *lc, struct dev_info *di, ++ size_t * sz, uint64_t * offset, union read_info *info) ++{ ++ void *result; ++ if ((result = isw_try_sboffset( ++ lc, di, sz, offset, info, ISW_CONFIGOFFSET(di)))) ++ return result; ++ if ((result = isw_try_hpa(lc, di, sz, offset, info))) ++ return result; ++ log_dbg(lc, "isw trying hard coded -2115 offset."); ++ if ((result = isw_try_sboffset( ++ lc, di, sz, offset, info, (di->sectors - 2115)*512))) ++ return result; ++ return NULL; ++} ++ + static int setup_rd(struct lib_context *lc, struct raid_dev *rd, + struct dev_info *di, void *meta, union read_info *info); + static struct raid_dev * +--- a/1.0.0.rc16/lib/format/ataraid/isw.h ++++ b/1.0.0.rc16/lib/format/ataraid/isw.h +@@ -36,8 +36,11 @@ + + /* Intel metadata offset in bytes */ + #define ISW_CONFIGSECTOR(di) ((di)->sectors - 2) +-#define ISW_CONFIGOFFSET(di) (ISW_CONFIGSECTOR(di) << 9) ++#define ISW_SECTOR_TO_OFFSET(sector) ((sector) << 9) ++#define ISW_CONFIGOFFSET(di) (ISW_SECTOR_TO_OFFSET(ISW_CONFIGSECTOR(di))) + #define ISW_DATAOFFSET 0 /* Data offset in sectors */ ++#define ISW_10_CONFIGSECTOR(di) ((di)->sectors - 1) ++#define ISW_10_CONFIGOFFSET(di) (ISW_SECTOR_TO_OFFSET(ISW_10_CONFIGSECTOR(di))) + + #define MPB_SIGNATURE "Intel Raid ISM Cfg Sig. " + #define MPB_SIGNATURE_SIZE (sizeof(MPB_SIGNATURE) - 1) +@@ -222,6 +225,14 @@ struct isw { + // here comes isw_dev[num_raid_devs] + } __attribute__ ((packed)); + ++#define ISW10_SIGNATURE "$GAFR\x10" ++#define ISW10_SIGNATURE_SIZE (sizeof(ISW10_SIGNATURE) - 1) ++struct isw10 { ++ int8_t sig[ISW10_SIGNATURE_SIZE]; ++ uint32_t offset; /* offset to real data, in sectors back */ ++} __attribute__ ((packed)); ++ ++ + #endif + + int register_isw(struct lib_context *lc); --- dmraid-1.0.0.rc16.orig/debian/patches/18_pdc_raid10_failure..patch +++ dmraid-1.0.0.rc16/debian/patches/18_pdc_raid10_failure..patch @@ -0,0 +1,14 @@ +fix pdc metadata format handler to report the proper number of devices in a subset +--- a/1.0.0.rc16/lib/format/ataraid/pdc.c ++++ b/1.0.0.rc16/lib/format/ataraid/pdc.c +@@ -490,7 +490,9 @@ devices(struct raid_dev *rd, void *conte + if (context && pdc->raid.type != PDC_T_SPAN) + *((uint64_t *) context) += rd->sectors; + +- return pdc->raid.total_disks; ++ return is_raid10(pdc) ? ++ pdc->raid.total_disks / 2 : ++ pdc->raid.total_disks; + } + + static int --- dmraid-1.0.0.rc16.orig/debian/patches/19_ddf1_lsi_persistent_name.patch +++ dmraid-1.0.0.rc16/debian/patches/19_ddf1_lsi_persistent_name.patch @@ -0,0 +1,20 @@ +Using a dummy string for the timestamp in the LSI metadata +--- a/1.0.0.rc16/lib/format/ddf/ddf1.c ++++ b/1.0.0.rc16/lib/format/ddf/ddf1.c +@@ -696,6 +696,16 @@ name(struct lib_context *lc, struct ddf1 + sprintf(b, "%02x%02x%02x%02x", + vd->guid[i], vd->guid[i + 1], + vd->guid[i + 2], vd->guid[i + 3]); ++ ++ /* ++ * Because the LSI bios changes the timestamp in the ++ * metadata on every boot, we have to neutralize it ++ * in order to allow for persistent names. ++ * ++ * Using a dummy string "47114711" for that. ++ */ ++ if (!strncmp((char *) vd->guid, "LSI", 3)) ++ strncpy(buf + prefix + 32, "47114711", 8); + } + + out: --- dmraid-1.0.0.rc16.orig/debian/patches/20_fix_isw_sectors_calculation.patch +++ dmraid-1.0.0.rc16/debian/patches/20_fix_isw_sectors_calculation.patch @@ -0,0 +1,14 @@ +Fix isw raid0 incorrect sectors calculation, thanks to Valentin Pavlyuchenko +--- a/1.0.0.rc16/lib/format/ataraid/isw.c ++++ b/1.0.0.rc16/lib/format/ataraid/isw.c +@@ -776,7 +776,9 @@ _create_rd(struct lib_context *lc, + r->di = rd->di; + r->fmt = rd->fmt; + r->offset = dev->vol.map[0].pba_of_lba0; +- if ((r->sectors = dev->vol.map[0].blocks_per_member - RAID_DS_JOURNAL)) ++ //fix bugs on ICH10R ++ //if ((r->sectors = dev->vol.map[0].blocks_per_member - RAID_DS_JOURNAL)) ++ if ((r->sectors = dev->vol.map[0].blocks_per_member)) + goto out; + + log_zero_sectors(lc, rd->di->path, handler); --- dmraid-1.0.0.rc16.orig/debian/patches/21_fix_man_page_typos.patch +++ dmraid-1.0.0.rc16/debian/patches/21_fix_man_page_typos.patch @@ -0,0 +1,48 @@ +diff -Nur dmraid.orig/1.0.0.rc16/man/dmraid.8 dmraid/1.0.0.rc16/man/dmraid.8 +--- dmraid.orig/1.0.0.rc16/man/dmraid.8 2014-12-04 21:19:56.475626165 +0000 ++++ dmraid/1.0.0.rc16/man/dmraid.8 2014-12-04 21:22:12.843459188 +0000 +@@ -115,7 +115,7 @@ + .B -Z + will make dmraid tell the kernel to remove the partitions from the disks + underlying the set, ie if sda is part of the set, remove sda1, sda2, etc. +-This prevents applications from directly accessiong the disks bypassing dmraid. ++This prevents applications from directly accessing the disks bypassing dmraid. + RAID set names given on command line don't need to be fully specified + (eg, "dmraid \-ay sil" would activate all discovered Silicon Image Medley + RAID sets). +@@ -135,7 +135,7 @@ + + .TP + .I [\-d|--debug]... +-Enable debugging output. Opion can be given multiple times ++Enable debugging output. Option can be given multiple times + increasing the debug output level. + + .TP +@@ -165,7 +165,7 @@ + .B -l + for a list of supported format handler names. This is useful to + select particular formats in case multiple metadata signatures are found +-on a device. A comma seperated list of format names can be specified which ++on a device. A comma separated list of format names can be specified which + may not contain white space. + + .TP +@@ -183,7 +183,7 @@ + descriptions. Supported RAID levels are listed in parenthesis: + .br + +-S: Span (concatination) ++S: Span (concatenation) + .br + 0: RAID0 (stripe) + .br +@@ -373,7 +373,7 @@ + + .TP + .I [-v|--verbose]... +-Enable verbose runtime information output. Opion can be given multiple times ++Enable verbose runtime information output. Option can be given multiple times + increasing the verbosity level. + + .SH EXAMPLES --- dmraid-1.0.0.rc16.orig/debian/patches/21_fix_testing.patch +++ dmraid-1.0.0.rc16/debian/patches/21_fix_testing.patch @@ -0,0 +1,24 @@ +From: Phillip Susi +Last-Update: 2011-03-08 +Forwarded: yes +Description: Testing with dm devices was failing on Ubuntu because + /dev/dm-X is the actual device node, but the code wanted it to be + a symlink. Fixed dm_test_device() to test that the file ( or node + it points to ) is a block device, which seems a much more + appropriate test. + +Index: b/1.0.0.rc16/lib/device/scan.c +=================================================================== +--- a/1.0.0.rc16/lib/device/scan.c ++++ b/1.0.0.rc16/lib/device/scan.c +@@ -86,8 +86,8 @@ + { + struct stat s; + +- return !lstat(path, &s) && +- S_ISLNK(s.st_mode) && ++ return !stat(path, &s) && ++ S_ISBLK(s.st_mode) && + !strncmp(get_basename(lc, path), "dm-", 3); + } + --- dmraid-1.0.0.rc16.orig/debian/patches/21_jmicron_namefix.patch +++ dmraid-1.0.0.rc16/debian/patches/21_jmicron_namefix.patch @@ -0,0 +1,20 @@ +From: Phillip Susi +Author: Danny Wood +Subject: Fix jmicron names again +Bug-Ubuntu: http://launchpad.net/bugs/576289 +Last-Update: 2011-03-08 +Description: Uninitialized variable prevented code from working + as intended. +Index: b/1.0.0.rc16/lib/format/ataraid/jm.c +=================================================================== +--- a/1.0.0.rc16/lib/format/ataraid/jm.c ++++ b/1.0.0.rc16/lib/format/ataraid/jm.c +@@ -25,7 +25,7 @@ + static char * + name(struct lib_context *lc, struct raid_dev *rd, unsigned int subset) + { +- size_t i, len; ++ size_t i = JM_NAME_LEN - 1, len; + struct jm *jm = META(rd, jm); + char *ret, *name = (char *) jm->name; + char buf[JM_NAME_LEN + 1] = { '\0' }; --- dmraid-1.0.0.rc16.orig/debian/patches/23_pdc_dump_extended_metadata.patch +++ dmraid-1.0.0.rc16/debian/patches/23_pdc_dump_extended_metadata.patch @@ -0,0 +1,147 @@ +From: Phillip Susi +Last-Update: 2011-03-08 +Forwarded: Yes +Description: PDC supports up to 4 sets of metadata to describe + different arrays. Only the first set was being dumped with + dmraid -rD or -n. This patch corrects that. Also fixes the + .offset file, which was always reporting 0. + +Index: b/1.0.0.rc16/lib/format/ataraid/pdc.c +=================================================================== +--- a/1.0.0.rc16/lib/format/ataraid/pdc.c ++++ b/1.0.0.rc16/lib/format/ataraid/pdc.c +@@ -172,7 +172,6 @@ + unsigned *s = end_sectors; + uint64_t sector; + +- *size = sizeof(*ret); + pdc_sectors_max = di->sectors - div_up(*size, 512); + + if (!(ret = alloc_private(lc, handler, +@@ -219,7 +218,9 @@ + dbg_free(ret); + ret = NULL; + } +- ++ *size = sizeof(*ret) * ma; ++ *offset = di->sectors - info->u32; ++ *offset <<= 9; + return ret; + } + +@@ -544,60 +545,64 @@ + static void + _pdc_log(struct lib_context *lc, struct dev_info *di, struct pdc *pdc) + { +- unsigned i; ++ unsigned i, ma = count_meta_areas(pdc); + struct pdc_disk *disk; + +- log_print(lc, "%s (%s):", di->path, handler); +- DP("promise_id: \"%s\"", pdc, pdc->promise_id); +- P("unknown_0: 0x%x %u", +- pdc, pdc->unknown_0, pdc->unknown_0, pdc->unknown_0); +- DP("magic_0: 0x%x", pdc, pdc->magic_0); +- P("unknown_1: 0x%x %u", +- pdc, pdc->unknown_1, pdc->unknown_1, pdc->unknown_1); +- DP("magic_1: 0x%x", pdc, pdc->magic_1); +- P("unknown_2: 0x%x %u", +- pdc, pdc->unknown_2, pdc->unknown_2, pdc->unknown_2); +- DP("raid.flags: 0x%x", pdc, pdc->raid.flags); +- P("raid.unknown_0: 0x%x %d", +- pdc, pdc->raid.unknown_0, pdc->raid.unknown_0, pdc->raid.unknown_0); +- DP("raid.disk_number: %u", pdc, pdc->raid.disk_number); +- DP("raid.channel: %u", pdc, pdc->raid.channel); +- DP("raid.device: %u", pdc, pdc->raid.device); +- DP("raid.magic_0: 0x%x", pdc, pdc->raid.magic_0); +- P("raid.unknown_1: 0x%x %u", +- pdc, pdc->raid.unknown_1, pdc->raid.unknown_1, pdc->raid.unknown_1); +- P("raid.start: 0x%x %u", +- pdc, pdc->raid.start, pdc->raid.start, pdc->raid.start); +- DP("raid.disk_secs: %u", pdc, pdc->raid.disk_secs); +- P("raid.unknown_3: 0x%x %u", +- pdc, pdc->raid.unknown_3, pdc->raid.unknown_3, pdc->raid.unknown_3); +- P("raid.unknown_4: 0x%x %u", +- pdc, pdc->raid.unknown_4, pdc->raid.unknown_4, pdc->raid.unknown_4); +- DP("raid.status: 0x%x", pdc, pdc->raid.status); +- DP("raid.type: 0x%x", pdc, pdc->raid.type); +- DP("raid.total_disks: %u", pdc, pdc->raid.total_disks); +- DP("raid.raid0_shift: %u", pdc, pdc->raid.raid0_shift); +- DP("raid.raid0_disks: %u", pdc, pdc->raid.raid0_disks); +- DP("raid.array_number: %u", pdc, pdc->raid.array_number); +- DP("raid.total_secs: %u", pdc, pdc->raid.total_secs); +- DP("raid.cylinders: %u", pdc, pdc->raid.cylinders); +- DP("raid.heads: %u", pdc, pdc->raid.heads); +- DP("raid.sectors: %u", pdc, pdc->raid.sectors); +- DP("raid.magic_1: 0x%x", pdc, pdc->raid.magic_1); +- P("raid.unknown_5: 0x%x %u", +- pdc, pdc->raid.unknown_5, pdc->raid.unknown_5, pdc->raid.unknown_5); +- +- for (disk = pdc->raid.disk, i = 0; +- i < pdc->raid.total_disks; disk++, i++) { +- P2("raid.disk[%d].unknown_0: 0x%x", pdc, i, disk->unknown_0); +- P2("raid.disk[%d].channel: %u", pdc, i, disk->channel); +- P2("raid.disk[%d].device: %u", pdc, i, disk->device); +- P2("raid.disk[%d].magic_0: 0x%x", pdc, i, disk->magic_0); +- P2("raid.disk[%d].disk_number: %u", pdc, i, disk->disk_number); +- } ++ while (ma) { ++ log_print(lc, "%s (%s):", di->path, handler); ++ DP("promise_id: \"%s\"", pdc, pdc->promise_id); ++ P("unknown_0: 0x%x %u", ++ pdc, pdc->unknown_0, pdc->unknown_0, pdc->unknown_0); ++ DP("magic_0: 0x%x", pdc, pdc->magic_0); ++ P("unknown_1: 0x%x %u", ++ pdc, pdc->unknown_1, pdc->unknown_1, pdc->unknown_1); ++ DP("magic_1: 0x%x", pdc, pdc->magic_1); ++ P("unknown_2: 0x%x %u", ++ pdc, pdc->unknown_2, pdc->unknown_2, pdc->unknown_2); ++ DP("raid.flags: 0x%x", pdc, pdc->raid.flags); ++ P("raid.unknown_0: 0x%x %d", ++ pdc, pdc->raid.unknown_0, pdc->raid.unknown_0, pdc->raid.unknown_0); ++ DP("raid.disk_number: %u", pdc, pdc->raid.disk_number); ++ DP("raid.channel: %u", pdc, pdc->raid.channel); ++ DP("raid.device: %u", pdc, pdc->raid.device); ++ DP("raid.magic_0: 0x%x", pdc, pdc->raid.magic_0); ++ P("raid.unknown_1: 0x%x %u", ++ pdc, pdc->raid.unknown_1, pdc->raid.unknown_1, pdc->raid.unknown_1); ++ P("raid.start: 0x%x %u", ++ pdc, pdc->raid.start, pdc->raid.start, pdc->raid.start); ++ DP("raid.disk_secs: %u", pdc, pdc->raid.disk_secs); ++ P("raid.unknown_3: 0x%x %u", ++ pdc, pdc->raid.unknown_3, pdc->raid.unknown_3, pdc->raid.unknown_3); ++ P("raid.unknown_4: 0x%x %u", ++ pdc, pdc->raid.unknown_4, pdc->raid.unknown_4, pdc->raid.unknown_4); ++ DP("raid.status: 0x%x", pdc, pdc->raid.status); ++ DP("raid.type: 0x%x", pdc, pdc->raid.type); ++ DP("raid.total_disks: %u", pdc, pdc->raid.total_disks); ++ DP("raid.raid0_shift: %u", pdc, pdc->raid.raid0_shift); ++ DP("raid.raid0_disks: %u", pdc, pdc->raid.raid0_disks); ++ DP("raid.array_number: %u", pdc, pdc->raid.array_number); ++ DP("raid.total_secs: %u", pdc, pdc->raid.total_secs); ++ DP("raid.cylinders: %u", pdc, pdc->raid.cylinders); ++ DP("raid.heads: %u", pdc, pdc->raid.heads); ++ DP("raid.sectors: %u", pdc, pdc->raid.sectors); ++ DP("raid.magic_1: 0x%x", pdc, pdc->raid.magic_1); ++ P("raid.unknown_5: 0x%x %u", ++ pdc, pdc->raid.unknown_5, pdc->raid.unknown_5, pdc->raid.unknown_5); ++ ++ for (disk = pdc->raid.disk, i = 0; ++ i < pdc->raid.total_disks; disk++, i++) { ++ P2("raid.disk[%d].unknown_0: 0x%x", pdc, i, disk->unknown_0); ++ P2("raid.disk[%d].channel: %u", pdc, i, disk->channel); ++ P2("raid.disk[%d].device: %u", pdc, i, disk->device); ++ P2("raid.disk[%d].magic_0: 0x%x", pdc, i, disk->magic_0); ++ P2("raid.disk[%d].disk_number: %u", pdc, i, disk->disk_number); ++ } + +- P("checksum: 0x%x %s", pdc, pdc->checksum, pdc->checksum, +- checksum(pdc) ? "Ok" : "BAD"); ++ P("checksum: 0x%x %s", pdc, pdc->checksum, pdc->checksum, ++ checksum(pdc) ? "Ok" : "BAD"); ++ ma--; ++ pdc++; ++ } + } + + static void --- dmraid-1.0.0.rc16.orig/debian/patches/24_drop_p_for_partition_conditional.patch +++ dmraid-1.0.0.rc16/debian/patches/24_drop_p_for_partition_conditional.patch @@ -0,0 +1,31 @@ +From: Phillip Susi +Last-Update: 2011-03-08 +Description: dmraid was changed at one point to insert a 'p' between + the base device name and the partition number. For some time + debian and ubuntu reversed this change. This patch modifies the + behavior to add the 'p' iff the last character of the base name is + a digit. This makes dmraid comply with the behavior used by + kpartx and "by linux since the dawn of time". +Forwarded: Yes + +Index: b/1.0.0.rc16/lib/format/partition/dos.c +=================================================================== +--- a/1.0.0.rc16/lib/format/partition/dos.c ++++ b/1.0.0.rc16/lib/format/partition/dos.c +@@ -31,8 +31,14 @@ + { + const char *base = get_basename(lc, rd->di->path); + +- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc), +- partition) : snprintf(str, len, "%s", base); ++ if (type) ++ { ++ if (isdigit(base[strlen(base) - 1])) ++ return snprintf(str, len, "%s%s%u", base, ++ OPT_STR_PARTCHAR(lc), partition); ++ else return snprintf(str, len, "%s%u", base, partition); ++ } ++ else return snprintf(str, len, "%s", base); + } + + static char * --- dmraid-1.0.0.rc16.orig/debian/patches/25_change-uuid.patch +++ dmraid-1.0.0.rc16/debian/patches/25_change-uuid.patch @@ -0,0 +1,77 @@ +From: Phillip Susi +Subject: Change uuid for partitions and internal devices +Description: Change the uuid for internal devices ( like + each half of a raid10 ) so that the rest of the system + can recognize that the internal device should not be + probed for partitions or filesystems or mounted. Also + change partition's uuid to have the same "partNN-" + prefix that kpartx gives them. + +Index: b/1.0.0.rc16/lib/activate/devmapper.c +=================================================================== +--- a/1.0.0.rc16/lib/activate/devmapper.c ++++ b/1.0.0.rc16/lib/activate/devmapper.c +@@ -171,8 +171,18 @@ dmraid_uuid(struct lib_context *lc, stru + /* Clear garbage data from uuid string */ + memset(uuid, 0, uuid_len); + +- /* Create UUID string from subsystem prefix and RAID set name. */ +- r = snprintf(uuid, uuid_len, "DMRAID-%s", name) < uuid_len; ++ /* Create UUID string from subsystem prefix and RAID set name. * ++ * Prefix partitions with "partNN-" and add an 'I' for internal * ++ * for stacked devices ( each half of a raid10 ) */ ++ ++ if (rs->type & t_partition) { ++ char *part; ++ for (part = name + strlen(name) - 1; isdigit(*part); part--); ++ part++; ++ r = snprintf(uuid, uuid_len, "part%s-DMRAID-%S", part, name) < uuid_len; ++ } else if (rs->flags & f_subset) ++ r = snprintf(uuid, uuid_len, "DMRAIDI-%s", name) < uuid_len; ++ else r = snprintf(uuid, uuid_len, "DMRAID-%s", name) < uuid_len; + return r < 0 ? 0 : (r < uuid_len); + } + +Index: b/1.0.0.rc16/include/dmraid/metadata.h +=================================================================== +--- a/1.0.0.rc16/include/dmraid/metadata.h ++++ b/1.0.0.rc16/include/dmraid/metadata.h +@@ -177,6 +177,7 @@ enum flags { + f_maximize = 0x01, /* If set, maximize set capacity, + if not set, limit to smallest device. */ + f_partitions = 0x02, /* Set has partitions. */ ++ f_subset = 0x04, /* Set is an internal subset ( half of raid10 ) */ + }; + + #define F_MAXIMIZE(rs) ((rs)->flags & f_maximize) +Index: b/1.0.0.rc16/lib/format/ataraid/isw.c +=================================================================== +--- a/1.0.0.rc16/lib/format/ataraid/isw.c ++++ b/1.0.0.rc16/lib/format/ataraid/isw.c +@@ -877,7 +877,8 @@ group_rd(struct lib_context *lc, + free_raid_dev(lc, &rd); + return NULL; + } +- ++ if (is_raid10(dev)) ++ rs->flags |= f_subset; + rs->status = s_ok; + + /* Save and set to enable dev_sort(). */ +Index: b/1.0.0.rc16/lib/format/format.c +=================================================================== +--- a/1.0.0.rc16/lib/format/format.c ++++ b/1.0.0.rc16/lib/format/format.c +@@ -649,9 +649,10 @@ join_superset(struct lib_context *lc, + if ((n = f_name(lc, rd, 0))) { + if ((ret = find_or_alloc_raid_set(lc, n, FIND_TOP, NO_RD, + LC_RS(lc), f_create, rd)) && +- !find_set(lc, &ret->sets, rs->name, FIND_TOP)) ++ !find_set(lc, &ret->sets, rs->name, FIND_TOP)) { + list_add_sorted(lc, &ret->sets, &rs->list, f_set_sort); +- ++ rs->flags |= f_subset; ++ } + dbg_free(n); + } + --- dmraid-1.0.0.rc16.orig/debian/patches/26_convert-dmraid45-to-dmraid.patch +++ dmraid-1.0.0.rc16/debian/patches/26_convert-dmraid45-to-dmraid.patch @@ -0,0 +1,273 @@ +From: Stefan Bader +Date: Mon, 13 Jan 2014 14:39:29 +0100 +Subject: Convert dmraid to use dm-raid module for RAID4 and RAID5 + +The dmraid library used the dm-raid45 target for RAID4 and RAID5 sets. +This module however was never upstream and is suffering constant issues +when the Linux kernel changes. +Upstream introduced the dm-raid/raid module/target in 2.6.38. This can be +used to create device-mapper targets which use the MD RAID disciplines +(though not showing up in /proc/mdstat). + +Most of the table constructor arguments can be mapped, only the member +devices may not have an offset. + +From the old code it seems that RAID5 would always be build by set +elements which will not have an offset. So potentially only RAID4 +could cause issues. That could be worked around if needed by creating +additional linear mappings. + +NOTE: The event code is only compile tested. But we seem to have never +shipped the dmraid event tool which is needed to use this feature. And +we are about to remove support for ISW from dmraid (in favour of mdadm) +anyway. + +Signed-off-by: Stefan Bader + +Index: dmraid-1.0.0.rc16/1.0.0.rc16/lib/activate/activate.c +=================================================================== +--- dmraid-1.0.0.rc16.orig/1.0.0.rc16/lib/activate/activate.c 2014-01-14 15:41:29.872372693 +0100 ++++ dmraid-1.0.0.rc16/1.0.0.rc16/lib/activate/activate.c 2014-01-14 15:41:59.692518476 +0100 +@@ -118,6 +118,17 @@ _dm_path_offset(struct lib_context *lc, + valid ? path : lc->path.error, offset); + } + ++/* Push metadata and data device path onto a table */ ++static int ++_dm_meta_data_path(struct lib_context *lc, char **table, int valid, ++ const char *meta, const char *path) ++ ++{ ++ return p_fmt(lc, table, " %s %s", ++ meta ? meta : "-", ++ valid ? path : lc->path.error); ++} ++ + /* + * Create dm table for linear mapping. + */ +@@ -537,9 +548,10 @@ err: + /* Push begin of line onto a RAID5 table. */ + /* FIXME: persistent dirty log. */ + static int +-_dm_raid45_bol(struct lib_context *lc, char **table, struct raid_set *rs, ++_dm_raid_bol(struct lib_context *lc, char **table, struct raid_set *rs, + uint64_t sectors, unsigned int members) + { ++ int rc; + int need_sync = rs_need_sync(rs); + struct handler_info rebuild_drive; + +@@ -548,13 +560,31 @@ _dm_raid45_bol(struct lib_context *lc, c + if (need_sync && !get_rebuild_drive(lc, rs, &rebuild_drive)) + return 0; + +- return p_fmt(lc, table, "0 %U %s core 2 %u %s %s 1 %u %u %d", +- sectors, get_dm_type(lc, rs->type), +- calc_region_size(lc, +- total_sectors(lc, rs) / +- _dm_raid_devs(lc, rs, 0)), +- (need_sync) ? "sync" : "nosync", get_type(lc, rs->type), +- rs->stride, members, rebuild_drive.data.i32); ++ if (rebuild_drive.data.i32 < 0) { ++ rc = p_fmt(lc, table, ++ "0 %U %s %s 4 %u %s region_size %u %u", ++ sectors, ++ get_dm_type(lc, rs->type), ++ get_type(lc, rs->type), ++ rs->stride, ++ (need_sync) ? "sync" : "nosync", ++ calc_region_size(lc, total_sectors(lc, rs) / ++ _dm_raid_devs(lc, rs, 0)), ++ members); ++ } else { ++ rc = p_fmt(lc, table, ++ "0 %U %s %s 6 %u %s rebuild %d region_size %u %u", ++ sectors, ++ get_dm_type(lc, rs->type), ++ get_type(lc, rs->type), ++ rs->stride, ++ (need_sync) ? "sync" : "nosync", ++ rebuild_drive.data.i32, ++ calc_region_size(lc, total_sectors(lc, rs) / ++ _dm_raid_devs(lc, rs, 0)), ++ members); ++ } ++ return rc; + } + + /* Create "error target" name based on raid set name. */ +@@ -669,7 +699,7 @@ err: + } + + static int +-dm_raid45(struct lib_context *lc, char **table, struct raid_set *rs) ++dm_raid(struct lib_context *lc, char **table, struct raid_set *rs) + { + int ret; + uint64_t sectors = 0; +@@ -749,7 +779,7 @@ dm_raid45(struct lib_context *lc, char * + */ + sectors *= members - 1; + +- if (!_dm_raid45_bol(lc, table, rs, sectors, members)) ++ if (!_dm_raid_bol(lc, table, rs, sectors, members)) + goto err; + + /* Stacked RAID sets (for RAID50 etc.) */ +@@ -759,7 +789,8 @@ dm_raid45(struct lib_context *lc, char * + if (!(path = mkdm_path(lc, r->name))) + goto err; + +- ret = _dm_path_offset(lc, table, valid_rs(r), path, 0); ++ log_dbg(lc, "%s: raid set device %s", __func__, path); ++ ret = _dm_meta_data_path(lc, table, valid_rs(r), NULL, path); + dbg_free(path); + + if (!ret) +@@ -768,8 +799,11 @@ dm_raid45(struct lib_context *lc, char * + + /* Lowest level RAID devices. */ + list_for_each_entry(rd, &rs->devs, devs) { +- if (!_dm_path_offset(lc, table, valid_rd(rd), +- rd->di->path, rd->offset)) ++ if (rd->offset) ++ goto err; ++ log_dbg(lc, "%s: low level dev %s", __func__, rd->di->path); ++ if (!_dm_meta_data_path(lc, table, valid_rd(rd), NULL, ++ rd->di->path)) + goto err; + } + +@@ -802,11 +836,11 @@ static struct type_handler { + { t_linear, dm_linear }, + { t_raid0, dm_raid0 }, + { t_raid1, dm_raid1 }, +- { t_raid4, dm_raid45 }, +- { t_raid5_ls, dm_raid45 }, +- { t_raid5_rs, dm_raid45 }, +- { t_raid5_la, dm_raid45 }, +- { t_raid5_ra, dm_raid45 }, ++ { t_raid4, dm_raid }, ++ { t_raid5_ls, dm_raid }, ++ { t_raid5_rs, dm_raid }, ++ { t_raid5_la, dm_raid }, ++ { t_raid5_ra, dm_raid }, + /* RAID types below not supported (yet) */ + { t_raid6, dm_unsup }, + }; +Index: dmraid-1.0.0.rc16/1.0.0.rc16/lib/metadata/metadata.c +=================================================================== +--- dmraid-1.0.0.rc16.orig/1.0.0.rc16/lib/metadata/metadata.c 2014-01-14 15:41:29.908372863 +0100 ++++ dmraid-1.0.0.rc16/1.0.0.rc16/lib/metadata/metadata.c 2014-01-14 15:41:59.692518476 +0100 +@@ -31,11 +31,11 @@ static const struct { + { t_linear, "linear", "linear"}, + { t_raid0, "stripe", "striped"}, + { t_raid1, "mirror", "mirror"}, +- { t_raid4, "raid4", "raid45"}, +- { t_raid5_ls, "raid5_ls", "raid45"}, +- { t_raid5_rs, "raid5_rs", "raid45"}, +- { t_raid5_la, "raid5_la", "raid45"}, +- { t_raid5_ra, "raid5_ra", "raid45"}, ++ { t_raid4, "raid4", "raid"}, ++ { t_raid5_ls, "raid5_ls", "raid"}, ++ { t_raid5_rs, "raid5_rs", "raid"}, ++ { t_raid5_la, "raid5_la", "raid"}, ++ { t_raid5_ra, "raid5_ra", "raid"}, + { t_raid6, "raid6", NULL}, + }; + +Index: dmraid-1.0.0.rc16/1.0.0.rc16/lib/events/libdmraid-events-isw.c +=================================================================== +--- dmraid-1.0.0.rc16.orig/1.0.0.rc16/lib/events/libdmraid-events-isw.c 2014-01-14 10:20:23.598184676 +0100 ++++ dmraid-1.0.0.rc16/1.0.0.rc16/lib/events/libdmraid-events-isw.c 2014-01-14 15:41:59.696518490 +0100 +@@ -502,7 +502,7 @@ static int _get_num_devs_from_status(cha + int ret; + + for (ret = 0; *status; status++) { +- if (*status == 'A' || *status == 'D') ++ if (*status == 'A' || *status == 'a' || *status == 'D') + ret++; + } + +@@ -1258,8 +1258,8 @@ err: + return D_IGNORE; + } + +-/* Get the raid45 device(s) that caused the trigger. */ +-static enum disk_state_type _process_raid45_event(struct dm_task *dmt, ++/* Get the raid device(s) that caused the trigger. */ ++static enum disk_state_type _process_raid_event(struct dm_task *dmt, + char *params) + { + int argc, i, num_devs, dead, ret = D_INSYNC; +@@ -1272,32 +1272,34 @@ static enum disk_state_type _process_rai + return D_IGNORE; + + /* +- * dm core parms (NOT provided in @params): 0 976783872 raid45 +- * +- * raid45 device parms: 3 253:4 253:5 253:6 +- * raid45 device status: 1 AAA ++ * raid device status: 3 AAA + */ + ++ /* Skip over the raid type */ ++ if(!dm_split_words(params, 1, 0, &p)) ++ goto err; ++ p += strlen(p) + 1; ++ + /* Number of devices. */ + num_devs = _get_num_devs(params, &p); + if (!num_devs) + goto err; + +- /* Devices names + "1" + "AA". */ +- argc = num_devs + 2; ++ /* AAA + */ ++ argc = 4; + args = dm_malloc(argc * sizeof(*args)); + if (!args || + dm_split_words(p, argc, 0, args) != argc) + goto err; + +- dev_status_str = args[num_devs + 1]; ++ dev_status_str = args[0]; + + /* Consistency check on num_devs and status chars. */ + i = _get_num_devs_from_status(dev_status_str); + if (i != num_devs) + goto err; + +- /* Check for bad raid45 devices. */ ++ /* Check for bad raid devices. */ + for (i = 0, p = dev_status_str; i < rs->num_devs; i++) { + /* Skip past any non active/dead identifiers. */ + dead = *(p++) == 'D'; +@@ -1324,7 +1326,7 @@ static enum disk_state_type _process_rai + return ret; + + err: +- _event_cleanup_and_log(args, "raid45"); ++ _event_cleanup_and_log(args, "raid"); + return D_IGNORE; + } + +@@ -1341,7 +1343,7 @@ static void _process_event(char *target_ + } *proc, process[] = { + { "striped", _process_stripe_event, 0 }, + { "mirror", _process_mirror_event, 1 }, +- { "raid45", _process_raid45_event, 1 }, ++ { "raid", _process_raid_event, 1 }, + }; + #ifdef _LIBDMRAID_DSO_TESTING + struct dso_raid_set *rs; +@@ -1352,7 +1354,7 @@ static void _process_event(char *target_ + * stripe (raid 0), + * mirror (raid 1) + * or +- * raid45 (raid 4/5). ++ * raid (raid 4/5). + */ + for (proc = process; proc < ARRAY_END(process); proc++) { + if (!strcmp(target_type, proc->target_type)) --- dmraid-1.0.0.rc16.orig/debian/patches/27_ignore-too-small-devices.patch +++ dmraid-1.0.0.rc16/debian/patches/27_ignore-too-small-devices.patch @@ -0,0 +1,39 @@ +From: Stefan Bader +Date: Tue, 14 Jan 2014 15:26:50 +0100 +Subject: Avoid meaningless error messages while probing for meta-data + +This happens as device-mapper volumes are checked and kpartx creates +a 2 sector mapping if a device contains an extended partition. +Offsetting from the last sector backwards some probes overflow and +end up trying to seek to a very large offset (which fails and emits +a visible error message during device scanning). +This message is useless as such a small device would be pointless as +a RAID set anyway. +To fix this without larger changes, pragmatically ignore devices smaller +than 8 sectors (4K). + +Signed-off-by: Stefan Bader + +Index: dmraid-1.0.0.rc16/1.0.0.rc16/lib/format/format.c +=================================================================== +--- dmraid-1.0.0.rc16.orig/1.0.0.rc16/lib/format/format.c 2014-01-14 15:50:17.554952405 +0100 ++++ dmraid-1.0.0.rc16/1.0.0.rc16/lib/format/format.c 2014-01-14 15:50:35.319039242 +0100 +@@ -533,6 +533,18 @@ read_raid_dev(struct lib_context *lc, + union read_info info; + + /* ++ * Kpartx will create a mapping for extended partitions which only ++ * covers 2 sectors. That leads to error messages when looking for ++ * meta-data as moving back from the last sector results in huge ++ * offsets. Quick hack here to ignore any device smaller than 4K. ++ */ ++ if (di->sectors < 8) { ++ log_dbg(lc, "%s: Ignore device smaller than 4K (%s)", ++ handler, di->path); ++ return NULL; ++ } ++ ++ /* + * In case the metadata format handler provides a special + * metadata read function, use that. If not, allocate and + * read size from offset. --- dmraid-1.0.0.rc16.orig/debian/patches/series +++ dmraid-1.0.0.rc16/debian/patches/series @@ -0,0 +1,19 @@ +01_fix_broken_linking.patch +02_disable_dmreg.patch +03_fix_hyphen-used-as-minus-sign.patch +09_promise-add-offsets.patch +10_exit_code.patch +12_support_virtio_devices.patch +17_isw-probe-hpa.patch +15_activate_multiple_raid_sets.patch +18_pdc_raid10_failure..patch +19_ddf1_lsi_persistent_name.patch +20_fix_isw_sectors_calculation.patch +21_fix_man_page_typos.patch +21_jmicron_namefix.patch +21_fix_testing.patch +23_pdc_dump_extended_metadata.patch +24_drop_p_for_partition_conditional.patch +25_change-uuid.patch +26_convert-dmraid45-to-dmraid.patch +27_ignore-too-small-devices.patch --- dmraid-1.0.0.rc16.orig/debian/rules +++ dmraid-1.0.0.rc16/debian/rules @@ -0,0 +1,107 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +else +CROSS= --build $(DEB_BUILD_GNU_TYPE) +endif + +version := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-[^-]*$$/\1/p') +buildroot := $(CURDIR)/debian/build +flavours := standard udeb + +common-config-flags := $(CROSS) --prefix=/usr --exec-prefix=/ + +methods: methods-stamp +methods-stamp: + dh_testdir + mkdir -p ${buildroot} + cp -f /usr/share/misc/config.sub 1.0.0.rc16/autoconf/config.sub + cp -f /usr/share/misc/config.guess 1.0.0.rc16/autoconf/config.guess + for i in ${flavours}; do cp -rp ${version} ${buildroot}/$$i; done + touch $@ + +configure-standard: methods configure-standard-stamp +configure-standard-stamp: + dh_testdir + cd ${buildroot}/standard && \ + ./configure ${common-config-flags} --disable-klibc --enable-libselinux --enable-libsepol --enable-shared_lib --enable-led --enable-intel_led + touch $@ + +configure-udeb: methods configure-udeb-stamp +configure-udeb-stamp: + dh_testdir + cd ${buildroot}/udeb && \ + ./configure ${common-config-flags} --disable-libselinux --disable-libsepol --enable-shared_lib + touch $@ + +configure: methods configure-stamp +configure-stamp: $(addprefix configure-, $(flavours)) + dh_testdir + touch $@ + +build-arch: build +build-indep: build + +build: $(QUILT_STAMPFN) configure build-stamp +build-stamp: + dh_testdir + for i in ${flavours}; do cd ${buildroot}/$$i && make; done + touch $@ + +install: build + dh_testdir + dh_testroot + dh_prep + cd ${buildroot}/standard && make DESTDIR=$(CURDIR)/debian/standard install + cd ${buildroot}/udeb && make DESTDIR=$(CURDIR)/debian/udeb install + rm -rf debian/udeb/usr + dh_link + +binary-arch: install + dh_testdir + dh_testroot + dh_install + dh_installdirs + dh_installudev --priority=97 + dh_installdocs ${version}/CREDITS ${version}/KNOWN_BUGS ${version}/README ${version}/TODO + dh_installchangelogs ${version}/CHANGELOG + install -m0755 debian/dmraid.bug debian/dmraid/usr/share/bug/dmraid/script + chmod 755 debian/dmraid/usr/share/initramfs-tools/hooks/dmraid + chmod 755 debian/dmraid/usr/share/initramfs-tools/scripts/local-top/dmraid + chmod 755 debian/dmraid/sbin/dmraid-activate + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a --add-udeb 'libdmraid1.0.0.rc16-udeb' -V + dh_shlibdeps -a + dh_installdeb -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary-indep: install + # nothing to do + +binary: binary-arch binary-indep + +clean: unpatch + dh_testdir + dh_testroot + dh_clean + rm -f *-stamp + rm -rf debian/build debian/standard debian/udeb +.PHONY: clean binary binary-indep binary-arch install build configure methods $(addprefix configure-, $(flavours)) --- dmraid-1.0.0.rc16.orig/debian/watch +++ dmraid-1.0.0.rc16/debian/watch @@ -0,0 +1,4 @@ +# watch control file for dmraid +version=3 +opts=uversionmangle=s/(\d)\.(rc\d+(?:-\d+)?)$/$1~$2/,dversionmangle=s/(\d)\.(rc\d+(?:-\d+)?)$/$1~$2/ \ +http://people.redhat.com/heinzm/sw/dmraid/src/dmraid[_\-]?(\d.*)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz|zip).*