4a666d
%global with_check 0
4a666d
4a666d
%global _find_debuginfo_dwz_opts %{nil}
4a666d
%global _dwz_low_mem_die_limit 0
4a666d
4a666d
%if 0%{?rhel} > 7 && ! 0%{?fedora}
4a666d
%define gobuild(o:) \
4a666d
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**};
4a666d
%else
4a666d
%if ! 0%{?gobuild:1}
4a666d
%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**};
4a666d
%endif
4a666d
%endif
4a666d
4a666d
%global provider github
4a666d
%global provider_tld com
4a666d
%global project opencontainers
4a666d
%global repo runc
4a666d
# https://github.com/opencontainers/runc
4a666d
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
4a666d
%global git0 https://%{import_path}
4a666d
4a666d
Epoch: 1
4a666d
Name: %{repo}
b2862f
Version: 1.1.4
b2862f
Release: 1%{?dist}
4a666d
Summary: CLI for running Open Containers
4a666d
# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
4a666d
#ExclusiveArch: %%{go_arches}
4a666d
# still use arch exclude as the macro above still refers %%{ix86} in RHEL8.4:
4a666d
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
4a666d
ExcludeArch: %{ix86}
4a666d
License: ASL 2.0
4a666d
URL: %{git0}
4a666d
Source0: %{git0}/archive/v%{version}.tar.gz
224b80
Patch0: https://patch-diff.githubusercontent.com/raw/opencontainers/runc/pull/3468.patch
4a666d
Provides: oci-runtime
224b80
BuildRequires: golang >= 1.17.7
4a666d
BuildRequires: git
224b80
BuildRequires: /usr/bin/go-md2man
224b80
BuildRequires: libseccomp-devel >= 2.5
224b80
Requires: libseccomp >= 2.5
4a666d
Requires: criu
4a666d
4a666d
%description
4a666d
The runc command can be used to start containers which are packaged
4a666d
in accordance with the Open Container Initiative's specifications,
4a666d
and to manage containers running under runc.
4a666d
4a666d
%prep
4a666d
%autosetup -Sgit
4a666d
sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name}
4a666d
4a666d
%build
4a666d
mkdir -p GOPATH
4a666d
pushd GOPATH
4a666d
    mkdir -p src/%{provider}.%{provider_tld}/%{project}
4a666d
    ln -s $(dirs +1 -l) src/%{import_path}
4a666d
popd
4a666d
4a666d
pushd GOPATH/src/%{import_path}
4a666d
export GO111MODULE=off
4a666d
export GOPATH=%{gopath}:$(pwd)/GOPATH
4a666d
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
4a666d
export BUILDTAGS="selinux seccomp"
4a666d
export LDFLAGS="-X main.gitCommit= -X main.version=%{version}"
4a666d
%gobuild -o %{name} %{import_path}
4a666d
4a666d
pushd man
4a666d
./md2man-all.sh
4a666d
popd
4a666d
4a666d
%install
4a666d
make install install-man install-bash DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} BINDIR=%{_bindir}
4a666d
4a666d
%check
4a666d
4a666d
#define license tag if not already defined
4a666d
%{!?_licensedir:%global license %doc}
4a666d
4a666d
%files
4a666d
%license LICENSE
4a666d
%doc MAINTAINERS_GUIDE.md PRINCIPLES.md README.md CONTRIBUTING.md
4a666d
%{_bindir}/%{name}
4a666d
%{_mandir}/man8/%{name}*
4a666d
%{_datadir}/bash-completion/completions/%{name}
4a666d
4a666d
%changelog
b2862f
* Mon Aug 29 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.1.4-1
b2862f
- update to https://github.com/opencontainers/runc/releases/tag/v1.1.4
b2862f
- Related: #2061390
b2862f
224b80
* Mon Jun 13 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.1.3-2
224b80
- update to https://github.com/opencontainers/runc/releases/tag/v1.1.3
224b80
- Related: #2061390
224b80
224b80
* Thu Jun 09 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.1.3-1
224b80
- update to https://github.com/opencontainers/runc/releases/tag/v1.1.3
224b80
- Related: #2061390
224b80
224b80
* Fri Jun 03 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.1.2-1
224b80
- update to https://github.com/opencontainers/runc/releases/tag/v1.1.2
224b80
- Related: #2061390
224b80
224b80
* Fri Apr 08 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.0.3-3
224b80
- bump golang BR to 1.17.7
224b80
- Related: #2061390
224b80
224b80
* Fri Mar 11 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.0.3-2
224b80
- require at least libseccomp >= 2.5
224b80
- Resolves: #2053990
224b80
- Related: #2061390
224b80
4a666d
* Fri Feb 18 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.0.3-1
4a666d
- rollback to 1.0.3 due to gating test issues
4a666d
- Related: #2001445
4a666d
4a666d
* Tue Jan 18 2022 Jindrich Novy <jnovy@redhat.com> - 1.1.0-1
4a666d
- update to https://github.com/opencontainers/runc/releases/tag/v1.1.0
4a666d
- Related: #2001445
4a666d
4a666d
* Mon Dec 06 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.3-1
4a666d
- update to https://github.com/opencontainers/runc/releases/tag/v1.0.3
4a666d
- Related: #2001445
4a666d
4a666d
* Wed Aug 25 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.2-1
4a666d
- update to https://github.com/opencontainers/runc/releases/tag/v1.0.2
4a666d
- Related: #1934415
4a666d
4a666d
* Fri Aug 06 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.1-5
4a666d
- do not use versioned provide
4a666d
- Related: #1934415
4a666d
4a666d
* Thu Jul 29 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.1-4
4a666d
- fix "unknown version" displayed by runc -v
4a666d
- Related: #1934415
4a666d
4a666d
* Mon Jul 26 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.1-3
4a666d
- be sure to compile runc binaries the right way
4a666d
- Related: #1934415
4a666d
4a666d
* Mon Jul 26 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.1-2
4a666d
- use Makefile
4a666d
- Related: #1934415
4a666d
4a666d
* Wed Jul 21 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.1-1
4a666d
- update to https://github.com/opencontainers/runc/releases/tag/v1.0.1
4a666d
- Related: #1934415
4a666d
4a666d
* Thu May 20 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-76.rc95
4a666d
- updated to rc95 to fix CVE-2021-30465
4a666d
- Related: #1934415
4a666d
4a666d
* Tue May 18 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-75.rc94
4a666d
- set GO111MODULE=off to fix build
4a666d
- Related: #1934415
4a666d
4a666d
* Fri May 14 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-74.rc94
4a666d
- update to https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc94
4a666d
- Related: #1934415
4a666d
4a666d
* Tue May 11 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-73.rc93
4a666d
- fix CVE-2021-30465
4a666d
- Related: #1934415
4a666d
4a666d
* Tue Mar 30 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-72.rc93
4a666d
- upload rc93 tarball
4a666d
- Related: #1934415
4a666d
4a666d
* Tue Mar 30 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-71.rc93
4a666d
- update to rc93
4a666d
- Related: #1934415
4a666d
4a666d
* Fri Jan 29 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-70.rc92
4a666d
- add missing Provides: oci-runtime = 1
4a666d
- Related: #1883490
4a666d
4a666d
* Tue Dec 08 2020 Jindrich Novy <jnovy@redhat.com> - 1.0.0-69.rc92
4a666d
- still use ExcludeArch as go_arches macro is broken for 8.4
4a666d
- Related: #1883490
4a666d
4a666d
* Tue Aug 11 2020 Jindrich Novy <jnovy@redhat.com> - 1.0.0-68.rc92
4a666d
- update to https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc92
4a666d
- propagate proper CFLAGS to CGO_CFLAGS to assure code hardening and optimization
4a666d
- Related: #1821193
4a666d
4a666d
* Thu Jul 02 2020 Jindrich Novy <jnovy@redhat.com> - 1.0.0-67.rc91
4a666d
- update to https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc91
4a666d
- Related: #1821193
4a666d
4a666d
* Tue May 12 2020 Jindrich Novy <jnovy@redhat.com> - 1.0.0-66.rc10
4a666d
- synchronize containter-tools 8.3.0 with 8.2.1
4a666d
- Related: #1821193
4a666d
4a666d
* Wed Feb 12 2020 Jindrich Novy <jnovy@redhat.com> - 1.0.0-65.rc10
4a666d
- address CVE-2019-19921 by updating to rc10
4a666d
- Resolves: #1801887
4a666d
4a666d
* Wed Dec 11 2019 Jindrich Novy <jnovy@redhat.com> - 1.0.0-64.rc9
4a666d
- use no_openssl in BUILDTAGS (no vendored crypto in runc)
4a666d
- Related: RHELPLAN-25139
4a666d
4a666d
* Mon Dec 09 2019 Jindrich Novy <jnovy@redhat.com> - 1.0.0-63.rc9
4a666d
- be sure to use golang >= 1.12.12-4
4a666d
- Related: RHELPLAN-25139
4a666d
4a666d
* Thu Nov 28 2019 Jindrich Novy <jnovy@redhat.com> - 1.0.0-62.rc9
4a666d
- rebuild because of CVE-2019-9512 and CVE-2019-9514
4a666d
- Resolves: #1766331, #1766303
4a666d
4a666d
* Thu Nov 21 2019 Jindrich Novy <jnovy@redhat.com> - 1.0.0-61.rc9
4a666d
- update to runc 1.0.0-rc9 release
4a666d
- amend golang deps
4a666d
- fixes CVE-2019-16884
4a666d
- Resolves: #1759651
4a666d
4a666d
* Mon Jun 17 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-60.rc8
4a666d
- Resolves: #1721247 - enable fips mode
4a666d
4a666d
* Mon Jun 17 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-59.rc8
4a666d
- Resolves: #1720654 - rebase to v1.0.0-rc8
4a666d
4a666d
* Thu Apr 11 2019 Eduardo Santiago <santiago@redhat.com> - 1.0.0-57.rc5.dev.git2abd837
4a666d
- Resolves: #1693424 - podman rootless: cannot specify gid= mount options
4a666d
4a666d
* Wed Feb 27 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-56.rc5.dev.git2abd837
4a666d
- change-default-root patch not needed as there's no docker on rhel8
4a666d
4a666d
* Tue Feb 12 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-55.rc5.dev.git2abd837
4a666d
- Resolves: CVE-2019-5736
4a666d
4a666d
* Tue Dec 18 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-54.rc5.dev.git2abd837
4a666d
- re-enable debuginfo
4a666d
4a666d
* Mon Dec 17 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-53.rc5.dev.git2abd837
4a666d
- go toolset not in scl anymore
4a666d
4a666d
* Wed Sep 26 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-52.rc5.dev.git2abd837
4a666d
- rebase
4a666d
4a666d
* Fri Aug 31 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-51.dev.gitfdd8055
4a666d
- Fix handling of tmpcopyup
4a666d
4a666d
* Fri Aug 24 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.0.0-49.rc5.dev.gitb4e2ecb
4a666d
- %%gobuild uses no_openssl
4a666d
- remove unused devel and unit-test subpackages
4a666d
4a666d
* Tue Aug 07 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.0.0-48.rc5.dev.gitad0f525
4a666d
- build with %%gobuild
4a666d
- exlude i686 temporarily because of go-toolset issues
4a666d
4a666d
* Mon Jul 30 2018 Florian Weimer <fweimer@redhat.com> - 1.0.0-47.dev.gitb4e2ecb
4a666d
- Rebuild with fixed binutils
4a666d
4a666d
* Fri Jul 27 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-46.dev.gitb4e2ecb
4a666d
- Add patch https://github.com/opencontainers/runc/pull/1807 to allow
4a666d
- runc and podman to work with sd_notify
4a666d
4a666d
* Wed Jul 18 2018 Dan Walsh <dwalsh@redhat.com> - 2:1.0.0-40.rc5.dev.gitad0f525
4a666d
- Remove sysclt handling, not needed in RHEL8
4a666d
- Make sure package built with seccomp flags
4a666d
- Remove rectty
4a666d
- Add completions
4a666d
4a666d
* Fri Jun 15 2018 Dan Walsh <dwalsh@redhat.com> - 2:1.0.0-36.rc5.dev.gitad0f525
4a666d
- Better handling of user namespace
4a666d
4a666d
* Tue May 1 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-31.rc5.git0cbfd83
4a666d
- Fix issues between SELinux and UserNamespace
4a666d
4a666d
* Tue Apr 17 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-27.rc5.dev.git4bb1fe4
4a666d
- rebuilt, placed missing changelog entry back
4a666d
4a666d
* Tue Feb 27 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-26.rc5.git4bb1fe4
4a666d
- release v1.0.0~rc5
4a666d
4a666d
* Wed Jan 24 2018 Dan Walsh <dwalsh@redhat.name> - 1.0.0-26.rc4.git9f9c962
4a666d
- Bump to the latest from upstream
4a666d
4a666d
* Mon Dec 18 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-25.rc4.gite6516b3
4a666d
- built commit e6516b3
4a666d
4a666d
* Fri Dec 15 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-24.rc4.dev.gitc6e4a1e.1
4a666d
- rebase to c6e4a1ebeb1a72b529c6f1b6ee2b1ae5b868b14f
4a666d
- https://github.com/opencontainers/runc/pull/1651
4a666d
4a666d
* Tue Dec 12 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-23.rc4.git1d3ab6d
4a666d
- Resolves: #1524654
4a666d
4a666d
* Sun Dec 10 2017 Dan Walsh <dwalsh@redhat.name> - 1.0.0-22.rc4.git1d3ab6d
4a666d
- Many Stability fixes
4a666d
- Many fixes for rootless containers
4a666d
- Many fixes for static builds
4a666d
4a666d
* Thu Nov 09 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-21.rc4.dev.gitaea4f21
4a666d
- enable debuginfo and include -buildmode=pie for go build
4a666d
4a666d
* Tue Nov 07 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-20.rc4.dev.gitaea4f21
4a666d
- use Makefile
4a666d
4a666d
* Tue Nov 07 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-19.rc4.dev.gitaea4f21
4a666d
- disable debuginfo temporarily
4a666d
4a666d
* Fri Nov 03 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-18.rc4.dev.gitaea4f21
4a666d
- enable debuginfo
4a666d
4a666d
* Wed Oct 25 2017 Dan Walsh <dwalsh@redhat.name> - 1.0.0-17.rc4.gitaea4f21
4a666d
- Add container-selinux prerequires to make sure runc is labeled correctly
4a666d
4a666d
* Thu Oct 19 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-16.rc4.dev.gitaea4f21
4a666d
- correct the release tag "rc4dev" -> "rc4.dev" cause I'm OCD
4a666d
4a666d
* Mon Oct 16 2017 Dan Walsh <dwalsh@redhat.com> - 1.0.0-15.rc4dev.gitaea4f21
4a666d
- Use the same checkout as Fedora for lates CRI-O
4a666d
4a666d
* Fri Sep 22 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-14.rc4dev.git84a082b
4a666d
- rebase to 84a082bfef6f932de921437815355186db37aeb1
4a666d
4a666d
* Tue Jun 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-13.rc3.gitd40db12
4a666d
- Resolves: #1479489
4a666d
- built commit d40db12
4a666d
4a666d
* Tue Jun 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-12.1.gitf8ce01d
4a666d
- disable s390x temporarily because of indefinite wait times on brew
4a666d
4a666d
* Tue Jun 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-11.1.gitf8ce01d
4a666d
- correct previous bogus date :\
4a666d
4a666d
* Mon Jun 12 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-10.1.gitf8ce01d
4a666d
- Resolves: #1441737 - run sysctl_apply for sysctl knob
4a666d
4a666d
* Tue May 09 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-9.1.gitf8ce01d
4a666d
- Resolves: #1447078 - change default root path
4a666d
- add commit e800860 from runc @projectatomic/change-root-path
4a666d
4a666d
* Fri May 05 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-8.1.gitf8ce01d
4a666d
- Resolves: #1441737 - enable kernel sysctl knob /proc/sys/fs/may_detach_mounts
4a666d
4a666d
* Thu Apr 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-7.1.gitf8ce01d
4a666d
- Resolves: #1429675
4a666d
- built @opencontainers/master commit f8ce01d
4a666d
4a666d
* Thu Mar 16 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-4.1.gitee992e5
4a666d
- built @projectatomic/master commit ee992e5
4a666d
4a666d
* Fri Feb 24 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-3.rc2
4a666d
- Resolves: #1426674
4a666d
- built projectatomic/runc_rhel_7 commit 5d93f81
4a666d
4a666d
* Mon Feb 06 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-2.rc2
4a666d
- Resolves: #1419702 - rebase to latest upstream master
4a666d
- built commit b263a43
4a666d
4a666d
* Wed Jan 11 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-1.rc2
4a666d
- Resolves: #1412239 - *CVE-2016-9962* - set init processes as non-dumpable,
4a666d
runc patch from Michael Crosby <crosbymichael@gmail.com>
4a666d
4a666d
* Wed Sep 07 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-6
4a666d
- Resolves: #1373980 - rebuild for 7.3.0
4a666d
4a666d
* Sat Jun 25 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-5
4a666d
- build with golang >= 1.6.2
4a666d
4a666d
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-4
4a666d
- release tags were inconsistent in the previous build
4a666d
4a666d
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-1
4a666d
- Resolves: #1341267 - rebase runc to v0.1.1
4a666d
4a666d
* Tue May 03 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.0-3
4a666d
- add selinux build tag
4a666d
- add BR: libseccomp-devel
4a666d
4a666d
* Tue May 03 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.0-2
4a666d
- Resolves: #1328970 - add seccomp buildtag
4a666d
4a666d
* Tue Apr 19 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.0-1
4a666d
- Resolves: rhbz#1328616 - rebase to v0.1.0
4a666d
4a666d
* Tue Mar 08 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.0.8-1.git4155b68
4a666d
- Resolves: rhbz#1277245 - bump to 0.0.8
4a666d
- Resolves: rhbz#1302363 - criu is a runtime dep
4a666d
- Resolves: rhbz#1302348 - libseccomp-golang is bundled in Godeps
4a666d
- manpages included
4a666d
4a666d
* Wed Nov 25 2015 jchaloup <jchaloup@redhat.com> - 1:0.0.5-0.1.git97bc9a7
4a666d
- Update to 0.0.5, introduce Epoch for Fedora due to 0.2 version instead of 0.0.2
4a666d
4a666d
* Fri Aug 21 2015 Jan Chaloupka <jchaloup@redhat.com> - 0.2-0.2.git90e6d37
4a666d
- First package for Fedora
4a666d
  resolves: #1255179