Skip to content

fix: create vendor tarball during propose_downstream#160

Open
pcdubs wants to merge 1 commit into
fedora-iot:mainfrom
pcdubs:fix-packit
Open

fix: create vendor tarball during propose_downstream#160
pcdubs wants to merge 1 commit into
fedora-iot:mainfrom
pcdubs:fix-packit

Conversation

@pcdubs

@pcdubs pcdubs commented Jan 27, 2026

Copy link
Copy Markdown
Member

Add post-modifications action to create the vendor tarball and copy it to
the downstream repository before Packit uploads to the lookaside cache.
This ensures both Source0 and Source1 are available during propose_downstream.

Follows the same pattern used by go-fdo-server and go-fdo-client.

@say-paul

Copy link
Copy Markdown
Member

create-archive does not run during release: https://packit.dev/docs/configuration/actions#syncing-the-release

Add post-modifications action to create the vendor tarball and copy it to
the downstream repository before Packit uploads to the lookaside cache.
This ensures both Source0 and Source1 are available during propose_downstream.

Follows the same pattern used by go-fdo-server and go-fdo-client.

Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
@pcdubs pcdubs changed the title fix: include vendor tarball in packit archive listing fix: create vendor tarball during propose_downstream Jan 28, 2026
@say-paul

Copy link
Copy Markdown
Member

/test

@say-paul say-paul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@knecasov knecasov left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I added one comment.

Comment thread .packit.yaml
Comment on lines +40 to +45
post-modifications:
# This runs during propose_downstream to prepare the vendor tarball for upload
- bash -c "cargo vendor vendor"
- bash -c "tar -cJf greenboot-rs-${PACKIT_PROJECT_VERSION}-vendor-patched.tar.xz vendor"
- bash -c "rm -rf vendor"
- bash -c 'if [ -n "${PACKIT_DOWNSTREAM_REPO}" ]; then cp greenboot-rs-${PACKIT_PROJECT_VERSION}-vendor-patched.tar.xz ${PACKIT_DOWNSTREAM_REPO}/; fi'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The reference implementations (go-fdo-client, go-fdo-server) use a single multi-line script with bash -xc — the -x flag gives you a trace of expanded commands in the Packit log, which makes debugging propose_downstream failures much easier. What do you think about the following modification, please?

  post-modifications:
  - |
    bash -xc '
    cargo vendor vendor
    tar -cJf "greenboot-rs-${PACKIT_PROJECT_VERSION}-vendor-patched.tar.xz" vendor
    rm -rf vendor
    if [ -n "${PACKIT_DOWNSTREAM_REPO}" ]; then
      cp "greenboot-rs-${PACKIT_PROJECT_VERSION}-vendor-patched.tar.xz" "${PACKIT_DOWNSTREAM_REPO}/"
    fi
    '

Note: I know that this pattern is not used in this file, but I still wanted to point it out.

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 suggestion above is a nice-to-have for debuggability.

@mcattamoredhat mcattamoredhat 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.

LGTM

Comment thread .packit.yaml
Comment on lines +40 to +45
post-modifications:
# This runs during propose_downstream to prepare the vendor tarball for upload
- bash -c "cargo vendor vendor"
- bash -c "tar -cJf greenboot-rs-${PACKIT_PROJECT_VERSION}-vendor-patched.tar.xz vendor"
- bash -c "rm -rf vendor"
- bash -c 'if [ -n "${PACKIT_DOWNSTREAM_REPO}" ]; then cp greenboot-rs-${PACKIT_PROJECT_VERSION}-vendor-patched.tar.xz ${PACKIT_DOWNSTREAM_REPO}/; fi'

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 suggestion above is a nice-to-have for debuggability.

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.

4 participants