Skip to content

Update Debian Package Services and Config Directory - #1855

Merged
peternewman merged 52 commits into
OpenLightingProject:masterfrom
DaAwesomeP:DaAwesomeP-debian-systemd-and-config-dir
Apr 6, 2026
Merged

Update Debian Package Services and Config Directory#1855
peternewman merged 52 commits into
OpenLightingProject:masterfrom
DaAwesomeP:DaAwesomeP-debian-systemd-and-config-dir

Conversation

@DaAwesomeP

Copy link
Copy Markdown
Member

Now that I am using the Debian build from master in production I have found some outdated parts.

This updates the Debian package to use a modern Systemd service and moves the config folder. It also removes the reliance on Debconf to enable/disable which definitely not needed for Systemd and is redundant on Debian for init scripts (and especially redundant now that Systemd wraps init scripts by default).

Per Debian package recommendations both the init script and Systemd service will be installed, but users running systemctl start|enable|etc olad will now trigger the Systemd service instead of the init script Systemd wrapper. This fixes a big bug I was experiencing where Systemd does not properly trigger the init script and so systemctl restart olad did not work with the init script but start and stop did.

Systemd users can now override options with Systemd overrides instead of an environment file /etc/default (new preferred method).

Per Debian package recommendations the configuration files should go in /etc/ola since they are user editable and not 100% runtime-controlled. This is also where I think most users expect to find the configuration.

This creates some breaking changes, but I think this is OK for the following reasons:

  1. Until GitHub Actions Debian Builds #1812 the Debian build in this repo was broken, so surely the raw Debian build from this repo has not been used in actual production in some time.
  2. Due to the above I am 99% sure that anyone using OLA on a Debian-based system is either:
    a. Building from source, installing with make install, and creating their own config directory and service scheme
    b. Installing from the Debian package repository which already uses /etc/ola for configs and has removed the Debconf bits
  3. I am submitting this against master instead of 0.10.

These changes should make it much smoother to move between the Debian repo packages and the ones created here. As new features and bugfixes seem to have accelerated recently, the ability to use the pre-packaged master build is quite nice. Personally I experienced this because I needed KiNETv2 support (#1787).

The main remaining difference in the packages is in the way that the web assets are handled, but most users won't perceive a difference between these builds with that or would possibly try this build if that one breaks. I don't really see a need to update that part here.

Hopefully this eventually makes its way downstream to Debian and brings the Systemd service to everyone.

@DaAwesomeP

Copy link
Copy Markdown
Member Author

Requesting review from @peternewman

@DaAwesomeP

Copy link
Copy Markdown
Member Author

OK, I have this running on a production machine and it works like a charm!

@DaAwesomeP

Copy link
Copy Markdown
Member Author

@peternewman polite ping!

@yoe yoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you didn't ask for my review, but I'm giving it anyway ;-P

Although I made some suggestions for improvement, none of them are really critical, so from my POV things can go in as-is and that would be better than the status quo; but I'll leave actual approval up to @peternewman.

Comment thread debian/changelog
Comment thread debian/control
@DaAwesomeP

Copy link
Copy Markdown
Member Author

I know you didn't ask for my review, but I'm giving it anyway ;-P

I didn't ask but you're an infinitely more experienced package maintainer than me and I am excited that you left a review! :D

@peternewman

Copy link
Copy Markdown
Member

Note from the init/systemd side there's also #1444 which I suspect is stuck on me looking at some stuff (as always)...

@DaAwesomeP DaAwesomeP added this to the 0.11.0 milestone Apr 4, 2026
@DaAwesomeP
DaAwesomeP requested a review from aroffringa April 4, 2026 19:16

@aroffringa aroffringa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went over the changes and it looks great to me. It's hard to tell everything is robust to the future but I think that's fine, we can deal with that later. Shall I merge it?

@DaAwesomeP

Copy link
Copy Markdown
Member Author

I went over the changes and it looks great to me. It's hard to tell everything is robust to the future but I think that's fine, we can deal with that later. Shall I merge it?

It's really up to you! I've been ready for a while :D. @yoe approved it (and handles package management on the Debian side of things). I don't know that @peternewman ever reviewed it.

@DaAwesomeP

Copy link
Copy Markdown
Member Author

Just rebased again.

@DaAwesomeP
DaAwesomeP enabled auto-merge April 4, 2026 22:11
@DaAwesomeP
DaAwesomeP disabled auto-merge April 4, 2026 22:12

@peternewman peternewman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @DaAwesomeP . A few relatively minor comments from me...

Comment thread debian/ola.olad.service
@@ -0,0 +1,16 @@
[Unit]
Description=Open Lighting Architecture daemon
Documentation=man:olad(1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add these in a followup PR? I want to avoid tacking on anything else to this PR since it has been open so long.

Separately, I think these links should go in the man page instead of in the Systemd service. That way you see them no matter how you get to the docs on Debian. Also means fewer places to keep them updated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add these in a followup PR? I want to avoid tacking on anything else to this PR since it has been open so long.

Yeah fair point.

Separately, I think these links should go in the man page instead of in the Systemd service. That way you see them no matter how you get to the docs on Debian. Also means fewer places to keep them updated.

I think they should perhaps go in both (assuming people actually put web links in man pages, although it feels a bit like defeating the point of man. I'd hope we never need to update them anywhere regardless, as we'd just put redirects in.

Comment thread debian/ola-rdm-tests.rdm_test_server.service Outdated
Comment thread debian/ola-rdm-tests.rdm_test_server.init
Comment thread debian/ola.olad.init
Comment thread debian/ola.olad.service

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also consider what other settings we should merge in from https://github.com/OpenLightingProject/ola/pull/1444/files#diff-f6474409cdd97933e66d7f3eb687aa1bc0c23b9a6785394a5a1eb884a00d7d29 initially, versus possibly wait for the notify stuff in the next release?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has been open for nearly 3 years, so I'd like to just get this going and come back to the other parts.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also discussed this here in this PR: #1855 (comment)

Comment thread debian/ola.postinst
Comment thread olad/www/ola.js
Co-authored-by: Peter Newman <peternewman@users.noreply.github.com>
@DaAwesomeP
DaAwesomeP requested a review from peternewman April 5, 2026 00:26
@DaAwesomeP DaAwesomeP mentioned this pull request Apr 5, 2026
26 tasks
@peternewman peternewman mentioned this pull request Apr 6, 2026

@peternewman peternewman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets finally get this in...

@peternewman
peternewman merged commit 6e8147a into OpenLightingProject:master Apr 6, 2026
7 of 24 checks passed
Comment on lines +20 to -25
DAEMON_ARGS="--world-writable"

# Reads config file (will override defaults above)
[ -r /etc/default/ola-rdm-tests ] && . /etc/default/ola-rdm-tests

if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then
DAEMON_ARGS="--world-writeable"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a bit of headbanging at Plugfest (not helped by SystemD silently stealing control of the init script code, I eventually spotted we'd changed to the other spelling of the argument (without the e).

For consistence (for now) I've corrected it in:
b860a75

I guess we could think about a breaking change to drop the e at some point in the future @DaAwesomeP ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I eventually spotted we'd changed to the other spelling of the argument (without the e).
I guess we could think about a breaking change to drop the e at some point in the future @DaAwesomeP ?

Oh wow huh. I probably did this without realizing. I definitely did not mean to change the spelling of any existing args.

After a bit of headbanging at Plugfest (not helped by SystemD silently stealing control of the init script code

I will say, this has been the default behavior for a very long time now. I was going to suggest fully removing the init script in v0.12.0 or later.

Is there a reason you were still using the init script over the Systemd one? You should be able to trivially set OLAD_OPTS in a Systemd override. As simple as: systemctl edit olad and Environment=OLAD_OPTS=myopts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I eventually spotted we'd changed to the other spelling of the argument (without the e).
I guess we could think about a breaking change to drop the e at some point in the future @DaAwesomeP ?

Oh wow huh. I probably did this without realizing. I definitely did not mean to change the spelling of any existing args.

No need to apologise, all three of us reviewing it missed it too!

After a bit of headbanging at Plugfest (not helped by SystemD silently stealing control of the init script code

I will say, this has been the default behavior for a very long time now. I was going to suggest fully removing the init script in v0.12.0 or later.

Ah right, I didn't know. Wouldn't that break things for people choosing not to use SystemD (I've no idea how many people that actually is).

Is there a reason you were still using the init script over the Systemd one? You should be able to trivially set OLAD_OPTS in a Systemd override. As simple as: systemctl edit olad and Environment=OLAD_OPTS=myopts.

My issue was SystemD wasn't telling me what was wrong. It was only when I ran with set -x and stopped the include function dragging in SystemD so it really ran my bash code, I actually saw the error onscreen to realise what needed fixing. Also I've rarely had to override things at all, let alone in SystemD (does that also mean it won't load the /etc/defaults file too anymore)? Anyway I don't know if that's an us issue, our SystemD config, or SystemD itself, but I never saw the error in journalctl, just that it had exited.

@ghost

This comment was marked as off-topic.

@peternewman

This comment was marked as off-topic.

@DaAwesomeP

Copy link
Copy Markdown
Member Author

It would be good to know what's still broken after various other stuff has gone in now @DaAwesomeP ?

It looks like tests are building and passing in master so we must be good?

@peternewman

Copy link
Copy Markdown
Member

It looks like tests are building and passing in master so we must be good?

Yeah, I'm just a bit confused given I don't think I did anything to fix the last few...

@peternewman peternewman mentioned this pull request Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants