containerd-vl.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. %bcond_with systemd
  2. %bcond_without check
  3. Name: containerd
  4. Version: 1.7.20
  5. Release: 1%{_dist_release}%{?with_systemd:.systemd}
  6. Summary: An open and reliable container runtime
  7. Group: virtualization
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. # Generated by go-vendor-tools
  11. # SourceLicense: Apache-2.0
  12. License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
  13. URL: https://github.com/containerd/containerd
  14. Source0: https://github.com/containerd/containerd/archive/refs/tags/v%{version}.tar.gz#/containerd-%{version}.tar.gz
  15. Patch: 0001-Makefile-fix-GO_LDFLAGS-quoting.patch
  16. %if %{with man}
  17. BuildRequires: /usr/bin/go-md2man
  18. %endif
  19. BuildRequires: btrfs-progs-devel
  20. BuildRequires: libseccomp-devel
  21. BuildRequires: make
  22. BuildRequires: golang
  23. Requires: runc
  24. %description
  25. Containerd is an industry-standard container runtime with an emphasis on
  26. simplicity, robustness and portability. It is available as a daemon for Linux
  27. and Windows, which can manage the complete container lifecycle of its host
  28. system: image transfer and storage, container execution and supervision,
  29. low-level storage and network attachments, etc.
  30. %prep
  31. %setup -q
  32. %autopatch -p1
  33. # Replace default bin directory
  34. sed -i "s|/usr/local/bin/containerd|/usr/bin/containerd|" containerd.service
  35. %build
  36. GO_LDFLAGS="-s -w" GO_BUILDFLAGS="-E -trimpath"
  37. %global makeflags %{expand:\\
  38. DATADIR=%{_datadir} \\
  39. DESTDIR=%{buildroot} \\
  40. MANDIR=%{_mandir} \\
  41. PREFIX=%{_prefix} \\
  42. SHIM_CGO_ENABLED=1 \\
  43. BUILDTAGS="apparmor selinux seccomp" \\
  44. VERSION=%{version} \\
  45. REVISION=%{release} \\
  46. }
  47. %if %{with man}
  48. %make_build %{makeflags} binaries man
  49. %else
  50. %make_build %{makeflags} binaries
  51. %endif
  52. %install
  53. %if %{with man}
  54. %make_build %{makeflags} install install-man
  55. %else
  56. %make_build %{makeflags} install
  57. %endif
  58. # Set up dummy configuration.
  59. install -d -m755 %{buildroot}/%{_sysconfdir}/%{name}
  60. echo "# See containerd-config.toml(5) for documentation." >%{buildroot}/%{_sysconfdir}/%{name}/config.toml
  61. %if %{with systemd}
  62. install -Dpm 0644 containerd.service -t %{buildroot}%{_unitdir}
  63. %endif
  64. %check
  65. %if %{with check}
  66. %make_build %{makeflags} test
  67. %endif
  68. %files
  69. %license vendor/modules.txt
  70. %doc ROADMAP.md ADOPTERS.md BUILDING.md README.md RELEASES.md SCOPE.md
  71. %{_bindir}/ctr
  72. %{_bindir}/containerd
  73. %{_bindir}/containerd-stress
  74. %{_bindir}/containerd-shim*
  75. %if %{with man}
  76. %{_mandir}/man5/containerd-config.toml.5*
  77. %{_mandir}/man8/ctr.8*
  78. %{_mandir}/man8/containerd.8*
  79. %{_mandir}/man8/containerd-config.8*
  80. %endif
  81. %dir %{_sysconfdir}/containerd
  82. %config(noreplace) %{_sysconfdir}/containerd/config.toml
  83. %if %{with systemd}
  84. %{_unitdir}/containerd.service
  85. %endif
  86. %changelog
  87. * Thu Jul 18 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.20-1
  88. - new upstream release.
  89. * Mon Jul 15 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.19-1
  90. - initial build for Vine Linux.