# Generated by go2rpm 1.11.0 %bcond_without check # https://github.com/moby/moby %global goipath github.com/docker/docker %global forgeurl https://github.com/moby/moby Version: 25.0.4 %gometa -L -f %global common_description %{expand: Docker is an open source project to build, ship and run any application as a lightweight container. Docker containers are both hardware-agnostic and platform-agnostic. This means they can run anywhere, from your laptop to the largest EC2 compute instance and everything in between — and they do not require you to use a particular language, framework or packaging system. That makes them great building blocks for deploying and scaling web apps, databases, and backend services without depending on a particular stack or provider. } Name: moby-engine Release: %autorelease Summary: The open-source application container engine License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND (Apache-2.0 OR GPL-2.0-or-later) URL: %{gourl} Source0: %{gosource} Source1: %{archivename}-vendor.tar.xz Source2: go-vendor-tools.toml Source3: moby-engine-systemd-sysusers.conf Patch: 0001-systemd-adjust-docker.service-for-downstream.patch BuildRequires: git-core BuildRequires: go-vendor-tools BuildRequires: libseccomp-devel BuildRequires: libselinux-devel BuildRequires: make BuildRequires: pkg-config BuildRequires: systemd-devel # docker.service depends on containerd Requires: containerd # The docker CLI is provided as a separate package to ease maintenace and avoid # overcomplicating the specfile Requires: moby-cli >= %{version} # tini-static is used as the docker-init binary Requires: tini-static # Other runtime packages (sorted) Requires: container-selinux Requires: libseccomp Requires: tar Requires: xz # Provide docker name to help users who "dnf install docker" Provides: docker = %{version}-%{release} # Conflict with upstream packages Conflicts: docker-ce Conflicts: docker-ee %description %{common_description} %package nano Summary: GNU nano syntax highlighting files for Moby BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: nano Supplements: moby-engine %description nano %{common_description} This package installs %{summary}. %prep %goprep -A -S git_am %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 cp -p %{S:3} . %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build BUILDFLAGS="%{gocompilerflags} -a -v -x" \ DOCKER_BUILDTAGS="rpm_crashback seccomp selinux journald" \ DOCKER_LDFLAGS=%{gobuild_ldflags_shescaped} GOPATH=%{gobuilddir} \ bash -x ./hack/make.sh dynbinary %install # Install licenses %go_vendor_license_install -c %{S:2} # Install binaries install -Dpm 0755 bundles/dynbinary*/* -t %{buildroot}%{_bindir} # Install systemd configuration install -Dpm 0644 contrib/init/systemd/* -t %{buildroot}%{_unitdir} # Install sysusers config install -Dpm 0644 moby-engine-systemd-sysusers.conf %{buildroot}%{_sysusersdir}/moby-engine.conf # Install udev rules install -Dpm 0644 contrib/udev/80-docker.rules -t %{buildroot}%{_udevrulesdir} # Create %%{_libexecdir}/docker directory mkdir -p %{buildroot}%{_libexecdir}/docker # Install nano syntax install -Dpm 644 contrib/syntax/nano/Dockerfile.nanorc -t %{buildroot}%{_datadir}/nano/ %check %go_vendor_license_check -c %{S:2} %if %{with check} # Manually skip specific tests for test in \ "TestSCTP4Proxy" \ %dnl Failed to enter netns: operation not permitted "TestIfaceAddrs" do awk -i inplace '/^func.*'"${test}"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' \ $(grep -rl "${test}") done export PATH="%{buildroot}%{_bindir}:${PATH}" # graphdriver tests require extra permissions # integration tests require a running docker daemon # libnetwork tests cannot create netns in mock # pkg/archive do not work in mock, either %gocheck -t daemon/graphdriver -t integration -t libnetwork -d pkg/archive %endif %pre %sysusers_create_compat %{S:3} %post %systemd_post docker.service docker.socket %preun %systemd_preun docker.service docker.socket %postun %systemd_postun_with_restart docker.service %files -f %{go_vendor_license_filelist} %license AUTHORS NOTICE %license vendor/modules.txt %doc README.md %{_bindir}/docker-proxy %{_bindir}/dockerd %{_libexecdir}/docker %{_sysusersdir}/moby-engine.conf %{_udevrulesdir}/80-docker.rules %{_unitdir}/docker.service %{_unitdir}/docker.socket %files nano %license AUTHORS LICENSE NOTICE %{_datadir}/nano/Dockerfile.nanorc %changelog %autochangelog