Skip to content
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

Bump to v5.4.0 #25296

Merged
merged 6 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ freebsd_alt_build_task:
TEST_FLAVOR: "altbuild"
ALT_NAME: 'FreeBSD Cross'
freebsd_instance:
image_family: freebsd-13-3
image_family: freebsd-13-4
setup_script:
- pkg install -y gpgme bash go-md2man gmake gsed gnugrep go pkgconf zstd
build_amd64_script:
Expand Down
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
- Fixed a bug where it was possible to specify the `libkrun` backend for VMs on Intel Macs (`libkrun` only supports Arm systems).
- Fixed a bug where `libkrun` and `applehv` VMs from `podman machine` could be started at the same time on Macs ([#25112](https://github.com/containers/podman/issues/25112)).
- Fixed a bug where `podman exec` commands could not detach from the exec session using the detach keys ([#24895](https://github.com/containers/podman/issues/24895)).
- Fixed a bug where Podman would fail to start due to a database configuration mismatch when certain fields were configured to the empty string ([#24738](https://github.com/containers/podman/issues/24738)).

### API
- The Compat and Libpod Build APIs for Images now support a new query parameter, `nohosts`, which (when set to true) does not create `/etc/hosts` in the image when building.
Expand Down
2 changes: 2 additions & 0 deletions docs/source/Reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Show the API documentation for version:

* `latest (main branch) <_static/api.html>`_

* `version 5.4 <_static/api.html?version=v5.4>`_

* `version 5.3 <_static/api.html?version=v5.3>`_

* `version 5.2 <_static/api.html?version=v5.2>`_
Expand Down
24 changes: 24 additions & 0 deletions libpod/sqlite_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,30 @@ func (s *SQLiteState) ValidateDBConfig(runtime *Runtime) (defErr error) {
return fmt.Errorf("retrieving DB config: %w", err)
}

// Sometimes, for as-yet unclear reasons, the database value ends up set
// to the empty string. If it does, this evaluation is always going to
// fail, and libpod will be unusable.
// At this point, the check is effectively meaningless - we don't
// actually know the settings we should be checking against. The best
// thing we can do (and what BoltDB did in this case) is to compare
// against the default, on the assumption that is what was in use.
// TODO: We can't remove this code without breaking existing SQLite DBs
// that already have incorrect values in the database, but we should
// investigate why this is happening and try and prevent the creation of
// new databases with these garbage checks.
if graphRoot == "" {
logrus.Debugf("Database uses empty-string graph root, substituting default %q", storeOpts.GraphRoot)
graphRoot = storeOpts.GraphRoot
}
if runRoot == "" {
logrus.Debugf("Database uses empty-string run root, substituting default %q", storeOpts.RunRoot)
runRoot = storeOpts.RunRoot
}
if graphDriver == "" {
logrus.Debugf("Database uses empty-string graph driver, substituting default %q", storeOpts.GraphDriverName)
graphDriver = storeOpts.GraphDriverName
}

checkField := func(fieldName, dbVal, ourVal string, isPath bool) error {
if isPath {
// Tolerate symlinks when possible - most relevant for OStree systems
Expand Down
23 changes: 23 additions & 0 deletions test/system/005-info.bats
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,27 @@ EOF
run_podman $safe_opts system reset --force
}

@test "podman - empty string defaults for certain values" {
skip_if_remote "Test uses nonstandard paths for c/storage directories"

# We just want this to be empty - so graph driver will be set to the empty string
touch $PODMAN_TMPDIR/storage.conf

safe_opts=$(podman_isolation_opts ${PODMAN_TMPDIR})

# Force all custom directories so we don't pick up an existing database
CONTAINERS_STORAGE_CONF=$PODMAN_TMPDIR/storage.conf run_podman 0+w $safe_opts info
require_warning "The storage 'driver' option should be set" \
"c/storage should warn on empty storage driver"

# Now add a valid graph driver to storage.conf
cat >$PODMAN_TMPDIR/storage.conf <<EOF
[storage]
driver="$(podman_storage_driver)"
EOF

# Second run of Podman should still succeed after editing the graph driver.
CONTAINERS_STORAGE_CONF=$PODMAN_TMPDIR/storage.conf run_podman $safe_opts info
}

# vim: filetype=sh
2 changes: 1 addition & 1 deletion version/rawversion/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ package rawversion
//
// NOTE: remember to bump the version at the top of the top-level README.md
// file when this is bumped.
const RawVersion = "5.4.0-dev"
const RawVersion = "5.4.1-dev"