hello dear Sane developers I am in the process of packaging scanbd for Fedora. One thing that bothers me is the fact that I need to copy all <scanner>.conf files as scanbd relies on the user using the net backend, while scanbd acts as a saned proxy. But scanbd/saned requires a dll.conf that specifies the used backends while the user dll.conf only uses the net backend. An right now we can only have different dll.conf's inb different directories as pointed out by SANE_CONFIG_DIR.
Alternative 1) ============== It would be nice if the calling binary could specify a dll.conf to be used. The user not specifying anything would get the normal dll.conf, while a binary like saned or scanbd would see its own dll.conf (e.g. saned-dll.conf). Would it be acceptable to modify dll.c to set the conf filename (and not SANE_CONFIG_DIR) to load the required dll.conf? I am thinking of adding a SANE_DLL_PREFIX environment var that gets prepended to the dll.conf string (and dll.aliases) if defined. This way we do ensure that we do not break compatibility. E.g. if SANE_DLL_PREFIX is set to saned, we would load saned-dll.conf. My saned-dll could then specify all backends, while dll.conf would only have the net backend. Alternative 2) ============== As above, but: I consider changing / overwriting the default distributions dll.conf undesirable. We could even prepend a user to dll.conf (user-dlll.conf) even when no if the new env. var SANE_DLL_PREFIX is not defined and use that (if the file exists) but fallback to dll.conf if that does not exist. In this case I could leave the default dll.conf intact, but add a user-dll.conf that contains only the net backend from the scanbd package in addition to the sane-dll.conf (or whatever). This avoids having a file ownership issue with the standard dll.conf. What do you developers think? Would this be ok? I would like to have some feedback before I go and change the code in git. Thanks in advance for your feedback Louis