Dominique Leuenberger 2019-05-28 07:40:05 +00:00 committed by Git OBS Bridge
commit 00bd948cdf
7 changed files with 170 additions and 86 deletions

View File

@ -1,5 +1,5 @@
pkgname=obs-service-tar_scm
pkgver=0.10.6.1551887937.e42c270
pkgver=0.10.9.1557261720.32a1cdb
pkgrel=0
pkgdesc="Source Service for the OpenSUSE Build Service (OBS)"
arch=('any')

View File

@ -5,4 +5,4 @@
<param name="url">git://github.com/M0ses/obs-service-tar_scm.git</param>
<param name="changesrevision">b742dfc0e12755cf306a95439494b5bdde7c0c61</param></service><service name="tar_scm">
<param name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
<param name="changesrevision">689f06bdad912d238ee2714eeae9f53218953b9a</param></service></servicedata>
<param name="changesrevision">d35048f2cac019c9f452fe8fac2fe1eab5018e6e</param></service></servicedata>

View File

@ -1,6 +1,6 @@
Format: 1.0
Source: obs-service-tar-scm
Version: 0.10.6.1551887937.e42c270
Version: 0.10.9.1557261720.32a1cdb
Provides: obs-service-obs_scm, obs-service-tar
Binary: obs-service-tar_scm
Maintainer: Adrian Schroeter <adrian@suse.de>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:793ceaa98a3c15ebcd01886275aaec9bb051b914097bfd1ab16ecf773664ee70
size 67763

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e8c0fe852cd04b5c4783f36f0636c62fa0204687d488c384aa3b40d288ebfb7
size 67614

View File

@ -1,3 +1,60 @@
-------------------------------------------------------------------
Wed May 8 13:26:40 UTC 2019 - Julio González Gil <jgonzalez@suse.com>
- Require external argparse for RHEL6
-------------------------------------------------------------------
Tue May 07 22:41:38 UTC 2019 - FSchreiner@suse.com
- Update to version 0.10.9.1557261720.32a1cdb:
* fix encoding error for surrogates
* glibc-common was used up to FC23 and RHEL7
-------------------------------------------------------------------
Fri May 03 15:24:40 UTC 2019 - FSchreiner@suse.com
- Update to version 0.10.8.1556896538.0693a62:
* Compile python files before install
* change order in GNUMakefile to prefer python3
* More thorought spec file cleanup
* predefine python version in spec file for GNUMAkefile
-------------------------------------------------------------------
Fri Apr 26 19:00:00 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
- the current guessing code is finding python2 and then uses that,
because python2 still seems to be available in the build env,
as we already know which python version we want we can just pass
the path to make and skip the whole guessing.
-------------------------------------------------------------------
Fri Apr 26 12:40:14 UTC 2019 - FSchreiner@suse.com
- Update to version 0.10.7.1556277536.7e9915a:
* [dist] spec file: python3 only and multidist
* Git also uses the LANGUAGE variable
* centos_version and rhel_version are triple digits
* Minimize diff with the version in openSUSE:Tools
* Fix the logic to pick the locale package on Fedora
* Forgot the guard 0 in one conditional
-------------------------------------------------------------------
Tue Apr 9 17:18:09 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
- centos_version and rhel_version are triple digits
-------------------------------------------------------------------
Tue Apr 9 17:03:08 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
- locally apply fixes from
https://github.com/openSUSE/obs-service-tar_scm/pull/298
-------------------------------------------------------------------
Fri Mar 29 13:49:15 UTC 2019 - Julio González Gil <jgonzalez@suse.com>
- Change requirement locale_package to glibc-common to fix building
for CentOS6 and CentOS7
-------------------------------------------------------------------
Wed Mar 06 15:59:39 UTC 2019 - adrian@suse.de

View File

@ -16,65 +16,123 @@
#
%if 0%{?suse_version} && 0%{?suse_version} >= 1220
%bcond_without obs_scm_testsuite
%else
%bcond_with obs_scm_testsuite
%endif
%if 0%{?suse_version} >= 1500 || 0%{?fedora_version} >= 29
%bcond_without python3
%else
%bcond_with python3
%endif
# This list probably needs to be extended
# logic seems to be if python < 2.7 ; then needs_external_argparse ; fi
%if (0%{?centos_version} == 6) || (0%{?rhel_version} == 600) || (0%{?suse_version} && 0%{?suse_version} < 1315) || (0%{?fedora_version} && 0%{?fedora_version} < 26)
%bcond_without needs_external_argparse
%else
%bcond_with needs_external_argparse
%endif
%if %{with python3}
%define use_python python3
%define use_test test3
%else
%define use_python python
%define use_test test
%endif
%if 0%{?suse_version}
%if 0%{?suse_version} >= 1550
%define pyyaml_package %{use_python}-PyYAML
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150100
%define locale_package glibc-locale-base
%else
%define locale_package glibc-locale
%endif
%endif
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%define locale_package glibc-langpack-en
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?scientificlinux_version}
%if 0%{?fedora_version} >= 29 || 0%{?rhel_version} >= 800 || 0%{?centos_version} >= 800
%define pyyaml_package %{use_python}-PyYAML
%else
%define pyyaml_package PyYAML
%endif
%bcond_without obs_scm_testsuite
%if 0%{?fedora_version} >= 24 || 0%{?rhel_version} >= 800 || 0%{?centos_version} >= 800
%define locale_package glibc-langpack-en
%else
%define locale_package glibc-common
%endif
%endif
%if 0%{?mageia} || 0%{?mandriva_version}
%define pyyaml_package python-yaml
%define locale_package locales
%endif
# avoid code duplication
%define scm_common_dep \
Requires: obs-service-obs_scm-common = %version-%release \
%{nil}
%define scm_dependencies \
Requires: git-core \
%if 0%{?suse_version} >= 1315 \
Recommends: bzr \
Recommends: mercurial \
Recommends: subversion \
Recommends: obs-service-download_files \
%endif \
%{nil}
######## END OF MACROS AND FUN ###################################
Name: obs-service-tar_scm
%define version_unconverted 0.10.6.1551887937.e42c270
Version: 0.10.6.1551887937.e42c270
%define version_unconverted 0.10.9.1557261720.32a1cdb
Version: 0.10.9.1557261720.32a1cdb
Release: 0
Summary: An OBS source service: create tar ball from svn/git/hg
License: GPL-2.0-or-later
Group: Development/Tools/Building
Url: https://github.com/openSUSE/obs-service-tar_scm
Source: %{name}-%{version}.tar.gz
# Fix build on Ubuntu by disabling mercurial tests, not applied in rpm
# based distributions
#Patch0: 0001-Debianization-disable-running-mercurial-tests.patch
%if %{with obs_scm_testsuite}
BuildRequires: %{locale_package}
BuildRequires: %{use_python}-mock
BuildRequires: %{use_python}-six
BuildRequires: %{use_python}-unittest2
BuildRequires: bzr
BuildRequires: git-core
BuildRequires: mercurial
BuildRequires: subversion
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%define py_compile(O) \
find %1 -name '*.pyc' -exec rm -f {} \\; \
python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
%{-O: \
find %1 -name '*.pyo' -exec rm -f {} \\; \
python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
}
%endif
BuildRequires: PyYAML
BuildRequires: %{locale_package}
BuildRequires: %{pyyaml_package}
%if %{with needs_external_argparse}
BuildRequires: %{use_python}-argparse
%endif
BuildRequires: %{use_python}-dateutil
# Why do we need this? we dont use it as runtime requires later
BuildRequires: %{use_python}-lxml
%if %{with python3}
BuildRequires: %{use_python}
%else
BuildRequires: python-PyYAML
%endif
BuildRequires: python-dateutil
BuildRequires: python-lxml
BuildRequires: python-mock
BuildRequires: python-six
BuildRequires: python-unittest2
%endif
BuildRequires: python >= 2.6
Requires: git-core
%if 0%{?suse_version} >= 1315
Recommends: bzr
Recommends: mercurial
Recommends: subversion
%endif
Requires: obs-service-obs_scm-common = %version-%release
%scm_common_dep
%scm_dependencies
#
#
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@ -87,31 +145,24 @@ It supports downloading from svn, git, hg and bzr repositories.
Summary: Common parts of SCM handling services
Group: Development/Tools/Building
Requires: %{locale_package}
Requires: python-dateutil
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
Requires: PyYAML
%else
Requires: python-PyYAML
%if 0%{?suse_version} < 1315
Requires: python-argparse
%endif
%endif
%if 0%{?fedora_version} >= 25
Requires: python2
Requires: %{pyyaml_package}
Requires: %{use_python}-dateutil
%if %{with needs_external_argparse}
Requires: %{use_python}-argparse
%endif
%description -n obs-service-obs_scm-common
This is a source service for openSUSE Build Service.
It supports downloading from svn, git, hg and bzr repositories.
This package holds the shared files for different services.
%package -n obs-service-tar
Summary: Creates a tar archive from local directory
Group: Development/Tools/Building
Requires: obs-service-obs_scm-common = %version-%release
Provides: obs-service-tar_scm:/usr/lib/obs/service/tar.service
%if (0%{?fedora_version} && 0%{?fedora_version} < 26) || 0%{?centos} == 6 || 0%{?centos} == 7
BuildRequires: python-argparse
Requires: python-argparse
%endif
%scm_common_dep
%description -n obs-service-tar
Creates a tar archive from local directory
@ -120,13 +171,8 @@ Creates a tar archive from local directory
Summary: Creates a OBS cpio from a remote SCM resource
Group: Development/Tools/Building
Provides: obs-service-tar_scm:/usr/lib/obs/service/obs_scm.service
Requires: git-core
%if 0%{?suse_version} >= 1315
Recommends: bzr
Recommends: mercurial
Recommends: subversion
%endif
Requires: obs-service-obs_scm-common = %version-%release
%scm_common_dep
%scm_dependencies
%description -n obs-service-obs_scm
Creates a OBS cpio from a remote SCM resource.
@ -137,14 +183,8 @@ into a tar ball during build time.
%package -n obs-service-appimage
Summary: Handles source downloads defined in appimage.yml files
Group: Development/Tools/Building
Requires: git-core
%if 0%{?suse_version} >= 1315
Recommends: bzr
Recommends: mercurial
Recommends: subversion
Recommends: obs-service-download_files
%endif
Requires: obs-service-obs_scm-common = %version-%release
%scm_common_dep
%scm_dependencies
%description -n obs-service-appimage
Experimental appimage support: This parses appimage.yml files for SCM
@ -154,14 +194,8 @@ resources and packages them.
Summary: Handles source downloads defined in snapcraft.yaml files
Group: Development/Tools/Building
Provides: obs-service-tar_scm:/usr/lib/obs/service/snapcraft.service
Requires: git-core
%if 0%{?suse_version} >= 1315
Recommends: bzr
Recommends: mercurial
Recommends: subversion
Recommends: obs-service-download_files
%endif
Requires: obs-service-obs_scm-common = %version-%release
%scm_common_dep
%scm_dependencies
%description -n obs-service-snapcraft
Experimental snapcraft support: This parses snapcraft.yaml files for SCM
@ -172,24 +206,17 @@ resources and packages them.
%setup -q -n obs-service-tar_scm-%version
%build
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%py_compile .
%else
%py_compile %{buildroot}
%endif
%install
make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}"
make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}" PYTHON="%{_bindir}/%{use_python}"
%if %{with obs_scm_testsuite}
%if 0%{?suse_version} >= 1220
# moved conditional to the top as it helps to have it all in one place and only rely on the bcond_with here.
%check
# No need to run PEP8 tests here; that would require a potentially
# brittle BuildRequires: python-pep8, and any style issues are already
# caught by Travis CI.
make test
%endif
make %{use_test}
%endif
%files