Skip to content

Update Debian Package Services and Config Directory#1855

Open
DaAwesomeP wants to merge 52 commits intoOpenLightingProject:masterfrom
DaAwesomeP:DaAwesomeP-debian-systemd-and-config-dir
Open

Update Debian Package Services and Config Directory#1855
DaAwesomeP wants to merge 52 commits intoOpenLightingProject: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!

Copy link
Copy Markdown
Contributor

@yoe yoe left a comment

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.

@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
Copy link
Copy Markdown
Member Author

@peternewman @kripton rebased!

@kripton
Copy link
Copy Markdown
Member

kripton commented Mar 27, 2024

I saw your ping. However, since I neither use Debian nor systemd, I'm probably not really qualified to comment this one. However, when it improves the situation, I'd rather merge it (and fix later in case of problems) instead of not merging it. Ping @peternewman ;)

@DaAwesomeP
Copy link
Copy Markdown
Member Author

Hey @yoe, we might finally revisit this and I wanted to see if there are any updated Debian practices that should be worked into this PR. @aroffringa saw this Debian notice that this PR should fix.

@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
Copy link
Copy Markdown
Contributor

@aroffringa aroffringa left a comment

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
Copy link
Copy Markdown
Member

@peternewman peternewman left a comment

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...

@@ -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.

Comment on lines -24 to -29
if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then
DAEMON_ARGS="--world-writeable"
elif [ "$1" = "start" ] || [ "$1" = "stop" ] ; then
echo "The init script is currently inactive;\nuse \"dpkg-reconfigure ola-rdm-tests\" to change this." >&2
fi

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 don't know how major an issue we feel this is, but it will be a breaking change for anyone using our version of the deb build/init script. I don't believe it's been in Debian's shipped version for ages (ever?).

We could split this in half so the additions were in 0.11.0 and the removal/tidying was in whatever we call the next version...

Copy link
Copy Markdown
Member Author

@DaAwesomeP DaAwesomeP Apr 5, 2026

Choose a reason for hiding this comment

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

See my rationale at the start of the PR. The Debian build in this repo had been nonfunctional for so long that there is no way anyone is using it.

USER=olad
LOG_LEVEL=3
CONFIG_DIR="/var/lib/ola/conf"
CONFIG_DIR="/etc/ola"
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.

This will be a bigger breaking change for those users!

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.

Same applies here. I am quite confident that nobody is using our deb package over the Debian one.

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)


#create the olad user, add it to groups
getent passwd olad > /dev/null || adduser --system --no-create-home olad
getent passwd olad > /dev/null || adduser --system --home /usr/lib/olad --no-create-home olad
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.

Do we really need to specify a home despite not creating one?

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.

Yes, the Linux user still has a directory associated with it even a directory is not created. By default this is /home/olad. I probably pulled this from Debian upstream.

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'll have to get you to rebuild ola.js for some other stuff given you've clearly found the nack!

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.

Well, it's been 3 years so I have almost no memory of it now hah.

Co-authored-by: Peter Newman <peternewman@users.noreply.github.com>
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