[OpenWrt-Devel] [PATCH] e2fsprogs: Update to 1.43.5

2019-01-11 Thread Rosen Penev
Added e4crypt tool for encrypting files and directories. To work properly
requires kernel and work on keyutils. That will be done in a future commit

Remove patch 000-relocatable.patch as it seems to be no longer needed.

Some top-level reorganization for consistency between packages.

Tested on GnuBee PC1 (mt7621).

Signed-off-by: Rosen Penev 
---
 package/utils/e2fsprogs/Makefile  | 18 +++-
 .../e2fsprogs/patches/000-relocatable.patch   | 46 ---
 2 files changed, 16 insertions(+), 48 deletions(-)
 delete mode 100644 package/utils/e2fsprogs/patches/000-relocatable.patch

diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile
index 48f812a30c..edb9acfc76 100644
--- a/package/utils/e2fsprogs/Makefile
+++ b/package/utils/e2fsprogs/Makefile
@@ -8,13 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=e2fsprogs
-PKG_VERSION:=1.44.3
-PKG_HASH:=5d899f7d30f481cc0c6a049ebe26ebe145f1b524182ea1ecde4086162d4e4bb6
+PKG_VERSION:=1.44.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
+PKG_HASH:=ba5eb3069d69160d96818bb9700de9ab5a8458d9add1fd85d427cd34c5b9
+
 PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=NOTICE
 PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
 
 PKG_BUILD_DEPENDS:=util-linux e2fsprogs/host
@@ -107,6 +109,12 @@ $(call Package/e2fsprogs)
   DEPENDS:= +e2fsprogs
 endef
 
+define Package/e4crypt
+$(call Package/e2fsprogs)
+  TITLE:=Ext4 Filesystem encryption utility
+  DEPENDS:= +e2fsprogs
+endef
+
 define Package/filefrag
 $(call Package/e2fsprogs)
   TITLE:=Ext2 Filesystem file fragmentation report utility
@@ -278,6 +286,11 @@ define Package/e2freefrag/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2freefrag $(1)/usr/sbin/
 endef
 
+define Package/e4crypt/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e4crypt $(1)/usr/sbin/
+endef
+
 define Package/filefrag/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/filefrag $(1)/usr/sbin/
@@ -308,6 +321,7 @@ $(eval $(call BuildPackage,resize2fs))
 $(eval $(call BuildPackage,badblocks))
 $(eval $(call BuildPackage,dumpe2fs))
 $(eval $(call BuildPackage,e2freefrag))
+$(eval $(call BuildPackage,e4crypt))
 $(eval $(call BuildPackage,filefrag))
 $(eval $(call BuildPackage,debugfs))
 $(eval $(call BuildPackage,chattr))
diff --git a/package/utils/e2fsprogs/patches/000-relocatable.patch 
b/package/utils/e2fsprogs/patches/000-relocatable.patch
deleted file mode 100644
index 017aca1b05..00
--- a/package/utils/e2fsprogs/patches/000-relocatable.patch
+++ /dev/null
@@ -1,46 +0,0 @@
 a/lib/et/compile_et.sh.in
-+++ b/lib/et/compile_et.sh.in
-@@ -2,9 +2,15 @@
- #
- #
- 
--datarootdir=@datarootdir@
--AWK=@AWK@
--DIR=@datadir@/et
-+if test "x$STAGING_DIR" = x ; then
-+  datarootdir=@datarootdir@
-+  AWK=@AWK@
-+  DIR=@datadir@/et
-+else
-+  datarootdir="$STAGING_DIR/../hostpkg/share"
-+  AWK=awk
-+  DIR="$datarootdir/et"
-+fi
- 
- if test "$1" = "--build-tree" ; then
- shift;
 a/lib/ss/mk_cmds.sh.in
-+++ b/lib/ss/mk_cmds.sh.in
-@@ -1,11 +1,17 @@
- #!/bin/sh
- #
- #
--
--datarootdir=@datarootdir@
--DIR=@datadir@/ss
--AWK=@AWK@
--SED=@SED@
-+if test "x$STAGING_DIR" = x ; then
-+  datarootdir=@datarootdir@
-+  DIR=@datadir@/ss
-+  AWK=@AWK@
-+  SED=@SED@
-+else
-+  datarootdir="$STAGING_DIR/../hostpkg/share"
-+  DIR="$datarootdir/ss"
-+  AWK=awk
-+  SED=sed
-+fi
- 
- for as_var in \
-   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-- 
2.17.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] kernel: Build: Split kmod-regmap

2019-01-11 Thread Hauke Mehrtens
This reduces the needed modifications to the mainline Linux kernel and
also makes the regmap package work with an out of tree kernel which
does not have these modifications.

The regmap-core is only added when it is really build as a module.
The regmap-core is normally bool so it cannot be built as a module in an
unmodified kernel. When it is selected by on other kernel module it will
always be selected as build in and it also does not show up in
$(LINUX_DIR)/modules.builtin as it is not supposed to be a kernel module.
When it is not in $(LINUX_DIR)/modules.builtin the build system expects
it to be built as a .ko file.
Just check if the module is really there and only add it in that case.

This splits the regmap package into multiple packages, one for each bus type.
This way only the bus maps which are really needed have to be added.
This also splits the I2C, SPI and MMIO regmap into separate packages to not
require all these subsystems to build them, on an unmodified upstream kernel
this also causes problems in some situations.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/can.mk|  2 +-
 package/kernel/linux/modules/hwmon.mk  | 10 +--
 package/kernel/linux/modules/iio.mk|  6 +-
 package/kernel/linux/modules/other.mk  | 87 --
 package/kernel/linux/modules/sound.mk  |  4 +-
 package/kernel/linux/modules/wpan.mk   |  4 +-
 target/linux/at91/modules.mk   |  2 +-
 target/linux/brcm2708/modules.mk   |  4 +-
 .../generic/hack-4.14/259-regmap_dynamic.patch | 14 ++--
 .../generic/hack-4.19/259-regmap_dynamic.patch | 17 ++---
 .../generic/hack-4.9/259-regmap_dynamic.patch  | 14 ++--
 .../generic/pending-3.18/259-regmap_dynamic.patch  | 14 ++--
 target/linux/ramips/modules.mk |  2 +-
 13 files changed, 101 insertions(+), 79 deletions(-)

diff --git a/package/kernel/linux/modules/can.mk 
b/package/kernel/linux/modules/can.mk
index 4154ceb..b0d2545 100644
--- a/package/kernel/linux/modules/can.mk
+++ b/package/kernel/linux/modules/can.mk
@@ -99,7 +99,7 @@ $(eval $(call KernelPackage,can-c-can-pci))
 define KernelPackage/can-c-can-platform
   TITLE:=Platform Bus based BOSCH C_CAN/D_CAN driver
   KCONFIG:=CONFIG_CAN_C_CAN_PLATFORM
-  DEPENDS:=kmod-can-c-can +!LINUX_3_18:kmod-regmap
+  DEPENDS:=kmod-can-c-can +!LINUX_3_18:kmod-regmap-core
   FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_platform.ko
   AUTOLOAD:=$(call AutoProbe,c_can_platform)
   $(call AddDepends/can)
diff --git a/package/kernel/linux/modules/hwmon.mk 
b/package/kernel/linux/modules/hwmon.mk
index 00bb185..5f54b4a 100644
--- a/package/kernel/linux/modules/hwmon.mk
+++ b/package/kernel/linux/modules/hwmon.mk
@@ -112,7 +112,7 @@ define KernelPackage/hwmon-ina2xx
   KCONFIG:=CONFIG_SENSORS_INA2XX
   FILES:=$(LINUX_DIR)/drivers/hwmon/ina2xx.ko
   AUTOLOAD:=$(call AutoProbe,ina2xx)
-  $(call AddDepends/hwmon,+kmod-i2c-core +!LINUX_3_18:kmod-regmap)
+  $(call AddDepends/hwmon,+kmod-i2c-core +!LINUX_3_18:kmod-regmap-i2c)
 endef
 
 define KernelPackage/hwmon-ina2xx/description
@@ -142,7 +142,7 @@ define KernelPackage/hwmon-lm63
   KCONFIG:=CONFIG_SENSORS_LM63
   FILES:=$(LINUX_DIR)/drivers/hwmon/lm63.ko
   AUTOLOAD:=$(call AutoProbe,lm63)
-  $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap)
+  $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c)
 endef
 
 define KernelPackage/hwmon-lm63/description
@@ -157,7 +157,7 @@ define KernelPackage/hwmon-lm75
   KCONFIG:=CONFIG_SENSORS_LM75
   FILES:=$(LINUX_DIR)/drivers/hwmon/lm75.ko
   AUTOLOAD:=$(call AutoProbe,lm75)
-  $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal 
+kmod-regmap)
+  $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal 
+kmod-regmap-i2c)
 endef
 
 define KernelPackage/hwmon-lm75/description
@@ -339,7 +339,7 @@ define KernelPackage/hwmon-tmp102
   KCONFIG:=CONFIG_SENSORS_TMP102
   FILES:=$(LINUX_DIR)/drivers/hwmon/tmp102.ko
   AUTOLOAD:=$(call AutoProbe,tmp102)
-  $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal 
+kmod-regmap)
+  $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal 
+kmod-regmap-i2c)
 endef
 
 define KernelPackage/hwmon-tmp102/description
@@ -354,7 +354,7 @@ define KernelPackage/hwmon-tmp103
   KCONFIG:=CONFIG_SENSORS_TMP103
   FILES:=$(LINUX_DIR)/drivers/hwmon/tmp103.ko
   AUTOLOAD:=$(call AutoProbe,tmp103)
-  $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap)
+  $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c)
 endef
 
 define KernelPackage/hwmon-tmp103/description
diff --git a/package/kernel/linux/modules/iio.mk 
b/package/kernel/linux/modules/iio.mk
index ee82eee..fe682b3 100644
--- a/package/kernel/linux/modules/iio.mk
+++ b/package/kernel/linux/modules/iio.mk
@@ -54,7 +54,7 @@ $(eval $(call KernelPackage,iio-ad799x))
 
 define KernelPackage/iio-hmc5843
   SUBMENU:=$(IIO_MENU)
-