summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2005-08-16 03:08:47 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2005-08-16 03:08:47 +0000
commitab76213b8742d79d3ebbc5c7b30a709635ac82ff (patch)
tree36762d50f3081e164218d3f817064cdef2d79650 /x11-apps/xfs
parentStable on SPARC wrt security bug #102577. (diff)
downloadhistorical-ab76213b8742d79d3ebbc5c7b30a709635ac82ff.tar.gz
historical-ab76213b8742d79d3ebbc5c7b30a709635ac82ff.tar.bz2
historical-ab76213b8742d79d3ebbc5c7b30a709635ac82ff.zip
Add all the files that the monolith installed, including an init script. Add a hack for changing configdir that needs to be transformed to autoconf.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'x11-apps/xfs')
-rw-r--r--x11-apps/xfs/ChangeLog9
-rw-r--r--x11-apps/xfs/Manifest7
-rw-r--r--x11-apps/xfs/files/digest-xfs-0.99.0-r11
-rw-r--r--x11-apps/xfs/files/xfs.conf.d23
-rw-r--r--x11-apps/xfs/files/xfs.config47
-rwxr-xr-xx11-apps/xfs/files/xfs.start334
-rw-r--r--x11-apps/xfs/xfs-0.99.0-r1.ebuild42
7 files changed, 461 insertions, 2 deletions
diff --git a/x11-apps/xfs/ChangeLog b/x11-apps/xfs/ChangeLog
index 2ee97ff1b976..eab816bf8939 100644
--- a/x11-apps/xfs/ChangeLog
+++ b/x11-apps/xfs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for x11-apps/xfs
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-apps/xfs/ChangeLog,v 1.2 2005/08/08 20:14:19 fmccor Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xfs/ChangeLog,v 1.3 2005/08/16 03:08:47 spyderous Exp $
+
+*xfs-0.99.0-r1 (16 Aug 2005)
+
+ 16 Aug 2005; Donnie Berkholz <spyderous@gentoo.org>; +files/xfs.conf.d,
+ +files/xfs.config, +files/xfs.start, +xfs-0.99.0-r1.ebuild:
+ Add all the files that the monolith installed, including an init script. Add
+ a hack for changing configdir that needs to be transformed to autoconf.
08 Aug 2005; Ferris McCormick <fmccor@gentoo.org> xfs-0.99.0.ebuild:
Add ~sparc keyword (Modular X testing).
diff --git a/x11-apps/xfs/Manifest b/x11-apps/xfs/Manifest
index 92e6ee70cbb9..6545ad9dd537 100644
--- a/x11-apps/xfs/Manifest
+++ b/x11-apps/xfs/Manifest
@@ -1,3 +1,8 @@
-MD5 c83cc2c8dc8c91ec72fccefcfdc09a83 ChangeLog 446
MD5 93a42f4a9e57549fb9f35f5fddf32dd9 xfs-0.99.0.ebuild 493
+MD5 a9971e07e0ad0f26e3fee7e902d9b3db ChangeLog 769
+MD5 e081c305daf07aee011ef2b7dfed9ee9 xfs-0.99.0-r1.ebuild 933
MD5 2b625fca7f05e81ffba38dafd2d58454 files/digest-xfs-0.99.0 63
+MD5 2b625fca7f05e81ffba38dafd2d58454 files/digest-xfs-0.99.0-r1 63
+MD5 dc1de0a27cd95fd08dd071c4c4d919a6 files/xfs.conf.d 777
+MD5 1534836c0fd6c5fecaa75a8648f3b8c2 files/xfs.config 1117
+MD5 b726121a9434bfa698cb14bd396fa79f files/xfs.start 7716
diff --git a/x11-apps/xfs/files/digest-xfs-0.99.0-r1 b/x11-apps/xfs/files/digest-xfs-0.99.0-r1
new file mode 100644
index 000000000000..430ec886a40a
--- /dev/null
+++ b/x11-apps/xfs/files/digest-xfs-0.99.0-r1
@@ -0,0 +1 @@
+MD5 fc9ed8773c67bdd54a80c51e567e0076 xfs-0.99.0.tar.bz2 136432
diff --git a/x11-apps/xfs/files/xfs.conf.d b/x11-apps/xfs/files/xfs.conf.d
new file mode 100644
index 000000000000..aa4de5a87412
--- /dev/null
+++ b/x11-apps/xfs/files/xfs.conf.d
@@ -0,0 +1,23 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xfs/files/xfs.conf.d,v 1.1 2005/08/16 03:08:47 spyderous Exp $
+
+# Config file for /etc/init.d/xfs
+
+
+# Port for xfs to listen on. Default is set to "-1", meaning
+# it will only listen on unix sockets, and not tcp ports. If
+# you however want it to listen on tcp, remember to comment
+# "nolisten = tcp" in /etc/X11/fs/config.
+
+XFS_PORT="-1"
+
+
+# If this is set to "yes", then the xfs rc-script will
+# scan all the font directories in /etc/X11/fs/config for
+# changes, and if any, will add the required files. This
+# may take a while on very old boxes, so set it to "no"
+# if it takes too long for you.
+
+SETUP_FONTDIRS="yes"
+
diff --git a/x11-apps/xfs/files/xfs.config b/x11-apps/xfs/files/xfs.config
new file mode 100644
index 000000000000..ba2ea9aab94e
--- /dev/null
+++ b/x11-apps/xfs/files/xfs.config
@@ -0,0 +1,47 @@
+#
+# X Font Server configuration file
+#
+
+# allow a max of 4 clients to connect to this font server
+#client-limit = 4
+
+# no tcp, use sockets!
+no-listen = tcp
+
+# when a font server reaches its limit, start up a new one
+clone-self = on
+
+# alternate font servers for clients to use
+#alternate-servers = foo:7101,bar:7102
+
+# where to look for fonts
+# Some of these are commented out, i.e. the TrueType and Type1
+# directories in /usr/share, because they aren't forced to be
+# installed alongside X.
+#
+catalogue = /usr/share/fonts/75dpi,
+ /usr/share/fonts/100dpi,
+ /usr/share/fonts/misc,
+ /usr/share/fonts/Type1,
+ /usr/share/fonts/Speedo,
+ /usr/share/fonts/CID,
+ /usr/share/fonts/util,
+ /usr/share/fonts/local,
+ /usr/share/fonts/Speedo,
+ /usr/share/fonts/truetype,
+ /usr/share/fonts/TTF,
+ /usr/share/fonts/cyrillic,
+ /usr/share/fonts/freefont,
+ /usr/share/fonts/sharefont,
+ /usr/share/fonts/default/Type1,
+ /usr/share/fonts/ttf/decoratives,
+ /usr/share/fonts/ttf/western
+
+# in 12 points, decipoints
+default-point-size = 120
+
+# 100 x 100 and 75 x 75
+default-resolutions = 75,75,100,100
+
+# how to log errors
+use-syslog = on
diff --git a/x11-apps/xfs/files/xfs.start b/x11-apps/xfs/files/xfs.start
new file mode 100755
index 000000000000..52a9270dd92e
--- /dev/null
+++ b/x11-apps/xfs/files/xfs.start
@@ -0,0 +1,334 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# Author: Martin Schlemmer <azarah@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xfs/files/xfs.start,v 1.1 2005/08/16 03:08:47 spyderous Exp $
+
+#NB: Config is in /etc/conf.d/xfs
+
+
+opts="${opts} mkfontdirs"
+
+depend() {
+ use logger
+}
+
+check_config() {
+ if [ -z "${XFS_PORT}" ]
+ then
+ eerror "Please set \$XFS_PORT in /etc/conf.d/xfs!"
+ return 1
+ fi
+ return 0
+}
+
+# Return 0 on change, or 1 on no change, or if dir do not exist
+check_changed() {
+ local x=""
+ local fontlist=""
+
+ # If the dir do not exist, e
+ if [ ! -d $1 ]
+ then
+ return 1
+ fi
+
+ # Create a list of all non known config files in the font dir
+ fontlist="$(find $1/ -maxdepth 1 -type f | \
+ gawk '$0 !~ /fonts\..*$|^.*\.dir$|XftCache/ {print}')"
+
+ if [ ! -f $1/fonts.list ]
+ then
+ if [ -n "${fontlist}" ]
+ then
+ # No list file exist, so create it and return 0 to add
+ # this font dir as a candidate for updating...
+ echo "${fontlist}" > $1/fonts.list
+
+ return 0
+ fi
+ else
+ local retval=1
+
+ # All the fonts was removed, so cleanup
+ if [ -z "${fontlist}" ]
+ then
+ for x in $1/fonts.* $1/encodings.dir $1/XftCache
+ do
+ if [ -f ${x} ]
+ then
+ rm -f ${x}
+ fi
+ done
+
+ return 1
+ fi
+
+ # Check that no files was added or removed....
+ if [ "$(cat $1/fonts.list | md5sum)" != "$(echo "${fontlist}" | md5sum)" ]
+ then
+ retval=0
+ fi
+
+ # Check that no files was updated....
+ if [ "${retval}" -ne 0 ]
+ then
+ local changed_list=""
+
+# It should be more consistant if we consider a change to fonts.scale, or
+# encodings.dir files as a need for an update as well ...
+# changed_list="$(find $1/ -type f -cnewer $1/fonts.dir | \
+# gawk '$0 !~ /fonts\..*$|^.*\.dir$|XftCache/ {print}')"
+ changed_list="$(find $1/ -type f -cnewer $1/fonts.dir | \
+ gawk '$0 !~ /fonts\.(list|cache-1)$|XftCache/ {print}')"
+
+ if [ -n "${changed_list}" ]
+ then
+ retval=0
+ fi
+ fi
+
+ # OK, something changed, so recreate fonts.list and add as candidate
+ # for updating...
+ if [ "${retval}" -eq 0 ]
+ then
+ echo "${fontlist}" > $1/fonts.list
+
+ return 0
+ fi
+ fi
+
+ return 1
+}
+
+# This is a function to extract font dirs from
+# the xfs config file (/etc/X11/fs/config).
+get_fontdir_list() {
+ [ ! -r /etc/X11/fs/config ] && return 0
+
+ gawk '
+ BEGIN {
+
+ while((getline xfsconf_data < ("/etc/X11/fs/config")) > 0) {
+
+ # Strip any comments
+ if (xfsconf_data !~ /^[[:space:]]*#/) {
+
+ # Dont bother if its a blank line
+ if (xfsconf_data == "") continue
+
+ # If we have a line that contain 'catalogue=', we
+ # should be where the list of font dirs are
+ if (xfsconf_data ~ /catalogue[[:space:]]*=/)
+ DO_WRITE = 1
+
+ # Ok, we got our que, so start
+ if (DO_WRITE) {
+
+ # Strip and suffixes from the directory lists
+ sub(/\:[[:alnum:]]*/, "", xfsconf_data)
+
+ # Strip any leading spaces and tabs
+ sub(/^[[:space:]]*/, "", xfsconf_data)
+ # Strip the 'catalogue=' part
+ sub(/catalogue[[:space:]]*=[[:space:]]*/, "", xfsconf_data)
+
+ # The last font dir will not have a ',', so this will
+ # be the last line we read ...
+ if (xfsconf_data !~ /,$/) {
+
+ DO_WRITE = 0
+ DONE = 1
+ }
+
+ # Strip the ending ',' ...
+ sub(/,$/, "", xfsconf_data)
+
+ # If we have a valid font path, print it
+ if (xfsconf_data != "") {
+
+ have_dup = 0
+
+ # Check for duplicates ...
+ for (x in DIRLIST)
+ if (DIRLIST[x] == xfsconf_data) {
+
+ have_dup = 1
+ break
+ }
+
+ if (!have_dup) {
+ print xfsconf_data
+ DIRLIST[++i] = xfsconf_data
+ }
+ }
+ }
+
+ # No need to continue reading the file ...
+ if (DONE) break
+ }
+ }
+
+ close("/etc/X11/fs/config")
+ }'
+
+ return 0
+}
+
+# This is the main beast for setting up the font dirs
+setup_font_dirs() {
+ local x=""
+ local pending_fontdirs=""
+ local changed="no"
+
+ umask 022
+
+ local NEEDED_BIN
+ local NEEDED_BINS="/usr/X11R6/bin/mkfontdir
+ /usr/X11R6/bin/mkfontscale
+ /usr/X11R6/bin/ttmkfdir"
+ for NEEDED_BIN in ${NEEDED_BINS}
+ do
+ if [ ! -x ${NEEDED_BIN} ]
+ then
+ ewarn "Could not find the `basename ${NEEDED_BIN}` binary!"
+ return 0
+ fi
+ done
+
+ if [ ! -d /usr/share/fonts/encodings ]
+ then
+ ewarn "Encodings directory are missing!"
+ ewarn "Please restore /usr/share/fonts/encodings ..."
+ return 0
+ fi
+
+ # Generate the encodings.dir ...
+ /usr/X11R6/bin/mkfontdir -n \
+ -e /usr/share/fonts/encodings \
+ -e /usr/share/fonts/encodings/large \
+ -- /usr/share/fonts/encodings
+
+ ebegin "Scanning font directories"
+ for x in $(get_fontdir_list)
+ do
+ if test -d ${x} && check_changed ${x}
+ then
+ if [ -z "${pending_fontdirs}" ]
+ then
+ pending_fontdirs="${x}"
+ else
+ pending_fontdirs="${pending_fontdirs} ${x}"
+ fi
+ fi
+ done
+ eend 0
+
+ if [ -n "${pending_fontdirs}" ]
+ then
+ ebegin "Indexing font directories"
+ for x in ${pending_fontdirs}
+ do
+ ebegin " ${x}"
+
+ # Only generate .scale files if truetype, opentype or type1
+ # fonts are present ...
+
+ # First truetype (ttf,ttc)
+ # NOTE: ttmkfdir does NOT work on type1 fonts (#53753)
+ # Also, there is no way to regenerate Speedo/CID fonts.scale
+ # <spyderous@gentoo.org> 2 August 2004
+ if [ "${x/encodings}" = "${x}" -a \
+ -n "$(find ${x} -iname '*.tt[cf]' -print)" ]
+ then
+ /usr/X11R6/bin/ttmkfdir -x 2 \
+ -e /usr/share/fonts/encodings/encodings.dir \
+ -o ${x}/fonts.scale -d ${x} > /dev/null
+ # ttmkfdir fails on some stuff, so try mkfontscale if it does
+ local ttmkfdir_return=$?
+ if [ ${ttmkfdir_return} -ne 0 ]
+ then
+ /usr/X11R6/bin/mkfontscale \
+ -a /usr/share/fonts/encodings/encodings.dir \
+ -- ${x}
+ fi
+
+ # Next type1 and opentype (pfa,pfb,otf,otc)
+ elif [ "${x/encodings}" = "${x}" -a \
+ -n "$(find ${x} -iname '*.[po][ft][abcf]' -print)" ]
+ then
+ /usr/X11R6/bin/mkfontscale \
+ -a /usr/share/fonts/encodings/encodings.dir \
+ -- ${x}
+ fi
+
+ # Now generate fonts.dir files ...
+ if [ "${x/encodings}" = "${x}" ]
+ then
+ /usr/X11R6/bin/mkfontdir \
+ -e /usr/share/fonts/encodings \
+ -e /usr/share/fonts/encodings/large \
+ -- ${x} > /dev/null
+ fi
+
+ if [ "${x/encodings}" = "${x}" -a -x /usr/X11R6/bin/xftcache ] && \
+ [ -n "$(find ${x} -iname '*.[otps][pft][cfad]' -print)" ]
+ then
+ # xftcache is broken, but run it anyhow ...
+ /usr/X11R6/bin/xftcache ${x} &> /dev/null
+ fi
+ eend 0
+
+ changed="yes"
+ done
+ fi
+
+ # While we at it, update fontconfig's cache as well
+ if [ -x /usr/bin/fc-cache -a "${changed}" = "yes" ]
+ then
+ ebegin "Updating FC cache"
+ HOME="/root" /usr/bin/fc-cache
+ eend 0
+ fi
+}
+
+mkfontdirs() {
+ setup_font_dirs
+}
+
+start() {
+ check_config || return 1
+
+ if [ "${SETUP_FONTDIRS}" = "yes" ]
+ then
+ setup_font_dirs
+ fi
+
+ ebegin "Starting X Font Server"
+ if [ "`grep -e "^xfs:" /etc/passwd`" ] ; then
+ # Fix possible security problem, turned to hard failure in 6.8.0
+ # See discussion at http://freedesktop.org/bugzilla/show_bug.cgi?id=306
+ rm -rf /tmp/.font-unix
+ mkdir /tmp/.font-unix
+ chmod 1777 /tmp/.font-unix
+
+ start-stop-daemon --start --quiet --exec /usr/X11R6/bin/xfs \
+ -- -daemon -config /etc/X11/fs/config \
+ -droppriv -user xfs -port ${XFS_PORT} 1>&2
+ else
+ start-stop-daemon --start --quiet --exec /usr/X11R6/bin/xfs \
+ -- -daemon -config /etc/X11/fs/config \
+ -port ${XFS_PORT} 1>&2
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping X Font Server"
+ start-stop-daemon --stop --quiet --exec /usr/X11R6/bin/xfs 1>&2
+ rm -rf /tmp/.font-unix
+ eend $?
+}
+
+
+# vim:ts=4
diff --git a/x11-apps/xfs/xfs-0.99.0-r1.ebuild b/x11-apps/xfs/xfs-0.99.0-r1.ebuild
new file mode 100644
index 000000000000..72e4da5cc754
--- /dev/null
+++ b/x11-apps/xfs/xfs-0.99.0-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xfs/xfs-0.99.0-r1.ebuild,v 1.1 2005/08/16 03:08:47 spyderous Exp $
+
+# Must be before x-modular eclass is inherited
+SNAPSHOT="yes"
+
+inherit x-modular
+
+DESCRIPTION="X.Org xfs application"
+KEYWORDS="~sparc ~x86"
+IUSE="ipv6"
+RDEPEND="x11-libs/libFS
+ x11-libs/libXfont"
+DEPEND="${RDEPEND}
+ x11-proto/fontsproto"
+
+CONFIGURE_OPTIONS="$(use_enable ipv6)"
+
+pkg_setup() {
+ enewgroup xfs 33
+ enewuser xfs 33 /bin/false /etc/X11/fs xfs
+}
+
+src_unpack() {
+ x-modular_unpack_source
+ x-modular_patch_source
+
+ sed -i -e "s:^configdir =.*:configdir = \$(sysconfdir)/X11/fs:g" \
+ ${S}/Makefile.am
+
+ x-modular_reconf_source
+}
+
+src_install() {
+ x-modular_src_install
+
+ insinto /etc/X11/fs
+ newins ${FILESDIR}/xfs.config config
+ newinitd ${FILESDIR}/xfs.start xfs
+ newconfd ${FILESDIR}/xfs.conf.d xfs
+}