]> git.pld-linux.org Git - packages/ifenslave.git/blob - ifenslave-debian.patch
Fix build with -Werror=format-security
[packages/ifenslave.git] / ifenslave-debian.patch
1 --- ifenslave-2.6-1.1.0.orig/ifenslave.8
2 +++ ifenslave-2.6-1.1.0/ifenslave.8
3 @@ -0,0 +1,69 @@
4 +.Dd 2004-04-09
5 +.Dt IFENSLAVE 8
6 +.Os "Debian GNU/Linux"
7 +.\" Manual page created by Guus Sliepen <guus@debian.org>
8 +.Sh NAME
9 +.Nm ifenslave
10 +.Nd Attach and detach slave network devices to a bonding device.
11 +.Sh SYNOPSIS
12 +.Nm
13 +.Op Fl acdfhuvV
14 +.Op Fl -all-interfaces
15 +.Op Fl -change-active
16 +.Op Fl -detach
17 +.Op Fl -force
18 +.Op Fl -help
19 +.Op Fl -usage
20 +.Op Fl -verbose
21 +.Op Fl -version
22 +.Ar master
23 +.Ar slave
24 +.No ...
25 +.Sh DESCRIPTION
26 +.Nm
27 +is a tool to attach and detach slave network devices to a bonding device.
28 +A bonding device will act like a normal Ethernet network device to the kernel,
29 +but will send out the packets via the slave devices using a simple round-robin scheduler.
30 +This allows for simple load-balancing,
31 +identical to "channel bonding" or "trunking" techniques used in switches.
32 +.Pp
33 +The kernel must have support for bonding devices for
34 +.Nm
35 +to be useful.
36 +.Sh OPTIONS
37 +.Bl -tag -width indent
38 +.It Fl a, -all-interfaces
39 +Show information about all interfaces.
40 +.It Fl c, -change-active
41 +Change active slave.
42 +.It Fl d, -detach
43 +Removes slave interfaces from the bonding device.
44 +.It Fl f, -force
45 +Force actions to be taken if one of the specified interfaces appears not to belong to an Ethernet device.
46 +.It Fl h, -help
47 +Display a help message and exit.
48 +.It Fl u, -usage
49 +Show usage information and exit.
50 +.It Fl v, -verbose
51 +Print warning and debug messages.
52 +.It Fl V, -version
53 +Show version information and exit.
54 +.El
55 +If not options are given, the default action will be to enslave interfaces.
56 +.Sh EXAMPLE
57 +The following example shows how to setup a bonding device and
58 +enslave two real Ethernet devices to it:
59 +.Bd -literal
60 +# modprobe bonding
61 +# ifconfig bond0 192.168.0.1 netmask 255.255.0.0
62 +# ifenslave bond0 eth0 eth1
63 +.Ed
64 +.Sh AUTHOR
65 +.Nm
66 +was originally written by
67 +.An Donald Becker Aq becker@cesdis.gsfc.nasa.gov ,
68 +and has since been updated by various kernel developers.
69 +.Pp
70 +This manual page was written by
71 +.An Guus Sliepen Aq guus@debian.org
72 +for the Debian GNU/Linux system.
73 --- ifenslave-2.6-1.1.0.orig/debian/changelog
74 +++ ifenslave-2.6-1.1.0/debian/changelog
75 @@ -0,0 +1,79 @@
76 +ifenslave-2.6 (1.1.0-10) unstable; urgency=low
77 +
78 +  * Apply patch from Scott Barker forcing explicitly mentioned interfaces to
79 +    always be enslaved, even if they have been brought up already.
80 +    Closes: #471769
81 +
82 + -- Guus Sliepen <guus@debian.org>  Sun, 01 Jun 2008 18:11:36 +0200
83 +
84 +ifenslave-2.6 (1.1.0-9) unstable; urgency=low
85 +
86 +  * Apply patch from Nicolas de Pesloüan allowing multiple arguments to
87 +    bond_arp_ip_target and writing them properly to sysfs. Closes: #480749
88 +
89 + -- Guus Sliepen <guus@debian.org>  Mon, 19 May 2008 11:29:26 +0200
90 +
91 +ifenslave-2.6 (1.1.0-8) unstable; urgency=low
92 +
93 +  * Apply patch from Guido Guenther allowing bonding device options normally
94 +    available via the sysfs interface to be set in /etc/network/interfaces.
95 +    Closes: #456952
96 +
97 + -- Guus Sliepen <guus@debian.org>  Thu, 20 Dec 2007 14:07:01 +0100
98 +
99 +ifenslave-2.6 (1.1.0-7) unstable; urgency=low
100 +
101 +  * Move scripts from if-up and if-down to if-pre-up and if-post-down again,
102 +    but bring the bonding interface up in if-pre-up. Closes: #422566
103 +
104 + -- Guus Sliepen <guus@debian.org>  Tue, 08 May 2007 11:09:26 +0200
105 +
106 +ifenslave-2.6 (1.1.0-6) unstable; urgency=low
107 +
108 +  * Move scripts from if-pre-up and if-post-down to if-up and if-down.
109 +
110 + -- Guus Sliepen <guus@debian.org>  Mon, 17 Oct 2005 00:48:26 +0200
111 +
112 +ifenslave-2.6 (1.1.0-5) unstable; urgency=low
113 +
114 +  * Add if-pre-up and if-post-down scripts to enslave and detach interfaces.
115 +    Closes: #306993.
116 +
117 + -- Guus Sliepen <guus@debian.org>  Fri, 30 Sep 2005 14:33:46 +0200
118 +
119 +ifenslave-2.6 (1.1.0-4) unstable; urgency=medium
120 +
121 +  * Drop Conflict with kernel-image-2.4 and newer ifenslave-2.4 packages.
122 +    Closes: #270416
123 +  * Use alternatives to allow this package to coexist with ifenslave-2.4.
124 +  * Move ifenslave to /sbin to allow network to be properly configured
125 +    before mounting /usr over NFS. Closes: #257284
126 +
127 + -- Guus Sliepen <guus@debian.org>  Fri, 17 Sep 2004 14:01:36 +0200
128 +
129 +ifenslave-2.6 (1.1.0-3) unstable; urgency=low
130 +
131 +  * Conflict, Replace and Provide ifenslave. Closes: #255287
132 +
133 + -- Guus Sliepen <guus@debian.org>  Fri, 25 Jun 2004 21:35:31 +0000
134 +
135 +ifenslave-2.6 (1.1.0-2) unstable; urgency=low
136 +
137 +  * Change package name to reflect it only works with 2.6.x kernels.
138 +    See also #247844.
139 +
140 + -- Guus Sliepen <guus@debian.org>  Sun, 16 May 2004 12:26:06 +0200
141 +
142 +ifenslave (1.1.0-1) unstable; urgency=low
143 +
144 +  * New upstream release (kernel 2.6.5). Closes: #242670
145 +
146 + -- Guus Sliepen <guus@debian.org>  Fri,  9 Apr 2004 14:31:50 +0200
147 +
148 +ifenslave (0.07-1) unstable; urgency=low
149 +
150 +  * Initial release. Closes: #100760
151 +  * Merged with several patched versions of the same source.
152 +  * Created manpage.
153 +
154 + -- Guus Sliepen <guus@sliepen.warande.net>  Wed, 13 Jun 2001 09:31:56 +0200
155 --- ifenslave-2.6-1.1.0.orig/debian/ifenslave-2.6.postinst
156 +++ ifenslave-2.6-1.1.0/debian/ifenslave-2.6.postinst
157 @@ -0,0 +1,6 @@
158 +#!/bin/sh -e
159 +
160 +update-alternatives --install /sbin/ifenslave ifenslave /sbin/ifenslave-2.6 260 \
161 +        --slave /usr/share/man/man8/ifenslave.8.gz ifenslave.8.gz /usr/share/man/man8/ifenslave-2.6.8.gz
162 +
163 +#DEBHELPER#
164 --- ifenslave-2.6-1.1.0.orig/debian/ifenslave-2.6.prerm
165 +++ ifenslave-2.6-1.1.0/debian/ifenslave-2.6.prerm
166 @@ -0,0 +1,8 @@
167 +#!/bin/sh -e
168 +
169 +if [ "$1" = remove ] || [ "$1" = deconfigure ]; then
170 +        update-alternatives --remove ifenslave /sbin/ifenslave-2.6
171 +fi
172 +
173 +
174 +#DEBHELPER#
175 --- ifenslave-2.6-1.1.0.orig/debian/README.debian
176 +++ ifenslave-2.6-1.1.0/debian/README.debian
177 @@ -0,0 +1,32 @@
178 +ifenslave for Debian
179 +----------------------
180 +
181 +The ifenslave program distributed with the Linux kernel sources has not always
182 +been up to date, and several modified versions have been floating around. The
183 +latest kernels now contain an updated version though.  The Debian package
184 +ifenslave will now use the version found in the kernel, without any patches.
185 +
186 +You can also enslave interfaces using Debian's /etc/network/interfaces file,
187 +like this:
188 +
189 +iface bond0 inet static
190 +       address 192.168.48.157
191 +       netmask 255.255.252.0
192 +       broadcast 192.168.48.255
193 +       gateway 192.168.48.1
194 +       slaves eth0 eth1
195 +
196 +The "slaves" option can take a list of network interfaces, the keyword "none"
197 +(with obvious results) and the keyword "all" (which selects all interfaces with
198 +"eth" in their name). Additionally you can set bonding options by adding them
199 +to the interface section:
200 +
201 +       bond_mode    active-backup
202 +       bond_primary eth0
203 +
204 +This would run the bonding device in active backup mode with eth0 as primary.
205 +Supported options are bond_mode, bond_miimon, bond_primary, bond_updelay,
206 +bond_downdelay, bond_arp_ip_target, bond_arp_interval, bond_xmit_hash_policy
207 +and bond_lacp_rate.
208 +
209 +Guus Sliepen <guus@debian.org>, Fri, 30 Sep 2005 14:33:06 +0200
210 --- ifenslave-2.6-1.1.0.orig/debian/pre-up
211 +++ ifenslave-2.6-1.1.0/debian/pre-up
212 @@ -0,0 +1,82 @@
213 +#!/bin/sh
214 +
215 +IFENSLAVE=/sbin/ifenslave
216 +IFSTATE=/etc/network/run/ifstate
217 +BOND_PARAMS=/sys/class/net/"$IFACE"/bonding/
218 +
219 +if [ ! -x $IFENSLAVE ] ; then
220 +       exit 0
221 +fi
222 +
223 +
224 +add_master()
225 +{
226 +    if [ ! -r /sys/class/net/bonding_masters ]; then
227 +        modprobe bonding >/dev/null 2>&1 || true
228 +    fi
229 +
230 +    if ! grep -sq "\\<$IFACE\\>" /sys/class/net/bonding_masters; then
231 +        echo "+$IFACE" > /sys/class/net/bonding_masters
232 +    fi
233 +}
234 +
235 +
236 +case "$IF_SLAVES" in
237 +       "")
238 +               exit 0
239 +               ;;
240 +       none)
241 +               INTERFACES=""
242 +               ;;
243 +       all)
244 +               INTERFACES=`grep eth /proc/net/dev|sed 's/\(\ *\)\(eth[^:]*\)\(.*\)/\2/'`
245 +               AUTOIF="yes"
246 +               ;;
247 +       *)
248 +               INTERFACES="$IF_SLAVES"
249 +               ;;
250 +esac
251 +
252 +
253 +if [ -n "$INTERFACES" ] ; then
254 +               add_master
255 +
256 +               if [ "$IF_BOND_MODE" ]; then
257 +                       echo "$IF_BOND_MODE" > $BOND_PARAMS/mode
258 +               fi
259 +               if [ "$IF_BOND_MIIMON" ]; then
260 +                       echo "$IF_BOND_MIIMON" > $BOND_PARAMS/miimon
261 +               fi
262 +               if [ "$IF_BOND_UPDELAY" ]; then
263 +                       echo "$IF_BOND_UPDELAY" > $BOND_PARAMS/updelay
264 +               fi
265 +               if [ "$IF_BOND_DOWNDELAY" ]; then
266 +                       echo "$IF_BOND_DOWNDELAY" > $BOND_PARAMS/downdelay
267 +               fi
268 +               if [ "$IF_BOND_ARP_IP_TARGET" ]; then
269 +                       for target in $IF_BOND_ARP_IP_TARGET; do
270 +                               echo "+$target" > $BOND_PARAMS/arp_ip_target
271 +                       done
272 +               fi
273 +               if [ "$IF_BOND_ARP_INTERVAL" ]; then
274 +                       echo "$IF_BOND_ARP_INTERVAL" > $BOND_PARAMS/arp_interval
275 +               fi
276 +               if [ "$IF_BOND_XMIT_HASH_POLICY" ]; then
277 +                       echo "$IF_BOND_XMIT_HASH_POLICY" > $BOND_PARAMS/xmit_hash_policy
278 +               fi
279 +               if [ "$IF_BOND_LACP_RATE" ]; then
280 +                       echo "$IF_BOND_LACP_RATE" > $BOND_PARAMS/lacp_rate
281 +               fi
282 +               ifconfig "$IFACE" up
283 +               for slave in $INTERFACES ; do
284 +                               if ( [ "$AUTOIF" ] && grep -q "^$slave=" $IFSTATE ) ; then
285 +                                       echo "Not enslaving interface $slave since it is already configured"
286 +                               else
287 +                                       ifconfig "$slave" down
288 +                                       $IFENSLAVE "$IFACE" "$slave"
289 +                               fi
290 +               done
291 +               if [ "$IF_BOND_PRIMARY" ]; then
292 +                       echo "$IF_BOND_PRIMARY" > $BOND_PARAMS/primary
293 +               fi
294 +fi
295 --- ifenslave-2.6-1.1.0.orig/debian/post-down
296 +++ ifenslave-2.6-1.1.0/debian/post-down
297 @@ -0,0 +1,31 @@
298 +#!/bin/sh
299 +
300 +IFENSLAVE=/sbin/ifenslave
301 +IFSTATE=/etc/network/run/ifstate
302 +
303 +if [ ! -x $IFENSLAVE ] ; then
304 +       exit 0
305 +fi
306 +
307 +case "$IF_SLAVES" in
308 +       "")
309 +               exit 0
310 +               ;;
311 +       none)
312 +               INTERFACES=""
313 +               ;;
314 +       all)
315 +               INTERFACES=`grep eth /proc/net/dev|sed 's/\(\ *\)\(eth[^:]*\)\(.*\)/\2/'`
316 +               ;;
317 +       *)
318 +               INTERFACES="$IF_SLAVES"
319 +               ;;
320 +esac
321 +
322 +if [ -n "$INTERFACES" ] ; then
323 +               ifconfig "$IFACE" up
324 +               for slave in $INTERFACES ; do
325 +                       $IFENSLAVE --detach "$IFACE" "$slave"
326 +               done
327 +               ifconfig "$IFACE" down
328 +fi
329 --- ifenslave-2.6-1.1.0.orig/debian/compat
330 +++ ifenslave-2.6-1.1.0/debian/compat
331 @@ -0,0 +1 @@
332 +4
333 --- ifenslave-2.6-1.1.0.orig/debian/rules
334 +++ ifenslave-2.6-1.1.0/debian/rules
335 @@ -0,0 +1,79 @@
336 +#!/usr/bin/make -f
337 +# Sample debian/rules that uses debhelper.
338 +# GNU copyright 1997 to 1999 by Joey Hess.
339 +
340 +# Uncomment this to turn on verbose mode.
341 +#export DH_VERBOSE=1
342 +
343 +configure: configure-stamp
344 +configure-stamp:
345 +       dh_testdir
346 +       touch configure-stamp
347 +
348 +build: configure-stamp build-stamp
349 +build-stamp:
350 +       dh_testdir
351 +
352 +       gcc -O2 -g -Wall -o ifenslave ifenslave.c
353 +
354 +       touch build-stamp
355 +
356 +clean:
357 +       dh_testdir
358 +       dh_testroot
359 +       rm -f build-stamp configure-stamp
360 +
361 +       rm -f ifenslave
362 +
363 +       dh_clean
364 +
365 +install: build
366 +       dh_testdir
367 +       dh_testroot
368 +       dh_clean -k
369 +       dh_installdirs
370 +
371 +       mkdir -p $(CURDIR)/debian/ifenslave-2.6/sbin/
372 +       mkdir -p $(CURDIR)/debian/ifenslave-2.6/usr/share/man/man8/
373 +       cp ifenslave $(CURDIR)/debian/ifenslave-2.6/sbin/ifenslave-2.6
374 +       cp ifenslave.8 $(CURDIR)/debian/ifenslave-2.6/usr/share/man/man8/ifenslave-2.6.8
375 +       install -D debian/pre-up $(CURDIR)/debian/ifenslave-2.6/etc/network/if-pre-up.d/ifenslave
376 +       install -D debian/post-down $(CURDIR)/debian/ifenslave-2.6/etc/network/if-post-down.d/ifenslave
377 +
378 +
379 +# Build architecture-independent files here.
380 +binary-indep: build install
381 +# We have nothing to do by default.
382 +
383 +# Build architecture-dependent files here.
384 +binary-arch: build install
385 +       dh_testdir
386 +       dh_testroot
387 +#      dh_installdebconf       
388 +       dh_installdocs
389 +#      dh_installexamples
390 +#      dh_installmenu
391 +#      dh_installlogrotate
392 +#      dh_installemacsen
393 +#      dh_installpam
394 +#      dh_installmime
395 +#      dh_installinit
396 +#      dh_installcron
397 +       dh_installman
398 +#      dh_installinfo
399 +#      dh_undocumented
400 +       dh_installchangelogs 
401 +       dh_link
402 +       dh_strip
403 +       dh_compress
404 +       dh_fixperms
405 +#      dh_makeshlibs
406 +       dh_installdeb
407 +#      dh_perl
408 +       dh_shlibdeps
409 +       dh_gencontrol
410 +       dh_md5sums
411 +       dh_builddeb
412 +
413 +binary: binary-indep binary-arch
414 +.PHONY: build clean binary-indep binary-arch binary install configure
415 --- ifenslave-2.6-1.1.0.orig/debian/ifenslave-2.6.preinst
416 +++ ifenslave-2.6-1.1.0/debian/ifenslave-2.6.preinst
417 @@ -0,0 +1,11 @@
418 +#!/bin/sh -e
419 +
420 +if [ -f /etc/network/if-up.d/ifenslave -a ! -e /etc/network/if-pre-up.d/ifenslave ]; then
421 +       mv /etc/network/if-up.d/ifenslave /etc/network/if-pre-up.d/ifenslave
422 +fi
423 +
424 +if [ -f /etc/network/if-down.d/ifenslave -a ! -e /etc/network/if-post-down.d/ifenslave ]; then
425 +       mv /etc/network/if-down.d/ifenslave /etc/network/if-post-down.d/ifenslave
426 +fi
427 +
428 +#DEBHELPER#
429 --- ifenslave-2.6-1.1.0.orig/debian/control
430 +++ ifenslave-2.6-1.1.0/debian/control
431 @@ -0,0 +1,22 @@
432 +Source: ifenslave-2.6
433 +Section: net
434 +Priority: optional
435 +Maintainer: Guus Sliepen <guus@debian.org>
436 +Build-Depends: debhelper (>> 4.0.0)
437 +Standards-Version: 3.7.3
438 +
439 +Package: ifenslave-2.6
440 +Architecture: any
441 +Depends: ${shlibs:Depends}
442 +Recommends: net-tools
443 +Conflicts: ifenslave (<< 2), ifenslave-2.4 (<= 0.07+2.5.15-6)
444 +Description: Attach and detach slave interfaces to a bonding device
445 + This is a tool to attach and detach slave network interfaces to a bonding
446 + device. A bonding device will act like a normal Ethernet network device to
447 + the kernel, but will send out the packets via the slave devices using a simple
448 + round-robin scheduler. This allows for simple load-balancing, identical to
449 + "channel bonding" or "trunking" techniques used in switches.
450 + .
451 + The kernel must have support for bonding devices for ifenslave to be useful.
452 + This package supports 2.6.x kernels and the most recent 2.4.x kernels. For
453 + older kernels use the ifenslave-2.4 package.
454 --- ifenslave-2.6-1.1.0.orig/debian/copyright
455 +++ ifenslave-2.6-1.1.0/debian/copyright
456 @@ -0,0 +1,15 @@
457 +This package was debianized by Guus Sliepen <guus@debian.org> on
458 +Wed, 13 Jun 2001 09:31:56 +0200.
459 +
460 +There have been several version of ifenslave circulating around in the past.
461 +For this Debian package, the source was taken from the Documentation directory
462 +of the Linux 2.6 kernel sources.
463 +
464 +    Copyright (c) 1994-1996  Donald Becker <becker@cesdis.gsfc.nasa.gov>
465 +
466 +    This program is free software; you can redistribute it
467 +    and/or modify it under the terms of the GNU General Public
468 +    License as published by the Free Software Foundation.
469 +
470 +On Debian GNU/Linux systems, the complete text of the GNU General Public
471 +License version 2 can be found in /usr/share/common-licenses/GPL-2.
This page took 0.168443 seconds and 4 git commands to generate.