Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Allow apt-get update to accept release info changes dynamically #3611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
Loading
from

Conversation

mzaman
Copy link

@mzaman mzaman commented Apr 28, 2025

Summary

This PR fixes a common build failure in the workspace container caused by upstream Ubuntu PPA metadata changes (ReleaseInfo changes).
It introduces a new environment variable WORKSPACE_ALLOW_RELEASE_INFO_CHANGE (default: false) to optionally allow APT to accept suite/label changes without manual intervention.

  • The fix is backward-compatible and opt-in.
  • There is no side effect on existing users unless they explicitly enable the new variable.

Problem

When building the workspace container, users may encounter APT errors regarding repository metadata changes:

E: Repository 'http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease' changed its 'Label' value from '***** The main PPA for supported PHP versions with many PECL extensions *****' to 'PPA for PHP'

This problem occurs more frequently after upgrading to newer operating systems such as macOS Sequoia 15.4.1, due to stricter base image validations or upstream repository changes.
However, it is not specific to macOS — it can happen on any OS whenever Ubuntu-based repositories modify their metadata.


Root Cause

  • Ubuntu PPAs occasionally update their "Label" or "Suite" fields.
  • APT treats these changes as potential security risks and blocks further installs.
  • Since Docker builds are non-interactive, APT cannot prompt for confirmation and fails immediately.

Proposed Fix

  • Add a new .env variable: WORKSPACE_ALLOW_RELEASE_INFO_CHANGE.
  • If set to true, dynamically pass the --allow-releaseinfo-change flag to apt-get update during build time.
  • If set to false (default), APT behaves normally without accepting release info changes.

How it Works

  • Added ARG WORKSPACE_ALLOW_RELEASE_INFO_CHANGE and ENV WORKSPACE_ALLOW_RELEASE_INFO_CHANGE in the workspace Dockerfile.
  • Inside the build RUN block, the script checks the value of this environment variable.
  • If enabled, the --allow-releaseinfo-change flag is appended to the apt-get update command.
  • This avoids build-time failures without modifying global system configurations (like /etc/apt/apt.conf.d/).

Benefits

  • Workspace builds succeed automatically even when PPAs update metadata.
  • No need for manual Dockerfile edits or intervention.
  • Safe, optional, and minimal change to existing behavior.
  • Fully environment-driven, respecting Laradock's conventions.

Checklist

  • Fully backward-compatible
  • Minimal code surface
  • No runtime impact
  • No security weakening unless explicitly enabled
  • Controlled via environment variable
  • Tested with both WORKSPACE_ALLOW_RELEASE_INFO_CHANGE=true and false
  • Tested on both Intel and Apple Silicon (M1/M2) macOS systems

Suggested Documentation Update

Add this line into the workspace section of .env.example:

### Allow APT to accept release info changes if PPAs change metadata (Ubuntu PPA compatibility)
WORKSPACE_ALLOW_RELEASE_INFO_CHANGE=false

mzaman added 8 commits April 28, 2025 03:53
…pt-compatibility

Fix workspace APT compatibility with Ubuntu PPAs by supporting Releas…
…pt-compatibility

Allow apt-get update to accept release info changes dynamically
- Fixed the condition that sets the APT_GET_UPDATE_OPTIONS variable based on the WORKSPACE_ALLOW_RELEASE_INFO_CHANGE environment variable.
- Ensured proper syntax for condition evaluation to correctly pass the empty string when false.
…pt-compatibility

Fix: Correct condition to set APT_GET_UPDATE_OPTIONS in Dockerfile
@Th3Trig3rFac3
Copy link

Just tested on Windows, seems to be working fine.

@mzaman
Copy link
Author

mzaman commented Apr 28, 2025

Hey @Th3Trig3rFac3, thanks for testing it on Windows! glad to hear its working fine. Really appreciate you taking your time to check it out!!

Just tested on Windows, seems to be working fine.

@mzaman
Copy link
Author

mzaman commented May 10, 2025

Hi @Th3Trig3rFac3
I have updated this PR for below default settings in env.
Commit: e3f1655

Please check at your convenient time and let me know your feedback, please

Add this line into the workspace section of .env.example:
WORKSPACE_ALLOW_RELEASE_INFO_CHANGE=false

@Th3Trig3rFac3
Copy link

Hi @Th3Trig3rFac3 I have updated this PR for below default settings in env. Commit: e3f1655

Please check at your convenient time and let me know your feedback, please

Add this line into the workspace section of .env.example:
WORKSPACE_ALLOW_RELEASE_INFO_CHANGE=false

Looking good on my end, working as intended.

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.