mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Meta: Make sure files are installed with the right UID and GID
Unfortunately we can't just use --chown everywhere because only rsync version 3.1 and newer support it and the default rsync on macOS is 2.6.9. Fixes #8711.
This commit is contained in:
parent
7347c20fe6
commit
77795b2c8f
Notes:
sideshowbarker
2024-07-18 09:08:32 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/77795b2c8f1 Pull-request: https://github.com/SerenityOS/serenity/pull/8715 Issue: https://github.com/SerenityOS/serenity/issues/8711
1 changed files with 9 additions and 5 deletions
|
@ -33,12 +33,19 @@ umask 0022
|
|||
|
||||
printf "installing base system... "
|
||||
if command -v rsync >/dev/null; then
|
||||
rsync -aH --inplace "$SERENITY_SOURCE_DIR"/Base/ mnt/
|
||||
rsync -aH --inplace Root/ mnt/
|
||||
if rsync --chown 2>&1 | grep "missing argument" >/dev/null; then
|
||||
rsync -aH --chown=0:0 --inplace "$SERENITY_SOURCE_DIR"/Base/ mnt/
|
||||
rsync -aH --chown=0:0 --inplace Root/ mnt/
|
||||
else
|
||||
rsync -aH --inplace "$SERENITY_SOURCE_DIR"/Base/ mnt/
|
||||
rsync -aH --inplace Root/ mnt/
|
||||
chown -R 0:0 mnt/
|
||||
fi
|
||||
else
|
||||
echo "Please install rsync to speed up image creation times, falling back to cp for now"
|
||||
$CP -PdR "$SERENITY_SOURCE_DIR"/Base/* mnt/
|
||||
$CP -PdR Root/* mnt/
|
||||
chown -R 0:0 mnt/
|
||||
fi
|
||||
SERENITY_ARCH="${SERENITY_ARCH:-i686}"
|
||||
$CP "$SERENITY_SOURCE_DIR"/Toolchain/Local/"$SERENITY_ARCH"/"$SERENITY_ARCH"-pc-serenity/lib/libgcc_s.so mnt/usr/lib/
|
||||
|
@ -88,8 +95,6 @@ if [ -f mnt/bin/utmpupdate ]; then
|
|||
chmod 2755 mnt/bin/utmpupdate
|
||||
fi
|
||||
|
||||
chown 0:0 mnt/boot/Kernel
|
||||
chown 0:0 mnt/res/kernel.map
|
||||
chmod 0400 mnt/res/kernel.map
|
||||
chmod 0400 mnt/boot/Kernel
|
||||
chmod 600 mnt/etc/shadow
|
||||
|
@ -142,7 +147,6 @@ cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests/test-common.js mnt/h
|
|||
chmod 700 mnt/root
|
||||
chmod 700 mnt/home/anon
|
||||
chmod 700 mnt/home/nona
|
||||
chown -R 0:0 mnt/root
|
||||
chown -R 100:100 mnt/home/anon
|
||||
chown -R 200:200 mnt/home/nona
|
||||
echo "done"
|
||||
|
|
Loading…
Reference in a new issue