12
0

- Update to version 0.10.52:

* [archive] fix include/exclude glob to regex conversion

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=356
This commit is contained in:
Frank Schreiner
2025-06-23 21:11:39 +00:00
committed by Git OBS Bridge
commit 8e291e6d56
17 changed files with 3436 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,32 @@
From c2c2e7bbaea6d224ad5742f47fb4baab63365e6d Mon Sep 17 00:00:00 2001
From: Hib Eris <hib@hiberis.nl>
Date: Mon, 22 Jun 2015 15:23:30 +0200
Subject: [PATCH] Debianization: disable running mercurial tests
This is needed to make this package build on the Ubuntu
distributions at build.opensuse.org. These distributions
provide only Ubuntu's main repository, which does not contain
the mercurial package. The mercurial package is only needed
to run mercurial tests, thus disabeling mercurial tests allows
building the package.
---
debian/control | 2 +-
tests/test.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test.py b/tests/test.py
index 3814e71..ca480b7 100755
--- a/tests/test.py
+++ b/tests/test.py
@@ -23,7 +23,7 @@ if __name__ == '__main__':
# temporarily comment out any of these:
SvnTests,
GitTests,
- HgTests,
+ #HgTests,
BzrTests,
UnitTestCases
]
--
2.1.4

24
PKGBUILD Normal file
View File

@@ -0,0 +1,24 @@
pkgname=obs-service-tar_scm
pkgver=0.10.52
pkgrel=0
pkgdesc="Source Service for the OpenSUSE Build Service (OBS)"
arch=('any')
url="https://github.com/openSUSE/obs-service-tar_scm"
license=('GPL3')
groups=('base-devel')
makedepends=('python' 'python-yaml' 'python-dateutil' 'python-lxml' 'bzr' 'git' 'mercurial' 'subversion' )
depends=('python' 'python-yaml' 'python-dateutil' 'cpio' 'git' 'bzr' 'mercurial' 'subversion' )
source=("obs-service-tar_scm-${pkgver}.tar.gz")
noextract=("obs-service-tar_scm-${pkgver}.tar.gz")
provides=('obs-service-tar')
sha256sums=('SKIP')
prepare() {
tar -axf "obs-service-tar_scm-${pkgver}.tar.gz"
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" PREFIX=/usr install
}

1277
_maintainers Normal file

File diff suppressed because it is too large Load Diff

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<flavor>test</flavor>
</multibuild>

19
_service Normal file
View File

@@ -0,0 +1,19 @@
<services>
<service name="tar_scm" mode="manual">
<param name="url">https://github.com/openSUSE/obs-service-tar_scm.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="changesgenerate">enable</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="extract">dist/obs-service-tar_scm.spec</param>
<param name="latest-signed-tag">true</param>
<param name="maintainers-asc">_maintainers</param>
</service>
<service name="set_version" mode="manual">
<param name="basename">obs-service-tar_scm</param>
</service>
<service name="recompress" mode="manual">
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
</services>

17
_servicedata Normal file
View File

@@ -0,0 +1,17 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/adrianschroeter/obs-service-tar_scm.git</param>
<param name="changesrevision">d44d677cf006d48b261f5e2054ba2126bed64ae1</param></service>
<service name="tar_scm">
<param name="url">git://github.com/M0ses/obs-service-tar_scm.git</param>
<param name="changesrevision">9e8b88b088778c44db56781e6a908a0e82e27cf2</param>
</service>
<service name="tar_scm">
<param name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
<param name="changesrevision">85bfc3fabb06212b49a389afb3310bfbf2996913</param>
</service>
<service name="tar_scm">
<param name="url">https://github.com/openSUSE/obs-service-tar_scm.git</param>
<param name="changesrevision">beb511de42bb60c19d24c9404c487db719869093</param>
</service>
</servicedata>

19
debian.dsc Normal file
View File

@@ -0,0 +1,19 @@
Format: 1.0
Source: obs-service-tar-scm
Version: 0.10.52
Provides: obs-service-obs_scm, obs-service-tar, obs-service-gbp
Binary: obs-service-tar_scm
Maintainer: Adrian Schroeter <adrian@suse.de>
Architecture: all
Standards-Version: 3.9.3
Build-Depends: debhelper (>= 8.0.0), python3, python3-dateutil, dh-python, python3-yaml
Package: obs-service-tar-scm
Architecture: all
Provides: obs-service-obs-scm, obs-service-tar
Depends: ${misc:Depends}, ${python3:Depends}, python3, bzr, git, subversion, cpio, python3-dateutil, python3-yaml
Recommends: mercurial, git-buildpackage, git-lfs
Description: An OBS source service: fetches SCM tarballs
This is a source service for openSUSE Build Service.
It supports downloading from svn, git, hg and bzr repositories.

1
debian.series Normal file
View File

@@ -0,0 +1 @@
0001-Debianization-disable-running-mercurial-tests.patch -p1

View File

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

View File

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

View File

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

View File

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

View File

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

1676
obs-service-tar_scm.changes Normal file

File diff suppressed because it is too large Load Diff

329
obs-service-tar_scm.spec Normal file
View File

@@ -0,0 +1,329 @@
#
# spec file for package obs-service-tar_scm
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?fedora_version}%{?rhel}
%define _pkg_base %nil
%else
%define _pkg_base -base
%endif
%define flavor @BUILD_FLAVOR@%nil
%if "%{flavor}" == ""
%define nsuffix %nil
%else
%define nsuffix -test
%endif
%if 0%{?suse_version} && 0%{?suse_version} >= 1220 && "%{flavor}" == "test"
%bcond_without obs_scm_testsuite
%else
%bcond_with obs_scm_testsuite
%endif
# special guard for flavor test, yet --without test being specified
%if "%{flavor}" == "test" && %{without obs_scm_testsuite}
ExclusiveArch: skip-build
%endif
%if 0%{?suse_version} >= 1315 || 0%{?fedora_version} >= 29 || 0%{?rhel} >= 8
%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%{?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}
%if 0%{?suse_version} > 1500
%define use_python %{primary_python}
%else
%define use_python python3
%endif
%define use_test test3
%else
%define use_python python
%define use_test test
%endif
%if 0%{?suse_version}
%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}
%if 0%{?fedora_version} >= 29 || 0%{?rhel} >= 8
%define pyyaml_package %{use_python}-PyYAML
%else
%define pyyaml_package PyYAML
%endif
%if 0%{?fedora_version} >= 24 || 0%{?rhel} >= 8
%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
# Mageia 8 has package names python-*
# but requires python3 in shebang
%if 0%{?mageia} >= 8 || 0%{?rhel} >= 8 || 0%{?suse_version} >= 1600
%define python_path %{_bindir}/python3
%else
%define python_path %{_bindir}/%{use_python}
%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: obs-service-download_files \
Recommends: %{use_python}-keyring \
Recommends: %{use_python}-keyrings.alt \
Suggests: bzr \
Suggests: mercurial \
Suggests: subversion \
%endif \
%{nil}
######## END OF MACROS AND FUN ###################################
%define pkg_name obs-service-tar_scm
Name: %{pkg_name}%{nsuffix}
%define version_unconverted 0.10.52
Version: 0.10.52
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: %{pkg_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: %{pkg_name} = %{version}
BuildRequires: %{use_python}-keyring
BuildRequires: %{use_python}-keyrings.alt
BuildRequires: %{use_python}-six
BuildRequires: bzr
BuildRequires: git-core
BuildRequires: gpg
BuildRequires: mercurial
BuildRequires: subversion
%if !%{with python3}
BuildRequires: %{use_python}-mock
%endif
%endif
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}%{_pkg_base}
# Fix missing Requires in python3-pbr in Leap42.3
BuildRequires: %{use_python}-setuptools
%if 0%{?suse_version}
BuildRequires: python-rpm-macros
%endif
%else
BuildRequires: python >= 2.6
%endif
%scm_common_dep
%scm_dependencies
#
#
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires: %{python_path}
%description
This is a source service for openSUSE Build Service.
It supports downloading from svn, git, hg and bzr repositories.
%package -n obs-service-obs_scm-common
Summary: Common parts of SCM handling services
Group: Development/Tools/Building
Requires: %{locale_package}
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
Provides: obs-service-tar_scm:/usr/lib/obs/service/tar.service
%scm_common_dep
%description -n obs-service-tar
Creates a tar archive from local directory
%package -n obs-service-obs_scm
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
%scm_common_dep
%scm_dependencies
%description -n obs-service-obs_scm
Creates a OBS cpio from a remote SCM resource.
This can be used to work directly in local git checkout and can be packaged
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
%scm_common_dep
%scm_dependencies
%description -n obs-service-appimage
Experimental appimage support: This parses appimage.yml files for SCM
resources and packages them.
%package -n obs-service-snapcraft
Summary: Handles source downloads defined in snapcraft.yaml files
Group: Development/Tools/Building
Provides: obs-service-tar_scm:/usr/lib/obs/service/snapcraft.service
%scm_common_dep
%scm_dependencies
%description -n obs-service-snapcraft
Experimental snapcraft support: This parses snapcraft.yaml files for SCM
resources and packages them.
%if 0%{?enable_gbp}
%package -n obs-service-gbp
Summary: Creates Debian source artefacts from a Git repository
Group: Development/Tools/Building
Requires: git-buildpackage >= 0.6.0
Requires: obs-service-obs_scm-common = %version-%release
%if 0%{?enable_gbp}
Provides: obs-service-tar_scm:/usr/lib/obs/service/obs_gbp.service
%endif
%description -n obs-service-gbp
Debian git-buildpackage workflow support: uses gbp to create Debian
source artefacts (.dsc, .origin.tar.gz and .debian.tar.gz if non-native).
%endif
%prep
%setup -q -n obs-service-tar_scm-%version
%build
%install
%if %{without obs_scm_testsuite}
make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}" PYTHON="%{python_path}" WITH_GBP="%{enable_gbp}"
%if %{with python3}
# Doing %%python3_fix_shebang_path old fashioned way for the backward compatibility
sed -i "1s@#\\!.*python\S*@#\\!$(realpath %__python3)@" \
%{buildroot}%{_prefix}/lib/obs/service/tar_scm
%endif
%else
# 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 %{use_test}
%endif
%if %{without obs_scm_testsuite}
%files
%defattr(-,root,root)
%{_prefix}/lib/obs/service/tar_scm.service
%files -n obs-service-obs_scm-common
%defattr(-,root,root)
%license COPYING
%dir %{_prefix}/lib/obs
%dir %{_prefix}/lib/obs/service
%{_prefix}/lib/obs/service/TarSCM
%{_prefix}/lib/obs/service/tar_scm
%dir %{_sysconfdir}/obs
%dir %{_sysconfdir}/obs/services
%verify (not user group) %dir %{_sysconfdir}/obs/services/tar_scm.d
%config(noreplace) %{_sysconfdir}/obs/services/*
%ghost %dir %{_sysconfdir}/obs/services/tar_scm.d/python_keyring
%files -n obs-service-tar
%defattr(-,root,root)
%{_prefix}/lib/obs/service/tar
%{_prefix}/lib/obs/service/tar.service
%files -n obs-service-obs_scm
%defattr(-,root,root)
%{_prefix}/lib/obs/service/obs_scm
%{_prefix}/lib/obs/service/obs_scm.service
%files -n obs-service-appimage
%defattr(-,root,root)
%{_prefix}/lib/obs/service/appimage*
%files -n obs-service-snapcraft
%defattr(-,root,root)
%{_prefix}/lib/obs/service/snapcraft*
%if 0%{?enable_gbp}
%files -n obs-service-gbp
%defattr(-,root,root)
%{_prefix}/lib/obs/service/obs_gbp*
%endif
%endif
%changelog