Accepting request 979479 from Virtualization
- Revert to revision 715. We're fixing bug 1199924, before moving to QEMU 7.0 OBS-URL: https://build.opensuse.org/request/show/979479 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=718
This commit is contained in:
@@ -17,9 +17,9 @@ set -e
|
||||
clean_up_temp_dirs()
|
||||
{
|
||||
echo "Cleaning temporary files before exit"
|
||||
#rm -rf $GIT_DIR
|
||||
#rm -rf $CMP_DIR
|
||||
#rm -rf $BUN_DIR
|
||||
rm -rf $GIT_DIR
|
||||
rm -rf $CMP_DIR
|
||||
rm -rf $BUN_DIR
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ check_requirements() {
|
||||
RC=1
|
||||
fi
|
||||
ONE_GIG_IN_1K_BLOCKS=1048576
|
||||
AVAIL=$(df --output=avail $TMPDIR | tail -1)
|
||||
AVAIL=$(df --output=avail /dev/shm | tail -1)
|
||||
if [[ $AVAIL -lt $ONE_GIG_IN_1K_BLOCKS ]]; then
|
||||
echo "ERROR: Please provide at least 1GB available space in $TMPDIR"
|
||||
echo "ERROR: Please provide at least 1GB available space in /dev/shm"
|
||||
RC=1
|
||||
fi
|
||||
if [[ "$RC" = "1" ]]; then
|
||||
@@ -439,7 +439,7 @@ declare -a PATCHES_BY_SUBMODULE_PATH
|
||||
IN_PATCH_SECTION=0
|
||||
INDEX=$REPO_COUNT # "invalid" since zero based index of objects < one based count of objects
|
||||
while IFS= read -r line; do
|
||||
if [[ "$line" = "# Patches applied in base project, qemu-opensuse:" ]]; then
|
||||
if [[ "$line" = "# Patches applied in base project:" ]]; then
|
||||
IN_PATCH_SECTION=1
|
||||
INDEX=0 # base project is 0 by definition
|
||||
continue
|
||||
@@ -466,7 +466,7 @@ while IFS= read -r line; do
|
||||
if [[ "$IN_PATCH_SECTION" = "0" ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ "$line" = "# Please, do not add patches manually here" ]]; then
|
||||
if [[ "$line" =~ ^$ ]]; then
|
||||
PATCHES_BY_SUBMODULE_PATH[$INDEX]=$ACCUMULATED_PATCHES
|
||||
break;
|
||||
fi
|
||||
@@ -476,9 +476,6 @@ while IFS= read -r line; do
|
||||
ACCUMULATED_PATCHES="$ACCUMULATED_PATCHES $PATCH"
|
||||
continue
|
||||
fi
|
||||
if [[ "$line" =~ ^%if.*$ ]] || [[ "$line" =~ ^%endif$ ]]; then
|
||||
continue
|
||||
fi
|
||||
echo "ERROR: Failure groking spec file for patches!"
|
||||
exit
|
||||
done < $PKG.spec
|
||||
@@ -682,29 +679,20 @@ find $BUN_DIR -mindepth 1 -delete
|
||||
|
||||
for package in $PKG; do
|
||||
while IFS= read -r line; do
|
||||
if [ "$line" = "PATCH_FILES_DO_NOT_TOUCH_THIS_LINE" ]; then
|
||||
if [ "$line" = "PATCH_FILES" ]; then
|
||||
# Here (and other places below) we try to get ONLY the numbered patches, but it's possible some ACTUAL patch name actually starts with multiple digits, but EXTREMELY unlikely
|
||||
# TODO: do this better!
|
||||
echo "# This patch queue is auto-generated - see README.PACKAGING for process"
|
||||
unset PREV_S
|
||||
for i in [0-9][0-9][0-9][0-9]*-*.patch; do
|
||||
NUM=${i%%-*}
|
||||
DIV=$((10#$NUM/$PATCH_RANGE))
|
||||
REM=$((10#$NUM%$PATCH_RANGE))
|
||||
if [[ "$REM" = "0" ]]; then
|
||||
if [[ "$DIV" = "0" ]]; then
|
||||
echo "# Patches applied in base project, qemu-opensuse:"
|
||||
echo "# Patches applied in base project:"
|
||||
else
|
||||
echo "# Patches applied in ${PATCH_PATH_MAP[$DIV]}:"
|
||||
fi
|
||||
fi
|
||||
S=$(grep "^Include-If: " $i) || true
|
||||
if [ "$PREV_S" != "" -a "$PREV_S" != "$S" ]; then
|
||||
echo "%endif"
|
||||
fi
|
||||
if [ "$S" != "" -a "$S" != "$PREV_S" ]; then
|
||||
echo "${S:12}"
|
||||
fi
|
||||
if [[ "$FIVE_DIGIT_POTENTIAL" != "0" ]]; then
|
||||
if [[ "$NUMBERED_PATCHES" = "0" ]]; then
|
||||
PATCH_NUMBER=${i%%-*}
|
||||
@@ -720,13 +708,8 @@ find $BUN_DIR -mindepth 1 -delete
|
||||
echo -e "Patch$NUM: $i"
|
||||
fi
|
||||
fi
|
||||
PREV_S=$S
|
||||
done
|
||||
if [ "$PREV_S" != "" ]; then
|
||||
echo "%endif"
|
||||
fi
|
||||
echo "# Please, do not add patches manually here"
|
||||
elif [ "$line" = "PATCH_EXEC_DO_NOT_TOUCH_THIS_LINE" ]; then
|
||||
elif [ "$line" = "PATCH_EXEC" ]; then
|
||||
unset PREV_S
|
||||
for i in [0-9][0-9][0-9][0-9]*-*.patch; do
|
||||
S=$(grep "^Include-If: " $i) || true
|
||||
@@ -743,7 +726,7 @@ find $BUN_DIR -mindepth 1 -delete
|
||||
if [ "$PREV_S" != "" ]; then
|
||||
echo "%endif"
|
||||
fi
|
||||
elif [ "$line" = "INSERT_VERSIONING_DO_NOT_TOUCH_THIS_LINE" ]; then
|
||||
elif [ "$line" = "INSERT_VERSIONING" ]; then
|
||||
echo "%define qemuver $QEMU_VERSION$VERSION_EXTRA"
|
||||
echo "%define srcver $SOURCE_VERSION$VERSION_EXTRA"
|
||||
# For SLE11, where seabios isn't in the qemu tarball:
|
||||
@@ -857,13 +840,13 @@ fi
|
||||
#==============================================================================
|
||||
|
||||
# cleanup directories from any previous failed run:
|
||||
rm -rf ${TMPDIR}/qemu-???????-git-dir
|
||||
rm -rf ${TMPDIR}/qemu-???????-cmp-dir
|
||||
rm -rf ${TMPDIR}/qemu-???????-bun-dir
|
||||
rm -rf /dev/shm/qemu-???????-git-dir
|
||||
rm -rf /dev/shm/qemu-???????-cmp-dir
|
||||
rm -rf /dev/shm/qemu-???????-bun-dir
|
||||
# Temporary directories used in this script
|
||||
GIT_DIR=$(mktemp -d ${TMPDIR}/qemu-XXXXXXX-git-dir)
|
||||
CMP_DIR=$(mktemp -d ${TMPDIR}/qemu-XXXXXXX-cmp-dir)
|
||||
BUN_DIR=$(mktemp -d ${TMPDIR}/qemu-XXXXXXX-bun-dir)
|
||||
GIT_DIR=$(mktemp -d /dev/shm/qemu-XXXXXXX-git-dir)
|
||||
CMP_DIR=$(mktemp -d /dev/shm/qemu-XXXXXXX-cmp-dir)
|
||||
BUN_DIR=$(mktemp -d /dev/shm/qemu-XXXXXXX-bun-dir)
|
||||
|
||||
if [[ ! -e $(readlink -f ${LOCAL_REPO_MAP[0]}) ]]; then
|
||||
echo "No local repo found at ${LOCAL_REPO_MAP[0]}"
|
||||
|
Reference in New Issue
Block a user