This commit is contained in:
commit
11c5098585
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
170
init.nbd-server
Normal file
170
init.nbd-server
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# /etc/init.d/nbd-server
|
||||||
|
# and its symbolic link
|
||||||
|
# /usr)sbin/rcnbd-server
|
||||||
|
#
|
||||||
|
# Template system startup script for some example service/daemon FOO
|
||||||
|
#
|
||||||
|
# LSB compatible service control script; see http://www.linuxbase.org/spec/
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: nbd-server
|
||||||
|
# Required-Start: $syslog $remote_fs
|
||||||
|
# Should-Start: $time ypbind sendmail
|
||||||
|
# Required-Stop: $syslog $remote_fs
|
||||||
|
# Should-Stop: $time ypbind sendmail
|
||||||
|
# Default-Start: 3 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
# Short-Description: nbd server
|
||||||
|
# Description: Start nbd server
|
||||||
|
### END INIT INFO
|
||||||
|
#
|
||||||
|
|
||||||
|
# Check for missing binaries (stale symlinks should not happen)
|
||||||
|
# Note: Special treatment of stop for LSB conformance
|
||||||
|
NBD_BIN=/usr/bin/nbd-server
|
||||||
|
test -x $NBD_BIN || { echo "$NBD_BIN not installed";
|
||||||
|
if [ "$1" = "stop" ]; then exit 0;
|
||||||
|
else exit 5; fi; }
|
||||||
|
|
||||||
|
# Check for existence of needed config file and read it
|
||||||
|
NBD_CONFIG=/etc/nbd-server.conf
|
||||||
|
test -r $NBD_CONFIG || { echo "$NBD_CONFIG not existing";
|
||||||
|
if [ "$1" = "stop" ]; then exit 0;
|
||||||
|
else exit 6; fi; }
|
||||||
|
|
||||||
|
# Shell functions sourced from /etc/rc.status:
|
||||||
|
. /etc/rc.status
|
||||||
|
|
||||||
|
# Reset status of this service
|
||||||
|
rc_reset
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Starting nbd-server "
|
||||||
|
## Start daemon with startproc(8). If this fails
|
||||||
|
## the return value is set appropriately by startproc.
|
||||||
|
declare -i started
|
||||||
|
started=0
|
||||||
|
while read port file options; do
|
||||||
|
if test -z "$port"; then continue; fi
|
||||||
|
if test "${port:0:1}" = "#"; then continue; fi
|
||||||
|
echo -n " $port"
|
||||||
|
#/sbin/startproc -p /var/run/nbd-server.$port.pid $NBD_BIN $port $file $options
|
||||||
|
$NBD_BIN $port $file $options
|
||||||
|
rc_check
|
||||||
|
let started+=1
|
||||||
|
done < $NBD_CONFIG
|
||||||
|
# Remember status and be verbose
|
||||||
|
if test $_rc_status = 0 -a $started = 0; then
|
||||||
|
rc_status -s
|
||||||
|
else
|
||||||
|
true
|
||||||
|
rc_status -v
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
echo -n "Shutting down nbd-server "
|
||||||
|
## Stop daemon with killproc(8) and if this fails
|
||||||
|
## killproc sets the return value according to LSB.
|
||||||
|
|
||||||
|
while read port file options; do
|
||||||
|
if test -z "$port"; then continue; fi
|
||||||
|
if test "${port:0:1}" = "#"; then continue; fi
|
||||||
|
echo -n " $port"
|
||||||
|
/sbin/killproc -p /var/run/nbd-server.$port.pid $NBD_BIN $port $file $options
|
||||||
|
done < $NBD_CONFIG
|
||||||
|
|
||||||
|
# Remember status and be verbose
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
try-restart|condrestart)
|
||||||
|
## Do a restart only if the service was active before.
|
||||||
|
## Note: try-restart is now part of LSB (as of 1.9).
|
||||||
|
## RH has a similar command named condrestart.
|
||||||
|
if test "$1" = "condrestart"; then
|
||||||
|
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
||||||
|
fi
|
||||||
|
$0 status
|
||||||
|
if test $? = 0; then
|
||||||
|
$0 restart
|
||||||
|
else
|
||||||
|
rc_reset # Not running is not a failure.
|
||||||
|
fi
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
## Stop the service and regardless of whether it was
|
||||||
|
## running or not, start it again.
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
## Signal the daemon to reload its config. Most daemons
|
||||||
|
## do this on signal 1 (SIGHUP).
|
||||||
|
## If it does not support it, restart the service if it
|
||||||
|
## is running.
|
||||||
|
|
||||||
|
echo -n "Reload service nbd-server "
|
||||||
|
## if it supports it:
|
||||||
|
/sbin/killproc -HUP $NBD_BIN
|
||||||
|
#touch /var/run/nbd-server.pid
|
||||||
|
rc_status -v
|
||||||
|
|
||||||
|
## Otherwise:
|
||||||
|
#$0 try-restart
|
||||||
|
#rc_status
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
## Like force-reload, but if daemon does not support
|
||||||
|
## signaling, do nothing (!)
|
||||||
|
|
||||||
|
# If it supports signaling:
|
||||||
|
echo -n "Reload service nbd-server "
|
||||||
|
/sbin/killproc -HUP $NBD_BIN
|
||||||
|
#touch /var/run/nbd-server.pid
|
||||||
|
rc_status -v
|
||||||
|
|
||||||
|
## Otherwise if it does not support reload:
|
||||||
|
#rc_failed 3
|
||||||
|
#rc_status -v
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
echo -n "Checking for service nbd-server "
|
||||||
|
## Check status with checkproc(8), if process is running
|
||||||
|
## checkproc will return with exit status 0.
|
||||||
|
|
||||||
|
# NOTE: checkproc returns LSB compliant status values.
|
||||||
|
while read port file options; do
|
||||||
|
if test -z "$port"; then continue; fi
|
||||||
|
if test "${port:0:1}" = "#"; then continue; fi
|
||||||
|
echo -n " $port"
|
||||||
|
if ! test -r /var/run/nbd-server.$port.pid; then rc_failed 3; echo -n ":DIS"; continue; fi
|
||||||
|
read PID </var/run/nbd-server.$port.pid
|
||||||
|
if ! test -e /proc/$PID/exe; then rc_failed 1; echo -n ":DEAD"; continue; fi
|
||||||
|
if ! cmp /proc/$PID/exe $NBD_BIN; then rc_failed 1; echo -n ":DEAD"; continue; fi
|
||||||
|
echo -n ":OK"
|
||||||
|
#rc_status
|
||||||
|
done < $NBD_CONFIG
|
||||||
|
# NOTE: rc_status knows that we called this init script with
|
||||||
|
# "status" option and adapts its messages accordingly.
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
probe)
|
||||||
|
## Optional: Probe for the necessity of a reload, print out the
|
||||||
|
## argument to this init script which is required for a reload.
|
||||||
|
## Note: probe is not (yet) part of LSB (as of 1.9)
|
||||||
|
|
||||||
|
#test $NBD_CONFIG -nt /var/run/nbd-server.pid && echo restart
|
||||||
|
rc_failed 3
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
rc_exit
|
3
nbd-2.8.7.tar.bz2
Normal file
3
nbd-2.8.7.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a69d1690ad587d81b85c34d1ef9bf47abf0ba21dc96876d95dd6a9a193a859f1
|
||||||
|
size 141225
|
63
nbd-doc.diff
Normal file
63
nbd-doc.diff
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
diff -uNrp nbd-2.8.1.orig/nbd-client.8 nbd-2.8.1/nbd-client.8
|
||||||
|
--- nbd-2.8.1.orig/nbd-client.8 2005-10-27 19:53:13.000000000 +0200
|
||||||
|
+++ nbd-2.8.1/nbd-client.8 2005-10-28 10:05:12.523377343 +0200
|
||||||
|
@@ -65,24 +65,24 @@ Some examples of nbd-client usage:
|
||||||
|
\(bu
|
||||||
|
To connect to a server running on port 2000 at host
|
||||||
|
"server.domain.com", using the client's block special file
|
||||||
|
-"/dev/nd0":
|
||||||
|
+"/dev/nbd0":
|
||||||
|
|
||||||
|
\fBnbd-client server.domain.com 2000
|
||||||
|
-/dev/nd0\fR
|
||||||
|
+/dev/nbd0\fR
|
||||||
|
.TP 0.2i
|
||||||
|
\(bu
|
||||||
|
To connect to a server running on port 2001 at host
|
||||||
|
"swapserver.domain.com", using the client's block special
|
||||||
|
-file "/dev/nd1", for swap purposes:
|
||||||
|
+file "/dev/nbd1", for swap purposes:
|
||||||
|
|
||||||
|
-\fBnbd-client swapserver.domain.com 2001 /dev/nd1
|
||||||
|
+\fBnbd-client swapserver.domain.com 2001 /dev/nbd1
|
||||||
|
-swap\fR
|
||||||
|
.TP 0.2i
|
||||||
|
\(bu
|
||||||
|
To disconnect the above connection again (after making
|
||||||
|
sure the block special file is not in use anymore):
|
||||||
|
|
||||||
|
-\fBnbd-client -d /dev/nd1\fR
|
||||||
|
+\fBnbd-client -d /dev/nbd1\fR
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.PP
|
||||||
|
nbd-server (1).
|
||||||
|
diff -uNrp nbd-2.8.1.orig/nbd-client.8.sgml nbd-2.8.1/nbd-client.8.sgml
|
||||||
|
--- nbd-2.8.1.orig/nbd-client.8.sgml 2005-10-27 19:39:06.000000000 +0200
|
||||||
|
+++ nbd-2.8.1/nbd-client.8.sgml 2005-10-28 10:05:35.266410510 +0200
|
||||||
|
@@ -141,21 +141,21 @@ manpage.1: manpage.sgml
|
||||||
|
<listitem>
|
||||||
|
<para>To connect to a server running on port 2000 at host
|
||||||
|
"server.domain.com", using the client's block special file
|
||||||
|
- "/dev/nd0":</para>
|
||||||
|
+ "/dev/nbd0":</para>
|
||||||
|
<para><command>nbd-client server.domain.com 2000
|
||||||
|
- /dev/nd0</command></para>
|
||||||
|
+ /dev/nbd0</command></para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>To connect to a server running on port 2001 at host
|
||||||
|
"swapserver.domain.com", using the client's block special
|
||||||
|
- file "/dev/nd1", for swap purposes:</para>
|
||||||
|
- <para><command>nbd-client swapserver.domain.com 2001 /dev/nd1
|
||||||
|
+ file "/dev/nbd1", for swap purposes:</para>
|
||||||
|
+ <para><command>nbd-client swapserver.domain.com 2001 /dev/nbd1
|
||||||
|
-swap</command></para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>To disconnect the above connection again (after making
|
||||||
|
sure the block special file is not in use anymore):</para>
|
||||||
|
- <para><command>nbd-client -d /dev/nd1</command></para>
|
||||||
|
+ <para><command>nbd-client -d /dev/nbd1</command></para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</refsect1>
|
56
nbd-types.diff
Normal file
56
nbd-types.diff
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
Index: cliserv.h
|
||||||
|
===================================================================
|
||||||
|
--- cliserv.h.orig
|
||||||
|
+++ cliserv.h
|
||||||
|
@@ -34,16 +34,19 @@ typedef unsigned long long u64;
|
||||||
|
#else
|
||||||
|
#error I need at least some 64-bit type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifndef NBD_H_LINUX
|
||||||
|
/* 2.6.18 and above use __be* rather than u* */
|
||||||
|
#define __be32 u32
|
||||||
|
#define __be64 u64
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifdef NBD_H_LOCAL
|
||||||
|
#include "nbd.h"
|
||||||
|
#else
|
||||||
|
#ifdef NBD_H_LINUX
|
||||||
|
+#include <linux/types.h>
|
||||||
|
#include <linux/nbd.h>
|
||||||
|
#endif // NBD_H_LINUX
|
||||||
|
#endif // NBD_H_LOCAL
|
||||||
|
|
||||||
|
Index: configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- configure.ac.orig
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -74,21 +74,19 @@ AC_MSG_CHECKING(where to find a working
|
||||||
|
dnl We need to check for NBD_CMD_DISC, but that's part of an enum, it is not
|
||||||
|
dnl #define'd. Therefore, we check for something which is differently #define'd
|
||||||
|
dnl in the old or new versions, even if we don't really care about that.
|
||||||
|
dnl This might break at some time, but it should work for now, so...
|
||||||
|
-AC_TRY_COMPILE([#define u32 int
|
||||||
|
-#define u64 int
|
||||||
|
-#define __be32 int
|
||||||
|
-#define __be64 int
|
||||||
|
+AC_TRY_COMPILE([#define u32 __u32
|
||||||
|
+#define u64 __u64
|
||||||
|
+#include <linux/types.h>
|
||||||
|
#include "nbd.h"
|
||||||
|
],
|
||||||
|
[int foo=NBD_CMD_DISC],
|
||||||
|
[AC_DEFINE(NBD_H_LOCAL, 1, Set to 1 if a (kernel 2.6) nbd.h can be found in the current directory)
|
||||||
|
NBD_H='"nbd.h"'],
|
||||||
|
- AC_TRY_COMPILE([#define u32 int
|
||||||
|
-#define u64 int
|
||||||
|
-#define __be32 int
|
||||||
|
-#define __be64 int
|
||||||
|
+ AC_TRY_COMPILE([#define u32 __u32
|
||||||
|
+#define u64 __u64
|
||||||
|
+#include <linux/types.h>
|
||||||
|
#include <linux/nbd.h>
|
||||||
|
],
|
||||||
|
[int foo=NBD_CMD_DISC],
|
||||||
|
[AC_DEFINE(NBD_H_LINUX, 1, Set to 1 if a (kernel 2.6) nbd.h can be found in the linux directory in the search path) NBD_H='<linux/nbd.h>'],
|
78
nbd.changes
Normal file
78
nbd.changes
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 18 01:49:07 CET 2006 - garloff@suse.de
|
||||||
|
|
||||||
|
- Add nbd-server init script (parses /etc/nbd-server.conf).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 19 14:03:52 CEST 2006 - garloff@suse.de
|
||||||
|
|
||||||
|
- Update to nbd-2.8.7:
|
||||||
|
* A fix for build against nbd.h for kernel 2.6.18 (and above,
|
||||||
|
presumably)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 13 00:50:12 CEST 2006 - ro@suse.de
|
||||||
|
|
||||||
|
- include linux/types.h before linux/nbd.h
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 7 15:32:39 CEST 2006 - garloff@suse.de
|
||||||
|
|
||||||
|
- Update to nbd-2.8.6:
|
||||||
|
* performance/reliability improvements: Use select() rather than
|
||||||
|
accept() and waitpid() with WNOHANG rather than wait().
|
||||||
|
- Update to nbd-2.8.5:
|
||||||
|
* -persist option.
|
||||||
|
* Add export verification.
|
||||||
|
* Make sure queue is empty for write requests to read-only export.
|
||||||
|
- Update to nbd-2.8.4:
|
||||||
|
* Includes the previous fix (closing server socket)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 6 14:14:26 CET 2006 - garloff@suse.de
|
||||||
|
|
||||||
|
- Make sure children quit when they finish serving, rather than
|
||||||
|
trying to do stuff with a server socket that they've closed
|
||||||
|
already in a loop. Whoops. (Fix from nbd-2.8.4.)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 25 21:38:34 CET 2006 - mls@suse.de
|
||||||
|
|
||||||
|
- converted neededforbuild to BuildRequires
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 23 16:07:50 CET 2006 - garloff@suse.de
|
||||||
|
|
||||||
|
- Enable -fstack-protector.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 9 14:41:25 CET 2006 - garloff@suse.de
|
||||||
|
|
||||||
|
- Update to nbd-2.8.3:
|
||||||
|
* CVE-2005-3534.
|
||||||
|
* A fix for 64bit systems regarding the BLKGETSIZE ioctl().
|
||||||
|
* Better handling of SIGCHLD.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 20 00:05:22 CET 2005 - garloff@suse.de
|
||||||
|
|
||||||
|
- Update to nbd-2.8.2:
|
||||||
|
* Enable LFS by default.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 2 22:27:40 CET 2005 - dmueller@suse.de
|
||||||
|
|
||||||
|
- don't build as root
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 28 10:22:59 CEST 2005 - garloff@suse.de
|
||||||
|
|
||||||
|
- Update to version 2.8.1.
|
||||||
|
- Documentation added.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 4 18:24:39 CEST 2005 - garloff@suse.de
|
||||||
|
|
||||||
|
- Initial creation of package.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
140
nbd.spec
Normal file
140
nbd.spec
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
#
|
||||||
|
# spec file for package nbd (Version 2.8.7)
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
# This file and all modifications and additions to the pristine
|
||||||
|
# package are under the same license as the package itself.
|
||||||
|
#
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
# norootforbuild
|
||||||
|
|
||||||
|
Name: nbd
|
||||||
|
BuildRequires: doxygen glib2-devel
|
||||||
|
PreReq: %insserv_prereq
|
||||||
|
Version: 2.8.7
|
||||||
|
Release: 12
|
||||||
|
License: GNU General Public License (GPL)
|
||||||
|
Group: Productivity/Networking/Other
|
||||||
|
Autoreqprov: on
|
||||||
|
Source: %{name}-%{version}.tar.bz2
|
||||||
|
Source2: init.nbd-server
|
||||||
|
Patch1: nbd-doc.diff
|
||||||
|
Patch2: nbd-types.diff
|
||||||
|
Summary: Network Block Device Server and Client Utilities
|
||||||
|
URL: http://nbd.sourceforge.net/
|
||||||
|
Prefix: /usr
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package contains nbd-server. It is the server backend for the nbd
|
||||||
|
network block device driver that's in the Linux kernel.
|
||||||
|
|
||||||
|
nbd can be used to have a filesystem stored on another machine. It does
|
||||||
|
provide a block device, not a file system; so unless you put a
|
||||||
|
clustering filesystem on top of it, you can't access it simultaneously
|
||||||
|
from more than one client. Use NFS or a real cluster FS (such as
|
||||||
|
ocfs2) if you want to do this. nbd-server can export a file (which may
|
||||||
|
contain a filesystem image) or a partition. Swapping over nbd is
|
||||||
|
possible as well, though it's said not to be safe against OOM and
|
||||||
|
should not be used for that case. nbd-server also has a copy-on-write
|
||||||
|
mode where changes are saved to a separate file and thrown away when
|
||||||
|
the connection closes.
|
||||||
|
|
||||||
|
The package also contains the nbd-client tools, which you need to
|
||||||
|
configure the nbd devices on the client side.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Wouter Verhelst <wouter@debian.org>
|
||||||
|
Anton Altaparmakov <aia21@cam.ac.uk>
|
||||||
|
Pavel Machek <pavel@ucw.cz>
|
||||||
|
Paul Clements <Paul.Clements@steeleye.com>
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2
|
||||||
|
touch nbd-client.8
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoreconf --force --install
|
||||||
|
export CFLAGS="$RPM_OPT_FLAGS -fstack-protector"
|
||||||
|
#export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
|
./configure --with-gnu-ld --prefix=/usr --mandir=%{_mandir} \
|
||||||
|
--infodir=%{_infodir} --libdir=%{_libdir} --libexecdir=%{_libdir} \
|
||||||
|
--program-prefix="" --build=%{_target_cpu}-suse-linux
|
||||||
|
make
|
||||||
|
doxygen
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT man_MANS='nbd-client.8 nbd-server.1'
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||||
|
install %SOURCE2 $RPM_BUILD_ROOT/etc/init.d/nbd-server
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||||
|
ln -s ../../etc/init.d/nbd-server $RPM_BUILD_ROOT/usr/bin/rcnbd-server
|
||||||
|
echo "#Port file options" > $RPM_BUILD_ROOT/etc/nbd-server.conf
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%attr(0755,root,root) /usr/sbin/nbd-client
|
||||||
|
%attr(0755,root,root) /usr/bin/nbd-server
|
||||||
|
%attr(0755,root,root) /etc/init.d/nbd-server
|
||||||
|
%attr(0755,root,root) /usr/bin/rcnbd-server
|
||||||
|
%{_mandir}/man1/nbd-server.1.gz
|
||||||
|
%{_mandir}/man8/nbd-client.8.gz
|
||||||
|
%doc README
|
||||||
|
%doc doc/html
|
||||||
|
%config(noreplace) /etc/nbd-server.conf
|
||||||
|
|
||||||
|
%post
|
||||||
|
%{fillup_and_insserv -f nbd-server}
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%{insserv_cleanup}
|
||||||
|
|
||||||
|
%changelog -n nbd
|
||||||
|
* Sat Nov 18 2006 - garloff@suse.de
|
||||||
|
- Add nbd-server init script (parses /etc/nbd-server.conf).
|
||||||
|
* Thu Oct 19 2006 - garloff@suse.de
|
||||||
|
- Update to nbd-2.8.7:
|
||||||
|
* A fix for build against nbd.h for kernel 2.6.18 (and above,
|
||||||
|
presumably)
|
||||||
|
* Fri Oct 13 2006 - ro@suse.de
|
||||||
|
- include linux/types.h before linux/nbd.h
|
||||||
|
* Mon Aug 07 2006 - garloff@suse.de
|
||||||
|
- Update to nbd-2.8.6:
|
||||||
|
* performance/reliability improvements: Use select() rather than
|
||||||
|
accept() and waitpid() with WNOHANG rather than wait().
|
||||||
|
- Update to nbd-2.8.5:
|
||||||
|
* -persist option.
|
||||||
|
* Add export verification.
|
||||||
|
* Make sure queue is empty for write requests to read-only export.
|
||||||
|
- Update to nbd-2.8.4:
|
||||||
|
* Includes the previous fix (closing server socket)
|
||||||
|
* Mon Mar 06 2006 - garloff@suse.de
|
||||||
|
- Make sure children quit when they finish serving, rather than
|
||||||
|
trying to do stuff with a server socket that they've closed
|
||||||
|
already in a loop. Whoops. (Fix from nbd-2.8.4.)
|
||||||
|
* Wed Jan 25 2006 - mls@suse.de
|
||||||
|
- converted neededforbuild to BuildRequires
|
||||||
|
* Mon Jan 23 2006 - garloff@suse.de
|
||||||
|
- Enable -fstack-protector.
|
||||||
|
* Mon Jan 09 2006 - garloff@suse.de
|
||||||
|
- Update to nbd-2.8.3:
|
||||||
|
* CVE-2005-3534.
|
||||||
|
* A fix for 64bit systems regarding the BLKGETSIZE ioctl().
|
||||||
|
* Better handling of SIGCHLD.
|
||||||
|
* Tue Dec 20 2005 - garloff@suse.de
|
||||||
|
- Update to nbd-2.8.2:
|
||||||
|
* Enable LFS by default.
|
||||||
|
* Wed Nov 02 2005 - dmueller@suse.de
|
||||||
|
- don't build as root
|
||||||
|
* Fri Oct 28 2005 - garloff@suse.de
|
||||||
|
- Update to version 2.8.1.
|
||||||
|
- Documentation added.
|
||||||
|
* Mon Jul 04 2005 - garloff@suse.de
|
||||||
|
- Initial creation of package.
|
Loading…
Reference in New Issue
Block a user