Skip to content

Conversation

@watologo1
Copy link
Contributor

Having two EnvironmentFile key words to get replace due to a recent irqbalance.service change, got silently wrong by an sed replacement of config paths...

These 2 patches unify and enhance the meson and autoconf build setup and make the 2 EnvironmentFile directories configurable.

… autonconf

Commit 724243f introduced a 2nd environment file.

This patch fixes that both files are optional.
There should be one mandatory EnvironmentFile provided by package install as
before which lives in e.g. /usr/lib
and one optional one that users/admins can place into /etc/...

Before the replacement of both EnvironmentFile directives was fragile, e.g.
a spec file's sed could easily result in overwriting both EnvironmentFile
occurences silently pointing to the same location.

This patch properly integrates the paths into meson and autoconf by
introducing 2 configurable directories, defaults set to:
/usr/etc/default
for the mandatory, package provided config file and
/etc/default
for the optional admin override conf file.
It renames misc/irqbalance.service to misc/irqbalance.service.in and replaces
the paths via AC_SUBST/AC_CONFIG_FILES (autoconf) or configure_file (meson)
via pkgconfdir and usrconfdir introduced configure/setup options:
+EnvironmentFile=@pkgconfdir@/irqbalance.env
+EnvironmentFile=-@usrconfdir@/irqbalance

irqbalance.service is now installed via autoconf/meson, by trying to fetch
systemd's unitdir via pkgconfig.
@nhorman nhorman merged commit 3b86083 into Irqbalance:master Apr 8, 2025
0 of 30 checks passed
@watologo1 watologo1 deleted the build_env_enhancements branch April 8, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants