runc-vl.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. %bcond_with man
  2. %global with_debug 0
  3. %if 0%{?with_debug}
  4. %global _find_debuginfo_dwz_opts %{nil}
  5. %global _dwz_low_mem_die_limit 0
  6. %else
  7. %global debug_package %{nil}
  8. %endif
  9. %global provider github
  10. %global provider_tld com
  11. %global project opencontainers
  12. %global repo runc
  13. # https://github.com/opencontainers/runc
  14. %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
  15. %global import_path %{provider_prefix}
  16. %global git0 https://github.com/opencontainers/runc
  17. Name: %{repo}
  18. Version: 1.1.13
  19. Release: 1%{_dist_release}
  20. Summary: CLI for running Open Containers
  21. Group: virtualization
  22. Vendor: Project Vine
  23. Distribution: Vine Linux
  24. License: Apache-2.0 and BSD-2-Clause and BSD-3-Clause and MIT
  25. URL: %{git0}
  26. Source0: %{git0}/archive/v%{version}/%{name}-%{version}.tar.gz
  27. Source1: ChangeLog.fedora
  28. BuildRequires: make
  29. BuildRequires: golang
  30. BuildRequires: pkgconfig(libseccomp)
  31. %if %{with man}
  32. BuildRequires: go-md2man
  33. %endif
  34. Provides: oci-runtime
  35. %ifnarch s390x
  36. #Recommends: criu
  37. %endif
  38. %description
  39. The runc command can be used to start containers which are packaged
  40. in accordance with the Open Container Initiative's specifications,
  41. and to manage containers running under runc.
  42. %debug_package
  43. %prep
  44. %autosetup -p1 -n %{name}-%{version}
  45. sed -i 's/ -trimpath//g' Makefile
  46. cp -f %{SOURCE1} ./
  47. %build
  48. %set_build_flags
  49. export CGO_CFLAGS=$CFLAGS
  50. # These extra flags present in $CFLAGS have been skipped for now as they break the build
  51. CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')
  52. CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-Wp,D_GLIBCXX_ASSERTIONS//g')
  53. CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1//g')
  54. %ifarch x86_64
  55. export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full"
  56. %endif
  57. mkdir -p GOPATH
  58. pushd GOPATH
  59. mkdir -p src/%{provider}.%{provider_tld}/%{project}
  60. ln -s $(dirs +1 -l) src/%{import_path}
  61. popd
  62. pushd GOPATH/src/%{import_path}
  63. export GOPATH=$(pwd)/GOPATH
  64. make BUILDTAGS="apparmor selinux seccomp" all
  65. sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name}
  66. %install
  67. install -d -p %{buildroot}%{_bindir}
  68. install -p -m 755 %{name} %{buildroot}%{_bindir}
  69. %if %{with man}
  70. # generate man pages
  71. man/md2man-all.sh
  72. # install man pages
  73. #install -d -p %{buildroot}%{_mandir}/man8
  74. install -p -m 0644 man/man8/*.8 %{buildroot}%{_mandir}/man8/.
  75. %endif
  76. # install bash completion
  77. install -d -p %{buildroot}%{_datadir}/bash-completion/completions
  78. install -p -m 0644 contrib/completions/bash/%{name} %{buildroot}%{_datadir}/bash-completion/completions
  79. #define license tag if not already defined
  80. %{!?_licensedir:%global license %doc}
  81. %files
  82. %license LICENSE
  83. %doc MAINTAINERS_GUIDE.md PRINCIPLES.md README.md CONTRIBUTING.md
  84. %doc ChangeLog.fedora
  85. %{_bindir}/%{name}
  86. %if %{with man}
  87. %{_mandir}/man8/%{name}*
  88. %endif
  89. %{_datadir}/bash-completion/completions/%{name}
  90. %changelog
  91. * Sun Jul 14 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.13-1
  92. - initial build for Vine Linux.