Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 1/8] targets: Use gensquashfs instead of mksquashfs
Date: Sat, 02 May 2020 22:56:46
Message-Id: 20200502155641.3debc2ce@storm
In Reply to: [gentoo-catalyst] [PATCH 1/8] targets: Use gensquashfs instead of mksquashfs by Matt Turner
1 On Fri, 1 May 2020 18:40:29 -0700
2 Matt Turner <mattst88@g.o> wrote:
3
4 > We're using tar2sqfs from squashfs-tools-ng, so let's replace the
5 > usage of mksquashfs (from squashfs-tools) with gensquashfs.
6 >
7 > Signed-off-by: Matt Turner <mattst88@g.o>
8 > ---
9 > doc/catalyst-spec.5.txt | 4 ++--
10 > examples/livecd-stage2_template.spec | 2 --
11 > targets/embedded/fs-runscript.sh | 6 +++---
12 > targets/support/filesystem-functions.sh | 4 ++--
13 > 4 files changed, 7 insertions(+), 9 deletions(-)
14 >
15 > diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
16 > index f87bd69e..e269e16d 100644
17 > --- a/doc/catalyst-spec.5.txt
18 > +++ b/doc/catalyst-spec.5.txt
19 > @@ -180,8 +180,8 @@ CD. Possible values are as follows:
20 > *livecd/fsops*::
21 > The fsops are a list of optional parameters that can be passed to the
22 > tool which will create the filesystem specified in *livecd/fstype*
23 > -(example: `-root-owned`). It is valid for the following fstypes:
24 > -`squashfs`, `jffs`, `jffs2`, and `cramfs`.
25 > +It is valid for the following fstypes: `squashfs`, `jffs`, `jffs2`,
26 > +and `cramfs`.
27 >
28 > *livecd/iso*::
29 > This is the full path and filename to the ISO image that the
30 > diff --git a/examples/livecd-stage2_template.spec
31 > b/examples/livecd-stage2_template.spec index 4cb94d40..3b9ca1da 100644
32 > --- a/examples/livecd-stage2_template.spec
33 > +++ b/examples/livecd-stage2_template.spec
34 > @@ -95,8 +95,6 @@ livecd/fstype:
35 > # The fsops are a list of optional parameters that can be passed to
36 > the tool # which will create the filesystem specified in
37 > livecd/fstype. It is valid for # the following fstypes: squashfs,
38 > jffs, jffs2, cramfs -# example:
39 > -# livecd/fsops: -root-owned
40 > livecd/fsops:
41 >
42 > # The cdtar is essentially the bootloader for the CD. It also holds
43 > the main diff --git a/targets/embedded/fs-runscript.sh
44 > b/targets/embedded/fs-runscript.sh index 8d5abab1..7e70848b 100755
45 > --- a/targets/embedded/fs-runscript.sh
46 > +++ b/targets/embedded/fs-runscript.sh
47 > @@ -32,9 +32,9 @@ case ${1} in
48 > ;;
49 >
50 > squashfs)
51 > - fs_check /usr/bin/mksquashfs squashfs
52 > sys-fs/squashfs-tools
53 > - mksquashfs ${root_fs_path}
54 > ${clst_image_path}/root.img \
55 > - ${clst_embedded_fs_ops} || \
56 > + fs_check /usr/bin/gensquashfs squashfs
57 > sys-fs/squashfs-tools-ng
58 > + gensquashfs -D ${root_fs_path}
59 > ${clst_embedded_fs_ops} \
60 > + ${clst_image_path}/root.img ||
61 > die "Could not create a squashfs filesystem"
62 > ;;
63 >
64 > diff --git a/targets/support/filesystem-functions.sh
65 > b/targets/support/filesystem-functions.sh index 0c144ba8..03303b14
66 > 100755 --- a/targets/support/filesystem-functions.sh
67 > +++ b/targets/support/filesystem-functions.sh
68 > @@ -55,8 +55,8 @@ create_noloop() {
69 > create_squashfs() {
70 > echo "Creating squashfs..."
71 > export loopname="image.squashfs"
72 > - mksquashfs "${clst_destpath}" "$1/${loopname}" ${clst_fsops}
73 > -noappend \
74 > - || die "mksquashfs failed, did you emerge
75 > squashfs-tools?"
76 > + gensquashfs -D "${clst_destpath}" ${clst_fsops}
77 > "$1/${loopname}" \
78 > + || die "gensquashfs failed, did you emerge
79 > squashfs-tools-ng?" }
80 >
81 > create_jffs() {
82
83
84
85 This one looks good