Ich möchte die Ausgabe meiner RPM-Build-Prozedur minimieren.Das Ausführen des Befehls rpmbuild mit dem Flag --quiet Option führt zu umfangreichen Debug-Informationen
ich den folgenden Befehl: rpmbuild -ba --quiet "/tmp/yaneeve/kit/linux/rpm_spec"
Mein System ist: Linux yaneeve-lnx-82-5 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:38:41 EDT 2006 i686 i686 i386 GNU/Linux
Die rpmbuild Version ist: RPM version 4.2.3
Das% prep Abschnitt meiner rpm Spec-Datei ist:
%prep
. $LOGGER_FUNC_FILE_LOCATION/logger.sh
SCRIPT_NAME='rpm_spec-prep'
SOURCE_DIR=`readlink -f -n %{_sourcedir}`
PACKAGE_DIR=`readlink -f -n %{_pkg_script_dir}`
BUILD_PRODUCT_DIR=`readlink -f -n %{_build_product_dir}`
RESOURCE_DIR=`readlink -f -n %{_resource_dir}`
log $SCRIPT_NAME INFO "In the prep stage of the rpm spec file..."
if [[ -d $SOURCE_DIR && `ls -a $SOURCE_DIR | wc -w` -gt 2 ]] ; then
log $SCRIPT_NAME INFO "Source directory exists and is not empty - deleting content."
rm -rf $SOURCE_DIR//*
if [ $? -ne 0 ]; then
log $SCRIPT_NAME ERROR "Unable to remove $SOURCE_DIR/* - exiting."
exit 1
fi
fi
if [ ! -f $PACKAGE_DIR/include_src_files.sh ]; then
log $SCRIPT_NAME ERROR "File list does not exist - aborting."
exit 1
else
$PACKAGE_DIR/include_src_files.sh $BUILD_PRODUCT_DIR $RESOURCE_DIR $SOURCE_DIR
if [ $? -ne 0 ]; then
log $SCRIPT_NAME ERROR "Unable to run include_src_files.sh script - exiting."
exit 1
fi
fi
Das rpmbuild erstellt das folgende Skript als Ergebnis (HINWEIS: set -x):
#!/bin/sh
RPM_SOURCE_DIR="/tmp/yaneeve/output/kit/SOURCES"
RPM_BUILD_DIR="/tmp/yaneeve/output/kit/BUILD"
RPM_OPT_FLAGS="-O2 -g -pipe -march=i386 -mcpu=i686"
RPM_ARCH="i386"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="YANEEVE-APP"
RPM_PACKAGE_VERSION="4.2.2.0"
RPM_PACKAGE_RELEASE="01.0"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/tmp/yaneeve/output/kit/SOURCES"
export RPM_BUILD_ROOT
set -x
umask 022
cd /tmp/yaneeve/output/kit/BUILD
LANG=C
export LANG
unset DISPLAY
. $LOGGER_FUNC_FILE_LOCATION/logger.sh
SCRIPT_NAME='rpm_spec-prep'
SOURCE_DIR=`readlink -f -n /tmp/yaneeve/output/kit/SOURCES`
PACKAGE_DIR=`readlink -f -n /tmp/yaneeve/output/kit/../../kit/linux`
BUILD_PRODUCT_DIR=`readlink -f -n /tmp/yaneeve/output/kit/..`
RESOURCE_DIR=`readlink -f -n /tmp/yaneeve/output/kit/../../conf`
log $SCRIPT_NAME INFO "In the prep stage of the rpm spec file..."
if [[ -d $SOURCE_DIR && `ls -a $SOURCE_DIR | wc -w` -gt 2 ]] ; then
log $SCRIPT_NAME INFO "Source directory exists and is not empty - deleting content."
rm -rf $SOURCE_DIR//*
if [ $? -ne 0 ]; then
log $SCRIPT_NAME ERROR "Unable to remove $SOURCE_DIR/* - exiting."
exit 1
fi
fi
if [ ! -f $PACKAGE_DIR/include_src_files.sh ]; then
log $SCRIPT_NAME ERROR "File list does not exist - aborting."
exit 1
else
$PACKAGE_DIR/include_src_files.sh $BUILD_PRODUCT_DIR $RESOURCE_DIR $SOURCE_DIR
if [ $? -ne 0 ]; then
log $SCRIPT_NAME ERROR "Unable to run include_src_files.sh script - exiting."
exit 1
fi
fi
Warum wird der Satz -x eingefügt? Ich glaube, das ist der Grund für die umfangreichen Debuginformationen gedruckt? Was mache ich falsch? Oder gibt es einen Fehler mit meinem Programm rpmbuild?
(Sorry, wenn meine Frage etwas zu beschreibenden Charakter ...)
Bitte kürzen Sie das Motiv etwas ab. – JesperE
Hoffnung Thema ist jetzt klarer ... – Yaneeve