Tag Archives: #freebsd

docker-registry at simulakrum

If docker on a systemd-infected system complains that it cannot log into docker-registry at simulakrum.org, add the following into docker.service file:

:~# grep simulakrum /etc/systemd/system/multi-user.target.wants/docker.service
ExecStart=/usr/bin/dockerd –insecure-registry docker-registry.simulakrum.org -H fd://

and then reload the systemd and restart docker daemon:

systemctl daemon-reload
systemctl restart docker.service

If the same things happens in a FreeBSD, add the same switch into the following file:

root@beastie:~ # grep simulakrum /usr/local/etc/rc.d/docker
daemon -p /var/run/docker.pid ${command} -d -e jail –insecure-registry docker-registry.simulakrum.org -s zfs -g ${docker_dir} -D >/var/log/docker.log 2>/var/log/docker.log

and then restart the docker daemon:

root@beastie:~ # /usr/local/etc/rc.d/docker restart
Stopping docker…
Starting docker…
root@beastie:~ #

Re-install pkg for the win

This morning another pkg update && pkg upgrade failed on my FreeBSD 11 CURRENT amd64. It was some 80-ish packages, and it wouldn’t go past py33-atspi-2.12.0_1. It took a make deinstall && make reinstall of the /usr/ports/ports-mngmt/pkg to complete the upgrade.

I couldn’t figure out in details what caused this awkward situation.

Fortunately, with the exception of the necessity to keep enchant locked if I want gedit to have language dictionaries available in the spell-checker plugin, this is the first clumsiness of the pkgng tool I’ve run into in several months of usage, even under the CURRENT branch.

There, just a brief note! 🙂

The conjugate function for clang 3.4.1 on FreeBSD fails?

Dealing with the conjugate of complex numbers brought me some linker failures for clang 3.4.1 on FreeBSD 11 CURRENT amd64:

vanja@current:/tmp % cat konjugat.c
#include <complex.h>
#include <stdio.h>

int main(void)
{
double complex kpx = 1.0 + 3.0*I;
double complex konjugat = conj(kpx);
printf(“Kompleksni broj je %.2f%+.2fi\n”, creal(kpx), cimag(kpx));
printf(“Konjugat od kpx je %.2f%+.2fi\n”, creal(konjugat) ,cimag(konjugat));
return 0;
}

Continue reading

enchant stole the languages in gedit-plugins

A note on strange gedit behaviour: after the last update of ports  – yes, there is always something wrong with ports after an update, no matter what it looks like – my gedit wasn’t able to do spell checking, though I was sure I had hunspell and aspell for at least English and German installed system-wide.

Gedit simply displayed no languages in the appropriate menu.

It would re-compile and re-install even from ports, just fine, but no re-compilation of plugins, python bindings or dictionaries helped until I re-installed enchant from ports! There, it might help someone figure out where have all the languages gone:

pkg info gedit\* \*enchant \*aspell
gedit-3.14.2
gedit-plugins-3.14.1
enchant-1.6.0_4
py27-enchant-1.6.5_6
aspell-0.60.6.1_5
de-aspell-20030222.1_1
en-aspell-7.1.0_1
it-aspell-2.2.20050523.0_1,2

Debian Wheezy i386 in FreeBSD’s bhyve

Just managed to install a Debian Wheezy i386 in the FreeBSD’s bhyve, after a failed attempts with Fedora 21 server and openSuSE 13.2. Also, grub2-bhyve wasn’t reliable until I changed the arch to i386, and the type of medium to “netinstall” – that got it rolling.

One warning – the video is uncut, and thus suffers from a few half-minute gaps during the installation.

The FreeBSD used is FreeBSD 11.0-CURRENT amd64, because at the moment bhyve is functional for AMD CPUs only in CURRENT. Continue reading

Positive, comparative, and the code used in a linux

I read a thread where OpenBSD community were discussing the code for the network time daemon, and some figures stated there seemed almost unreal. Out of the pure curiosity, that has nothing to do with deeper understanding of the ntp daemon code, I ran “a test” used there on an OpenBSD, a FreeBSD and a Linux machine. The results are truly staggering:

uname -rms ; pwd ; for i in $(find . -name “*.[ch]”); do cat $i >> allcode; done ; egrep -v ‘[:blank:]*/?\*’ allcode | grep -v “^ *$” | wc -l
OpenBSD 5.6 amd64
/usr/src/usr.sbin/ntpd
2898

uname -rms ; pwd ; for i in $(find . -name “*.[ch]”); do cat $i >> allcode; done ; egrep -v ‘[:blank:]*/?\*’ allcode | grep -v “^ *$” | wc -l
FreeBSD 11.0-CURRENT amd64
/usr/src/contrib/ntp/ntpd
40055

uname -rms ; pwd ; for i in $(find . -name “*.[ch]”); do cat $i >> allcode; done ; egrep -v ‘[[:blank:]]*/?\*’ allcode | grep -v “^ *$” | wc -l
Linux 3.17.6-200.fc20.x86_64 x86_64
/tmp/ntp-4.2.8/ntpd
102214

Project OpenBSD proved itself time and again as a proper place if you want to learn coding!

Wake-on-LAN a FreeBSD server

Compiled from at least three sources of wisdom, here is a brief wake-on-lan note for FreeBSD 10.1-STABLE.

Set your BIOS first, mine is tuned in “Advanced >> APM >> Power On By PME”!

Next, check your NIC:

# grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c
/usr/src/sys/dev/ae/if_ae.c
/usr/src/sys/dev/age/if_age.c
/usr/src/sys/dev/alc/if_alc.c
/usr/src/sys/dev/ale/if_ale.c
/usr/src/sys/dev/bxe/bxe.c
/usr/src/sys/dev/e1000/if_em.c
/usr/src/sys/dev/e1000/if_lem.c
/usr/src/sys/dev/fxp/if_fxp.c
/usr/src/sys/dev/jme/if_jme.c
/usr/src/sys/dev/nfe/if_nfe.c
/usr/src/sys/dev/nge/if_nge.c
/usr/src/sys/dev/re/if_re.c
/usr/src/sys/dev/sis/if_sis.c
/usr/src/sys/dev/ste/if_ste.c
/usr/src/sys/dev/stge/if_stge.c
/usr/src/sys/dev/txp/if_txp.c
/usr/src/sys/dev/vge/if_vge.c
/usr/src/sys/dev/vr/if_vr.c
/usr/src/sys/dev/xl/if_xl.c

Continue reading

dbus and GNOME 3.14.2 on FreeBSD 11 CURRENT

There was an update of GNOME3 for FreeBSD 11 CURRENT, and now it is 3.14.2 instead of 3.14.0. The package that can really make a difference after this update is dbus – if left in rc.conf the way it ran in GNOME2 days, similar to this:

devfs_system_ruleset=”localrules”
#dbus_enable=”YES”
#hald_enable=”YES”
#avahi_daemon_enable=”YES”
#avahi_dnsconfd_enable=”YES”
gnome_enable=”YES”
tor_enable=”YES”

it will freeze the boot, and your console will be spammed with the race conditioned messages from dbus, so much that you will think that FreeBSD just switched to systemd, too 🙂

Simply abandon the old ways, and let a single “gnome_enable=YES” in the /etc/rc.conf take care about all of the dependencies it requires.

GNOME 3.14.0 did ignore it well, GNOME 3.14.2 does not forgive it in the rc.conf.

The gnupg1 and gnupg2 post-reinstall mess on FreeBSD

Just a brief note regarding a dependency mess for SPAM plugins for Evolution: installing the spamassassin for Evolution in GNOME2 on FreeBSD 11 CURRENT pulled gnupg1 as a dependency on top of already installed gnupg2.

Since I decided to go with the bogofilter anyway, I removed the spamassassin, that in turn removed the gnupg1, but the symlinks were not re-linked after, because there was nothing left in place as /usr/local/bin/gpg once I did “sudo pkg delete gnupg1”.

However, the /usr/local/bin/gpg2 was still there, and symlinking that to /usr/local/bin/gpg was enough for Seahorse, and, consequently, to the rest of the applications that rely on the gnome-session gpg providers.