Skip to content
Open
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
11 changes: 9 additions & 2 deletions SPECS/docker/docker.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Summary: Docker
Name: docker
Version: 28.2.2
Release: 3%{?dist}
Release: 4%{?dist}
URL: http://docs.docker.com
Group: Applications/File
Vendor: VMware, Inc.
Expand Down Expand Up @@ -56,6 +56,11 @@ Docker is an open source project to build, ship and run any application as a lig

%package engine
Summary: Docker Engine
# docker-init is bind-mounted into containers and exec'd as PID 1 there, so it
# must not depend on the container's libc. The dependency is versioned because
# tini-static first appears in tini-0.19.0-2; an unversioned one would let an
# older tini satisfy it and leave /usr/bin/docker-init dangling.
Requires: tini-static >= 0.19.0-2
Requires: libapparmor
Requires: libseccomp
Requires: libltdl
Expand Down Expand Up @@ -188,7 +193,7 @@ install -p -m 755 src/%{gopath_comp_engine}/bundles/dynbinary-daemon/dockerd %{b
install -p -m 755 src/%{gopath_comp_engine}/bundles/dynbinary-daemon/docker-proxy %{buildroot}%{_bindir}/docker-proxy

# install tini
ln -srv %{buildroot}%{_bindir}/tini %{buildroot}%{_bindir}/docker-init
ln -srv %{buildroot}%{_bindir}/tini-static %{buildroot}%{_bindir}/docker-init

# install udev rules
install -p -m 644 src/%{gopath_comp_engine}/contrib/udev/80-docker.rules %{buildroot}%{_udevrulesdir}/80-docker.rules
Expand Down Expand Up @@ -298,6 +303,8 @@ rm -rf %{buildroot}/*
%{_bindir}/dockerd-rootless-setuptool.sh

%changelog
* Fri Aug 07 2026 Daniel Casota <dcasota@gmail.com> 28.2.2-4
- Point docker-init at tini-static so --init works in non-glibc containers
* Mon Nov 17 2025 Mukul Sikka <mukul.sikka@broadcom.com> 28.2.2-3
- Bump up version as a part of containerd upgrade
* Mon Nov 10 2025 Mukul Sikka <mukul.sikka@broadcom.com> 28.2.2-2
Expand Down
34 changes: 34 additions & 0 deletions SPECS/tini/tini-disable-git.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From a778da75578051d31a4badcf781f6d3af2b6b65b Mon Sep 17 00:00:00 2001
From: Bo Gan <ganb@vmware.com>
Date: Mon, 28 Oct 2019 17:14:22 -0700
Subject: [PATCH] disable git invocation

---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 490bec8..0c897a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,8 @@ if(MINIMAL)
add_definitions(-DTINI_MINIMAL=1)
endif()

+if(FALSE)
+
# Extract git version and dirty-ness
execute_process (
COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h
@@ -27,6 +29,8 @@ execute_process(
OUTPUT_VARIABLE git_dirty_check_out
)

+endif()
+
if("${git_version_check_ret}" EQUAL 0)
set(tini_VERSION_GIT " - git.${tini_VERSION_GIT}")
if(NOT "${git_dirty_check_out}" STREQUAL "")
--
2.7.4

27 changes: 25 additions & 2 deletions SPECS/tini/tini.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Name: tini
Version: 0.19.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A tiny but valid init for containers
Vendor: VMware, Inc.
Group: System Environment/Base
Expand All @@ -14,6 +14,13 @@ Source0: https://github.com/krallin/tini/archive/%{name}-%{version}.tar.g
Source1: license.txt
%include %{SOURCE1}

# tini's CMakeLists.txt overwrites tini_VERSION_GIT and git_version_check_ret
# from execute_process(), which clobbers the -D values passed below. An RPM
# builds from a tarball with no .git, so the git call fails and the version
# suffix is silently dropped, leaving `docker info` with an empty init version.
# This patch disables the git invocation so the -D values take effect.
Patch0: tini-disable-git.patch

BuildRequires: cmake
BuildRequires: gcc
BuildRequires: glibc-devel
Expand All @@ -24,6 +31,16 @@ All Tini does is spawn a single child (Tini is meant to be run in a container),
and wait for it to exit, all the while reaping zombies and performing signal forwarding.
libc will be needed inside the container.

%package static
Summary: Standalone static build of tini

%description static
Statically linked build of tini, meant to be used inside a container.
Because this binary carries no dynamic dependencies it can be bind-mounted
into a container built against any libc (glibc, musl) or into one with no
libc at all, which is what the container runtime requires of an init that
it injects from the host.

%prep
%autosetup -p1 -c

Expand All @@ -43,8 +60,14 @@ export CFLAGS
%files
%defattr(-,root,root,-)
%{_bindir}/tini
%exclude %{_bindir}/tini-static

%files static
%defattr(-,root,root,-)
%{_bindir}/tini-static

%changelog
* Fri Aug 07 2026 Daniel Casota <dcasota@gmail.com> 0.19.0-2
- Ship tini-static in a new subpackage instead of discarding it
- Restore tini-disable-git.patch so the version suffix is not dropped
* Tue Apr 08 2025 Harinadh Dommaraju <Harinadh.Dommaraju@broadcom.com> 0.19.0-1
- Initial build