Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package obs-scm-bridge for openSUSE:Factory 
checked in at 2023-01-27 10:16:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-scm-bridge (Old)
 and      /work/SRC/openSUSE:Factory/.obs-scm-bridge.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-scm-bridge"

Fri Jan 27 10:16:16 2023 rev:4 rq:1061230 version:0.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-scm-bridge/obs-scm-bridge.changes    
2022-11-16 15:43:11.567794636 +0100
+++ /work/SRC/openSUSE:Factory/.obs-scm-bridge.new.32243/obs-scm-bridge.changes 
2023-01-27 10:17:20.815927439 +0100
@@ -1,0 +2,11 @@
+Thu Jan 26 14:52:54 UTC 2023 - Adrian Schröter <adr...@suse.de>
+
+- update to 0.3.0
+  * optimize cloning when combining subdir parameter
+  * solve release number handling when using multiple spec files
+  * Require git-lfs to be always present and allow to opt out of lfs fetching
+  * support local symlinks to git submodules
+  * support recursive submodule cloning
+  * Fix the scmsync entry for relative submodule urls
+
+-------------------------------------------------------------------

Old:
----
  obs-scm-bridge-0.2.1.obscpio

New:
----
  obs-scm-bridge-0.3.0.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ obs-scm-bridge.spec ++++++
--- /var/tmp/diff_new_pack.bOWeGG/_old  2023-01-27 10:17:21.191928954 +0100
+++ /var/tmp/diff_new_pack.bOWeGG/_new  2023-01-27 10:17:21.199928986 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package obs-scm-bridge
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 %endif
 
 Name:           obs-scm-bridge
-Version:        0.2.1
+Version:        0.3.0
 Release:        0
 Summary:        A help service to work with git repositories in OBS
 License:        GPL-2.0-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.bOWeGG/_old  2023-01-27 10:17:21.239929147 +0100
+++ /var/tmp/diff_new_pack.bOWeGG/_new  2023-01-27 10:17:21.243929163 +0100
@@ -2,8 +2,8 @@
   <service name="obs_scm" mode="manual">
     <param name="url">https://github.com/openSUSE/obs-scm-bridge</param>
     <param name="scm">git</param>
-    <param name="revision">0.2.1</param>
-    <param name="version">0.2.1</param>
+    <param name="revision">0.3.0</param>
+    <param name="version">0.3.0</param>
   </service>
   <service mode="manual" name="set_version" />
 

++++++ obs-scm-bridge-0.2.1.obscpio -> obs-scm-bridge-0.3.0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/.github/workflows/ci.yml 
new/obs-scm-bridge-0.3.0/.github/workflows/ci.yml
--- old/obs-scm-bridge-0.2.1/.github/workflows/ci.yml   1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-scm-bridge-0.3.0/.github/workflows/ci.yml   2023-01-26 
15:03:17.000000000 +0100
@@ -0,0 +1,25 @@
+---
+name: CI
+
+on:
+  push:
+    branches:
+      - "main"
+  pull_request:
+
+jobs:
+  integration:
+    name: Run the integration tests
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4.3.0
+      - uses: Gr1N/setup-poetry@v7
+      - uses: actions/cache@v3
+        with:
+          path: ~/.tox
+          key: tox-${{ hashFiles('poetry.lock') }}
+
+      - run: poetry install
+      - run: poetry run pytest -vv -- -n auto
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/LICENSE 
new/obs-scm-bridge-0.3.0/LICENSE
--- old/obs-scm-bridge-0.2.1/LICENSE    1970-01-01 01:00:00.000000000 +0100
+++ new/obs-scm-bridge-0.3.0/LICENSE    2023-01-26 15:03:17.000000000 +0100
@@ -0,0 +1,134 @@
+
+GNU GENERAL PUBLIC LICENSE
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.  
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share 
and change it. By contrast, the GNU General Public License is intended to 
guarantee your freedom to share and change free software--to make sure the 
software is free for all its users. This General Public License applies to most 
of the Free Software Foundation's software and to any other program whose 
authors commit to using it. (Some other Free Software Foundation software is 
covered by the GNU Lesser General Public License instead.) You can apply it to 
your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our 
General Public Licenses are designed to make sure that you have the freedom to 
distribute copies of free software (and charge for this service if you wish), 
that you receive source code or can get it if you want it, that you can change 
the software or use pieces of it in new free programs; and that you know you 
can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to 
deny you these rights or to ask you to surrender the rights. These restrictions 
translate to certain responsibilities for you if you distribute copies of the 
software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for 
a fee, you must give the recipients all the rights that you have. You must make 
sure that they, too, receive or can get the source code. And you must show them 
these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) 
offer you this license which gives you legal permission to copy, distribute 
and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that 
everyone understands that there is no warranty for this free software. If the 
software is modified by someone else and passed on, we want its recipients to 
know that what they have is not the original, so that any problems introduced 
by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We 
wish to avoid the danger that redistributors of a free program will 
individually obtain patent licenses, in effect making the program proprietary. 
To prevent this, we have made it clear that any patent must be licensed for 
everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification 
follow.
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice 
placed by the copyright holder saying it may be distributed under the terms of 
this General Public License. The "Program", below, refers to any such program 
or work, and a "work based on the Program" means either the Program or any 
derivative work under copyright law: that is to say, a work containing the 
Program or a portion of it, either verbatim or with modifications and/or 
translated into another language. (Hereinafter, translation is included without 
limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered 
by this License; they are outside its scope. The act of running the Program is 
not restricted, and the output from the Program is covered only if its contents 
constitute a work based on the Program (independent of having been made by 
running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as 
you receive it, in any medium, provided that you conspicuously and 
appropriately publish on each copy an appropriate copyright notice and 
disclaimer of warranty; keep intact all the notices that refer to this License 
and to the absence of any warranty; and give any other recipients of the 
Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may 
at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, 
thus forming a work based on the Program, and copy and distribute such 
modifications or work under the terms of Section 1 above, provided that you 
also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices stating 
that you changed the files and the date of any change. 
+    b) You must cause any work that you distribute or publish, that in whole 
or in part contains or is derived from the Program or any part thereof, to be 
licensed as a whole at no charge to all third parties under the terms of this 
License. 
+    c) If the modified program normally reads commands interactively when run, 
you must cause it, when started running for such interactive use in the most 
ordinary way, to print or display an announcement including an appropriate 
copyright notice and a notice that there is no warranty (or else, saying that 
you provide a warranty) and that users may redistribute the program under these 
conditions, and telling the user how to view a copy of this License. 
(Exception: if the Program itself is interactive but does not normally print 
such an announcement, your work based on the Program is not required to print 
an announcement.) 
+
+These requirements apply to the modified work as a whole. If identifiable 
sections of that work are not derived from the Program, and can be reasonably 
considered independent and separate works in themselves, then this License, and 
its terms, do not apply to those sections when you distribute them as separate 
works. But when you distribute the same sections as part of a whole which is a 
work based on the Program, the distribution of the whole must be on the terms 
of this License, whose permissions for other licensees extend to the entire 
whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your 
rights to work written entirely by you; rather, the intent is to exercise the 
right to control the distribution of derivative or collective works based on 
the Program.
+
+In addition, mere aggregation of another work not based on the Program with 
the Program (or with a work based on the Program) on a volume of a storage or 
distribution medium does not bring the other work under the scope of this 
License.
+
+3. You may copy and distribute the Program (or a work based on it, under 
Section 2) in object code or executable form under the terms of Sections 1 and 
2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable source 
code, which must be distributed under the terms of Sections 1 and 2 above on a 
medium customarily used for software interchange; or, 
+    b) Accompany it with a written offer, valid for at least three years, to 
give any third party, for a charge no more than your cost of physically 
performing source distribution, a complete machine-readable copy of the 
corresponding source code, to be distributed under the terms of Sections 1 and 
2 above on a medium customarily used for software interchange; or, 
+    c) Accompany it with the information you received as to the offer to 
distribute corresponding source code. (This alternative is allowed only for 
noncommercial distribution and only if you received the program in object code 
or executable form with such an offer, in accord with Subsection b above.) 
+
+The source code for a work means the preferred form of the work for making 
modifications to it. For an executable work, complete source code means all the 
source code for all modules it contains, plus any associated interface 
definition files, plus the scripts used to control compilation and installation 
of the executable. However, as a special exception, the source code distributed 
need not include anything that is normally distributed (in either source or 
binary form) with the major components (compiler, kernel, and so on) of the 
operating system on which the executable runs, unless that component itself 
accompanies the executable.
+
+If distribution of executable or object code is made by offering access to 
copy from a designated place, then offering equivalent access to copy the 
source code from the same place counts as distribution of the source code, even 
though third parties are not compelled to copy the source along with the object 
code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as 
expressly provided under this License. Any attempt otherwise to copy, modify, 
sublicense or distribute the Program is void, and will automatically terminate 
your rights under this License. However, parties who have received copies, or 
rights, from you under this License will not have their licenses terminated so 
long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it. 
However, nothing else grants you permission to modify or distribute the Program 
or its derivative works. These actions are prohibited by law if you do not 
accept this License. Therefore, by modifying or distributing the Program (or 
any work based on the Program), you indicate your acceptance of this License to 
do so, and all its terms and conditions for copying, distributing or modifying 
the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program), 
the recipient automatically receives a license from the original licensor to 
copy, distribute or modify the Program subject to these terms and conditions. 
You may not impose any further restrictions on the recipients' exercise of the 
rights granted herein. You are not responsible for enforcing compliance by 
third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent 
infringement or for any other reason (not limited to patent issues), conditions 
are imposed on you (whether by court order, agreement or otherwise) that 
contradict the conditions of this License, they do not excuse you from the 
conditions of this License. If you cannot distribute so as to satisfy 
simultaneously your obligations under this License and any other pertinent 
obligations, then as a consequence you may not distribute the Program at all. 
For example, if a patent license would not permit royalty-free redistribution 
of the Program by all those who receive copies directly or indirectly through 
you, then the only way you could satisfy both it and this License would be to 
refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any 
particular circumstance, the balance of the section is intended to apply and 
the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or 
other property right claims or to contest validity of any such claims; this 
section has the sole purpose of protecting the integrity of the free software 
distribution system, which is implemented by public license practices. Many 
people have made generous contributions to the wide range of software 
distributed through that system in reliance on consistent application of that 
system; it is up to the author/donor to decide if he or she is willing to 
distribute software through any other system and a licensee cannot impose that 
choice.
+
+This section is intended to make thoroughly clear what is believed to be a 
consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain 
countries either by patents or by copyrighted interfaces, the original 
copyright holder who places the Program under this License may add an explicit 
geographical distribution limitation excluding those countries, so that 
distribution is permitted only in or among countries not thus excluded. In such 
case, this License incorporates the limitation as if written in the body of 
this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the 
General Public License from time to time. Such new versions will be similar in 
spirit to the present version, but may differ in detail to address new problems 
or concerns.
+
+Each version is given a distinguishing version number. If the Program 
specifies a version number of this License which applies to it and "any later 
version", you have the option of following the terms and conditions either of 
that version or of any later version published by the Free Software Foundation. 
If the Program does not specify a version number of this License, you may 
choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs 
whose distribution conditions are different, write to the author to ask for 
permission. For software which is copyrighted by the Free Software Foundation, 
write to the Free Software Foundation; we sometimes make exceptions for this. 
Our decision will be guided by the two goals of preserving the free status of 
all derivatives of our free software and of promoting the sharing and reuse of 
software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR 
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE 
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE 
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND 
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU 
ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL 
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE 
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR 
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA 
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER 
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+END OF TERMS AND CONDITIONS
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible 
use to the public, the best way to achieve this is to make it free software 
which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach 
them to the start of each source file to most effectively convey the exclusion 
of warranty; and each file should have at least the "copyright" line and a 
pointer to where the full notice is found.
+
+one line to give the program's name and an idea of what it does.
+Copyright (C) yyyy  name of author
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it 
starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+type `show w'.  This is free software, and you are welcome
+to redistribute it under certain conditions; type `show c' 
+for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate 
parts of the General Public License. Of course, the commands you use may be 
called something other than `show w' and `show c'; they could even be 
mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your 
school, if any, to sign a "copyright disclaimer" for the program, if necessary. 
Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright
+interest in the program `Gnomovision'
+(which makes passes at compilers) written 
+by James Hacker.
+
+signature of Ty Coon, 1 April 1989
+Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into 
proprietary programs. If your program is a subroutine library, you may consider 
it more useful to permit linking proprietary applications with the library. If 
this is what you want to do, use the GNU Lesser General Public License instead 
of this License.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/README.md 
new/obs-scm-bridge-0.3.0/README.md
--- old/obs-scm-bridge-0.2.1/README.md  2022-11-08 13:41:25.000000000 +0100
+++ new/obs-scm-bridge-0.3.0/README.md  2023-01-26 15:03:17.000000000 +0100
@@ -2,8 +2,8 @@
 Native OBS SCM bridge helper
 ============================
 
-Native OBS scm support for the build recipies and additional files. This is 
bridging an external authorative
-scm repository into OBS. Any source change or merge workflow must be provided 
via the scm repository 
+Native OBS scm support for the build recipies and additional files. This is 
bridging an external authoritative
+scm repository into OBS. Any source change or merge workflow must be provided 
via the scm repository
 hoster in this scenario.
 
 Only git is supported atm, but this can be extended later to further systems.
@@ -15,6 +15,10 @@
 
 These assets will be downloaded by osc and OBS. The verification via sha256 
sum is optional.
 
+Alternatively, put large binary files into
+[git-lfs](https://git-lfs.github.com/). This service will automatically 
download
+git-lfs assets.
+
 HOWTO manage a single package
 =============================
 
@@ -43,7 +47,7 @@
 A git repository can also get defined for entire project. This can be done
 via the scmsync element in project meta.
 
-Any top level subdirectory will be handled as package container. 
+Any top level subdirectory will be handled as package container.
 
 It is recomended to use git submodules for each package if it is a larger
 project. This allows partial cloning of the specific package.
@@ -54,7 +58,7 @@
 Special directives can be given via cgi parameters to the bridge. Extend
 your url with
 
- * lfs=1 CGI parameter to include LFS resources
+ * `lfs=0` to skip downloading LFS assets
 
  * arch=<ARCH> CGI parameter to specify arch specific assets downloads
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/obs-scm-bridge.spec 
new/obs-scm-bridge-0.3.0/obs-scm-bridge.spec
--- old/obs-scm-bridge-0.2.1/obs-scm-bridge.spec        2022-11-08 
13:41:25.000000000 +0100
+++ new/obs-scm-bridge-0.3.0/obs-scm-bridge.spec        2023-01-26 
15:03:17.000000000 +0100
@@ -1,7 +1,7 @@
 #
-# spec file
+# spec file for package obs-scm-bridge
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,23 +15,33 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %if 0%{?fedora} || 0%{?rhel}
 %define build_pkg_name obs-build
 %else
 %define build_pkg_name build
 %endif
-
 Name:           obs-scm-bridge
 Version:        0.0.1
 Release:        0
 Summary:        A help service to work with git repositories in OBS
 License:        GPL-2.0-or-later
-URL:            https://github.com/openSUSE/obs-scm-bridge
+URL:            https://github.com/openSUSE/%{name}
 Source0:        %{name}-%{version}.tar.xz
 Requires:       %{build_pkg_name} >= 20211125
-BuildArch:      noarch
+Requires:       git
+Requires:       git-lfs
+# these are just recommends in build package, but we need it here
+Requires:       perl(Date::Parse)
+Requires:       perl(LWP::UserAgent)
+Requires:       perl(Net::SSL)
+Requires:       perl(Pod::Usage)
+Requires:       perl(Time::Zone)
+Requires:       perl(URI)
+Requires:       perl(XML::Parser)
+Requires:       perl(YAML::LibYAML)
 Recommends:     python3-packaging
-
+BuildArch:      noarch
 
 %description
 
@@ -41,7 +51,7 @@
 %build
 
 %install
-make DESTDIR=%{buildroot} install
+%make_install
 
 %files
 %{_prefix}/lib/obs/service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/obs_scm_bridge 
new/obs-scm-bridge-0.3.0/obs_scm_bridge
--- old/obs-scm-bridge-0.2.1/obs_scm_bridge     2022-11-08 13:41:25.000000000 
+0100
+++ new/obs-scm-bridge-0.3.0/obs_scm_bridge     2023-01-26 15:03:17.000000000 
+0100
@@ -20,10 +20,12 @@
 import subprocess
 import tempfile
 from html import escape
+from typing import TYPE_CHECKING, Dict, List, Optional, Set, TextIO, Tuple, 
Union, overload
+if TYPE_CHECKING:
+    from typing import Literal
 import urllib.parse
 import configparser
 
-outdir = None
 download_assets = '/usr/lib/build/download_assets'
 export_debian_orig_from_git = '/usr/lib/build/export_debian_orig_from_git'
 pack_directories = False
@@ -41,16 +43,24 @@
 os.environ['LANG'] = "C"
 
 class ObsGit(object):
-    def __init__(self, outdir, url):
+
+    _REGEXP = re.compile(r"^[a-zA-Z0-9\.\-\_\+]*$");
+
+    def __init__(self, outdir: str, url: str) -> None:
         self.outdir   = outdir
         self.revision = None
         self.subdir   = None
-        self.lfs = False
         self.keep_meta = False
         self.enforced_deep_clone = False
         self.arch = []
         self.url = list(urllib.parse.urlparse(url))
-        query = urllib.parse.parse_qs(self.url[4]);
+        self.no_lfs = False
+        # for project level mode
+        self.export_files = set(["_config"])
+        self.gitsubmodules: Set[str] = set()
+        self.revisions: Optional[Dict[str, str]] = None
+
+        query = urllib.parse.parse_qs(self.url[4])
         if "subdir" in query:
             self.subdir = query['subdir'][0]
             del query['subdir']
@@ -59,20 +69,72 @@
             self.arch = query['arch']
             del query['arch']
             self.url[4] = urllib.parse.urlencode(query)
-        if "lfs" in query:
-            self.lfs = True
-            del query['lfs']
-            self.url[4] = urllib.parse.urlencode(query)
         if "keepmeta" in query:
             self.enforced_deep_clone = True
             self.keep_meta = True
             del query['keepmeta']
             self.url[4] = urllib.parse.urlencode(query)
+        if "lfs" in query:
+            self.no_lfs = query["lfs"] == ["0"]
+            del query["lfs"]
+            self.url[4] = urllib.parse.urlencode(query)
         if self.url[5]:
             self.revision = self.url[5]
             self.url[5] = ''
 
-    def run_cmd(self, cmd, cwd=None, stdout=subprocess.PIPE, fatal=None):
+    @overload
+    def run_cmd(
+            self,
+            cmd: List[str],
+            *,
+            fatal: str,
+            cwd: Optional[str]=None,
+            stdout: int=subprocess.PIPE,
+            env: Optional[Dict[str, str]]=None,
+    ) -> Tuple["Literal[0]", str]: ...
+
+    @overload
+    def run_cmd(
+            self,
+            cmd: List[str],
+            *,
+            fatal: str,
+            cwd: Optional[str]=None,
+            stdout: TextIO,
+            env: Optional[Dict[str, str]]=None,
+    ) -> Tuple["Literal[0]", None]: ...
+
+    @overload
+    def run_cmd(
+            self,
+            cmd: List[str],
+            *,
+            fatal: Optional[str]=None,
+            cwd: Optional[str]=None,
+            stdout: int=subprocess.PIPE,
+            env: Optional[Dict[str, str]]=None,
+    ) -> Tuple[int, str]: ...
+
+    @overload
+    def run_cmd(
+            self,
+            cmd: List[str],
+            *,
+            fatal: Optional[str]=None,
+            cwd: Optional[str]=None,
+            stdout: TextIO,
+            env: Optional[Dict[str, str]]=None,
+    ) -> Tuple[int, None]: ...
+
+    def run_cmd(
+            self,
+            cmd: List[str],
+            *,
+            fatal: Optional[str]=None,
+            cwd: Optional[str]=None,
+            stdout: Union[int, TextIO]=subprocess.PIPE,
+            env: Optional[Dict[str, str]]=None,
+    ) -> Tuple[int, Optional[str]]:
         logging.debug("COMMAND: %s" % cmd)
         stderr = subprocess.PIPE
         if stdout == subprocess.PIPE:
@@ -81,21 +143,19 @@
                                 shell=False,
                                 stdout=stdout,
                                 stderr=stderr,
-                                cwd=cwd)
-        output = proc.communicate()[0]
-        if isinstance(output, bytes):
-            output = output.decode('UTF-8')
+                                cwd=cwd,
+                                env=env)
+        std_out = proc.communicate()[0]
+        output = std_out.decode() if std_out else None
+
         logging.debug("RESULT(%d): %s", proc.returncode, repr(output))
         if fatal and proc.returncode != 0:
             print("ERROR: " + fatal + " failed: ", output)
             sys.exit(proc.returncode)
         return (proc.returncode, output)
 
-    def do_lfs(self, outdir):
-        cmd = [ 'git', '-C', outdir, 'lfs', 'fetch' ]
-        self.run_cmd(cmd, fatal="git lfs fetch")
-
-    def do_clone_commit(self, outdir):
+    def do_clone_commit(self, outdir: str, include_submodules: bool=False) -> 
None:
+        assert self.revision, "no revision is set but do_clone_commit was 
called"
         cmd = [ 'git', 'init', outdir ]
         self.run_cmd(cmd, fatal="git init")
         cmd = [ 'git', '-C', outdir, 'remote', 'add', 'origin', 
urllib.parse.urlunparse(self.url) ]
@@ -103,33 +163,45 @@
         cmd = [ 'git', '-C', outdir, 'fetch', 'origin', self.revision ]
         if shallow_clone:
             cmd += [ '--depth', '1' ]
-        print(cmd)
+        if include_submodules:
+            if self.subdir:
+               cmd += [ "--recurse-submodules=" + self.subdir ]
+            else:
+               cmd += [ '--recurse-submodules' ]
         self.run_cmd(cmd, fatal="git fetch")
         cmd = [ 'git', '-C', outdir, 'checkout', '-q', self.revision ]
-        self.run_cmd(cmd, fatal="git checkout")
+        env = {"GIT_LFS_SKIP_SMUDGE": "1", **os.environ} if self.no_lfs else 
None
+        self.run_cmd(cmd, fatal="git checkout", env=env)
+        if include_submodules:
+            cmd = [ 'git', '-C', outdir, 'submodule', 'init' ]
+            self.run_cmd(cmd, fatal="git submodule init")
+            cmd = [ 'git', '-C', outdir, 'submodule', 'update' ]
+            self.run_cmd(cmd, fatal="git submodule update")
 
-    def do_clone(self, outdir, shallow):
+    def do_clone(self, outdir: str, shallow: bool, include_submodules: 
bool=False) -> None:
         if self.revision and re.match(r"^[0-9a-fA-F]{40,}$", self.revision):
-            self.do_clone_commit(outdir)
-            if self.lfs:
-                self.do_lfs(outdir)
+            self.do_clone_commit(outdir, include_submodules)
             return
         cmd = [ 'git', 'clone', urllib.parse.urlunparse(self.url), outdir ]
+        if include_submodules:
+            if self.subdir:
+               cmd += [ "--recurse-submodules=" + self.subdir ]
+            else:
+               cmd += [ '--recurse-submodules' ]
         if shallow:
             cmd += [ '--depth', '1' ]
         if self.revision:
             cmd.insert(2, '-b')
             cmd.insert(3, self.revision)
-        self.run_cmd(cmd, fatal="git clone")
-        if self.lfs:
-            self.do_lfs(outdir)
+        env = {"GIT_LFS_SKIP_SMUDGE": "1", **os.environ} if self.no_lfs else 
None
+        self.run_cmd(cmd, fatal="git clone", env=env)
 
-    def clone(self, shallow_clone):
+    def clone(self, shallow_clone: bool, include_submodules: bool=False) -> 
None:
         if not self.subdir:
-            self.do_clone(self.outdir, (shallow_clone and not 
self.enforced_deep_clone))
+            self.do_clone(self.outdir, (shallow_clone and not 
self.enforced_deep_clone), include_submodules)
             return
         clonedir = tempfile.mkdtemp(prefix="obs-scm-bridge")
-        self.do_clone(clonedir, (shallow_clone and not 
self.enforced_deep_clone))
+        self.do_clone(clonedir, (shallow_clone and not 
self.enforced_deep_clone), include_submodules)
         fromdir = os.path.join(clonedir, self.subdir)
         if not 
os.path.realpath(fromdir+'/').startswith(os.path.realpath(clonedir+'/')):
             print("ERROR: subdir is not below clone directory")
@@ -143,19 +215,19 @@
             shutil.move(os.path.join(fromdir, name), self.outdir)
         shutil.rmtree(clonedir)
 
-    def fetch_tags(self):
+    def fetch_tags(self) -> None:
         cmd = [ 'git', '-C', self.outdir, 'fetch', '--tags', 'origin', 
'+refs/heads/*:refs/remotes/origin/*' ]
         logging.info("fetching all tags")
         self.run_cmd(cmd, fatal="fetch --tags")
 
-    def cpio_directory(self, directory):
+    def cpio_directory(self, directory: str) -> None:
         logging.info("create archivefile for %s", directory)
         cmd = [ download_assets, '--create-cpio', '--', directory ]
         archivefile = open(directory + '.obscpio', 'w')
         self.run_cmd(cmd, stdout=archivefile, fatal="cpio creation")
         archivefile.close()
 
-    def cpio_specials(self, specials):
+    def cpio_specials(self, specials: List[str]) -> None:
         if not specials:
             return
         logging.info("create archivefile for specials")
@@ -164,16 +236,14 @@
         self.run_cmd(cmd, stdout=archivefile, fatal="cpio creation")
         archivefile.close()
 
-    def cpio_directories(self):
+    def cpio_directories(self) -> None:
         logging.debug("walk via %s", self.outdir)
         os.chdir(self.outdir)
         listing = sorted(os.listdir("."))
         specials = []
         for name in listing:
             if name == '.git' and not self.keep_meta:
-                print("remove META")
                 # we do not store git meta data by default to avoid bloat 
storage
-                shutil.rmtree(name)
                 continue
             if name[0:1] == '.':
                 specials.append(name)
@@ -193,7 +263,7 @@
                 else:
                     os.unlink(name)
 
-    def get_assets(self):
+    def get_assets(self) -> None:
         logging.info("downloading assets")
         cmd = [ download_assets ]
         for arch in self.arch:
@@ -204,11 +274,10 @@
             cmd += [ '--unpack', '--noassetdir', '--', self.outdir ]
         self.run_cmd(cmd, fatal="asset download")
 
-    def copyfile(self, src, dst):
-        cmd = [ 'cp', '-af', self.outdir + "/" + src, self.outdir + "/" + dst ]
-        self.run_cmd(cmd, fatal="file copy")
+    def copyfile(self, src: str, dst: str) -> None:
+        shutil.copy2(os.path.join(self.outdir, src), os.path.join(self.outdir, 
dst))
 
-    def export_debian_files(self):
+    def export_debian_files(self) -> None:
         if os.path.isfile(self.outdir + "/debian/control") and \
                 not os.path.isfile(self.outdir + "/debian.control"):
             self.copyfile("debian/control", "debian.control")
@@ -216,7 +285,7 @@
                 not os.path.isfile(self.outdir + "/debian.changelog"):
             self.copyfile("debian/changelog", "debian.changelog")
 
-    def get_debian_origtar(self):
+    def get_debian_origtar(self) -> None:
         if os.path.isfile(self.outdir + "/debian/control"):
             # need up get all tags 
             if not self.subdir:
@@ -225,122 +294,162 @@
             logging.info("exporting debian origtar")
             self.run_cmd(cmd, fatal="debian origtar export")
 
-    def get_subdir_info(self, dir):
+    def get_subdir_info(self, dir: str) -> str:
         cmd = [ download_assets, '--show-dir-srcmd5', '--', dir ]
         rcode, info = self.run_cmd(cmd, fatal="download_assets 
--show-dir-srcmd5")
         return info.strip()
 
-    def write_info_file(self, filename, info):
-        infofile = open(filename, 'w')
-        infofile.write(info + '\n')
-        infofile.close()
+    def write_info_file(self, filename: str, info: str) -> None:
+        with open(filename, 'w') as infofile:
+            infofile.write(info + '\n')
 
-    def add_service_info(self):
+    def add_service_info(self) -> None:
         info = None
         if self.subdir:
             info = self.get_subdir_info(self.outdir)
         else:
-            cmd = [ 'git', '-C', outdir, 'show', '-s', '--pretty=format:%H', 
'HEAD' ]
+            cmd = [ 'git', '-C', self.outdir, 'show', '-s', 
'--pretty=format:%H', 'HEAD' ]
             rcode, info = self.run_cmd(cmd, fatal="git show -s HEAD")
             info = info.strip()
         if info:
             self.write_info_file(os.path.join(self.outdir, "_service_info"), 
info)
 
-    def write_package_xml_file(self, name, url):
-        xmlfile = open(name + '.xml', 'w')
-        xmlfile.write('<package name="' + escape(name) + '">\n')
-        xmlfile.write('  <scmsync>' + escape(url) + '</scmsync>\n')
-        xmlfile.write('</package>\n')
-        xmlfile.close()
+    def write_package_xml_file(self, name: str, url: str) -> None:
+        with open(f"{name}.xml", 'w') as xmlfile:
+            xmlfile.write(f"""<package name="{escape(name)}">
+  <bcntsynctag>{escape(name)}</bcntsynctag>
+  <scmsync>{escape(url)}</scmsync>
+</package>""")
+
+    def write_package_xml_local_link(self, target: str, name: str) -> None:
+        with open(f"{name}.xml", 'w') as xmlfile:
+            xmlfile.write(f"""<package name="{escape(name)}">
+  <bcntsynctag>{escape(target)}</bcntsynctag>
+</package>""")
+        self.export_files.add(name + ".xml")
+        with open(f"{name}.link", 'w') as linkfile:
+            linkfile.write(f"""<link package="{escape(target)}" cicount="copy" 
/>""")
+        self.export_files.add(name + ".link")
 
-    def list_submodule_revisions(self):
-        revisions = {}
+    def list_submodule_revisions(self) -> None:
+        self.revisions = {}
         cmd = [ 'git', 'ls-tree', 'HEAD', '.' ]
         rcode, output = self.run_cmd(cmd, fatal="git ls-tree")
         for line in output.splitlines():
             lstree = line.split(maxsplit=4)
             if lstree[1] == 'commit' and len(lstree[2]) >= 40:
-                revisions[lstree[3]] = lstree[2]
-        return revisions
-           
-    def generate_package_xml_files(self):
+                self.revisions[lstree[3]] = lstree[2]
+
+    def process_package_submodule(self, gsmsection: configparser.SectionProxy, 
package_name: Optional[str]=None) -> None:
+        path = gsmsection['path']
+        url = gsmsection['url']
+        if not package_name:
+            package_name = path
+
+        if '/' in path:
+            # we handle only top level submodules in project mode
+            return
+
+        # find revision of submodule
+        if not self.revisions:
+            self.list_submodule_revisions()
+        assert self.revisions, "self.revisions must not be None after calling 
self.list_submodule_revisions"
+        revision = self.revisions.get(path, None)
+        if not revision:
+            logging.error("Could not determine revision of submodule for " + 
path)
+            sys.exit(1)
+
+        # all good, write xml file and register the module
+        self.gitsubmodules.add(path)
+        url = list(urllib.parse.urlparse(url))
+        url[5] = revision
+        if self.arch:
+            query = urllib.parse.parse_qs(url[4]);
+            query['arch'] = self.arch
+            url[4] = urllib.parse.urlencode(query)
+
+        # handle relative urls in submodules
+        unparsed_url = urllib.parse.urlunparse(url)
+        if ".." == unparsed_url[0:2]:
+            # need to append a '/' to the base url so that the relative
+            # path is properly resolved, otherwise we might descend one
+            # directory too far
+            unparsed_url = 
urllib.parse.urljoin(urllib.parse.urlunparse(self.url) +"/", unparsed_url)
+
+        self.write_package_xml_file(package_name, unparsed_url)
+        self.write_info_file(package_name + ".info", revision)
+        self.export_files.add(package_name + ".xml")
+        self.export_files.add(package_name + ".info")
+
+    def process_package_subdirectory(self, directory: str) -> None:
+        info = self.get_subdir_info(directory)
+        shutil.rmtree(directory)
+        if not self._REGEXP.match(directory):
+            logging.warn("directory name contains invalid char: %s", directory)
+            return
+
+        # add subdir info file
+        self.write_info_file(directory + ".info", info)
+
+        # add subdir parameter to url
+        url = self.url
+        query = urllib.parse.parse_qs(url[4])
+        query['subdir'] = directory
+        url[4] = urllib.parse.urlencode(query)
+        if self.revision:
+            self.url[5] = self.revision
+
+        self.write_package_xml_file(directory, urllib.parse.urlunparse(url))
+
+    def generate_package_xml_files(self) -> None:
         logging.debug("walk via %s", self.outdir)
         os.chdir(self.outdir)
-        export_files = set(["_config"])
 
         # find all top level git submodules
-        gitsubmodules = set()
+        gsmconfig = None
         if os.path.isfile('.gitmodules'):
             gsmconfig = configparser.ConfigParser()
             gsmconfig.read('.gitmodules')
-            revisions = None
             for section in gsmconfig.sections():
                 if not 'path' in gsmconfig[section]:
                     logging.warn("path not defined for git submodule " + 
section)
-                    continue
+                    return
                 if not 'url' in gsmconfig[section]:
                     logging.warn("url not defined for git submodule " + 
section)
-                    continue
-                path = gsmconfig[section]['path']
-                url = gsmconfig[section]['url']
+                    return
+                self.process_package_submodule(gsmconfig[section])
 
-                if '/' in path:
-                    # we handle only top level submodules in project mode
+        # handle plain files and directories
+        listing = sorted(os.listdir("."))
+        for name in listing:
+            if os.path.islink(name):
+                target = os.readlink(name) # this is no recursive lookup, but 
is there a usecase?
+                if '/' in target:
+                    logging.warn("only local links are supported, skipping: " 
+ name)
                     continue
-
-                # find revision of submodule
-                if revisions is None:
-                    revisions = self.list_submodule_revisions()
-                revision = revisions.get(path, None)
-                if not revision:
-                    logging.error("Could not determine revision of submodule " 
+ section)
-                    sys.exit(1)
-
-                # all good, write xml file and register the module
-                gitsubmodules.add(path)
-                url = list(urllib.parse.urlparse(url))
-                url[5] = revision
-                if self.arch:
-                    query = urllib.parse.parse_qs(url[4]);
-                    query['arch'] = self.arch
-                    url[4] = urllib.parse.urlencode(query)
-                self.write_package_xml_file(path, urllib.parse.urlunparse(url))
-                self.write_info_file(path + ".info", revision)
-                export_files.add(path + ".xml")
-                export_files.add(path + ".info")
-                shutil.rmtree(path)
+                if target in self.gitsubmodules or os.path.isdir(target):
+                    self.write_package_xml_local_link(target, name)
+                    os.unlink(name)
+                else:
+                    logging.debug("skipping symlink to a non git submodule %s 
-> %s", name, target)
+                    os.unlink(name)
 
         # handle plain files and directories
         listing = sorted(os.listdir("."))
-        regexp =  re.compile(r"^[a-zA-Z0-9\.\-\_\+]*$");
         for name in listing:
             if name == '.git' and not self.keep_meta:
                 shutil.rmtree(name)
                 continue
-            if os.path.isdir(name):
-                if name in gitsubmodules:
+            if os.path.islink(name):
+                continue
+            elif os.path.isdir(name):
+                if name in self.gitsubmodules:
                     # already handled as git submodule
+                    shutil.rmtree(name)
                     continue
-                info = self.get_subdir_info(name)
-                shutil.rmtree(name)
-                if not regexp.match(name):
-                    logging.warn("directory name contains invalid char: " + 
name)
-                    continue
-
-                # add subdir info file
-                self.write_info_file(name + ".info", info)
-
-                # add subdir parameter to url
-                url = self.url
-                query = urllib.parse.parse_qs(url[4])
-                query['subdir'] = name
-                url[4] = urllib.parse.urlencode(query)
-                if self.revision:
-                    self.url[5] = self.revision
-
-                self.write_package_xml_file(name, urllib.parse.urlunparse(url))
+                self.process_package_subdirectory(name)
             else:
-                if not name in export_files:
+                if not name in self.export_files:
                     os.unlink(name)
 
 if __name__ == '__main__':
@@ -349,38 +458,37 @@
         description='Open Build Service source service for managing packaging 
files in git.'
         'This is a special service for OBS git integration.')
     parser.add_argument('--outdir', required=True,
-                        help='output directory for modified sources')
+                        help='output directory for modified sources',
+                        nargs=1,
+                        type=str)
     parser.add_argument('--url',
-                        help='REQUIRED: url to git repository')
+                        help='REQUIRED: url to git repository',
+                        required=True,
+                        nargs=1,
+                        type=str)
     parser.add_argument('--projectmode',
                         help='just return the package list based on the 
subdirectories')
     parser.add_argument('--debug',
                         help='verbose debug mode')
     args = vars(parser.parse_args())
 
-    url = args['url']
-    outdir = args['outdir']
+    url = args['url'][0]
+    outdir = args['outdir'][0]
     project_mode = args['projectmode']
 
-    if not outdir:
-        print("no outdir specified")
-        sys.exit(-1)
-
-    if not url:
-        print("no url specified")
-        sys.exit(-1)
-
     if args['debug']:
         logging.getLogger().setLevel(logging.DEBUG)
         logging.debug("Running in debug mode")
 
     # workflow
     obsgit = ObsGit(outdir, url)
-    obsgit.clone(shallow_clone)
     if project_mode == 'true' or project_mode == '1':
+        obsgit.clone(shallow_clone)
         obsgit.generate_package_xml_files()
         sys.exit(0)
 
+    obsgit.clone(shallow_clone, include_submodules=True)
+
     if pack_directories:
         obsgit.add_service_info()
     if get_assets:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/poetry.lock 
new/obs-scm-bridge-0.3.0/poetry.lock
--- old/obs-scm-bridge-0.2.1/poetry.lock        1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-scm-bridge-0.3.0/poetry.lock        2023-01-26 15:03:17.000000000 
+0100
@@ -0,0 +1,310 @@
+[[package]]
+name = "atomicwrites"
+version = "1.4.1"
+description = "Atomic file writes."
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
+[[package]]
+name = "attrs"
+version = "22.1.0"
+description = "Classes Without Boilerplate"
+category = "dev"
+optional = false
+python-versions = ">=3.5"
+
+[package.extras]
+dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy 
(>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", 
"pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
+docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
+tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy 
(>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", 
"zope.interface"]
+tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", 
"mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
+
+[[package]]
+name = "colorama"
+version = "0.4.5"
+description = "Cross-platform colored terminal text."
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+
+[[package]]
+name = "dataclasses"
+version = "0.8"
+description = "A backport of the dataclasses module for Python 3.6"
+category = "dev"
+optional = false
+python-versions = ">=3.6, <3.7"
+
+[[package]]
+name = "execnet"
+version = "1.9.0"
+description = "execnet: rapid multi-Python deployment"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+
+[package.extras]
+testing = ["pre-commit"]
+
+[[package]]
+name = "filelock"
+version = "3.4.1"
+description = "A platform independent file lock."
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.extras]
+docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints 
(>=1.12)"]
+testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", 
"pytest-cov", "pytest-timeout (>=1.4.2)"]
+
+[[package]]
+name = "importlib-metadata"
+version = "4.8.3"
+description = "Read metadata from Python packages"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.dependencies]
+typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
+zipp = ">=0.5"
+
+[package.extras]
+docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"]
+perf = ["ipython"]
+testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", 
"pep517", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", 
"pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", 
"pytest-flake8", "pytest-mypy", "pytest-perf (>=0.9.2)"]
+
+[[package]]
+name = "iniconfig"
+version = "1.1.1"
+description = "iniconfig: brain-dead simple config-ini parsing"
+category = "dev"
+optional = false
+python-versions = "*"
+
+[[package]]
+name = "packaging"
+version = "21.3"
+description = "Core utilities for Python packages"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.dependencies]
+pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
+
+[[package]]
+name = "pluggy"
+version = "1.0.0"
+description = "plugin and hook calling mechanisms for python"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.dependencies]
+importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
+
+[package.extras]
+dev = ["pre-commit", "tox"]
+testing = ["pytest", "pytest-benchmark"]
+
+[[package]]
+name = "py"
+version = "1.11.0"
+description = "library with cross-python path, ini-parsing, io, code, log 
facilities"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+
+[[package]]
+name = "pyparsing"
+version = "3.0.7"
+description = "Python parsing module"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.extras]
+diagrams = ["jinja2", "railroad-diagrams"]
+
+[[package]]
+name = "pytest"
+version = "7.0.1"
+description = "pytest: simple powerful testing with Python"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.dependencies]
+atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
+attrs = ">=19.2.0"
+colorama = {version = "*", markers = "sys_platform == \"win32\""}
+importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
+iniconfig = "*"
+packaging = "*"
+pluggy = ">=0.12,<2.0"
+py = ">=1.8.2"
+tomli = ">=1.0.0"
+
+[package.extras]
+testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments 
(>=2.7.2)", "requests", "xmlschema"]
+
+[[package]]
+name = "pytest-container"
+version = "0.0.2"
+description = "Pytest fixtures for writing container based tests"
+category = "dev"
+optional = false
+python-versions = ">=3.6.2,<4.0"
+
+[package.dependencies]
+dataclasses = {version = ">=0.8", markers = "python_version < \"3.7\""}
+filelock = ">=3.4,<4.0"
+pytest = ">=3.10"
+pytest-testinfra = ">=6.4.0"
+
+[[package]]
+name = "pytest-testinfra"
+version = "6.8.0"
+description = "Test infrastructures"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.dependencies]
+pytest = "!=3.0.2"
+
+[package.extras]
+ansible = ["ansible"]
+paramiko = ["paramiko"]
+salt = ["salt"]
+winrm = ["pywinrm"]
+
+[[package]]
+name = "pytest-xdist"
+version = "3.0.2"
+description = "pytest xdist plugin for distributed testing and loop-on-failing 
modes"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.dependencies]
+execnet = ">=1.1"
+pytest = ">=6.2.0"
+
+[package.extras]
+psutil = ["psutil (>=3.0)"]
+setproctitle = ["setproctitle"]
+testing = ["filelock"]
+
+[[package]]
+name = "tomli"
+version = "1.2.3"
+description = "A lil' TOML parser"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[[package]]
+name = "typing-extensions"
+version = "4.1.1"
+description = "Backported and Experimental Type Hints for Python 3.6+"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[[package]]
+name = "zipp"
+version = "3.6.0"
+description = "Backport of pathlib-compatible object wrapper for zip files"
+category = "dev"
+optional = false
+python-versions = ">=3.6"
+
+[package.extras]
+docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"]
+testing = ["func-timeout", "jaraco.itertools", "pytest (>=4.6)", "pytest-black 
(>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler 
(>=1.0.1)", "pytest-flake8", "pytest-mypy"]
+
+[metadata]
+lock-version = "1.1"
+python-versions = ">=3.6.2,<4.0"
+content-hash = 
"8a967b873bf71c2c18bed2a42d14361884350e95dafb4d854a76933f607bc06d"
+
+[metadata.files]
+atomicwrites = [
+    {file = "atomicwrites-1.4.1.tar.gz", hash = 
"sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"},
+]
+attrs = [
+    {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = 
"sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"},
+    {file = "attrs-22.1.0.tar.gz", hash = 
"sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"},
+]
+colorama = [
+    {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = 
"sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"},
+    {file = "colorama-0.4.5.tar.gz", hash = 
"sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"},
+]
+dataclasses = [
+    {file = "dataclasses-0.8-py3-none-any.whl", hash = 
"sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"},
+    {file = "dataclasses-0.8.tar.gz", hash = 
"sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"},
+]
+execnet = [
+    {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = 
"sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"},
+    {file = "execnet-1.9.0.tar.gz", hash = 
"sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"},
+]
+filelock = [
+    {file = "filelock-3.4.1-py3-none-any.whl", hash = 
"sha256:a4bc51381e01502a30e9f06dd4fa19a1712eab852b6fb0f84fd7cce0793d8ca3"},
+    {file = "filelock-3.4.1.tar.gz", hash = 
"sha256:0f12f552b42b5bf60dba233710bf71337d35494fc8bdd4fd6d9f6d082ad45e06"},
+]
+importlib-metadata = [
+    {file = "importlib_metadata-4.8.3-py3-none-any.whl", hash = 
"sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e"},
+    {file = "importlib_metadata-4.8.3.tar.gz", hash = 
"sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668"},
+]
+iniconfig = [
+    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = 
"sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
+    {file = "iniconfig-1.1.1.tar.gz", hash = 
"sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+]
+packaging = [
+    {file = "packaging-21.3-py3-none-any.whl", hash = 
"sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
+    {file = "packaging-21.3.tar.gz", hash = 
"sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},
+]
+pluggy = [
+    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = 
"sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
+    {file = "pluggy-1.0.0.tar.gz", hash = 
"sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
+]
+py = [
+    {file = "py-1.11.0-py2.py3-none-any.whl", hash = 
"sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
+    {file = "py-1.11.0.tar.gz", hash = 
"sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
+]
+pyparsing = [
+    {file = "pyparsing-3.0.7-py3-none-any.whl", hash = 
"sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"},
+    {file = "pyparsing-3.0.7.tar.gz", hash = 
"sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"},
+]
+pytest = [
+    {file = "pytest-7.0.1-py3-none-any.whl", hash = 
"sha256:9ce3ff477af913ecf6321fe337b93a2c0dcf2a0a1439c43f5452112c1e4280db"},
+    {file = "pytest-7.0.1.tar.gz", hash = 
"sha256:e30905a0c131d3d94b89624a1cc5afec3e0ba2fbdb151867d8e0ebd49850f171"},
+]
+pytest-container = [
+    {file = "pytest_container-0.0.2-py3-none-any.whl", hash = 
"sha256:44d9f86893656c27a2b24871e96a1f8cb4186642702d7b290d12bcb84dbd3ff6"},
+    {file = "pytest_container-0.0.2.tar.gz", hash = 
"sha256:79c5eb57ada8a73ae319f0a57f105d38f751a73a7d358908e714f7678da3d3f9"},
+]
+pytest-testinfra = [
+    {file = "pytest-testinfra-6.8.0.tar.gz", hash = 
"sha256:07c8c2c472aca7d83099ebc5f850d383721cd654b66c60ffbb145e45e584ff99"},
+    {file = "pytest_testinfra-6.8.0-py3-none-any.whl", hash = 
"sha256:56ac1dfc61342632a1189091473e253db1a3cdcecce0d49d6a769f33cd264814"},
+]
+pytest-xdist = [
+    {file = "pytest-xdist-3.0.2.tar.gz", hash = 
"sha256:688da9b814370e891ba5de650c9327d1a9d861721a524eb917e620eec3e90291"},
+    {file = "pytest_xdist-3.0.2-py3-none-any.whl", hash = 
"sha256:9feb9a18e1790696ea23e1434fa73b325ed4998b0e9fcb221f16fd1945e6df1b"},
+]
+tomli = [
+    {file = "tomli-1.2.3-py3-none-any.whl", hash = 
"sha256:e3069e4be3ead9668e21cb9b074cd948f7b3113fd9c8bba083f48247aab8b11c"},
+    {file = "tomli-1.2.3.tar.gz", hash = 
"sha256:05b6166bff487dc068d322585c7ea4ef78deed501cc124060e0f238e89a9231f"},
+]
+typing-extensions = [
+    {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = 
"sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"},
+    {file = "typing_extensions-4.1.1.tar.gz", hash = 
"sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"},
+]
+zipp = [
+    {file = "zipp-3.6.0-py3-none-any.whl", hash = 
"sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"},
+    {file = "zipp-3.6.0.tar.gz", hash = 
"sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"},
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/pyproject.toml 
new/obs-scm-bridge-0.3.0/pyproject.toml
--- old/obs-scm-bridge-0.2.1/pyproject.toml     1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-scm-bridge-0.3.0/pyproject.toml     2023-01-26 15:03:17.000000000 
+0100
@@ -0,0 +1,19 @@
+[tool.poetry]
+name = "obs-scm-bridge"
+version = "0.2.1"
+description = "A helper service to work with git repositories in OBS"
+authors = ["Adrian Schröter <adr...@suse.de>", "Michael Schroeder 
<m...@suse.de>"]
+license = "GPL-2.0-or-later"
+readme = "README.md"
+packages = [{include = "obs_scm_bridge"}]
+
+[tool.poetry.dependencies]
+python = ">=3.6.2,<4.0"
+
+[tool.poetry.group.dev.dependencies]
+pytest-container = "^0.0.2"
+pytest-xdist = "^3.0.2"
+
+[build-system]
+requires = ["poetry-core"]
+build-backend = "poetry.core.masonry.api"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/test/conftest.py 
new/obs-scm-bridge-0.3.0/test/conftest.py
--- old/obs-scm-bridge-0.2.1/test/conftest.py   1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-scm-bridge-0.3.0/test/conftest.py   2023-01-26 15:03:17.000000000 
+0100
@@ -0,0 +1,17 @@
+from pytest_container import add_extra_run_and_build_args_options
+from pytest_container import add_logging_level_options
+from pytest_container import auto_container_parametrize
+from pytest_container import set_logging_level_from_cli_args
+
+
+def pytest_generate_tests(metafunc):
+    auto_container_parametrize(metafunc)
+
+
+def pytest_addoption(parser):
+    add_extra_run_and_build_args_options(parser)
+    add_logging_level_options(parser)
+
+
+def pytest_configure(config):
+    set_logging_level_from_cli_args(config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.2.1/test/test_service.py 
new/obs-scm-bridge-0.3.0/test/test_service.py
--- old/obs-scm-bridge-0.2.1/test/test_service.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-scm-bridge-0.3.0/test/test_service.py       2023-01-26 
15:03:17.000000000 +0100
@@ -0,0 +1,229 @@
+from itertools import product
+from typing import Optional
+
+import xml.etree.ElementTree as ET
+
+import pytest
+from pytest_container import DerivedContainer
+from pytest_container.container import ContainerData
+
+
+_RPMS_DIR = "/src/rpms/"
+
+_AAA_BASE_URL = "https://github.com/openSUSE/aaa_base";
+_LIBECONF_URL = "https://github.com/openSUSE/libeconf";
+
+CONTAINERFILE = f"""RUN set -eux; \
+    zypper -n in python3 git build diff; \
+    . /etc/os-release && [[ ${{NAME}} = "SLES" ]] || zypper -n in git-lfs; \
+    for recom in $(rpm -q --recommends build|grep ^perl); do zypper -n in 
$recom; done
+
+RUN git config --global user.name "SUSE Bot" && \
+    git config --global user.email "nore...@suse.com" && \
+    git config --global protocol.file.allow always
+
+RUN mkdir -p {_RPMS_DIR}ring0 && \
+    cd {_RPMS_DIR} && git clone {_LIBECONF_URL} && \
+    cd libeconf && git rev-parse HEAD > /src/libeconf && \
+    cd {_RPMS_DIR}ring0 && \
+    git init && git submodule add {_AAA_BASE_URL} && \
+    git commit -m "add aaa_base" && \
+    git submodule add ../libeconf && git commit -m "add libeconf" && \
+    cd aaa_base && git rev-parse HEAD > /src/aaa_base
+
+COPY obs_scm_bridge /usr/bin/
+"""
+
+TUMBLEWEED = DerivedContainer(
+    base="registry.opensuse.org/opensuse/tumbleweed", 
containerfile=CONTAINERFILE
+)
+LEAP_15_3, LEAP_15_4 = (
+    DerivedContainer(
+        base=f"registry.opensuse.org/opensuse/leap:15.{ver}",
+        containerfile=CONTAINERFILE,
+    )
+    for ver in (3, 4)
+)
+BCI_BASE_15_3, BCI_BASE_15_4 = (
+    DerivedContainer(
+        base=f"registry.suse.com/bci/bci-base:15.{ver}", 
containerfile=CONTAINERFILE
+    )
+    for ver in (3, 4)
+)
+
+
+CONTAINER_IMAGES = [TUMBLEWEED, LEAP_15_3, LEAP_15_4, BCI_BASE_15_3, 
BCI_BASE_15_4]
+
+
+_OBS_SCM_BRIDGE_CMD = "obs_scm_bridge --debug 1"
+
+
+def test_service_help(auto_container: ContainerData):
+    """This is just a simple smoke test to check whether the script works."""
+    auto_container.connection.run_expect([0], f"{_OBS_SCM_BRIDGE_CMD} --help")
+
+
+def test_clones_the_repository(auto_container_per_test: ContainerData):
+    """Check that the service clones the manually created repository 
correctly."""
+    dest = "/tmp/ring0"
+    auto_container_per_test.connection.run_expect(
+        [0], f"{_OBS_SCM_BRIDGE_CMD} --outdir {dest} --url {_RPMS_DIR}ring0"
+    )
+    auto_container_per_test.connection.run_expect([0], f"diff {dest} 
{_RPMS_DIR}ring0")
+
+
+def test_creates_packagelist(auto_container_per_test: ContainerData):
+    """Smoke test for the generation of the package list files `$pkg_name.xml`
+    and `$pkg_name.info`:
+
+    - verify that the destination folder contains all expected `.info` and
+      `.xml` files
+    - check the `scmsync` elements in the `.xml` files
+    - check the HEAD hashes in the `.info` files
+    """
+    dest = "/tmp/ring0"
+    auto_container_per_test.connection.run_expect(
+        [0],
+        f"{_OBS_SCM_BRIDGE_CMD} --outdir {dest} --url {_RPMS_DIR}ring0 
--projectmode 1",
+    )
+    libeconf_hash, aaa_base_hash = (
+        auto_container_per_test.connection.file(
+            f"/src/{pkg_name}"
+        ).content_string.strip()
+        for pkg_name in ("libeconf", "aaa_base")
+    )
+
+    files = auto_container_per_test.connection.file(dest).listdir()
+    assert len(files) == 4
+    for file_name in (
+        f"{pkg}.{ext}"
+        for pkg, ext in product(("aaa_base", "libeconf"), ("xml", "info"))
+    ):
+        assert file_name in files
+
+    def _test_pkg_xml(pkg_name: str, expected_url: str, expected_head_hash: 
str):
+        conf = ET.fromstring(
+            auto_container_per_test.connection.file(
+                f"{dest}/{pkg_name}.xml"
+            ).content_string
+        )
+        assert conf.attrib["name"] == pkg_name
+        scm_sync_elements = conf.findall("scmsync")
+        assert len(scm_sync_elements) == 1 and scm_sync_elements[0].text
+        assert f"{expected_url}#{expected_head_hash}" in 
scm_sync_elements[0].text
+
+    _test_pkg_xml("aaa_base", _AAA_BASE_URL, aaa_base_hash)
+    _test_pkg_xml("libeconf", f"{_RPMS_DIR}libeconf", libeconf_hash)
+
+    for pkg_name, pkg_head_hash in (
+        ("aaa_base", aaa_base_hash),
+        ("libeconf", libeconf_hash),
+    ):
+        assert (
+            pkg_head_hash
+            == auto_container_per_test.connection.file(
+                f"{dest}/{pkg_name}.info"
+            ).content_string.strip()
+        )
+
+
+LFS_REPO = "https://gitea.opensuse.org/adrianSuSE/git-example-lfs";
+
+
+@pytest.mark.parametrize("fragment", ["", 
"#dc16ed074a49fbd104166d979b3045cc5d84db04"])
+@pytest.mark.parametrize("query", ["", "?lfs=1"])
+@pytest.mark.parametrize(
+    "container_per_test", [TUMBLEWEED, LEAP_15_3, LEAP_15_4], indirect=True
+)
+def test_downloads_lfs(container_per_test: ContainerData, fragment: str, 
query: str):
+    """Test that the lfs file is automatically downloaded from the lfs server 
on
+    clone.
+
+    """
+    _DEST = "/tmp/lfs-example"
+    container_per_test.connection.run_expect(
+        [0], f"{_OBS_SCM_BRIDGE_CMD} --outdir {_DEST} --url 
{LFS_REPO}{query}{fragment}"
+    )
+
+    tar_archive = 
container_per_test.connection.file(f"{_DEST}/orangebox-0.2.0.tar.gz")
+    assert tar_archive.exists and tar_archive.is_file
+    assert tar_archive.size > 10 * 1024
+
+
+@pytest.mark.parametrize("fragment", ["", 
"#dc16ed074a49fbd104166d979b3045cc5d84db04"])
+def test_lfs_opt_out(auto_container_per_test: ContainerData, fragment: str):
+    _DEST = "/tmp/lfs-example"
+    auto_container_per_test.connection.run_expect(
+        [0], f"{_OBS_SCM_BRIDGE_CMD} --outdir {_DEST} --url 
{LFS_REPO}?lfs=0{fragment}"
+    )
+
+    tar_archive = auto_container_per_test.connection.file(
+        f"{_DEST}/orangebox-0.2.0.tar.gz"
+    )
+    assert tar_archive.exists and tar_archive.is_file
+    assert tar_archive.size < 1024
+    assert "version https://git-lfs.github.com/spec"; in 
tar_archive.content_string
+
+
+@pytest.mark.parametrize(
+    "git_repo_url,expected_head",
+    [
+        (f"{_LIBECONF_URL}{fragment}", commit)
+        for fragment, commit in (
+            ("", None),
+            ("#master", None),
+            (f"{pref}892dc9b83009c859ecfde218566a242241b95ad7" for pref in 
("#", "")),
+            ("#v0.4.5", "c9658f240b5c6d8d85f52f5019e47bc29c88b83f"),
+        )
+    ],
+)
+def test_clone_commit(
+    auto_container_per_test: ContainerData,
+    git_repo_url: str,
+    expected_head: Optional[str],
+):
+    """Check that the service can clone libeconf at certain commits/branches or
+    tags and verify that `HEAD` is at the correct commit.
+
+    """
+    _DEST = "/tmp/libeconf"
+    auto_container_per_test.connection.run_expect(
+        [0], f"{_OBS_SCM_BRIDGE_CMD} --outdir {_DEST} --url {git_repo_url}"
+    )
+
+    head = auto_container_per_test.connection.run_expect(
+        [0], f"git -C {_DEST} rev-parse HEAD"
+    ).stdout.strip()
+
+    if expected_head:
+        assert head == expected_head
+    else:
+        libeconf_hash = auto_container_per_test.connection.file(
+            "/src/libeconf"
+        ).content_string.strip()
+        assert libeconf_hash == head
+
+
+@pytest.mark.parametrize(
+    "env_var,shallow",
+    [("", True), ("OSC_VERSION=1", False)],
+)
+def test_fetch_depth(
+    auto_container_per_test: ContainerData, env_var: str, shallow: bool
+):
+    _DEST = "/tmp/libeconf"
+    auto_container_per_test.connection.run_expect(
+        [0], f"{env_var} {_OBS_SCM_BRIDGE_CMD} --outdir {_DEST} --url 
{_LIBECONF_URL}"
+    )
+
+    history_length = len(
+        auto_container_per_test.connection.run_expect(
+            [0], f"git -C {_DEST} log --oneline"
+        )
+        .stdout.strip()
+        .splitlines()
+    )
+    if shallow:
+        assert history_length == 1
+    else:
+        assert history_length > 1

++++++ obs-scm-bridge.obsinfo ++++++
--- /var/tmp/diff_new_pack.bOWeGG/_old  2023-01-27 10:17:21.371929678 +0100
+++ /var/tmp/diff_new_pack.bOWeGG/_new  2023-01-27 10:17:21.371929678 +0100
@@ -1,5 +1,5 @@
 name: obs-scm-bridge
-version: 0.2.1
-mtime: 1667911285
-commit: 4ac1b2d9ce256a79aa5475521c5e6b48d15d931d
+version: 0.3.0
+mtime: 1674741797
+commit: 9907826c17ca7b650c4040e9c2b45bfef4d9821f
 

Reply via email to