SHA256
1
0
forked from pool/openafs

Accepting request 874301 from home:mgerstner:branches:filesystems

- kernel-source.build-modules.sh: choose safe CWD while executing the build to
  prevent files being created in unsafe locations. Use new SUSE naming
  convention and rely on /etc/os-release, since /etc/SuSE-release no longer
  exists.

OBS-URL: https://build.opensuse.org/request/show/874301
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=74
This commit is contained in:
Christof Hanke 2021-02-22 14:22:09 +00:00 committed by Git OBS Bridge
parent 34888c6390
commit 8e6465d313
2 changed files with 29 additions and 12 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
if [ $# != 1 ]; then
echo building a openafs-kernel module for the running kernel
@ -6,15 +6,24 @@ if [ $# != 1 ]; then
exit 1
fi
rootdir=`cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd`
if [ -z "$rootdir" ]; then
echo "failed to determine the dirname of this script"
exit 1
fi
cd "$rootdir"
LOGFILE=libafs_tree/build.log
kernel_flavour=`uname -r | awk -F- '{print $NF}'`
kernel_version=`uname -r | sed "s/-$kernel_flavour//"`
arch=`uname -m`
suse_flavour=`cat /etc/SuSE-release | head -1 | awk '{print $1}' `
suse_version=`cat /etc/SuSE-release | grep VERSION | awk '{print $NF}' `
suse_flavour=`cat /etc/os-release | grep PRETTY_NAME | awk -F '=' '{print $2}'`
suse_version=`cat /etc/os-release | grep VERSION_ID | awk -F '=' '{print $2}'`
echo This SuSE is version \"$suse_version\" of flavour \"$suse_flavour\"
echo This SUSE is version $suse_version of flavour $suse_flavour
echo you are running the kernel \"$kernel_version\" of flavour \"$kernel_flavour\" on \"$arch\"
echo all output is saved into $LOGFILE

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Feb 22 11:44:25 UTC 2021 - Matthias Gerstner <matthias.gerstner@suse.com>
- kernel-source.build-modules.sh: choose safe CWD while executing the build to
prevent files being created in unsafe locations. Use new SUSE naming
convention and rely on /etc/os-release, since /etc/SuSE-release no longer
exists.
-------------------------------------------------------------------
Fri Feb 5 08:41:48 UTC 2021 - Christof Hanke <christof.hanke@mpcdf.mpg.de>