Hello community,
here is the log from the commit of package sca-appliance-agent for
openSUSE:Factory checked in at 2018-01-26 13:39:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sca-appliance-agent (Old)
and /work/SRC/openSUSE:Factory/.sca-appliance-agent.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sca-appliance-agent"
Fri Jan 26 13:39:12 2018 rev:3 rq:569406 version:1.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/sca-appliance-agent/sca-appliance-agent.changes
2018-01-19 11:52:51.776628697 +0100
+++
/work/SRC/openSUSE:Factory/.sca-appliance-agent.new/sca-appliance-agent.changes
2018-01-26 13:39:15.557967959 +0100
@@ -1,0 +2,5 @@
+Thu Jan 25 00:33:59 UTC 2018 - [email protected]
+
+- Added sle15 detection and processing (bsc#1075250)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sca-appliance-agent.spec ++++++
--- /var/tmp/diff_new_pack.uE9LEx/_old 2018-01-26 13:39:16.477924993 +0100
+++ /var/tmp/diff_new_pack.uE9LEx/_new 2018-01-26 13:39:16.481924806 +0100
@@ -1,7 +1,7 @@
#
# spec file for package sca-appliance-agent
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,6 +12,10 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
+
%define sca_common sca
%define sca_libdir /usr/lib/%{sca_common}
%define sca_configdir %{_sysconfdir}/%{sca_common}
@@ -21,12 +25,12 @@
Release: 0
Summary: Supportconfig Analysis Appliance Agent
License: GPL-2.0
-URL: https://github.com/g23guy/sca-appliance-agent
Group: System/Monitoring
+Url: https://github.com/g23guy/sca-appliance-agent
Source: %{name}-%{version}.tar.gz
Requires: sca-appliance-common
Requires: sca-patterns-base
-Buildarch: noarch
+BuildArch: noarch
%description
Analyzes supportconfig archives using the Supportconfig Analysis patterns. The
results are
++++++ sca-appliance-agent-1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sca-appliance-agent-1.3/bin/sdagent-supportconfig
new/sca-appliance-agent-1.3/bin/sdagent-supportconfig
--- old/sca-appliance-agent-1.3/bin/sdagent-supportconfig 2018-01-03
18:52:32.998946808 +0100
+++ new/sca-appliance-agent-1.3/bin/sdagent-supportconfig 2018-01-25
01:35:06.900318027 +0100
@@ -1,6 +1,6 @@
#!/bin/bash
-SVER='1.0.36'
+SVER='1.0.42'
##############################################################################
# sdagent-suportconfig - SCA Agent Worker for Supportconfig Archives
@@ -9,7 +9,7 @@
# Description: A process forked by the sdagent to analyze a supportconfig
# archive. Supportconfig archives can be from any server.
# Runs on: Agent Server
-# Modified: 2018 Jan 03
+# Modified: 2018 Jan 24
#
##############################################################################
#
@@ -397,19 +397,14 @@
shopt -s nocasematch
[[ -n "$KERNEL_VERSION" ]] && VERKERN="'$KERNEL_VERSION'" ||
VERKERN="NULL"
[[ -n "$SCRIPT_VERSION" ]] && VERSUPT="'$SCRIPT_VERSION'" ||
VERSUPT="NULL"
- if [[ -n "$DISTRO" ]]; then
- ARCH=$(echo $DISTRO | cut -d\( -f2 | cut -d\) -f1)
- [[ -n "$ARCH" ]] && ARCH="'$ARCH'" || ARCH="NULL"
- else
- ARCH="NULL"
- fi
+ UNAME=$(grep -A1 'uname -a' $ENVFILE | tail -1)
+ ARCH=$(echo $UNAME | awk '{print $(NF-1)}')
[[ -n "$SERVER_NAME" ]] && HOST_NAME="'$SERVER_NAME'" ||
HOST_NAME="NULL"
[[ -n "$VIRT_HARD" ]] && HARDWARE="'$VIRT_HARD'" || HARDWARE="NULL"
- DIST="${DISTRO%% (*}"
- if [[ -z "$DIST" ]]; then
+ if [[ -z $DISTRO ]]; then
DIST="NULL"
else
- DIST="'$DIST'"
+ DIST="'${DISTRO}'"
fi
if [[ "$SPLEVEL" == "None" ]]; then
DISTSP=0
@@ -455,7 +450,7 @@
echo " ServerName=$HOST_NAME," >> $IMPORT_FILE
echo " VersionKernel=$VERKERN," >> $IMPORT_FILE
echo " VersionSupportconfig=$VERSUPT," >> $IMPORT_FILE
- echo " Architecture=$ARCH," >> $IMPORT_FILE
+ echo " Architecture='$ARCH'," >> $IMPORT_FILE
echo " PatternsApplicable=$PATCOUNT," >> $IMPORT_FILE
echo " Hardware=$HARDWARE," >> $IMPORT_FILE
echo " Distro=$DIST," >> $IMPORT_FILE
@@ -764,8 +759,38 @@
*) ARCH_RUN_DATE='0000-00-00' ;;
esac
ARCH_RUN_TIME=$(echo $ARCH_RUN | awk '{print $4}')
- SUSE_RELEASE=$(sed -ne '/\/etc\/SuSE-release$/,/#==/p' $ENVFILE
| egrep -i "SUSE Linux Enterprise")
- [[ -z "$SUSE_RELEASE" ]] && puntArchive $EMAIL_VERBOSE "Only
SUSE Distributions are Supported"
+ OS_RELEASE=$(sed -ne '/\/etc\/os-release$/,/#==/p' $ENVFILE |
egrep -v "^$|^#")
+ SUSE_RELEASE=$(sed -ne '/\/etc\/SuSE-release$/,/#==/p' $ENVFILE
| egrep -v "^$|^#")
+ if [[ -n "$OS_RELEASE" ]]; then
+ if echo "$OS_RELEASE" | egrep -i "SUSE Linux
Enterprise|SUSE Linux Desktop" &>/dev/null; then
+ DISTRO=$(echo "$OS_RELEASE" | grep PRETTY_NAME
| cut -d= -f2 | sed -e 's/"//g')
+ DISTRO=${DISTRO// SP*/}
+ VERSION_ID=$(echo "$OS_RELEASE" | grep
VERSION_ID | cut -d= -f2 | sed -e 's/"//g')
+ if [[ $VERSION_ID == *.* ]]; then
+ SPLEVEL=$(echo $VERSION_ID | cut -d\.
-f2)
+ else
+ SPLEVEL='None'
+ fi
+ else
+ puntArchive $EMAIL_VERBOSE "Only SUSE
Distributions are Supported"
+ fi
+ elif [[ -n "$SUSE_RELEASE" ]]; then
+ if echo "$SUSE_RELEASE" | egrep -i "SUSE Linux
Enterprise|SUSE Linux Desktop" &>/dev/null; then
+ RELEASE=$(sed -ne
'/\/etc\/SuSE-release$/,/#==/p' $ENVFILE | egrep -v "^$|^#")
+ DISTRO=$(echo "$RELEASE" | head -1)
+ DISTRO=${DISTRO// (*/}
+ SPLEVEL=$(echo "$RELEASE" | grep PATCHLEVEL |
awk '{print $NF}')
+ if [[ -z "$SPLEVEL" ]]; then
+ SPLEVEL=None
+ elif [[ "$SPLEVEL" == "0" ]]; then
+ SPLEVEL=None
+ fi
+ else
+ puntArchive $EMAIL_VERBOSE "Only SUSE
Distributions are Supported"
+ fi
+ else
+ puntArchive $EMAIL_VERBOSE "Unknown Distribution, Only
SUSE Distributions are Supported"
+ fi
UNAME=$(grep -A1 'uname -a' $ENVFILE | tail -1)
if [[ -n "$UNAME" ]]; then
SERVER_NAME=$(echo $UNAME | awk '{print $2}')
@@ -778,14 +803,6 @@
SCRIPT_VERSION=""
RC=1
fi
- RELEASE=$(sed -ne '/\/etc\/SuSE-release$/,/#==/p' $ENVFILE |
egrep -v "^$|^#")
- DISTRO=$(echo "$RELEASE" | head -1)
- SPLEVEL=$(echo "$RELEASE" | grep PATCHLEVEL | awk '{print $NF}')
- if [[ -z "$SPLEVEL" ]]; then
- SPLEVEL=None
- elif [[ "$SPLEVEL" == "0" ]]; then
- SPLEVEL=None
- fi
OES=$(sed -ne '/\/etc\/novell-release$/,/#==/p' $ENVFILE |
egrep -v "^$|^#")
if [[ -n "$OES" ]]; then
if echo "$OES" | grep Desktop &>/dev/null; then
@@ -861,15 +878,32 @@
> $PATTERNS # Initialize the pattern file
# SUSE Linux Enterprise Server/Desktop (SLE)
- RELEASEINFO=$(sed -ne '/\/etc\/SuSE-release$/,/#==/p' $ENVFILE | egrep
-v "^$|^#")
+ RELEASEINFO=$(sed -ne '/\/etc\/os-release$/,/#==/p' $ENVFILE | egrep -v
"^$|^#")
+ VER=0
if echo "$RELEASEINFO" | grep -i 'suse linux enterprise' &>/dev/null
then
- VER=$(echo "$RELEASEINFO" | grep VERSION | head -1 | awk
'{print $NF}')
- REL=$(echo "$RELEASEINFO" | grep PATCHLEVEL | head -1 | awk
'{print $NF}')
- [[ -z "$REL" ]] && REL=0
+ VERSION_ID=$(echo "$OS_RELEASE" | grep VERSION_ID | cut -d= -f2
| sed -e 's/"//g')
+ if echo $VERSION_ID | grep '\.' &>/dev/null; then
+ VER=$(echo $VERSION_ID | cut -d\. -f1)
+ REL=$(echo $VERSION_ID | cut -d\. -f2)
+ else
+ VER=$VERSION_ID
+ REL=0
+ fi
PATTERN_GROUPS="$PATTERN_GROUPS SLE/sle${VER}all"
PATTERN_GROUPS="$PATTERN_GROUPS SLE/sle${VER}sp${REL}"
fi
+ if (( ! VER )); then
+ RELEASEINFO=$(sed -ne '/\/etc\/SuSE-release$/,/#==/p' $ENVFILE
| egrep -v "^$|^#")
+ if echo "$RELEASEINFO" | grep -i 'suse linux enterprise'
&>/dev/null
+ then
+ VER=$(echo "$RELEASEINFO" | grep VERSION | head -1 |
awk '{print $NF}')
+ REL=$(echo "$RELEASEINFO" | grep PATCHLEVEL | head -1 |
awk '{print $NF}')
+ [[ -z "$REL" ]] && REL=0
+ PATTERN_GROUPS="$PATTERN_GROUPS SLE/sle${VER}all"
+ PATTERN_GROUPS="$PATTERN_GROUPS SLE/sle${VER}sp${REL}"
+ fi
+ fi
# Open Enterprise Server (OES)
RELEASEINFO=$(sed -ne '/\/etc\/novell-release$/,/#==/p' $ENVFILE |
egrep -v "^$|^#")
@@ -1148,10 +1182,6 @@
REPORT_DATE=$(date "+%Y-%m-%d %T")
title
msg debug "LOGLEVEL=$LOGLEVEL"
- if ! validEnvironment; then
- finishWorker Error "Invalid environment"
- exit 20
- fi
msg verbose "PROCESSING" "Archive $ARCHIVE"
RUN_TIME_START=$(date +%s)
ARCHDIR=$(echo $ARCHIVE | sed -e
's/\.t[b,g]z$//;s/\.tar\.bz2$//;s/\.tar\.gz$//')
@@ -1195,6 +1225,10 @@
extractArchive
getArchiveInfo
patternPreProcessor
+ if ! validEnvironment; then
+ finishWorker Error "Invalid environment"
+ exit 20
+ fi
archiveIdentitySQL
importArchiveSQL
analyzeArchiveStart