947af7
%global with_debug 1
947af7
%global with_bundled 1
947af7
%global with_check 0
947af7
947af7
%if 0%{?with_debug}
947af7
%global _find_debuginfo_dwz_opts %{nil}
947af7
%global _dwz_low_mem_die_limit 0
947af7
%else
947af7
%global debug_package   %{nil}
947af7
%endif
947af7
947af7
%if 0%{?rhel} > 7 && ! 0%{?fedora}
947af7
%define gobuild(o:) \
947af7
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback no_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};
947af7
%endif
947af7
947af7
%global provider github
947af7
%global provider_tld com
947af7
%global project opencontainers
947af7
%global repo runc
947af7
# https://github.com/opencontainers/runc
947af7
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
947af7
%global git0 https://%{import_path}
947af7
%global commit0 dc9208a3303feef5b3839f4323d9beb36df0a9dd
947af7
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
947af7
947af7
Name: %{repo}
947af7
Version: 1.0.0
fd5e94
Release: 66.rc10%{?dist}
947af7
Summary: CLI for running Open Containers
947af7
ExcludeArch: %{ix86}
947af7
License: ASL 2.0
947af7
URL: %{git0}
947af7
Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
947af7
Patch0: 1807.patch
fd5e94
Patch1: 0001-rootfs-add-mount-destination-validation.patch
947af7
BuildRequires: golang >= 1.12.12-4
947af7
BuildRequires: git
947af7
BuildRequires: go-md2man
947af7
BuildRequires: libseccomp-devel
947af7
Requires: criu
947af7
Requires(pre): container-selinux >= 2:2.2-2
947af7
947af7
%description
947af7
The runc command can be used to start containers which are packaged
947af7
in accordance with the Open Container Initiative's specifications,
947af7
and to manage containers running under runc.
947af7
947af7
%prep
947af7
%autosetup -Sgit -n %{repo}-%{commit0}
947af7
sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name}
947af7
947af7
%build
947af7
mkdir -p GOPATH
947af7
pushd GOPATH
947af7
    mkdir -p src/%{provider}.%{provider_tld}/%{project}
947af7
    ln -s $(dirs +1 -l) src/%{import_path}
947af7
popd
947af7
947af7
pushd GOPATH/src/%{import_path}
fd5e94
export GO111MODULE=off
947af7
export GOPATH=%{gopath}:$(pwd)/GOPATH
947af7
export BUILDTAGS="selinux seccomp"
947af7
%gobuild -o %{name} %{import_path}
947af7
947af7
pushd man
947af7
./md2man-all.sh
947af7
popd
947af7
947af7
%install
947af7
install -d -p %{buildroot}%{_bindir}
947af7
install -p -m 755 %{name} %{buildroot}%{_bindir}
947af7
947af7
# install man pages
947af7
install -d -p %{buildroot}%{_mandir}/man8
947af7
install -p -m 644 man/man8/* %{buildroot}%{_mandir}/man8
947af7
# install bash completion
947af7
install -d -p %{buildroot}%{_datadir}/bash-completion/completions
947af7
install -p -m 0644 contrib/completions/bash/%{name} %{buildroot}%{_datadir}/bash-completion/completions
947af7
947af7
%check
947af7
947af7
#define license tag if not already defined
947af7
%{!?_licensedir:%global license %doc}
947af7
947af7
%files
947af7
%license LICENSE
947af7
%doc MAINTAINERS_GUIDE.md PRINCIPLES.md README.md CONTRIBUTING.md
947af7
%{_bindir}/%{name}
947af7
%{_mandir}/man8/%{name}*
947af7
%{_datadir}/bash-completion/completions/%{name}
947af7
947af7
%changelog
fd5e94
* Wed May 19 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-66.rc10
fd5e94
- set GO111MODULE=off to fix build
fd5e94
- Related: #1955651
fd5e94
fd5e94
* Wed May 19 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-65.rc10
fd5e94
- fix CVE-2021-30465
fd5e94
- Resolves: #1955651
fd5e94
947af7
* Thu Feb 13 2020 Jindrich Novy <jnovy@redhat.com> - 1.0.0-64.rc10
947af7
- address CVE-2019-19921 by updating to rc10
947af7
- Resolves: #1801888
947af7
947af7
* Wed Dec 11 2019 Jindrich Novy <jnovy@redhat.com> - 1.0.0-63.rc9
947af7
- use no_openssl in BUILDTAGS (no vendored crypto in runc)
947af7
- Related: RHELPLAN-25139
947af7
947af7
* Mon Dec 09 2019 Jindrich Novy <jnovy@redhat.com> - 1.0.0-62.rc9
947af7
- be sure to use golang >= 1.12.12-4
947af7
- Related: RHELPLAN-25139
947af7
947af7
* Thu Nov 21 2019 Jindrich Novy <jnovy@redhat.com> - 1.0.0-61.rc9
947af7
- update to runc 1.0.0-rc9 release
947af7
- amend golang deps
947af7
- fixes CVE-2019-16884
947af7
- Resolves: #1759651
947af7
947af7
* Mon Jun 17 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-60.rc8
947af7
- Resolves: #1721247 - enable fips mode
947af7
947af7
* Mon Jun 17 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-59.rc8
947af7
- Resolves: #1720654 - rebase to v1.0.0-rc8
947af7
947af7
* Thu Apr 11 2019 Eduardo Santiago <santiago@redhat.com> - 1.0.0-57.rc5.dev.git2abd837
947af7
- Resolves: #1693424 - podman rootless: cannot specify gid= mount options
947af7
947af7
* Wed Feb 27 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-56.rc5.dev.git2abd837
947af7
- change-default-root patch not needed as there's no docker on rhel8
947af7
947af7
* Tue Feb 12 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-55.rc5.dev.git2abd837
947af7
- Resolves: CVE-2019-5736
947af7
947af7
* Tue Dec 18 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-54.rc5.dev.git2abd837
947af7
- re-enable debuginfo
947af7
947af7
* Mon Dec 17 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-53.rc5.dev.git2abd837
947af7
- go toolset not in scl anymore
947af7
947af7
* Wed Sep 26 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-52.rc5.dev.git2abd837
947af7
- rebase
947af7
947af7
* Fri Aug 31 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-51.dev.gitfdd8055
947af7
- Fix handling of tmpcopyup
947af7
947af7
* Fri Aug 24 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.0.0-49.rc5.dev.gitb4e2ecb
947af7
- %%gobuild uses no_openssl
947af7
- remove unused devel and unit-test subpackages
947af7
947af7
* Tue Aug 07 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.0.0-48.rc5.dev.gitad0f525
947af7
- build with %%gobuild
947af7
- exlude i686 temporarily because of go-toolset issues
947af7
947af7
* Mon Jul 30 2018 Florian Weimer <fweimer@redhat.com> - 1.0.0-47.dev.gitb4e2ecb
947af7
- Rebuild with fixed binutils
947af7
947af7
* Fri Jul 27 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-46.dev.gitb4e2ecb
947af7
- Add patch https://github.com/opencontainers/runc/pull/1807 to allow
947af7
- runc and podman to work with sd_notify
947af7
947af7
* Wed Jul 18 2018 Dan Walsh <dwalsh@redhat.com> - 2:1.0.0-40.rc5.dev.gitad0f525
947af7
- Remove sysclt handling, not needed in RHEL8
947af7
- Make sure package built with seccomp flags
947af7
- Remove rectty
947af7
- Add completions
947af7
947af7
* Fri Jun 15 2018 Dan Walsh <dwalsh@redhat.com> - 2:1.0.0-36.rc5.dev.gitad0f525
947af7
- Better handling of user namespace
947af7
947af7
* Tue May 1 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-31.rc5.git0cbfd83
947af7
- Fix issues between SELinux and UserNamespace
947af7
947af7
* Tue Apr 17 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-27.rc5.dev.git4bb1fe4
947af7
- rebuilt, placed missing changelog entry back
947af7
947af7
* Tue Feb 27 2018 Dan Walsh <dwalsh@redhat.name> - 2:1.0.0-26.rc5.git4bb1fe4
947af7
- release v1.0.0~rc5
947af7
947af7
* Wed Jan 24 2018 Dan Walsh <dwalsh@redhat.name> - 1.0.0-26.rc4.git9f9c962
947af7
- Bump to the latest from upstream
947af7
947af7
* Mon Dec 18 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-25.rc4.gite6516b3
947af7
- built commit e6516b3
947af7
947af7
* Fri Dec 15 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-24.rc4.dev.gitc6e4a1e.1
947af7
- rebase to c6e4a1ebeb1a72b529c6f1b6ee2b1ae5b868b14f
947af7
- https://github.com/opencontainers/runc/pull/1651
947af7
947af7
* Tue Dec 12 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-23.rc4.git1d3ab6d
947af7
- Resolves: #1524654
947af7
947af7
* Sun Dec 10 2017 Dan Walsh <dwalsh@redhat.name> - 1.0.0-22.rc4.git1d3ab6d
947af7
- Many Stability fixes
947af7
- Many fixes for rootless containers
947af7
- Many fixes for static builds
947af7
947af7
* Thu Nov 09 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-21.rc4.dev.gitaea4f21
947af7
- enable debuginfo and include -buildmode=pie for go build
947af7
947af7
* Tue Nov 07 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-20.rc4.dev.gitaea4f21
947af7
- use Makefile
947af7
947af7
* Tue Nov 07 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-19.rc4.dev.gitaea4f21
947af7
- disable debuginfo temporarily
947af7
947af7
* Fri Nov 03 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-18.rc4.dev.gitaea4f21
947af7
- enable debuginfo
947af7
947af7
* Wed Oct 25 2017 Dan Walsh <dwalsh@redhat.name> - 1.0.0-17.rc4.gitaea4f21
947af7
- Add container-selinux prerequires to make sure runc is labeled correctly
947af7
947af7
* Thu Oct 19 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-16.rc4.dev.gitaea4f21
947af7
- correct the release tag "rc4dev" -> "rc4.dev" cause I'm OCD
947af7
947af7
* Mon Oct 16 2017 Dan Walsh <dwalsh@redhat.com> - 1.0.0-15.rc4dev.gitaea4f21
947af7
- Use the same checkout as Fedora for lates CRI-O
947af7
947af7
* Fri Sep 22 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.0.0-14.rc4dev.git84a082b
947af7
- rebase to 84a082bfef6f932de921437815355186db37aeb1
947af7
947af7
* Tue Jun 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-13.rc3.gitd40db12
947af7
- Resolves: #1479489
947af7
- built commit d40db12
947af7
947af7
* Tue Jun 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-12.1.gitf8ce01d
947af7
- disable s390x temporarily because of indefinite wait times on brew
947af7
947af7
* Tue Jun 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-11.1.gitf8ce01d
947af7
- correct previous bogus date :\
947af7
947af7
* Mon Jun 12 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-10.1.gitf8ce01d
947af7
- Resolves: #1441737 - run sysctl_apply for sysctl knob
947af7
947af7
* Tue May 09 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-9.1.gitf8ce01d
947af7
- Resolves: #1447078 - change default root path
947af7
- add commit e800860 from runc @projectatomic/change-root-path
947af7
947af7
* Fri May 05 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-8.1.gitf8ce01d
947af7
- Resolves: #1441737 - enable kernel sysctl knob /proc/sys/fs/may_detach_mounts
947af7
947af7
* Thu Apr 13 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-7.1.gitf8ce01d
947af7
- Resolves: #1429675
947af7
- built @opencontainers/master commit f8ce01d
947af7
947af7
* Thu Mar 16 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-4.1.gitee992e5
947af7
- built @projectatomic/master commit ee992e5
947af7
947af7
* Fri Feb 24 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-3.rc2
947af7
- Resolves: #1426674
947af7
- built projectatomic/runc_rhel_7 commit 5d93f81
947af7
947af7
* Mon Feb 06 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-2.rc2
947af7
- Resolves: #1419702 - rebase to latest upstream master
947af7
- built commit b263a43
947af7
947af7
* Wed Jan 11 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.0-1.rc2
947af7
- Resolves: #1412239 - *CVE-2016-9962* - set init processes as non-dumpable,
947af7
runc patch from Michael Crosby <crosbymichael@gmail.com>
947af7
947af7
* Wed Sep 07 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-6
947af7
- Resolves: #1373980 - rebuild for 7.3.0
947af7
947af7
* Sat Jun 25 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-5
947af7
- build with golang >= 1.6.2
947af7
947af7
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-4
947af7
- release tags were inconsistent in the previous build
947af7
947af7
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.1-1
947af7
- Resolves: #1341267 - rebase runc to v0.1.1
947af7
947af7
* Tue May 03 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.0-3
947af7
- add selinux build tag
947af7
- add BR: libseccomp-devel
947af7
947af7
* Tue May 03 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.0-2
947af7
- Resolves: #1328970 - add seccomp buildtag
947af7
947af7
* Tue Apr 19 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.0-1
947af7
- Resolves: rhbz#1328616 - rebase to v0.1.0
947af7
947af7
* Tue Mar 08 2016 Lokesh Mandvekar <lsm5@redhat.com> - 0.0.8-1.git4155b68
947af7
- Resolves: rhbz#1277245 - bump to 0.0.8
947af7
- Resolves: rhbz#1302363 - criu is a runtime dep
947af7
- Resolves: rhbz#1302348 - libseccomp-golang is bundled in Godeps
947af7
- manpages included
947af7
947af7
* Wed Nov 25 2015 jchaloup <jchaloup@redhat.com> - 1:0.0.5-0.1.git97bc9a7
947af7
- Update to 0.0.5, introduce Epoch for Fedora due to 0.2 version instead of 0.0.2
947af7
947af7
* Fri Aug 21 2015 Jan Chaloupka <jchaloup@redhat.com> - 0.2-0.2.git90e6d37
947af7
- First package for Fedora
947af7
  resolves: #1255179