Task #5039
closed
This is not an issue for the NFD... this is packaging system. If you talking about default config, then we cannot really change it (or need to make system-dependent), as there is no such thing on mac.
Yes, I'm talking about the configuration file and whatever other default we have in the code. And yes, this is for Linux only.
So is the issue with changing this that /run not exist on macOS?
- Assignee set to Eric Newberry
- Status changed from New to In Progress
How do we handle config files that refer to /var/run/nfd.sock?
What do you mean by "handle"? Whatever value appears in the config file takes precedence over the (hardcoded) default.
- Target version set to 22.02
Davide Pesavento wrote:
What do you mean by "handle"? Whatever value appears in the config file takes precedence over the (hardcoded) default.
Sorry, I mean the default. By default, the config file refers to /var/run/nfd.sock
. I see four possible solutions (please let me know what you think of each):
- (a) Have different default config files for each platform (seems difficult and error-prone, especially with keeping the two versions consistent).
- (b) Perform some processing at compile-time to put different defaults for each platform in the config file (seems like overkill).
- (c) Leave
/var/run/nfd.sock
in the config file, since this still works on Linux due to the symbolic link, and have the hardcoded default in the code be platform-specific (easiest).
- (d) Leave
/var/run/nfd.sock
in the config file, but comment it out so that the hardcoded platform-specific path in code is used by default (my preferred solution, seems easy and not hacky - can also add a comment indicating default values for each platform in the config file).
We already do (b) so it's not overkill, and in fact it would be trivial to add the socket path to that existing logic. (d) is fine as well. (a) is unmaintainable and strictly worse than (b). (c) is pointless.
In summary, I'd be ok with either (b) or (d).
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
I went with option (b), as discussed above.
- Status changed from Code review to Closed
Can you please open a ticket with CCL and python-ndn to inform them of the change?
Also available in: Atom
PDF