Hello community,

here is the log from the commit of package python-pyfg for openSUSE:Leap:15.2 
checked in at 2020-02-22 17:52:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-pyfg (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-pyfg.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyfg"

Sat Feb 22 17:52:04 2020 rev:1 rq:776131 version:0.50

Changes:
--------
New Changes file:

--- /dev/null   2019-12-19 10:12:34.003146842 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-pyfg.new.26092/python-pyfg.changes     
2020-02-22 17:52:05.345728571 +0100
@@ -0,0 +1,33 @@
+-------------------------------------------------------------------
+Tue Oct  1 06:33:23 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Generalize description, trim bias.
+
+-------------------------------------------------------------------
+Mon Sep 30 10:12:36 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update with spec-cleaner
+- Fix the requires string
+- Install license
+- Drop not-needed dependencies
+- Fix fdupes call
+
+-------------------------------------------------------------------
+Sun Sep 29 14:42:33 UTC 2019 - Martin Hauke <[email protected]>
+
+- Use github source url
+- Add %check section (commented out since the tests need network
+  access towards a fortigate device
+- Add patches
+  * 29.patch: Fix build issue with recent pip versions
+  * 0001-Fixed-device.commit-with-vdoms.patch
+
+-------------------------------------------------------------------
+Mon Aug  7 08:10:58 UTC 2017 - [email protected]
+
+- Convert to singlespec
+
+-------------------------------------------------------------------
+Mon May  8 11:30:50 UTC 2017 - [email protected]
+
+- Initial package, version 0.50

New:
----
  0001-Fixed-device.commit-with-vdoms.patch
  29.patch
  python-pyfg-0.50.tar.gz
  python-pyfg.changes
  python-pyfg.spec

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

Other differences:
------------------
++++++ python-pyfg.spec ++++++
#
# spec file for package python-pyfg
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017-2019, Martin Hauke <[email protected]>
#
# 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/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-pyfg
Version:        0.50
Release:        0
Summary:        Python API for fortigate
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://github.com/spotify/pyfg
Source:         
https://github.com/spotify/pyfg/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:         https://github.com/spotify/pyfg/pull/29.patch
Patch1:         0001-Fixed-device.commit-with-vdoms.patch
BuildRequires:  %{python_module paramiko}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-paramiko
BuildArch:      noarch
%python_subpackages

%description
This API allows interacting with a device running FortiOS.
With this API, one can:

 * Connect to the device, retrieve the running config (the entire config or
   some blocks) and build a model
 * Build the same model from a file
 * Do changes in the candidate configuration locally
 * Create a candidate configuration from a file
 * Do a diff between the running config and the local candidate config
 * Generate the necessary commands to go from the running configuration to
   the candidate configuration

%prep
%autosetup -n pyfg-%{version} -p1

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
# disabled since tests need network access to a preconfigured fortinet device
#%%pytest test/unit/TestFortiOS.py

%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*

%changelog
++++++ 0001-Fixed-device.commit-with-vdoms.patch ++++++
>From 2b5bec824cdea268b8abd25c6b5efd034f215ff3 Mon Sep 17 00:00:00 2001
From: awlx <[email protected]>
Date: Thu, 17 Aug 2017 13:55:29 +0200
Subject: [PATCH] Fixed device.commit() with vdoms

---
 pyFG/fortios.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pyFG/fortios.py b/pyFG/fortios.py
index f5ea250..23feef6 100644
--- a/pyFG/fortios.py
+++ b/pyFG/fortios.py
@@ -285,12 +285,18 @@ class FortiOS(object):
             if config_text is None:
                 config_text = self.compare_config()
 
+            config_vdom = ""
+
             if self.vdom is None:
                 pre = ''
+            elif not 'global' in self.vdom:
+                config_vdom = 'conf vdom\n  edit %s\n' % self.vdom
+                pre = 'conf global\n    '
             else:
                 pre = 'conf global\n    '
 
             cmd = '%sexecute batch start\n' % pre
+            cmd += config_vdom
             cmd += config_text
             cmd += '\nexecute batch end\n'
 
-- 
2.23.0

++++++ 29.patch ++++++
>From 871d6e025bdfe022ae327cf51781af1c28d8cd8c Mon Sep 17 00:00:00 2001
From: Alex <[email protected]>
Date: Tue, 1 May 2018 17:04:39 -0400
Subject: [PATCH] Fixed pip requirements

---
 setup.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 64f99b7..a08d860 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,10 @@
 import uuid
 
 from setuptools import setup, find_packages
-from pip.req import parse_requirements
+try: # for pip >= 10
+        from pip._internal.req import parse_requirements
+except ImportError: # for pip <= 9.0.3
+        from pip.req import parse_requirements
 
 # parse_requirements() returns generator of pip.req.InstallRequirement objects
 install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())

Reply via email to