From efdf619f21aef269af1e329771d83365063ac4f7 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 31 Aug 2020 21:49:36 +0100 Subject: [PATCH] audit: build only libaudit Turns out auditd depends on libev. Lets have that in packages.git. Signed-off-by: Daniel Golle --- .../{utils/audit => libs/libaudit}/Makefile | 78 ++++++------------- .../audit => libs/libaudit}/files/audit.init | 0 ...tue-functions-for-strndupa-rawmemchr.patch | 0 .../libaudit}/patches/0002-fix-gcc-10.patch | 0 4 files changed, 22 insertions(+), 56 deletions(-) rename package/{utils/audit => libs/libaudit}/Makefile (55%) rename package/{utils/audit => libs/libaudit}/files/audit.init (100%) rename package/{utils/audit => libs/libaudit}/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch (100%) rename package/{utils/audit => libs/libaudit}/patches/0002-fix-gcc-10.patch (100%) diff --git a/package/utils/audit/Makefile b/package/libs/libaudit/Makefile similarity index 55% rename from package/utils/audit/Makefile rename to package/libs/libaudit/Makefile index f29e5012894..f478ae5dd0f 100644 --- a/package/utils/audit/Makefile +++ b/package/libs/libaudit/Makefile @@ -5,55 +5,36 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=audit +PKG_NAME:=libaudit PKG_VERSION:=2.8.5 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_NAME:=audit +PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://people.redhat.com/sgrubb/audit PKG_HASH:=0e5d4103646e00f8d1981e1cd2faea7a2ae28e854c31a803e907a383c5e2ecb7 - +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Thomas Petazzoni +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:linux_audit_project:linux_audit + PKG_FIXUP:=autoreconf PKG_USE_MIPS16:=0 +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk - -define Package/audit/Default - SECTION:=utils - TITLE:=Audit Daemon - URL:=http://people.redhat.com/sgrubb/audit/ -endef - -define Package/audit/Default/description - The audit package contains the user space utilities for - storing and searching the audit records generated by - the audit subsystem in the Linux 2.6 kernel -endef +include $(INCLUDE_DIR)/host-build.mk define Package/libaudit -$(call Package/audit/Default) CATEGORY:=Libraries - TITLE+= (library) - DEPENDS:=+@KERNEL_AUDIT + TITLE:=Linux Auditing Framework (shared library) + URL:=http://people.redhat.com/sgrubb/audit/ endef define Package/libaudit/description -$(call Package/audit/Default/description) - This package contains the audit shared library. -endef - -define Package/audit -$(call Package/audit/Default) - CATEGORY:=Utilities - TITLE+= (daemon) - DEPENDS:= +libaudit -endef - -define Package/audit/description -$(call Package/audit/Default/description) - This package contains the audit daemon. + This package contains the audit shared library. endef CONFIGURE_VARS += \ @@ -69,6 +50,12 @@ CONFIGURE_ARGS += \ --without-python3 \ --disable-zos-remote +HOST_CONFIGURE_ARGS += \ + --without-python \ + --without-python3 \ + --disable-zos-remote \ + --without-libcap-ng + ifeq ($(ARCH),aarch64) CONFIGURE_ARGS += --with-aarch64 else ifeq ($(ARCH),arm) @@ -79,12 +66,12 @@ endif # overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions # passed in CONFIGURE_VARS define Build/Compile - $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)/lib endef define Build/Install - $(call Build/Install/Default,install) - $(SED) 's%^dispatcher *=.*%dispatcher = /usr/sbin/audispd%' $(PKG_INSTALL_DIR)/etc/audit/auditd.conf + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)/lib $(MAKE_INSTALL_FLAGS) install + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)/init.d $(MAKE_INSTALL_FLAGS) install endef define Build/InstallDev @@ -103,25 +90,4 @@ define Package/libaudit/install $(CP) $(PKG_INSTALL_DIR)/etc/libaudit.conf $(1)/etc/ endef -define Package/audit/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/audit - $(CP) $(PKG_INSTALL_DIR)/etc/audit/* $(1)/etc/audit/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/audit.init $(1)/etc/init.d/audit -endef - -include $(INCLUDE_DIR)/host-build.mk - -HOST_CONFIGURE_ARGS += \ - --without-python \ - --without-python3 \ - --disable-zos-remote \ - --without-libcap-ng - -$(eval $(call HostBuild)) $(eval $(call BuildPackage,libaudit)) -$(eval $(call BuildPackage,audit)) diff --git a/package/utils/audit/files/audit.init b/package/libs/libaudit/files/audit.init similarity index 100% rename from package/utils/audit/files/audit.init rename to package/libs/libaudit/files/audit.init diff --git a/package/utils/audit/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch b/package/libs/libaudit/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch similarity index 100% rename from package/utils/audit/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch rename to package/libs/libaudit/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch diff --git a/package/utils/audit/patches/0002-fix-gcc-10.patch b/package/libs/libaudit/patches/0002-fix-gcc-10.patch similarity index 100% rename from package/utils/audit/patches/0002-fix-gcc-10.patch rename to package/libs/libaudit/patches/0002-fix-gcc-10.patch -- 2.30.2