rpms/vblade/devel vblade-makefile.patch, NONE, 1.1 vblade.conf, NONE, 1.1 vblade.init, NONE, 1.1 vblade.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Patrick Laughton (jima) fedora-extras-commits at redhat.com
Mon Apr 9 13:26:36 UTC 2007


Author: jima

Update of /cvs/extras/rpms/vblade/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13376/devel

Modified Files:
	.cvsignore sources 
Added Files:
	vblade-makefile.patch vblade.conf vblade.init vblade.spec 
Log Message:

* Sat Apr 07 2007 Patrick "Jima" Laughton <jima at beer.tclug.org> 14-2
- Forced CFLAGS on build

* Wed Apr 04 2007 Patrick "Jima" Laughton <jima at beer.tclug.org> 14-1
- Initial Fedora RPM

BZ#235236


vblade-makefile.patch:

--- NEW FILE vblade-makefile.patch ---
--- vblade-14/makefile.orig	2006-09-21 08:29:27.000000000 -0500
+++ vblade-14/makefile	2007-03-30 12:27:26.000000000 -0500
@@ -3,7 +3,7 @@
 # see README for others
 PLATFORM=linux
 
-prefix = /usr
+prefix = ${DESTDIR}/usr
 sbindir = ${prefix}/sbin
 sharedir = ${prefix}/share
 mandir = ${sharedir}/man
@@ -35,6 +35,6 @@
 	rm -f $O vblade
 
 install : vblade vbladed
-	install vblade ${sbindir}/
-	install vbladed ${sbindir}/
-	install vblade.8 ${mandir}/man8/
+	install -D -m 755 vblade ${sbindir}/vblade
+	install -D -m 755 vbladed ${sbindir}/vbladed
+	install -D -m 644 vblade.8 ${mandir}/man8/vblade.8


--- NEW FILE vblade.conf ---
# network_device shelf slot file/disk/partition mac[,mac[,mac]]
#eth0 0 0 /dev/sdb 00:11:22:33:44:55


--- NEW FILE vblade.init ---
#!/bin/sh
# 
# Init script for vblade (ATA over Ethernet daemon)
# 
# chkconfig: - 30 70
# description: vblade AoE daemon
# 
# processname: vblade
# config: /etc/vblade.conf
# 
# Shamelessly hacked together from other init scripts (sshd, mostly)
# 

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0
prog=vblade

spawn_vblade() {
  ALLOWMACS=""
  [ -n "$5" ] && ALLOWMACS="-m $5"
  ID="$1-e$2.$3"
  PID_FILE=/var/run/$prog/${ID}.pid
  $prog $ALLOWMACS $2 $3 $1 $4 >> /var/log/$prog.log 2>&1 &
  pid=$!
  RETVAL=$?
  echo $pid > $PID_FILE
  echo -n $"$4 (e$2.$3@$1) [pid $pid]"
  [ "$RETVAL" = 0 ] && success || failure
  echo
}

start() {
  echo $"Starting up $prog: "
  if [ `grep -vc '^#\|^$' /etc/$prog.conf` ]
  then
    grep -v '^#' /etc/$prog.conf | sed -e 's/	/ /g' -e 's/  / /g' | while read line
    do
      spawn_vblade $line
    done
    touch /var/lock/subsys/$prog
  else
    echo -n "empty $prog.conf?"
    passed
    echo
  fi
}

stop() {
  echo -n $"Shutting down $prog: "
  for pidfile in `ls /var/run/$prog/*.pid`
  do
    kill -9 `cat $pidfile`
    rm -f $pidfile
  done
  success
  echo
  rm -f /var/lock/subsys/$prog
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		stop
		start
		;;
	reload)
		# yes, this sucks, but the vblade processes die on SIGHUP
		stop
		start
		;;
	condrestart)
		if [ -f /var/lock/subsys/$prog ]; then
			stop
			# avoid race
			sleep 3
			start
		fi
		;;
	status)
		status $prog
		RETVAL=$?
		;;
	*)
		echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
		RETVAL=1
esac
exit $RETVAL


--- NEW FILE vblade.spec ---
Name:           vblade
Version:        14
Release:        2%{?dist}
Summary:        Virtual EtherDrive (R) blade daemon

Group:          System Environment/Base
License:        GPL
URL:            http://sourceforge.net/projects/aoetools/
Source0:        http://dl.sf.net/aoetools/%{name}-%{version}.tgz
Source1:        %{name}.init
Source2:        %{name}.conf
Patch0:         %{name}-makefile.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires(post):  /sbin/chkconfig
Requires(post):  /sbin/service
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service


%description
The vblade is the virtual EtherDrive (R) blade, a program that makes a
seekable file available over an ethernet local area network (LAN) via
the ATA over Ethernet (AoE) protocol.

The seekable file is typically a block device like /dev/md0 but even
regular files will work.  When vblade exports the block storage over
AoE it becomes a storage target.  Another host on the same LAN can
access the storage if it has a compatible aoe kernel driver.


%prep
%setup -q
%patch0 -p1


%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf


%clean
rm -rf $RPM_BUILD_ROOT


%post
if [ "$1" = "2" ]; then # if we're being upgraded
    /sbin/service %{name} condrestart >/dev/null 2>&1 || :
else # if we're being installed
    /sbin/chkconfig --add %{name}
fi

%preun
if [ "$1" = "0" ]; then     # execute this only if we are NOT doing an upgrade
    /sbin/service %{name} stop >/dev/null 2>&1 || :
    /sbin/chkconfig --del %{name}
fi


%files
%defattr(-,root,root,-)
%doc COPYING HACKING NEWS README
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_initrddir}/%{name}
%{_sbindir}/vblade
%{_sbindir}/vbladed
%{_mandir}/man8/vblade.8*


%changelog
* Sat Apr 07 2007 Patrick "Jima" Laughton <jima at beer.tclug.org> 14-2
- Forced CFLAGS on build

* Wed Apr 04 2007 Patrick "Jima" Laughton <jima at beer.tclug.org> 14-1
- Initial Fedora RPM


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/vblade/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	9 Apr 2007 10:51:08 -0000	1.1
+++ .cvsignore	9 Apr 2007 13:26:02 -0000	1.2
@@ -0,0 +1 @@
+vblade-14.tgz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/vblade/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	9 Apr 2007 10:51:08 -0000	1.1
+++ sources	9 Apr 2007 13:26:02 -0000	1.2
@@ -0,0 +1 @@
+c5c7ed7b859d6d74575dd9facd82e2a1  vblade-14.tgz




More information about the fedora-extras-commits mailing list