Add generation and upload of apt sources files and metadata - #43
Add generation and upload of apt sources files and metadata#43Vedant Rokad (vrokad) wants to merge 2 commits into
Conversation
|
Tested here: https://github.com/qualcomm-linux/pkg-android-platform-tools/actions/runs/28074641374 With the debusine-action@enable-axiom |
Robie Basak (basak-qcom)
left a comment
There was a problem hiding this comment.
This looks good in general, but mismatches the spec in a few places. We can talk about changing the spec if you like, but please can we get everything aligned?
| - name: Upload sources files | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: qli-apt-sources |
There was a problem hiding this comment.
The spec says this should be called "metadata".
There was a problem hiding this comment.
Done. Renamed the artifact to metadata in the latest commit.
| if-no-files-found: error | ||
|
|
||
| - name: Upload sources metadata | ||
| uses: actions/upload-artifact@v7 |
There was a problem hiding this comment.
The spec says there should be a single artifact with multiple files, not two.
There was a problem hiding this comment.
Fixed. Merged the two upload steps into one artifact metadata that holds the .sources files and metadata.json.
| import sys | ||
|
|
||
| data = { | ||
| "package": os.environ["SRCPKG_NAME"], |
There was a problem hiding this comment.
The spec currently says this key should be "source-package". I don't mind changing it, but it's worth differentiating it from "binary package" which might be assumed when someone sees "package".
There was a problem hiding this comment.
Agreed, renamed the key from package to source-package
| Types: deb deb-src | ||
| URIs: ${qli_uri} | ||
| Suites: ${SUITE} | ||
| Components: main |
There was a problem hiding this comment.
This needs to track changes from e68a692
We also have qli-staging.sources now from 7d6fd1b which I guess needs incorporating.
Can we avoid the duplication here, and factor out the generation of the sources.list files? We could keep this script, adapt it for the most recent changes, and then have generate-step-summary use the same artifacts it generates.
See also #62 which touches the same area.
c81e55b to
c720388
Compare
| debusine-action/lib/generate-sources-tar | ||
|
|
||
| - name: Upload metadata | ||
| uses: actions/upload-artifact@v7 |
6efa2a4 to
9eba461
Compare
|
This is looking good! Breaking out the common code into sources-common.sh is nice, but why not have generate-step-summary use the same sources.list files generated by generate-sources-tar? The script interfaces will need adjusting, but I think that's fine. Please note that #62 will collide with this. I think that PR is ready to land, so maybe should land it first and then adjust this one. For this PR, I'd like to land it at the same time as #34, once we see everything working end-to-end. I asked about check statuses in #34 (review) |
9eba461 to
35cb54f
Compare
14bdf0d to
b06af0d
Compare
48ab6b9 to
b06af0d
Compare
|
I think this is going to need some refactoring to account for #103. Apologies for sending this round again, but it was a bug that would have been necessary to work around anyway. Can you perhaps use the new fetch-signing-key, extending it to support the other repositories as well, update generate-apt-config (possibly currently unused?) to use it, and then have generate-sources-tar and generate-step-summary use those? |
Introduce a new script generate-sources-tar and corresponding workflow steps to generate qli.sources, qli-ci.sources, and metadata.json, and upload them as artifacts for AXIOM/Coral consumption Signed-off-by: Vedant Rokad <vrokad@qti.qualcomm.com>
b06af0d to
288ef64
Compare
Address review feedback on the sources/metadata generation: - Extract the deb822 .sources stanza generation into lib/sources-common.sh and source it from both generate-sources-tar and generate-step-summary, so the machine-readable artifacts and the human-facing summary can no longer drift apart. The stanza now lists all components (main contrib non-free non-free-firmware), tracking e68a692. - generate-sources-tar now emits the baseline .sources for the resolved target workspace (qli or qli-staging) via DEBUSINE_TARGET_WORKSPACE, incorporating the qli-staging support from 7d6fd1b, instead of a hardcoded qli.sources. - Rename the metadata.json "package" key to "source-package" to disambiguate from binary packages. - Consolidate the two upload steps into a single artifact named "metadata" containing the .sources files and metadata.json. Signed-off-by: Vedant Rokad <vrokad@qti.qualcomm.com>
288ef64 to
0b52daa
Compare
I'm using the generate-apt-config , with the name sources-common.sh Do you want to change the name of it? or okay with this? |
Introduce a new script generate-sources-tar and corresponding workflow steps to generate qli.sources, qli-ci.sources, and metadata.json, and upload them as artifacts for AXIOM/Coral consumption