-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make gpgkeypath 🗝 support being a list 📓 #773
Comments
now that we have a unified repo in fedora this functionality would be much appreciated as we don't really gain anything from a unified repo setup without it |
I actually stumbled upon this myself when I've tried to mirror atomic repo to closer server because of the poor performance when downloading to europe. Anyways the simplest way was to
this way you can have as many gpg keys trusted and not rely on gpgkeypath |
I setup my own mirror in Europe too - https://faw.piratemirror.party/README.txt I like your approach of |
See also rpm-software-management/libdnf#43 - libdnf basically auto-imports all the keys in the filesystem, which we could support that too. |
+1 |
Support for key rollover is important for IoT use cases. |
Note that since the very beginning libostree has supported providing multiple keys in This issue came about because those paths are distinct from the libdnf stack, but one can definitely do multiple keys with libostree today, it just involves duplicating the rpm ones - for people using rpm-ostree, which is not all libostree users. |
would a PR for having OSTree auto-import all the keys in the filesystem under |
Stated like that...no. I mean, if I'm using Flatpak on Debian, it doesn't make sense to look at We could add I would note though this particular problem is also solved with rojig as in rpm-ostree we can more easily tell libostree to trust the same keys trusted for RPMs that were loaded via libdnf. |
correct..
Something like that is actually what I meant. Sorry for not being more thorough before. How about something like this where we can mix/match if needed:
So we support a single file, a list of files, or a path to a directory where all files are to be imported (or a combination of the 3). Theoretically we could add globbing in there but maybe extra credit?
yep. that's true |
If this is available to pick up and work on, I'd be happy to work on this :) |
Did some reading of the code, and have a few notes/questions:
@cgwalters @dustymabe WDYT? cc @jlebon . Anyone else feel free to add any input :) |
seems reasonable to me
I would say if globbing makes things significantly more complicated then not to worry about it. I don't think we explicitly need it for now. @cgwalters WDYT? |
I think everything you said is accurate. Globs are slightly tricky to deal with; I'd probably vote regexps over that. Today just adding everything in the dir is probably OK, though do see https://bugzilla.redhat.com/show_bug.cgi?id=1639240 |
Thanks @cgwalters! Reading the BZ linked, I'll think about a check that can be done before importing to check that the key is a valid public key - will see if one of the |
This allows specifying gpgpath as semicolon-separated list of paths that can point to a file or a directory. If a directory path is given, paths to all regular files in the directory are added to the remote as gpg ascii keys. If the path is not a directory, Adding the gpgkeypath property looks like: ostree --repo=repo remote add --set=gpgpath="/path/key1.asc;/path/keys.d" R1 https://example.com/some/remote/ostree/repo Closes ostreedev#773
This allows specifying gpgpath as semicolon-separated list of paths that can point to a file or a directory. If a directory path is given, paths to all regular files in the directory are added to the remote as gpg ascii keys. If the path is not a directory, the file is directly added (whether regular file, empty - errors will be reported later when verifying gpg keys e.g. when pulling). Adding the gpgkeypath property looks like: ostree --repo=repo remote add --set=gpgpath="/path/key1.asc;/path/keys.d" R1 https://example.com/some/remote/ostree/repo Closes ostreedev#773
This allows specifying gpgpath as semicolon-separated list of paths that can point to a file or a directory. If a directory path is given, paths to all regular files in the directory are added to the remote as gpg ascii keys. If the path is not a directory, the file is directly added (whether regular file, empty - errors will be reported later when verifying gpg keys e.g. when pulling). Adding the gpgkeypath property looks like: ostree --repo=repo remote add --set=gpgpath="/path/key1.asc;/path/keys.d" R1 https://example.com/some/remote/ostree/repo Closes ostreedev#773
This allows specifying gpgpath as list of paths that can point to a file or a directory. If a directory path is given, paths to all regular files in the directory are added to the remote as gpg ascii keys. If the path is not a directory, the file is directly added (whether regular file, empty - errors will be reported later when verifying gpg keys e.g. when pulling). Adding the gpgkeypath property looks like: ostree --repo=repo remote add --set=gpgpath="/path/key1.asc,/path/keys.d" R1 https://example.com/some/remote/ostree/repo Closes ostreedev#773
In f244c70 we added support for importing a single file, but there are use cases for multiple such as Fedora GPG keys across major versions.
We probably should try parsing this entry as a single string first, then a list, since
GKeyFile
requires the trailing;
so it wouldn't be compatible to just make it a list.The text was updated successfully, but these errors were encountered: