* [Buildroot] [PATCH v2] package/zerofree: new package
@ 2022-06-25 14:12 Vincent Stehlé via buildroot
2022-06-26 10:43 ` Julien Olivain
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Stehlé via buildroot @ 2022-06-25 14:12 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni, Vincent Stehlé
zerofree is a utility which scans the free blocks in an ext2 filesystem and
fills any non-zero blocks with zeroes.
https://frippery.org/uml/
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
Hi,
This is a follow-up to my first attempt[1] at packaging zerofree.
The good news is that it now builds with all libc flavours, including musl.
Do not hesitate to send any feedback.
Best regards,
Vincent.
Changes in v2:
- Use a workaround to allow building with musl.
[1]: https://lists.buildroot.org/pipermail/buildroot/2022-March/639794.html
DEVELOPERS | 1 +
package/Config.in | 1 +
package/zerofree/Config.in | 13 +++++++++++++
package/zerofree/zerofree.hash | 3 +++
package/zerofree/zerofree.mk | 27 +++++++++++++++++++++++++++
5 files changed, 45 insertions(+)
create mode 100644 package/zerofree/Config.in
create mode 100644 package/zerofree/zerofree.hash
create mode 100644 package/zerofree/zerofree.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index fc329fec27..e74e02b821 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2918,6 +2918,7 @@ F: configs/uevm5432_defconfig
F: package/i7z/
F: package/msr-tools/
F: package/pixz/
+F: package/zerofree/
N: Vinicius Tinti <viniciustinti@gmail.com>
F: package/python-thrift/
diff --git a/package/Config.in b/package/Config.in
index f09da05be0..5ab03016e8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -237,6 +237,7 @@ menu "Filesystem and flash utilities"
source "package/udftools/Config.in"
source "package/unionfs/Config.in"
source "package/xfsprogs/Config.in"
+ source "package/zerofree/Config.in"
source "package/zfs/Config.in"
endmenu
diff --git a/package/zerofree/Config.in b/package/zerofree/Config.in
new file mode 100644
index 0000000000..2ce2901a27
--- /dev/null
+++ b/package/zerofree/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_ZEROFREE
+ bool "zerofree"
+ depends on BR2_USE_MMU # e2fsprogs
+ depends on !BR2_STATIC_LIBS
+ select BR2_PACKAGE_E2FSPROGS
+ help
+ zerofree is a utility which scans the free blocks in an ext2
+ filesystem and fills any non-zero blocks with zeroes.
+
+ https://frippery.org/uml/
+
+comment "zerofree needs MMU and dynamic library"
+ depends on !BR2_USE_MMU || BR2_STATIC_LIBS
diff --git a/package/zerofree/zerofree.hash b/package/zerofree/zerofree.hash
new file mode 100644
index 0000000000..3399611787
--- /dev/null
+++ b/package/zerofree/zerofree.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 956bc861b55ba0a2b7593c58d32339dab1a0e7da6ea2b813d27c80f08b723867 zerofree-1.1.1.tgz
+sha256 90daae00475a992a367da5b0658469a5d1c4449dbbe964c5b7246e1aec92f491 COPYING
diff --git a/package/zerofree/zerofree.mk b/package/zerofree/zerofree.mk
new file mode 100644
index 0000000000..ca5a019de7
--- /dev/null
+++ b/package/zerofree/zerofree.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# zerofree
+#
+################################################################################
+
+ZEROFREE_VERSION = 1.1.1
+ZEROFREE_SOURCE = zerofree-$(ZEROFREE_VERSION).tgz
+ZEROFREE_SITE = https://frippery.org/uml
+ZEROFREE_LICENSE = GPL-2.0
+ZEROFREE_LICENSE_FILE = COPYING
+ZEROFREE_DEPENDENCIES = e2fsprogs
+
+# We use the same workaround as in https://bugs.gentoo.org/716136
+# to build with musl.
+ZEROFREE_CFLAGS = $(TARGET_CFLAGS) \
+ $(if $(BR2_TOOLCHAIN_USES_MUSL),-DHAVE_SYS_TYPES_H) # dev_t
+
+define ZEROFREE_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(ZEROFREE_CFLAGS)" -C $(@D) all
+endef
+
+define ZEROFREE_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/zerofree $(TARGET_DIR)/usr/bin
+endef
+
+$(eval $(generic-package))
--
2.35.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2] package/zerofree: new package
2022-06-25 14:12 [Buildroot] [PATCH v2] package/zerofree: new package Vincent Stehlé via buildroot
@ 2022-06-26 10:43 ` Julien Olivain
0 siblings, 0 replies; 3+ messages in thread
From: Julien Olivain @ 2022-06-26 10:43 UTC (permalink / raw)
To: Vincent Stehlé; +Cc: Thomas Petazzoni, buildroot
Hi Vincent, All,
I successfully tested your package.
For info, I tested on master at a0bf877, with commands:
make check-package
...
0 warnings generated
./utils/test-pkg -a -p zerofree
...
44 builds, 3 skipped, 0 build failed, 0 legal-info failed, 0
show-info failed
And also tested the package in qemu_aarch64_virt_defconfig.
On 25/06/2022 16:12, Vincent Stehlé via buildroot wrote:
> zerofree is a utility which scans the free blocks in an ext2 filesystem
> and
> fills any non-zero blocks with zeroes.
>
> https://frippery.org/uml/
>
> Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Tested-by: Julien Olivain <ju.o@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>
>
> Hi,
>
> This is a follow-up to my first attempt[1] at packaging zerofree.
> The good news is that it now builds with all libc flavours, including
> musl.
> Do not hesitate to send any feedback.
>
> Best regards,
> Vincent.
>
> Changes in v2:
> - Use a workaround to allow building with musl.
>
> [1]:
> https://lists.buildroot.org/pipermail/buildroot/2022-March/639794.html
>
>
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/zerofree/Config.in | 13 +++++++++++++
> package/zerofree/zerofree.hash | 3 +++
> package/zerofree/zerofree.mk | 27 +++++++++++++++++++++++++++
> 5 files changed, 45 insertions(+)
> create mode 100644 package/zerofree/Config.in
> create mode 100644 package/zerofree/zerofree.hash
> create mode 100644 package/zerofree/zerofree.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index fc329fec27..e74e02b821 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2918,6 +2918,7 @@ F: configs/uevm5432_defconfig
> F: package/i7z/
> F: package/msr-tools/
> F: package/pixz/
> +F: package/zerofree/
>
> N: Vinicius Tinti <viniciustinti@gmail.com>
> F: package/python-thrift/
> diff --git a/package/Config.in b/package/Config.in
> index f09da05be0..5ab03016e8 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -237,6 +237,7 @@ menu "Filesystem and flash utilities"
> source "package/udftools/Config.in"
> source "package/unionfs/Config.in"
> source "package/xfsprogs/Config.in"
> + source "package/zerofree/Config.in"
> source "package/zfs/Config.in"
> endmenu
>
> diff --git a/package/zerofree/Config.in b/package/zerofree/Config.in
> new file mode 100644
> index 0000000000..2ce2901a27
> --- /dev/null
> +++ b/package/zerofree/Config.in
> @@ -0,0 +1,13 @@
> +config BR2_PACKAGE_ZEROFREE
> + bool "zerofree"
> + depends on BR2_USE_MMU # e2fsprogs
> + depends on !BR2_STATIC_LIBS
> + select BR2_PACKAGE_E2FSPROGS
> + help
> + zerofree is a utility which scans the free blocks in an ext2
> + filesystem and fills any non-zero blocks with zeroes.
> +
> + https://frippery.org/uml/
> +
> +comment "zerofree needs MMU and dynamic library"
> + depends on !BR2_USE_MMU || BR2_STATIC_LIBS
> diff --git a/package/zerofree/zerofree.hash
> b/package/zerofree/zerofree.hash
> new file mode 100644
> index 0000000000..3399611787
> --- /dev/null
> +++ b/package/zerofree/zerofree.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256
> 956bc861b55ba0a2b7593c58d32339dab1a0e7da6ea2b813d27c80f08b723867
> zerofree-1.1.1.tgz
> +sha256
> 90daae00475a992a367da5b0658469a5d1c4449dbbe964c5b7246e1aec92f491
> COPYING
> diff --git a/package/zerofree/zerofree.mk
> b/package/zerofree/zerofree.mk
> new file mode 100644
> index 0000000000..ca5a019de7
> --- /dev/null
> +++ b/package/zerofree/zerofree.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# zerofree
> +#
> +################################################################################
> +
> +ZEROFREE_VERSION = 1.1.1
> +ZEROFREE_SOURCE = zerofree-$(ZEROFREE_VERSION).tgz
> +ZEROFREE_SITE = https://frippery.org/uml
> +ZEROFREE_LICENSE = GPL-2.0
> +ZEROFREE_LICENSE_FILE = COPYING
> +ZEROFREE_DEPENDENCIES = e2fsprogs
> +
> +# We use the same workaround as in https://bugs.gentoo.org/716136
> +# to build with musl.
> +ZEROFREE_CFLAGS = $(TARGET_CFLAGS) \
> + $(if $(BR2_TOOLCHAIN_USES_MUSL),-DHAVE_SYS_TYPES_H) # dev_t
> +
> +define ZEROFREE_BUILD_CMDS
> + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(ZEROFREE_CFLAGS)" -C $(@D) all
> +endef
> +
> +define ZEROFREE_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/zerofree $(TARGET_DIR)/usr/bin
> +endef
> +
> +$(eval $(generic-package))
> --
> 2.35.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Thanks!
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2] package/zerofree: new package
[not found] <20220625141223.26460-1-vincent.stehle__29291.7750471801$1656166387$gmane$org@laposte.net>
@ 2022-07-17 10:35 ` Bernd Kuhls
0 siblings, 0 replies; 3+ messages in thread
From: Bernd Kuhls @ 2022-07-17 10:35 UTC (permalink / raw)
To: buildroot
Am Sat, 25 Jun 2022 16:12:23 +0200 schrieb Vincent Stehlé via buildroot:
> +comment "zerofree needs MMU and dynamic library"
> + depends on !BR2_USE_MMU || BR2_STATIC_LIBS
Hi,
according to the docs, section 18.2.4
http://buildroot.uclibc.org/downloads/manual/manual.html#_config_files
no comment is to be added for !BR2_USE_MMU
so the comment should look like this:
comment "zerofree needs dynamic library"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS
Regards, Bernd
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-17 11:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25 14:12 [Buildroot] [PATCH v2] package/zerofree: new package Vincent Stehlé via buildroot
2022-06-26 10:43 ` Julien Olivain
[not found] <20220625141223.26460-1-vincent.stehle__29291.7750471801$1656166387$gmane$org@laposte.net>
2022-07-17 10:35 ` Bernd Kuhls
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.