Skip to content

Add generation and upload of apt sources files and metadata - #43

Open
Vedant Rokad (vrokad) wants to merge 2 commits into
qualcomm-linux:mainfrom
vrokad:qli-source-artifact
Open

Add generation and upload of apt sources files and metadata#43
Vedant Rokad (vrokad) wants to merge 2 commits into
qualcomm-linux:mainfrom
vrokad:qli-source-artifact

Conversation

@vrokad

Copy link
Copy Markdown
Contributor

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

@vrokad

Copy link
Copy Markdown
Contributor Author

Tested here: https://github.com/qualcomm-linux/pkg-android-platform-tools/actions/runs/28074641374

With the debusine-action@enable-axiom

@basak-qcom Robie Basak (basak-qcom) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread .github/workflows/debusine.yml Outdated
- name: Upload sources files
uses: actions/upload-artifact@v7
with:
name: qli-apt-sources

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec says this should be called "metadata".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Renamed the artifact to metadata in the latest commit.

Comment thread .github/workflows/debusine.yml Outdated
if-no-files-found: error

- name: Upload sources metadata
uses: actions/upload-artifact@v7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec says there should be a single artifact with multiple files, not two.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Merged the two upload steps into one artifact metadata that holds the .sources files and metadata.json.

Comment thread lib/generate-sources-tar Outdated
import sys

data = {
"package": os.environ["SRCPKG_NAME"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

@vrokad Vedant Rokad (vrokad) Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, renamed the key from package to source-package

Comment thread lib/generate-sources-tar Outdated
Types: deb deb-src
URIs: ${qli_uri}
Suites: ${SUITE}
Components: main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/debusine.yml Fixed
Comment thread .github/workflows/debusine.yml Fixed
debusine-action/lib/generate-sources-tar

- name: Upload metadata
uses: actions/upload-artifact@v7
@vrokad
Vedant Rokad (vrokad) force-pushed the qli-source-artifact branch 2 times, most recently from 6efa2a4 to 9eba461 Compare July 13, 2026 11:43
@vrokad

Copy link
Copy Markdown
Contributor Author

@basak-qcom

Copy link
Copy Markdown
Contributor

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)

@basak-qcom

Copy link
Copy Markdown
Contributor

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>
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>
@vrokad

Copy link
Copy Markdown
Contributor Author

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?

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants