All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label
@ 2019-12-21 21:22 Thomas Petazzoni
  2019-12-22 15:01 ` Peter Korsgaard
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2019-12-21 21:22 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=aeb517522fc60747caa340cc0f2500fc94106b63
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Import "0001-image-vfat-Add-label-option-to-set-volume-name.patch" from
the upstream repository. The changes made to the README.rst file had to
be removed from the patch so that the package can be compiled in
buildroot. The patch has been accepted upstream, but no releases have
been made yet which includes the feature.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...-vfat-Add-label-option-to-set-volume-name.patch | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/package/genimage/0001-image-vfat-Add-label-option-to-set-volume-name.patch b/package/genimage/0001-image-vfat-Add-label-option-to-set-volume-name.patch
new file mode 100644
index 0000000000..a77b8260a0
--- /dev/null
+++ b/package/genimage/0001-image-vfat-Add-label-option-to-set-volume-name.patch
@@ -0,0 +1,69 @@
+From c1a165731298b96175b9b0dd80ad088dc8b33dc1 Mon Sep 17 00:00:00 2001
+From: Florent Viard <fviard@cxignited.com>
+Date: Sun, 27 Oct 2019 23:48:16 +0100
+Subject: [PATCH] image-vfat: Add label option to set volume name.
+
+Signed-off-by: Florent Viard <fviard@cxignited.com>
+[dariobin at libero.it: remove README.rst changes]
+Signed-off-by: Dario Binacchi <dariobin@libero.it>
+---
+ image-vfat.c | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/image-vfat.c b/image-vfat.c
+index f16242c..3ea7288 100644
+--- a/image-vfat.c
++++ b/image-vfat.c
+@@ -27,14 +27,20 @@ static int vfat_generate(struct image *image)
+ 	int ret;
+ 	struct partition *part;
+ 	char *extraargs = cfg_getstr(image->imagesec, "extraargs");
++	char *label = cfg_getstr(image->imagesec, "label");
++
++	if (label && label[0] != '\0')
++		xasprintf(&label, "-n '%s'", label);
++	else
++		label = "";
+ 
+ 	ret = systemp(image, "%s if=/dev/zero of=\"%s\" seek=%lld count=0 bs=1 2>/dev/null",
+ 			get_opt("dd"), imageoutfile(image), image->size);
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = systemp(image, "%s %s '%s'", get_opt("mkdosfs"),
+-			extraargs, imageoutfile(image));
++	ret = systemp(image, "%s %s %s '%s'", get_opt("mkdosfs"),
++			extraargs, label, imageoutfile(image));
+ 	if (ret)
+ 		return ret;
+ 
+@@ -72,11 +78,18 @@ static int vfat_generate(struct image *image)
+ 
+ static int vfat_setup(struct image *image, cfg_t *cfg)
+ {
++	char *label = cfg_getstr(image->imagesec, "label");
++
+ 	if (!image->size) {
+ 		image_error(image, "no size given or must not be zero\n");
+ 		return -EINVAL;
+ 	}
+ 
++	if (label && strlen(label) > 11) {
++		image_error(image, "vfat volume name cannot be longer than 11 characters\n");
++		return -EINVAL;
++	}
++
+ 	return 0;
+ }
+ 
+@@ -112,6 +125,7 @@ static cfg_opt_t file_opts[] = {
+ 
+ static cfg_opt_t vfat_opts[] = {
+ 	CFG_STR("extraargs", "", CFGF_NONE),
++	CFG_STR("label", "", CFGF_NONE),
+ 	CFG_STR_LIST("files", 0, CFGF_NONE),
+ 	CFG_SEC("file", file_opts, CFGF_MULTI | CFGF_TITLE),
+ 	CFG_END()
+-- 
+2.24.0
+

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label
  2019-12-21 21:22 [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label Thomas Petazzoni
@ 2019-12-22 15:01 ` Peter Korsgaard
  2019-12-22 20:12   ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2019-12-22 15:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=aeb517522fc60747caa340cc0f2500fc94106b63
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > Import "0001-image-vfat-Add-label-option-to-set-volume-name.patch" from
 > the upstream repository. The changes made to the README.rst file had to
 > be removed from the patch so that the package can be compiled in
 > buildroot. The patch has been accepted upstream, but no releases have
 > been made yet which includes the feature.

 > Signed-off-by: Dario Binacchi <dariobin@libero.it>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Why? What is this required for? When is the next genimage version expected?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label
  2019-12-22 15:01 ` Peter Korsgaard
@ 2019-12-22 20:12   ` Thomas Petazzoni
  2019-12-22 20:25     ` Peter Korsgaard
  2019-12-22 20:54     ` dariobin at libero.it
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2019-12-22 20:12 UTC (permalink / raw)
  To: buildroot

On Sun, 22 Dec 2019 16:01:26 +0100
Peter Korsgaard <peter@korsgaard.com> wrote:

>  > Import "0001-image-vfat-Add-label-option-to-set-volume-name.patch" from
>  > the upstream repository. The changes made to the README.rst file had to
>  > be removed from the patch so that the package can be compiled in
>  > buildroot. The patch has been accepted upstream, but no releases have
>  > been made yet which includes the feature.  
> 
>  > Signed-off-by: Dario Binacchi <dariobin@libero.it>
>  > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>  
> 
> Why? What is this required for? When is the next genimage version expected?

Well, it's just a new feature that someone needs. We normally don't
take feature patches, but this one is a backport from upstream.
genimage also does new releases fairly infrequently, so waiting for the
next release is not necessarily nice. The patch was short enough, taken
directly from upstream, so I said "ok, let's take, it will anyway go
away the next time we bump".

Dario, could you fill in an issue to the genimage issue tracker to ask
for a new release? I did that last time, and it worked, within a day or
two they published a new release.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label
  2019-12-22 20:12   ` Thomas Petazzoni
@ 2019-12-22 20:25     ` Peter Korsgaard
  2019-12-22 20:57       ` Thomas Petazzoni
  2019-12-22 20:54     ` dariobin at libero.it
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2019-12-22 20:25 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > On Sun, 22 Dec 2019 16:01:26 +0100
 > Peter Korsgaard <peter@korsgaard.com> wrote:

 >> > Import "0001-image-vfat-Add-label-option-to-set-volume-name.patch" from
 >> > the upstream repository. The changes made to the README.rst file had to
 >> > be removed from the patch so that the package can be compiled in
 >> > buildroot. The patch has been accepted upstream, but no releases have
 >> > been made yet which includes the feature.  
 >> 
 >> > Signed-off-by: Dario Binacchi <dariobin@libero.it>
 >> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>  
 >> 
 >> Why? What is this required for? When is the next genimage version expected?

 > Well, it's just a new feature that someone needs. We normally don't
 > take feature patches, but this one is a backport from upstream.
 > genimage also does new releases fairly infrequently, so waiting for the
 > next release is not necessarily nice. The patch was short enough, taken
 > directly from upstream, so I said "ok, let's take, it will anyway go
 > away the next time we bump".

OK, but we indeed don't take feature patches unless there is a good
reason for it, and this commit is just syntactical sugar over adding -n
<label> to extraargs, E.G.:

image foo.fat {
  vfat {
    extraargs = "-n MYLABEL"
    ..
}

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot]  [git commit] package/genimage: add patch to support vfat volume-label
  2019-12-22 20:12   ` Thomas Petazzoni
  2019-12-22 20:25     ` Peter Korsgaard
@ 2019-12-22 20:54     ` dariobin at libero.it
  1 sibling, 0 replies; 7+ messages in thread
From: dariobin at libero.it @ 2019-12-22 20:54 UTC (permalink / raw)
  To: buildroot


Yes, I?ll do it.

Best regards

Dario


Inviato da Libero Mail per iOS


domenica 22 dicembre 2019, 21:12 +0100 da Thomas Petazzoni  <thomas.petazzoni@bootlin.com>:
>On Sun, 22 Dec 2019 16:01:26 +0100
>Peter Korsgaard < peter@korsgaard.com > wrote:
>
>>  > Import "0001-image-vfat-Add-label-option-to-set-volume-name.patch" from
>>  > the upstream repository. The changes made to the README.rst file had to
>>  > be removed from the patch so that the package can be compiled in
>>  > buildroot. The patch has been accepted upstream, but no releases have
>>  > been made yet which includes the feature. 
>> 
>>  > Signed-off-by: Dario Binacchi < dariobin@libero.it >
>>  > Signed-off-by: Thomas Petazzoni < thomas.petazzoni@bootlin.com > 
>> 
>> Why? What is this required for? When is the next genimage version expected?
>
>Well, it's just a new feature that someone needs. We normally don't
>take feature patches, but this one is a backport from upstream.
>genimage also does new releases fairly infrequently, so waiting for the
>next release is not necessarily nice. The patch was short enough, taken
>directly from upstream, so I said "ok, let's take, it will anyway go
>away the next time we bump".
>
>Dario, could you fill in an issue to the genimage issue tracker to ask
>for a new release? I did that last time, and it worked, within a day or
>two they published a new release.
>
>Best regards,
>
>Thomas
>-- 
>Thomas Petazzoni, CTO, Bootlin
>Embedded Linux and Kernel engineering
>https://bootlin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20191222/00a45905/attachment.html>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label
  2019-12-22 20:25     ` Peter Korsgaard
@ 2019-12-22 20:57       ` Thomas Petazzoni
  2019-12-22 21:05         ` Peter Korsgaard
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2019-12-22 20:57 UTC (permalink / raw)
  To: buildroot

On Sun, 22 Dec 2019 21:25:38 +0100
Peter Korsgaard <peter@korsgaard.com> wrote:

>  > Well, it's just a new feature that someone needs. We normally don't
>  > take feature patches, but this one is a backport from upstream.
>  > genimage also does new releases fairly infrequently, so waiting for the
>  > next release is not necessarily nice. The patch was short enough, taken
>  > directly from upstream, so I said "ok, let's take, it will anyway go
>  > away the next time we bump".  
> 
> OK, but we indeed don't take feature patches unless there is a good
> reason for it, and this commit is just syntactical sugar over adding -n
> <label> to extraargs, E.G.:
> 
> image foo.fat {
>   vfat {
>     extraargs = "-n MYLABEL"
>     ..
> }

True, I didn't know about extraargs. Really, I hesitated a bit because
of our usual policy, but then I said "meh, it's small, it's a backport
from upstream, let's not be too annoying". I can revert if needed, I
don't feel very strongly about this at all.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label
  2019-12-22 20:57       ` Thomas Petazzoni
@ 2019-12-22 21:05         ` Peter Korsgaard
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2019-12-22 21:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > On Sun, 22 Dec 2019 21:25:38 +0100
 > Peter Korsgaard <peter@korsgaard.com> wrote:

 >> > Well, it's just a new feature that someone needs. We normally don't
 >> > take feature patches, but this one is a backport from upstream.
 >> > genimage also does new releases fairly infrequently, so waiting for the
 >> > next release is not necessarily nice. The patch was short enough, taken
 >> > directly from upstream, so I said "ok, let's take, it will anyway go
 >> > away the next time we bump".  
 >> 
 >> OK, but we indeed don't take feature patches unless there is a good
 >> reason for it, and this commit is just syntactical sugar over adding -n
 >> <label> to extraargs, E.G.:
 >> 
 >> image foo.fat {
 >> vfat {
 >> extraargs = "-n MYLABEL"
 >> ..
 >> }

 > True, I didn't know about extraargs. Really, I hesitated a bit because
 > of our usual policy, but then I said "meh, it's small, it's a backport
 > from upstream, let's not be too annoying". I can revert if needed, I
 > don't feel very strongly about this at all.

No, lets leave it - It is low risk, I just wondered why we were doing
things differently from what we normally do and if I was missing
something.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-22 21:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-21 21:22 [Buildroot] [git commit] package/genimage: add patch to support vfat volume-label Thomas Petazzoni
2019-12-22 15:01 ` Peter Korsgaard
2019-12-22 20:12   ` Thomas Petazzoni
2019-12-22 20:25     ` Peter Korsgaard
2019-12-22 20:57       ` Thomas Petazzoni
2019-12-22 21:05         ` Peter Korsgaard
2019-12-22 20:54     ` dariobin at libero.it

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.