This commit is contained in:
Mario Fetka 2017-11-11 16:50:12 +01:00
parent 61f73f4a0a
commit 827b64c240
12 changed files with 1990 additions and 0 deletions

84
build_orig.sh Normal file
View File

@ -0,0 +1,84 @@
#!/bin/bash
# the directory of the script
DIR=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd`
echo "Working directory $DIR"
# the temp directory used, within $DIR
WORK_DIR=`mktemp -d -p "$DIR"`
echo "Creating temp working directory $WORK_DIR"
# deletes the temp directory
function cleanup {
rm -rf "$WORK_DIR"
echo "Deleted temp working directory $WORK_DIR"
}
# register the cleanup function to be called on the EXIT signal
trap cleanup EXIT
# Download Files specified in files.diz
while IFS=! read type app version outputfile url md5
do
echo "Downloading $app Version: $version"
#use -O for output file. define $outputfile yourself
wget -c --no-check-certificate --tries=1 -O $DIR/../$outputfile --timeout=5 "$url"
# use $(..) instead of backticks.
calculated_md5=$(md5sum "$DIR/../$outputfile" | cut -f 1 -d " ")
# compare md5
case "$calculated_md5" in
"$md5" )
echo "$DIR/../$outputfile md5 ok"
;;
*)
echo "$DIR/../$outputfile md5 NOT ok"
exit 1
;;
esac
done < "$DIR/files.diz"
# Extract to specified dir and set some variables
while IFS=! read type app version outputfile url md5
do
mkdir -p $WORK_DIR/${type}
pushd $WORK_DIR/${type}
tar -zxf $DIR/../$outputfile
popd
mkdir -p $WORK_DIR/${app}-${version}/${type}
dos2unix $WORK_DIR/${type}/*.txt
mv $WORK_DIR/${type}/*.txt $WORK_DIR/${app}-${version}
pushd $WORK_DIR/${app}-${version}/${type}
rpm2cpio $WORK_DIR/${type}/Dellmgr*.rpm | cpio -idmv
case "${type}" in
"amd64" )
rm -f opt/MegaRAID/storcli/storcli
;;
"i386" )
rm -f opt/MegaRAID/storcli/storcli64
;;
*)
echo "Wrong arch"
exit 1
;;
esac
echo "${app}_${version}.orig.tar.gz" > $WORK_DIR/filename.txt
echo "${app}-${version}" > $WORK_DIR/dirname.txt
echo "${version}" > $WORK_DIR/version.txt
popd
done < "$DIR/files.diz"
FILENAME=`cat $WORK_DIR/filename.txt`
DIRNAME=`cat $WORK_DIR/dirname.txt`
echo "Creating $DIR/../$FILENAME "
pushd $WORK_DIR
tar -czf $DIR/../$FILENAME $DIRNAME
popd
#exit 1
VER=`cat $WORK_DIR/version.txt`
echo "Importing $DIR/../$FILENAME as $VER into git"
cleanup
gbp import-orig --pristine-tar -u $VER $DIR/../$FILENAME
exit 0

1768
debian/Dellmgr-changes.txt vendored Normal file

File diff suppressed because it is too large Load Diff

17
debian/changelog vendored Normal file
View File

@ -0,0 +1,17 @@
dellmgr (5.32.0) UNRELEASED; urgency=medium
* new upstream version
-- Mario Fetka <mario.fetka@gmail.com> Sat, 11 Nov 2017 16:49:40 +0100
dellmgr (5.31-2) unstable; urgency=low
* Update create-devices-nodes to handle kernels 2.6.25rc2+.
-- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Mon, 16 Feb 2009 19:31:24 +0100
dellmgr (5.31-1) unstable; urgency=low
* Initial release.
-- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Tue, 26 Aug 2008 10:01:34 +0200

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
5

20
debian/control vendored Normal file
View File

@ -0,0 +1,20 @@
Source: dellmgr
Section: admin
Priority: optional
Maintainer: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
Build-Depends: debhelper (>= 4)
Standards-Version: 3.8.0
Homepage: http://linux.dell.com
Package: dellmgr
Architecture: i386 amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Manage DELL PERC/CERC cards based on LSI MegaRAID chip
This tool allow you to access the RAID card BIOS from Linux.
.
Useful to manage arrays or start maintenance operations.
.
If you have a MegaRAID card, which doesn't come from Dell, look at
megamgr package instead.
.
This tool will not work on recent SAS cards.

19
debian/copyright vendored Normal file
View File

@ -0,0 +1,19 @@
This package was debianized by Adam Cécile (Le_Vert) <gandalf@le-vert.net> on
Tue, 26 Aug 2008 10:01:34 +0200.
It was downloaded from http://linux.dell.com/storage.shtml
Upstream Author:
Dell Inc.
Copyright:
Copyright (C) Dell Inc.
License:
Dell proprietary.
The Debian packaging is (C) 2008, Adam Cécile (Le_Vert) <gandalf@le-vert.net>
and is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

2
debian/dirs vendored Normal file
View File

@ -0,0 +1,2 @@
usr/sbin
usr/lib/dellmgr

1
debian/docs vendored Normal file
View File

@ -0,0 +1 @@
*.txt

44
debian/rules vendored Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DESTDIR = $(CURDIR)/debian/dellmgr
build:
clean:
dh_testdir
dh_testroot
dh_clean
install:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install -D -m 755 $(CURDIR)/i386/usr/sbin/dellmgr.bin \
$(DESTDIR)/usr/lib/dellmgr/dellmgr.real
install -D -m 644 $(CURDIR)/debian/wrappers/create-device-node \
$(DESTDIR)/usr/lib/dellmgr/create-device-node
install -D -m 755 $(CURDIR)/debian/wrappers/dellmgr \
$(DESTDIR)/usr/sbin/dellmgr
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs debian/Dellmgr-changes.txt
dh_installdocs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

21
debian/wrappers/create-device-node vendored Normal file
View File

@ -0,0 +1,21 @@
# Author: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
# License: Public domain
create_node() {
# Since 2.6.25rc2 linux kernel, megadev0 is created dynamically by udev
# See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90a95af85f22c82f87e5fb714bac7ee06673b0ff
if [ ! -e /dev/megadev0 ]; then
# Not available, try to create it by hand for kernel pre 2.6.25rc2
grep -q 'megadev$' /proc/devices && MEGARAID="ok"
if [ ! -z ${MEGARAID} ]; then
MAJOR=`grep 'megadev$' /proc/devices | head -n 1 | awk '{ print $1 }'`
mknod /dev/megadev0 c $MAJOR 0
return $?
fi
fi
if [ -e /dev/megadev0 ]; then
return 0
else
return 1
fi
}

12
debian/wrappers/dellmgr vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
. /usr/lib/dellmgr/create-device-node
create_node
if [ $? -eq 0 ]; then
/usr/lib/dellmgr/dellmgr.real $@
else
echo "No LSI MegaRAID cards found."
exit 1
fi

1
files.diz Normal file
View File

@ -0,0 +1 @@
i386!dellmgr!5.32.0!perc-apps-a08.tar.gz!http://ftp.us.dell.com/scsi-raid/perc-apps-a08.tar.gz!267bbd55e19f8bc021da7ef29dd43d32