[elbe-devel] [PATCH] Add posibility to define squashfs package options
Torben Hohn
torben.hohn at linutronix.de
Mon Mar 7 14:54:34 CET 2022
On Fri, Jan 07, 2022 at 10:16:55AM +0100, Daniel Braunwarth wrote:
> This patch adds the possibility to define squashfs package options.
> The defined options are appended to the mksquashfs command.
>
> This patch fixes #316.
>
> Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/efilesystem.py | 8 ++++++--
> schema/dbsfed.xsd | 7 +++++++
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
> index 496a9df52..bf5d4c403 100644
> --- a/elbepack/efilesystem.py
> +++ b/elbepack/efilesystem.py
> @@ -467,8 +467,12 @@ class TargetFs(ChRootFilesystem):
> sfs_name = self.xml.text("target/package/squashfs/name")
> os.chdir(self.fname(''))
> try:
> - do("mksquashfs %s %s/%s -noappend -no-progress" %
> - (self.fname(''), targetdir, sfs_name))
> + options = ''
> + if self.xml.has("target/package/squashfs/options"):
> + options = self.xml.text("target/package/squashfs/options")
> +
> + do("mksquashfs %s %s/%s -noappend -no-progress %s" %
> + (self.fname(''), targetdir, sfs_name, options))
> # only append filename if creating mksquashfs was successful
> self.images.append(sfs_name)
> except CommandError:
> diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
> index 26c43dbe8..5c11f94fa 100644
> --- a/schema/dbsfed.xsd
> +++ b/schema/dbsfed.xsd
> @@ -1762,6 +1762,13 @@
> </documentation>
> </annotation>
> </element>
> + <element name="options" type="rfs:string" minOccurs="0">
> + <annotation>
> + <documentation>
> + options passed to the mksquashfs command
> + </documentation>
> + </annotation>
> + </element>
> </all>
> <attribute ref="xml:base"/>
> </complexType>
> --
> 2.34.1
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list