Skip to content

Commit 9571c12

Browse files
committed
fix(ci): harden packit rpm source prep
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent d8b8477 commit 9571c12

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.packit.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ actions:
2626
# reflects any patching that Packit may have done (e.g. version bumps).
2727
- 'bash -c "VERSION=${PACKIT_PROJECT_VERSION} && TMPDIR=$(mktemp -d) && DIR=openshell-${VERSION} && mkdir -p ${TMPDIR}/${DIR} && git ls-files -z | xargs -0 tar cf - | tar xf - -C ${TMPDIR}/${DIR}/ && tar -czf openshell-${VERSION}.tar.gz -C ${TMPDIR} ${DIR} && rm -rf ${TMPDIR}"'
2828
# Step 2: Create vendored Cargo dependencies tarball for offline RPM build.
29-
- 'bash -c "VERSION=${PACKIT_PROJECT_VERSION} && cargo vendor --quiet && tar -cJf openshell-${VERSION}-vendor.tar.xz vendor/ && rm -rf vendor/"'
30-
# Step 3: Return BOTH archive names. Packit maps each line to Source0, Source1, etc.
31-
- 'bash -c "echo openshell-${PACKIT_PROJECT_VERSION}.tar.gz && echo openshell-${PACKIT_PROJECT_VERSION}-vendor.tar.xz"'
29+
- 'bash -c "VERSION=${PACKIT_PROJECT_VERSION} && CARGO_HTTP_TIMEOUT=600 CARGO_NET_RETRY=5 cargo vendor --locked --quiet && tar -cJf openshell-${VERSION}-vendor.tar.xz vendor/ && rm -rf vendor/"'
30+
# Step 3: Return the primary archive name. Packit expects create-archive
31+
# to print one path for Source0; Source1 is patched explicitly below.
32+
- 'bash -c "echo openshell-${PACKIT_PROJECT_VERSION}.tar.gz"'
3233

3334
fix-spec-file:
3435
# Update Source0 to the generated tarball name

0 commit comments

Comments
 (0)