Skip to content

Add Ubuntu 25.04 (Plucky Puffin) Installer Support#491

Open
Kalpesh-ops wants to merge 39 commits intoFOSSEE:installersfrom
Kalpesh-ops:installers
Open

Add Ubuntu 25.04 (Plucky Puffin) Installer Support#491
Kalpesh-ops wants to merge 39 commits intoFOSSEE:installersfrom
Kalpesh-ops:installers

Conversation

@Kalpesh-ops
Copy link
Copy Markdown

Pull Request: Add Ubuntu 25.04 (Plucky Puffin) Installer Support

Summary

This PR ports the eSim 2.5 installer to Ubuntu 25.04, resolving 38 distinct
installation failures encountered when running the upstream installer on this OS version.

Branch: installers
Commits: 39 atomic commits (38 bug fixes + 2 documentation updates)
Fixes: 38 bugs (15 High · 14 Medium · 7 Low difficulty)
Tested on: Ubuntu 25.04 in VirtualBox 7.0 (8 GB RAM, 10 CPU cores)


What was broken

The upstream install-eSim.sh fails immediately on Ubuntu 25.04 because:

  1. The version regex requires 3-part versions (e.g. 22.04.02); Ubuntu 25.04 returns 25.04.
  2. The version case statement has no 25.04 entry.
  3. No install-eSim-25.04.sh script existed.

After fixing those entry-point failures, 33 further bugs surface in dependency
management, package compatibility, path resolution, and sub-installer integration.


Key fixes by category

Version detection (Bugs #1–003, #22–023)

  • Regex made optional for 3rd decimal: \d+\.\d+(\.\d+)?
  • 25.04 case added to main version switch
  • install-eSim-25.04.sh created from 24.04 base
  • NGHDL installer now falls back to 24.04 script for 25.04

Package & dependency (Bugs #4, #6, #14, #25–031)

  • apt-get install keyword missing for xz-utils — fixed
  • KiCad PPA requires libgit2-1.8; Ubuntu 25.04 ships 1.9 → fallback to universe repo
  • libcanberra-gtk-module dropped in 25.04 → libcanberra-gtk3-module fallback
  • LLVM 20.x compatibility: llvm-config shim reports 18.0.0; GHDL configure regex extended to accept major versions 10–29

APT sources (Bugs #5, #7, #15–016)

  • Stale file:/cdrom and file:///cdrom sources disabled before apt update
  • KiCad PPA .sources file explicitly removed (not just via add-apt-repository -r)

Permissions & user context (Bugs #11, #19, #21, #24)

  • Real user home detected via getent passwd $SUDO_USER (not $HOME which resolves to /root under sudo)
  • chown uses username, not path
  • Root-owned virtualenv detected and recreated as target user

Application launch (Bugs #18, #20, #35–036)

  • discover_esim_home() dynamically finds Application.py across multiple candidate paths
  • /usr/bin/esim launcher generated with its own path discovery
  • Desktop entry uses validated path, not hardcoded

Sub-installer integration (Bugs #27, #31–034)

  • NGHDL extracted scripts patched to use libcanberra-gtk3-module
  • GHDL configure patched in both main and NGHDL sub-installer trees
  • Absolute --srcdir path passed to GHDL configure (not relative . )
  • NGHDL existing directory removed before reinstall

Files changed

File Changes
Ubuntu/install-eSim.sh Version regex (#1), 25.04 case (#2)
Ubuntu/install-eSim-scripts/install-eSim-25.04.sh New file — core fixes
Ubuntu/nghdl/install-nghdl.sh 25.04 case added
Ubuntu/nghdl/install-nghdl-scripts/install-nghdl-25.04.sh Sub-installer GHDL/srcdir fixes

Documentation


Testing

OS      : Ubuntu 25.04 (VirtualBox 7.0 guest, clean snapshot)
Kernel  : 6.11.0-25-generic
Python  : 3.13.0
Result  : eSim 2.5 installs and launches successfully

Resolution: updated regex to make 3rd decimal place optional.
Resolution: added support for 25.04 with if statement addition in "install-eSim.sh" to run install-eSim-25.04.sh script for 25.04 version.
Resolution: copying script of 24.04 for 25.04 by renaming the file to install-eSim-25.04.sh and updated the version check in if statement from 24.04 to 25.04 whereever applicable
Resolution: updating the sudo apt-get command for instllation of xz-utils
Resolution: suppress "apt-get update" error while installation on non critical errors
Resolution: Detect missing libgit2-1.8 and avoid the PPA by removing it (if present) so the installer falls back to the Ubuntu repo KiCad packages built against available libgit2.
Resolution: Detect any kicad-8.0-releases entries in sources.list or sources.list.d, remove the PPA, and delete matching .sources/.list files before updating apt.
Resolution: Allow using an existing library/kicadLibrary directory or skip copying custom symbols when the archive is missing, avoiding a hard failure.
Resolution: Return from the function instead of exiting, allowing the main installer flow to continue.
Resolution: Check for nghdl.zip or an existing nghdl directory and skip NGHDL installation when missing.
Resolution: Use the invoking user's home directory when copying the desktop file and setting trusted metadata.
Resolution: Remove stray desktop operations from the main flow and keep them inside createDesktopStartScript with a resolved user home.
Resolution: Ensure the Desktop directory exists and skip copying the logo when the file is missing.
Resolution: Use a robust check that treats both "Candidate: (none)" and "Unable to locate package" as missing and disables the PPA.
Resolution: Detect and disable file:/cdrom sources before updating apt indexes.
Resolution: Also comment deb lines that use file:///cdrom in /etc/apt/sources.list.
Resolution: Run gio set on a best-effort basis and suppress its stderr output.
Resolution: Resolve the repo root from the script location and use the invoking user's home for config/venv ownership.
Resolution: Track the invoking username separately and use it for chown.
Resolution: Generate a launcher that checks for the application path and prints a clear error when the source/executable is missing.
Resolution: Ensure the config directory is owned by the target user, remove any existing env, and recreate the env as the target user to avoid root-owned files.
Resolution: For 25.04, fall back to the 24.04 NGHDL install script (which is included in the archive) so the installation proceeds instead of exiting on an unsupported version.
Resolution: Resolve Ubuntu version via lsb_release when available, otherwise fall back to /etc/os-release, then use the 24.04 installer for 25.04.
Resolution: Mark the 24.04 NGHDL installer as executable before invoking it in the 25.04 fallback path.
Resolution: Check package availability and install libcanberra-gtk-module if present, otherwise fall back to libcanberra-gtk3-module or skip with a warning.
Resolution: Use apt-cache policy to confirm a valid candidate before attempting installation, and fall back to the GTK3 module or skip with a warning.
Resolution: For Ubuntu 25.04, patch the extracted NGHDL install scripts to replace libcanberra-gtk-module with libcanberra-gtk3-module before running them.
Resolution: For Ubuntu 25.04, patch the extracted NGHDL install scripts to replace the 20.0 version check with 20.1 when llvm-config reports 20.1.x.
Resolution: When LLVM 20.1.x is detected, add a local llvm-config shim that reports 20.1 for --version so NGHDL accepts the version.
Resolution: updated the version to commonly used 18.0
Resolution: Patch the extracted ghdl-4.1.0/configure to accept major versions 10-29, then keep the llvm-config shim reporting 20.1.
Resolution: Patch the GHDL configure script inside install-nghdl-25.04.sh's installGHDL function before calling ./configure to support LLVM 20.x versions by using sed to add version 2[0-9] patterns.
Resolution: Remove the existing NGHDL directory before moving the newly extracted source. This performs a clean reinstall while preserving user configuration in ~/.nghdl/ since that's a separate directory.
Resolution: Resolve the source root dynamically, pass an absolute --srcdir, avoid editing configure, and ensure a clean extract before building.
Resolution: The generated `esim-start.sh` now computes `REPO_ROOT` from the installer's `eSim_Home` at install time, checks common candidate locations (`src/frontEnd`, `src/FrontEnd`, `frontEnd`, repo root`) and falls back to a `find` search under the repository root to locate `Application.py`. This makes the launcher dynamic and general for any installer layout.
Resolution: Added a dynamic discovery step to locate Application.py and set paths based on the actual file system state.
Add the root summary, Ubuntu changelog, and detailed bug report for the 36-commit Ubuntu 25.04 installer port.
Resolution: Merge the split KiCad dependency fix into a single snap-based installation path.
- Ubuntu 25.04 always uses snap for KiCad because libgit2-1.8 is unavailable
- Remove any stale KiCad PPA entries before installation
- Keep APT/PPA installation paths only for older Ubuntu releases
- Update Ubuntu and top-level docs to reflect the final merged fix
…OSSEE#38

Resolution: Make the KiCad library copy step snap-aware after switching Ubuntu 25.04 to snap.
- Use KiCad 9.0 config path for snap installs on Ubuntu 25.04
- Create /usr/share/kicad/symbols before copying custom symbols
- Keep 6.0 paths for older APT-based installs
- Update uninstall cleanup to remove both 6.0 and 9.0 config folders
- Refresh Ubuntu 25.04 documentation to include the new bug and commit count
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.

1 participant