Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package catatonit for openSUSE:Factory checked in at 2024-12-16 19:09:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/catatonit (Old) and /work/SRC/openSUSE:Factory/.catatonit.new.29675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "catatonit" Mon Dec 16 19:09:05 2024 rev:12 rq:1230980 version:0.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/catatonit/catatonit.changes 2023-10-03 20:14:56.333796201 +0200 +++ /work/SRC/openSUSE:Factory/.catatonit.new.29675/catatonit.changes 2024-12-16 19:09:14.394804402 +0100 @@ -1,0 +2,9 @@ +Sat Dec 14 09:18:44 UTC 2024 - Aleksa Sarai <[email protected]> + +- Update to catatonit v0.2.1. See the upstream changelog at + <https://github.com/openSUSE/catatonit/releases/tag/v0.2.1> + * catatonit will now chdir to / in order to avoid keeping the directory + it was running in busy. This was causing issues with rootless Podman's + pause container keeping some /home/... paths busy and blocking umounts. + +------------------------------------------------------------------- Old: ---- catatonit-0.2.0.tar.xz catatonit-0.2.0.tar.xz.asc New: ---- catatonit-0.2.1.tar.xz catatonit-0.2.1.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ catatonit.spec ++++++ --- /var/tmp/diff_new_pack.07r4Ms/_old 2024-12-16 19:09:15.998870974 +0100 +++ /var/tmp/diff_new_pack.07r4Ms/_new 2024-12-16 19:09:16.014871638 +0100 @@ -1,7 +1,7 @@ # # spec file for package catatonit # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: catatonit -Version: 0.2.0 +Version: 0.2.1 Release: 0 Summary: A signal-forwarding process manager for containers License: GPL-2.0-or-later ++++++ catatonit-0.2.0.tar.xz -> catatonit-0.2.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/catatonit-0.2.0/CHANGELOG.md new/catatonit-0.2.1/CHANGELOG.md --- old/catatonit-0.2.0/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 +++ new/catatonit-0.2.1/CHANGELOG.md 2024-12-14 10:08:49.000000000 +0100 @@ -0,0 +1,88 @@ +# Changelog # +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] ## + +## [0.2.1] - 2024-12-14 ## + +### Fixed ### + * `catatonit` will now `chdir` to `/` in order to avoid keeping the directory + it was running in busy. This was causing issues with rootless Podman's pause + container keeping some `/home/...` paths busy and blocking `umount`s. (#28, + #33) + +## [0.2.0] - 2023-10-02 + +### Changed ### + * `catatonit` has now been relicensed to GPLv2-or-later. (#27) + +## [0.1.7] - 2021-11-01 + +### Added ### + * Running `catatonit` as the only process in a pause container (i.e. no + children are spawned, `catatonit` just runs in a busy loop) is now supported + in the form of `catatonit -P`. + +## [0.1.6] - 2021-09-16 + +### Fixed ### + * File descriptors passed to the pid2 process were not closed by `catatonit` + after starting pid2 which could lead to several negative scenarios (such as + resources being kept around unnecessarily). Now `catatonit` will close all + `>=3` (i.e. non-stdio) file descriptors after spawning the child process. + (#12, #14) + + * Container-based socket activation support with runc sets `LISTEN_PID=1` when + forwarding socket-activation-related file descriptors, but with `catatonit` + this doesn't work because `catatonit` is pid1 not the actual container + process. As such, `catatonit` will now rewrite the `LISTEN_PIDS` environment + variable to equal the pid2 pid if `LISTEN_PIDS` is equal to the pid of + `catatonit`. (#13, #15) + +## [0.1.5] - 2020-03-03 + +### Fixed ### + * Some cases where catatonit could hang if pid1 died and the death signal was + coalesced are now correctly handled. (#4) + +## [0.1.4] - 2019-01-29 + +### Added ### + * We now support the `-g` option (from `tini`) for signals to be sent to the + process group. This is necessary for Rook to switch to `catatonit`. + +## [0.1.3] - 2018-04-18 + +### Fixed ## + * Improve Docker compatibility by reporting ourselves as `tini` when providing + version information from `catatonit -V`. + +## [0.1.2] - 2018-03-29 + +### Changed ### + * Minor cosmetic changes, as we are now an openSUSE project. + +## [0.1.1] - 2018-03-27 + +### Fixed ### + * Add a small fix for the libtool requirements to allow building catatonit on + older distributions. + +## 0.1.0 - 2018-03-27 + +This is the first release of catatonit. At this point it works fully (to +the best of my ability) and is incredibly simple to use and maintain. + +[Unreleased]: https://github.com/openSUSE/catatonit/compare/v0.2.1...HEAD +[0.2.1]: https://github.com/openSUSE/catatonit/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/openSUSE/catatonit/compare/v0.1.7...v0.2.0 +[0.1.7]: https://github.com/openSUSE/catatonit/compare/v0.1.6...v0.1.7 +[0.1.6]: https://github.com/openSUSE/catatonit/compare/v0.1.5...v0.1.6 +[0.1.5]: https://github.com/openSUSE/catatonit/compare/v0.1.4...v0.1.5 +[0.1.4]: https://github.com/openSUSE/catatonit/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/openSUSE/catatonit/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/openSUSE/catatonit/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/openSUSE/catatonit/compare/v0.1.0...v0.1.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/catatonit-0.2.0/README.md new/catatonit-0.2.1/README.md --- old/catatonit-0.2.0/README.md 2023-09-20 15:20:28.000000000 +0200 +++ new/catatonit-0.2.1/README.md 2024-12-14 10:08:49.000000000 +0100 @@ -28,13 +28,40 @@ ### Usage ### catatonit has identical usage to other basic `docker-init`'s -- you give it the -command and list of arguments to that command. If catatonit is not pid1, it -will try to use the sub-reaper support in the kernel. You can pass `-g` if you -want signals to be forwarded to the entire process group of your spawned -process (otherwise it's just forwarded to the process spawned). +command and list of arguments to that command. -If you wish to use catatonit as a convenient pause container (do not spawn a -child process nor do any signal handling), use pass `-P`. +If you install `catatonit` to `/usr/bin/docker-init`, `docker run --init` will +use `catatonit` as its container pid1. Alternatively, you can configure the +Docker daemon to use `catatonit` without deleting any previously installed +`/usr/bin/docker-init` by using `--init-path` (or adding an `init-path` setting +in `/etc/docker/daemon.json`). Podman has similar options. + +Catatonit supports a very limit subset of features, in order to keep the code +as simple as possible: + +* If catatonit is not pid1 (in other words, you are not in a PID namespace), it + will try to use the sub-reaper support in the kernel to act as a + "pseudo-init" for the process you requested. + +* You can pass `-g` if you want signals to be forwarded to the entire process + group of your spawned process (otherwise it's just forwarded to the process + spawned). + +* If you wish to use catatonit as a convenient pause container (do not spawn a + child process nor do any signal handling), you can pass `-P`. + +If you want to include `catatonit` in your images, you can conveniently add it +to your Dockerfile as an entrypoint: + +```dockerfile +# Runs "catatonit -- /my/amazing/script --with --args" +ENTRYPOINT ["catatonit", "--"] + +# or if you use --rewrite or other cli flags +# ENTRYPOINT ["catatonit", "--rewrite", "2:3", "--"] + +CMD ["/my/amazing/script", "--with", "--args"] +``` ### Installation ### @@ -47,6 +74,10 @@ % sudo make install ``` +Note that this install the `catatonit` binary to `/usr/bin/catatonit`. If you +want to use `docker run --init` you may need to symlink `/usr/bin/docker-init` +to `catatonit` or configure Docker to use `catatonit`. + ### License ### catatonit is licensed under the GNU General Public License version 2 or later. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/catatonit-0.2.0/catatonit.c new/catatonit-0.2.1/catatonit.c --- old/catatonit-0.2.0/catatonit.c 2023-09-20 15:20:28.000000000 +0200 +++ new/catatonit-0.2.1/catatonit.c 2024-12-14 10:08:49.000000000 +0100 @@ -36,7 +36,7 @@ #include <limits.h> #include <dirent.h> -#ifdef HAVE_CLOSE_RANGE +#ifdef HAVE_LINUX_CLOSE_RANGE_H # include <linux/close_range.h> #else # include <sys/syscall.h> @@ -512,6 +512,14 @@ debug("pid1 (%d) spawned: %s", pid1, argv[0]); } + /* + * Switch to / explicitly, to work around a known podman issue where podman + * runs "catatonit -P" in a subdirectory which causes umount to fail + * because the directory is pinned by catatonit. Ignore errors since we + * don't care about the cwd anyway. + */ + (void) chdir("/"); + if (close_fds_ge_than(3, sfd) < 0) warn("failed to close some file descriptor in range >=3"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/catatonit-0.2.0/configure.ac new/catatonit-0.2.1/configure.ac --- old/catatonit-0.2.0/configure.ac 2023-09-20 15:20:28.000000000 +0200 +++ new/catatonit-0.2.1/configure.ac 2024-12-14 10:08:49.000000000 +0100 @@ -17,14 +17,14 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. AC_PREREQ([2.69]) -AC_INIT([catatonit], [0.2.0], [https://bugs.opensuse.org/], [], [https://github.com/openSUSE/catatonit/]) +AC_INIT([catatonit], [0.2.1], [https://bugs.opensuse.org/], [], [https://github.com/openSUSE/catatonit/]) AM_INIT_AUTOMAKE([-Wall foreign]) LT_PREREQ([2.4.2]) LT_INIT([disable-shared]) AC_CHECK_HEADERS([errno.h fcntl.h signal.h stdarg.h stdio.h stdlib.h unistd.h]) -AC_CHECK_HEADERS([sys/prctl.h sys/signalfd.h sys/stat.h sys/types.h sys/wait.h]) +AC_CHECK_HEADERS([linux/close_range.h sys/prctl.h sys/signalfd.h sys/stat.h sys/types.h sys/wait.h]) AC_CHECK_FUNCS([close_range])
