Accepting request 1001305 from home:yecril71pl:branches:devel:openSUSE:Factory:rpmlint

- Copy libraries required by _rpm.cpython to the testing root (boo#1203093).

OBS-URL: https://build.opensuse.org/request/show/1001305
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint-mini?expand=0&rev=168
This commit is contained in:
Martin Liška 2022-09-12 07:24:30 +00:00 committed by Git OBS Bridge
parent e5b8d36f66
commit 19a7749495
2 changed files with 19 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Sep 5 16:50:16 UTC 2022 - Christopher Yeleighton <giecrilj@stegny.2a.pl>
- Copy libraries required by _rpm.cpython to the testing root (boo#1203093).
-------------------------------------------------------------------
Mon Jul 25 08:02:16 UTC 2022 - Martin Liška <mliska@suse.cz>

View File

@ -62,13 +62,14 @@ source packages can be checked.
%prep
%setup -q -n desktop-file-utils-0.24
[ -r COPYING ]
<COPYING
%build
%configure
pushd src
make %{?_smp_mflags} desktop-file-validate V=1 DESKTOP_FILE_UTILS_LIBS="%{_libdir}/libglib-2.0.a -lpthread -lrt"
popd
cd src
%make_build \
%{?_smp_mflags} desktop-file-validate \
V=1 DESKTOP_FILE_UTILS_LIBS="%{_libdir}/libglib-2.0.a -lpthread -lrt"
%install
# Check that rpmlint works at all, with the primary flavor
@ -100,7 +101,13 @@ for file in $(cat %{SOURCE1}); do
install -D -m 644 $exp %{buildroot}/opt/testing/lib/python%{python_version}/$exp
done
popd
cp -a %{python_sitearch}/{rpm,zstandard}* %{buildroot}/opt/testing/lib/python%{python_version}/site-packages
ldd %{python_sitearch}/rpm/*.so | while read L T R A
do cp '-aLt%{buildroot}/opt/testing/lib' "${R}" || # is it a virtual library?
! <"${R}" || # it is a real library and still could not be copied
false # this is necessary to really fail
done
cp -a %{python_sitearch}/{rpm,zstandard}* \
%{buildroot}/opt/testing/lib/python%{python_version}/site-packages
cp -a %{python_sitelib} %{buildroot}/opt/testing/lib/python%{python_version}
cp -a %{python3_sitelib}/rpmlint* %{buildroot}/opt/testing/lib/python%{python_version}
cp -a %{_libdir}/libpython%{python_version}*.so.* %{buildroot}/opt/testing/lib
@ -125,10 +132,11 @@ install -m 755 -D %{SOURCE2} %{buildroot}/opt/testing/bin/rpmlint
%check
# check rpmlint-mini with the custom flavor
%make_build check
sed -e 's|/opt|%{buildroot}/opt|' -e 's|exec|%my_python|' %{buildroot}/opt/testing/bin/rpmlint > myrpmlint
chmod +x myrpmlint
set +e
./myrpmlint -i rpmlint
sh -x myrpmlint -i rpmlint
test $? -gt 0 -a $? -lt 60 && exit 1
set -e