Ich versuche ein Beispiel RPM-Paket mit einer einzigen Datei.Build RPM ohne Kompilieren der Quelldatei
In meinem Quellordner habe ich python_test_rpm.tar.gz, das nur eine Python-Skriptdatei enthält. Die Datei ist jedoch kein gültiges Python-Skript.
Alles, was ich tun möchte, ist dies zu packen und es in einem bestimmten Ordner bereitzustellen. Während des Befehls rpm build wird der Kompilierungs-/Syntaxfehler im Python-Skript angezeigt. Wie man diese Validierung überspringt und den Build erstellt.
rpmbuild command rpmbuild -v -bb
Spec File:
Name: python_test_rpm
Version: 1
Release: 1
Summary: Sample RPM for Linux Installer
Group: Development/Tools
License: GPL
URL: None
Source: python_test_rpm.tar.gz
BuildRoot: /home/rpmdev/rpmbuild
%description
POC package for Linux RPM installer
%prep
%setup -n "python_test_rpm"
%install
rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT/python_test_rpm"
cp -R _mock_backport.py "$RPM_BUILD_ROOT/python_test_rpm"
%files
/python_test_rpm/_mock_backport.py
Error Message: Compiling /home/rpmdev/rpmbuild/BUILDROOT/python_test_rpm-1-1.x86_64/python_test_rpm/_mock_backport.py ... SyntaxError: unqualified exec is not allowed in function '_set_signature' it contains a nested function with free variables (_mock_backport.py, line 191)
error: Bad exit status from /var/tmp/rpm-tmp.4gSvIa (%install)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.4gSvIa (%install)
Dank Jeff. exit 0 funktioniert für mich – baskar