Skip to content

ci: run apt-get update before installing Linux packages - #41854

Merged
phil-davis merged 1 commit into
masterfrom
ci/apt-get-update-before-install
Sep 23, 2026
Merged

phil-davis merged 1 commit into
masterfrom
ci/apt-get-update-before-install

Conversation

@oc-tmueller

Copy link
Copy Markdown
Contributor

Description

Every API Smoke Tests / Acceptance tests job was failing on the Install Linux packages step, and
re-running did not help — run 35783629819, job 107115884062:

E: Failed to fetch mirror+file:/etc/apt/apt-mirrors.txt/pool/main/g/ghostscript/libgs-common_10.02.1%7edfsg1-0ubuntu7.8_all.deb  404  Not Found [IP: 52.147.219.192 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

The step installed straight from the package index baked into the runner image
(ubuntu24/20260907.300). That index is stale, so the exact .deb versions it names have already
been superseded on the Azure mirror and the URLs 404. imagemagick — the one value any caller passes
for additional-packages — pulls in ghostscript, so a ghostscript security update is enough to take
down every acceptance job with no change on our side. This is the long-standing runner-images problem
in actions/runner-images#7452, and its documented workaround is to always apt-get update first.

Changes

  • apt-get update immediately before each install. Install Apache already did this; Install Linux packages and the libxml2-utils step did not.
  • -o Acquire::Retries=3 on the installs, so one flaky mirror hit retries rather than taking a whole
    matrix job down with it.
  • apt-get instead of apt for libxml2-utils — apt has no stable CLI for scripts and prints a
    warning saying so on every run.

Only .github/workflows/acceptance.yml is touched. php-unit.yml and js-unit.yml already update
before installing. The 10.16 branch has no acceptance.yml, and its only apt call
(php-unit.yml) already updates, so there is nothing to backport.

Related

Unblocks #41827, which was red purely on this and does not touch .github/ at all.

How to test

CI is the test — the acceptance jobs on this PR run the same
ci.yml → acceptance.yml path with additional-packages: 'imagemagick'. The Install Linux packages step should now show apt-get update fetching indexes followed by a clean
Setting up ghostscript / Setting up imagemagick, with no 404 Not Found.

🤖 Generated with Claude Code

Every acceptance job was failing on the "Install Linux packages" step, and
re-running did not help:

  E: Failed to fetch .../g/ghostscript/libgs-common_10.02.1~dfsg1-0ubuntu7.8_all.deb
     404  Not Found [IP: 52.147.219.192 80]
  E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

The step installed straight from the package index baked into the runner image.
That index is stale, so the exact .deb versions it names have already been
superseded on the Azure mirror and the URLs 404. A ghostscript security update -
imagemagick pulls ghostscript in - is enough to break every job, with no change
on our side. See actions/runner-images#7452.

So run apt-get update immediately before each install. "Install Apache" already
did; "Install Linux packages" and the libxml2-utils step did not.

Also:

- add -o Acquire::Retries=3 to the installs, so one flaky mirror hit retries
  instead of taking a whole matrix job down with it;
- use apt-get rather than apt for libxml2-utils - apt has no stable CLI for
  scripts and says so on every run.

Seen on https://github.com/owncloud/core/actions/runs/35783629819/job/107115884062

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@oc-tmueller
oc-tmueller requested a review from a team as a code owner September 23, 2026 09:53
@oc-tmueller

Copy link
Copy Markdown
Contributor Author

@phil-davis @jvillafanez

@phil-davis
phil-davis merged commit b137901 into master Sep 23, 2026
31 checks passed
@phil-davis
phil-davis deleted the ci/apt-get-update-before-install branch September 23, 2026 10:46
@phil-davis

Copy link
Copy Markdown
Contributor

Note: 10.16 has no acceptance.yml workflow, so there is nothing to backport.

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