Hello community,
here is the log from the commit of package python-stdeb for openSUSE:Factory checked in at 2019-04-22 12:25:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-stdeb (Old)
and /work/SRC/openSUSE:Factory/.python-stdeb.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-stdeb"
Mon Apr 22 12:25:51 2019 rev:4 rq:695498 version:0.8.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-stdeb/python-stdeb.changes 2018-12-24 11:44:52.341267016 +0100
+++ /work/SRC/openSUSE:Factory/.python-stdeb.new.5536/python-stdeb.changes 2019-04-22 12:25:53.124973621 +0200
@@ -1,0 +2,16 @@
+Wed Apr 17 16:37:13 UTC 2019 - John Vandenberg
+
+- Add missing runtime dependencies
+- Remove 126.patch which does nothing
+- Activate test suite, using tests-use-tablib.patch, and removing
+ bcond test
+- Add four patches to workaround problems relating to use
+ of dpkg on openSUSE:
+ * remove-version-checks.patch and ignore-unmet-deps.patch:
+ A real dpkg database can not be populated with the
+ necessary dependencies
+ * no-install-layout.patch and remove-python-helper-rules.patch:
+ --install-layout=deb and the python helpers are not available
+ on openSUSE.
+
+-------------------------------------------------------------------
Old:
----
126.patch
New:
----
ignore-unmet-deps.patch
no-install-layout.patch
remove-python-helper-rules.patch
remove-version-checks.patch
tablib-0.13.0.tar.gz
tests-use-tablib.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-stdeb.spec ++++++
--- /var/tmp/diff_new_pack.P3Mlcq/_old 2019-04-22 12:25:53.764973372 +0200
+++ /var/tmp/diff_new_pack.P3Mlcq/_new 2019-04-22 12:25:53.768973371 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-stdeb
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -17,7 +17,6 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_with test
Name: python-stdeb
Version: 0.8.5
Release: 0
@@ -26,11 +25,36 @@
Group: Development/Languages/Python
URL: http://github.com/astraw/stdeb
Source: https://files.pythonhosted.org/packages/source/s/stdeb/stdeb-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM 126.patch -- fixes https://github.com/astraw/stdeb/issues/78
-Patch0: https://github.com/astraw/stdeb/pull/126.patch
+# Test data
+Source1: tablib-0.13.0.tar.gz
+# The tests default to using requests as the test scenario, however that
+# has urllib3 & pyOpenSSL as dependencies, which makes the tests break due
+# to constant incompatibilities in openssl and vendoring/de-vendoring.
+# Instead use tablib.
+Patch0: tests-use-tablib.patch
+# stdeb is of limited use on openSUSE as any attempt to install
+# dpkg packages needed to create a valid dpkg database will destroy the
+# openSUSE python runtime that stdeb was installed into. Therefore it
+# can only be used with a fake database, or without enforced dpkg
+# dependency checks. The next two patches provide the latter approach.
+# https://github.com/astraw/stdeb/issues/144
+Patch1: remove-version-checks.patch
+Patch2: ignore-unmet-deps.patch
+# The python helpers come from the debian python-defaults and python3-defaults
+# packages, e.g. https://salsa.debian.org/cpython-team/python-defaults
+# and they need to be ported to a openSUSE package.
+Patch3: remove-python-helper-rules.patch
+Patch4: no-install-layout.patch
+BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
+BuildRequires: debhelper
+BuildRequires: dpkg
+BuildRequires: fakeroot
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+Requires: debhelper
+Requires: dpkg
+Requires: fakeroot
Requires: python-requests
BuildArch: noarch
%python_subpackages
@@ -44,9 +68,14 @@
command installs this .deb file. The debianize command builds a
debian/ directory directly alongside your setup.py.
+The openSUSE version does not fail for unmet dependencies in the host
+dpkg database.
+
%prep
%setup -q -n stdeb-%{version}
-%patch0 -p1
+%autopatch -p1
+
+cp %{SOURCE1} .
%build
%python_build
@@ -55,10 +84,12 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%if %{with test}
%check
-%python_exec setup.py test
-%endif
+# There is also test2and3.sh which could be inlined here
+export PATH=/sbin:/usr/sbin:%{buildroot}/%{_bindir}:$PATH
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
+PYEXE=$python bash -x ./test.sh
+}
%files %{python_files}
%license LICENSE.txt
++++++ ignore-unmet-deps.patch ++++++
Index: stdeb-0.8.5/stdeb/command/bdist_deb.py
===================================================================
--- stdeb-0.8.5.orig/stdeb/command/bdist_deb.py
+++ stdeb-0.8.5/stdeb/command/bdist_deb.py
@@ -43,7 +43,7 @@ class bdist_deb(Command):
raise ValueError('could not find debian source directory')
# define system command to execute (gen .deb binary pkg)
- syscmd = ['dpkg-buildpackage','-rfakeroot','-uc','-b']
+ syscmd = ['dpkg-buildpackage','-d','-rfakeroot','-uc','-b']
util.process_command(syscmd,cwd=target_dirs[0])
Index: stdeb-0.8.5/stdeb/util.py
===================================================================
--- stdeb-0.8.5.orig/stdeb/util.py
+++ stdeb-0.8.5/stdeb/util.py
@@ -530,6 +530,7 @@ def dpkg_source(b_or_x,arg1,cwd=None):
def dpkg_genchanges(cwd=None):
args = ['/usr/bin/dpkg-buildpackage',
'-rfakeroot',
+ '-d', # ignore unmet dependencies
'-uc', # unsigned changes
'-us', # unsigned source
'-S', # source package
Index: stdeb-0.8.5/test.sh
===================================================================
--- stdeb-0.8.5.orig/test.sh
+++ stdeb-0.8.5/test.sh
@@ -72,7 +72,7 @@ fi
${PY2DSC} $SOURCE_TARBALL
cd deb_dist/$DEBSOURCE
-dpkg-buildpackage -rfakeroot -uc -us
+dpkg-buildpackage -d -rfakeroot -uc -us
cd ../..
for DEBFILE in deb_dist/*.deb; do
echo "contents of $DEBFILE from $SOURCE_TARBALL in case 1:"
@@ -96,7 +96,7 @@ cd $SOURCE_TARBALL_DIR
$PYEXE -c "import sys; print('sys.version',sys.version)"
$PYEXE setup.py --command-packages=stdeb.command sdist_dsc
cd deb_dist/$DEBSOURCE
-dpkg-buildpackage -rfakeroot -uc -us
+dpkg-buildpackage -d -rfakeroot -uc -us
cd ../..
for DEBFILE in deb_dist/*.deb; do
echo "contents of $DEBFILE from $SOURCE_TARBALL in case 2:"
++++++ no-install-layout.patch ++++++
Index: stdeb-0.8.5/stdeb/util.py
===================================================================
--- stdeb-0.8.5.orig/stdeb/util.py
+++ stdeb-0.8.5/stdeb/util.py
@@ -1480,9 +1480,9 @@ override_dh_auto_build:
%(rules_override_build_target_pythons)s
"""
-RULES_OVERRIDE_INSTALL_TARGET_PY2 = " python setup.py install --force --root=debian/%(package)s --no-compile -O0 --install-layout=deb %(install_prefix)s %(no_python2_scripts_cli_args)s"
+RULES_OVERRIDE_INSTALL_TARGET_PY2 = " python setup.py install --force --root=debian/%(package)s --no-compile -O0 %(install_prefix)s %(no_python2_scripts_cli_args)s"
-RULES_OVERRIDE_INSTALL_TARGET_PY3 = " python3 setup.py install --force --root=debian/%(package3)s --no-compile -O0 --install-layout=deb %(install_prefix)s %(no_python3_scripts_cli_args)s"
+RULES_OVERRIDE_INSTALL_TARGET_PY3 = " python3 setup.py install --force --root=debian/%(package3)s --no-compile -O0 %(install_prefix)s %(no_python3_scripts_cli_args)s"
RULES_OVERRIDE_INSTALL_TARGET = """
override_dh_auto_install:
++++++ remove-python-helper-rules.patch ++++++
Index: stdeb-0.8.5/stdeb/util.py
===================================================================
--- stdeb-0.8.5.orig/stdeb/util.py
+++ stdeb-0.8.5/stdeb/util.py
@@ -1114,7 +1114,10 @@ class DebianInfo:
else:
self.override_dh_python3 = ''
- sequencer_options = ['--with '+','.join(sequencer_with)]
+ # These depend on the dh_python helpers in the Debian python packages
+ # https://salsa.debian.org/cpython-team/python-defaults
+ # sequencer_options = ['--with '+','.join(sequencer_with)]
+ sequencer_options = []
sequencer_options.append('--buildsystem=python_distutils')
self.sequencer_options = ' '.join(sequencer_options)
++++++ remove-version-checks.patch ++++++
Index: stdeb-0.8.5/stdeb/util.py
===================================================================
--- stdeb-0.8.5.orig/stdeb/util.py
+++ stdeb-0.8.5/stdeb/util.py
@@ -1375,34 +1375,6 @@ def build_dsc(debinfo,
finally:
shutil.rmtree(tmp_dir)
- if 1:
- # check versions of debhelper and python-all
- debhelper_version_str = get_version_str('debhelper')
- if len(debhelper_version_str)==0:
- log.warn('This version of stdeb requires debhelper >= %s, but you '
- 'do not have debhelper installed. '
- 'Could not check compatibility.'%DH_MIN_VERS)
- else:
- if not dpkg_compare_versions(
- debhelper_version_str, 'ge', DH_MIN_VERS ):
- log.warn('This version of stdeb requires debhelper >= %s. '
- 'Use stdeb 0.3.x to generate source packages '
- 'compatible with older versions of debhelper.'%(
- DH_MIN_VERS,))
-
- python_defaults_version_str = get_version_str('python-all')
- if len(python_defaults_version_str)==0:
- log.warn('This version of stdeb requires python-all >= %s, '
- 'but you do not have this package installed. '
- 'Could not check compatibility.'%PYTHON_ALL_MIN_VERS)
- else:
- if not dpkg_compare_versions(
- python_defaults_version_str, 'ge', PYTHON_ALL_MIN_VERS):
- log.warn('This version of stdeb requires python-all >= %s. '
- 'Use stdeb 0.6.0 or older to generate source packages '
- 'that use python-support.'%(
- PYTHON_ALL_MIN_VERS,))
-
# D. restore debianized tree
os.rename(fullpath_repackaged_dirname+'.debianized',
fullpath_repackaged_dirname)
++++++ tests-use-tablib.patch ++++++
Index: stdeb-0.8.5/test.sh
===================================================================
--- stdeb-0.8.5.orig/test.sh
+++ stdeb-0.8.5/test.sh
@@ -9,7 +9,7 @@ rm -rf deb_dist
# setup paths
if [ "${PYEXE}" == "" ]; then
- PYEXE=`which python`;
+ PYEXE=`which python3`;
fi
echo "using Python at ${PYEXE}"
@@ -39,10 +39,10 @@ ${PYPI_INSTALL} --help > /dev/null
# applying any patches here so this should be pretty small.
MAX_DEB_SPECIFIC_SIZE=5000
-for i in `seq 1 3`; do
+for i in `seq 1`; do
if [ $i -eq "1" ]; then
-SOURCE_PACKAGE=requests
-SOURCE_RELEASE=2.2.1
+SOURCE_PACKAGE=tablib
+SOURCE_RELEASE=0.13.0
SOURCE_TARBALL_DIR=${SOURCE_PACKAGE}-${SOURCE_RELEASE}
SOURCE_TARBALL=${SOURCE_TARBALL_DIR}.tar.gz
DEBSOURCE=${SOURCE_TARBALL_DIR}
@@ -65,7 +65,7 @@ fi
# get a file to work with
# ==============================================================
-${PYPI_DOWNLOAD} ${SOURCE_PACKAGE} --release ${SOURCE_RELEASE}
+# Tarball provided from rpm SOURCES
# case 1: build from pre-existing source tarball with py2dsc
# ==============================================================
@@ -93,9 +93,8 @@ rm -rf deb_dist
# ==============================================================
tar xzf $SOURCE_TARBALL
cd $SOURCE_TARBALL_DIR
-which python
-python -c "import sys; print('sys.version',sys.version)"
-python setup.py --command-packages=stdeb.command sdist_dsc
+$PYEXE -c "import sys; print('sys.version',sys.version)"
+$PYEXE setup.py --command-packages=stdeb.command sdist_dsc
cd deb_dist/$DEBSOURCE
dpkg-buildpackage -rfakeroot -uc -us
cd ../..
@@ -137,8 +136,7 @@ fi
rm -rf deb_dist
-#cleanup original tarball
-rm -rf $SOURCE_TARBALL
+#keep original tarball for next invocation
done