From 1a2065a0f404547d00a9fb3ce35ab0898a1ed947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20C=C3=A9cile=20=28Le=5FVert=29?= Date: Wed, 14 Aug 2013 23:05:20 +0200 Subject: [PATCH] Import megamgr --- packaging/debian/megamgr/changelog | 17 +++++++ packaging/debian/megamgr/compat | 1 + packaging/debian/megamgr/control | 20 ++++++++ packaging/debian/megamgr/copyright | 20 ++++++++ packaging/debian/megamgr/dirs | 2 + packaging/debian/megamgr/rules | 47 +++++++++++++++++++ .../megamgr/wrappers/create-device-node | 21 +++++++++ packaging/debian/megamgr/wrappers/megamgr | 12 +++++ 8 files changed, 140 insertions(+) create mode 100644 packaging/debian/megamgr/changelog create mode 100644 packaging/debian/megamgr/compat create mode 100644 packaging/debian/megamgr/control create mode 100644 packaging/debian/megamgr/copyright create mode 100644 packaging/debian/megamgr/dirs create mode 100755 packaging/debian/megamgr/rules create mode 100644 packaging/debian/megamgr/wrappers/create-device-node create mode 100644 packaging/debian/megamgr/wrappers/megamgr diff --git a/packaging/debian/megamgr/changelog b/packaging/debian/megamgr/changelog new file mode 100644 index 0000000..a281cd0 --- /dev/null +++ b/packaging/debian/megamgr/changelog @@ -0,0 +1,17 @@ +megamgr (5.20-3) unstable; urgency=low + + * Fix typo in package's description. + + -- Adam Cécile (Le_Vert) Thu, 02 Feb 2012 14:46:54 +0100 + +megamgr (5.20-2) unstable; urgency=low + + * Update create-devices-nodes to handle kernels 2.6.25rc2+. + + -- Adam Cécile (Le_Vert) Mon, 16 Feb 2009 19:33:05 +0100 + +megamgr (5.20-1) unstable; urgency=low + + * Initial release. + + -- Adam Cécile (Le_Vert) Tue, 26 Aug 2008 10:49:33 +0200 diff --git a/packaging/debian/megamgr/compat b/packaging/debian/megamgr/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/packaging/debian/megamgr/compat @@ -0,0 +1 @@ +5 diff --git a/packaging/debian/megamgr/control b/packaging/debian/megamgr/control new file mode 100644 index 0000000..64f1bfd --- /dev/null +++ b/packaging/debian/megamgr/control @@ -0,0 +1,20 @@ +Source: megamgr +Section: admin +Priority: optional +Maintainer: Adam Cécile (Le_Vert) +Build-Depends: debhelper (>= 5) +Standards-Version: 3.9.2 +Homepage: http://www.lsi.com/files/support/rsa/utilities/megamgr + +Package: megamgr +Architecture: i386 amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Manage LSI MegaRAID chip based cards + 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 from DELL (PERC/CERC), look at + dellmgr package instead. + . + This tool will not work on recent SAS cards. diff --git a/packaging/debian/megamgr/copyright b/packaging/debian/megamgr/copyright new file mode 100644 index 0000000..d466089 --- /dev/null +++ b/packaging/debian/megamgr/copyright @@ -0,0 +1,20 @@ +This package was debianized by Adam Cécile (Le_Vert) on +Tue, 26 Aug 2008 10:49:33 +0200. + +It was downloaded from http://www.lsi.com/files/support/rsa/utilities/megamgr/ + +Upstream Author: + + LSI + +Copyright: + + Copyright (C) LSI + +License: + + LSI proprietary. + +The Debian packaging is Copyright (C) 2008-2012 Adam Cécile (Le_Vert) + and is licensed under GNU General Public License +version 2 (or later) see `/usr/share/common-licenses/GPL-2'. diff --git a/packaging/debian/megamgr/dirs b/packaging/debian/megamgr/dirs new file mode 100644 index 0000000..2a0257d --- /dev/null +++ b/packaging/debian/megamgr/dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/lib/megamgr diff --git a/packaging/debian/megamgr/rules b/packaging/debian/megamgr/rules new file mode 100755 index 0000000..4287021 --- /dev/null +++ b/packaging/debian/megamgr/rules @@ -0,0 +1,47 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DESTDIR = $(CURDIR)/debian/megamgr + +build: build-arch build-indep +build-arch: +build-indep: + +clean: + dh_testdir + dh_testroot + dh_clean + +install: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + install -D -m 755 $(CURDIR)/megamgr.bin \ + $(DESTDIR)/usr/lib/megamgr/megamgr.real + install -D -m 644 $(CURDIR)/debian/wrappers/create-device-node \ + $(DESTDIR)/usr/lib/megamgr/create-device-node + install -D -m 755 $(CURDIR)/debian/wrappers/megamgr \ + $(DESTDIR)/usr/sbin/megamgr + + +binary-indep: build install +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ut_linux_mgr_5.20.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 configure diff --git a/packaging/debian/megamgr/wrappers/create-device-node b/packaging/debian/megamgr/wrappers/create-device-node new file mode 100644 index 0000000..88a6dfe --- /dev/null +++ b/packaging/debian/megamgr/wrappers/create-device-node @@ -0,0 +1,21 @@ +# Author: Adam Cécile (Le_Vert) +# 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 +} diff --git a/packaging/debian/megamgr/wrappers/megamgr b/packaging/debian/megamgr/wrappers/megamgr new file mode 100644 index 0000000..d9b22c2 --- /dev/null +++ b/packaging/debian/megamgr/wrappers/megamgr @@ -0,0 +1,12 @@ +#!/bin/sh + +. /usr/lib/megamgr/create-device-node + +create_node + +if [ $? -eq 0 ]; then + /usr/lib/megamgr/megamgr.real $@ +else + echo "No LSI MegaRAID cards found." + exit 1 +fi