New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
biboumi: init at 6.1 #30193
biboumi: init at 6.1 #30193
Conversation
description = "Modern XMPP IRC gateway"; | ||
platforms = platforms.unix; | ||
homepage = https://lab.louiz.org/louiz/biboumi; | ||
license = licenses.zlib; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to maintain this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a maintainer line. Would be fine if I'd find a mate here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and also take a look at lib/maintainers.nix
preConfigure = '' | ||
grep -lr /etc/biboumi . | while read f | ||
do | ||
substituteInPlace $f --replace /etc/biboumi $out/etc/biboumi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does makes biboumi reading its configuration always from $out
or can this be overwritten via command line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the config file is a cmdline argument, but "make install" fails without this adjustment.
}; | ||
|
||
buildInputs = [ cmake libuuid expat sqlite git libiconv libidn botan2 | ||
systemd pkgconfig udns ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is git used during the build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently a test suite is fetched. I don't like this, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will also fail to build in sandbox builds, which is what we use on hydra. So this behavior has to be prevented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems not to download anything during build. So this having git in buildInputs
is fine here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine, but I already had decided to patch it away so I can enable tests. :-)
TODO: integrate config in NixOS
- fetch catch.hpp in a reproducible way - add maintainer - enable tests - remove git dep - enable parallel building - add pandoc dep for man page - nitpicks
Only a minor thing: $ cat lib/systemd/system/biboumi.service
[Unit]
Description=Biboumi, XMPP to IRC gateway
Documentation=man:biboumi(1) https://biboumi.louiz.org
After=network.target
[Service]
Type=notify
ExecStart=/nix/store/8gk42zf0pd2k3p6xbd1yfglv2jqrfl4z-biboumi-6.1/bin/biboumi /nix/store/8gk42zf0pd2k3p6xbd1yfglv2jqrfl4z-biboumi-6.1/etc/biboumi/biboumi.cfg
ExecReload=/bin/kill -s USR1 $MAINPID
WatchdogSec=20
Restart=always
User=nobody
Group=nobody
[Install]
WantedBy=multi-user.target This service could be also changed to use the new |
Would that also work for the case where the process needs to read and write into /var/lib/biboumi, to save its database? |
@louiz no it is not suitable, if a service stores persistent data. I had the intention that biboumi was a pure network service. |
For nixos it might be also interesting how many files, the daemon would store in this directory. |
At the moment, biboumi only store one file here: /var/lib/biboumi/biboumi.sqlite It’s a file created by sqlite3, storing the whole database. This is optional (if biboumi is compiled without the sqlite3 support), that’s why it’s nobody:nobody by default, in the case where biboumi doesn’t use any database. In the future, biboumi might also be able to use postgresql too. |
- only CMakeLists.txt has to be patched regarding /etc/biboumi - substitute /bin/kill in systemd service file - prepare for configuring policy_directory in a future cfg file
@louiz I just read that systemd can also change owners of directories with |
Thank you, that’s very interesting! I’ll probably use that in the upstream biboumi.service file. |
TODO: integrate config in NixOS
The config file referenced in the systemd service file is not existent atm and its options should be integrated into configuration.nix, but I am a newbie :-)
Motivation for this change
Provide my favourite XMPP IRC gateway.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)