netatalk
netatalk copied to clipboard
[2.4] meson: Introduce a with-lockfile-path option
Use with-lockfile-path to set a lockfile path that is not defined in paths.h
@VorpalBlade Would you be able to test if this works to set the lockfile path in your environment?
I should be able to take a look on Friday evening (Europe time)
It almost works:
-Dwith-lockfile-path=/run/lock/netatalk results in files like /run/lock/netatalkatalkd rather than /run/lock/netatalk/atalkd. Given that the doc is "Set path to the Netatalk daemon lockfile directory" (emphasis mine), I didn't expect that.
@VorpalBlade You just need to append one slash and it should work, i.e. -Dwith-lockfile-path=/run/lock/netatalk/
You can observe the mechanism in: https://github.com/Netatalk/netatalk/blob/048471636f083900aea0cfffc20a22fdadbc2f14/include/atalk/paths.h#L16
@VorpalBlade You just need to append one slash and it should work, i.e.
-Dwith-lockfile-path=/run/lock/netatalk/You can observe the mechanism in:
https://github.com/Netatalk/netatalk/blob/048471636f083900aea0cfffc20a22fdadbc2f14/include/atalk/paths.h#L16
Of course, but it is inconsistent with how other path variables (such as pkgconfdir-path and pam-config-path) are handled. Those don't seem to need a trailing slash.
I do sympathise though: doing this correctly (e.g. not just string concatenation) in C is a bit annoying.
Fair point. This is the only spot where path string concatenation is done directly in C, rather than through the build system, IINM. It's using this macro ATALKPATHCAT which concatenates exactly two strings, so in order to avoid broader refactoring, I pushed a commit now that simply moves the final slash over to the beginning of the file name string. Does this behave correctly for you now?
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
This should work, I haven't had time to test it (and I will be out hiking today).
Enjoy your hike!
I'll go ahead and merge then, and we can roll another patch later if needed.