aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/e2fsprogs/Makefile
diff options
context:
space:
mode:
authorAndy Walsh <andy.walsh44+github@gmail.com>2018-02-03 21:00:27 +0100
committerJo-Philipp Wich <jo@mein.io>2018-03-14 18:49:24 +0100
commit20d63ebc942012040e08bb815a94f40e535b9cf9 (patch)
tree3245cc17cd74d9794fe1d5f6a0f7dc39e347a164 /package/utils/e2fsprogs/Makefile
parent093b75e10635dcee4a90e0263131aa8d69d251be (diff)
downloadupstream-20d63ebc942012040e08bb815a94f40e535b9cf9.tar.gz
upstream-20d63ebc942012040e08bb815a94f40e535b9cf9.tar.bz2
upstream-20d63ebc942012040e08bb815a94f40e535b9cf9.zip
e2fsprogs: break out libcomerr/libss, FS#1310
libext2fs breaks krb5 by always installing its own copies of libcom_err.so and libss.so. Move the libraries into separate libcomerr and libss packages respectively and add a host build recipe to stage the required compile_et and mk_cmds utilities for use by other packages. This allows the krb5 package to be fixed to use the system wide libcomerr and libss libraries. Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com> [rename libcom_err to libcomerr, make compile_et and mk_cmds relocatable, cleanup makefile, add dependency on host build, reword commit message] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/utils/e2fsprogs/Makefile')
-rw-r--r--package/utils/e2fsprogs/Makefile88
1 files changed, 71 insertions, 17 deletions
diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile
index 068ce3edec..eb50fec972 100644
--- a/package/utils/e2fsprogs/Makefile
+++ b/package/utils/e2fsprogs/Makefile
@@ -10,30 +10,27 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=e2fsprogs
PKG_VERSION:=1.43.7
PKG_HASH:=2a6367289047d68d9ba6a46cf89ab9a1efd0556cde02a51ebaf414ff51edded9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
PKG_LICENSE:=GPL-2.0
PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
-PKG_BUILD_DEPENDS:=util-linux
+PKG_BUILD_DEPENDS:=util-linux e2fsprogs/host
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
-
-define Package/e2fsprogs/Default
- URL:=http://e2fsprogs.sourceforge.net/
- SUBMENU:=Filesystem
-endef
+include $(INCLUDE_DIR)/host-build.mk
define Package/e2fsprogs
-$(call Package/e2fsprogs/Default)
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Filesystem
TITLE:=Ext2/3/4 filesystem utilities
+ URL:=http://e2fsprogs.sourceforge.net/
DEPENDS:=+libuuid +libext2fs
endef
@@ -43,17 +40,43 @@ define Package/e2fsprogs/description
endef
define Package/libext2fs
-$(call Package/e2fsprogs/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libuuid +libblkid
TITLE:=ext2/3/4 filesystem library
+ URL:=http://e2fsprogs.sourceforge.net/
+ DEPENDS:=+libuuid +libblkid +libss +libcomerr
endef
define Package/libext2fs/description
libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
endef
+define Package/libss
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=command-line interface parsing library
+ URL:=http://e2fsprogs.sourceforge.net/
+ DEPENDS:=+libcomerr
+endef
+
+define Package/libss/description
+ This pacakge contains libss, a command-line interface parsing library
+ bundled with e2fsprogs.
+endef
+
+define Package/libcomerr
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=common error description library
+ URL:=http://e2fsprogs.sourceforge.net/
+ DEPENDS:=+libuuid
+endef
+
+define Package/libcomerr/description
+ This package contains libcom_err, the common error description library
+ bundled with e2fsprogs.
+endef
+
define Package/tune2fs
$(call Package/e2fsprogs)
TITLE:=Ext2 Filesystem tune utility
@@ -153,11 +176,36 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/libext2fs.{so,a}* $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/libcom_err.{so,a}* $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/libss.{so,a}* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include/ext2fs
$(CP) $(PKG_BUILD_DIR)/lib/ext2fs/*.h $(1)/usr/include/ext2fs
$(INSTALL_DIR) $(1)/usr/include/et
- $(CP) $(PKG_BUILD_DIR)/lib/et/*.h $(1)/usr/include/et
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/et/*.h $(1)/usr/include/et
+ # Apparently there is some confusion
+ echo "#include <et/com_err.h>" > $(1)/usr/include/com_err.h
+ $(INSTALL_DIR) $(1)/usr/include/ss
+ $(CP) \
+ $(PKG_BUILD_DIR)/lib/ss/ss.h \
+ $(PKG_BUILD_DIR)/lib/ss/ss_err.h \
+ $(1)/usr/include/ss/
+endef
+
+define Host/Compile
+ $(MAKE) $(PKG_JOBS) -C $(HOST_BUILD_DIR)/lib/ss mk_cmds
+ $(MAKE) $(PKG_JOBS) -C $(HOST_BUILD_DIR)/lib/et compile_et
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(1)/share/et
+ $(CP) $(HOST_BUILD_DIR)/lib/et/et_[ch].awk $(1)/share/et/
+ $(INSTALL_DIR) $(1)/share/ss
+ $(CP) $(HOST_BUILD_DIR)/lib/ss/ct_c.{sed,awk} $(1)/share/ss/
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
+ $(CP) \
+ $(HOST_BUILD_DIR)/lib/et/compile_et \
+ $(HOST_BUILD_DIR)/lib/ss/mk_cmds \
+ $(1)/bin/
endef
define Package/e2fsprogs/conffiles
@@ -182,15 +230,19 @@ define Package/e2fsprogs/install
$(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
endef
-define Package/libcom_err/install
+define Package/libcomerr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so* $(1)/usr/lib/
+endef
+
+define Package/libss/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libss.so* $(1)/usr/lib/
endef
define Package/libext2fs/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* \
- $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* \
- $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
endef
define Package/libext2fs/install_lib
@@ -233,7 +285,6 @@ define Package/debugfs/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/debugfs $(1)/usr/sbin/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libss.so.* $(1)/usr/lib/
endef
define Package/chattr/install
@@ -247,6 +298,8 @@ define Package/lsattr/install
endef
$(eval $(call BuildPackage,e2fsprogs))
+$(eval $(call BuildPackage,libcomerr))
+$(eval $(call BuildPackage,libss))
$(eval $(call BuildPackage,libext2fs))
$(eval $(call BuildPackage,tune2fs))
$(eval $(call BuildPackage,resize2fs))
@@ -257,3 +310,4 @@ $(eval $(call BuildPackage,filefrag))
$(eval $(call BuildPackage,debugfs))
$(eval $(call BuildPackage,chattr))
$(eval $(call BuildPackage,lsattr))
+$(eval $(call HostBuild))