summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-11-17 19:25:18 -0500
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-11-17 19:25:18 -0500
commit113965b2d798f08563393f2fda82ea00af3a585e (patch)
treea41bb219b40e3a6e61d5dc9207db70e47293d176
Initial commit.
-rw-r--r--.bashrc39
-rw-r--r--.emacs52
-rw-r--r--README169
-rw-r--r--do_build.conf184
-rwxr-xr-xdo_build.pl115
-rw-r--r--do_common.pm380
-rwxr-xr-xdo_fetch.pl46
-rw-r--r--do_update.conf54
-rwxr-xr-xdo_update.pl24
-rwxr-xr-xmkbuildskel.sh3
10 files changed, 1066 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
new file mode 100644
index 0000000..cb92896
--- /dev/null
+++ b/.bashrc
@@ -0,0 +1,39 @@
+# .bashrc
+
+# Source global definitions
+if [ -f /etc/bashrc ]; then
+ . /etc/bashrc
+fi
+
+# User specific aliases and functions
+alias b='git branch | grep "*"'
+alias less='less -S'
+alias grep='grep --color=always'
+
+if [ "$PS1" ]; then
+ case $TERM in
+ xterm*)
+ export PROMPT_COMMAND='echo -ne "\033]0;${HOSTNAME%%.*}"; echo -ne "\007"'
+ ;;
+ esac
+fi
+
+export N=/nfshome/ewalsh
+export MAIL=/nfshome/ewalsh/Mail/inbox
+export GIT_AUTHOR_NAME='Eamon Walsh'
+export GIT_AUTHOR_EMAIL='ewalsh@tycho.nsa.gov'
+export GIT_COMMITTER_NAME='Eamon Walsh'
+export GIT_COMMITTER_EMAIL='ewalsh@tycho.nsa.gov'
+export EMAIL='ewalsh@tycho.nsa.gov'
+export TET_ROOT=~/cvs/xtest
+export PATH=~/cvs/xtest/bin:~/cvs/xtest/xts5/bin:$PATH:/sbin:/usr/sbin
+export PS1='[\u@\h \W]\$ '
+unset MAILCHECK
+
+# Machine:
+alias w='cat $HOME/git/build.log | grep -i warning | less'
+alias s='less +G $HOME/git/build.log'
+
+export EDITOR=vi
+export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+export L=/usr/local/var/log/Xorg.0.log
diff --git a/.emacs b/.emacs
new file mode 100644
index 0000000..8b8cda5
--- /dev/null
+++ b/.emacs
@@ -0,0 +1,52 @@
+;; .emacs
+;
+;;
+;;; customizations follow
+;;
+;
+
+(setq default-truncate-lines t)
+
+;; turn off backup files
+(setq make-backup-files nil)
+(setq auto-save-default nil)
+
+;; C programming considerations
+;(setq-default indent-tabs-mode nil)
+(setq-default c-basic-offset 4)
+(c-set-offset 'substatement-open 0)
+(c-set-offset 'inextern-lang 0)
+(setq c-default-style "linux")
+
+;; Text mode considerations
+;;(define-key text-mode-map (kbd "TAB") 'tab-to-tab-stop)
+
+;; Key bindings
+(global-set-key [f1] 'goto-line)
+
+;
+;;
+;;; end customizations
+;;
+;
+
+;;; uncomment this line to disable loading of "default.el" at startup
+;; (setq inhibit-default-init t)
+
+;; turn on font-lock mode
+(when (fboundp 'global-font-lock-mode)
+ (global-font-lock-mode t))
+
+;; enable visual feedback on selections
+;(setq transient-mark-mode t)
+
+;; default to better frame titles
+(setq frame-title-format
+ (concat "%b - emacs@" (system-name)))
+
+;; default to unified diffs
+(setq diff-switches "-u")
+
+;; always end a file with a newline
+;(setq require-final-newline 'query)
+
diff --git a/README b/README
new file mode 100644
index 0000000..1981868
--- /dev/null
+++ b/README
@@ -0,0 +1,169 @@
+BUILDING THE XACE-SELINUX BRANCH
+
+
+1. Set up your Build Host
+
+You need the following packages installed beforehand. This list is from a
+Fedora box; install the equivalent for other distros if you're not using
+Fedora. The ccache package is not strictly necessary but speeds up compile
+times significantly.
+
+gcc
+ccache
+automake
+autoconf
+imake
+flex
+bison
+libtool
+zlib-devel
+xmlto
+tetex
+docbook-dtds
+xml-common
+openjade
+freetype-devel
+fontconfig-devel
+expat-devel
+gcc-c++
+libpng-devel
+ncurses-devel
+audit-libs-devel
+openssl-devel
+graphviz
+hal-devel
+
+In addition, you need a very recent version of libselinux installed. You
+could try the libselinux-devel package, but I compile and install libselinux
+directly from the Sourceforge SVN upstream.
+
+It does not matter if your build host already has an X desktop installed on
+it. In fact, you'll probably want this so you can test the SELinux-enabled
+X server by running the desktop applications on it. The build scripts will
+install the new X server into /usr/local or another path that you choose, so
+nothing will conflict.
+
+Finally, you will probably need a second machine that you can use to ssh into
+your development machine, since when the X server crashes it's usually not
+possible to get back to the console.
+
+
+2. Decide where you will Build From and Install To
+
+On my development machine I keep all the X code in $HOME/git and build
+it there, and install to /usr/local. I set the ownership of /usr/local
+to be owned by myself, so I don't need to be root to install things there.
+
+The scripts will assume this setup by default. If you wish to change it you
+can do so (as described in step 4) but make sure the install directory is
+writable by you.
+
+IMPORTANT: Make sure that your /etc/ld.so.conf configuration has the install
+directory in it so that it takes preference over the system libraries! You
+need this so that the new X server doesn't try and link with the wrong
+libraries. Add /usr/local to the files, and run ldconfig as root.
+
+
+3. Unzip the Tarball
+
+Change to your home directory (or wherever) and unzip the tarball. This will
+create the git/ directory with various subdirectories and files inside. This
+is where all the X source code will be stored.
+
+
+4. Update preferences
+
+Edit the file do_common.pm and change the settings under CONFIGURATION as
+desired. You can change the options to the configure scripts by editing
+the hash values in this section. You may want to turn off some of the
+unneeded stuff in the xserver config options; I have them enabled for
+testing purposes.
+
+
+5. Download the source
+
+Change into the git directory and run "./do_fetch.pl". This will go out and
+checkout all the sources from upstream (you obviously need Internet access
+to do this). If you get any "Operation failed" errors, e-mail me. This
+will take a while since there are so many separate modules.
+
+The script will also take care of switching to the XACE-SELINUX branch.
+
+Note that not all of the upstream source is downloaded. None of the sample
+applications are downloaded, and only a basic set of drivers.
+
+
+6. Build the source
+
+Change into the git directory and run "./do_build.pl all". This will
+build and install everything. The compile output goes in build.log in
+the git directory. If you get any errors, e-mail me. This will take a good
+long while.
+
+The argument to the do_build.pl script is a target for building. The
+targets are defined in the file do_build.conf. Each target consists
+of a list of modules to build. In particular, the "serverclean" and
+"serveronly" targets will rebuild just the server, and the "drivers"
+target will rebuild just the drivers. If you want to know more about
+the format of this file/how to add more targets, etc., e-mail me.
+
+NOTE: the drivers have an ABI dependency on the X Server. Since the SELinux
+work has broken the ABI, this means that you can't use the drivers that
+came with the Linux distro, you must use the ones compiled from source! It
+should "just work" so that the X server looks for drivers in the right place,
+but if it doesn't the symptom will be a segfaulting X server.
+
+
+7. Build the SELinux policy
+
+This can be found in the "xselinux" branch of refpolicy on the Tresys
+OSS site. Instead of checking out "trunk" checkout "branches/xselinux".
+
+Build and load this policy. It should work in either strict or targeted.
+Note that the xserver binary, /usr/local/bin/Xorg or whatever, needs to
+be labeled with xserver_exec_t, and some other special labels are defined
+in the xwindows.fc file_contexts that should be set properly.
+
+
+8. Configure the X Server
+
+The /etc/X11/xorg.conf file should be edited to match your system. I have
+tested with the simple "keyboard" and "mouse" drivers and the "vesa" video
+driver.
+
+You can edit the gdm configuration so that it starts the new X server instead
+of the system one. To do this, edit /etc/gdm/custom.conf and add these lines
+after the "[server]" line:
+
+[server-Standard]
+name=Standard server
+command=/usr/local/bin/Xorg -audit 4
+flexible=true
+
+To change back, just replace the "command" line to point to the normal server.
+
+You can also configure startx/xinit to launch a different server. Check the
+manpages for these commands.
+
+
+9. Run the X Server
+
+The server should start and run. Right now, AVC's are logged on the stderr
+of the X server as well as the log file Xorg.0.log. On my system the X
+server writes to /usr/local/var/log instead of /var/log, not sure if this
+is compiled-in behavior.
+
+In enforcing mode, things will probably break royally. The policy is still
+under development and apps typically do not handle errors from the X server
+gracefully.
+
+
+10. Updating and rebuilding
+
+To update your sources from upstream, change into the git directory and
+run "./do_update.pl all". Again the argument to the script is a target, this
+time defined in do_update.conf, which defines which packages to update.
+
+Then go back up and run the do_build.pl script as described earlier.
+
+Again if you get any errors, e-mail me.
diff --git a/do_build.conf b/do_build.conf
new file mode 100644
index 0000000..81c10a6
--- /dev/null
+++ b/do_build.conf
@@ -0,0 +1,184 @@
+[crap]
+proto:
+ x11proto
+
+[usual]
+proto:
+ xextproto
+ dri2proto
+ inputproto
+ randrproto
+ renderproto
+ xcmiscproto
+ bigreqsproto
+lib:
+ libpciaccess
+ libdrm
+ libpixman
+.:
+ mesa
+ xserver
+driver:
+ xf86-video-dummy
+ xf86-video-vesa
+ xf86-video-ati
+ xf86-video-intel
+ xf86-video-nv
+ xf86-video-nouveau
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-evdev
+app:
+ xkeyboard-config
+ xkbcomp
+
+
+[servertmp]
+util:
+ macros
+font:
+ util
+proto:
+ *
+ -panoramixproto
+.:
+ xserver
+
+
+[serverclean]
+proto:
+ dri2proto
+ inputproto
+ xf86dgaproto
+lib:
+ libpciaccess
+ libdrm
+ libpixman
+ libXi
+.:
+ mesa
+ xserver
+
+
+[server]
+.:
+ xserver(noclean)
+
+
+[drivers]
+driver:
+ xf86-video-dummy
+ xf86-video-vesa
+ xf86-video-ati
+ xf86-video-intel
+ xf86-video-nv
+ xf86-video-nouveau
+ xf86-input-void
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-evdev
+
+
+[doc]
+util:
+ macros
+doc:
+ xorg-sgml-doctools
+ xorg-docs
+
+
+[proto]
+proto:
+ *
+ -panoramixproto
+
+
+[app]
+app:
+ compiz
+
+
+[apponly]
+app:
+ compiz(noclean)
+
+
+[xcbclean]
+xcb:
+ pthread-stubs
+ proto
+ libxcb
+ xpyb
+
+
+[xcb]
+xcb:
+ proto
+ libxcb
+ xpyb
+
+
+[all]
+util:
+ macros
+font:
+ util
+doc:
+ xorg-sgml-doctools
+ xorg-docs
+data:
+ bitmaps
+proto:
+ *
+ -panoramixproto
+xcb:
+ pthread-stubs
+ proto
+ libxcb
+ xpyb
+lib:
+ +libxtrans
+ +libXau
+ +libXdmcp
+ +libX11
+ +libXext
+ +libICE
+ +libSM
+ +libXt
+ +libfontenc
+ +libXfixes
+ +libXp
+ +libXprintUtil
+ +libXmu
+ +libXpm
+ +libXaw
+ +libXrender
+ +libXcursor
+ *
+ -libXxf86rush
+ -libAppleWM
+.:
+ mesa
+ xserver
+driver:
+ xf86-video-dummy
+ xf86-video-vesa
+ xf86-video-ati
+ xf86-video-intel
+ xf86-video-nv
+ xf86-video-nouveau
+ xf86-input-void
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-evdev
+data:
+ *
+font:
+ *
+ -util
+app:
+ xinput
+ xkbcomp
+ xkeyboard-config
+ xlsatoms
+ xprop
diff --git a/do_build.pl b/do_build.pl
new file mode 100755
index 0000000..057d1e5
--- /dev/null
+++ b/do_build.pl
@@ -0,0 +1,115 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use do_common;
+
+#
+##
+###
+#### Initialization
+###
+##
+#
+my $type = shift @ARGV;
+die "Bad arguments" unless defined($type);
+
+my $resume = shift @ARGV;
+my $config_only = defined($resume) && ($resume eq 'configonly');
+$resume = undef if $config_only;
+
+chdir($basedir) or die "Failed to change directory to $basedir: $!\n";
+
+open(LOG, '>', 'build.log') or die "Failed to open log file for writing: $!\n";
+open(FH, '>&', STDOUT) or die "Failed to reopen STDOUT: $!\n";
+open(STDOUT, '>&', LOG) or die "Failed to redirect STDOUT: $!\n";
+open(STDERR, '>&', LOG) or die "Failed to redirect STDERR: $!\n";
+
+#
+##
+###
+#### Set up Environment Variables
+###
+##
+#
+$ENV{ACLOCAL_LOCALDIR} = "$prefix/share/aclocal";
+system("mkdir -p $ENV{ACLOCAL_LOCALDIR}") and do { print FH "Failed to make aclocal directory.\n"; die };
+
+if (defined($ENV{ACLOCAL}) && $ENV{ACLOCAL}) {
+ $ENV{ACLOCAL} = "$ENV{ACLOCAL} -I $ENV{ACLOCAL_LOCALDIR}";
+} else {
+ $ENV{ACLOCAL} = "aclocal -I $ENV{ACLOCAL_LOCALDIR}";
+}
+
+if (defined($ENV{PKG_CONFIG_PATH}) && $ENV{PKG_CONFIG_PATH}) {
+ $ENV{PKG_CONFIG_PATH} = "$prefix/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}";
+} else {
+ $ENV{PKG_CONFIG_PATH} = "$prefix/lib/pkgconfig";
+}
+
+unless (defined($ENV{FONTPATH}) && $ENV{FONTPATH}) {
+ $ENV{FONTPATH}="$prefix/lib/X11/fonts/misc/,$prefix/lib/X11/fonts/Type1/,$prefix/lib/X11/fonts/75dpi/,$prefix/lib/X11/fonts/100dpi/,$prefix/lib/X11/fonts/cyrillic/,$prefix/lib/X11/fonts/TTF/";
+}
+
+system("mkdir -p $prefix/var/log") and do { print FH "Failed to make var/log directory.\n"; die };
+
+#
+##
+###
+#### Read configuration and perform build
+###
+##
+#
+my $ref = &read_config($basedir, "do_build.conf", $type);
+
+for (@$ref) {
+ my ($dir, $args) = @$_;
+
+ # Check resume (second argument)
+ if (defined($resume) && $resume eq $dir) {
+ $resume = undef;
+ } elsif (defined($resume)) {
+ next;
+ }
+
+ # Change directories
+ chdir("$basedir/$dir") or do { print FH "Failed to change directory to $basedir/$dir: $!\n"; die };
+ chomp(my $pwd = `pwd`);
+ my $cmd;
+
+ # Clean/configure
+ unless ($args =~ /noclean/) {
+ print FH "CLEAN in $pwd...\n";
+ $cmd = "sh autogen.sh --prefix=$prefix ";
+ if (defined($mod_specific_configuration{$dir})) {
+ $cmd .= $mod_specific_configuration{$dir};
+ }
+ system($cmd) and do { print FH "ERROR: Autogen of '$dir' was UNSUCCESSFUL!!!\n"; die };
+ exit if $config_only;
+ system('make clean') and do { print FH "ERROR: Clean of '$dir' was UNSUCCESSFUL!!!\n"; die }
+ }
+
+ # Build
+ print FH "MAKE in $pwd...\n";
+ system('make') and do { print FH "ERROR: Make of '$dir' was UNSUCCESSFUL!!!\n"; die };
+
+ # Install
+ print FH "INSTALL in $pwd...\n";
+ my $target = 'install';
+ if ($args =~ /install:([\w-]+)/) {
+ $target = $1;
+ }
+ system("make $target") and do { print FH "ERROR: Install of '$dir' was UNSUCCESSFUL!!!\n"; die };
+
+ if ($args =~ /distcheck/) {
+ print FH "MAKE-DISTCHECK\n";
+ system('make distcheck') and do { print FH "ERROR: Make-Distcheck of libxcb was UNSUCCESSFUL!!!\n"; die };
+ }
+}
+
+close(FH);
+close(LOG);
+close(STDOUT);
+close(STDERR);
+
+exec("/sbin/fixfiles restore $prefix/bin");
diff --git a/do_common.pm b/do_common.pm
new file mode 100644
index 0000000..b02bfc0
--- /dev/null
+++ b/do_common.pm
@@ -0,0 +1,380 @@
+package do_common;
+
+use warnings;
+use strict;
+
+BEGIN {
+ use Exporter;
+ our @ISA = qw/Exporter/;
+ our @EXPORT = qw/&read_config $basedir $prefix
+ %mod_specific_configuration @all_modules/;
+}
+
+#
+##
+###
+#### CONFIGURATION
+###
+##
+#
+
+# The location of the 'git' directory
+our $basedir = $ENV{'HOME'} . '/git';
+# The location you want to install to
+our $prefix = '/usr/local';
+# Package-specific arguments to the 'configure' script
+our %mod_specific_configuration = (
+ 'app/xdm' => '--with-xft=no',
+ 'app/compiz' => '--enable-gtk',
+ 'lib/libdrm' => '--enable-radeon-experimental-api --enable-nouveau-experimental-api',
+ 'lib/libX11' => '--with-xcb=yes',
+ './xserver' => "--enable-xquartz=no --enable-dmx=no --enable-xace=yes --enable-xselinux=yes --enable-xcsecurity=yes --enable-kdrive=no --enable-xvfb=no --enable-xephyr=yes --enable-xfbdev=yes --enable-dri2=yes --enable-xnest=no",
+ 'doc/xorg-docs' => "--enable-ps=no --enable-txt=no --enable-html=yes",
+ 'driver/xf86-video-vesa' => "--enable-pciaccess=yes",
+ 'xcb/libxcb' => "--enable-selinux=yes --enable-xinput=yes",
+ 'xcb/xpyb' => "--enable-xselinux=yes --enable-xinput=yes"
+ );
+
+our @all_modules = qw|
+driver/xf86-input-acecad xorg/driver/xf86-input-acecad
+driver/xf86-input-aiptek xorg/driver/xf86-input-aiptek
+driver/xf86-input-calcomp xorg/driver/xf86-input-calcomp
+driver/xf86-input-citron xorg/driver/xf86-input-citron
+driver/xf86-input-digitaledge xorg/driver/xf86-input-digitaledge
+driver/xf86-input-dmc xorg/driver/xf86-input-dmc
+driver/xf86-input-dynapro xorg/driver/xf86-input-dynapro
+driver/xf86-input-elo2300 xorg/driver/xf86-input-elo2300
+driver/xf86-input-elographics xorg/driver/xf86-input-elographics
+driver/xf86-input-evdev xorg/driver/xf86-input-evdev
+driver/xf86-input-fpit xorg/driver/xf86-input-fpit
+driver/xf86-input-hyperpen xorg/driver/xf86-input-hyperpen
+driver/xf86-input-jamstudio xorg/driver/xf86-input-jamstudio
+driver/xf86-input-joystick xorg/driver/xf86-input-joystick
+driver/xf86-input-keyboard xorg/driver/xf86-input-keyboard
+driver/xf86-input-magellan xorg/driver/xf86-input-magellan
+driver/xf86-input-magictouch xorg/driver/xf86-input-magictouch
+driver/xf86-input-microtouch xorg/driver/xf86-input-microtouch
+driver/xf86-input-mouse xorg/driver/xf86-input-mouse
+driver/xf86-input-mutouch xorg/driver/xf86-input-mutouch
+driver/xf86-input-palmax xorg/driver/xf86-input-palmax
+driver/xf86-input-penmount xorg/driver/xf86-input-penmount
+driver/xf86-input-sample xorg/driver/xf86-input-sample
+driver/xf86-input-spaceorb xorg/driver/xf86-input-spaceorb
+driver/xf86-input-summa xorg/driver/xf86-input-summa
+driver/xf86-input-synaptics xorg/driver/xf86-input-synaptics
+driver/xf86-input-tek4957 xorg/driver/xf86-input-tek4957
+driver/xf86-input-ur98 xorg/driver/xf86-input-ur98
+driver/xf86-input-vmmouse xorg/driver/xf86-input-vmmouse
+driver/xf86-input-void xorg/driver/xf86-input-void
+driver/xf86-video-apm xorg/driver/xf86-video-apm
+driver/xf86-video-ark xorg/driver/xf86-video-ark
+driver/xf86-video-ast xorg/driver/xf86-video-ast
+driver/xf86-video-ati xorg/driver/xf86-video-ati
+driver/xf86-video-chips xorg/driver/xf86-video-chips
+driver/xf86-video-cirrus xorg/driver/xf86-video-cirrus
+driver/xf86-video-cyrix xorg/driver/xf86-video-cyrix
+driver/xf86-video-dummy xorg/driver/xf86-video-dummy
+driver/xf86-video-fbdev xorg/driver/xf86-video-fbdev
+driver/xf86-video-geode xorg/driver/xf86-video-geode
+driver/xf86-video-glide xorg/driver/xf86-video-glide
+driver/xf86-video-glint xorg/driver/xf86-video-glint
+driver/xf86-video-i128 xorg/driver/xf86-video-i128
+driver/xf86-video-i740 xorg/driver/xf86-video-i740
+driver/xf86-video-impact xorg/driver/xf86-video-impact
+driver/xf86-video-imstt xorg/driver/xf86-video-imstt
+driver/xf86-video-intel xorg/driver/xf86-video-intel
+driver/xf86-video-mga xorg/driver/xf86-video-mga
+driver/xf86-video-neomagic xorg/driver/xf86-video-neomagic
+driver/xf86-video-newport xorg/driver/xf86-video-newport
+driver/xf86-video-nouveau nouveau/xf86-video-nouveau
+driver/xf86-video-nsc xorg/driver/xf86-video-nsc
+driver/xf86-video-nv xorg/driver/xf86-video-nv
+driver/xf86-video-radeonhd xorg/driver/xf86-video-radeonhd
+driver/xf86-video-rendition xorg/driver/xf86-video-rendition
+driver/xf86-video-s3 xorg/driver/xf86-video-s3
+driver/xf86-video-s3virge xorg/driver/xf86-video-s3virge
+driver/xf86-video-savage xorg/driver/xf86-video-savage
+driver/xf86-video-siliconmotion xorg/driver/xf86-video-siliconmotion
+driver/xf86-video-sis xorg/driver/xf86-video-sis
+driver/xf86-video-sisusb xorg/driver/xf86-video-sisusb
+driver/xf86-video-sunbw2 xorg/driver/xf86-video-sunbw2
+driver/xf86-video-suncg14 xorg/driver/xf86-video-suncg14
+driver/xf86-video-suncg3 xorg/driver/xf86-video-suncg3
+driver/xf86-video-suncg6 xorg/driver/xf86-video-suncg6
+driver/xf86-video-sunffb xorg/driver/xf86-video-sunffb
+driver/xf86-video-sunleo xorg/driver/xf86-video-sunleo
+driver/xf86-video-suntcx xorg/driver/xf86-video-suntcx
+driver/xf86-video-tdfx xorg/driver/xf86-video-tdfx
+driver/xf86-video-tga xorg/driver/xf86-video-tga
+driver/xf86-video-trident xorg/driver/xf86-video-trident
+driver/xf86-video-tseng xorg/driver/xf86-video-tseng
+driver/xf86-video-v4l xorg/driver/xf86-video-v4l
+driver/xf86-video-vermilion xorg/driver/xf86-video-vermilion
+driver/xf86-video-vesa xorg/driver/xf86-video-vesa
+driver/xf86-video-vga xorg/driver/xf86-video-vga
+driver/xf86-video-via xorg/driver/xf86-video-via
+driver/xf86-video-vmware xorg/driver/xf86-video-vmware
+driver/xf86-video-voodoo xorg/driver/xf86-video-voodoo
+driver/xf86-video-wsfb xorg/driver/xf86-video-wsfb
+driver/xf86-video-xgi xorg/driver/xf86-video-xgi
+driver/xf86-video-xgixp xorg/driver/xf86-video-xgixp
+font/adobe-100dpi xorg/font/adobe-100dpi
+font/adobe-75dpi xorg/font/adobe-75dpi
+font/adobe-utopia-100dpi xorg/font/adobe-utopia-100dpi
+font/adobe-utopia-75dpi xorg/font/adobe-utopia-75dpi
+font/adobe-utopia-type1 xorg/font/adobe-utopia-type1
+font/alias xorg/font/alias
+font/arabic-misc xorg/font/arabic-misc
+font/bh-100dpi xorg/font/bh-100dpi
+font/bh-75dpi xorg/font/bh-75dpi
+font/bh-lucidatypewriter-100dpi xorg/font/bh-lucidatypewriter-100dpi
+font/bh-lucidatypewriter-75dpi xorg/font/bh-lucidatypewriter-75dpi
+font/bh-ttf xorg/font/bh-ttf
+font/bh-type1 xorg/font/bh-type1
+font/bitstream-100dpi xorg/font/bitstream-100dpi
+font/bitstream-75dpi xorg/font/bitstream-75dpi
+font/bitstream-speedo xorg/font/bitstream-speedo
+font/bitstream-type1 xorg/font/bitstream-type1
+font/cronyx-cyrillic xorg/font/cronyx-cyrillic
+font/cursor-misc xorg/font/cursor-misc
+font/daewoo-misc xorg/font/daewoo-misc
+font/dec-misc xorg/font/dec-misc
+font/encodings xorg/font/encodings
+font/ibm-type1 xorg/font/ibm-type1
+font/isas-misc xorg/font/isas-misc
+font/jis-misc xorg/font/jis-misc
+font/micro-misc xorg/font/micro-misc
+font/misc-cyrillic xorg/font/misc-cyrillic
+font/misc-ethiopic xorg/font/misc-ethiopic
+font/misc-meltho xorg/font/misc-meltho
+font/misc-misc xorg/font/misc-misc
+font/mutt-misc xorg/font/mutt-misc
+font/schumacher-misc xorg/font/schumacher-misc
+font/screen-cyrillic xorg/font/screen-cyrillic
+font/sony-misc xorg/font/sony-misc
+font/sun-misc xorg/font/sun-misc
+font/util xorg/font/util
+font/winitzki-cyrillic xorg/font/winitzki-cyrillic
+font/xfree86-type1 xorg/font/xfree86-type1
+lib/libpciaccess xorg/lib/libpciaccess
+lib/libAppleWM xorg/lib/libAppleWM
+lib/libdmx xorg/lib/libdmx
+lib/libfontenc xorg/lib/libfontenc
+lib/libFS xorg/lib/libFS
+lib/libICE xorg/lib/libICE
+lib/liboldX xorg/lib/liboldX
+lib/libSM xorg/lib/libSM
+lib/libWindowsWM xorg/lib/libWindowsWM
+lib/libX11 xorg/lib/libX11
+lib/libXau xorg/lib/libXau
+lib/libXaw xorg/lib/libXaw
+lib/libXcomposite xorg/lib/libXcomposite
+lib/libXcursor xorg/lib/libXcursor
+lib/libXdamage xorg/lib/libXdamage
+lib/libXdmcp xorg/lib/libXdmcp
+lib/libXevie xorg/lib/libXevie
+lib/libXext xorg/lib/libXext
+lib/libXfixes xorg/lib/libXfixes
+lib/libXfont xorg/lib/libXfont
+lib/libXfontcache xorg/lib/libXfontcache
+lib/libXft xorg/lib/libXft
+lib/libXi xorg/lib/libXi
+lib/libXinerama xorg/lib/libXinerama
+lib/libxkbfile xorg/lib/libxkbfile
+lib/libxkbui xorg/lib/libxkbui
+lib/libXmu xorg/lib/libXmu
+lib/libXp xorg/lib/libXp
+lib/libXpm xorg/lib/libXpm
+lib/libXprintAppUtil xorg/lib/libXprintAppUtil
+lib/libXprintUtil xorg/lib/libXprintUtil
+lib/libXrandr xorg/lib/libXrandr
+lib/libXrender xorg/lib/libXrender
+lib/libXRes xorg/lib/libXRes
+lib/libXScrnSaver xorg/lib/libXScrnSaver
+lib/libXt xorg/lib/libXt
+lib/libxtrans xorg/lib/libxtrans
+lib/libXTrap xorg/lib/libXTrap
+lib/libXtst xorg/lib/libXtst
+lib/libXv xorg/lib/libXv
+lib/libXvMC xorg/lib/libXvMC
+lib/libXxf86dga xorg/lib/libXxf86dga
+lib/libXxf86misc xorg/lib/libXxf86misc
+lib/libXxf86rush xorg/lib/libXxf86rush
+lib/libXxf86vm xorg/lib/libXxf86vm
+proto/applewmproto xorg/proto/applewmproto
+proto/bigreqsproto xorg/proto/bigreqsproto
+proto/compositeproto xorg/proto/compositeproto
+proto/damageproto xorg/proto/damageproto
+proto/dmxproto xorg/proto/dmxproto
+proto/dri2proto xorg/proto/dri2proto
+proto/evieproto xorg/proto/evieproto
+proto/fixesproto xorg/proto/fixesproto
+proto/fontcacheproto xorg/proto/fontcacheproto
+proto/fontsproto xorg/proto/fontsproto
+proto/glproto xorg/proto/glproto
+proto/inputproto xorg/proto/inputproto
+proto/kbproto xorg/proto/kbproto
+proto/panoramixproto xorg/proto/panoramixproto
+proto/pmproto xorg/proto/pmproto
+proto/printproto xorg/proto/printproto
+proto/randrproto xorg/proto/randrproto
+proto/recordproto xorg/proto/recordproto
+proto/renderproto xorg/proto/renderproto
+proto/resourceproto xorg/proto/resourceproto
+proto/scrnsaverproto xorg/proto/scrnsaverproto
+proto/trapproto xorg/proto/trapproto
+proto/videoproto xorg/proto/videoproto
+proto/windowswmproto xorg/proto/windowswmproto
+proto/x11proto xorg/proto/x11proto
+proto/xcmiscproto xorg/proto/xcmiscproto
+proto/xextproto xorg/proto/xextproto
+proto/xf86bigfontproto xorg/proto/xf86bigfontproto
+proto/xf86dgaproto xorg/proto/xf86dgaproto
+proto/xf86driproto xorg/proto/xf86driproto
+proto/xf86miscproto xorg/proto/xf86miscproto
+proto/xf86rushproto xorg/proto/xf86rushproto
+proto/xf86vidmodeproto xorg/proto/xf86vidmodeproto
+proto/xineramaproto xorg/proto/xineramaproto
+util/cf xorg/util/cf
+util/gccmakedep xorg/util/gccmakedep
+util/imake xorg/util/imake
+util/install-check xorg/util/install-check
+util/lndir xorg/util/lndir
+util/macros xorg/util/macros
+util/makedepend xorg/util/makedepend
+util/modular xorg/util/modular
+util/xmkmf xorg/util/xmkmf
+data/bitmaps xorg/data/bitmaps
+data/cursors xorg/data/cursors
+doc/xorg-docs xorg/doc/xorg-docs
+doc/xorg-sgml-doctools xorg/doc/xorg-sgml-doctools
+app/compiz xorg/app/compiz
+xcb/pthread-stubs xcb/pthread-stubs
+xcb/proto xcb/proto
+xcb/libxcb xcb/libxcb
+xcb/xpyb xcb/xpyb
+app/xkeyboard-config xkeyboard-config
+lib/libpixman pixman
+lib/libdrm mesa/drm
+mesa mesa/mesa
+xserver xorg/xserver
+|;
+
+# END CONFIGURATION
+
+# Returns array of [directory, options]
+sub read_config {
+ my ($basedir, $path, $section) = @_;
+ open(FH, '<', $path) or die "do_common: Failed to open $path for reading: $!\n";
+
+ while (<FH>) {
+ chomp;
+ last if $_ eq "[$section]";
+ }
+ die "do_common: Section $section not found in file\n" if eof(FH);
+
+ my @result;
+ my @current;
+ my $curdir;
+
+ while(<FH>) {
+ chomp;
+ next if /^\s*$/;
+ next if /^\s*\#/;
+
+ last if /^\[/;
+
+ # Reached new directory group
+ if (/^(\S+?):/) {
+ for (@current) {
+ $$_[0] =~ s/<NOSKIP>//;
+ push @result, [ "$curdir/$$_[0]", $$_[1] ];
+ }
+ @current = ();
+ $curdir = $1;
+ chdir("$basedir/$curdir") or die "do_common: Failed to change directory to $basedir/$curdir: $!\n";
+ }
+
+ # Minus operator removes from list
+ elsif (/^\t-(.+)/) {
+ my $glob = $1;
+
+ foreach my $dir (glob($glob)) {
+ # Already in list?
+ for (@current) {
+ if ($$_[0] eq $dir) {
+ $$_[0] = "<SKIP>";
+ }
+ }
+ }
+ }
+
+ # Plus operator (with arguments) forces early position
+ elsif (/^ \t \+ (.+?) \( (.*?) \) $/x) {
+ my ($glob, $args) = ($1, $2);
+
+ foreach my $dir (glob($glob)) {
+ push @current, [ "<NOSKIP>$dir", $args ];
+ }
+ }
+
+ # Plus operator (without arguments) forces early position
+ elsif (/^\t\+(.+)/) {
+ my $glob = $1;
+
+ foreach my $dir (glob($glob)) {
+ push @current, [ "<NOSKIP>$dir", "" ];
+ }
+ }
+
+ # Regular (with arguments)
+ elsif (/^ \t (.+?) \( (.*?) \) $/x) {
+ my ($glob, $args) = ($1, $2);
+
+ OUTER: foreach my $dir (glob($glob)) {
+ # Already in list?
+ for (@current) {
+ if ($$_[0] eq $dir) {
+ $$_[0] = "<SKIP>";
+ }
+ if ($$_[0] eq "<NOSKIP>$dir") {
+ next OUTER;
+ }
+ }
+ push @current, [ $dir, $args ];
+ }
+ }
+
+ # Regular (without arguments)
+ elsif (/^\t(.+)/) {
+ my $glob = $1;
+
+ OUTER: foreach my $dir (glob($glob)) {
+ # Already in list?
+ for (@current) {
+ if ($$_[0] eq $dir) {
+ $$_[0] = "<SKIP>";
+ }
+ if ($$_[0] eq "<NOSKIP>$dir") {
+ next OUTER;
+ }
+ }
+ push @current, [ $dir, "" ];
+ }
+ }
+
+ else {
+ die "do_common: Format error on line $.\n";
+ }
+ }
+ for (@current) {
+ $$_[0] =~ s/<NOSKIP>//;
+ push @result, [ "$curdir/$$_[0]", $$_[1] ];
+ }
+
+ close(FH);
+ @result = grep($$_[0] !~ /<SKIP>/, @result);
+ return \@result;
+}
+
+1;
diff --git a/do_fetch.pl b/do_fetch.pl
new file mode 100755
index 0000000..f5a25c3
--- /dev/null
+++ b/do_fetch.pl
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use do_common;
+
+$| = 1;
+
+sub fetch {
+ my $module = shift;
+ my $source = shift;
+
+ # Check if directory exists
+ if (-d "$module/.git") {
+ print "Skipping $module: detected existing git installation.\n";
+ return;
+ }
+
+ # Change into subdir if necessary
+ if ($module =~ m|/|) {
+ (my $subdir = $module) =~ s|/.*||;
+ if (! -d $subdir) {
+ mkdir($subdir) or die "Failed to create directory $subdir: $!\n";
+ }
+ chdir($subdir) or die "Failed to change directory to $subdir: $!\n";
+ }
+
+ # Run clone command
+ my $cmd = "git clone git://anongit.freedesktop.org/git/$source";
+ print "Running command: $cmd\n";
+ system($cmd) == 0 or die "Operation failed!\n";
+ print "Operation succeeded\n";
+
+ # Change back to main dir
+ chdir($basedir) or die "Failed to change directory to $basedir: $!\n";
+
+}
+
+# git-clone everything
+chdir($basedir) or die "Failed to change directory to $basedir: $!\n";
+while (@all_modules) {
+ my $module = shift @all_modules;
+ my $source = shift @all_modules;
+
+ fetch($module, $source);
+}
diff --git a/do_update.conf b/do_update.conf
new file mode 100644
index 0000000..3396b40
--- /dev/null
+++ b/do_update.conf
@@ -0,0 +1,54 @@
+[usual]
+proto:
+ dri2proto
+ inputproto
+lib:
+ libpciaccess
+ libdrm
+ libpixman
+ libXi
+driver:
+ xf86-video-dummy
+ xf86-video-vesa
+ xf86-video-ati
+ xf86-video-intel
+ xf86-video-nv
+ xf86-video-nouveau
+ xf86-input-void
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-evdev
+.:
+ mesa
+ xserver(fetch)
+app:
+ xkeyboard-config
+ compiz(fetch)
+
+
+
+
+[all]
+app:
+ *
+data:
+ *
+doc:
+ *
+driver:
+ *
+lib:
+ *
+proto:
+ *
+util:
+ *
+font:
+ *
+xcb:
+ *
+ -build
+ -test
+.:
+ mesa
+ xserver(fetch)
diff --git a/do_update.pl b/do_update.pl
new file mode 100755
index 0000000..d877a4b
--- /dev/null
+++ b/do_update.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use do_common;
+
+my $type = shift @ARGV;
+die "Bad arguments" unless defined($type);
+
+chdir($basedir) or die "Failed to change directory to $basedir: $!\n";
+
+my $ref = &read_config($basedir, "do_update.conf", $type);
+
+for (@$ref) {
+ my ($dir, $args) = @$_;
+
+ $args = 'pull' unless $args;
+
+ chdir("$basedir/$dir") or die "Failed to change directory to $basedir/$dir: $!\n";
+
+ my $cmd = "git $args";
+ chomp(my $pwd = `pwd`); print "Doing a $cmd in $dir...\n";
+ system($cmd) and print STDERR "ERROR: Update of '$dir' was UNSUCCESSFUL!!!\n";
+}
diff --git a/mkbuildskel.sh b/mkbuildskel.sh
new file mode 100755
index 0000000..87a5aaf
--- /dev/null
+++ b/mkbuildskel.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+tar --no-recursion -czpf build_skel.tgz .emacs README app data doc driver lib font proto util xcb do_*.* mkbuildskel.sh