Skip to content

Commit d420d48

Browse files
committed
feat: Add squashfs-tools-ng to tools image
Provides alternatives to mksquashfs, unsquashfs which make it easier to perform SELinux labeling when building images inside unprivileged containers. Signed-off-by: Joakim Nohlgård <[email protected]>
1 parent 000c3bb commit d420d48

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed

.github/renovate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
{
5959
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.?(?<patch>\\d+)?$",
6060
"matchPackageNames": [
61+
"AgentD/squashfs-tools-ng",
6162
"golang/go",
6263
"mirror/ncurses",
6364
"PCRE2Project/pcre2",

.kres.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
- tools-openssl
1313
- tools-pcre2
1414
- tools-squashfs-tools
15+
- tools-squashfs-tools-ng
1516
- tools-tar
1617
- tools-util-linux
1718
- tools-xz
@@ -23,6 +24,7 @@ kind: common.Renovate
2324
spec:
2425
packageRules:
2526
- matchPackageNames:
27+
- AgentD/squashfs-tools-ng
2628
- golang/go
2729
- mirror/ncurses
2830
- PCRE2Project/pcre2

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ TARGETS += tools-libsepol
5454
TARGETS += tools-openssl
5555
TARGETS += tools-pcre2
5656
TARGETS += tools-squashfs-tools
57+
TARGETS += tools-squashfs-tools-ng
5758
TARGETS += tools-tar
5859
TARGETS += tools-util-linux
5960
TARGETS += tools-xz

Pkgfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,11 @@ vars:
356356
squashfs_tools_sha256: 94201754b36121a9f022a190c75f718441df15402df32c2b520ca331a107511c
357357
squashfs_tools_sha512: 10e8a4b1e2327e062aef4f85860e76ebcd7a29e4c19e152ff7edec4a38316982b5bcfde4ab69da6bcb931258d264c2b6cb40cb5f635f9e6f6eba1ed5976267cb
358358

359+
# renovate: datasource=github-tags depName=AgentD/squashfs-tools-ng
360+
squashfs_tools_ng_version: v1.3.2
361+
squashfs_tools_ng_sha256: 21f40dc82f69b721e92bfc539e47bfb8581753f8de492c877c59737ce2e3bf0f
362+
squashfs_tools_ng_sha512: 21d080718f5b68b2c3ae12899b04d9eb51644d62f2cff32261f1aedc1919f9bc15b37e8bc723db54f24ed95914db8ee6e43c544dcf375a6c002ff615d15dc6d1
363+
359364
# renovate: datasource=github-tags depName=swig/swig
360365
swig_version: v4.2.1
361366
swig_sha256: 8895878b9215612e73611203dc8f5232c626e4d07ffc4532922f375518f067ca

tools-squashfs-tools-ng/pkg.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: tools-squashfs-tools-ng
2+
variant: scratch
3+
dependencies:
4+
- stage: base
5+
- stage: autoconf
6+
- stage: automake
7+
- stage: libtool
8+
- stage: pkg-config
9+
- stage: tools-libselinux
10+
- stage: tools-xz
11+
- stage: tools-zlib
12+
- stage: tools-zstd
13+
steps:
14+
- sources:
15+
- url: https://github.com/AgentD/squashfs-tools-ng/archive/refs/tags/{{ .squashfs_tools_ng_version }}.tar.gz
16+
destination: squashfs-tools-ng.tar.gz
17+
sha256: "{{ .squashfs_tools_ng_sha256 }}"
18+
sha512: "{{ .squashfs_tools_ng_sha512 }}"
19+
prepare:
20+
- |
21+
mkdir -p squashfs-tools-ng build
22+
23+
tar -xf squashfs-tools-ng.tar.gz --strip-components=1 -C squashfs-tools-ng
24+
cd squashfs-tools-ng
25+
./autogen.sh
26+
cd ../build
27+
../squashfs-tools-ng/configure \
28+
--prefix=/usr
29+
build:
30+
- |
31+
make -C build -j $(nproc)
32+
install:
33+
- |
34+
make -C build DESTDIR=/rootfs install
35+
rm -rf /rootfs/usr/share/man
36+
test:
37+
- |
38+
fhs-validator /rootfs
39+
finalize:
40+
- from: /rootfs
41+
to: /

tools/pkg.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ dependencies:
7979
- stage: tools-openssl
8080
- stage: tools-pcre2
8181
- stage: tools-squashfs-tools
82+
- stage: tools-squashfs-tools-ng
8283
- stage: tools-tar
8384
- stage: tools-util-linux
8485
- stage: tools-xz

0 commit comments

Comments
 (0)