summaryrefslogtreecommitdiffstats
path: root/meta/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/files')
-rw-r--r--meta/files/overlayfs-create-dirs.service.in2
-rw-r--r--meta/files/overlayfs-unit.mount.in2
-rw-r--r--meta/files/toolchain-shar-extract.sh24
3 files changed, 23 insertions, 5 deletions
diff --git a/meta/files/overlayfs-create-dirs.service.in b/meta/files/overlayfs-create-dirs.service.in
index c949a6dc73..d8d916365a 100644
--- a/meta/files/overlayfs-create-dirs.service.in
+++ b/meta/files/overlayfs-create-dirs.service.in
@@ -1,5 +1,5 @@
1[Unit] 1[Unit]
2Description=Overlayfs directories setup 2Description=Overlayfs directories setup {LOWERDIR}
3Requires={DATA_MOUNT_UNIT} 3Requires={DATA_MOUNT_UNIT}
4After={DATA_MOUNT_UNIT} 4After={DATA_MOUNT_UNIT}
5DefaultDependencies=no 5DefaultDependencies=no
diff --git a/meta/files/overlayfs-unit.mount.in b/meta/files/overlayfs-unit.mount.in
index 1d33b7e39c..9c117f2c52 100644
--- a/meta/files/overlayfs-unit.mount.in
+++ b/meta/files/overlayfs-unit.mount.in
@@ -1,5 +1,5 @@
1[Unit] 1[Unit]
2Description=Overlayfs mount unit 2Description=Overlayfs mount unit {LOWERDIR}
3Requires={CREATE_DIRS_SERVICE} 3Requires={CREATE_DIRS_SERVICE}
4After={CREATE_DIRS_SERVICE} 4After={CREATE_DIRS_SERVICE}
5 5
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 89d30005fd..a5c5d0444e 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -2,8 +2,8 @@
2 2
3export LC_ALL=en_US.UTF-8 3export LC_ALL=en_US.UTF-8
4#Make sure at least one python is installed 4#Make sure at least one python is installed
5INIT_PYTHON=$(which python3 2>/dev/null ) 5INIT_PYTHON=$(command -v python3 2>/dev/null )
6[ -z "$INIT_PYTHON" ] && INIT_PYTHON=$(which python2 2>/dev/null) 6[ -z "$INIT_PYTHON" ] && INIT_PYTHON=$(command -v python2 2>/dev/null)
7[ -z "$INIT_PYTHON" ] && echo "Error: The SDK needs a python installed" && exit 1 7[ -z "$INIT_PYTHON" ] && echo "Error: The SDK needs a python installed" && exit 1
8 8
9# Remove invalid PATH elements first (maybe from a previously setup toolchain now deleted 9# Remove invalid PATH elements first (maybe from a previously setup toolchain now deleted
@@ -229,7 +229,7 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the
229 exit 1 229 exit 1
230 fi 230 fi
231 231
232 SUDO_EXEC=$(which "sudo") 232 SUDO_EXEC=$(command -v "sudo")
233 if [ -z $SUDO_EXEC ]; then 233 if [ -z $SUDO_EXEC ]; then
234 echo "No command 'sudo' found, please install sudo first. Abort!" 234 echo "No command 'sudo' found, please install sudo first. Abort!"
235 exit 1 235 exit 1
@@ -245,13 +245,27 @@ fi
245 245
246printf "Extracting SDK..." 246printf "Extracting SDK..."
247if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then 247if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then
248 if [ -z "$(command -v unzip)" ]; then
249 echo "Aborted, unzip is required to extract the SDK archive, please make sure it's installed on your system!"
250 exit 1
251 fi
248 tail -n +$payload_offset "$0" > sdk.zip 252 tail -n +$payload_offset "$0" > sdk.zip
249 if $SUDO_EXEC unzip $EXTRA_TAR_OPTIONS sdk.zip -d $target_sdk_dir;then 253 if $SUDO_EXEC unzip $EXTRA_TAR_OPTIONS sdk.zip -d $target_sdk_dir;then
250 rm sdk.zip 254 rm sdk.zip
251 else 255 else
252 rm sdk.zip && exit 1 256 rm sdk.zip && exit 1
253 fi 257 fi
258elif [ @SDK_ARCHIVE_TYPE@ = "tar.zst" ]; then
259 if [ -z "$(command -v zstd)" ]; then
260 echo "Aborted, zstd is required to extract the SDK archive, please make sure it's installed on your system!"
261 exit 1
262 fi
263 tail -n +$payload_offset "$0"| zstd -T0 -dc | $SUDO_EXEC tar mx -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
254else 264else
265 if [ -z "$(command -v xz)" ]; then
266 echo "Aborted, xz is required to extract the SDK archive, please make sure it's installed on your system!"
267 exit 1
268 fi
255 tail -n +$payload_offset "$0"| $SUDO_EXEC tar mxJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1 269 tail -n +$payload_offset "$0"| $SUDO_EXEC tar mxJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
256fi 270fi
257echo "done" 271echo "done"
@@ -286,6 +300,10 @@ post_relocate="$target_sdk_dir/post-relocate-setup.sh"
286if [ -e "$post_relocate" ]; then 300if [ -e "$post_relocate" ]; then
287 $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate 301 $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate
288 $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@" 302 $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
303 if [ $? -ne 0 ]; then
304 echo "Executing $post_relocate failed"
305 exit 1
306 fi
289 $SUDO_EXEC rm -f $post_relocate 307 $SUDO_EXEC rm -f $post_relocate
290fi 308fi
291 309