You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.5 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=podman
  3. PKG_VERSION:=4.0.2
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION)
  7. PKG_HASH:=cac4328b0a5e618f4f6567944e255d15fad3e1f7901df55603f1efdd7aaeda95
  8. PKG_LICENSE:=Apache-2.0
  9. PKG_LICENSE_FILES:=LICENSE
  10. PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
  11. PKG_BUILD_DEPENDS:=golang/host protobuf/host
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_USE_MIPS16:=0
  14. GO_PKG:=github.com/containers/podman/
  15. GO_PKG_BUILD_PKG:=github.com/containers/podman/v4/cmd/podman/
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../../lang/golang/golang-package.mk
  18. define Download/default-registries
  19. URL:=https://raw.githubusercontent.com/projectatomic/registries/da9a9c87781823f45401ca49da04e269c9e3100e
  20. URL_FILE:=registries.fedora
  21. FILE:=registries.fedora-da9a9c8778
  22. HASH:=bc2b58c209aa8ca35b6814ec9a3c64716d4970b884ade460b65000e56024dfee
  23. endef
  24. define Download/default-policy
  25. URL:=https://raw.githubusercontent.com/containers/skopeo/362f70b056a1f5d2bd4184527a0ae0d20c4d35d3
  26. URL_FILE:=default-policy.json
  27. FILE:=default-policy.json-362f70b056
  28. HASH:=cddfaa8e6a7e5497b67cc0dd8e8517058d0c97de91bf46fff867528415f2d946
  29. endef
  30. define Package/podman
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. TITLE:=Podman
  34. URL:=https://podman.io
  35. DEPENDS:=$(GO_ARCH_DEPENDS) +conmon +cni +cni-plugins +btrfs-progs +glib2 +gnupg2 +uci-firewall +libgpg-error +libseccomp +libgpgme +nsenter +zoneinfo-simple +kmod-veth +catatonit +PODMAN_SELINUX_SUPPORT:libselinux +PODMAN_IPTABLES_FW:iptables
  36. endef
  37. define Package/podman/description
  38. Podman: A tool for managing OCI containers and pods
  39. endef
  40. define Package/podman/config
  41. menu "Configuration"
  42. config PODMAN_SELINUX_SUPPORT
  43. bool "Enable SELinux support"
  44. default n
  45. config PODMAN_IPTABLES_FW
  46. bool "Add iptabels firewall options to default podman network"
  47. default n
  48. endmenu
  49. endef
  50. define Package/podman/conffiles
  51. /etc/containers/policy.json
  52. /etc/containers/storage.conf
  53. /etc/containers/registries.conf
  54. /etc/containers/containers.conf
  55. /etc/cni/net.d/87-podman-bridge.conflist
  56. endef
  57. ifdef CONFIG_PODMAN_SELINUX_SUPPORT
  58. GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper,selinux,apparmor
  59. else
  60. GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper,apparmor
  61. endif
  62. ifdef CONFIG_PODMAN_IPTABLES_FW
  63. CNIFILE:=87-podman-bridge-iptables.conflist
  64. else
  65. CNIFILE:=87-podman-bridge.conflist
  66. endif
  67. define Build/Prepare
  68. $(call Build/Prepare/Default)
  69. $(eval $(call Download,default-registries))
  70. $(eval $(call Download,default-policy))
  71. endef
  72. define Package/podman/install
  73. $(call GoPackage/Package/Install/Bin,$(1))
  74. $(INSTALL_DIR) $(1)/etc/containers
  75. $(INSTALL_DATA) $(DL_DIR)/default-policy.json-362f70b056 $(1)/etc/containers/policy.json
  76. $(INSTALL_DATA) $(DL_DIR)/registries.fedora-da9a9c8778 $(1)/etc/containers/registries.conf
  77. $(INSTALL_DATA) $(PKG_BUILD_DIR)/vendor/github.com/containers/storage/storage.conf $(1)/etc/containers/storage.conf
  78. $(INSTALL_DATA) ./files/containers.conf $(1)/etc/containers/containers.conf
  79. $(INSTALL_DIR) $(1)/etc/cni/net.d
  80. $(INSTALL_CONF) ./files/$(CNIFILE) $(1)/etc/cni/net.d/87-podman-bridge.conflist
  81. $(INSTALL_DIR) $(1)/usr/share/containers
  82. $(INSTALL_DATA) $(PKG_BUILD_DIR)/vendor/github.com/containers/common/pkg/seccomp/seccomp.json $(1)/usr/share/containers/
  83. $(INSTALL_DIR) $(1)/etc/init.d
  84. $(INSTALL_BIN) ./files/podman.init $(1)/etc/init.d/podman
  85. $(SED) 's/driver = \"\"/driver = \"overlay\"/g' $(1)/etc/containers/storage.conf
  86. endef
  87. $(eval $(call GoBinPackage,podman))
  88. $(eval $(call BuildPackage,podman))