forked from pool/xorg-x11-server
Accepting request 26343 from X11:XOrg
Copy from X11:XOrg/xorg-x11-server based on submit request 26343 from user sndirsch OBS-URL: https://build.opensuse.org/request/show/26343 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=152
This commit is contained in:
parent
aed74c1ec3
commit
2dc08b7e13
83
xlog2xconf.sh
Normal file
83
xlog2xconf.sh
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Create minimal xorg.conf extracted from Xorg.<DISPLAY>.log
|
||||||
|
#
|
||||||
|
# -c <configfile> (use to specify configfile to create)
|
||||||
|
# -e (edit file with $EDITOR after creation)
|
||||||
|
# -f (overwrite existing <configfile>)
|
||||||
|
# -l <logfile> (use to specify X logfile to read)
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ $UID -ne 0 ]; then
|
||||||
|
echo "You must be root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
configfile=/etc/X11/xorg.conf
|
||||||
|
editor=false
|
||||||
|
overwrite=false
|
||||||
|
logfile=/var/log/Xorg.0.log
|
||||||
|
|
||||||
|
while getopts ":c:efl:" opt; do
|
||||||
|
case $opt in
|
||||||
|
c ) configfile=${OPTARG}
|
||||||
|
;;
|
||||||
|
e ) editor=true
|
||||||
|
;;
|
||||||
|
f ) overwrite=true
|
||||||
|
;;
|
||||||
|
l ) logfile=${OPTARG}
|
||||||
|
;;
|
||||||
|
* ) echo 'usage: minimal-xconfig [-c <configfile>] [-e] [-f] [-l <logfile>]'
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -f $logfile ]; then
|
||||||
|
echo "$logfile does not exist."
|
||||||
|
echo "Use \"-l <logfile>\" to specify a different logfile."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep -q -- "(==) --- Start of built-in configuration ---" $logfile; then
|
||||||
|
echo "$logfile does not contain the required xorg.conf section."
|
||||||
|
echo "Probably it uses a regular xorg.conf."
|
||||||
|
echo "Use \"-l <logfile>\" to specify a different logfile."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $configfile -a "$overwrite" == "false" ]; then
|
||||||
|
echo "$configfile already exists."
|
||||||
|
echo "Use \"-f\" to overwrite or \"-c <configfile>\" to specify a different configfile."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
begin=false
|
||||||
|
|
||||||
|
cat $logfile | \
|
||||||
|
while read line; do
|
||||||
|
if [ "$begin" == "true" ]; then
|
||||||
|
if echo $line | grep -q -- "(==) --- End of built-in configuration ---"; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
if ! echo $line | grep -q ^Section; then
|
||||||
|
if ! echo $line | grep -q ^EndSection; then
|
||||||
|
echo -n " "
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo $line
|
||||||
|
test "$line" == "EndSection" && echo
|
||||||
|
fi
|
||||||
|
elif echo $line | grep -q -- "(==) --- Start of built-in configuration ---"; then
|
||||||
|
begin=true
|
||||||
|
fi
|
||||||
|
done > $configfile
|
||||||
|
|
||||||
|
if [ "$editor" == "true" ]; then
|
||||||
|
$EDITOR $configfile
|
||||||
|
else
|
||||||
|
echo "created $configfile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Dec 13 11:52:48 CET 2009 - sndirsch@suse.de
|
||||||
|
|
||||||
|
- added xlog2xconf, which is a script to create a minimal xorg.conf
|
||||||
|
extracted from Xorg.<DISPLAY>.log
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 29 17:43:43 CET 2009 - sndirsch@suse.de
|
Sun Nov 29 17:43:43 CET 2009 - sndirsch@suse.de
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ BuildRequires: libjpeg-devel
|
|||||||
Url: http://xorg.freedesktop.org/
|
Url: http://xorg.freedesktop.org/
|
||||||
%define EXPERIMENTAL 0
|
%define EXPERIMENTAL 0
|
||||||
Version: 7.4
|
Version: 7.4
|
||||||
Release: 63
|
Release: 64
|
||||||
License: GPLv2+ ; MIT License (or similar)
|
License: GPLv2+ ; MIT License (or similar)
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Group: System/X11/Servers/XF86_4
|
Group: System/X11/Servers/XF86_4
|
||||||
@ -61,6 +61,7 @@ Source4: xorgcfg.tar.bz2
|
|||||||
Source5: modprobe.nvidia
|
Source5: modprobe.nvidia
|
||||||
%endif
|
%endif
|
||||||
Source7: xorg-docs-1.4.tar.bz2
|
Source7: xorg-docs-1.4.tar.bz2
|
||||||
|
Source8: xlog2xconf.sh
|
||||||
Patch1: fpic.diff
|
Patch1: fpic.diff
|
||||||
Patch2: p_default-module-path.diff
|
Patch2: p_default-module-path.diff
|
||||||
Patch6: pu_fixes.diff
|
Patch6: pu_fixes.diff
|
||||||
@ -421,6 +422,7 @@ mkdir -p %buildroot/var/adm/fillup-templates
|
|||||||
install -m 644 %_sourcedir/sysconfig.displaymanager.template \
|
install -m 644 %_sourcedir/sysconfig.displaymanager.template \
|
||||||
%buildroot/var/adm/fillup-templates/sysconfig.displaymanager-%name
|
%buildroot/var/adm/fillup-templates/sysconfig.displaymanager-%name
|
||||||
%endif
|
%endif
|
||||||
|
install -m 755 %_sourcedir/xlog2xconf.sh %buildroot/usr/bin/xlog2xconf
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf "$RPM_BUILD_ROOT"
|
rm -rf "$RPM_BUILD_ROOT"
|
||||||
@ -560,6 +562,7 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
%verify(not mode) /usr/bin/Xorg
|
%verify(not mode) /usr/bin/Xorg
|
||||||
|
/usr/bin/xlog2xconf
|
||||||
%endif
|
%endif
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
/usr/bin/cvt
|
/usr/bin/cvt
|
||||||
|
Loading…
Reference in New Issue
Block a user