Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ actions:
- "sed -i '/^%forgeautosetup/d' greenboot-rs.spec"
- bash -c "git config user.name 'Packit Build' || true"
- bash -c "git config user.email 'packit@fedoraproject.org' || true"
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'
Comment on lines +40 to +45

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.

fix-spec-file:
# This runs after Packit's release processing - disable debug package to prevent saypaul error
- "sed -i '/^License:/a\\%global debug_package %{nil}' greenboot-rs.spec"
Expand Down
Loading