From: Evan Broder Date: Sun, 5 Oct 2008 08:53:42 +0000 (-0400) Subject: Update config files to work with Hardy X-Git-Tag: sipb-xen-console/8.0^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-console.git/commitdiff_plain/4a4168a62f9ec2b4c135b32f24991127058e5d47?ds=sidebyside Update config files to work with Hardy Switch them to use DEB_TRANSFORM_FILES in the process svn path=/trunk/packages/sipb-xen-console/; revision=1062 --- diff --git a/config.todo b/config.todo deleted file mode 100644 index 0070f78..0000000 --- a/config.todo +++ /dev/null @@ -1 +0,0 @@ -files/etc/lots: could benefit from config-package-dev TRANSFORM for upgradeability diff --git a/debian/changelog b/debian/changelog index ea65b94..ed08e24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sipb-xen-console (8.0) unstable; urgency=low + + * Update config files to work with Hardy + + -- Evan Broder Sun, 05 Oct 2008 04:45:21 -0400 + sipb-xen-console (7.8) unstable; urgency=low * generate config files using mako diff --git a/debian/control b/debian/control index f49fb22..77b05e0 100644 --- a/debian/control +++ b/debian/control @@ -1,15 +1,15 @@ Source: sipb-xen-console Section: servers -Priority: important -Maintainer: sipb-xen@mit.edu -Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), config-package-dev (>= 4.5~) +Priority: extra +Maintainer: SIPB Xen Project +Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), config-package-dev (>= 4.5~), nscd, openssh-server, debathena-ssh-server-config, initscripts Standards-Version: 3.7.2 Package: sipb-xen-console Architecture: all Provides: ${diverted-files} Conflicts: ${diverted-files} -Depends: sipb-xen-base, ${shlibs:Depends}, ${misc:Depends}, conserver-client, daemon, debathena-kerberos-config, fuse-utils, libnss-pgsql1, nscd, openssh-server, python-fuse, sipb-xen-chrony-config, sipb-xen-database-common, remctl-server +Depends: sipb-xen-base, ${shlibs:Depends}, ${misc:Depends}, conserver-client, daemon, debathena-kerberos-config, fuse-utils, libnss-pgsql1, nscd, openssh-server, python, python-fuse, sipb-xen-chrony-config, sipb-xen-database-common, remctl-server Description: SIPB Xen serial console server This package should be installed on sipb-xen-console It makes sure that necessary tools are available. diff --git a/debian/control.in b/debian/control.in deleted file mode 100644 index 0f4e9a7..0000000 --- a/debian/control.in +++ /dev/null @@ -1,15 +0,0 @@ -Source: sipb-xen-console -Section: servers -Priority: important -Maintainer: sipb-xen@mit.edu -Build-Depends: @cdbs@ -Standards-Version: 3.7.2 - -Package: sipb-xen-console -Architecture: all -Provides: ${diverted-files} -Conflicts: ${diverted-files} -Depends: sipb-xen-base, ${shlibs:Depends}, ${misc:Depends}, conserver-client, daemon, debathena-kerberos-config, fuse-utils, libnss-pgsql1, nscd, openssh-server, python-fuse, sipb-xen-chrony-config, sipb-xen-database-common, remctl-server -Description: SIPB Xen serial console server - This package should be installed on sipb-xen-console - It makes sure that necessary tools are available. diff --git a/debian/rules b/debian/rules index 525748d..a477b1e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,15 +1,21 @@ #!/usr/bin/make -f -DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1 DEB_DIVERT_EXTENSION = .sipb-xen +DEB_TRANSFORM_FILES_sipb-xen-console += \ + /etc/init.d/bootmisc.sh.sipb-xen \ + /etc/nsswitch.conf.sipb-xen \ + /etc/nscd.conf.sipb-xen \ + /etc/pam.d/sshd.sipb-xen \ + /etc/ssh/sshd_config.debathena.sipb-xen + +ifneq ($(wildcard /usr/share/base-files/nsswitch.conf),) + DEB_CHECK_FILES_SOURCE_/etc/nsswitch.conf.sipb-xen = \ + /usr/share/base-files/nsswitch.conf +endif + DEB_DIVERT_FILES_sipb-xen-console += \ - /etc/init.d/bootmisc.sh \ - /etc/conserver/conserver.cf \ - /etc/motd \ - /etc/nscd.conf \ - /etc/nsswitch.conf \ - /etc/pam.d/ssh \ - /etc/ssh/sshd_config + /etc/conserver/conserver.cf.sipb-xen \ + /etc/motd.sipb-xen include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/config-package.mk diff --git a/debian/transform_bootmisc.sh.sipb-xen b/debian/transform_bootmisc.sh.sipb-xen new file mode 100755 index 0000000..b6a4b6d --- /dev/null +++ b/debian/transform_bootmisc.sh.sipb-xen @@ -0,0 +1,14 @@ +#!/bin/bash +patch -p0 -o /dev/fd/4 3<&0 4>&1 1>/dev/null < /var/run/motd +- [ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd ++ # Do not update motd ++ cp /etc/motd /var/run/motd diff --git a/debian/transform_nscd.conf.sipb-xen b/debian/transform_nscd.conf.sipb-xen new file mode 100755 index 0000000..f6c4f01 --- /dev/null +++ b/debian/transform_nscd.conf.sipb-xen @@ -0,0 +1,6 @@ +#!/usr/bin/perl -0p +s/^(\s*negative-time-to-live\s*passwd\s*).*$/\13/m or die; +s/^(\s*negative-time-to-live\s*group\s*).*$/\13/m or die; +s/^(\s*persistent\s*passwd\s*).*$/\1no/m or die; +s/^(\s*persistent\s*group\s*).*$/\1no/m or die; + diff --git a/debian/transform_nsswitch.conf.sipb-xen b/debian/transform_nsswitch.conf.sipb-xen new file mode 100755 index 0000000..652d02f --- /dev/null +++ b/debian/transform_nsswitch.conf.sipb-xen @@ -0,0 +1,3 @@ +#!/usr/bin/perl -0p +s/^(passwd: .*)$/$1 pgsql/m or die; +s/^(group: .*)$/$1 pgsql/m or die; diff --git a/debian/transform_sshd.sipb-xen b/debian/transform_sshd.sipb-xen new file mode 100755 index 0000000..951a589 --- /dev/null +++ b/debian/transform_sshd.sipb-xen @@ -0,0 +1,11 @@ +#!/bin/sh +echo "# If they're not root, but their user exists (success)," +echo 'auth [success=ignore ignore=ignore default=1 module_unknown=die] pam_succeed_if.so uid > 0' +echo "# print the \"You don\'t have tickets\" error:" +echo 'auth [success=die ignore=reset default=die module_unknown=die] pam_echo.so file=/etc/issue.net.no_tkt' +echo "# If !(they are root)," +echo 'auth [success=1 ignore=ignore default=ignore module_unknown=die] pam_succeed_if.so uid eq 0' +echo "# print the \"your account doesn't exist\" error:" +echo 'auth [success=die ignore=reset default=die module_unknown=die] pam_echo.so file=/etc/issue.net.no_user' +echo +exec cat diff --git a/debian/transform_sshd_config.debathena.sipb-xen b/debian/transform_sshd_config.debathena.sipb-xen new file mode 100755 index 0000000..09d0557 --- /dev/null +++ b/debian/transform_sshd_config.debathena.sipb-xen @@ -0,0 +1,2 @@ +#!/usr/bin/perl -0p +s/^#?PrintLastLog .*$/PrintLastLog no/m or die; diff --git a/files/etc/conserver/invirt-hosts.cf b/files/etc/conserver/invirt-hosts.cf deleted file mode 100644 index e69de29..0000000 diff --git a/files/etc/init.d/bootmisc.sh.sipb-xen b/files/etc/init.d/bootmisc.sh.sipb-xen deleted file mode 100755 index da55939..0000000 --- a/files/etc/init.d/bootmisc.sh.sipb-xen +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: bootmisc -# Required-Start: $local_fs hostname $remote_fs -# Required-Stop: $local_fs -# Default-Start: S -# Default-Stop: -# Short-Description: Miscellaneous things to be done during bootup. -# Description: -### END INIT INFO - -PATH=/sbin:/usr/sbin:/bin:/usr/bin -[ "$DELAYLOGIN" ] || DELAYLOGIN=yes -. /lib/init/vars.sh - -do_start () { - # - # If login delaying is enabled then create the flag file - # which prevents logins before startup is complete - # - case "$DELAYLOGIN" in - Y*|y*) - echo "System bootup in progress - please wait" > /var/lib/initscripts/nologin - ;; - esac - - # Create /var/run/utmp so we can login. - : > /var/run/utmp - if grep -q ^utmp: /etc/group - then - chmod 664 /var/run/utmp - chgrp utmp /var/run/utmp - fi - - # Set pseudo-terminal access permissions. - if [ ! -e /dev/.devfsd ] && [ -c /dev/ttyp0 ] - then - chmod -f 666 /dev/tty[p-za-e][0-9a-f] - chown -f root:tty /dev/tty[p-za-e][0-9a-f] - fi - - # Do not update motd - #uname -snrvm > /var/run/motd - #[ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd - cp /etc/motd /var/run/motd - - # Save kernel messages in /var/log/dmesg - if which dmesg >/dev/null 2>&1 - then - savelog -q -p -c 5 /var/log/dmesg - dmesg -s 524288 > /var/log/dmesg - chgrp adm /var/log/dmesg || : - elif [ -c /dev/klog ] - then - savelog -q -p -c 5 /var/log/dmesg - dd if=/dev/klog of=/var/log/dmesg & - sleep 1 - kill $! - [ -f /var/log/dmesg ] && { chgrp adm /var/log/dmesg || : ; } - fi - - # - # Save udev log in /var/log/udev - # - if [ -e /dev/.udev.log ] - then - mv -f /dev/.udev.log /var/log/udev - fi - - # Remove bootclean's flag files. - # Don't run bootclean again after this! - rm -f /tmp/.clean /var/run/.clean /var/lock/.clean -} - -case "$1" in - start|"") - do_start - ;; - restart|reload|force-reload) - echo "Error: argument '$1' not supported" >&2 - exit 3 - ;; - stop) - # No-op - ;; - *) - echo "Usage: bootmisc.sh [start|stop]" >&2 - exit 3 - ;; -esac - -: diff --git a/files/etc/nscd.conf.sipb-xen b/files/etc/nscd.conf.sipb-xen deleted file mode 100644 index 0ed898e..0000000 --- a/files/etc/nscd.conf.sipb-xen +++ /dev/null @@ -1,67 +0,0 @@ -# -# /etc/nscd.conf -# -# An example Name Service Cache config file. This file is needed by nscd. -# -# Legal entries are: -# -# logfile -# debug-level -# threads -# max-threads -# server-user -# server-user is ignored if nscd is started with -S parameters -# stat-user -# reload-count unlimited| -# paranoia -# restart-interval