1 Index: python/Makefile-files
2 ===================================================================
3 --- python/Makefile-files (revision 2883)
4 +++ python/Makefile-files (revision 2902)
8 ## Copyright (C) 2008 Daniel Hokka Zakrisson
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.
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.
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.
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
34 ===================================================================
35 --- debian/control (revision 0)
36 +++ debian/control (revision 2902)
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/
46 +Package: util-vserver
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.
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.
67 +Package: util-vserver-core
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.
77 +Package: util-vserver-build
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.
87 +Package: util-vserver-sysv
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.
97 +Package: util-vserver-legacy
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.
107 +Package: libvserver0-dev
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.
118 +Package: util-vserver-python
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.
128 Property changes on: debian/control
129 ___________________________________________________________________
134 ===================================================================
135 --- debian/compat (revision 0)
136 +++ debian/compat (revision 2902)
139 Index: debian/util-vserver-build.postinst
140 ===================================================================
141 --- debian/util-vserver-build.postinst (revision 0)
142 +++ debian/util-vserver-build.postinst (revision 2902)
146 +test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
148 +f="/etc/vservers/.defaults/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
149 + ln -s /vservers/.hash "$f"/00
151 +/usr/sbin/setattr --barrier /vservers/.hash || :
153 Property changes on: debian/util-vserver-build.postinst
154 ___________________________________________________________________
158 Index: debian/copyright
159 ===================================================================
160 --- debian/copyright (revision 0)
161 +++ debian/copyright (revision 2902)
163 +This work was packaged for Debian by:
165 + Daniel Hokka Zakrisson <daniel@hozac.com> on Wed, 14 Jul 2010 22:42:52 +0000
167 +It was downloaded from:
169 + http://svn.linux-vserver.org/svn/util-vserver
173 + Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
174 + Daniel Hokka Zakrisson <daniel@hozac.com>
178 + Copyright (C) 2002-2010 Enrico Scholz
179 + Copyright (C) 2006-2010 Daniel Hokka Zakrisson
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.
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
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.
198 +The Debian packaging is:
200 + Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
202 +and is licensed under the GPL version 2,
203 +see "/usr/share/common-licenses/GPL-2".
205 ===================================================================
206 --- debian/docs (revision 0)
207 +++ debian/docs (revision 2902)
211 Index: debian/util-vserver.postinst
212 ===================================================================
213 --- debian/util-vserver.postinst (revision 0)
214 +++ debian/util-vserver.postinst (revision 2902)
218 +test -d /vservers || mkdir -m0000 /vservers
219 +test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
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"
225 +/usr/sbin/setattr --barrier /vservers /vservers/.pkg || :
227 Property changes on: debian/util-vserver.postinst
228 ___________________________________________________________________
233 ===================================================================
234 --- debian/rules (revision 0)
235 +++ debian/rules (revision 2902)
239 +# Sample debian/rules that uses debhelper.
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.
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
249 +# Uncomment this to turn on verbose mode.
250 +#export DH_VERBOSE=1
252 +# This has to be exported to make some magic below work.
259 +override_dh_auto_configure:
260 + dh_auto_configure -- --with-initrddir=/etc/init.d --enable-release \
261 + --enable-apis=NOLEGACY --with-initscripts=sysv
263 +override_dh_auto_test:
265 +override_dh_auto_install:
267 + contrib/make-deb-manifest util-vserver debian contrib/manifest.dat files
269 Property changes on: debian/rules
270 ___________________________________________________________________
276 Index: debian/util-vserver.postrm
277 ===================================================================
278 --- debian/util-vserver.postrm (revision 0)
279 +++ debian/util-vserver.postrm (revision 2902)
283 +if test "$1" = purge; then
284 + rm -rf /var/cache/vservers/* 2>/dev/null || :
287 Property changes on: debian/util-vserver.postrm
288 ___________________________________________________________________
292 Index: debian/util-vserver-legacy.postinst
293 ===================================================================
294 --- debian/util-vserver-legacy.postinst (revision 0)
295 +++ debian/util-vserver-legacy.postinst (revision 2902)
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 .
307 Property changes on: debian/util-vserver-legacy.postinst
308 ___________________________________________________________________
312 Index: debian/util-vserver-sysv.postinst
313 ===================================================================
314 --- debian/util-vserver-sysv.postinst (revision 0)
315 +++ debian/util-vserver-sysv.postinst (revision 2902)
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 .
325 Property changes on: debian/util-vserver-sysv.postinst
326 ___________________________________________________________________
330 Index: debian/changelog.in
331 ===================================================================
332 --- debian/changelog.in (revision 0)
333 +++ debian/changelog.in (revision 2902)
335 +util-vserver (@PACKAGE_VERSION@-1) unstable; urgency=low
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)
347 +if test "$1" = upgrade; then
348 + /etc/init.d/vprocunhide condrestart > /dev/null 2>&1
351 Property changes on: debian/util-vserver-sysv.postrm
352 ___________________________________________________________________
356 Index: debian/Makefile-files
357 ===================================================================
358 --- debian/Makefile-files (revision 0)
359 +++ debian/Makefile-files (revision 2902)
361 +## $Id$ -*- makefile -*-
363 +## Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
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.
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.
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.
381 +EXTRA_DIST += debian/rules \
386 + debian/changelog.in \
389 +#CLEANFILES += debian/changelog
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" $< > $@
395 Property changes on: debian/Makefile-files
396 ___________________________________________________________________
400 Index: debian/util-vserver-legacy.prerm
401 ===================================================================
402 --- debian/util-vserver-legacy.prerm (revision 0)
403 +++ debian/util-vserver-legacy.prerm (revision 2902)
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
416 Property changes on: debian/util-vserver-legacy.prerm
417 ___________________________________________________________________
421 Index: debian/util-vserver-sysv.prerm
422 ===================================================================
423 --- debian/util-vserver-sysv.prerm (revision 0)
424 +++ debian/util-vserver-sysv.prerm (revision 2902)
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
435 Property changes on: debian/util-vserver-sysv.prerm
436 ___________________________________________________________________
440 Index: src/testsuite/hashcalc-plain.c
441 ===================================================================
442 --- src/testsuite/hashcalc-plain.c (revision 2883)
443 +++ src/testsuite/hashcalc-plain.c (revision 2902)
447 // Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
468 +#include <sys/stat.h>
469 #include <sys/mman.h>
471 #define ENSC_TESTSUITE
474 static char const HEX_DIGIT[] = "0123456789abcdef";
475 size_t d_size = ensc_crypto_hashctx_get_digestsize(h_ctx);
478 unsigned char digest[d_size];
481 if (ensc_crypto_hashctx_get_digest(h_ctx, digest, NULL, d_size)==-1)
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];
496 assert(ensc_crypto_hashctx_update(&hash_context, buf, buf_size)!=-1);
497 munmap((void *)(buf), buf_size);
501 assert(convertDigest(digest, &hash_context));
504 Vwrite(1, digest, strlen(digest));
508 ensc_crypto_hashctx_free(&hash_context);
513 Index: src/testsuite/Makefile-files
514 ===================================================================
515 --- src/testsuite/Makefile-files (revision 2883)
516 +++ src/testsuite/Makefile-files (revision 2902)
518 ## $Id$ --*- makefile -*--
520 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
538 src/testsuite/hashcalc-plain.sh \
539 src/testsuite/vwait-test.sh
541 +DIETPROGS += src/testsuite/vunify-functest \
542 + src/testsuite/chcontext-test \
543 + src/testsuite/chbind-test \
544 + src/testsuite/rpm-fake-test
546 src_testsuite_rpm_fake_test_SOURCES = src/testsuite/rpm-fake-test.c
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)
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)
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)
562 src_testsuite_hashcalc_SOURCES = src/testsuite/hashcalc.c
563 src_testsuite_hashcalc_plain_SOURCES = src/testsuite/hashcalc-plain.c
565 src_testsuite_hashcalc_plain_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
567 if ENSC_CAN_CRYPTO_WITH_DIETLIBC
568 +DIETPROGS += src/testsuite/hashcalc \
569 + src/testsuite/hashcalc-plain
571 src_testsuite_hashcalc_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
572 src_testsuite_hashcalc_LDFLAGS = $(VSERVER_LDFLGS)
574 Index: src/vcontext.c
575 ===================================================================
576 --- src/vcontext.c (revision 2883)
577 +++ src/vcontext.c (revision 2902)
581 // Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
602 +#include "compat-pivot_root.h"
603 #include "lib/internal.h"
604 #include "lib_internal/jail.h"
605 #include "lib_internal/sys_personality.h"
607 { "personality-flags", required_argument, 0, CMD_PERSFLAG },
608 { "vlogin", no_argument, 0, CMD_VLOGIN },
609 { "pivot-root", no_argument, 0, CMD_PIVOT_ROOT },
612 { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility
621 struct sockaddr_un addr;
624 if (filename==0) return -1;
626 ENSC_INIT_UNIX_SOCK(addr, filename);
628 doExternalSync(int fd, char const *msg)
635 if (msg) EsendAll(fd, msg, strlen(msg));
636 @@ -256,13 +257,13 @@
639 pid_t pid = initSync(p, args->do_disconnect);
644 int ext_sync_fd = connectExternalSync(args->sync_sock);
646 - doSyncStage0(p, args->do_disconnect);
648 + doSyncStage0(p, args->do_disconnect);
650 if (args->do_create) {
651 xid = vc_ctx_create(args->xid, NULL);
656 assert(args->do_disconnect);
659 waitOnSync(pid, p, args->xid!=VC_DYNAMIC_XID && args->do_migrate);
662 @@ -430,11 +431,11 @@
663 .personality_flags = 0,
669 int c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
674 case CMD_HELP : showHelp(1, argv[0], 0);
675 case CMD_VERSION : showVersion();
676 @@ -474,10 +475,10 @@
679 signal(SIGCHLD, SIG_DFL);
682 if (args.do_migrateself)
683 args.xid = Evc_get_task_xid(0);
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)
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)
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)
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)
733 if $_VSERVER_INFO - FEATURE migrate; then
736 + "${VSPACE_SHARED_CMD[@]}" \
738 $_EXEC_ULIMIT "$VSERVER_DIR"/ulimits \
739 $_VTAG --create "${OPTS_VTAG_CREATE[@]}" --silent -- \
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)
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=()
760 declare -a STOPCMD_PREPARE=()
764 test -n "$_HAVE_INTERFACE_OPTIONS" || _generateInterfaceOptions "$vdir"
766 + if test -e "$vdir"/noncontext -o
767 + \( -e "$vdir"/spaces/net -a ! -e "$vdir"/ncontext \); then
768 + _HAVE_CHBIND_OPTIONS=1
772 local f="$vdir"/interfaces/bcast
773 getFileValue bcast "$f"
774 f="$vdir"/interfaces/lback
775 @@ -787,17 +795,23 @@
778 local d="$vdir"/spaces
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
792 + OPTS_VSPACE_SHARED=( "${OPTS_VSPACE_SHARED[@]}" --$space )
793 + VSPACE_SHARED_CMD=( "${VSPACE_SHARED_CMD[@]}" $_VSPACE --enter "$shared" --$space -- )
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
806 getFileValue mask "$d"/mask || \
807 OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --mask "$mask" )
809 ===================================================================
810 --- configure.ac (revision 2883)
811 +++ configure.ac (revision 2902)
815 dnl Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
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.
845 AC_INIT(util-vserver, 0.30.215, vserver@list.linux-vserver.org)
848 if test x"$prefix" = x/; then
853 ENSC_CHECK_CC_FLAG([-std=c99 -Wall -pedantic -W])
854 ENSC_CHECK_CXX_FLAG([-ansi -Wall -pedantic -W -fmessage-length=0])
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
860 - (*) AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);;
862 + (*) AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);;
864 [enable_internal_headers=yes])
866 @@ -258,14 +258,14 @@
867 enable_api_oldproc=${enable_api_oldproc:-1}
868 enable_api_olduts=${enable_api_olduts:-1}
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}
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);;
884 AC_CHECK_HEADER([beecrypt/beecrypt.h], [ : ],
885 [ ensc_have_beecrypt=no ])
889 if test x"$ensc_have_beecrypt" = xyes; then
890 AC_CHECK_LIB(beecrypt, hashFunctionContextInit, [ : ],
891 [ ensc_have_beecrypt=no ])
893 crypto api: $ensc_crypto_api
894 python bindings: $ensc_have_python
895 use library versioning: $ensc_have_versioning
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)
908 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
926 #include "ioctl-getxflg.hc"
929 +#include <sys/stat.h>
931 static inline ALWAYSINLINE int
932 vc_set_iattr_fscompat(char const *filename,
935 fd = open(filename, O_RDONLY|O_NONBLOCK);
936 if (fd==-1) return -1;
939 stat_rc = fstat(fd, &st);
940 if (stat_rc==-1) goto err;
943 if (vc_X_set_ext2flags(fd, 0, VC_IMMUTABLE_LINK_FL)==-1 ||
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)
958 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
976 #include "ioctl-getxflg.hc"
980 +#include <sys/stat.h>
982 static inline ALWAYSINLINE int
983 vc_get_iattr_fscompat(char const *filename,
984 xid_t * /*@null@*/ xid,
987 if ( (old_mask&VC_IATTR_BARRIER) && S_ISDIR(st.st_mode)) {
991 *mask |= VC_IATTR_BARRIER;
992 if ((st.st_mode&0777)==0 &&
993 vc_X_get_ext2flags(fd, &ext2_flags)!=-1 &&
1001 Index: contrib/make-manifest
1002 ===================================================================
1003 --- contrib/make-manifest (revision 2883)
1004 +++ contrib/make-manifest (revision 2902)
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
1014 Index: contrib/manifest.dat.pathsubst
1015 ===================================================================
1016 --- contrib/manifest.dat.pathsubst (revision 2883)
1017 +++ contrib/manifest.dat.pathsubst (revision 2902)
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)
1030 +# Copyright (C) 2010 Daniel Hokka Zakrisson <daniel@hozac.com>
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.
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.
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.
1045 +## Usage: make-deb-manifest <basename> <destdir> <datfile>
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
1059 + fullname="$name-$1"
1063 +for i in {core,build,legacy,sysv,lib,devel,base,python}; do
1065 + echo -n >${fullname}.install
1066 + rm -f ${fullname}.conffiles
1070 +while read style file; do
1071 + test "$file" || continue
1079 + if test "$2"; then
1081 + for i in ${DESTDIR}$file; do
1082 + test "${file#/etc/}" != "$file" && continue
1083 + echo "${i#${DESTDIR}}" >>${fullname}.conffiles
1086 + for i in ${DESTDIR}$file; do
1088 + echo "$i ${i%/*}" >>${fullname}.install
1092 Property changes on: contrib/make-deb-manifest
1093 ___________________________________________________________________
1094 Name: svn:executable
1097 Index: contrib/Makefile-files
1098 ===================================================================
1099 --- contrib/Makefile-files (revision 2883)
1100 +++ contrib/Makefile-files (revision 2902)
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
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)
1117 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
1138 +#include <sys/stat.h>
1140 #define ENSC_WRAPPERS_FCNTL 1
1141 #define ENSC_WRAPPERS_UNISTD 1
1143 int cur_dir = Eopen(".", O_RDONLY, 0);
1144 struct dirent **entries;
1149 count = scandir(".", &entries, selectRefserver, alphasort);
1152 *lst = Emalloc(sizeof(struct MatchList) * 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 = {
1162 memcpy(vname, "./", 2);
1163 memcpy(vname+2, tmp, l+1);
1166 if (!MatchVserverInfo_init(&vserver)) {
1167 WRITE_MSG(2, "failed to initialize unification of reference vserver\n");
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}
1178 +%if 0%{!?_without_python:1}
1179 +%files python -f %name-python.list
1180 %defattr(-,root,root,-)
1181 -%{!?_without_python:%{python_sitearch}/*}
1187 ===================================================================
1188 --- Makefile.am (revision 2883)
1189 +++ Makefile.am (revision 2902)
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)
1199 pathconfig.h: .pathconfig.h.pathsubst.stamp
1202 include $(top_srcdir)/python/Makefile-files
1204 +include $(top_srcdir)/debian/Makefile-files
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)
1213 ## $Id$ --*- makefile -*--
1215 ## Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
1233 TESTS += ensc_vector/testsuite/test1 \
1234 ensc_vector/testsuite/test2
1236 +DIETPROGS += ensc_vector/testsuite/test1 \
1237 + ensc_vector/testsuite/test2
1239 ensc_vector_testsuite_test1_SOURCES = ensc_vector/testsuite/test1.c
1240 ensc_vector_testsuite_test1_LDADD = $(LIBENSCVECTOR)