whitspace changes ignored version
[util-vserver.git] / rev2883to2902.patch
1 Index: python/Makefile-files
2 ===================================================================
3 --- python/Makefile-files       (revision 2883)
4 +++ python/Makefile-files       (revision 2902)
5 @@ -17,6 +17,7 @@
6  ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
7  ## 
8  
9 +AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += python/libvserver.py
10  pyexec_LTLIBRARIES             += python/_libvserver.la
11  pyexec_SCRIPTS                 += python/libvserver.py
12  python__libvserver_la_SOURCES  =  python/_libvserver.c
13 Index: debian/control
14 ===================================================================
15 --- debian/control      (revision 0)
16 +++ debian/control      (revision 2902)
17 @@ -0,0 +1,89 @@
18 +Source: util-vserver
19 +Section: net
20 +Priority: optional
21 +Maintainer: Daniel Hokka Zakrisson <daniel@hozac.com>
22 +Build-Depends: debhelper (>= 7), gawk, dietlibc-dev, net-tools, vlan, iptables, wget, procps, module-init-tools, libnss3-dev, po-debconf, e2fslibs-dev, pkg-config, python2.6-dev
23 +Standards-Version: 3.8.4
24 +Homepage: http://savannah.nongnu.org/projects/util-vserver/
25 +
26 +Package: util-vserver
27 +Architecture: any
28 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver-core, util-vserver-lib, util-vserver-sysv, diffutils
29 +Description: utilities for managing Linux-VServer guests
30 + util-vserver provides the components and a framework to setup virtual
31 + servers.  A virtual server runs inside a Linux server. It is nevertheless
32 + highly independent. As such, you can run various services with normal
33 + configuration. The various vservers can't interact with each other and
34 + can't interact with services in the main server.
35 +
36 +Package: libvserver0
37 +Section: libs
38 +Architecture: any
39 +Depends: ${shlibs:Depends}, ${misc:Depends}
40 +Description: dynamic libraries for util-vserver
41 + util-vserver provides the components and a framework to setup virtual
42 + servers.  A virtual server runs inside a Linux server. It is nevertheless
43 + highly independent. As such, you can run various services with normal
44 + configuration. The various vservers can't interact with each other and
45 + can't interact with services in the main server.
46 +
47 +Package: util-vserver-core
48 +Architecture: any
49 +Depends: ${shlibs:Depends}, ${misc:Depends}
50 +Description: core utilities of util-vserver
51 + util-vserver provides the components and a framework to setup virtual
52 + servers.  A virtual server runs inside a Linux server. It is nevertheless
53 + highly independent. As such, you can run various services with normal
54 + configuration. The various vservers can't interact with each other and
55 + can't interact with services in the main server.
56 +
57 +Package: util-vserver-build
58 +Architecture: any
59 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver, wget, binutils
60 +Description: tools which can be used to build vservers
61 + util-vserver provides the components and a framework to setup virtual
62 + servers.  A virtual server runs inside a Linux server. It is nevertheless
63 + highly independent. As such, you can run various services with normal
64 + configuration. The various vservers can't interact with each other and
65 + can't interact with services in the main server.
66 +
67 +Package: util-vserver-sysv
68 +Architecture: any
69 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver, make, diffutils
70 +Description: initscripts for util-vserver
71 + util-vserver provides the components and a framework to setup virtual
72 + servers.  A virtual server runs inside a Linux server. It is nevertheless
73 + highly independent. As such, you can run various services with normal
74 + configuration. The various vservers can't interact with each other and
75 + can't interact with services in the main server.
76 +
77 +Package: util-vserver-legacy
78 +Architecture: any
79 +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, util-vserver
80 +Description: legacy scripts for util-vserver
81 + util-vserver provides the components and a framework to setup virtual
82 + servers.  A virtual server runs inside a Linux server. It is nevertheless
83 + highly independent. As such, you can run various services with normal
84 + configuration. The various vservers can't interact with each other and
85 + can't interact with services in the main server.
86 +
87 +Package: libvserver0-dev
88 +Section: libdevel
89 +Architecture: any
90 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver-lib, pkg-config
91 +Description: headers and libraries needed to develop vserver based applications
92 + util-vserver provides the components and a framework to setup virtual
93 + servers.  A virtual server runs inside a Linux server. It is nevertheless
94 + highly independent. As such, you can run various services with normal
95 + configuration. The various vservers can't interact with each other and
96 + can't interact with services in the main server.
97 +
98 +Package: util-vserver-python
99 +Architecture: any
100 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver-lib, ${python:Depends}, ${python:Versions}
101 +Description: python-bindings for util-vserver
102 + util-vserver provides the components and a framework to setup virtual
103 + servers.  A virtual server runs inside a Linux server. It is nevertheless
104 + highly independent. As such, you can run various services with normal
105 + configuration. The various vservers can't interact with each other and
106 + can't interact with services in the main server.
107
108 Property changes on: debian/control
109 ___________________________________________________________________
110 Added: svn:keywords
111    + Id
112
113 Index: debian/compat
114 ===================================================================
115 --- debian/compat       (revision 0)
116 +++ debian/compat       (revision 2902)
117 @@ -0,0 +1 @@
118 +7
119 Index: debian/util-vserver-build.postinst
120 ===================================================================
121 --- debian/util-vserver-build.postinst  (revision 0)
122 +++ debian/util-vserver-build.postinst  (revision 2902)
123 @@ -0,0 +1,8 @@
124 +#!/bin/sh
125 +
126 +test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
127 +
128 +f="/etc/vservers/.defaults/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
129 +        ln -s /vservers/.hash "$f"/00
130 +
131 +/usr/sbin/setattr --barrier /vservers/.hash || :
132
133 Property changes on: debian/util-vserver-build.postinst
134 ___________________________________________________________________
135 Added: svn:executable
136    + *
137
138 Index: debian/copyright
139 ===================================================================
140 --- debian/copyright    (revision 0)
141 +++ debian/copyright    (revision 2902)
142 @@ -0,0 +1,41 @@
143 +This work was packaged for Debian by:
144 +
145 +    Daniel Hokka Zakrisson <daniel@hozac.com> on Wed, 14 Jul 2010 22:42:52 +0000
146 +
147 +It was downloaded from:
148 +
149 +    http://svn.linux-vserver.org/svn/util-vserver
150 +
151 +Upstream Author(s):
152 +
153 +    Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
154 +    Daniel Hokka Zakrisson <daniel@hozac.com>
155 +
156 +Copyright:
157 +
158 +    Copyright (C) 2002-2010 Enrico Scholz
159 +    Copyright (C) 2006-2010 Daniel Hokka Zakrisson
160 +
161 +License:
162 +
163 +    This program is free software; you can redistribute it and/or modify it
164 +    under the terms of the GNU General Public License as published by the Free
165 +    Software Foundation; version 2.
166 +
167 +    This program is distributed in the hope that it will be useful, but
168 +    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
169 +    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
170 +    for more details.
171 +
172 +    You should have received a copy of the GNU General Public License with
173 +    your Debian GNU system, in /usr/share/common-licenses/GPL-2, or with the
174 +    Debian GNU source package as the file GNUGPL.TXT.  If not, write to the
175 +    Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
176 +    MA 02110-1301, USA.
177 +
178 +The Debian packaging is:
179 +
180 +    Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
181 +
182 +and is licensed under the GPL version 2,
183 +see "/usr/share/common-licenses/GPL-2".
184 Index: debian/docs
185 ===================================================================
186 --- debian/docs (revision 0)
187 +++ debian/docs (revision 2902)
188 @@ -0,0 +1,2 @@
189 +NEWS
190 +README
191 Index: debian/util-vserver.postinst
192 ===================================================================
193 --- debian/util-vserver.postinst        (revision 0)
194 +++ debian/util-vserver.postinst        (revision 2902)
195 @@ -0,0 +1,10 @@
196 +#!/bin/sh
197 +
198 +test -d /vservers      || mkdir -m0000 /vservers
199 +test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
200 +
201 +f="/etc/vservers/.defaults/vdirbase";  test -L "$f" -o -e "$f" || ln -s /vservers             "$f"
202 +f="/etc/vservers/.defaults/run.rev";   test -L "$f" -o -e "$f" || ln -s /var/run/vservers.rev "$f"
203 +f="/etc/vservers/.defaults/cachebase"; test -L "$f" -o -e "$f" || ln -s /var/cache/vservers   "$f"
204 +
205 +/usr/sbin/setattr --barrier /vservers /vservers/.pkg || :
206
207 Property changes on: debian/util-vserver.postinst
208 ___________________________________________________________________
209 Added: svn:executable
210    + *
211
212 Index: debian/rules
213 ===================================================================
214 --- debian/rules        (revision 0)
215 +++ debian/rules        (revision 2902)
216 @@ -0,0 +1,31 @@
217 +#!/usr/bin/make -f
218 +# -*- makefile -*-
219 +# Sample debian/rules that uses debhelper.
220 +#
221 +# This file was originally written by Joey Hess and Craig Small.
222 +# As a special exception, when this file is copied by dh-make into a
223 +# dh-make output file, you may use that output file without restriction.
224 +# This special exception was added by Craig Small in version 0.37 of dh-make.
225 +#
226 +# Modified to make a template file for a multi-binary package with separated
227 +# build-arch and build-indep targets  by Bill Allombert 2001
228 +
229 +# Uncomment this to turn on verbose mode.
230 +#export DH_VERBOSE=1
231 +
232 +# This has to be exported to make some magic below work.
233 +export DH_OPTIONS
234 +
235 +
236 +%:
237 +       dh $@
238 +
239 +override_dh_auto_configure:
240 +       dh_auto_configure -- --with-initrddir=/etc/init.d --enable-release \
241 +               --enable-apis=NOLEGACY --with-initscripts=sysv
242 +
243 +override_dh_auto_test:
244 +
245 +override_dh_auto_install:
246 +       dh_auto_install
247 +       contrib/make-deb-manifest util-vserver debian contrib/manifest.dat files
248
249 Property changes on: debian/rules
250 ___________________________________________________________________
251 Added: svn:keywords
252    + Id
253 Added: svn:executable
254    + *
255
256 Index: debian/util-vserver.postrm
257 ===================================================================
258 --- debian/util-vserver.postrm  (revision 0)
259 +++ debian/util-vserver.postrm  (revision 2902)
260 @@ -0,0 +1,5 @@
261 +#!/bin/sh
262 +
263 +if test "$1" = purge; then
264 +    rm -rf /var/cache/vservers/* 2>/dev/null || :
265 +fi
266
267 Property changes on: debian/util-vserver.postrm
268 ___________________________________________________________________
269 Added: svn:executable
270    + *
271
272 Index: debian/util-vserver-legacy.postinst
273 ===================================================================
274 --- debian/util-vserver-legacy.postinst (revision 0)
275 +++ debian/util-vserver-legacy.postinst (revision 2902)
276 @@ -0,0 +1,9 @@
277 +#!/bin/sh
278 +
279 +if test "$1" = configure; then
280 +    update-rc.d rebootmgr start 98 2 3 4 5 stop 02 0 1 6 .
281 +    update-rc.d vservers-legacy start 98 2 3 4 5 stop 02 0 1 6 .
282 +    for i in httpd named portmap sendmail smb sshd xinetd gated; do
283 +       update-rc.d v_$i start 98 2 3 4 5 stop 02 0 1 6 .
284 +    done
285 +fi
286
287 Property changes on: debian/util-vserver-legacy.postinst
288 ___________________________________________________________________
289 Added: svn:executable
290    + *
291
292 Index: debian/util-vserver-sysv.postinst
293 ===================================================================
294 --- debian/util-vserver-sysv.postinst   (revision 0)
295 +++ debian/util-vserver-sysv.postinst   (revision 2902)
296 @@ -0,0 +1,7 @@
297 +#!/bin/sh
298 +
299 +if test "$1" = configure; then
300 +    update-rc.d vservers-default start 98 2 3 4 5 stop 02 0 1 6 .
301 +    update-rc.d vprocunhide start 26 2 3 4 5 stop 74 0 1 6 .
302 +    update-rc.d util-vserver start 10 2 3 4 5 stop 90 0 1 6 .
303 +fi
304
305 Property changes on: debian/util-vserver-sysv.postinst
306 ___________________________________________________________________
307 Added: svn:executable
308    + *
309
310 Index: debian/changelog.in
311 ===================================================================
312 --- debian/changelog.in (revision 0)
313 +++ debian/changelog.in (revision 2902)
314 @@ -0,0 +1,5 @@
315 +util-vserver (@PACKAGE_VERSION@-1) unstable; urgency=low
316 +
317 +  * Initial release
318 +
319 + -- Daniel Hokka Zakrisson <daniel@hozac.com>  @DATE@
320 Index: debian/util-vserver-sysv.postrm
321 ===================================================================
322 --- debian/util-vserver-sysv.postrm     (revision 0)
323 +++ debian/util-vserver-sysv.postrm     (revision 2902)
324 @@ -0,0 +1,5 @@
325 +#!/bin/sh
326 +
327 +if test "$1" = upgrade; then
328 +    /etc/init.d/vprocunhide condrestart > /dev/null 2>&1
329 +fi
330
331 Property changes on: debian/util-vserver-sysv.postrm
332 ___________________________________________________________________
333 Added: svn:executable
334    + *
335
336 Index: debian/Makefile-files
337 ===================================================================
338 --- debian/Makefile-files       (revision 0)
339 +++ debian/Makefile-files       (revision 2902)
340 @@ -0,0 +1,33 @@
341 +## $Id$  -*- makefile -*-
342 +
343 +## Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
344 +##  
345 +## This program is free software; you can redistribute it and/or modify
346 +## it under the terms of the GNU General Public License as published by
347 +## the Free Software Foundation; either version 2, or (at your option)
348 +## any later version.
349 +##  
350 +## This program is distributed in the hope that it will be useful,
351 +## but WITHOUT ANY WARRANTY; without even the implied warranty of
352 +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
353 +## GNU General Public License for more details.
354 +##  
355 +## You should have received a copy of the GNU General Public License
356 +## along with this program; if not, write to the Free Software
357 +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
358 +##  
359 +
360 +
361 +EXTRA_DIST +=  debian/rules \
362 +               debian/control \
363 +               debian/compat \
364 +               debian/copyright \
365 +               debian/docs \
366 +               debian/changelog.in \
367 +               debian/changelog
368 +
369 +#CLEANFILES += debian/changelog
370 +
371 +DEB_CL_DATE = $(shell date '+%a, %d %b %Y %H:%M:%S %z')
372 +debian/changelog: debian/changelog.in
373 +       $(SED) "s/@"PACKAGE_VERSION"@/$(PACKAGE_VERSION)/g;s/@"DATE"@/$(DEB_CL_DATE)/g" $< > $@
374
375 Property changes on: debian/Makefile-files
376 ___________________________________________________________________
377 Added: svn:keywords
378    + Id
379
380 Index: debian/util-vserver-legacy.prerm
381 ===================================================================
382 --- debian/util-vserver-legacy.prerm    (revision 0)
383 +++ debian/util-vserver-legacy.prerm    (revision 2902)
384 @@ -0,0 +1,10 @@
385 +#!/bin/sh
386 +
387 +if test "$1" = remove; then
388 +    /etc/init.d/rebootmgr stop > /dev/null 2>&1
389 +    update-rc.d rebootmgr remove
390 +    update-rc.d vservers-legacy remove
391 +    for i in httpd named portmap sendmail smb sshd xinetd gated; do
392 +       update-rc.d v_$i remove
393 +    done
394 +fi
395
396 Property changes on: debian/util-vserver-legacy.prerm
397 ___________________________________________________________________
398 Added: svn:executable
399    + *
400
401 Index: debian/util-vserver-sysv.prerm
402 ===================================================================
403 --- debian/util-vserver-sysv.prerm      (revision 0)
404 +++ debian/util-vserver-sysv.prerm      (revision 2902)
405 @@ -0,0 +1,8 @@
406 +#!/bin/sh
407 +
408 +if test "$1" = remove; then
409 +    /etc/init.d/vprocunhide stop > /dev/null 2>&1
410 +    update-rc.d vprocunhide remove
411 +    update-rc.d util-vserver remove
412 +    update-rc.d vservers-default remove
413 +fi
414
415 Property changes on: debian/util-vserver-sysv.prerm
416 ___________________________________________________________________
417 Added: svn:executable
418    + *
419
420 Index: src/testsuite/hashcalc-plain.c
421 ===================================================================
422 --- src/testsuite/hashcalc-plain.c      (revision 2883)
423 +++ src/testsuite/hashcalc-plain.c      (revision 2902)
424 @@ -24,6 +24,7 @@
425  #include <stdbool.h>
426  #include <unistd.h>
427  #include <fcntl.h>
428 +#include <sys/stat.h>
429  #include <sys/mman.h>
430  
431  #define ENSC_TESTSUITE
432 Index: src/testsuite/Makefile-files
433 ===================================================================
434 --- src/testsuite/Makefile-files        (revision 2883)
435 +++ src/testsuite/Makefile-files        (revision 2902)
436 @@ -57,19 +57,22 @@
437                                         src/testsuite/hashcalc-plain.sh \
438                                         src/testsuite/vwait-test.sh
439  
440 +DIETPROGS +=                           src/testsuite/vunify-functest \
441 +                                       src/testsuite/chcontext-test \
442 +                                       src/testsuite/chbind-test \
443 +                                       src/testsuite/rpm-fake-test
444 +
445  src_testsuite_rpm_fake_test_SOURCES =  src/testsuite/rpm-fake-test.c
446  
447  src_testsuite_vunify_functest_SOURCES =        src/testsuite/vunify-functest.c
448  src_testsuite_vunify_functest_LDADD =  $(LIBINTERNAL)
449  src_testsuite_vunify_functest_CPPFLAGS=        $(AM_CPPFLAGS) $(src_testsuite_CPPFLAGS)
450  
451 -
452  src_testsuite_chcontext_test_SOURCES = src/testsuite/chcontext-test.c
453 -src_testsuite_chcontext_test_LDADD =   lib/libvserver.la $(LIBINTERNAL)
454 +src_testsuite_chcontext_test_LDADD =   $(VSERVER_LDADDS) $(LIBINTERNAL)
455  
456 -
457  src_testsuite_chbind_test_SOURCES =    src/testsuite/chbind-test.c
458 -src_testsuite_chbind_test_LDADD =      lib/libvserver.la
459 +src_testsuite_chbind_test_LDADD =      $(LIBVSERVER)
460  
461  src_testsuite_hashcalc_SOURCES =       src/testsuite/hashcalc.c
462  src_testsuite_hashcalc_plain_SOURCES = src/testsuite/hashcalc-plain.c
463 @@ -77,6 +80,9 @@
464  src_testsuite_hashcalc_plain_CFLAGS =  $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
465  
466  if ENSC_CAN_CRYPTO_WITH_DIETLIBC
467 +DIETPROGS +=                           src/testsuite/hashcalc          \
468 +                                       src/testsuite/hashcalc-plain
469 +
470  src_testsuite_hashcalc_LDADD =         $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
471  src_testsuite_hashcalc_LDFLAGS =       $(VSERVER_LDFLGS)
472  
473 Index: src/vcontext.c
474 ===================================================================
475 --- src/vcontext.c      (revision 2883)
476 +++ src/vcontext.c      (revision 2902)
477 @@ -21,6 +21,7 @@
478  #endif
479  
480  #include "util.h"
481 +#include "compat-pivot_root.h"
482  #include "lib/internal.h"
483  #include "lib_internal/jail.h"
484  #include "lib_internal/sys_personality.h"
485 Index: src/vserver-stat.c
486 ===================================================================
487 --- src/vserver-stat.c  (revision 2883)
488 +++ src/vserver-stat.c  (revision 2902)
489 @@ -116,7 +116,7 @@
490    WRITE_STR(1, cmd);
491    WRITE_MSG(1,
492             "\n"
493 -           "Show informations about all the active context.\n\n"
494 +           "Show information about all active contexts.\n\n"
495             "   CTX#            Context number\n"
496             "                   #0 = root context\n"
497             "                   #1 = monitoring context\n"
498 Index: scripts/vserver.suexec
499 ===================================================================
500 --- scripts/vserver.suexec      (revision 2883)
501 +++ scripts/vserver.suexec      (revision 2902)
502 @@ -40,7 +40,7 @@
503         "${CHBIND_CMD[@]}" \
504         $_EXEC_ULIMIT "$VSERVER_DIR/ulimits" \
505         ${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \
506 -       $_VSPACE --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
507 +       $_VSPACE --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" "${OPTS_VSPACE_SHARED[@]}" -- \
508         $_VTAG --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
509         $_VCONTEXT $SILENT_OPT --migrate $OPT_VCONTEXT_CHROOT \
510           --xid "$S_CONTEXT" --uid "$user" "${OPTS_VCONTEXT_ENTER[@]}" -- \
511 Index: scripts/vserver.stop
512 ===================================================================
513 --- scripts/vserver.stop        (revision 2883)
514 +++ scripts/vserver.stop        (revision 2902)
515 @@ -83,7 +83,7 @@
516      "${IONICE_CMD[@]}" \
517      "${NICE_CMD[@]}" \
518      "${CHBIND_CMD[@]}" \
519 -    "$_VSPACE" --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
520 +    "$_VSPACE" --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" "${OPTS_VSPACE_SHARED[@]}" -- \
521      "$_VTAG" --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
522      $_VCONTEXT $SILENT_OPT --migrate $OPT_VCONTEXT_CHROOT --xid "$S_CONTEXT" -- \
523      "${INITCMD_STOP[@]}" || fail=1
524 Index: scripts/vserver.start
525 ===================================================================
526 --- scripts/vserver.start       (revision 2883)
527 +++ scripts/vserver.start       (revision 2902)
528 @@ -136,6 +136,7 @@
529  if $_VSERVER_INFO - FEATURE migrate; then
530      ${IONICE_CMD[@]} \
531      ${NICE_CMD[@]} \
532 +    "${VSPACE_SHARED_CMD[@]}" \
533      "${CHBIND_CMD[@]}" \
534      $_EXEC_ULIMIT "$VSERVER_DIR"/ulimits \
535      $_VTAG       --create "${OPTS_VTAG_CREATE[@]}" --silent -- \
536 @@ -143,7 +144,7 @@
537      $_VCONTEXT   --create "${OPTS_VCONTEXT_CREATE[@]}" -- \
538      ${OPTION_STRACE:+$_STRACE -fF -o /tmp/vserver-start.$$} \
539      ${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \
540 -    $_VSPACE     --set "${OPTS_VSPACE[@]}" -- \
541 +    $_VSPACE     --set "${OPTS_VSPACE[@]}" "${OPTS_VSPACE_SHARED[@]}" -- \
542      $_EXEC_REMOUNT /proc /sys -- \
543      $_VLIMIT     --dir "$VSERVER_DIR"/rlimits --missingok -- \
544      $_VSCHED     --xid self --force "${OPTS_VSCHED[@]}" -- \
545 Index: scripts/vserver.functions
546 ===================================================================
547 --- scripts/vserver.functions   (revision 2883)
548 +++ scripts/vserver.functions   (revision 2902)
549 @@ -49,6 +49,8 @@
550  declare -a OPTS_VTAG_ENTER=()
551  declare -a OPTS_VMEMCTRL=()
552  declare -a OPTS_VSPACE=( --default )
553 +declare -a OPTS_VSPACE_SHARED=()
554 +declare -a VSPACE_SHARED_CMD=()
555  
556  declare -a STOPCMD_PREPARE=()
557  
558 @@ -110,6 +112,12 @@
559  
560      test -n "$_HAVE_INTERFACE_OPTIONS" || _generateInterfaceOptions "$vdir"
561  
562 +    if test -e "$vdir"/noncontext -o
563 +           \( -e "$vdir"/spaces/net -a ! -e "$vdir"/ncontext \); then
564 +       _HAVE_CHBIND_OPTIONS=1
565 +       return 0
566 +    fi
567 +
568      local f="$vdir"/interfaces/bcast
569      getFileValue bcast "$f"
570      f="$vdir"/interfaces/lback
571 @@ -787,17 +795,23 @@
572  {
573      local vdir="$1"
574      local d="$vdir"/spaces
575 +    local shared
576 +    local space
577  
578 -    ( test ! -e "$d"/pid ) || \
579 -       OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --pid )
580 +    for space in pid net; do
581 +       if test -e "$d"/$space; then
582 +           getFileValue shared "$d"/$space || shared=""
583 +           if test -z "$shared"; then
584 +               OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --$space )
585 +           elif test "$shared" = "0"; then
586 +               : # Do nothing
587 +           else
588 +               OPTS_VSPACE_SHARED=( "${OPTS_VSPACE_SHARED[@]}" --$space )
589 +               VSPACE_SHARED_CMD=( "${VSPACE_SHARED_CMD[@]}" $_VSPACE --enter "$shared" --$space -- )
590 +           fi
591 +       fi
592 +    done
593  
594 -    test ! -e "$d"/net || {
595 -       OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --net )
596 -       # network context and namespace don't make much sense
597 -       _HAVE_CHBIND_OPTIONS=1
598 -       CHBIND_CMD=()
599 -    }
600 -
601      local mask
602      getFileValue mask "$d"/mask || \
603        OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --mask "$mask" )
604 Index: lib/syscall_setiattr-fscompat.hc
605 ===================================================================
606 --- lib/syscall_setiattr-fscompat.hc    (revision 2883)
607 +++ lib/syscall_setiattr-fscompat.hc    (revision 2902)
608 @@ -26,6 +26,7 @@
609  #include "ioctl-getxflg.hc"
610  
611  #include <fcntl.h>
612 +#include <sys/stat.h>
613  
614  static inline ALWAYSINLINE int
615  vc_set_iattr_fscompat(char const *filename,
616 Index: lib/syscall_getiattr-fscompat.hc
617 ===================================================================
618 --- lib/syscall_getiattr-fscompat.hc    (revision 2883)
619 +++ lib/syscall_getiattr-fscompat.hc    (revision 2902)
620 @@ -25,6 +25,9 @@
621  #include "ioctl-getxflg.hc"
622  
623  #include <fcntl.h>
624 +#include <unistd.h>
625 +#include <sys/stat.h>
626 +
627  static inline ALWAYSINLINE int
628  vc_get_iattr_fscompat(char const *filename,
629                       xid_t    * /*@null@*/ xid,
630 Index: contrib/make-manifest
631 ===================================================================
632 --- contrib/make-manifest       (revision 2883)
633 +++ contrib/make-manifest       (revision 2902)
634 @@ -21,7 +21,7 @@
635  dest=$2
636  data=$3
637  
638 -for i in $name-{core,devel,base,build,legacy,lib,sysv}.list; do
639 +for i in $name-{core,devel,base,build,legacy,lib,sysv,python}.list; do
640      echo '%defattr(-,root,root,-)' >$i
641  done
642  
643 Index: contrib/manifest.dat.pathsubst
644 ===================================================================
645 --- contrib/manifest.dat.pathsubst      (revision 2883)
646 +++ contrib/manifest.dat.pathsubst      (revision 2902)
647 @@ -159,3 +159,4 @@
648  legacy @CONFIG@ @INITRDDIR@/vservers-legacy
649  legacy @CONFIG_NOREPLACE@ @SYSCONFDIR@/vservers.conf
650  build  @CONFIG_NOREPLACE@ @CONFDIR@/.distributions/*/apt/sources.list
651 +@HAVE_PYTHON_TRUE@python @PYEXECDIR@/*
652 Index: contrib/make-deb-manifest
653 ===================================================================
654 --- contrib/make-deb-manifest   (revision 0)
655 +++ contrib/make-deb-manifest   (revision 2902)
656 @@ -0,0 +1,63 @@
657 +#!/bin/bash
658 +
659 +# Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
660 +#  
661 +# This program is free software; you can redistribute it and/or modify
662 +# it under the terms of the GNU General Public License as published by
663 +# the Free Software Foundation; version 2 of the License.
664 +#  
665 +# This program is distributed in the hope that it will be useful,
666 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
667 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
668 +# GNU General Public License for more details.
669 +#  
670 +# You should have received a copy of the GNU General Public License
671 +# along with this program; if not, write to the Free Software
672 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
673 +
674 +## Usage: make-deb-manifest <basename> <destdir> <datfile>
675 +
676 +name=$2/$1
677 +dest=$2
678 +data=$3
679 +
680 +getname() {
681 +    if test $1 = "lib"; then
682 +       fullname="$dest/libvserver0"
683 +    elif test $1 = "devel"; then
684 +       fullname="$dest/libvserver0-dev"
685 +    elif test $1 = "base"; then
686 +       fullname="$name"
687 +    else
688 +       fullname="$name-$1"
689 +    fi
690 +}
691 +
692 +for i in {core,build,legacy,sysv,lib,devel,base,python}; do
693 +    getname $i
694 +    echo -n >${fullname}.install
695 +    rm -f ${fullname}.conffiles
696 +done
697 +
698 +DESTDIR=debian/tmp
699 +while read style file; do
700 +    test "$file" || continue
701 +    case "$style" in
702 +       (\#*)   continue;;
703 +    esac
704 +    getname $style
705 +    set -o noglob
706 +    set -- $file
707 +    set +o noglob
708 +    if test "$2"; then
709 +       file="$2"
710 +       for i in ${DESTDIR}$file; do
711 +           test "${file#/etc/}" != "$file" && continue
712 +           echo "${i#${DESTDIR}}" >>${fullname}.conffiles
713 +       done
714 +    fi
715 +    for i in ${DESTDIR}$file; do
716 +       i=${i#${DESTDIR}}
717 +        echo "$i ${i%/*}" >>${fullname}.install
718 +    done
719 +done < $data
720
721 Property changes on: contrib/make-deb-manifest
722 ___________________________________________________________________
723 Added: svn:executable
724    + *
725
726 Index: contrib/Makefile-files
727 ===================================================================
728 --- contrib/Makefile-files      (revision 2883)
729 +++ contrib/Makefile-files      (revision 2902)
730 @@ -37,6 +37,7 @@
731                                         contrib/yum-3.2.0-chroot.patch \
732                                         contrib/yum-3.2.1-chroot.patch \
733                                         contrib/yum-3.2.4-chroot.patch \
734 -                                       contrib/make-manifest
735 +                                       contrib/make-manifest \
736 +                                       contrib/make-deb-manifest
737  
738  contrib/manifest.dat:                  contrib/.manifest.dat.pathsubst.stamp
739 Index: lib_internal/matchlist-initrefserverlist.c
740 ===================================================================
741 --- lib_internal/matchlist-initrefserverlist.c  (revision 2883)
742 +++ lib_internal/matchlist-initrefserverlist.c  (revision 2902)
743 @@ -26,6 +26,7 @@
744  #include <dirent.h>
745  #include <string.h>
746  #include <fcntl.h>
747 +#include <sys/stat.h>
748  
749  #define ENSC_WRAPPERS_FCNTL    1
750  #define ENSC_WRAPPERS_UNISTD   1
751 Index: util-vserver.spec.in
752 ===================================================================
753 --- util-vserver.spec.in        (revision 2883)
754 +++ util-vserver.spec.in        (revision 2902)
755 @@ -395,9 +395,10 @@
756  %{!?_without_doc:%doc lib/apidoc/html}
757  
758  
759 -%files python
760 +%if 0%{!?_without_python:1}
761 +%files python -f %name-python.list
762  %defattr(-,root,root,-)
763 -%{!?_without_python:%{python_sitearch}/*}
764 +%endif
765  
766  
767  %changelog
768 Index: Makefile.am
769 ===================================================================
770 --- Makefile.am (revision 2883)
771 +++ Makefile.am (revision 2902)
772 @@ -143,6 +143,9 @@
773                         s!@'ENSC_HAVE_C99_COMPILER_FALSE'@!\@ENSC_HAVE_C99_COMPILER_FALSE@ !g; \
774                         s!@'ENSC_HAVE_CXX_COMPILER_TRUE'@!\@ENSC_HAVE_CXX_COMPILER_TRUE@ !g; \
775                         s!@'ENSC_HAVE_CXX_COMPILER_FALSE'@!\@ENSC_HAVE_CXX_COMPILER_FALSE@ !g; \
776 +                       s!@'HAVE_PYTHON_TRUE'@!\@HAVE_PYTHON_TRUE@ !g; \
777 +                       s!@'HAVE_PYTHON_FALSE'@!\@HAVE_PYTHON_FALSE@ !g; \
778 +                       s!@'PYEXECDIR'@!$(pyexecdir)!g; \
779                         $(ENSC_PATHPROG_SED)
780  
781  pathconfig.h:          .pathconfig.h.pathsubst.stamp
782 @@ -233,6 +236,7 @@
783  if HAVE_PYTHON
784  include $(top_srcdir)/python/Makefile-files
785  endif
786 +include $(top_srcdir)/debian/Makefile-files
787  
788  include $(top_srcdir)/m4/gpgsig.am
789  include $(top_srcdir)/m4/validate.am
790 Index: ensc_vector/testsuite/Makefile-files
791 ===================================================================
792 --- ensc_vector/testsuite/Makefile-files        (revision 2883)
793 +++ ensc_vector/testsuite/Makefile-files        (revision 2902)
794 @@ -21,6 +21,9 @@
795  TESTS +=                       ensc_vector/testsuite/test1 \
796                                 ensc_vector/testsuite/test2
797  
798 +DIETPROGS +=                   ensc_vector/testsuite/test1 \
799 +                               ensc_vector/testsuite/test2
800 +
801  ensc_vector_testsuite_test1_SOURCES =  ensc_vector/testsuite/test1.c
802  ensc_vector_testsuite_test1_LDADD =    $(LIBENSCVECTOR)
803