2c1dc3d5959f9b70caba42c0a8ee3f9fa0b67c1a
[util-vserver.git] / rev2883to2902.patch
1 Index: python/Makefile-files
2 ===================================================================
3 --- python/Makefile-files       (revision 2883)
4 +++ python/Makefile-files       (revision 2902)
5 @@ -1,22 +1,23 @@
6  ## $Id$
7  
8  ## Copyright (C) 2008 Daniel Hokka Zakrisson
9 -## 
10 +##
11  ## This program is free software; you can redistribute it and/or
12  ## modify it under the terms of the GNU General Public License
13  ## as published by the Free Software Foundation; either version 2
14  ## of the License, or (at your option) any later version.
15 -## 
16 +##
17  ## This program is distributed in the hope that it will be useful,
18  ## but WITHOUT ANY WARRANTY; without even the implied warranty of
19  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  ## GNU General Public License for more details.
21 -## 
22 +##
23  ## You should have received a copy of the GNU General Public License
24  ## along with this program; if not, write to the Free Software
25  ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26 -## 
27 +##
28  
29 +AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += python/libvserver.py
30  pyexec_LTLIBRARIES             += python/_libvserver.la
31  pyexec_SCRIPTS                 += python/libvserver.py
32  python__libvserver_la_SOURCES  =  python/_libvserver.c
33 Index: debian/control
34 ===================================================================
35 --- debian/control      (revision 0)
36 +++ debian/control      (revision 2902)
37 @@ -0,0 +1,89 @@
38 +Source: util-vserver
39 +Section: net
40 +Priority: optional
41 +Maintainer: Daniel Hokka Zakrisson <daniel@hozac.com>
42 +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
43 +Standards-Version: 3.8.4
44 +Homepage: http://savannah.nongnu.org/projects/util-vserver/
45 +
46 +Package: util-vserver
47 +Architecture: any
48 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver-core, util-vserver-lib, util-vserver-sysv, diffutils
49 +Description: utilities for managing Linux-VServer guests
50 + util-vserver provides the components and a framework to setup virtual
51 + servers.  A virtual server runs inside a Linux server. It is nevertheless
52 + highly independent. As such, you can run various services with normal
53 + configuration. The various vservers can't interact with each other and
54 + can't interact with services in the main server.
55 +
56 +Package: libvserver0
57 +Section: libs
58 +Architecture: any
59 +Depends: ${shlibs:Depends}, ${misc:Depends}
60 +Description: dynamic libraries for util-vserver
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-core
68 +Architecture: any
69 +Depends: ${shlibs:Depends}, ${misc:Depends}
70 +Description: core utilities of 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-build
78 +Architecture: any
79 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver, wget, binutils
80 +Description: tools which can be used to build vservers
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: util-vserver-sysv
88 +Architecture: any
89 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver, make, diffutils
90 +Description: initscripts for util-vserver
91 + util-vserver provides the components and a framework to setup virtual
92 + servers.  A virtual server runs inside a Linux server. It is nevertheless
93 + highly independent. As such, you can run various services with normal
94 + configuration. The various vservers can't interact with each other and
95 + can't interact with services in the main server.
96 +
97 +Package: util-vserver-legacy
98 +Architecture: any
99 +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, util-vserver
100 +Description: legacy scripts for util-vserver
101 + util-vserver provides the components and a framework to setup virtual
102 + servers.  A virtual server runs inside a Linux server. It is nevertheless
103 + highly independent. As such, you can run various services with normal
104 + configuration. The various vservers can't interact with each other and
105 + can't interact with services in the main server.
106 +
107 +Package: libvserver0-dev
108 +Section: libdevel
109 +Architecture: any
110 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver-lib, pkg-config
111 +Description: headers and libraries needed to develop vserver based applications
112 + util-vserver provides the components and a framework to setup virtual
113 + servers.  A virtual server runs inside a Linux server. It is nevertheless
114 + highly independent. As such, you can run various services with normal
115 + configuration. The various vservers can't interact with each other and
116 + can't interact with services in the main server.
117 +
118 +Package: util-vserver-python
119 +Architecture: any
120 +Depends: ${shlibs:Depends}, ${misc:Depends}, util-vserver-lib, ${python:Depends}, ${python:Versions}
121 +Description: python-bindings for util-vserver
122 + util-vserver provides the components and a framework to setup virtual
123 + servers.  A virtual server runs inside a Linux server. It is nevertheless
124 + highly independent. As such, you can run various services with normal
125 + configuration. The various vservers can't interact with each other and
126 + can't interact with services in the main server.
127
128 Property changes on: debian/control
129 ___________________________________________________________________
130 Name: svn:keywords
131    + Id
132
133 Index: debian/compat
134 ===================================================================
135 --- debian/compat       (revision 0)
136 +++ debian/compat       (revision 2902)
137 @@ -0,0 +1 @@
138 +7
139 Index: debian/util-vserver-build.postinst
140 ===================================================================
141 --- debian/util-vserver-build.postinst  (revision 0)
142 +++ debian/util-vserver-build.postinst  (revision 2902)
143 @@ -0,0 +1,8 @@
144 +#!/bin/sh
145 +
146 +test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
147 +
148 +f="/etc/vservers/.defaults/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
149 +        ln -s /vservers/.hash "$f"/00
150 +
151 +/usr/sbin/setattr --barrier /vservers/.hash || :
152
153 Property changes on: debian/util-vserver-build.postinst
154 ___________________________________________________________________
155 Name: svn:executable
156    + *
157
158 Index: debian/copyright
159 ===================================================================
160 --- debian/copyright    (revision 0)
161 +++ debian/copyright    (revision 2902)
162 @@ -0,0 +1,41 @@
163 +This work was packaged for Debian by:
164 +
165 +    Daniel Hokka Zakrisson <daniel@hozac.com> on Wed, 14 Jul 2010 22:42:52 +0000
166 +
167 +It was downloaded from:
168 +
169 +    http://svn.linux-vserver.org/svn/util-vserver
170 +
171 +Upstream Author(s):
172 +
173 +    Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
174 +    Daniel Hokka Zakrisson <daniel@hozac.com>
175 +
176 +Copyright:
177 +
178 +    Copyright (C) 2002-2010 Enrico Scholz
179 +    Copyright (C) 2006-2010 Daniel Hokka Zakrisson
180 +
181 +License:
182 +
183 +    This program is free software; you can redistribute it and/or modify it
184 +    under the terms of the GNU General Public License as published by the Free
185 +    Software Foundation; version 2.
186 +
187 +    This program is distributed in the hope that it will be useful, but
188 +    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
189 +    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
190 +    for more details.
191 +
192 +    You should have received a copy of the GNU General Public License with
193 +    your Debian GNU system, in /usr/share/common-licenses/GPL-2, or with the
194 +    Debian GNU source package as the file GNUGPL.TXT.  If not, write to the
195 +    Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
196 +    MA 02110-1301, USA.
197 +
198 +The Debian packaging is:
199 +
200 +    Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
201 +
202 +and is licensed under the GPL version 2,
203 +see "/usr/share/common-licenses/GPL-2".
204 Index: debian/docs
205 ===================================================================
206 --- debian/docs (revision 0)
207 +++ debian/docs (revision 2902)
208 @@ -0,0 +1,2 @@
209 +NEWS
210 +README
211 Index: debian/util-vserver.postinst
212 ===================================================================
213 --- debian/util-vserver.postinst        (revision 0)
214 +++ debian/util-vserver.postinst        (revision 2902)
215 @@ -0,0 +1,10 @@
216 +#!/bin/sh
217 +
218 +test -d /vservers      || mkdir -m0000 /vservers
219 +test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
220 +
221 +f="/etc/vservers/.defaults/vdirbase";  test -L "$f" -o -e "$f" || ln -s /vservers             "$f"
222 +f="/etc/vservers/.defaults/run.rev";   test -L "$f" -o -e "$f" || ln -s /var/run/vservers.rev "$f"
223 +f="/etc/vservers/.defaults/cachebase"; test -L "$f" -o -e "$f" || ln -s /var/cache/vservers   "$f"
224 +
225 +/usr/sbin/setattr --barrier /vservers /vservers/.pkg || :
226
227 Property changes on: debian/util-vserver.postinst
228 ___________________________________________________________________
229 Name: svn:executable
230    + *
231
232 Index: debian/rules
233 ===================================================================
234 --- debian/rules        (revision 0)
235 +++ debian/rules        (revision 2902)
236 @@ -0,0 +1,31 @@
237 +#!/usr/bin/make -f
238 +# -*- makefile -*-
239 +# Sample debian/rules that uses debhelper.
240 +#
241 +# This file was originally written by Joey Hess and Craig Small.
242 +# As a special exception, when this file is copied by dh-make into a
243 +# dh-make output file, you may use that output file without restriction.
244 +# This special exception was added by Craig Small in version 0.37 of dh-make.
245 +#
246 +# Modified to make a template file for a multi-binary package with separated
247 +# build-arch and build-indep targets  by Bill Allombert 2001
248 +
249 +# Uncomment this to turn on verbose mode.
250 +#export DH_VERBOSE=1
251 +
252 +# This has to be exported to make some magic below work.
253 +export DH_OPTIONS
254 +
255 +
256 +%:
257 +       dh $@
258 +
259 +override_dh_auto_configure:
260 +       dh_auto_configure -- --with-initrddir=/etc/init.d --enable-release \
261 +               --enable-apis=NOLEGACY --with-initscripts=sysv
262 +
263 +override_dh_auto_test:
264 +
265 +override_dh_auto_install:
266 +       dh_auto_install
267 +       contrib/make-deb-manifest util-vserver debian contrib/manifest.dat files
268
269 Property changes on: debian/rules
270 ___________________________________________________________________
271 Name: svn:keywords
272    + Id
273 Name: svn:executable
274    + *
275
276 Index: debian/util-vserver.postrm
277 ===================================================================
278 --- debian/util-vserver.postrm  (revision 0)
279 +++ debian/util-vserver.postrm  (revision 2902)
280 @@ -0,0 +1,5 @@
281 +#!/bin/sh
282 +
283 +if test "$1" = purge; then
284 +    rm -rf /var/cache/vservers/* 2>/dev/null || :
285 +fi
286
287 Property changes on: debian/util-vserver.postrm
288 ___________________________________________________________________
289 Name: svn:executable
290    + *
291
292 Index: debian/util-vserver-legacy.postinst
293 ===================================================================
294 --- debian/util-vserver-legacy.postinst (revision 0)
295 +++ debian/util-vserver-legacy.postinst (revision 2902)
296 @@ -0,0 +1,9 @@
297 +#!/bin/sh
298 +
299 +if test "$1" = configure; then
300 +    update-rc.d rebootmgr start 98 2 3 4 5 stop 02 0 1 6 .
301 +    update-rc.d vservers-legacy start 98 2 3 4 5 stop 02 0 1 6 .
302 +    for i in httpd named portmap sendmail smb sshd xinetd gated; do
303 +       update-rc.d v_$i start 98 2 3 4 5 stop 02 0 1 6 .
304 +    done
305 +fi
306
307 Property changes on: debian/util-vserver-legacy.postinst
308 ___________________________________________________________________
309 Name: svn:executable
310    + *
311
312 Index: debian/util-vserver-sysv.postinst
313 ===================================================================
314 --- debian/util-vserver-sysv.postinst   (revision 0)
315 +++ debian/util-vserver-sysv.postinst   (revision 2902)
316 @@ -0,0 +1,7 @@
317 +#!/bin/sh
318 +
319 +if test "$1" = configure; then
320 +    update-rc.d vservers-default start 98 2 3 4 5 stop 02 0 1 6 .
321 +    update-rc.d vprocunhide start 26 2 3 4 5 stop 74 0 1 6 .
322 +    update-rc.d util-vserver start 10 2 3 4 5 stop 90 0 1 6 .
323 +fi
324
325 Property changes on: debian/util-vserver-sysv.postinst
326 ___________________________________________________________________
327 Name: svn:executable
328    + *
329
330 Index: debian/changelog.in
331 ===================================================================
332 --- debian/changelog.in (revision 0)
333 +++ debian/changelog.in (revision 2902)
334 @@ -0,0 +1,5 @@
335 +util-vserver (@PACKAGE_VERSION@-1) unstable; urgency=low
336 +
337 +  * Initial release
338 +
339 + -- Daniel Hokka Zakrisson <daniel@hozac.com>  @DATE@
340 Index: debian/util-vserver-sysv.postrm
341 ===================================================================
342 --- debian/util-vserver-sysv.postrm     (revision 0)
343 +++ debian/util-vserver-sysv.postrm     (revision 2902)
344 @@ -0,0 +1,5 @@
345 +#!/bin/sh
346 +
347 +if test "$1" = upgrade; then
348 +    /etc/init.d/vprocunhide condrestart > /dev/null 2>&1
349 +fi
350
351 Property changes on: debian/util-vserver-sysv.postrm
352 ___________________________________________________________________
353 Name: svn:executable
354    + *
355
356 Index: debian/Makefile-files
357 ===================================================================
358 --- debian/Makefile-files       (revision 0)
359 +++ debian/Makefile-files       (revision 2902)
360 @@ -0,0 +1,33 @@
361 +## $Id$  -*- makefile -*-
362 +
363 +## Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
364 +##  
365 +## This program is free software; you can redistribute it and/or modify
366 +## it under the terms of the GNU General Public License as published by
367 +## the Free Software Foundation; either version 2, or (at your option)
368 +## any later version.
369 +##  
370 +## This program is distributed in the hope that it will be useful,
371 +## but WITHOUT ANY WARRANTY; without even the implied warranty of
372 +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
373 +## GNU General Public License for more details.
374 +##  
375 +## You should have received a copy of the GNU General Public License
376 +## along with this program; if not, write to the Free Software
377 +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
378 +##  
379 +
380 +
381 +EXTRA_DIST +=  debian/rules \
382 +               debian/control \
383 +               debian/compat \
384 +               debian/copyright \
385 +               debian/docs \
386 +               debian/changelog.in \
387 +               debian/changelog
388 +
389 +#CLEANFILES += debian/changelog
390 +
391 +DEB_CL_DATE = $(shell date '+%a, %d %b %Y %H:%M:%S %z')
392 +debian/changelog: debian/changelog.in
393 +       $(SED) "s/@"PACKAGE_VERSION"@/$(PACKAGE_VERSION)/g;s/@"DATE"@/$(DEB_CL_DATE)/g" $< > $@
394
395 Property changes on: debian/Makefile-files
396 ___________________________________________________________________
397 Name: svn:keywords
398    + Id
399
400 Index: debian/util-vserver-legacy.prerm
401 ===================================================================
402 --- debian/util-vserver-legacy.prerm    (revision 0)
403 +++ debian/util-vserver-legacy.prerm    (revision 2902)
404 @@ -0,0 +1,10 @@
405 +#!/bin/sh
406 +
407 +if test "$1" = remove; then
408 +    /etc/init.d/rebootmgr stop > /dev/null 2>&1
409 +    update-rc.d rebootmgr remove
410 +    update-rc.d vservers-legacy remove
411 +    for i in httpd named portmap sendmail smb sshd xinetd gated; do
412 +       update-rc.d v_$i remove
413 +    done
414 +fi
415
416 Property changes on: debian/util-vserver-legacy.prerm
417 ___________________________________________________________________
418 Name: svn:executable
419    + *
420
421 Index: debian/util-vserver-sysv.prerm
422 ===================================================================
423 --- debian/util-vserver-sysv.prerm      (revision 0)
424 +++ debian/util-vserver-sysv.prerm      (revision 2902)
425 @@ -0,0 +1,8 @@
426 +#!/bin/sh
427 +
428 +if test "$1" = remove; then
429 +    /etc/init.d/vprocunhide stop > /dev/null 2>&1
430 +    update-rc.d vprocunhide remove
431 +    update-rc.d util-vserver remove
432 +    update-rc.d vservers-default remove
433 +fi
434
435 Property changes on: debian/util-vserver-sysv.prerm
436 ___________________________________________________________________
437 Name: svn:executable
438    + *
439
440 Index: src/testsuite/hashcalc-plain.c
441 ===================================================================
442 --- src/testsuite/hashcalc-plain.c      (revision 2883)
443 +++ src/testsuite/hashcalc-plain.c      (revision 2902)
444 @@ -1,16 +1,16 @@
445  // $Id$    --*- c -*--
446  
447  // Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
448 -//  
449 +//
450  // This program is free software; you can redistribute it and/or modify
451  // it under the terms of the GNU General Public License as published by
452  // the Free Software Foundation; version 2 of the License.
453 -//  
454 +//
455  // This program is distributed in the hope that it will be useful,
456  // but WITHOUT ANY WARRANTY; without even the implied warranty of
457  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
458  // GNU General Public License for more details.
459 -//  
460 +//
461  // You should have received a copy of the GNU General Public License
462  // along with this program; if not, write to the Free Software
463  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
464 @@ -24,6 +24,7 @@
465  #include <stdbool.h>
466  #include <unistd.h>
467  #include <fcntl.h>
468 +#include <sys/stat.h>
469  #include <sys/mman.h>
470  
471  #define ENSC_TESTSUITE
472 @@ -36,19 +37,19 @@
473  {
474    static char const            HEX_DIGIT[] = "0123456789abcdef";
475    size_t                       d_size   = ensc_crypto_hashctx_get_digestsize(h_ctx);
476 -    
477 +
478    unsigned char                        digest[d_size];
479    size_t                       out = 0;
480  
481    if (ensc_crypto_hashctx_get_digest(h_ctx, digest, NULL, d_size)==-1)
482      return false;
483 -  
484 +
485    for (size_t in=0; in<d_size; ++in) {
486      res[out++]  = HEX_DIGIT[digest[in] >>    4];
487      res[out++]  = HEX_DIGIT[digest[in] &  0x0f];
488    }
489    res[out++] = '\0';
490 -  
491 +
492    return true;
493  }
494  
495 @@ -81,13 +82,13 @@
496      assert(ensc_crypto_hashctx_update(&hash_context, buf, buf_size)!=-1);
497      munmap((void *)(buf), buf_size);
498    }
499 -    
500 +
501    assert(convertDigest(digest, &hash_context));
502 -  
503 +
504    Vwrite(1, digest, strlen(digest));
505    Vwrite(1, "\n", 1);
506 -  
507 +
508    ensc_crypto_hashctx_free(&hash_context);
509 -  
510 +
511    return 0;
512  }
513 Index: src/testsuite/Makefile-files
514 ===================================================================
515 --- src/testsuite/Makefile-files        (revision 2883)
516 +++ src/testsuite/Makefile-files        (revision 2902)
517 @@ -1,16 +1,16 @@
518  ## $Id$                --*- makefile -*--
519  
520  ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
521 -##  
522 +##
523  ## This program is free software; you can redistribute it and/or modify
524  ## it under the terms of the GNU General Public License as published by
525  ## the Free Software Foundation; version 2 of the License.
526 -##  
527 +##
528  ## This program is distributed in the hope that it will be useful,
529  ## but WITHOUT ANY WARRANTY; without even the implied warranty of
530  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
531  ## GNU General Public License for more details.
532 -##  
533 +##
534  ## You should have received a copy of the GNU General Public License
535  ## along with this program; if not, write to the Free Software
536  ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
537 @@ -57,19 +57,22 @@
538                                         src/testsuite/hashcalc-plain.sh \
539                                         src/testsuite/vwait-test.sh
540  
541 +DIETPROGS +=                           src/testsuite/vunify-functest \
542 +                                       src/testsuite/chcontext-test \
543 +                                       src/testsuite/chbind-test \
544 +                                       src/testsuite/rpm-fake-test
545 +
546  src_testsuite_rpm_fake_test_SOURCES =  src/testsuite/rpm-fake-test.c
547  
548  src_testsuite_vunify_functest_SOURCES =        src/testsuite/vunify-functest.c
549  src_testsuite_vunify_functest_LDADD =  $(LIBINTERNAL)
550  src_testsuite_vunify_functest_CPPFLAGS=        $(AM_CPPFLAGS) $(src_testsuite_CPPFLAGS)
551  
552 -
553  src_testsuite_chcontext_test_SOURCES = src/testsuite/chcontext-test.c
554 -src_testsuite_chcontext_test_LDADD =   lib/libvserver.la $(LIBINTERNAL)
555 +src_testsuite_chcontext_test_LDADD =   $(VSERVER_LDADDS) $(LIBINTERNAL)
556  
557 -
558  src_testsuite_chbind_test_SOURCES =    src/testsuite/chbind-test.c
559 -src_testsuite_chbind_test_LDADD =      lib/libvserver.la
560 +src_testsuite_chbind_test_LDADD =      $(LIBVSERVER)
561  
562  src_testsuite_hashcalc_SOURCES =       src/testsuite/hashcalc.c
563  src_testsuite_hashcalc_plain_SOURCES = src/testsuite/hashcalc-plain.c
564 @@ -77,6 +80,9 @@
565  src_testsuite_hashcalc_plain_CFLAGS =  $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
566  
567  if ENSC_CAN_CRYPTO_WITH_DIETLIBC
568 +DIETPROGS +=                           src/testsuite/hashcalc          \
569 +                                       src/testsuite/hashcalc-plain
570 +
571  src_testsuite_hashcalc_LDADD =         $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
572  src_testsuite_hashcalc_LDFLAGS =       $(VSERVER_LDFLGS)
573  
574 Index: src/vcontext.c
575 ===================================================================
576 --- src/vcontext.c      (revision 2883)
577 +++ src/vcontext.c      (revision 2902)
578 @@ -1,16 +1,16 @@
579  // $Id$    --*- c -*--
580  
581  // Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
582 -//  
583 +//
584  // This program is free software; you can redistribute it and/or modify
585  // it under the terms of the GNU General Public License as published by
586  // the Free Software Foundation; version 2 of the License.
587 -//  
588 +//
589  // This program is distributed in the hope that it will be useful,
590  // but WITHOUT ANY WARRANTY; without even the implied warranty of
591  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
592  // GNU General Public License for more details.
593 -//  
594 +//
595  // You should have received a copy of the GNU General Public License
596  // along with this program; if not, write to the Free Software
597  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
598 @@ -21,6 +21,7 @@
599  #endif
600  
601  #include "util.h"
602 +#include "compat-pivot_root.h"
603  #include "lib/internal.h"
604  #include "lib_internal/jail.h"
605  #include "lib_internal/sys_personality.h"
606 @@ -99,9 +100,9 @@
607    { "personality-flags", required_argument, 0, CMD_PERSFLAG },
608    { "vlogin",       no_argument,        0, CMD_VLOGIN },
609    { "pivot-root",   no_argument,        0, CMD_PIVOT_ROOT },
610 -#if 1  
611 +#if 1
612    { "fakeinit",     no_argument,               0, CMD_INITPID },       // compatibility
613 -#endif  
614 +#endif
615    { 0,0,0,0 },
616  };
617  
618 @@ -205,7 +206,7 @@
619  {
620    int                  fd;
621    struct sockaddr_un   addr;
622 -  
623 +
624    if (filename==0) return -1;
625  
626    ENSC_INIT_UNIX_SOCK(addr, filename);
627 @@ -237,7 +238,7 @@
628  doExternalSync(int fd, char const *msg)
629  {
630    char         c;
631 -  
632 +
633    if (fd==-1) return;
634  
635    if (msg) EsendAll(fd, msg, strlen(msg));
636 @@ -256,13 +257,13 @@
637  {
638    int                  p[2][2];
639    pid_t                        pid = initSync(p, args->do_disconnect);
640 -  
641 +
642    if (pid==0) {
643      xid_t                      xid;
644      int                                ext_sync_fd = connectExternalSync(args->sync_sock);
645  
646 -    doSyncStage0(p, args->do_disconnect);  
647 -    
648 +    doSyncStage0(p, args->do_disconnect);
649 +
650      if (args->do_create) {
651        xid = vc_ctx_create(args->xid, NULL);
652        if (xid==VC_NOCTX) {
653 @@ -378,7 +379,7 @@
654    }
655  
656    assert(args->do_disconnect);
657 -    
658 +
659    waitOnSync(pid, p, args->xid!=VC_DYNAMIC_XID && args->do_migrate);
660    return EXIT_SUCCESS;
661  }
662 @@ -430,11 +431,11 @@
663      .personality_flags = 0,
664      .sync_msg          = "ok",
665    };
666 -  
667 +
668    while (1) {
669      int                c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
670      if (c==-1) break;
671 -    
672 +
673      switch (c) {
674        case CMD_HELP            :  showHelp(1, argv[0], 0);
675        case CMD_VERSION         :  showVersion();
676 @@ -474,10 +475,10 @@
677    }
678  
679    signal(SIGCHLD, SIG_DFL);
680 -  
681 +
682    if (args.do_migrateself)
683      args.xid = Evc_get_task_xid(0);
684 -  
685 +
686    if (!args.do_create && !args.do_migrate)
687      WRITE_MSG(2, "Neither '--create' nor '--migrate' specified; try '--help' for more information\n");
688    else if (args.do_create  &&  args.do_migrate)
689 Index: src/vserver-stat.c
690 ===================================================================
691 --- src/vserver-stat.c  (revision 2883)
692 +++ src/vserver-stat.c  (revision 2902)
693 @@ -116,7 +116,7 @@
694    WRITE_STR(1, cmd);
695    WRITE_MSG(1,
696             "\n"
697 -           "Show informations about all the active context.\n\n"
698 +           "Show information about all active contexts.\n\n"
699             "   CTX#            Context number\n"
700             "                   #0 = root context\n"
701             "                   #1 = monitoring context\n"
702 Index: scripts/vserver.suexec
703 ===================================================================
704 --- scripts/vserver.suexec      (revision 2883)
705 +++ scripts/vserver.suexec      (revision 2902)
706 @@ -40,7 +40,7 @@
707         "${CHBIND_CMD[@]}" \
708         $_EXEC_ULIMIT "$VSERVER_DIR/ulimits" \
709         ${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \
710 -       $_VSPACE --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
711 +       $_VSPACE --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" "${OPTS_VSPACE_SHARED[@]}" -- \
712         $_VTAG --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
713         $_VCONTEXT $SILENT_OPT --migrate $OPT_VCONTEXT_CHROOT \
714           --xid "$S_CONTEXT" --uid "$user" "${OPTS_VCONTEXT_ENTER[@]}" -- \
715 Index: scripts/vserver.stop
716 ===================================================================
717 --- scripts/vserver.stop        (revision 2883)
718 +++ scripts/vserver.stop        (revision 2902)
719 @@ -83,7 +83,7 @@
720      "${IONICE_CMD[@]}" \
721      "${NICE_CMD[@]}" \
722      "${CHBIND_CMD[@]}" \
723 -    "$_VSPACE" --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
724 +    "$_VSPACE" --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" "${OPTS_VSPACE_SHARED[@]}" -- \
725      "$_VTAG" --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
726      $_VCONTEXT $SILENT_OPT --migrate $OPT_VCONTEXT_CHROOT --xid "$S_CONTEXT" -- \
727      "${INITCMD_STOP[@]}" || fail=1
728 Index: scripts/vserver.start
729 ===================================================================
730 --- scripts/vserver.start       (revision 2883)
731 +++ scripts/vserver.start       (revision 2902)
732 @@ -136,6 +136,7 @@
733  if $_VSERVER_INFO - FEATURE migrate; then
734      ${IONICE_CMD[@]} \
735      ${NICE_CMD[@]} \
736 +    "${VSPACE_SHARED_CMD[@]}" \
737      "${CHBIND_CMD[@]}" \
738      $_EXEC_ULIMIT "$VSERVER_DIR"/ulimits \
739      $_VTAG       --create "${OPTS_VTAG_CREATE[@]}" --silent -- \
740 @@ -143,7 +144,7 @@
741      $_VCONTEXT   --create "${OPTS_VCONTEXT_CREATE[@]}" -- \
742      ${OPTION_STRACE:+$_STRACE -fF -o /tmp/vserver-start.$$} \
743      ${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \
744 -    $_VSPACE     --set "${OPTS_VSPACE[@]}" -- \
745 +    $_VSPACE     --set "${OPTS_VSPACE[@]}" "${OPTS_VSPACE_SHARED[@]}" -- \
746      $_EXEC_REMOUNT /proc /sys -- \
747      $_VLIMIT     --dir "$VSERVER_DIR"/rlimits --missingok -- \
748      $_VSCHED     --xid self --force "${OPTS_VSCHED[@]}" -- \
749 Index: scripts/vserver.functions
750 ===================================================================
751 --- scripts/vserver.functions   (revision 2883)
752 +++ scripts/vserver.functions   (revision 2902)
753 @@ -49,6 +49,8 @@
754  declare -a OPTS_VTAG_ENTER=()
755  declare -a OPTS_VMEMCTRL=()
756  declare -a OPTS_VSPACE=( --default )
757 +declare -a OPTS_VSPACE_SHARED=()
758 +declare -a VSPACE_SHARED_CMD=()
759  
760  declare -a STOPCMD_PREPARE=()
761  
762 @@ -110,6 +112,12 @@
763  
764      test -n "$_HAVE_INTERFACE_OPTIONS" || _generateInterfaceOptions "$vdir"
765  
766 +    if test -e "$vdir"/noncontext -o
767 +           \( -e "$vdir"/spaces/net -a ! -e "$vdir"/ncontext \); then
768 +       _HAVE_CHBIND_OPTIONS=1
769 +       return 0
770 +    fi
771 +
772      local f="$vdir"/interfaces/bcast
773      getFileValue bcast "$f"
774      f="$vdir"/interfaces/lback
775 @@ -787,17 +795,23 @@
776  {
777      local vdir="$1"
778      local d="$vdir"/spaces
779 +    local shared
780 +    local space
781  
782 -    ( test ! -e "$d"/pid ) || \
783 -       OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --pid )
784 +    for space in pid net; do
785 +       if test -e "$d"/$space; then
786 +           getFileValue shared "$d"/$space || shared=""
787 +           if test -z "$shared"; then
788 +               OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --$space )
789 +           elif test "$shared" = "0"; then
790 +               : # Do nothing
791 +           else
792 +               OPTS_VSPACE_SHARED=( "${OPTS_VSPACE_SHARED[@]}" --$space )
793 +               VSPACE_SHARED_CMD=( "${VSPACE_SHARED_CMD[@]}" $_VSPACE --enter "$shared" --$space -- )
794 +           fi
795 +       fi
796 +    done
797  
798 -    test ! -e "$d"/net || {
799 -       OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --net )
800 -       # network context and namespace don't make much sense
801 -       _HAVE_CHBIND_OPTIONS=1
802 -       CHBIND_CMD=()
803 -    }
804 -
805      local mask
806      getFileValue mask "$d"/mask || \
807        OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --mask "$mask" )
808 Index: configure.ac
809 ===================================================================
810 --- configure.ac        (revision 2883)
811 +++ configure.ac        (revision 2902)
812 @@ -1,27 +1,27 @@
813  dnl $Id$
814  
815  dnl Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
816 -dnl  
817 +dnl
818  dnl This program is free software; you can redistribute it and/or modify
819  dnl it under the terms of the GNU General Public License as published by
820  dnl the Free Software Foundation; either version 2, or (at your option)
821  dnl any later version.
822 -dnl  
823 +dnl
824  dnl This program is distributed in the hope that it will be useful,
825  dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
826  dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
827  dnl GNU General Public License for more details.
828 -dnl  
829 +dnl
830  dnl You should have received a copy of the GNU General Public License
831  dnl along with this program; if not, write to the Free Software
832  dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
833 -dnl  
834 -dnl  
835 +dnl
836 +dnl
837  dnl As a special exception to the GNU General Public License, if you
838  dnl distribute this file as part of a program that contains a configuration
839  dnl script generated by Autoconf, you may include it under the same
840  dnl distribution terms that you use for the rest of that program.
841 -dnl  
842 +dnl
843  
844  AC_PREREQ(2.57)
845  AC_INIT(util-vserver, 0.30.215, vserver@list.linux-vserver.org)
846 @@ -78,7 +78,7 @@
847  
848  if test x"$prefix" = x/; then
849         prefix=
850 -fi     
851 +fi
852  
853  ENSC_CHECK_CC_FLAG([-std=c99 -Wall -pedantic -W])
854  ENSC_CHECK_CXX_FLAG([-ansi   -Wall -pedantic -W -fmessage-length=0])
855 @@ -206,8 +206,8 @@
856                [AC_HELP_STRING([--disable-internal-headers],
857                                [use vserver specific headers from the kernel instead of the shipped versions (default: no)])],
858                [case "$enableval" in
859 -                 (yes|no) ;;
860 -                 (*)      AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);;
861 +                 (yes|no) ;;
862 +                 (*)      AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);;
863                esac],
864                [enable_internal_headers=yes])
865  
866 @@ -258,14 +258,14 @@
867                                 enable_api_oldproc=${enable_api_oldproc:-1}
868                                 enable_api_olduts=${enable_api_olduts:-1}
869                                 ;;
870 -               (v11)           AC_DEFINE(VC_ENABLE_API_V11,      1)
871 +               (v11)           AC_DEFINE(VC_ENABLE_API_V11,      1)
872                                 enable_api_oldproc=${enable_api_oldproc:-1}
873                                 enable_api_olduts=${enable_api_olduts:-1}
874                                 ;;
875                 (fscompat)      AC_DEFINE(VC_ENABLE_API_FSCOMPAT, 1);;
876                 (v13obs)        AC_DEFINE(VC_ENABLE_API_V13OBS,   1)
877                                 AC_DEFINE(VC_ENABLE_API_V13,      1);;
878 -               (v13)           AC_DEFINE(VC_ENABLE_API_V13,      1);;
879 +               (v13)           AC_DEFINE(VC_ENABLE_API_V13,      1);;
880                 (net)           AC_DEFINE(VC_ENABLE_API_NET,      1);;
881                 (v21)           AC_DEFINE(VC_ENABLE_API_V21,      1);;
882                 (v22)           AC_DEFINE(VC_ENABLE_API_V22,      1);;
883 @@ -340,7 +340,7 @@
884                 AC_CHECK_HEADER([beecrypt/beecrypt.h], [ : ],
885                                 [ ensc_have_beecrypt=no ])
886         fi
887 -                       
888 +
889         if test x"$ensc_have_beecrypt" = xyes; then
890                 AC_CHECK_LIB(beecrypt, hashFunctionContextInit, [ : ],
891                              [ ensc_have_beecrypt=no ])
892 @@ -532,7 +532,7 @@
893                 crypto api: $ensc_crypto_api
894            python bindings: $ensc_have_python
895     use library versioning: $ensc_have_versioning
896 -   
897 +
898  Paths:
899                     prefix: $prefix
900          sysconf-Directory: $sysconfdir
901 Index: lib/syscall_setiattr-fscompat.hc
902 ===================================================================
903 --- lib/syscall_setiattr-fscompat.hc    (revision 2883)
904 +++ lib/syscall_setiattr-fscompat.hc    (revision 2902)
905 @@ -1,16 +1,16 @@
906  // $Id$    --*- c -*--
907  
908  // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
909 -//  
910 +//
911  // This program is free software; you can redistribute it and/or modify
912  // it under the terms of the GNU General Public License as published by
913  // the Free Software Foundation; version 2 of the License.
914 -//  
915 +//
916  // This program is distributed in the hope that it will be useful,
917  // but WITHOUT ANY WARRANTY; without even the implied warranty of
918  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
919  // GNU General Public License for more details.
920 -//  
921 +//
922  // You should have received a copy of the GNU General Public License
923  // along with this program; if not, write to the Free Software
924  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
925 @@ -26,6 +26,7 @@
926  #include "ioctl-getxflg.hc"
927  
928  #include <fcntl.h>
929 +#include <sys/stat.h>
930  
931  static inline ALWAYSINLINE int
932  vc_set_iattr_fscompat(char const *filename,
933 @@ -38,7 +39,7 @@
934  
935    fd = open(filename, O_RDONLY|O_NONBLOCK);
936    if (fd==-1) return -1;
937 -    
938 +
939    stat_rc = fstat(fd, &st);
940    if (stat_rc==-1) goto err;
941  
942 @@ -60,7 +61,7 @@
943        if (vc_X_set_ext2flags(fd, 0, VC_IMMUTABLE_LINK_FL)==-1 ||
944           fchmod(fd, 0500))
945         goto err;
946 -    }      
947 +    }
948    }
949  
950    if ( (mask&VC_IATTR_XID) &&
951 Index: lib/syscall_getiattr-fscompat.hc
952 ===================================================================
953 --- lib/syscall_getiattr-fscompat.hc    (revision 2883)
954 +++ lib/syscall_getiattr-fscompat.hc    (revision 2902)
955 @@ -1,16 +1,16 @@
956  // $Id$    --*- c -*--
957  
958  // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
959 -//  
960 +//
961  // This program is free software; you can redistribute it and/or modify
962  // it under the terms of the GNU General Public License as published by
963  // the Free Software Foundation; version 2 of the License.
964 -//  
965 +//
966  // This program is distributed in the hope that it will be useful,
967  // but WITHOUT ANY WARRANTY; without even the implied warranty of
968  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
969  // GNU General Public License for more details.
970 -//  
971 +//
972  // You should have received a copy of the GNU General Public License
973  // along with this program; if not, write to the Free Software
974  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
975 @@ -25,6 +25,9 @@
976  #include "ioctl-getxflg.hc"
977  
978  #include <fcntl.h>
979 +#include <unistd.h>
980 +#include <sys/stat.h>
981 +
982  static inline ALWAYSINLINE int
983  vc_get_iattr_fscompat(char const *filename,
984                       xid_t    * /*@null@*/ xid,
985 @@ -65,7 +68,7 @@
986  
987    if ( (old_mask&VC_IATTR_BARRIER) && S_ISDIR(st.st_mode)) {
988      long               ext2_flags;
989 -    
990 +
991      *mask  |= VC_IATTR_BARRIER;
992      if ((st.st_mode&0777)==0 &&
993         vc_X_get_ext2flags(fd, &ext2_flags)!=-1 &&
994 @@ -91,5 +94,5 @@
995      close(fd);
996      errno = old_errno;
997      return -1;
998 -  } 
999 +  }
1000  }
1001 Index: contrib/make-manifest
1002 ===================================================================
1003 --- contrib/make-manifest       (revision 2883)
1004 +++ contrib/make-manifest       (revision 2902)
1005 @@ -21,7 +21,7 @@
1006  dest=$2
1007  data=$3
1008  
1009 -for i in $name-{core,devel,base,build,legacy,lib,sysv}.list; do
1010 +for i in $name-{core,devel,base,build,legacy,lib,sysv,python}.list; do
1011      echo '%defattr(-,root,root,-)' >$i
1012  done
1013  
1014 Index: contrib/manifest.dat.pathsubst
1015 ===================================================================
1016 --- contrib/manifest.dat.pathsubst      (revision 2883)
1017 +++ contrib/manifest.dat.pathsubst      (revision 2902)
1018 @@ -159,3 +159,4 @@
1019  legacy @CONFIG@ @INITRDDIR@/vservers-legacy
1020  legacy @CONFIG_NOREPLACE@ @SYSCONFDIR@/vservers.conf
1021  build  @CONFIG_NOREPLACE@ @CONFDIR@/.distributions/*/apt/sources.list
1022 +@HAVE_PYTHON_TRUE@python @PYEXECDIR@/*
1023 Index: contrib/make-deb-manifest
1024 ===================================================================
1025 --- contrib/make-deb-manifest   (revision 0)
1026 +++ contrib/make-deb-manifest   (revision 2902)
1027 @@ -0,0 +1,63 @@
1028 +#!/bin/bash
1029 +
1030 +# Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
1031 +#  
1032 +# This program is free software; you can redistribute it and/or modify
1033 +# it under the terms of the GNU General Public License as published by
1034 +# the Free Software Foundation; version 2 of the License.
1035 +#  
1036 +# This program is distributed in the hope that it will be useful,
1037 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1038 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1039 +# GNU General Public License for more details.
1040 +#  
1041 +# You should have received a copy of the GNU General Public License
1042 +# along with this program; if not, write to the Free Software
1043 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1044 +
1045 +## Usage: make-deb-manifest <basename> <destdir> <datfile>
1046 +
1047 +name=$2/$1
1048 +dest=$2
1049 +data=$3
1050 +
1051 +getname() {
1052 +    if test $1 = "lib"; then
1053 +       fullname="$dest/libvserver0"
1054 +    elif test $1 = "devel"; then
1055 +       fullname="$dest/libvserver0-dev"
1056 +    elif test $1 = "base"; then
1057 +       fullname="$name"
1058 +    else
1059 +       fullname="$name-$1"
1060 +    fi
1061 +}
1062 +
1063 +for i in {core,build,legacy,sysv,lib,devel,base,python}; do
1064 +    getname $i
1065 +    echo -n >${fullname}.install
1066 +    rm -f ${fullname}.conffiles
1067 +done
1068 +
1069 +DESTDIR=debian/tmp
1070 +while read style file; do
1071 +    test "$file" || continue
1072 +    case "$style" in
1073 +       (\#*)   continue;;
1074 +    esac
1075 +    getname $style
1076 +    set -o noglob
1077 +    set -- $file
1078 +    set +o noglob
1079 +    if test "$2"; then
1080 +       file="$2"
1081 +       for i in ${DESTDIR}$file; do
1082 +           test "${file#/etc/}" != "$file" && continue
1083 +           echo "${i#${DESTDIR}}" >>${fullname}.conffiles
1084 +       done
1085 +    fi
1086 +    for i in ${DESTDIR}$file; do
1087 +       i=${i#${DESTDIR}}
1088 +        echo "$i ${i%/*}" >>${fullname}.install
1089 +    done
1090 +done < $data
1091
1092 Property changes on: contrib/make-deb-manifest
1093 ___________________________________________________________________
1094 Name: svn:executable
1095    + *
1096
1097 Index: contrib/Makefile-files
1098 ===================================================================
1099 --- contrib/Makefile-files      (revision 2883)
1100 +++ contrib/Makefile-files      (revision 2902)
1101 @@ -37,6 +37,7 @@
1102                                         contrib/yum-3.2.0-chroot.patch \
1103                                         contrib/yum-3.2.1-chroot.patch \
1104                                         contrib/yum-3.2.4-chroot.patch \
1105 -                                       contrib/make-manifest
1106 +                                       contrib/make-manifest \
1107 +                                       contrib/make-deb-manifest
1108  
1109  contrib/manifest.dat:                  contrib/.manifest.dat.pathsubst.stamp
1110 Index: lib_internal/matchlist-initrefserverlist.c
1111 ===================================================================
1112 --- lib_internal/matchlist-initrefserverlist.c  (revision 2883)
1113 +++ lib_internal/matchlist-initrefserverlist.c  (revision 2902)
1114 @@ -1,16 +1,16 @@
1115  // $Id$    --*- c -*--
1116  
1117  // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1118 -//  
1119 +//
1120  // This program is free software; you can redistribute it and/or modify
1121  // it under the terms of the GNU General Public License as published by
1122  // the Free Software Foundation; version 2 of the License.
1123 -//  
1124 +//
1125  // This program is distributed in the hope that it will be useful,
1126  // but WITHOUT ANY WARRANTY; without even the implied warranty of
1127  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1128  // GNU General Public License for more details.
1129 -//  
1130 +//
1131  // You should have received a copy of the GNU General Public License
1132  // along with this program; if not, write to the Free Software
1133  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1134 @@ -26,6 +26,7 @@
1135  #include <dirent.h>
1136  #include <string.h>
1137  #include <fcntl.h>
1138 +#include <sys/stat.h>
1139  
1140  #define ENSC_WRAPPERS_FCNTL    1
1141  #define ENSC_WRAPPERS_UNISTD   1
1142 @@ -45,7 +46,7 @@
1143    int                  cur_dir = Eopen(".", O_RDONLY, 0);
1144    struct dirent                **entries;
1145    int                  count,i;
1146 -  
1147 +
1148    Echdir(dir);
1149    count = scandir(".", &entries, selectRefserver, alphasort);
1150    if (count==-1) {
1151 @@ -61,7 +62,7 @@
1152    *lst = Emalloc(sizeof(struct MatchList) * count);
1153    *cnt = count;
1154    for (i=0; i<count; ++i) {
1155 -    char const                         *tmp   = entries[i]->d_name;
1156 +    char const                 *tmp   = entries[i]->d_name;
1157      size_t                     l      = strlen(tmp);
1158      char                       vname[sizeof("./") + l];
1159      struct MatchVserverInfo    vserver = {
1160 @@ -71,7 +72,7 @@
1161  
1162      memcpy(vname,   "./", 2);
1163      memcpy(vname+2, tmp,  l+1);
1164 -    
1165 +
1166      if (!MatchVserverInfo_init(&vserver)) {
1167        WRITE_MSG(2, "failed to initialize unification of reference vserver\n");
1168        exit(1);
1169 Index: util-vserver.spec.in
1170 ===================================================================
1171 --- util-vserver.spec.in        (revision 2883)
1172 +++ util-vserver.spec.in        (revision 2902)
1173 @@ -395,9 +395,10 @@
1174  %{!?_without_doc:%doc lib/apidoc/html}
1175  
1176  
1177 -%files python
1178 +%if 0%{!?_without_python:1}
1179 +%files python -f %name-python.list
1180  %defattr(-,root,root,-)
1181 -%{!?_without_python:%{python_sitearch}/*}
1182 +%endif
1183  
1184  
1185  %changelog
1186 Index: Makefile.am
1187 ===================================================================
1188 --- Makefile.am (revision 2883)
1189 +++ Makefile.am (revision 2902)
1190 @@ -143,6 +143,9 @@
1191                         s!@'ENSC_HAVE_C99_COMPILER_FALSE'@!\@ENSC_HAVE_C99_COMPILER_FALSE@ !g; \
1192                         s!@'ENSC_HAVE_CXX_COMPILER_TRUE'@!\@ENSC_HAVE_CXX_COMPILER_TRUE@ !g; \
1193                         s!@'ENSC_HAVE_CXX_COMPILER_FALSE'@!\@ENSC_HAVE_CXX_COMPILER_FALSE@ !g; \
1194 +                       s!@'HAVE_PYTHON_TRUE'@!\@HAVE_PYTHON_TRUE@ !g; \
1195 +                       s!@'HAVE_PYTHON_FALSE'@!\@HAVE_PYTHON_FALSE@ !g; \
1196 +                       s!@'PYEXECDIR'@!$(pyexecdir)!g; \
1197                         $(ENSC_PATHPROG_SED)
1198  
1199  pathconfig.h:          .pathconfig.h.pathsubst.stamp
1200 @@ -233,6 +236,7 @@
1201  if HAVE_PYTHON
1202  include $(top_srcdir)/python/Makefile-files
1203  endif
1204 +include $(top_srcdir)/debian/Makefile-files
1205  
1206  include $(top_srcdir)/m4/gpgsig.am
1207  include $(top_srcdir)/m4/validate.am
1208 Index: ensc_vector/testsuite/Makefile-files
1209 ===================================================================
1210 --- ensc_vector/testsuite/Makefile-files        (revision 2883)
1211 +++ ensc_vector/testsuite/Makefile-files        (revision 2902)
1212 @@ -1,16 +1,16 @@
1213  ## $Id$                --*- makefile -*--
1214  
1215  ## Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1216 -##  
1217 +##
1218  ## This program is free software; you can redistribute it and/or modify
1219  ## it under the terms of the GNU General Public License as published by
1220  ## the Free Software Foundation; version 2 of the License.
1221 -##  
1222 +##
1223  ## This program is distributed in the hope that it will be useful,
1224  ## but WITHOUT ANY WARRANTY; without even the implied warranty of
1225  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1226  ## GNU General Public License for more details.
1227 -##  
1228 +##
1229  ## You should have received a copy of the GNU General Public License
1230  ## along with this program; if not, write to the Free Software
1231  ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1232 @@ -21,6 +21,9 @@
1233  TESTS +=                       ensc_vector/testsuite/test1 \
1234                                 ensc_vector/testsuite/test2
1235  
1236 +DIETPROGS +=                   ensc_vector/testsuite/test1 \
1237 +                               ensc_vector/testsuite/test2
1238 +
1239  ensc_vector_testsuite_test1_SOURCES =  ensc_vector/testsuite/test1.c
1240  ensc_vector_testsuite_test1_LDADD =    $(LIBENSCVECTOR)
1241