Open tschmidtb51 opened 2 years ago
From the side lines I throw in some random ideas (🙈):
1) How to distribute the config file? For now it's inside the package, shall we put it inside
/etc/
,/usr/local/share
or some other path?
- The current config might as well be two environment variables - just sayin' ...
@sthagen: The config is mandatory. I guess it won't be only 2 options in there. Nevertheless, I don't say that it needs to be yaml...
@sustefil Early stages of the standard listed the following approach:
- the corresponding argument from the command line,
- the config file specified on the command line,
- the corresponding environment variable,
- the local configuration of the program,
- the user configuration of the program or
- the system configuration of the program.
If more than one of these value is present, the program should prefer the one with the lowest number in the list above.
This pretty much matches the approach @sthagen was suggesting. (4, 5, 6 reflect the *nix best practice of working from config files). So here is my suggestion:
I'm open to drop 3 and 4 from the list.
2) Usage through CLI command is now possible, shall it be also possible to use it as a python module? (e.g. import cvrf2csaf; cvrf2csaf.convert(...))
Short and simple: Yes. We also want to be able to use that programmatically. Background: There might be certain things / issues in the resulting CSAF which a vendor can easily fix programmatically and therefore wants to include the module in his own program.
Points to discuss :
1) How to distribute the config file? For now it's inside the package, shall we put it inside
/etc/
,/usr/local/share
or some other path?See: https://github.com/csaf-tools/CVRF-CSAF-Converter/blob/issue/20-install-package/cvrf2csaf/common/utils.py#L12
2) Usage through CLI command is now possible, shall it be also possible to use it as a python module? (e.g. import cvrf2csaf; cvrf2csaf.convert(...))
Originally posted by @sustefil in https://github.com/csaf-tools/CVRF-CSAF-Converter/pull/23#issue-1094486032