Gentoo Archives: gentoo-catalyst

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

Replies