[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force X.Org X11 SVN commit: r1411 - branches/modular/app/xfs-X11R7.0-1.0.1/debian



Author: dnusinow
Date: 2006-03-07 22:06:25 -0500 (Tue, 07 Mar 2006)
New Revision: 1411

Added:
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.README.Debian
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.init
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postinst.in
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postrm.in
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.preinst.in
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.prerm.in
Modified:
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/changelog
   branches/modular/app/xfs-X11R7.0-1.0.1/debian/rules
Log:
* Provide all our old packaging infrastrcture that I totally forgot. Thanks
  Rasmus B?\195?\184g Hansen. (closes: #355762)


Modified: branches/modular/app/xfs-X11R7.0-1.0.1/debian/changelog
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/changelog	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/changelog	2006-03-08 03:06:25 UTC (rev 1411)
@@ -1,3 +1,10 @@
+xfs (1:1.0.1-2) experimental; urgency=low
+
+  * Provide all our old packaging infrastrcture that I totally forgot. Thanks
+    Rasmus Bøg Hansen. (closes: #355762)
+
+ -- David Nusinow <dnusinow@debian.org>  Tue,  7 Mar 2006 21:59:15 -0500
+
 xfs (1:1.0.1-1) experimental; urgency=low
 
   * First modular upload to Debian

Modified: branches/modular/app/xfs-X11R7.0-1.0.1/debian/rules
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/rules	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/rules	2006-03-08 03:06:25 UTC (rev 1411)
@@ -79,6 +79,7 @@
 	dh_install --sourcedir=debian/tmp
 	dh_installchangelogs
 	dh_installexamples
+	dh_installinit
 	dh_link
 	dh_strip --dbg-package=$(PACKAGE)
 	dh_compress

Added: branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.README.Debian
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.README.Debian	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.README.Debian	2006-03-08 03:06:25 UTC (rev 1411)
@@ -0,0 +1,40 @@
+Debian README for xfs package
+=============================
+
+Newcomers to the X Window System should first read the Debian X FAQ
+(Frequently Asked Questions list): /usr/share/doc/x11-common/FAQ.gz.
+You can view this file with your favorite pager program after decompressing
+it.  For example:
+    $ zcat /usr/share/doc/x11-common/FAQ.gz | pager
+
+Upgraders from Debian GNU/Linux 2.0 or earlier should be aware that the
+/etc/X11/config file is no longer used; its xfs-specific options are now in
+/etc/X11/fs/xfs.options.
+
+The default font catalogue for xfs as shipped with Debian GNU/Linux
+searches the "misc" font directory before searching "cyrillic".  Some fonts
+in both of these directories claim the same font alias names (like
+"fixed").  Therefore, the X font server will use whichever font it finds
+first with that alias.  To preferentially use Cyrillic fonts instead of the
+Latin ones in misc, simply switch the order in which the paths appear in
+the xfs font catalogue, defined in /etc/X11/fs/config.
+
+Also, be aware that, as of xfs 3.3.3.1-3, the default xfs configuration has
+TCP port listening disabled for security reasons.  If you have xfs serving
+fonts to remote hosts via TCP, you will need to re-enable TCP connections;
+you can do this by simply commenting out the "no-listen = tcp" line in
+/etc/X11/fs/config.
+
+To use xfs you must add it to the X server's FontPath, in the "Files" section
+of your xorg.conf file.
+
+Section "Files"
+	FontPath	"unix/:7100"
+EndSection
+
+For information on the /etc/X11/fs/config file, see the xfs(1)
+manual page.
+
+$Id: xfs.README.Debian 428 2005-07-28 04:30:44Z dnusinow $
+
+vim:set ai et sts=4 sw=4 tw=80:

Added: branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.init
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.init	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.init	2006-03-08 03:06:25 UTC (rev 1411)
@@ -0,0 +1,156 @@
+#!/bin/sh
+
+# $Id: xfs.init 189 2005-06-11 00:04:27Z branden $
+
+# Copyright 1998-2004 Branden Robinson <branden@debian.org>.
+#
+# This is free software; you may redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License with
+# the Debian operating system, in /usr/share/common-licenses/GPL;  if
+# not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+
+set -e
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/bin/xfs
+PIDFILE=/var/run/xfs.pid
+UPGRADEFILE=/var/run/xfs.daemon-not-stopped
+SOCKET_DIR=/tmp/.font-unix
+
+test -x $DAEMON || exit 0
+
+do_restorecon () {
+  # Restore file security context (SELinux).
+  if which restorecon >/dev/null 2>&1; then
+    restorecon "$1"
+  fi
+}
+
+set_up_socket_dir () {
+  echo -n "Setting up X font server socket directory $SOCKET_DIR..."
+  if [ -e $SOCKET_DIR ] && ! [ -d $SOCKET_DIR ]; then
+    mv $SOCKET_DIR $SOCKET_DIR.$$
+  fi
+  mkdir -p $SOCKET_DIR
+  chown 0:0 $SOCKET_DIR
+  chmod 1777 $SOCKET_DIR
+  do_restorecon $SOCKET_DIR
+  echo "done."
+}
+
+stillrunning () {
+  if expr "$(cat /proc/$DAEMONPID/cmdline 2>/dev/null)" : "$DAEMON" >/dev/null \
+    2>&1; then
+    true
+  else
+    if [ -e $PIDFILE ]; then
+      echo -n " (removing stale $PIDFILE)"
+      rm $PIDFILE
+    fi
+    false
+  fi
+}
+
+# If we have upgraded the daemon since we last started it, we can't use the
+# --exec argument to start-stop-daemon, because the daemon's inode will have
+# changed.  The risk here is that in a situation where the daemon died, its
+# pidfile was not cleaned up, we've upgraded it, *and* some other process is now
+# running under that pid, start-stop-daemon will send signals to an innocent
+# process.  However, this seems like a corner case.  C'est la vie!
+if [ -e $UPGRADEFILE ]; then
+  SSD_START_ARGS="--pidfile $PIDFILE --startas $DAEMON"
+  SSD_STOP_ARGS="--pidfile $PIDFILE --name ${DAEMON#**/}"
+else
+  SSD_START_ARGS="--pidfile $PIDFILE --exec $DAEMON"
+  SSD_STOP_ARGS="$SSD_START_ARGS"
+fi
+
+case "$1" in
+  start)
+    set_up_socket_dir
+    echo -n "Starting X font server: xfs"
+    start-stop-daemon --start --quiet $SSD_START_ARGS -- -daemon \
+      || echo -n " already running"
+    echo "."
+  ;;
+
+  restart)
+    /etc/init.d/xfs stop
+    if [ -f $PIDFILE ]; then
+      if stillrunning; then
+        exit 1
+      fi
+    fi
+    /etc/init.d/xfs start
+  ;;
+
+  reload)
+    echo -n "Reloading X font server configuration..."
+    if start-stop-daemon --stop --signal 1 --quiet $SSD_STOP_ARGS; then
+      echo "done."
+    else
+      echo "xfs not running."
+    fi
+  ;;
+
+  force-reload)
+    /etc/init.d/xfs reload
+  ;;
+
+  stop)
+    echo -n "Stopping X font server: xfs"
+    if ! [ -f $PIDFILE ]; then
+      echo " not running ($PIDFILE not found)"
+      # The daemon is not running; do not tell the maintainer scripts that it
+      # has not stopped.
+      rm -f $UPGRADEFILE
+    else
+      DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]')
+      KILLCOUNT=1
+      if ! [ -e $UPGRADEFILE ]; then
+        if start-stop-daemon --stop --quiet $SSD_STOP_ARGS; then
+          # give xfs's signal handler a second to catch its breath
+          sleep 1
+        else
+          echo -n " not running"
+        fi
+      fi
+      while [ $KILLCOUNT -le 5 ]; do
+        if stillrunning; then
+          kill $DAEMONPID
+        else
+          break
+        fi
+        sleep 1
+        KILLCOUNT=$(( $KILLCOUNT + 1 ))
+      done
+      if stillrunning; then
+        echo -n " not responding to TERM signal (pid $DAEMONPID)"
+      else
+        # The daemon is not running; do not tell the maintainer scripts that it
+        # has not stopped.
+        rm -f $UPGRADEFILE
+      fi
+    fi
+    echo "."
+  ;;
+
+  *)
+    echo "Usage: /etc/init.d/xfs {start|stop|restart|reload|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=80:

Added: branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postinst.in
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postinst.in	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postinst.in	2006-03-08 03:06:25 UTC (rev 1411)
@@ -0,0 +1,70 @@
+#!/bin/sh
+# Debian xfs package post-installation script
+# Copyright 1998-2001, 2004 Branden Robinson.
+# Licensed under the GNU General Public License, version 2.  See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+# $Id: xfs.postinst.in 189 2005-06-11 00:04:27Z branden $
+
+set -e
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+THIS_PACKAGE=xfs
+THIS_SCRIPT=postinst
+
+#INCLUDE_SHELL_LIB#
+
+check_symlinks_and_bomb /usr/lib/X11/fs
+
+# now safe to finish migrations started in preinst
+if [ -e /usr/X11R6/lib/X11/fs.moved-by-preinst ] && \
+   [ -L /usr/X11R6/lib/X11/fs ]; then
+  rm -r /usr/X11R6/lib/X11/fs.moved-by-preinst
+fi
+if [ -e /etc/X11/xfs.moved-by-preinst ]; then
+  rm /etc/X11/xfs.moved-by-preinst
+fi
+
+# deal with a bug in very old versions of xbase
+for DIR in rc0.d rc1.d rc6.d; do
+  if [ -L "/etc/$DIR/K1xfs" ]; then
+    mv "/etc/$DIR/K1xfs" "/etc/$DIR/K01xfs"
+  fi
+done
+
+# Registering the init scripts or starting the daemon may cause output to
+# stdout, which can confuse debconf.
+db_stop
+
+if [ -e /etc/init.d/xfs ]; then
+  update-rc.d xfs defaults
+fi
+
+# If we are not installing, we may or may not need to restart the daemon, but we
+# always start the daemon on install.
+NOSTART=
+if ! [ -e /var/run/xfs.install ]; then
+  # Don't start the daemon if it wasn't stopped...
+  if [ -e /var/run/xfs.daemon-not-stopped ]; then
+    NOSTART=yes
+  fi
+  # ...or if the options file says not to.
+  if ! fgrep -qsx "restart-on-upgrade" /etc/X11/fs/xfs.options; then
+    NOSTART=yes
+  fi
+fi
+
+[ -n "$NOSTART" ] || invoke-rc.d xfs start || true
+
+#DEBHELPER#
+
+# Remove install flag file.  Leave the "daemon not stopped" flag file, if it
+# exists, so that it will be seen by the init script.
+rm -f /var/run/xfs.install
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=80:

Added: branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postrm.in
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postrm.in	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.postrm.in	2006-03-08 03:06:25 UTC (rev 1411)
@@ -0,0 +1,67 @@
+#!/bin/sh
+# Debian xfs package post-removal script
+# Copyright 1998-2001, 2004 Branden Robinson.
+# Licensed under the GNU General Public License, version 2.  See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+# $Id: xfs.postrm.in 189 2005-06-11 00:04:27Z branden $
+
+set -e
+
+THIS_PACKAGE=xfs
+THIS_SCRIPT=postrm
+
+#INCLUDE_SHELL_LIB#
+
+if [ "$1" = "abort-install" ] || [ "$1" = "abort-upgrade" ]; then
+  if [ -d /usr/X11R6/lib/X11/fs.moved-by-preinst ] && \
+     [ -L /usr/X11R6/lib/X11/fs ]; then
+    rm /usr/X11R6/lib/X11/fs
+    mv /usr/X11R6/lib/X11/fs.moved-by-preinst /usr/X11R6/lib/X11/fs
+  fi
+  if [ -e /etc/X11/xfs.moved-by-preinst ] && [ -d /etc/X11/fs ] && \
+     ! [ -e /etc/X11/xfs ]; then
+    mv /etc/X11/fs /etc/X11/xfs
+    rm /etc/X11/xfs.moved-by-preinst
+  fi
+
+fi
+
+if [ "$1" = "abort-install" ]; then
+  rm -f /var/run/xfs.install
+fi
+
+#DEBHELPER#
+
+if [ "$1" = "purge" ]; then
+  update-rc.d xfs remove
+  if [ -d /etc/X11/fs ]; then
+    rm -r /etc/X11/fs
+  fi
+fi
+
+if [ "$1" = "abort-upgrade" ]; then
+  # NOTE: The following is copied from the postinst script and isn't necessary
+  # if dpkg executes a package's postinst script with the "configure" argument
+  # after unwinding from a failed upgrade.  (See section 6.5 of the Debian
+  # Policy Manual, "Details of unpack phase of installation or upgrade".)
+
+  # Don't start the daemon if it wasn't stopped...
+  if [ -e /var/run/xfs.daemon-not-stopped ]; then
+    NOSTART=yes
+  fi
+  # ...or if the options file says not to.
+  if ! fgrep -qsx "restart-on-upgrade" /etc/X11/fs/xfs.options; then
+    NOSTART=yes
+  fi
+
+  [ -n "$NOSTART" ] || invoke-rc.d xfs start || true
+
+  # Remove flag files.
+  rm -f /var/run/xfs.install /var/run/xfs.daemon-not-stopped
+fi
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=80:

Added: branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.preinst.in
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.preinst.in	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.preinst.in	2006-03-08 03:06:25 UTC (rev 1411)
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Debian xfs package pre-installation script
+# Copyright 1998-2001, 2004 Branden Robinson.
+# Licensed under the GNU General Public License, version 2.  See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+# $Id: xfs.preinst.in 189 2005-06-11 00:04:27Z branden $
+
+set -e
+
+THIS_PACKAGE=xfs
+THIS_SCRIPT=preinst
+
+#INCLUDE_SHELL_LIB#
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+  # fs dir moved to /etc/X11 in 4.x
+  if [ -e /usr/X11R6/lib/X11/fs ] && ! [ -L /usr/X11R6/lib/X11/fs ]; then
+    observe "removing obsolete /usr/X11R6/lib/X11/fs directory"
+    mv /usr/X11R6/lib/X11/fs /usr/X11R6/lib/X11/fs.moved-by-preinst
+  fi
+
+  # /etc/X11/xfs dir renamed to /etc/X11/fs in 4.x
+  if [ -d /etc/X11/xfs ] && ! [ -e /etc/X11/fs ]; then
+    observe "moving X font server configuration directory /etc/X11/xfs" \
+            "to /etc/X11/fs"
+    mv /etc/X11/xfs /etc/X11/fs
+    touch /etc/X11/xfs.moved-by-preinst
+  fi
+
+  check_symlinks_and_warn /usr/lib/X11/fs
+fi
+
+if [ "$1" = "install" ]; then
+  # Create a flag file that tells the postinst script this is an install, not
+  # an upgrade.
+  : >/var/run/xfs.install
+fi
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=80:

Added: branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.prerm.in
===================================================================
--- branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.prerm.in	2006-03-08 02:14:57 UTC (rev 1410)
+++ branches/modular/app/xfs-X11R7.0-1.0.1/debian/xfs.prerm.in	2006-03-08 03:06:25 UTC (rev 1411)
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Debian xfs package pre-removal script
+# Copyright 1998-2001, 2004 Branden Robinson.
+# Licensed under the GNU General Public License, version 2.  See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+# $Id: xfs.prerm.in 189 2005-06-11 00:04:27Z branden $
+
+set -e
+
+THIS_PACKAGE=xfs
+THIS_SCRIPT=prerm
+
+#INCLUDE_SHELL_LIB#
+
+case "$1" in
+  upgrade|failed-upgrade)
+    REMOVING=
+    ;;
+  remove|deconfigure)
+    REMOVING=yes
+    ;;
+esac
+
+STOP=
+# Are we supposed to restart on upgrade?  If removing the package, we always
+# stop the daemon.
+if grep -qs ^restart-on-upgrade /etc/X11/fs/xfs.options || \
+   [ -n "$REMOVING" ]; then
+  STOP=yes
+fi
+
+if [ -n "$STOP" ]; then
+  invoke-rc.d xfs stop || true
+else
+  # Create a flag file that tells the postinst and postrm scripts that the
+  # daemon was not stopped.
+  : >/var/run/xfs.daemon-not-stopped
+fi
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=80:



Reply to: