projects / fglrx-packaging.git / commitdiff
Build Results
 
Summary

Description: The git repository for the ATI/AMD fglrx packaging scripts.
Last Change: Mon 8/30/10 10:11

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Thu 7/8/10 5:52
Alberto Milone  
Ubuntu: add initial... 
Sat 8/28/10 12:47
Alberto Milone  
Ubuntu: add links to the... 
Fri 8/27/10 11:22
Alberto Milone  
Ubuntu: Add support for... 
Sat 8/14/10 9:39
Anssi Hannula  
Mandriva: fix XvBA on... 
Wed 8/11/10 19:08
Anssi Hannula  
Mandriva: mark cards as... 
Wed 8/11/10 18:59
Anssi Hannula  
Mandriva: switch to using... 
 
> --git a/Ubuntu/dists/intrepid/replacements/authatieventsd.sh b/Ubuntu/dists/intrepid/replacements/authatieventsd.sh
new file mode 100644
index 0000000..9db7851
--- /dev/null
+++ b/Ubuntu/dists/intrepid/replacements/authatieventsd.sh
@@ -0,+1,111 @@
+
#!/bin/sh
+
+
#
+# Control script grant/revoke access to X for the ATI External Events Daemon
+#
+# Distro maintainers may modify this reference script as necessary to conform
+# to their distribution policies.
+#
+# Copyright (c) 2006, ATI Technologies Inc.  All rights reserved.
+#
+
+
#
+# Parameters:
+#   $1 is a keyword, either "grant" or "revoke"
+#   $2 is the display name
+#   $3 is the X authorization file to be authorized
+#
+# Returns:
+#   0 if authorization was successfully granted/revoked
+#   nonzero on failure
+#
+# Note:
+#   The third parameter only makes sense if xauth is being used.  If another
+#   mechanism such as xhost is being used it can be ignored.  For setups that
+#   do not do any form of authentication(!) this script can be trimmed down
+#   to just "exit 0" and the daemon will assume that it is always authorized.
+#
+
+
GetServerAuthFile()
+{
+    
# Determine where the authorization key may be hiding.  The location will
+    # vary depending upon whether X was started via xdm/kdm, gdm or startx, so
+    # check each one in turn.
+
+    
# Check xdm
+
+    
XDM_AUTH_MASK=/var/lib/xdm/authdir/authfiles/A$1*
+    
XDM_AUTH_FILE=`ls -t $XDM_AUTH_MASK 2>/dev/null | head -n 1`   # Choose the newest file
+    if [ -"$XDM_AUTH_FILE]; then
+        SERVER_AUTH_FILE=$XDM_AUTH_FILE
+        DISP_SEARCH_STRING="#ffff#"
+        return 0
+    fi
+
+    
# Check kdm
+    KDM_AUTH_MASK=/var/run/xauth/A$1*
+    
KDM_AUTH_FILE=`ls -t $KDM_AUTH_MASK 2>/dev/null | head -n 1`   # Choose the newest file
+    if [ -"$KDM_AUTH_FILE]; then
+        SERVER_AUTH_FILE=$KDM_AUTH_FILE
+        DISP_SEARCH_STRING="#ffff#"
+        return 0
+    fi
+
+    
# Check gdm
+
+    
GDM_AUTH_FILE=/var/lib/gdm/$1.Xauth
+    if [ -e $GDM_AUTH_FILE ]; then
+        SERVER_AUTH_FILE=$GDM_AUTH_FILE
+        DISP_SEARCH_STRING="$1"
+        return 0
+    fi
+
+    
# Finally, check for startx
+
+    for 
XPID in `pidof X`; do
+        
TRIAL_XAUTH_FILE=`tr '\0' '\n' < /proc/$XPID/environ | grep -e "^XAUTHORITY=" | cut -d= -f2`
+        
TRIAL_XAUTH_KEY=`xauth -f $TRIAL_XAUTH_FILE list | grep "unix$1"`
+        if [ -
"$TRIAL_XAUTH_KEY]; then
+            SERVER_AUTH_FILE=$TRIAL_XAUTH_FILE
+            DISP_SEARCH_STRING="unix$1"
+            return 0
+        fi
+    done
+
+    
# Couldn't find the key
+
+    return -
1
+}
+
+
# Main part of script
+
+
#
+# Since the daemon is usually started during init time before X comes up,
+# $PATH may not yet contain the paths to the X binaries, particularly xauth.
+# Add the usual location for where xauth may live and fail out if we still
+# can't find it.
+#
+
+
PATH=$PATH:/usr/bin:/usr/X11R6/bin
+which xauth > /dev/null || exit -1
+
+case 
"$1" in
+    grant)
+        
GetServerAuthFile $|| exit -1
+        DISP_AUTH_KEY=`xauth -f $SERVER_AUTH_FILE list | grep $DISP_SEARCH_STRING | awk '{ print $3 }'`
+        if [ -
"$DISP_AUTH_KEY]; then
+            xauth -$3 add $$DISP_AUTH_KEY || exit -1
+        else
+            exit -
1
+        fi
+        ;;
+
+    
revoke)
+        
xauth -$3 remove $|| exit -1
+        ;;
+
+    *)
+        exit -
1
+        ;;
+
esac
+exit 0
diff 
--git a/Ubuntu/dists/intrepid/xorg-driver-fglrx.install.in b/Ubuntu/dists/intrepid/xorg-driver-fglrx.install.in
index 63d0a16
..6ac69d4 100644
--- a/Ubuntu/dists/intrepid/xorg-driver-fglrx.install.in
+++ b/Ubuntu/dists/intrepid/xorg-driver-fglrx.install.in
@@ -3,+3,@@ debian/acpi/fglrx-*-aticonfig                  etc/acpi/events
 debian
/acpi/fglrx-powermode.sh                 etc/acpi
 debian
/10fglrx                                 etc/X11/Xsession.d
 etc
/ati                                        etc
+debian/replacements/authatieventsd.sh          etc/ati

 
#binaries
 
arch/#ARCH#/usr/sbin/*                         usr/sbin
@@ -11,10 +12,10 @@ arch/#ARCH#/usr/X11R6/bin/fgl*                 usr/bin
 
usr/sbin/*sh                                   usr/share/fglrx

 #DRI stuff
-arch/#ARCH#/usr/X11R6/#LIBDIR#/liba*.so*           usr/lib
-arch/#ARCH#/usr/X11R6/#LIBDIR#/libf*.so*           usr/lib
-arch/#ARCH#/usr/X11R6/#LIBDIR#/libX*.so*           usr/lib
-arch/#ARCH#/usr/X11R6/#LIBDIR#/libG*.so*           usr/lib
+arch/#ARCH#/usr/X11R6/#LIBDIR#/liba*.so*       usr/lib
+arch/#ARCH#/usr/X11R6/#LIBDIR#/libf*.so*       usr/lib
+arch/#ARCH#/usr/X11R6/#LIBDIR#/libX*.so*       usr/lib
+arch/#ARCH#/usr/X11R6/#LIBDIR#/libG*.so*       usr/lib
 arch/#ARCH#/usr/X11R6/#LIBDIR#/modules/dri     #DRIDIR#

&n
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media