merge changes from upstream git repo
authorS.Çağlar Onur <caglar@verivue.com>
Thu, 10 Mar 2011 22:53:01 +0000 (17:53 -0500)
committerS.Çağlar Onur <caglar@verivue.com>
Thu, 10 Mar 2011 22:53:01 +0000 (17:53 -0500)
nomtab.patch [new file with mode: 0644]
upstart.patch [new file with mode: 0644]
util-vserver.spec

diff --git a/nomtab.patch b/nomtab.patch
new file mode 100644 (file)
index 0000000..438d165
--- /dev/null
@@ -0,0 +1,35 @@
+commit 34ab12c667eb08336e8e9b0f414ba26d3ad19a08
+Author: Daniel Hokka Zakrisson <daniel@hozac.com>
+Date:   Tue Mar 8 20:04:29 2011 +0100
+
+    Add nomtab option.
+
+diff --git a/src/secure-mount.c b/src/secure-mount.c
+index ae0650f..53863e3 100644
+--- a/src/secure-mount.c
++++ b/src/secure-mount.c
+@@ -98,6 +98,7 @@ struct Options {
+ #define XFLAG_NOAUTO  0x01
+ #define XFLAG_FILE    0x02
++#define XFLAG_NOMTAB  0x04
+ static struct option const
+ CMDLINE_OPTIONS[] = {
+@@ -173,6 +174,7 @@ static struct FstabOption {
+   { "private",    MS_PRIVATE,     MS_PRIVATE,      0, false },
+   { "slave",      MS_SLAVE,       MS_SLAVE,        0, false },
+   { "shared",     MS_SHARED,      MS_SHARED,       0, false },
++  { "nomtab",     0,              0,               XFLAG_NOMTAB, false },
+ };
+ int                   wrapper_exit_code = 1;
+@@ -488,7 +490,7 @@ mountSingle(struct MountInfo const *mnt, struct Options *opt)
+   else if (!callExternalMount(mnt))
+     return false;
+-  if (!opt->ignore_mtab &&
++  if (!opt->ignore_mtab && (mnt->xflag & XFLAG_NOMTAB)==0 &&
+       updateMtab(mnt, opt)==-1) {
+     WRITE_MSG(2, "Failed to update mtab-file\n");
+       // no error
diff --git a/upstart.patch b/upstart.patch
new file mode 100644 (file)
index 0000000..3e36a02
--- /dev/null
@@ -0,0 +1,32 @@
+commit 54edc50b584ade4f323c16bec6ef6320f129e531
+Author: Daniel Hokka Zakrisson <daniel@hozac.com>
+Date:   Sun Mar 6 21:53:57 2011 +0100
+
+    Work with newer upstart.
+
+diff --git a/distrib/redhat/initpost b/distrib/redhat/initpost
+index 92f79bb..9eece3c 100755
+--- a/distrib/redhat/initpost
++++ b/distrib/redhat/initpost
+@@ -95,9 +95,18 @@ EOF
+     if $_CHROOT_SH testfile /sbin/initctl; then
+       cat "$__DISTRIBDIR"/redhat/initctl | $_CHROOT_SH truncate /sbin/initctl.vserver
+       $_CHROOT_SH chmod 0755 /sbin/initctl.vserver
+-      subst etc/rc.d/rc 's!^\(.*\)/proc/cmdline\(.*\)$!\1/proc/cmdline 2>/dev/null \2!;s!/sbin/initctl!/sbin/initctl.vserver!'
+-      subst etc/event.d/rcS 's!/etc/rc.d/rc.sysinit!/etc/rc.d/rc.sysinit.vserver!'
+-      $_CHROOT_SH rm /etc/event.d/tty{1,2,3,4,5,6}
++      subst etc/rc.d/rc 's!^\(.*\)/proc/cmdline\(.*\)$!\1/proc/cmdline 2>/dev/null \2!;s!initctl!initctl.vserver!'
++      if test -d etc/event.d; then
++          subst etc/event.d/rcS 's!/etc/rc.d/rc.sysinit!/etc/rc.d/rc.sysinit.vserver!'
++          $_CHROOT_SH rm /etc/event.d/tty{1,2,3,4,5,6}
++      elif test -d etc/init; then
++          for i in etc/init/*; do
++              subst $i 's!^console output!#\0!'
++          done
++          subst etc/init/control-alt-delete.conf 's!/sbin/shutdown -r!/sbin/shutdown -h!'
++          subst etc/init/rcS.conf 's!/etc/rc.d/rc.sysinit!/etc/rc.d/rc.sysinit.vserver!;s!cat /proc/cmdline!cat /proc/cmdline 2>/dev/null!'
++          subst etc/init/start-ttys.conf 's!^start on !\0never and !'
++      fi
+     fi
+ popd >/dev/null
index 3e0d31c..037c4cc 100644 (file)
@@ -38,6 +38,8 @@ URL:          http://savannah.nongnu.org/projects/util-vserver/
 Source0:       http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
 Source1:       fstab
 Source2:       vprocunhide-files
+Patch1: nomtab.patch
+Patch2: upstart.patch
 BuildRoot:     %_tmppath/%name-%version-%release-root
 Requires:      init(%name)
 Requires:      %name-core = %version-%release
@@ -195,6 +197,8 @@ Linux-VServer API from Python.
 
 %prep
 %setup -q -n %name-%fullver
+%patch1 -p1
+%patch2 -p1
 autoreconf -fi
 
 %build