[pve-devel] r4932 - in vzctl/trunk: . debian
svn-commits at proxmox.com
svn-commits at proxmox.com
Thu Aug 5 14:18:02 CEST 2010
Author: dietmar
Date: 2010-08-05 12:18:02 +0000 (Thu, 05 Aug 2010)
New Revision: 4932
Added:
vzctl/trunk/debian/sysctl
vzctl/trunk/debian/update_sysctl_conf
vzctl/trunk/debian/vzctl.dirs
vzctl/trunk/debian/vzctl.override
Modified:
vzctl/trunk/Makefile
vzctl/trunk/debian/changelog
vzctl/trunk/debian/rules
vzctl/trunk/debian/vzctl.postinst
vzctl/trunk/debian/vzctl.preinst
Log:
Modified: vzctl/trunk/Makefile
===================================================================
--- vzctl/trunk/Makefile 2010-08-05 10:30:11 UTC (rev 4931)
+++ vzctl/trunk/Makefile 2010-08-05 12:18:02 UTC (rev 4932)
@@ -48,6 +48,7 @@
chmod +x vzctl-${SVER}/debian/rules
cp init-logger vzctl-${SVER}/scripts
cd vzctl-${SVER}; dpkg-buildpackage -b -rfakeroot -us -uc
+ lintian ${DEB}
hostname.diff:
-diff -r -u vzctl-${SVER}.org/etc/dists/scripts/debian-set_hostname.sh vzctl-${SVER}/etc/dists/scripts/debian-set_hostname.sh > $@
Modified: vzctl/trunk/debian/changelog
===================================================================
--- vzctl/trunk/debian/changelog 2010-08-05 10:30:11 UTC (rev 4931)
+++ vzctl/trunk/debian/changelog 2010-08-05 12:18:02 UTC (rev 4932)
@@ -2,6 +2,14 @@
* upgrade to latest version from git
+ * add lintian overrides
+
+ * remove OpenVZ specific settings from /etc/sysctl.conf
+ and move them to /etc/sysctl.d/vzctl
+
+ * sysctl: set "net.ipv4.ip_forward = 1" - seems to be needed by newer
+ kernels
+
-- Proxmox Support Team <support at proxmox.com> Thu, 05 Aug 2010 10:43:16 +0200
vzctl (3.0.23-1pve11) unstable; urgency=low
Modified: vzctl/trunk/debian/rules
===================================================================
--- vzctl/trunk/debian/rules 2010-08-05 10:30:11 UTC (rev 4931)
+++ vzctl/trunk/debian/rules 2010-08-05 12:18:02 UTC (rev 4932)
@@ -77,7 +77,12 @@
# unset Debian Version on vzctl
sed -i "s/'$(VZCTL_DEBVERSION)'/'$(VZCTL_VERSION)'/g" configure
+ # install sysctl file
+ install -m 644 $(CURDIR)/debian/sysctl $(CURDIR)/debian/vzctl/etc/sysctl.d/vzctl
+ # lintian overrides
+ install -m 644 $(CURDIR)/debian/vzctl.override $(CURDIR)/debian/vzctl/usr/share/lintian/overrides/vzctl
+
# Build architecture-independent files here.
binary-indep: build install
@@ -93,6 +98,7 @@
dh_strip
dh_compress
dh_fixperms
+ dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
Added: vzctl/trunk/debian/sysctl
===================================================================
--- vzctl/trunk/debian/sysctl (rev 0)
+++ vzctl/trunk/debian/sysctl 2010-08-05 12:18:02 UTC (rev 4932)
@@ -0,0 +1,19 @@
+# On Hardware Node we generally need
+# packet forwarding enabled and proxy arp disabled
+
+net.ipv4.ip_forward = 1
+net.ipv4.conf.default.forwarding=1
+net.ipv4.conf.default.proxy_arp = 0
+
+# Enables source route verification
+net.ipv4.conf.all.rp_filter = 1
+
+# Enables the magic-sysrq key
+kernel.sysrq = 1
+
+# TCP Explict Congestion Notification
+#net.ipv4.tcp_ecn = 0
+
+# we do not want all our interfaces to send redirects
+net.ipv4.conf.default.send_redirects = 1
+net.ipv4.conf.all.send_redirects = 0
Added: vzctl/trunk/debian/update_sysctl_conf
===================================================================
--- vzctl/trunk/debian/update_sysctl_conf (rev 0)
+++ vzctl/trunk/debian/update_sysctl_conf 2010-08-05 12:18:02 UTC (rev 4932)
@@ -0,0 +1,59 @@
+#!/usr/bin/perl -w
+
+# remove OpenVZ specific settings from /etc/sysctl.conf
+# and move them to /etc/sysctl.d/vzctl
+
+use strict;
+
+exit 0 if -f "/etc/sysctl.d/vzctl";
+
+open(TMP, "/etc/sysctl.conf") || die "can't open sysctl.conf";
+
+my $sysctl_out = '';
+my $vzctl_out = '';
+
+my $found;
+my $skip;
+
+while(defined(my $line = <TMP>)) {
+ if ($line =~ m/^#-- OpenVZ begin/i) {
+ $found = 1;
+ $skip = 1;
+ next;
+ }
+ if ($line =~ m/^#-- OpenVZ end/i) {
+ $found = 1;
+ $skip = 0;
+ next;
+ }
+
+ if ($skip) {
+ if ($line =~ m/^net\.ipv4\.conf\.default\.forwarding\s*=\s*1\s*$/) {
+ $vzctl_out .= "net.ipv4.ip_forward=1\n"
+ }
+ $vzctl_out .= $line;
+ } else {
+ $sysctl_out .= $line;
+ }
+}
+
+close (TMP);
+
+if ($found) {
+ if ($vzctl_out) {
+ print "moving openvz sysctl settings to /etc/sysctl.d/vzctl\n"
+ open (OUT, ">/etc/sysctl.d/vzctl") ||
+ die "cant't open '/etc/sysctl.d/vzctl' - $!";
+ my $res = print OUT $vzctl_out;
+ die "write failed" if !$res;
+ close OUT;
+ }
+
+ open (OUT, ">/etc/sysctl.conf") ||
+ die "cant't open '/etc/sysctl.conf' - $!";
+ my $res = print OUT $sysctl_out;
+ die "write failed" if !$res;
+ close OUT;
+}
+
+exit(0);
Property changes on: vzctl/trunk/debian/update_sysctl_conf
___________________________________________________________________
Added: svn:executable
+ *
Added: vzctl/trunk/debian/vzctl.dirs
===================================================================
--- vzctl/trunk/debian/vzctl.dirs (rev 0)
+++ vzctl/trunk/debian/vzctl.dirs 2010-08-05 12:18:02 UTC (rev 4932)
@@ -0,0 +1,2 @@
+/etc/sysctl.d
+/usr/share/lintian/overrides
Added: vzctl/trunk/debian/vzctl.override
===================================================================
--- vzctl/trunk/debian/vzctl.override (rev 0)
+++ vzctl/trunk/debian/vzctl.override 2010-08-05 12:18:02 UTC (rev 4932)
@@ -0,0 +1,3 @@
+vzctl: package-name-doesnt-match-sonames libvzctl-0.0.3
+vzctl: statically-linked-binary ./usr/lib/vzctl/scripts/init-logger
+vzctl: package-contains-empty-directory usr/lib/vzctl/modules/
Modified: vzctl/trunk/debian/vzctl.postinst
===================================================================
--- vzctl/trunk/debian/vzctl.postinst 2010-08-05 10:30:11 UTC (rev 4931)
+++ vzctl/trunk/debian/vzctl.postinst 2010-08-05 12:18:02 UTC (rev 4932)
@@ -19,6 +19,12 @@
case "$1" in
configure)
+ # make sure we correct sysctl settings
+ /usr/share/doc/vzctl/examples/update_sysctl_conf
+ if [ -f "/etc/sysctl.d/vzctl" ] ; then
+ /sbin/sysctl -q -p /etc/sysctl.d/vzctl
+ fi
+
if [ -x "/etc/init.d/vz" ]; then
update-rc.d vz defaults >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
Modified: vzctl/trunk/debian/vzctl.preinst
===================================================================
--- vzctl/trunk/debian/vzctl.preinst 2010-08-05 10:30:11 UTC (rev 4931)
+++ vzctl/trunk/debian/vzctl.preinst 2010-08-05 12:18:02 UTC (rev 4932)
@@ -23,38 +23,6 @@
rm -f "/etc/network/if-up.d/vzifup-post"
fi
- # add OpenVZ sysctl settings
- if ! grep '^#-- OpenVZ begin --#' /etc/sysctl.conf >/dev/null; then
- cp /etc/sysctl.conf /etc/sysctl.conf'{new}'
- cat >>/etc/sysctl.conf'{new}' <<-\EOT
-
-#-- OpenVZ begin --#
-
-# On Hardware Node we generally need
-# packet forwarding enabled and proxy arp disabled
-net.ipv4.ip_forward = 1
-net.ipv4.conf.default.forwarding=1
-net.ipv4.conf.default.proxy_arp = 0
-
-# Enables source route verification
-net.ipv4.conf.all.rp_filter = 1
-
-# Enables the magic-sysrq key
-kernel.sysrq = 1
-
-# TCP Explict Congestion Notification
-#net.ipv4.tcp_ecn = 0
-
-# we do not want all our interfaces to send redirects
-net.ipv4.conf.default.send_redirects = 1
-net.ipv4.conf.all.send_redirects = 0
-
-#-- OpenVZ end --#
-EOT
- mv -f /etc/sysctl.conf'{new}' /etc/sysctl.conf
- echo 'Adding OpenVZ sysctl settings, see README at /usr/share/doc/vzctl/ ...'
- /sbin/sysctl -q -w
- fi
# compability mode /var/lib/vz -> /vz
# ln -sT /var/lib/vz vz 2>/dev/null || true
# echo "Add a link from /var/lib/vz to /vz/"
More information about the pve-devel
mailing list