Difference between pages "Xorg-server 1.7 to 1.9 upgrade guide" and "Portage Git Mirror"

From Funtoo
(Difference between pages)
Jump to: navigation, search
 
 
Line 1: Line 1:
== Before upgrade ==
+
=Setting up local git mirror =
* Backup your <code>/etc/X11</code> directory.
+
* Backup the old versions of xorg-server and drivers. This can be done with <code>quickpkg</code>.
+
* <code>xorg-server</code> supports hot plugging through the event interface so ensure the <code>evdev</code> driver is enabled in <code>INPUT_DEVICES</code> in <code>make.conf</code>.
+
  
== Basic upgrade ==
+
This tutorial explains how to save bandwidth when several local computers need to pull updates from a single remote git repository.
# Read and follow [http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.8-upgrade-guide.xml Gentoo's Xorg-server 1.8 Upgrade Guide]
+
# Read [http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.9-upgrade-guide.xml Gentoo's Xorg-server 1.9 Upgrade Guide]
+
  
== After upgrade ==
+
== Use case ==
* Rebuild all drivers with new <code>xorg-server</code>, you may use <code>qlist</code> from {{Package|app-portage/portage-utils}} in order to get a list of installed drivers:
+
  
<console>
+
This tutorial will be about hosting a local mirror of funtoo git based portage tree.
###i## emerge -av1 $(qlist -IC x11-drivers/)
+
</console>
+
  
== Configuration ==
+
Following terms should be adapted
In order to configure devices that hotplugging does not handle, you may use <code>/etc/X11/xorg.conf.d</code> instead of <code>/etc/X11/xorg.conf</code>. ''xorg.conf'' is optional and if you don't need any special configuration, you may use xorg without it.
+
  
== Example config: keyboard with polish layout ==
+
<table border="1">
Next, we edit <code>/etc/X11/xorg.conf.d/10-keyboard.conf</code>:
+
<tr class="header">
 +
<th align="left">Terms</th>
 +
<th align="left">Definition</th>
 +
</tr>
 +
<tr class="odd">
 +
<td align="left">git.lan</td>
 +
<td align="left">The git-daemon local mirror host</td>
 +
</tr>
 +
<tr class="even">
 +
<td align="left">localhost</td>
 +
<td align="left">Any local host</td>
 +
</tr>
 +
<tr class="odd">
 +
<td align="left">nobody</td>
 +
<td align="left">Owner user of .git files</td>
 +
</tr>
 +
<tr class="even">
 +
<td align="left">/home/git-mirrors</td>
 +
<td align="left">Base path of git-daemon</td>
 +
</tr>
 +
</table>
 +
 
 +
== Local mirror ==
 +
 
 +
=== Git-daemon configuration ===
 +
 
 +
Prepare directories and clone portage-mini from github::
 
<pre>
 
<pre>
Section "InputClass"
+
    root@git.lan # mkdir /home/git-mirrors
Identifier "keyboard-all"
+
    root@git.lan # chown nobody /home/git-mirrors
Driver "evdev"
+
    root@git.lan # su -s /bin/sh nobody
Option "XkbRules"  "xorg"
+
    nobody $ cd /home/git-mirrors
Option "XkbModel"  "pc105"
+
    nobody $ git clone --mirror --bare git://github.com/funtoo/portage-mini-2011.git portage.git
Option "XkbLayout" "pl"
+
</pre>
  
MatchIsKeyboard "on"
+
Configure git-daemon in ''/etc/conf.d/git-daemon''::
EndSection
+
<pre>
 +
    GITDAEMON_OPTS=&quot;--syslog --verbose --enable=receive-pack --export-all&quot;
 +
    GITDAEMON_OPTS=&quot;${GITDAEMON_OPTS} --base-path=/home/git-mirrors /home/git-mirrors&quot;
 +
    GIT_USER=&quot;nobody&quot;
 +
    GIT_GROUP=&quot;nobody&quot;
 
</pre>
 
</pre>
== Known Issues ==
 
  
Check <code>/var/log/Xorg.0.log</code> if you have problems with the new <tt>xorg-server</tt>. Also, notice that some errors are present, even with a working config. Here is one such error:
+
Start Daemon::
<console>
+
[ 852.864] (EE)  ioctl EVIOCGNAME failed: Inappropriate ioctl for device
+
</console>
+
This error can be ignored, but in order to have everything clean, add <code>MatchDevicePath "/dev/input/event*"</code> into your xorg.conf. Edit <code>/etc/X11/xorg.conf.d/10-keyboard.conf</code> with your favorite text editor:
+
 
<pre>
 
<pre>
Section "InputClass"
+
     root@git.lan # /etc/init.d/git-daemon start
Identifier     "evdev pointer catchall"
+
    root@git.lan # rc-update add git-daemon default
Driver     "evdev"
+
MatchIsPointer      "on"
+
        MatchDevicePath    "/dev/input/evdev*"
+
EndSection
+
 
</pre>
 
</pre>
  
 +
=== Pull from remote ===
 +
 +
Add to /etc/cron.daily/funtoo-sync.sh::
 +
 +
<pre>    #!/bin/sh
 +
 +
    cd /home/git-mirrors/portage.git
 +
    su nobody -s &quot;/bin/sh&quot; -c &quot;git fetch --all&quot;</pre>
 +
 +
== Cloning from local git-daemon ==
 +
 +
Local clone from git.lan::
 +
 +
<pre>    root@localhost # mv /usr/portage /usr/portage.old
 +
    root@localhost # git clone git://git.lan/portage.git /usr/portage
 +
    root@localhost # cd /usr/portage
 +
    root@localhost # git checkout funtoo.org</pre>
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Revision as of 13:31, 22 August 2011

Setting up local git mirror

This tutorial explains how to save bandwidth when several local computers need to pull updates from a single remote git repository.

Use case

This tutorial will be about hosting a local mirror of funtoo git based portage tree.

Following terms should be adapted

Terms Definition
git.lan The git-daemon local mirror host
localhost Any local host
nobody Owner user of .git files
/home/git-mirrors Base path of git-daemon

Local mirror

Git-daemon configuration

Prepare directories and clone portage-mini from github::

    root@git.lan # mkdir /home/git-mirrors
    root@git.lan # chown nobody /home/git-mirrors
    root@git.lan # su -s /bin/sh nobody
    nobody $ cd /home/git-mirrors
    nobody $ git clone --mirror --bare git://github.com/funtoo/portage-mini-2011.git portage.git

Configure git-daemon in /etc/conf.d/git-daemon::

    GITDAEMON_OPTS="--syslog --verbose --enable=receive-pack --export-all"
    GITDAEMON_OPTS="${GITDAEMON_OPTS} --base-path=/home/git-mirrors /home/git-mirrors"
    GIT_USER="nobody"
    GIT_GROUP="nobody"

Start Daemon::

    root@git.lan # /etc/init.d/git-daemon start
    root@git.lan # rc-update add git-daemon default

Pull from remote

Add to /etc/cron.daily/funtoo-sync.sh::

    #!/bin/sh

    cd /home/git-mirrors/portage.git
    su nobody -s "/bin/sh" -c "git fetch --all"

Cloning from local git-daemon

Local clone from git.lan::

    root@localhost # mv /usr/portage /usr/portage.old
    root@localhost # git clone git://git.lan/portage.git /usr/portage
    root@localhost # cd /usr/portage
    root@localhost # git checkout funtoo.org