#10191: Make NetFS stack an actual HPKG via build system ----------------------------+---------------------------- Reporter: mmadia | Owner: bonefish Type: task | Status: new Priority: normal | Milestone: R1 Component: Build System | Version: R1/Development Resolution: | Keywords: Blocked By: 10192, 11168 | Blocking: Has a Patch: 1 | Platform: All ----------------------------+---------------------------- Comment (by jalopeura): The advice I got when I asked about this on the devel list was that it should not include a settings file at all; instead the user should create whatever user settings files were needed. I'm not sure a default settings file makes sense for NetFS, anyway, since the shares defined 1) may not exist, and 2) if they do, the default settings file opens a security hole. I'm also not sure that including NetFS as a default in the UserlandFS settings makes sense. What if the user doesn't want NetFS and uses UserlandFS for something else? (On the other hand, it's not going to harm the user to have it in the default settings.) I do think that checking multiple directories for settings files makes sense, though. The only problem I see is that NetFS uses BDriverSettings to load the file, and BDriverSettings doesn't work that way - there is one settings file per object instance. If we're going to make a change like this, we should make it once, in the libroot functions that support BDriverSettings. The relevant piece currently looks like this: // TODO: use B_SYSTEM_SETTINGS_DIRECTORY instead! if (__find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, path, sizeof(path)) == B_OK) We could change that to use the data directories instead. On the other hand, if we only want to move UserlandFS add-on settings, but want regular driver settings to remain in the settings directory, then I could make a UserlandFSDriverSettings class that derives from BDriverSettings, and change the Load method to look in these other directories. Then UserlandFS and all add-ons can use that class instead of BDriverSettings. It depends on whether this change in settings locations applies to all drivers or merely to UserlandFS add-ons. To be honest, I don't really understand why you want it to be in a data directory instead of a settings directory. I'm not saying I'm unwilling to do it that way, I just don't see the reasoning behind it. I mean, the package manager behavior will be the same whether we put it in settings or in data, right? It will keep or merge the old data depending on how we set up the package. In any case, we're going to need some way to combine multiple settings files; perhaps a flag sent to parse_settings to tell it not to zero out the settings before parsing the data. In fact, glancing through driver_settings.cpp, I don't see where it handles multiple parameters with the same name, which I suppose means if a file contains two instances of the same parameter, it will use the first one found. -- Ticket URL: <https://dev.haiku-os.org/ticket/10191#comment:7> Haiku <https://dev.haiku-os.org> Haiku - the operating system.