Skip to contentSkip to conversation

fs/common: add <fs>_POST_GEN_HOOKS support

PATCH New Noé Rubinstein 3 participants 5 messages Jul 31, 2015 – Aug 10, 2015 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/common: add <fs>_POST_GEN_HOOKS support

From: Thomas Petazzoni <[email protected]>

The common filesystem infrastructure already supports a <fs>_PRE_GEN_HOOKS variable, which allows filesystem makefiles to register some actions to be done before the root filesystem image is generated.

This commit adds a similiar <fs>_POST_GEN_HOOKS variable, which will allow filesystem makefiles to do some actions after the filesystem image has been generated. It will initially be used by the iso9660 filesystem to delete the temporary directory it creates.

---
Re-sending this patch to fix hybrid ISO generation as added by patch 5bac06e8810eb86e7bddc771fda68f0c59a3c3fa.

 fs/common.mk | 4 ++++
 1 file changed, 4 insertions(+)
fs/common.mk +4 -0
index ad1bcf3..528e194 100644
@@ -16,6 +16,9 @@
 #  ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before
 #  generating the filesystem image
 #
+#  ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after
+#  generating the filesystem image
+#
 #  ROOTFS_$(FSTYPE)_POST_TARGETS, the list of targets that should be
 #  run after running the main filesystem target. This is useful for
 #  initramfs, to rebuild the kernel once the initramfs is generated.
@@ -96,6 +99,7 @@ endif
 ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
 	PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
 endif
+	$$(foreach hook,$$(ROOTFS_$(2)_POST_GEN_HOOKS),$$(call $$(hook))$$(sep))
 
 rootfs-$(1)-show-depends:
 	@echo $$(ROOTFS_$(2)_DEPENDENCIES)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 fs/common: add <fs>_POST_GEN_HOOKS support

Dear No? Rubinstein,

Quoted 12 lines · No? Rubinstein

From: Thomas Petazzoni <[email protected]>

The common filesystem infrastructure already supports a <fs>_PRE_GEN_HOOKS variable, which allows filesystem makefiles to register some actions to be done before the root filesystem image is generated.

This commit adds a similiar <fs>_POST_GEN_HOOKS variable, which will allow filesystem makefiles to do some actions after the filesystem image has been generated. It will initially be used by the iso9660 filesystem to delete the temporary directory it creates.

Quoted 5 lines

---
Re-sending this patch to fix hybrid ISO generation as added by patch 5bac06e8810eb86e7bddc771fda68f0c59a3c3fa.

Thanks, but could you submit a single patch series that does both the addition of POST_GEN_HOOKS (this patch) and the change to iso9660.mk to use POST_GEN_HOOKS to fix the hybrid image problem?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 fs/common: add <fs>_POST_GEN_HOOKS support

Thomas, All,

On 2015-08-06 09:10 +0200, Thomas Petazzoni spake thusly:

Quoted 19 lines · No? Rubinstein
Quoted 12 lines

From: Thomas Petazzoni <[email protected]>

The common filesystem infrastructure already supports a <fs>_PRE_GEN_HOOKS variable, which allows filesystem makefiles to register some actions to be done before the root filesystem image is generated.

This commit adds a similiar <fs>_POST_GEN_HOOKS variable, which will allow filesystem makefiles to do some actions after the filesystem image has been generated. It will initially be used by the iso9660 filesystem to delete the temporary directory it creates.

Quoted 5 lines

---
Re-sending this patch to fix hybrid ISO generation as added by patch 5bac06e8810eb86e7bddc771fda68f0c59a3c3fa.

Quoted 3 lines

Thanks, but could you submit a single patch series that does both the addition of POST_GEN_HOOKS (this patch) and the change to iso9660.mk to use POST_GEN_HOOKS to fix the hybrid image problem?

I don't know what you meant: iso96606 is already using the post-gen hooks, but they are not called because this patch has not yet been applied...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 fs/common: add <fs>_POST_GEN_HOOKS support

In reply to Noé Rubinstein

No?, All,

On 2015-07-31 10:23 +0200, No? Rubinstein spake thusly:

Quoted 7 lines

From: Thomas Petazzoni <[email protected]>

The common filesystem infrastructure already supports a <fs>_PRE_GEN_HOOKS variable, which allows filesystem makefiles to register some actions to be done before the root filesystem image is generated.

Quoted 7 lines

This commit adds a similiar <fs>_POST_GEN_HOOKS variable, which will allow filesystem makefiles to do some actions after the filesystem image has been generated. It will initially be used by the iso9660 filesystem to delete the temporary directory it creates.

Since this patch was marked as "Changes Requested" in Patchwork, it no longer shows up. I'll mark it as New again, so it can get picked up to be applied.

Regards,
Yann E. MORIN.

Quoted 36 lines

---
Re-sending this patch to fix hybrid ISO generation as added by patch 5bac06e8810eb86e7bddc771fda68f0c59a3c3fa.

 fs/common.mk | 4 ++++
 1 file changed, 4 insertions(+)
fs/common.mk +4 -0
index ad1bcf3..528e194 100644
@@ -16,6 +16,9 @@
 #  ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before
 #  generating the filesystem image
 #
+#  ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after
+#  generating the filesystem image
+#
 #  ROOTFS_$(FSTYPE)_POST_TARGETS, the list of targets that should be
 #  run after running the main filesystem target. This is useful for
 #  initramfs, to rebuild the kernel once the initramfs is generated.
@@ -96,6 +99,7 @@ endif
 ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
 	PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
 endif
+	$$(foreach hook,$$(ROOTFS_$(2)_POST_GEN_HOOKS),$$(call $$(hook))$$(sep))
 
 rootfs-$(1)-show-depends:
 	@echo $$(ROOTFS_$(2)_DEPENDENCIES)
Signature · 6 lines
2.1.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 fs/common: add <fs>_POST_GEN_HOOKS support

In reply to Noé Rubinstein

Dear No? Rubinstein,

Quoted 12 lines · No? Rubinstein

From: Thomas Petazzoni <[email protected]>

The common filesystem infrastructure already supports a <fs>_PRE_GEN_HOOKS variable, which allows filesystem makefiles to register some actions to be done before the root filesystem image is generated.

This commit adds a similiar <fs>_POST_GEN_HOOKS variable, which will allow filesystem makefiles to do some actions after the filesystem image has been generated. It will initially be used by the iso9660 filesystem to delete the temporary directory it creates.

Quoted 5 lines

---
Re-sending this patch to fix hybrid ISO generation as added by patch 5bac06e8810eb86e7bddc771fda68f0c59a3c3fa.

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com