Not a blog

Building (Semi-)static Subversion 1.9 for EPEL 7

Setup mock:

mock -r epel-7-x86_64 --rootdir /tmp/mock --init
mock -r epel-7-x86_64 --rootdir /tmp/mock -i yum
mock -r epel-7-x86_64 --rootdir /tmp/mock --shell

Install dependencies:

yum install wget scons apr-devel apr-util-devel zlib-devel openssl-devel sqlite-devel perl-ExtUtils-Embed autoconf libtool

Download and build serf:

cd /tmp
wget https://www.apache.org/dist/serf/serf-1.3.9.tar.bz2
tar -xjf serf-1.3.9.tar.bz2
cd serf-1.3.9

Download and build subversion:

cd /tmp
wget http://ftp.heikorichter.name/apache/subversion/subversion-1.9.7.tar.bz2
tar -xjf subversion-1.9.7.tar.bz2
cd subversion-1.9.7
./configure --disable-shared --enable-static --with-serf=/tmp/serf-1.3.9 CPPFLAGS="-I/tmp/serf-1.3.9" LDFLAGS="/tmp/serf-1.3.9/libserf-1.a"

Edit Makefile and change

SVN_SERF_LIBS = -lserf-1




make -j5 svn

You will get a couple of unresolved symbols errors e.g.:

/tmp/subversion-1.9.7/subversion/libsvn_ra_serf/.libs/libsvn_ra_serf-1.a(serf.o): In function `ra_serf_get_description':
/tmp/subversion-1.9.7/subversion/libsvn_ra_serf/serf.c:75: undefined reference to `serf_lib_version'

Rerun the last command, but append /tmp/serf-1.3.9/libserf-1.a -lssl -lcrypto

The result is not a completely static build

# ldd ./svn | grep serf

but it contains serf:

# ./subversion/svn/svn --version
    svn, version 1.9.7 (r1800392)
    * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
      - using serf 1.3.9 (compiled with 1.3.9)
      - handles 'http' scheme
      - handles 'https' scheme

Debian Jessie and Mock

I recently needed to build a CentOS package on Debian Jessie, however mock from jessie-backports gave me this error:

ImportError: No module named six

Turns out, I was missing the package python3-six.

Debian Jessie, Systemd and LVM Mount Failure

Is your Debian Jessie dropping you into an emergency shell on boot due to LVM mount problems? Check that your /etc/udev/rules.d/70-persistent-net.rules is valid. Also look at ip l to see if you have no interface called rename[0-9].

Raspbian, Icinga2 and Illegal Instruction

While installing icinga2 from debmon.org on a Raspberry Pi 1 running Raspbian I was getting:

Job for icinga2.service failed. See 'systemctl status icinga2.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript icinga2, action "start" failed.
Jan 26 15:16:01 pi1 prepare-dirs[3995]: Could not fetch RunAsUser variable.  Error ''. Exiting.

When running the icinga2 binary directly I got

Illegal instruction

Turns out Raspbian’s armhf is not quite armhf. Luckily I had a Raspberry Pi 2 available and with the help of rpi23-gen-image I could create a Jessie image and install icinga2.

Grub-mount Eating All the RAM

While updating from Debian wheezy to jessie, one installation hung with grub-mount using all RAM and SWAP until it got OOM killed. Disabling the grub os prober part helped.

Roundcube, Connection to Storage Server Failed

Using imaps and getting:

Could not connect to ssl://localhost:993: Unknown reason in

check that your configured servername matches the certificate’s cn.

Hiera, Puppet and Invalid Yaml Files

If you are running into this error:

Error: Could not run: undefined method `[]' for false:FalseClass

one of your yaml files in hiera is invalid, maybe empty.

Windows 7 SP 1 Not Updating

Windows 7 SP 1 fresh installed and not updating? svchost stuck at 100% CPU? PC-WELT-Fix Windows Update not helping? WSUS Offline Update not working?

This HOWTO from skanthak worked for me:

[...] Download at least the last cumulative (security) update package for Internet
Explorer 8, 3124275 alias MS16-001, and the latest (security) update package for
the Windows Update Client, currently (September 20, 2016) 3161647; the latter is
available only as part of the "July 2016" (optional) update rollup package
3172605. [...]

Firefox, Flash, HTML5 and Sound via HDMI Subdevice

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


pcm.dmixer {
    type dmix
    ipc_key 1024
    ipc_key_add_uid false
    ipc_perm 0660
    slave {
        pcm "hw:0,7"
        rate 48000
        channels 2
        period_time 0
        period_size 1024
        buffer_time 0
        buffer_size 4096

pcm.!default {
    type plug
    slave.pcm "dmixer"

Wget, Gems, Puppetserver Proxies and Authentication

When using wget with a proxy that requires authentication, special characters need to be URI encoded, e.g. # becomes %23. Using for example pa##word:

https_proxy='http://username:pa%23%23word@proxy:8080' wget https://google.com

On top of that when using gem the colon seperator between the username and pasword needs to be escaped, e.g. \::

http_proxy='http://username\:pa%23%23word@proxy:8080' gem fetch hiera-eyaml

Also note, gem will use the http_proxy environemt variable even if it is connecting to a https:// url.

But when using gem from a puppetlabs installation, e.g. /opt/puppetlabs/puppet/bin/gem, you must not escape the colon, but use HTTP_PROXY.

When installing gems into puppetserver 4, pass -p to gem install:

puppetserver gem install -p http://username\:pa%23%23word@proxy:8080 hiera-eyaml