Skip to content
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

Unclear documentation #104

Closed
xsuchy opened this issue Jul 25, 2022 · 3 comments
Closed

Unclear documentation #104

xsuchy opened this issue Jul 25, 2022 · 3 comments
Labels

Comments

@xsuchy
Copy link
Contributor

xsuchy commented Jul 25, 2022

Spinning off the discussion from rpm-software-management/createrepo_c#75 (comment)

I am investigating whether we can use appstream-generator for Copr instead of appstream-builder. But even after reading all the documentation and man pages and output of --help I still do not know how to use appstream-generator.

My questions are:

  1. What will generate the asgen config? Because I cannot write it for every project in Copr.
  2. What I need to run on the first run in the directory?
  3. What I need to run on every consecutive run in the directory? Should I keep some files/dirs to improve the performance?
@ximion
Copy link
Owner

ximion commented Jul 25, 2022

What will generate the asgen config? Because I cannot write it for every project in Copr.

The configuration file is supposed to be crafted manually by the user according to their needs (see https://github.com/ximion/appstream-generator/blob/master/docs/asgen-config.md ). You could of course have it generated from an external tool as well (and I do know people who do that), it's really up to you :-) These files can probably quite easily be autogenerated from a master template for things like Copr.

What I need to run on the first run in the directory?

Run appstream-generator run <suite> where suite is the suite label, e.g. "22" or "rawhide". The run command also supports a --workspace directory to set the cache/database locations, as well as a --config flag to set the JSON config file and an --export-dir flag, all of which you may find useful.

What I need to run on every consecutive run in the directory? Should I keep some files/dirs to improve the performance?

Yes - ideally you keep the whole workspace directory intact, but at the very least for incremental data generation the db and media directories must exist. The former holds the actual caches, and the latter contains extracted and rendered icons and screenshots, which are usually served on a webserver anyway. Every other data is regenerated from the caches or fresh packages, I think :-)

@xsuchy
Copy link
Contributor Author

xsuchy commented Jul 26, 2022

You could of course have it generated from an external tool as well (and I do know people who do that), it's really up to you.

Can you point me to tools that are able to generate this file?

@ximion
Copy link
Owner

ximion commented Jul 26, 2022

You could of course have it generated from an external tool as well (and I do know people who do that), it's really up to you.

Can you point me to tools that are able to generate this file?

Oh, I don't have those, this stuff is used internally in systems for some vendors. But I assume it's basically a "fetch all values from a database or other sensible location, and then feed that info into a dict that gets serialized by Python's json module" kind of deal.
I think there was a prototype for Launchpad even at some point, but I can't seem to find that work... (maybe it was a private repo)
In any case, it's not hard, writing JSON is easy from almost all languages :)

@ximion ximion closed this as completed Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants