NULL Releases
This guide explains how to use NULL releases to exclude packages from Garden Linux builds, following the process described in MAINTAINER.md.
What is a NULL Release?
A NULL release is a special GitHub release that tells the Garden Linux repository infrastructure to ignore a package for inclusion in apt repositories. When the fetch_releases script encounters a NULL release marked as the latest, it skips that package during the repository build process.
NULL releases are used to:
- Temporarily disable a package that is causing build failures
- Remove a package from the distribution
- Exclude packages with licensing or security issues
- Mark deprecated packages
How NULL Releases Work
The null release mechanism operates through several components in the Garden Linux infrastructure:
fetch_releasesscript: Part of the gardenlinux/repo GitHub Actions, this script iterates through all gardenlinux/package-* repositories and gets the latest release tagdownload_pkgsscript: Downloads the latest release files from all package-* GitHub Releases- Null file detection: If the latest release of a package-* repository contains a
nullfile, it is ignored and not included in the apt repository
This creates a simple but effective way to exclude packages without modifying configuration files or deleting repositories.
Creating a NULL Release
To create a NULL release that excludes a package from Garden Linux builds:
git checkout --detach
git commit --allow-empty -m "ignore package for repo import"
git tag null
git push origin null
echo "" > null
gh release create null ./null --title "Null release" --notes "null"Step-by-step explanation:
git checkout --detach: Create a detached HEAD to avoid affecting any branchesgit commit --allow-empty -m "ignore package for repo import": Create an empty commit with descriptive messagegit tag null: Create a lightweight tag named "null"git push origin null: Push the null tag to the remote repositoryecho "" > null: Create an empty file named "null"gh release create null ./null --title "Null release" --notes "null": Create a GitHub release with the null file attached
Re-enabling a Package
to re-enable a package that was previously disabled with a NULL release, you have two options:
Option 1: Create a new regular release
- Create a new version of the package
- Build and release it normally
- The new release will become the latest and override the NULL release
Option 2: Set the appropriate version as latest
- If the package already has a proper release after the NULL release, you can manually set it as the latest release on GitHub
- This effectively bypasses the NULL release
Important Considerations
:::error If you want to permanently remove/archive a package from Garden Linux, please follow the official guide in the gardenlinux/repo repository. :::
WARNING
NULL releases should only be used for packages maintained by the Garden Linux team. For third-party packages or external dependencies, other exclusion mechanisms may be more appropriate.
INFO
NULL releases are particularly useful for temporarily disabling packages that are failing to build, allowing the rest of the release process to continue while the issue is investigated.