Skip to content

deb publish: Create unique temporary files each time#1602

Open
andrewshadura wants to merge 1 commit into
aptly-dev:masterfrom
andrewshadura:deb-tmp-uniq
Open

deb publish: Create unique temporary files each time#1602
andrewshadura wants to merge 1 commit into
aptly-dev:masterfrom
andrewshadura:deb-tmp-uniq

Conversation

@andrewshadura

Copy link
Copy Markdown
Contributor

If two publish jobs run concurrently (which they arguably shouldn’t), they’d step on each other toes and remove Packages.tmp file the other job’s just created.

The API has locking for concurrent publish/drop operations on the same prefix, but command-line operations bypass that lock. Also, not having a predictable temporary filename is generally good from a security standpoint, given that cryptographic signing is involved.

Work around the issue by creating a per-job temporary file.

If two publish jobs run concurrently (which they arguably shouldn’t),
they’d step on each other toes and remove Packages.tmp file the other
job’s just created.

The API has locking for concurrent publish/drop operations on the same
prefix, but command-line operations bypass that lock. Also, not having
a predictable temporary filename is generally good from a security
standpoint, given that cryptographic signing is involved.

Work around the issue by creating a per-job temporary file.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.06%. Comparing base (f59b0d2) to head (ef65e25).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1602      +/-   ##
==========================================
- Coverage   77.37%   77.06%   -0.32%     
==========================================
  Files         165      165              
  Lines       15747    15747              
==========================================
- Hits        12185    12136      -49     
- Misses       2356     2409      +53     
+ Partials     1206     1202       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@neolynx neolynx self-assigned this Jul 7, 2026
@neolynx neolynx requested a review from a team July 7, 2026 16:04
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.

2 participants