Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 4ceea53

Browse files
committed
fix: mask recommended systemd services
1 parent 88ead23 commit 4ceea53

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/DistributionInfo.json
44
/imagetag.txt
55
/root/usr/lib/wsl/terminal-profile.json
6+
/rootfs/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ token](https://docs.docker.com/security/for-developers/access-tokens/)
3131
- [Node.js](https://nodejs.org/)
3232
- [jq](https://jqlang.github.io/jq/)
3333
- [grep](https://www.gnu.org/software/grep/)
34+
- [fakeroot](https://man.archlinux.org/man/fakeroot.1)
3435

3536
## Build
3637

build

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ docker rmi "archwsl:${tag}"
4848

4949
# Apply configuration file recommendations
5050
# https://learn.microsoft.com/windows/wsl/build-custom-distro#configuration-file-recommendations
51-
tar --delete -f archlinux.tar etc/resolv.conf
52-
53-
# Create the tar file
54-
# https://learn.microsoft.com/windows/wsl/build-custom-distro#create-the-tar-file
55-
gzip --best --force archlinux.tar
56-
mv archlinux.tar.gz archlinux.wsl
51+
[[ -d rootfs ]] && rm -rf rootfs
52+
mkdir rootfs
53+
pushd rootfs || exit 1
54+
fakeroot bash -c "tar -xf ../archlinux.tar && rm -f etc/resolv.conf && tar --numeric-owner --absolute-names -c -- * | gzip --best >../archlinux.wsl"
55+
popd || exit 1
56+
rm archlinux.tar

0 commit comments

Comments
 (0)