packages/utils/crun/Makefile
Oskari Rauta bb3af8acb9 crun: update to 1.9.2
changelog 1.9.2:
 - cgroup: reset the inherited cpu affinity after moving to cgroup. Old kernels do that automatically, but new kernels remember the affinity that was set before the cgroup move, so we need to reset it in order to honor the cpuset configuration.

changelog 1.9.1:
 - utils: ignore ENOTSUP when chmod a symlink. It fixes a problem on Linux 6.6 that always refuses chmod on a symlink.
 - build: fix build on CentOS 7
 - linux: add new fallback when mount fails with EBUSY, so that there is not an additional tmpfs mount if not needed.
 - utils: improve error message when a directory cannot be created as a component of the path is already existing as a non directory.

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
2023-10-01 22:12:58 +01:00

92 lines
3 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=crun
PKG_VERSION:=1.9.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/containers/crun/tar.gz/$(PKG_VERSION)?
PKG_HASH:=a5ed2984a9ebb3e0e5cba0781832f03931423097a56f48a948ab034b46726aef
PKG_BUILD_DEPENDS:=argp-standalone
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/crun
SECTION:=utils
CATEGORY:=Utilities
TITLE:=crun
URL:=https://github.com/containers/crun
DEPENDS:=@!arc +libseccomp +libcap +libgcrypt
endef
define Package/crun/description
A fast and low-memory footprint OCI Container Runtime fully written in C.
endef
LIBOCISPEC_COMMIT:=3d168261f250477061fe0eb3648bf998c70c6519
define Download/libocispec
PROTO:=git
URL:=https://github.com/containers/libocispec.git
VERSION:=$(LIBOCISPEC_COMMIT)
MIRROR_HASH:=4e308ff6a40e38aee184abef9156fa92b1ea9f978e277be2ed7b12f9e06f717f
FILE:=libocispec-$(LIBOCISPEC_COMMIT).tar.xz
SUBDIR:=libocispec
endef
$(eval $(call Download,libocispec))
CONFIGURE_ARGS+= \
--disable-systemd \
--enable-embedded-yajl \
--enable-caps \
--enable-dl \
--enable-seccomp \
--enable-bpf
define Build/Prepare
$(call Build/Prepare/Default)
$(SED) '/#include <git-version.h>/d' $(PKG_BUILD_DIR)/src/{crun.c,libcrun/container.c}
xzcat $(DL_DIR)/libocispec-$(LIBOCISPEC_COMMIT).tar.xz | $(HOST_TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef
define Build/Configure
$(call Build/Configure/Default)
$(SED) '/#define PACKAGE \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define VERSION \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define GIT_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_BUGREPORT \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_NAME \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_STRING \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_TARNAME \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_NAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_STRING \"$(PKG_NAME) $(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_TARNAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_BUGREPORT \"bugs@openwrt.org\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define GIT_VERSION \"$(PKG_SOURCE_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
endef
define Package/crun/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/crun $(1)/usr/bin/
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrun.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,crun))