http://hades.name/blog/Hades Blag2011-04-09T06:39:20ZEdwarddjango-atompubhttp://hades.name/blog/2011/04/09/free-pdf-readers/Free PDF Readers2011-04-09T06:39:20Z2011-04-09T06:36:28Z<p>You may want this link next time you look for a <span class="caps">PDF</span> reader on a system where there is none: <a href="http://pdfreaders.org">pdfreaders.org</a></p>
http://hades.name/blog/2011/02/24/client-too-old-work-working-copy/This client is too old to work with working copy2011-02-24T08:11:00Z2011-02-24T08:01:52Z<p>Did you know, that in subversion you get this error message if you create a working copy with a new client and then try to do something with it using an old client? Seems screwed up but pretty reasonable, doesn’t? But get this: subversion will update your working copy even if you do something like “svn diff” or “svn ls” there with a newer client. And then your older client will bail out.</p>
<p>That’s pretty damn fucked up. That’s one of the design decisions you should not be allowed to make. I mean, subversion is actually pretty dumb by itself. So what was so special needed to be changed in those crappy .svn directories, so that old clients cannot understand it?</p>
<p>By the way, if you accidentally came here googling the error message: sorry, you’ll have to deal with this shit until you move to a less crappy version control software.</p>
http://hades.name/blog/2011/02/06/aeacus-reloaded/Aeacus: Reloaded2011-02-06T16:54:47Z2011-02-06T16:51:52Z<p>I’ve cleaned up my Gentoo repository “Aeacus” and published it again. Feel free to use it, comment upon it, edit it, or whatever. Just add this <span class="caps">URL</span> to your /etc/layman/layman.cfg under “overlays”:</p>
<pre><code>http://dev.hades.name/file/Aeacus/layman-list.xml
</code></pre>
http://hades.name/blog/2011/01/26/gentoo-install-checklist/Gentoo Install Checklist2011-03-17T16:50:02Z2011-01-26T16:52:16Z<p>If you want to install Gentoo you should read the <a href="http://www.gentoo.org/doc/en/handbook/index.xml">Gentoo Handbook</a>. However, if you (like myself) have already installed Gentoo for a couple (thousand) times, you know more or less everything that has to be done, but just need a list of things not to forget. So here it is:</p>
<ul>
<li><code>fdisk</code> # create the partitions you want</li>
<li><code>mkfs</code> # create the root filesystem</li>
<li><code>mount <em>root</em> /mnt/gentoo</code></li>
<li><code>cd /mnt/gentoo</code></li>
<li><code>wget -O- ftp://mirror.switch.ch/mirror/gentoo/releases/x86/current-stage3/stage3-i686-*.tar.bz2 | tar xj</code></li>
<li><code>cd usr</code></li>
<li><code>wget -O- ftp://mirror.switch.ch/mirror/gentoo/snapshots/portage-latest.tar.bz2 | tar xj</code></li>
<li><code>cd /mnt/gentoo</code></li>
<li><code>mount -t proc proc proc</code></li>
<li><code>mount --bind /dev dev</code></li>
<li><code>cp -L /etc/resolv.conf etc/</code></li>
<li><code>chroot . /bin/bash</code></li>
<li><code>env-update; source /etc/profile</code></li>
<li><code>emerge --sync</code></li>
<li><code>eselect profile set default/linux/x86</code></li>
<li><code>vim /etc/make.conf</code> # setup <span class="caps">USE</span>, <span class="caps">CFLAGS</span>, <span class="caps">CXXFLAGS</span>, <span class="caps">MAKEOPTS</span></li>
<li><code>vim /etc/locale.gen</code> # setup locales</li>
<li><code>locale-gen</code></li>
<li><code>emerge gentoo-sources</code> # configure, build and install the kernel</li>
<li><code>vim /etc/fstab</code> # setup the partitions, don’t forget root, swap</li>
<li><code>vim /etc/conf.d/hostname</code> # setup hostname</li>
<li><code>vim /etc/hosts</code> # add the hostname to localhost line</li>
<li><code>passwd</code></li>
<li><code>vim /etc/conf.d/clock; emerge --config timezone-data</code> # setup timezone</li>
<li><code>emerge syslog-ng vixie-cron mlocate</code></li>
<li><code>rc-update add syslog-ng default</code></li>
<li><code>rc-update add vixie-cron default</code></li>
<li><code>emerge reiserfsprogs xfsprogs jfsutils e2fsprogs</code> # or whatever set of <span class="caps">FS</span> you have</li>
<li><code>emerge dhcpcd</code></li>
<li><code>emerge grub</code></li>
<li><code>vim /boot/grub/grub.conf</code> # configure Grub</li>
<li><code>grep -v rootfs /proc/mounts > /etc/mtab</code></li>
<li><code>grub</code></li>
</ul>
<p>Now reboot and smell the ashes!</p>
http://hades.name/blog/2010/12/02/your-own-git-hosting-gitolite/Your Own Git Hosting: Gitolite2010-12-02T17:53:52Z2010-12-02T14:59:55Z<p>So, let’s start with setting up <a href="https://github.com/sitaramc/gitolite">gitolite</a> to host your repositories and provide <span class="caps">SSH</span> access to them. There is also a tool called gitosis, but it is not as supported and featurefull as gitolite. </p>
<p>So what does it actually do? In essence, all the developers that will access your repositories will login to your server as user “git”, run server-side git daemon and sync data with it. Gitolite will determine if a user has access to perform operations he is going to. Ok, but why bother with all this crap, and not just create a bunch of users on the server and tell them where is the repository? There is a couple of reasons.</p>
<p>Firstly, you may not want to give your developers shell access to your server. Why wouldn’t you? Who knows, probably because they are stupid or malicious, or whatever. With gitolite they won’t get a shell access, because they will only be able to login with their <span class="caps">SSH</span> keys and that <span class="caps">SSH</span> keys will be restricted to invoking gitolite only. At this point you may want to read up <span class="caps">SSH</span> manual on keys and command restrictions, if you do not yet know about it.</p>
<p>Secondly, you may want to impose certain access restrictions on them. Gitolite allows to restrict read write and rewrite down to per-branch level.</p>
<p>Thirdly, with local multiuser git access you have to fiddle a little with umasks or write a hook that fixes the permissions, but that’s unimportant and uninteresting.</p>
<p>Fourthly, you may even not have a root access. That’s right, gitolite allows you to setup multi-user repositories on systems where you have only one non-root account.</p>
<p>So let’s go ahead with installation. The <a href="https://github.com/sitaramc/gitolite/blob/pu/doc/1-INSTALL.mkd"><span class="caps">INSTALL</span></a> doc is rather straightforward and you should in fact read it instead of this blog post. <b>I am not offering the text below as a setup instructions, but merely as a log of how I installed it on my server.</b></p>
<p>First off, we require some git on our server. Please be careful to use as fresh git as possible, because it generally tends to gets even more super awesome with time. Also gitolite requires at least git 1.6.2 at the time of writing of this post. Unless you use especially sucky distribution (<em>ahem</em> debian <em>ahem</em>), you should be fine with git from your repository. I just told Portage to install me one:</p>
<div class="code"><pre>
emerge -av git
</pre></div>
<p>Although gitolite has an ebuild in Gentoo, I set it up manually and will walk you along the procedure. First, lets obtain the sources:</p>
<div class="code"><pre>
git clone git://github.com/sitaramc/gitolite.git
</pre></div>
<p>This will create a “gitolite” directory with gitolite sources. Let’s create a system directory for gitolite. I use /opt for all non-Portage packages, so let’s go ahead with:</p>
<div class="code"><pre>
GITOLITE=/opt/gitolite
sudo mkdir -p ${GITOLITE}/{bin,conf,hooks}
sudo chown -R `whoami` ${GITOLITE}/{bin,conf,hooks}
</pre></div>
<p>You may of course use another set of directories if you want. Next, we let gitolite install itself wherever we want it:</p>
<div class="code"><pre>
./src/gl-system-install ${GITOLITE}/{bin,conf,hooks}
</pre></div>
<p>This takes three arguments: directory for binaries, directory for configs and directory for hooks. Also this is the same command you would use to update your gitolite installation after you git pull the new sources.</p>
<p>We would now require a user account for git. Let’s create them!</p>
<div class="code"><pre>
sudo groupadd -r git
sudo useradd -d /srv/git -g git -m -r -s `which bash` git
</pre></div>
<p>This creates a system (-r) group git and a system (-r) user git with home directory (-d) /srv/git and shell (-s) bash, in group (-g) git, and creates its home directory (-m). Now login into your new git account. Don’t forget to add your ${<span class="caps">GITOLITE</span>}/bin directory to the .bashrc if it is not in the <span class="caps">PATH</span>:</p>
<div class="code"><pre>
sudo su — git
echo PATH='${PATH}':/opt/gitolite/bin/ >> .bashrc
source .bashrc
which gl-setup
</pre></div>
<p>Now copy over your public key to a file called username.pub and finalize gitolite setup by running:</p>
<div class="code"><pre>
gl-setup username.pub
</pre></div>
<p>After that, follow the instructions, they should be fairly straightforward. Congratulations, you’re done! The gitolite’s configuration is stored in a Git repository under gitolite, so you’d want to clone it from your computer (i.e. where you have the private key for username.pub):</p>
<div class="code"><pre>
git clone git@yourservername:gitolite-admin
cd gitolite-admin
vim conf/gitolite.conf
</pre></div>
<p>The file gitolite.conf is in fact your gitolite config file. After you edit it, save it, commit it and push to the gitolite-admin repository on your server, gitolite checks the config and makes appropriate changes to the repositories. To add users, just place their keys into keydir directory. It’s that simple! You probably would want to read <a href="https://github.com/sitaramc/gitolite/blob/pu/doc/2-admin.mkd">official admin doc</a> just about now.</p>