openSUSE Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2019
- 2 participants
- 2045 discussions
Hello community,
here is the log from the commit of package habootstrap-formula for openSUSE:Factory checked in at 2019-07-04 15:43:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/habootstrap-formula (Old)
and /work/SRC/openSUSE:Factory/.habootstrap-formula.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "habootstrap-formula"
Thu Jul 4 15:43:22 2019 rev:3 rq:713173 version:0.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/habootstrap-formula/habootstrap-formula.changes 2019-06-01 09:56:58.859171041 +0200
+++ /work/SRC/openSUSE:Factory/.habootstrap-formula.new.4615/habootstrap-formula.changes 2019-07-04 15:43:23.758120881 +0200
@@ -1,0 +2,27 @@
+Tue Jul 2 11:18:50 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.2
+ * Change the salt-formula directories permissions to 0750 to avoid
+ conflicts with the package salt-standalone-formulas-configuration.
+
+ * Correct the required package name to
+ salt-standalone-formulas-configuration
+
+-------------------------------------------------------------------
+Tue Jun 11 11:40:06 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.1 with fixed spec files. Now the package
+ is available in all SLE12 and SLE15 versions (boo#1137989, jsc#SLE-4031)
+
+-------------------------------------------------------------------
+Fri May 31 13:14:43 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.0
+ * Include the salt-formulas-configuration dependency on
+ SLE/Leap 15-SP1 and higher. This package configures the shared salt
+ formulas location (/usr/share/salt-formulas) to be used by SUMA 4.0
+ or salt in standalone mode.
+ * Drops the habootstrap-formula-suma package, as the forms metadata
+ will be available only on SUMA 4.0 using the shared location.
+
+-------------------------------------------------------------------
Old:
----
habootstrap-formula-0.1.0.tar.gz
New:
----
habootstrap-formula-0.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ habootstrap-formula.spec ++++++
--- /var/tmp/diff_new_pack.TOxBk6/_old 2019-07-04 15:43:24.318121756 +0200
+++ /var/tmp/diff_new_pack.TOxBk6/_new 2019-07-04 15:43:24.318121756 +0200
@@ -18,12 +18,12 @@
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define fname cluster
-%define fdir %{_datadir}/susemanager/formulas
+%define fdir %{_datadir}/salt-formulas
Name: habootstrap-formula
-Version: 0.1.0
+Version: 0.2.2
Group: System/Packages
-Release: 1
+Release: 0
Summary: HA cluster (crmsh) deployment salt formula
License: Apache-2.0
@@ -33,17 +33,15 @@
BuildArch: noarch
Requires: salt-shaptools
+# On SLE/Leap 15-SP1 and TW requires the new salt-formula configuration location.
+%if ! (0%{?sle_version:1} && 0%{?sle_version} < 150100)
+Requires: salt-standalone-formulas-configuration
+%endif
%description
-HA cluster (crmsh) deployment salt formula
-
-# package to deploy on SUMA specific path.
-%package suma
-Summary: HA cluster (crmsh) deployment salt formula (SUMA specific)
-Requires: salt-shaptools
-
-%description suma
-HA Cluster Bootstrap Salt Formula for SUSE Manager. Used to configure a basic HA cluster.
+HA cluster salt deployment formula. This formula is capable to perform
+the HA cluster bootstrap actions (init, join, remove) using standalone salt
+or via SUSE Manager formulas with forms, available on SUSE Manager 4.0.
%prep
%setup -q
@@ -51,10 +49,16 @@
%build
%install
+
+# before SUMA 4.0/15-SP1, install on the standard Salt Location.
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
+
mkdir -p %{buildroot}/srv/salt/
cp -R %{fname} %{buildroot}/srv/salt
-# SUMA Specific
+%else
+
+# On SUMA 4.0/15-SP1, a single shared directory will be used.
mkdir -p %{buildroot}%{fdir}/states/%{fname}
mkdir -p %{buildroot}%{fdir}/metadata/%{fname}
cp -R %{fname} %{buildroot}%{fdir}/states
@@ -64,39 +68,38 @@
cp -R metadata.yml %{buildroot}%{fdir}/metadata/%{fname}
fi
+%endif
+
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
+
%files
%defattr(-,root,root,-)
-# %license macro is not available on older releases
-%if 0%{?sle_version} <= 120300
-%doc LICENSE
+%if 0%{?sle_version} < 120300
+%doc README.md LICENSE
%else
+%doc README.md
%license LICENSE
%endif
-%doc README.md
/srv/salt/%{fname}
%dir %attr(0755, root, salt) /srv/salt
+%else
-%files suma
+%files
%defattr(-,root,root,-)
-# %license macro is not available on older releases
-%if 0%{?sle_version} <= 120300
-%doc LICENSE
-%else
-%license LICENSE
-%endif
%doc README.md
-%dir %{_datadir}/susemanager
+%license LICENSE
%dir %{fdir}
%dir %{fdir}/states
%dir %{fdir}/metadata
%{fdir}/states/%{fname}
%{fdir}/metadata/%{fname}
-%dir %attr(0755, root, salt) %{_datadir}/susemanager
-%dir %attr(0755, root, salt) %{fdir}
-%dir %attr(0755, root, salt) %{fdir}/states
-%dir %attr(0755, root, salt) %{fdir}/metadata
+%dir %attr(0750, root, salt) %{fdir}
+%dir %attr(0750, root, salt) %{fdir}/states
+%dir %attr(0750, root, salt) %{fdir}/metadata
+
+%endif
%changelog
++++++ habootstrap-formula-0.1.0.tar.gz -> habootstrap-formula-0.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/habootstrap-formula-0.1.0/Gemfile.lock new/habootstrap-formula-0.2.2/Gemfile.lock
--- old/habootstrap-formula-0.1.0/Gemfile.lock 2019-05-23 14:31:11.433529536 +0200
+++ new/habootstrap-formula-0.2.2/Gemfile.lock 2019-07-03 10:01:25.553980874 +0200
@@ -4,57 +4,75 @@
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
aws-eventstream (1.0.3)
- aws-partitions (1.166.0)
- aws-sdk-cloudtrail (1.14.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-partitions (1.184.0)
+ aws-sdk-autoscaling (1.22.0)
+ aws-sdk-core (~> 3, >= 3.52.1)
aws-sigv4 (~> 1.1)
- aws-sdk-cloudwatch (1.23.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-cloudformation (1.24.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-cloudwatchlogs (1.20.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-cloudtrail (1.16.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-configservice (1.30.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-cloudwatch (1.25.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-core (3.53.1)
+ aws-sdk-cloudwatchlogs (1.23.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-configservice (1.32.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-core (3.58.0)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
- aws-sdk-costandusagereportservice (1.13.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-costandusagereportservice (1.15.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-ec2 (1.86.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-dynamodb (1.33.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-ecs (1.40.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-ec2 (1.98.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-eks (1.19.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-ecr (1.19.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-elasticloadbalancing (1.15.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-ecs (1.43.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-iam (1.23.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-eks (1.23.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-kms (1.21.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-elasticloadbalancing (1.17.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-rds (1.54.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-elasticloadbalancingv2 (1.32.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-s3 (1.40.0)
- aws-sdk-core (~> 3, >= 3.53.0)
- aws-sdk-kms (~> 1)
+ aws-sdk-iam (1.27.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-kms (1.23.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-organizations (1.17.0)
+ aws-sdk-core (~> 3, >= 3.39.0)
aws-sigv4 (~> 1.0)
- aws-sdk-sns (1.16.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-rds (1.61.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
- aws-sdk-sqs (1.16.0)
- aws-sdk-core (~> 3, >= 3.53.0)
+ aws-sdk-s3 (1.44.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
+ aws-sdk-kms (~> 1)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-sns (1.18.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-sqs (1.18.0)
+ aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
aws-eventstream (~> 1.0, >= 1.0.2)
@@ -113,13 +131,13 @@
domain_name (~> 0.5)
httpclient (2.8.3)
inifile (3.0.0)
- inspec (4.3.2)
+ inspec (4.6.9)
addressable (~> 2.4)
faraday (>= 0.9.0)
faraday_middleware (~> 0.12.2)
hashie (~> 3.4)
htmlentities
- json (>= 1.8, < 3.0)
+ json-schema (~> 2.8)
license-acceptance (>= 0.2.13, < 2.0)
method_source (~> 0.8)
mixlib-log
@@ -142,7 +160,9 @@
tty-table (~> 0.10)
jmespath (1.4.0)
json (2.2.0)
- jwt (2.1.0)
+ json-schema (2.8.1)
+ addressable (>= 2.4)
+ jwt (2.2.1)
kitchen-docker (2.9.0)
test-kitchen (>= 1.0.0)
kitchen-inspec (1.1.0)
@@ -152,7 +172,7 @@
kitchen-salt (0.6.0)
hashie (>= 3.5)
test-kitchen (>= 1.4)
- license-acceptance (1.0.11)
+ license-acceptance (1.0.13)
pastel (~> 0.7)
tomlrb (~> 1.2)
tty-box (~> 0.3)
@@ -201,7 +221,7 @@
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
- public_suffix (3.0.3)
+ public_suffix (3.1.1)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
@@ -211,20 +231,20 @@
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
- rspec-core (3.8.0)
+ rspec-core (3.8.2)
rspec-support (~> 3.8.0)
- rspec-expectations (3.8.3)
+ rspec-expectations (3.8.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-its (1.3.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
- rspec-mocks (3.8.0)
+ rspec-mocks (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
- rspec-support (3.8.0)
+ rspec-support (3.8.2)
rubyntlm (0.6.2)
- rubyzip (1.2.2)
+ rubyzip (1.2.3)
semverse (3.0.0)
signet (0.11.0)
addressable (~> 2.3)
@@ -255,9 +275,9 @@
thor (0.20.3)
timeliness (0.3.10)
timers (4.3.0)
- tins (1.20.2)
+ tins (1.20.3)
tomlrb (1.2.8)
- train (2.1.2)
+ train (2.1.13)
azure_graph_rbac (~> 0.16)
azure_mgmt_key_vault (~> 0.17)
azure_mgmt_resources (~> 0.15)
@@ -271,19 +291,25 @@
net-ssh (>= 2.9, < 6.0)
winrm (~> 2.0)
winrm-fs (~> 1.0)
- train-aws (0.1.0)
+ train-aws (0.1.6)
+ aws-sdk-autoscaling (~> 1.22.0)
+ aws-sdk-cloudformation (~> 1)
aws-sdk-cloudtrail (~> 1.8)
aws-sdk-cloudwatch (~> 1.13)
aws-sdk-cloudwatchlogs (~> 1.13)
aws-sdk-configservice (~> 1.21)
aws-sdk-core (~> 3.0)
aws-sdk-costandusagereportservice (~> 1.6)
+ aws-sdk-dynamodb (~> 1.31)
aws-sdk-ec2 (~> 1.70)
+ aws-sdk-ecr (~> 1.18)
aws-sdk-ecs (~> 1.30)
aws-sdk-eks (~> 1.9)
aws-sdk-elasticloadbalancing (~> 1.8)
+ aws-sdk-elasticloadbalancingv2 (~> 1)
aws-sdk-iam (~> 1.13)
aws-sdk-kms (~> 1.13)
+ aws-sdk-organizations (~> 1.17.0)
aws-sdk-rds (~> 1.43)
aws-sdk-s3 (~> 1.30)
aws-sdk-sns (~> 1.9)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/habootstrap-formula-0.1.0/README.md new/habootstrap-formula-0.2.2/README.md
--- old/habootstrap-formula-0.1.0/README.md 2019-05-23 14:31:11.433529536 +0200
+++ new/habootstrap-formula-0.2.2/README.md 2019-07-03 10:01:25.553980874 +0200
@@ -101,3 +101,12 @@
zypper in libvirt
systemctl start libvirtd
```
+
+### Known issues
+* Failure running [join-the-cluster](./cluster/join.sls):
+
+> Note: The current solution is to query **hawk** status. This doesn't exactly
+> represent the state of **pacemaker** (hawk initialization is independent).
+> Increasing the `join_timer` to wait pacemaker may help in some cases.
+
+TODO: Replace to query **hawk** by checking **pacemaker** directly.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/habootstrap-formula-0.1.0/cluster/join.sls new/habootstrap-formula-0.2.2/cluster/join.sls
--- old/habootstrap-formula-0.1.0/cluster/join.sls 2019-05-23 14:31:11.433529536 +0200
+++ new/habootstrap-formula-0.2.2/cluster/join.sls 2019-07-03 10:01:25.553980874 +0200
@@ -10,7 +10,7 @@
wait-for-total-initialization:
cmd.run:
- - name: 'sleep {{ cluster.join_timer|default(5) }}'
+ - name: 'sleep {{ cluster.join_timer|default(20) }}'
- require:
- wait-for-cluster
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/habootstrap-formula-0.1.0/habootstrap-formula.changes new/habootstrap-formula-0.2.2/habootstrap-formula.changes
--- old/habootstrap-formula-0.1.0/habootstrap-formula.changes 2019-05-23 14:31:11.437527662 +0200
+++ new/habootstrap-formula-0.2.2/habootstrap-formula.changes 2019-07-03 10:01:25.553980874 +0200
@@ -1,7 +1,34 @@
-------------------------------------------------------------------
+Tue Jul 2 11:18:50 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.2
+ * Change the salt-formula directories permissions to 0750 to avoid
+ conflicts with the package salt-standalone-formulas-configuration.
+
+ * Correct the required package name to
+ salt-standalone-formulas-configuration
+
+-------------------------------------------------------------------
+Tue Jun 11 11:40:06 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.1 with fixed spec files. Now the package
+ is available in all SLE12 and SLE15 versions (boo#1137989, jsc#SLE-4031)
+
+-------------------------------------------------------------------
+Fri May 31 13:14:43 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.0
+ * Include the salt-formulas-configuration dependency on
+ SLE/Leap 15-SP1 and higher. This package configures the shared salt
+ formulas location (/usr/share/salt-formulas) to be used by SUMA 4.0
+ or salt in standalone mode.
+ * Drops the habootstrap-formula-suma package, as the forms metadata
+ will be available only on SUMA 4.0 using the shared location.
+
+-------------------------------------------------------------------
Thu May 16 09:13:17 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
-- Remove network repository installation
+- Remove network repository installation
-------------------------------------------------------------------
Thu Apr 25 12:26:43 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
@@ -44,4 +71,4 @@
Thu Sep 6 12:37:13 UTC 2018 - kgronlund(a)suse.com
- Initial version
-
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/habootstrap-formula-0.1.0/habootstrap-formula.spec new/habootstrap-formula-0.2.2/habootstrap-formula.spec
--- old/habootstrap-formula-0.1.0/habootstrap-formula.spec 2019-05-23 14:31:11.437527662 +0200
+++ new/habootstrap-formula-0.2.2/habootstrap-formula.spec 2019-07-03 10:01:25.553980874 +0200
@@ -18,12 +18,12 @@
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define fname cluster
-%define fdir %{_datadir}/susemanager/formulas
+%define fdir %{_datadir}/salt-formulas
Name: habootstrap-formula
-Version: 0.1.0
+Version: 0.2.2
Group: System/Packages
-Release: 1
+Release: 0
Summary: HA cluster (crmsh) deployment salt formula
License: Apache-2.0
@@ -33,17 +33,15 @@
BuildArch: noarch
Requires: salt-shaptools
+# On SLE/Leap 15-SP1 and TW requires the new salt-formula configuration location.
+%if ! (0%{?sle_version:1} && 0%{?sle_version} < 150100)
+Requires: salt-standalone-formulas-configuration
+%endif
%description
-HA cluster (crmsh) deployment salt formula
-
-# package to deploy on SUMA specific path.
-%package suma
-Summary: HA cluster (crmsh) deployment salt formula (SUMA specific)
-Requires: salt-shaptools
-
-%description suma
-HA Cluster Bootstrap Salt Formula for SUSE Manager. Used to configure a basic HA cluster.
+HA cluster salt deployment formula. This formula is capable to perform
+the HA cluster bootstrap actions (init, join, remove) using standalone salt
+or via SUSE Manager formulas with forms, available on SUSE Manager 4.0.
%prep
%setup -q
@@ -51,10 +49,16 @@
%build
%install
+
+# before SUMA 4.0/15-SP1, install on the standard Salt Location.
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
+
mkdir -p %{buildroot}/srv/salt/
cp -R %{fname} %{buildroot}/srv/salt
-# SUMA Specific
+%else
+
+# On SUMA 4.0/15-SP1, a single shared directory will be used.
mkdir -p %{buildroot}%{fdir}/states/%{fname}
mkdir -p %{buildroot}%{fdir}/metadata/%{fname}
cp -R %{fname} %{buildroot}%{fdir}/states
@@ -64,39 +68,38 @@
cp -R metadata.yml %{buildroot}%{fdir}/metadata/%{fname}
fi
+%endif
+
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
+
%files
%defattr(-,root,root,-)
-# %license macro is not available on older releases
-%if 0%{?sle_version} <= 120300
-%doc LICENSE
+%if 0%{?sle_version} < 120300
+%doc README.md LICENSE
%else
+%doc README.md
%license LICENSE
%endif
-%doc README.md
/srv/salt/%{fname}
%dir %attr(0755, root, salt) /srv/salt
+%else
-%files suma
+%files
%defattr(-,root,root,-)
-# %license macro is not available on older releases
-%if 0%{?sle_version} <= 120300
-%doc LICENSE
-%else
-%license LICENSE
-%endif
%doc README.md
-%dir %{_datadir}/susemanager
+%license LICENSE
%dir %{fdir}
%dir %{fdir}/states
%dir %{fdir}/metadata
%{fdir}/states/%{fname}
%{fdir}/metadata/%{fname}
-%dir %attr(0755, root, salt) %{_datadir}/susemanager
-%dir %attr(0755, root, salt) %{fdir}
-%dir %attr(0755, root, salt) %{fdir}/states
-%dir %attr(0755, root, salt) %{fdir}/metadata
+%dir %attr(0750, root, salt) %{fdir}
+%dir %attr(0750, root, salt) %{fdir}/states
+%dir %attr(0750, root, salt) %{fdir}/metadata
+
+%endif
%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/habootstrap-formula-0.1.0/pillar.example new/habootstrap-formula-0.2.2/pillar.example
--- old/habootstrap-formula-0.1.0/pillar.example 2019-05-23 14:31:11.437527662 +0200
+++ new/habootstrap-formula-0.2.2/pillar.example 2019-07-03 10:01:25.553980874 +0200
@@ -25,8 +25,8 @@
# unicast: True
# optional: Time in seconds between hawk service is available in the first
- # node and join command is executed (5s by default)
- # join_timer: 5
+ # node and join command is executed (20s by default)
+ # join_timer: 20
# optional: Configure a virtual IP resource in cluster
# admin_ip: 10.20.30.40
1
0
Hello community,
here is the log from the commit of package saphanabootstrap-formula for openSUSE:Factory checked in at 2019-07-04 15:43:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/saphanabootstrap-formula (Old)
and /work/SRC/openSUSE:Factory/.saphanabootstrap-formula.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "saphanabootstrap-formula"
Thu Jul 4 15:43:19 2019 rev:2 rq:713172 version:0.2.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/saphanabootstrap-formula/saphanabootstrap-formula.changes 2019-05-08 15:16:46.993030927 +0200
+++ /work/SRC/openSUSE:Factory/.saphanabootstrap-formula.new.4615/saphanabootstrap-formula.changes 2019-07-04 15:43:21.870117930 +0200
@@ -1,0 +2,48 @@
+Tue Jul 2 11:14:50 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.4
+ * Change the salt-formula directories permissions to 0750 to avoid
+ conflicts with the package salt-standalone-formulas-configuration.
+
+ * Correct the required package name to
+ salt-standalone-formulas-configuration
+
+-------------------------------------------------------------------
+Mon Jul 1 11:27:50 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.3 supporting hanadb_exporter logging system
+
+-------------------------------------------------------------------
+Wed Jun 19 14:23:59 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.2 adding hanadb_exporter deployment
+
+-------------------------------------------------------------------
+Tue Jun 11 11:42:31 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.1 with fixed spec files. Now the package
+ is available in all SLE12 and SLE15 versions (boo#1137989, jsc#SLE-4143)
+
+-------------------------------------------------------------------
+Thu Jun 6 07:28:43 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Fix how qas instance number is created in scale_up_resources template
+
+-------------------------------------------------------------------
+Fri May 21 12:37:43 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.0
+ * Include the salt-formulas-configuration dependency on
+ SLE/Leap 15-SP1 and higher. This package configures the shared salt
+ formulas location (/usr/share/salt-formulas) to be used by SUMA 4.0
+ or salt in standalone mode.
+ * Drops the saphanabootstrap-formula-suma package, as the forms metadata
+ will be available only on SUMA 4.0 using the shared location.
+
+-------------------------------------------------------------------
+Thu May 16 08:52:06 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Update formula to work with the latest shaptools code. In this version
+ the secondary node registration is managed completely in shaptools
+
+-------------------------------------------------------------------
Old:
----
saphanabootstrap-formula-0.1.0.tar.gz
New:
----
saphanabootstrap-formula-0.2.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ saphanabootstrap-formula.spec ++++++
--- /var/tmp/diff_new_pack.jR0NAW/_old 2019-07-04 15:43:22.562119012 +0200
+++ /var/tmp/diff_new_pack.jR0NAW/_new 2019-07-04 15:43:22.566119018 +0200
@@ -1,7 +1,7 @@
#
# spec file for package saphanabootstrap-formula
#
-# Copyright (c) 2018 SUSE LLC, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,40 +12,39 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name: saphanabootstrap-formula
-Version: 0.1.0
-Release: 1
+Version: 0.2.4
+Release: 0
Summary: SAP HANA platform deployment formula
-
License: Apache-2.0
+
Url: https://github.com/SUSE/%{name}
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
-Requires: salt-shaptools
Requires: habootstrap-formula
+Requires: salt-shaptools
+
+# On SLE/Leap 15-SP1 and TW requires the new salt-formula configuration location.
+%if ! (0%{?sle_version:1} && 0%{?sle_version} < 150100)
+Requires: salt-standalone-formulas-configuration
+%endif
%define fname hana
-%define fdir %{_datadir}/susemanager/formulas
+%define fdir %{_datadir}/salt-formulas
%define ftemplates templates
%description
-SAP HANA deployment salt formula
-
-# package to deploy on SUMA specific path.
-%package suma
-Summary: SAP HANA platform deployment formula (SUMA specific)
-Requires: salt-shaptools
-Requires: habootstrap-formula-suma
-
-%description suma
-SAP HANA deployment salt formula (SUMA specific)
+SAP HANA deployment salt formula. This formula is capable to install
+SAP HANA nodes, enable system replication and configure SLE-HA cluster
+with the SAPHanaSR resource agent, using standalone salt or via SUSE Manager
+formulas with forms, available on SUSE Manager 4.0.
%prep
%setup -q
@@ -53,12 +52,17 @@
%build
%install
-pwd
+
+# before SUMA 4.0/15-SP1, install on the standard Salt Location.
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
+
mkdir -p %{buildroot}/srv/salt/
cp -R %{fname} %{buildroot}/srv/salt/
cp -R %{ftemplates} %{buildroot}/srv/salt/%{fname}/
-# SUMA Specific
+%else
+
+# On SUMA 4.0/15-SP1, a single shared directory will be used.
mkdir -p %{buildroot}%{fdir}/states/%{fname}
mkdir -p %{buildroot}%{fdir}/metadata/%{fname}
cp -R %{fname} %{buildroot}%{fdir}/states
@@ -69,21 +73,28 @@
cp -R metadata.yml %{buildroot}%{fdir}/metadata/%{fname}
fi
+%endif
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
%files
%defattr(-,root,root,-)
-%license LICENSE
+%if 0%{?sle_version} < 120300
+%doc README.md LICENSE
+%else
%doc README.md
+%license LICENSE
+%endif
/srv/salt/%{fname}
/srv/salt/%{fname}/%{ftemplates}
%dir %attr(0755, root, salt) /srv/salt
-%files suma
+%else
+
+%files
%defattr(-,root,root,-)
-%license LICENSE
%doc README.md
-%dir %{_datadir}/susemanager
+%license LICENSE
%dir %{fdir}
%dir %{fdir}/states
%dir %{fdir}/metadata
@@ -91,9 +102,10 @@
%{fdir}/states/%{fname}/%{ftemplates}
%{fdir}/metadata/%{fname}
-%dir %attr(0755, root, salt) %{_datadir}/susemanager
-%dir %attr(0755, root, salt) %{fdir}
-%dir %attr(0755, root, salt) %{fdir}/states
-%dir %attr(0755, root, salt) %{fdir}/metadata
+%dir %attr(0750, root, salt) %{fdir}
+%dir %attr(0750, root, salt) %{fdir}/states
+%dir %attr(0750, root, salt) %{fdir}/metadata
+
+%endif
%changelog
++++++ saphanabootstrap-formula-0.1.0.tar.gz -> saphanabootstrap-formula-0.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/README.md new/saphanabootstrap-formula-0.2.4/README.md
--- old/saphanabootstrap-formula-0.1.0/README.md 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/README.md 2019-07-03 10:00:51.613343765 +0200
@@ -37,7 +37,7 @@
is used in the example):
```bash
-sudo zypper addrepo zypper addrepo https://download.opensuse.org/repositories/network:ha-clustering:Factory/op…
+sudo zypper addrepo https://download.opensuse.org/repositories/network:ha-clustering:Factory/op…
sudo zypper ref
sudo zypper in saphanabootstrap-formula
```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/form.yml new/saphanabootstrap-formula-0.2.4/form.yml
--- old/saphanabootstrap-formula-0.1.0/form.yml 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/form.yml 2019-07-03 10:00:51.613343765 +0200
@@ -179,3 +179,31 @@
$name: Operation mode
$type: select
$values: [logreplay, delta_datashipping]
+ timeout:
+ $name: Timeout to wait until the primary node is enabled
+ $type: text
+ $optional: true
+
+ add_exporter:
+ $name: Add SAP HANA database metrics exporter
+ $type: boolean
+ $default: false
+ $help: Mark if you want add the SAP HANA database metrics exporter
+ exporter:
+ $name: SAP HANA database metrics exporter
+ $optional: true
+ $visibleIf: .add_exporter == true
+ $type: group
+ exposition_port:
+ $name: SAP HANA exposter exposition port
+ $type: text
+ $optional: true
+ user:
+ $name: SAP HANA user
+ $type: text
+ $default: SYSTEM
+ $optional: false
+ password:
+ $name: SAP HANA password
+ $type: password
+ $optional: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/copy_ssfs.sls new/saphanabootstrap-formula-0.2.4/hana/copy_ssfs.sls
--- old/saphanabootstrap-formula-0.1.0/hana/copy_ssfs.sls 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/copy_ssfs.sls 1970-01-01 01:00:00.000000000 +0100
@@ -1,51 +0,0 @@
-{%- from "hana/map.jinja" import hana with context -%}
-
-{% set host = grains['host'] %}
-
-{% for node in hana.nodes %}
-{% if node.host == host and node.secondary is defined %}
-
-add-network-repo:
- pkgrepo.managed:
- - name: network
- - baseurl: https://download.opensuse.org/repositories/network/SLE_12_SP3
- - gpgautoimport: True
-
-install-sshpass:
- pkg.installed:
- - name: sshpass
- - refresh: False
- - fromrepo: network
- - require:
- - add-network-repo
-
-{% for prim_node in hana.nodes %}
-{% if node.secondary.remote_host == prim_node.host and prim_node.primary is defined %}
-{% set primary_pass = prim_node.password %}
-
-copy-ssfs-data:
- cmd.run:
- - name: sshpass -p '{{ primary_pass }}' scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
- {{ node.sid.lower() }}adm@{{ node.secondary.remote_host }}:/usr/sap/{{ node.sid.upper() }}/SYS/global/security/rsecssfs/data/SSFS_{{ node.sid.upper() }}.DAT
- /usr/sap/{{ node.sid.upper() }}/SYS/global/security/rsecssfs/data/SSFS_{{ node.sid.upper() }}.DAT
- - runas: {{ node.sid.lower() }}adm
- - password: {{ node.password }}
- - require:
- - primary-available
- - install-sshpass
-
-copy-ssfs-key:
- cmd.run:
- - name: sshpass -p '{{ primary_pass }}' scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
- {{ node.sid.lower() }}adm@{{ node.secondary.remote_host }}:/usr/sap/{{ node.sid.upper() }}/SYS/global/security/rsecssfs/key/SSFS_{{ node.sid.upper() }}.KEY
- /usr/sap/{{ node.sid.upper() }}/SYS/global/security/rsecssfs/key/SSFS_{{ node.sid.upper() }}.KEY
- - runas: {{ node.sid.lower() }}adm
- - password: {{ node.password }}
- - require:
- - primary-available
- - install-sshpass
-
-{% endif %}
-{% endfor %}
-{% endif %}
-{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/defaults.yaml new/saphanabootstrap-formula-0.2.4/hana/defaults.yaml
--- old/saphanabootstrap-formula-0.1.0/hana/defaults.yaml 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/defaults.yaml 2019-07-03 10:00:51.613343765 +0200
@@ -41,3 +41,4 @@
remote_instance: '00'
replication_mode: 'sync'
operation_mode: 'logreplay'
+ timeout: 600
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/enable_cost_optimized.sls new/saphanabootstrap-formula-0.2.4/hana/enable_cost_optimized.sls
--- old/saphanabootstrap-formula-0.1.0/hana/enable_cost_optimized.sls 1970-01-01 01:00:00.000000000 +0100
+++ new/saphanabootstrap-formula-0.2.4/hana/enable_cost_optimized.sls 2019-07-03 10:00:51.613343765 +0200
@@ -0,0 +1,55 @@
+{%- from "hana/map.jinja" import hana with context -%}
+{% set host = grains['host'] %}
+
+{% for node in hana.nodes %}
+{% if node.host == host and node.scenario_type is defined and node.scenario_type.lower() == 'cost-optimized' and node.cost_optimized_parameters is defined%}
+
+reduce_memory_resources_{{ node.host+node.sid }}:
+ hana.memory_resources_updated:
+ - name: {{ node.host }}
+ - global_allocation_limit: {{ node.cost_optimized_parameters.global_allocation_limit }}
+ - preload_column_tables: {{ node.cost_optimized_parameters.preload_column_tables }}
+ - user_name: SYSTEM
+ {% if node.install.system_user_password is defined %}
+ - user_password: {{ node.install.system_user_password }}
+ {% endif %}
+ - sid: {{ node.sid }}
+ - inst: {{ node.instance }}
+ - password: {{ node.password }}
+ - require:
+ - hana_install_{{ node.host+node.sid }}
+
+{% if node.host == host and node.secondary is defined %}
+
+setup_srHook_directory:
+ file.directory:
+ - name: /hana/shared/srHook
+ - user: {{ node.sid.lower() }}adm
+ - group: sapsys
+ - mode: 755
+ - makedirs: True
+
+install_srTakeover_hook:
+ file.managed:
+ - source: salt://hana/templates/srTakeover_hook.j2
+ - name: /hana/shared/srHook/sr-Takeover.py
+ - user: {{ node.sid.lower() }}adm
+ - group: sapsys
+ - template: jinja
+ - require:
+ - reduce_memory_resources_{{ node.host+node.sid }}
+ - setup_srHook_directory
+
+install_hana_python_packages:
+ archive.extracted:
+ - name: /hana/shared/srHook
+ - user: {{ node.sid.lower() }}adm
+ - group: sapsys
+ - enforce_toplevel: False
+ - source: {{ grains['hana_inst_folder']~'/DATA_UNITS/HDB_CLIENT_LINUX_X86_64/client/PYDBAPI.TGZ' }}
+ - require:
+ - reduce_memory_resources_{{ node.host+node.sid }}
+ - setup_srHook_directory
+{% endif %}
+{% endif %}
+{% endfor %}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/enable_secondary.sls new/saphanabootstrap-formula-0.2.4/hana/enable_secondary.sls
--- old/saphanabootstrap-formula-0.1.0/hana/enable_secondary.sls 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/enable_secondary.sls 2019-07-03 10:00:51.613343765 +0200
@@ -3,9 +3,10 @@
{% for node in hana.nodes %}
{% if node.host == host and node.secondary is defined %}
-include:
- - .primary_available
- - .copy_ssfs
+
+{% for prim_node in hana.nodes %}
+{% if node.secondary.remote_host == prim_node.host and prim_node.primary is defined %}
+{% set primary_pass = prim_node.password %}
{{ node.secondary.name }}:
hana.sr_secondary_registered:
@@ -16,8 +17,11 @@
- remote_instance: {{ node.secondary.remote_instance }}
- replication_mode: {{ node.secondary.replication_mode }}
- operation_mode: {{ node.secondary.operation_mode }}
- - require:
- - primary-available
+ - timeout: {{ node.secondary.primary_timeout|default(100) }}
+ - interval: {{ node.secondary.interval|default(10) }}
+ - primary_pass: {{ primary_pass }}
{% endif %}
{% endfor %}
+{% endif %}
+{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/exporter.sls new/saphanabootstrap-formula-0.2.4/hana/exporter.sls
--- old/saphanabootstrap-formula-0.1.0/hana/exporter.sls 1970-01-01 01:00:00.000000000 +0100
+++ new/saphanabootstrap-formula-0.2.4/hana/exporter.sls 2019-07-03 10:00:51.613343765 +0200
@@ -0,0 +1,38 @@
+{%- from "hana/map.jinja" import hana with context -%}
+{% set host = grains['host'] %}
+
+{% for node in hana.nodes %}
+{% if node.host == host and node.exporter is defined %}
+
+{% set instance = '{:0>2}'.format(node.instance) %}
+{% set config_file = '/etc/hanadb_exporter/config_{}_{}.json'.format(node.sid, instance) %}
+
+hanadb_exporter:
+ pkg.installed
+
+python3-PyHDB:
+ pkg.installed
+
+configure_exporter:
+ file.managed:
+ - source: salt://hana/templates/hanadb_exporter.j2
+ - name: {{ config_file }}
+ - template: jinja
+ - require:
+ - hanadb_exporter
+ - python3-PyHDB
+
+stop_exporter:
+ process.absent:
+ - name: hanadb_exporter -c {{ config_file }} -m /etc/hanadb_exporter/metrics.json
+ - require:
+ - configure_exporter
+
+start_exporter:
+ cmd.run:
+ - name: nohup hanadb_exporter -c {{ config_file }} -m /etc/hanadb_exporter/metrics.json &>/dev/null &
+ - require:
+ - configure_exporter
+
+{% endif %}
+{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/init.sls new/saphanabootstrap-formula-0.2.4/hana/init.sls
--- old/saphanabootstrap-formula-0.1.0/hana/init.sls 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/init.sls 2019-07-03 10:00:51.613343765 +0200
@@ -8,3 +8,4 @@
- hana.install
- hana.enable_primary
- hana.enable_secondary
+ - hana.exporter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/install.sls new/saphanabootstrap-formula-0.2.4/hana/install.sls
--- old/saphanabootstrap-formula-0.1.0/hana/install.sls 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/install.sls 2019-07-03 10:00:51.613343765 +0200
@@ -1,6 +1,9 @@
{%- from "hana/map.jinja" import hana with context -%}
{% set host = grains['host'] %}
+include:
+ - .enable_cost_optimized
+
{% for node in hana.nodes %}
{% if node.host == host and node.install is defined %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/packages.sls new/saphanabootstrap-formula-0.2.4/hana/packages.sls
--- old/saphanabootstrap-formula-0.1.0/hana/packages.sls 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/packages.sls 2019-07-03 10:00:51.613343765 +0200
@@ -10,6 +10,9 @@
patterns-sap-hana:
pkg.installed:
- fromrepo: {{ repo }}
+ - retry:
+ attempts: 3
+ interval: 15
{% else %}
install_required_packages:
@@ -21,15 +24,10 @@
{% endif %}
# Install shaptools depending on the os and python version
-{% if (grains['os_family'] == 'Suse') and (grains['osmajorrelease'] == 12) %}
-{% set python2_prefix = 'python' %}
-{% else %}
-{% set python2_prefix = 'python2' %}
-{% endif %}
-
{% if grains['pythonversion'][0] == 2 %}
-{{ python2_prefix }}-shaptools:
+python-shaptools:
{% else %}
python3-shaptools:
{% endif %}
- pkg.installed
+ pkg.installed:
+ - resolve_capabilities: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/pre_validation.sls new/saphanabootstrap-formula-0.2.4/hana/pre_validation.sls
--- old/saphanabootstrap-formula-0.1.0/hana/pre_validation.sls 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/pre_validation.sls 2019-07-03 10:00:51.613343765 +0200
@@ -44,6 +44,11 @@
{% endif %}
{% endif %}
{# Check HANA Systen replication mode finish #}
+ {# Check HANA exporter #}
+ {% if node.add_exporter is defined and node.add_exporter == false%}
+ {% do node.pop('exporter') %}
+ {% endif %}
+ {# Check HANA exporter finish #}
{% endif %}
{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/hana/primary_available.sls new/saphanabootstrap-formula-0.2.4/hana/primary_available.sls
--- old/saphanabootstrap-formula-0.1.0/hana/primary_available.sls 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/hana/primary_available.sls 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-{%- from "hana/map.jinja" import hana with context -%}
-{% set host = grains['host'] %}
-
-{% for node in hana.nodes %}
-{% if node.host == host and node.secondary is defined %}
-netcat-openbsd:
- pkg.installed
-
-primary-available:
- cmd.run:
- - name: until nc -z {{ node.secondary.remote_host }} 4{{ '{:0>2}'.format(node.instance) }}02; do sleep 1; done
- - timeout: {{ node.secondary.primary_timeout|default(100) }}
- - require:
- - netcat-openbsd
-
-{% endif %}
-{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/pillar.example new/saphanabootstrap-formula-0.2.4/pillar.example
--- old/saphanabootstrap-formula-0.1.0/pillar.example 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/pillar.example 2019-07-03 10:00:51.613343765 +0200
@@ -30,6 +30,12 @@
user_password: 'Qwerty1234'
database: 'SYSTEMDB'
file: 'backup'
+ # Optional: Add hanadb_exporter to the instance
+ exporter:
+ exposition_port: 8001 # Optional, 8001 by default
+ user: 'SYSTEM'
+ password: 'Qwerty1234'
+
- host: 'hana02'
sid: 'prd'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/saphanabootstrap-formula.changes new/saphanabootstrap-formula-0.2.4/saphanabootstrap-formula.changes
--- old/saphanabootstrap-formula-0.1.0/saphanabootstrap-formula.changes 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/saphanabootstrap-formula.changes 2019-07-03 10:00:51.613343765 +0200
@@ -1,4 +1,52 @@
-------------------------------------------------------------------
+Tue Jul 2 11:14:50 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.4
+ * Change the salt-formula directories permissions to 0750 to avoid
+ conflicts with the package salt-standalone-formulas-configuration.
+
+ * Correct the required package name to
+ salt-standalone-formulas-configuration
+
+-------------------------------------------------------------------
+Mon Jul 1 11:27:50 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.3 supporting hanadb_exporter logging system
+
+-------------------------------------------------------------------
+Wed Jun 19 14:23:59 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.2 adding hanadb_exporter deployment
+
+-------------------------------------------------------------------
+Tue Jun 11 11:42:31 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Create package version 0.2.1 with fixed spec files. Now the package
+ is available in all SLE12 and SLE15 versions (boo#1137989, jsc#SLE-4143)
+
+-------------------------------------------------------------------
+Thu Jun 6 07:28:43 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Fix how qas instance number is created in scale_up_resources template
+
+-------------------------------------------------------------------
+Fri May 21 12:37:43 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
+
+- Version bump 0.2.0
+ * Include the salt-formulas-configuration dependency on
+ SLE/Leap 15-SP1 and higher. This package configures the shared salt
+ formulas location (/usr/share/salt-formulas) to be used by SUMA 4.0
+ or salt in standalone mode.
+ * Drops the saphanabootstrap-formula-suma package, as the forms metadata
+ will be available only on SUMA 4.0 using the shared location.
+
+-------------------------------------------------------------------
+Thu May 16 08:52:06 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
+
+- Update formula to work with the latest shaptools code. In this version
+ the secondary node registration is managed completely in shaptools
+
+-------------------------------------------------------------------
Thu Apr 25 12:06:43 UTC 2019 - Diego Vinicius Akechi <dakechi(a)suse.com>
- Changed requires from salt-saphana to salt-shaptools.
@@ -7,26 +55,26 @@
Mon Mar 18 08:50:43 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
- Update primary available checking to execute this action before
- trying to copy the SSFS files from primary node
+ trying to copy the SSFS files from primary node
- Add configurable timeout to wait to the primary node
-------------------------------------------------------------------
Tue Mar 12 07:52:37 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
- Fix OS release comparison to use integer type in order to choose
- installable python version
+ installable python version
-------------------------------------------------------------------
Fri Mar 8 13:47:41 UTC 2019 - Xabier Arbulu Insausti <xarbulu(a)suse.com>
-- Improve shaptools installation python version management
+- Improve shaptools installation python version management
-------------------------------------------------------------------
Mon Mar 4 15:30:24 UTC 2019 - xarbulu(a)suse.com
- Improved the use of keystore access. When the key_name is informed,
the user_name/user_password is not needed.
-
+
-------------------------------------------------------------------
Wed Feb 25 10:15:35 UTC 2019 - dakechi(a)suse.com
@@ -37,9 +85,9 @@
-------------------------------------------------------------------
Wed Feb 20 08:18:35 UTC 2019 - xarbulu(a)suse.com
-- Add templates folder with RA configuration templates
+- Add templates folder with RA configuration templates
-------------------------------------------------------------------
Thu Dec 20 08:33:10 UTC 2018 - xarbulu(a)suse.com
-- First version of the SAP HANA deployment formula
+- First version of the SAP HANA deployment formula
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/saphanabootstrap-formula.spec new/saphanabootstrap-formula-0.2.4/saphanabootstrap-formula.spec
--- old/saphanabootstrap-formula-0.1.0/saphanabootstrap-formula.spec 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/saphanabootstrap-formula.spec 2019-07-03 10:00:51.613343765 +0200
@@ -1,7 +1,7 @@
#
# spec file for package saphanabootstrap-formula
#
-# Copyright (c) 2018 SUSE LLC, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,40 +12,39 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name: saphanabootstrap-formula
-Version: 0.1.0
-Release: 1
+Version: 0.2.4
+Release: 0
Summary: SAP HANA platform deployment formula
-
License: Apache-2.0
+
Url: https://github.com/SUSE/%{name}
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
-Requires: salt-shaptools
Requires: habootstrap-formula
+Requires: salt-shaptools
+
+# On SLE/Leap 15-SP1 and TW requires the new salt-formula configuration location.
+%if ! (0%{?sle_version:1} && 0%{?sle_version} < 150100)
+Requires: salt-standalone-formulas-configuration
+%endif
%define fname hana
-%define fdir %{_datadir}/susemanager/formulas
+%define fdir %{_datadir}/salt-formulas
%define ftemplates templates
%description
-SAP HANA deployment salt formula
-
-# package to deploy on SUMA specific path.
-%package suma
-Summary: SAP HANA platform deployment formula (SUMA specific)
-Requires: salt-shaptools
-Requires: habootstrap-formula-suma
-
-%description suma
-SAP HANA deployment salt formula (SUMA specific)
+SAP HANA deployment salt formula. This formula is capable to install
+SAP HANA nodes, enable system replication and configure SLE-HA cluster
+with the SAPHanaSR resource agent, using standalone salt or via SUSE Manager
+formulas with forms, available on SUSE Manager 4.0.
%prep
%setup -q
@@ -53,12 +52,17 @@
%build
%install
-pwd
+
+# before SUMA 4.0/15-SP1, install on the standard Salt Location.
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
+
mkdir -p %{buildroot}/srv/salt/
cp -R %{fname} %{buildroot}/srv/salt/
cp -R %{ftemplates} %{buildroot}/srv/salt/%{fname}/
-# SUMA Specific
+%else
+
+# On SUMA 4.0/15-SP1, a single shared directory will be used.
mkdir -p %{buildroot}%{fdir}/states/%{fname}
mkdir -p %{buildroot}%{fdir}/metadata/%{fname}
cp -R %{fname} %{buildroot}%{fdir}/states
@@ -69,21 +73,28 @@
cp -R metadata.yml %{buildroot}%{fdir}/metadata/%{fname}
fi
+%endif
+%if 0%{?sle_version:1} && 0%{?sle_version} < 150100
%files
%defattr(-,root,root,-)
-%license LICENSE
+%if 0%{?sle_version} < 120300
+%doc README.md LICENSE
+%else
%doc README.md
+%license LICENSE
+%endif
/srv/salt/%{fname}
/srv/salt/%{fname}/%{ftemplates}
%dir %attr(0755, root, salt) /srv/salt
-%files suma
+%else
+
+%files
%defattr(-,root,root,-)
-%license LICENSE
%doc README.md
-%dir %{_datadir}/susemanager
+%license LICENSE
%dir %{fdir}
%dir %{fdir}/states
%dir %{fdir}/metadata
@@ -91,9 +102,10 @@
%{fdir}/states/%{fname}/%{ftemplates}
%{fdir}/metadata/%{fname}
-%dir %attr(0755, root, salt) %{_datadir}/susemanager
-%dir %attr(0755, root, salt) %{fdir}
-%dir %attr(0755, root, salt) %{fdir}/states
-%dir %attr(0755, root, salt) %{fdir}/metadata
+%dir %attr(0750, root, salt) %{fdir}
+%dir %attr(0750, root, salt) %{fdir}/states
+%dir %attr(0750, root, salt) %{fdir}/metadata
+
+%endif
%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/templates/hanadb_exporter.j2 new/saphanabootstrap-formula-0.2.4/templates/hanadb_exporter.j2
--- old/saphanabootstrap-formula-0.1.0/templates/hanadb_exporter.j2 1970-01-01 01:00:00.000000000 +0100
+++ new/saphanabootstrap-formula-0.2.4/templates/hanadb_exporter.j2 2019-07-03 10:00:51.613343765 +0200
@@ -0,0 +1,25 @@
+{%- from "hana/map.jinja" import hana with context -%}
+{% set host = grains['host'] %}
+
+{% for node in hana.nodes %}
+{% if node.host == host and node.exporter is defined %}
+
+{% set dbinst = '{:0>2}'.format(node.instance) %}
+{% set node_subix = '{}_{}'.format(node.sid, dbinst) %}
+
+{
+ "exposition_port": {{ node.exporter.exposition_port|default(8001) }},
+ "hana": {
+ "host": "{{ node.host }}",
+ "port": 3{{ dbinst }}15,
+ "user": "{{ node.exporter.user }}",
+ "password": "{{ node.exporter.password }}"
+ },
+ "logging": {
+ "config_file": "/etc/hanadb_exporter/logging_config.ini",
+ "log_file": "/var/log/hanadb_exporter_{{ node_subix }}.log"
+ }
+}
+
+{% endif %}
+{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/templates/performance_optimized.j2 new/saphanabootstrap-formula-0.2.4/templates/performance_optimized.j2
--- old/saphanabootstrap-formula-0.1.0/templates/performance_optimized.j2 2019-04-25 12:34:44.593238071 +0200
+++ new/saphanabootstrap-formula-0.2.4/templates/performance_optimized.j2 1970-01-01 01:00:00.000000000 +0100
@@ -1,70 +0,0 @@
-{% set data = pillar.cluster.configure.template.parameters %}
-{% set sid = data.sid.upper() %}
-{% set instance = '{:0>2}'.format(data.instance) %}
-
-#
-# defaults
-#
-
-rsc_defaults \
- resource-stickiness="1000" \
- migration-threshold="5000"
-
-op_defaults \
- timeout="600"
-
-#
-# production HANA
-#
-
-primitive rsc_ip_{{ sid }}_HDB{{ instance }} ocf:heartbeat:IPaddr2 \
- params \
- ip="{{ data.virtual_ip }}" cidr_netmask="{{ 32 if data.platform == "gcp" else data.virtual_ip_mask }}" {{ "nic=" ~ pillar.cluster.interface|default('eth0') }} \
- op start timeout="20" op stop timeout="20" \
- op monitor interval="10" timeout="20"
-
-primitive rsc_SAPHanaTopology_{{ sid }}_HDB{{ instance }} ocf:suse:SAPHanaTopology \
- params \
- SID="{{ sid }}" \
- InstanceNumber="{{ instance }}" \
- op monitor interval="10" timeout="600" \
- op start interval="0" timeout="600" \
- op stop interval="0" timeout="300"
-
-clone cln_SAPHanaTopology_{{ sid }}_HDB{{ instance }} rsc_SAPHanaTopology_{{ sid }}_HDB{{ instance }} \
- meta is-managed="true" clone-node-max="1" interleave="true"
-
-primitive rsc_SAPHana_{{ sid }}_HDB{{ instance }} ocf:suse:SAPHana \
- params \
- SID="{{ sid }}" \
- InstanceNumber="{{ instance }}" \
- PREFER_SITE_TAKEOVER="{{ data.prefer_takeover }}" \
- AUTOMATED_REGISTER="{{ data.auto_register }}" \
- DUPLICATE_PRIMARY_TIMEOUT="7200" \
- op start interval="0" timeout="3600" \
- op stop interval="0" timeout="3600" \
- op promote interval="0" timeout="3600" \
- op monitor interval="60" role="Master" timeout="700" \
- op monitor interval="61" role="Slave" timeout="700"
-
-ms msl_SAPHana_{{ sid }}_HDB{{ instance }} rsc_SAPHana_{{ sid }}_HDB{{ instance }} \
- meta clone-max="2" clone-node-max="1" interleave="true"
-
-{% if data.platform == "azure" %}
-
-primitive rsc_nc_{{ sid }}_HDB{{ instance }} anything \
- params binfile="/usr/bin/nc" cmdline_options="-l -k 62503" \
- meta resource-stickiness=0 \
- op monitor timeout="20" interval="10" depth="0"
-
-group g_ip_{{ sid }}_HDB{{ instance }} rsc_ip_{{ sid }}_HDB{{ instance }} rsc_nc_{{ sid }}_HDB{{ instance }}
-
-colocation col_saphana_ip_{{ sid }}_HDB{{ instance }} 2000: g_ip_{{ sid }}_HDB{{ instance }}:Started msl_SAPHana_{{ sid }}_HDB{{ instance }}:Master
-
-{% else %}
-
-colocation col_saphana_ip_{{ sid }}_HDB{{ instance }} 2000: rsc_ip_{{ sid }}_HDB{{ instance }}:Started msl_SAPHana_{{ sid }}_HDB{{ instance }}:Master
-
-{% endif %}
-
-order ord_SAPHana_{{ sid }}_HDB{{ instance }} Optional: cln_SAPHanaTopology_{{ sid }}_HDB{{ instance }} msl_SAPHana_{{ sid }}_HDB{{ instance }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/templates/scale_up_resources.j2 new/saphanabootstrap-formula-0.2.4/templates/scale_up_resources.j2
--- old/saphanabootstrap-formula-0.1.0/templates/scale_up_resources.j2 1970-01-01 01:00:00.000000000 +0100
+++ new/saphanabootstrap-formula-0.2.4/templates/scale_up_resources.j2 2019-07-03 10:00:51.613343765 +0200
@@ -0,0 +1,97 @@
+{% set data = pillar.cluster.configure.template.parameters %}
+{% set sid = data.sid.upper() %}
+{% set instance = '{:0>2}'.format(data.instance) %}
+
+#
+# defaults
+#
+
+rsc_defaults \
+ resource-stickiness="1000" \
+ migration-threshold="5000"
+
+op_defaults \
+ timeout="600"
+
+#
+# production HANA
+#
+
+primitive rsc_ip_{{ sid }}_HDB{{ instance }} ocf:heartbeat:IPaddr2 \
+ params \
+ ip="{{ data.virtual_ip }}" cidr_netmask="{{ 32 if data.platform == "gcp" else data.virtual_ip_mask }}" {{ "nic=" ~ pillar.cluster.interface|default('eth0') }} \
+ op start timeout="20" op stop timeout="20" \
+ op monitor interval="10" timeout="20"
+
+primitive rsc_SAPHanaTopology_{{ sid }}_HDB{{ instance }} ocf:suse:SAPHanaTopology \
+ params \
+ SID="{{ sid }}" \
+ InstanceNumber="{{ instance }}" \
+ op monitor interval="10" timeout="600" \
+ op start interval="0" timeout="600" \
+ op stop interval="0" timeout="300"
+
+clone cln_SAPHanaTopology_{{ sid }}_HDB{{ instance }} rsc_SAPHanaTopology_{{ sid }}_HDB{{ instance }} \
+ meta is-managed="true" clone-node-max="1" interleave="true"
+
+primitive rsc_SAPHana_{{ sid }}_HDB{{ instance }} ocf:suse:SAPHana \
+ params \
+ SID="{{ sid }}" \
+ InstanceNumber="{{ instance }}" \
+ PREFER_SITE_TAKEOVER="{{ data.prefer_takeover }}" \
+ AUTOMATED_REGISTER="{{ data.auto_register }}" \
+ DUPLICATE_PRIMARY_TIMEOUT="7200" \
+ op start interval="0" timeout="3600" \
+ op stop interval="0" timeout="3600" \
+ op promote interval="0" timeout="3600" \
+ op monitor interval="60" role="Master" timeout="700" \
+ op monitor interval="61" role="Slave" timeout="700"
+
+ms msl_SAPHana_{{ sid }}_HDB{{ instance }} rsc_SAPHana_{{ sid }}_HDB{{ instance }} \
+ meta clone-max="2" clone-node-max="1" interleave="true"
+
+{% if data.platform == "azure" %}
+
+primitive rsc_nc_{{ sid }}_HDB{{ instance }} anything \
+ params binfile="/usr/bin/nc" cmdline_options="-l -k 62503" \
+ meta resource-stickiness=0 \
+ op monitor timeout="20" interval="10" depth="0"
+
+group g_ip_{{ sid }}_HDB{{ instance }} rsc_ip_{{ sid }}_HDB{{ instance }} rsc_nc_{{ sid }}_HDB{{ instance }}
+
+colocation col_saphana_ip_{{ sid }}_HDB{{ instance }} 2000: g_ip_{{ sid }}_HDB{{ instance }}:Started msl_SAPHana_{{ sid }}_HDB{{ instance }}:Master
+
+{% else %}
+
+colocation col_saphana_ip_{{ sid }}_HDB{{ instance }} 2000: rsc_ip_{{ sid }}_HDB{{ instance }}:Started msl_SAPHana_{{ sid }}_HDB{{ instance }}:Master
+
+{% endif %}
+
+order ord_SAPHana_{{ sid }}_HDB{{ instance }} Optional: cln_SAPHanaTopology_{{ sid }}_HDB{{ instance }} msl_SAPHana_{{ sid }}_HDB{{ instance }}
+
+{% if data.cost_optimized_parameters is defined %}
+{% set qas_sid = data.cost_optimized_parameters.sid.upper() %}
+{% set qas_instance = '{:0>2}'.format(data.cost_optimized_parameters.instance) %}
+{% set qas_remote_host = data.cost_optimized_parameters.remote_host %}
+
+#
+# non-production HANA
+#
+
+primitive rsc_SAP_{{ qas_sid }}_HDB{{ qas_instance }} ocf:heartbeat:SAPDatabase \
+ params DBTYPE="HDB" SID="{{ qas_sid }}" \
+ MONITOR_SERVICES="hdbindexserver|hdbnameserver" \
+ op start interval="0" timeout="600" \
+ op monitor interval="120" timeout="700" \
+ op stop interval="0" timeout="300" \
+ meta priority="100"
+
+location loc_{{ qas_sid }}_never_on_{{ qas_remote_host }} rsc_SAP_{{ qas_sid }}_HDB{{ qas_instance }} -inf: {{ qas_remote_host }}
+
+colocation col_{{ qas_sid }}_never_with_{{ sid }}-ip -inf: rsc_SAP_{{ qas_sid }}_HDB{{ qas_instance }}:Started \
+ rsc_ip_{{ sid }}_HDB{{ instance }}
+
+order ord_{{ qas_sid }}_stop_before_{{ sid }}-promote inf: rsc_SAP_{{ qas_sid }}_HDB{{ qas_instance }}:stop \
+ msl_SAPHana_{{ sid }}_HDB{{ instance }}:promote
+
+{% endif %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/saphanabootstrap-formula-0.1.0/templates/srTakeover_hook.j2 new/saphanabootstrap-formula-0.2.4/templates/srTakeover_hook.j2
--- old/saphanabootstrap-formula-0.1.0/templates/srTakeover_hook.j2 1970-01-01 01:00:00.000000000 +0100
+++ new/saphanabootstrap-formula-0.2.4/templates/srTakeover_hook.j2 2019-07-03 10:00:51.613343765 +0200
@@ -0,0 +1,114 @@
+{%- from "hana/map.jinja" import hana with context -%}
+{% set host = grains['host'] %}
+
+{% for node in hana.nodes %}
+{% if node.host == host and node.secondary is defined and node.scenario_type.lower() == 'cost-optimized' %}
+
+{% set dbsid = node.sid.lower() %}
+{% set dbinst = '{:0>2}'.format(node.instance) %}
+
+{% for prim_node in hana.nodes %}
+{% if node.secondary.remote_host == prim_node.host and prim_node.primary is defined %}
+
+{% set dbuser = prim_node.primary.userkey.user_name %}
+{% set dbpwd = prim_node.password %}
+{% set dbversion = salt['hana.get_version'](sid=dbsid, inst=dbinst, password=dbpwd) %}
+{% if salt['pkg.version_cmp'](dbversion, '2.0') < 0 %}
+ {% set dbport = ('3'~ dbinst ~'15')|int %}
+{% else %}
+ {% set dbport = ('3'~ dbinst ~'13')|int %}
+{% endif -%}
+
+dbuser="{{ dbuser }}"
+dbpwd="{{ dbpwd }}"
+dbinst="{{ dbinst }}"
+dbport="{{ dbport }}"
+
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endfor %}
+
+#!/usr/bin/env python2
+"""
+Auto-generated HA/DR hook script
+
+"""
+
+stmnt1 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET ('memorymanager','global_allocation_limit') WITH RECONFIGURE"
+stmnt2 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET ('system_replication','preload_column_tables') WITH RECONFIGURE"
+
+import os, time, dbapi
+
+from hdb_ha_dr.client import HADRBase, Helper
+
+class srTakeover(HADRBase):
+ def __init__(self, *args, **kwargs):
+ # delegate construction to base class
+ super(srTakeover, self).__init__(*args, **kwargs)
+
+ def about(self):
+ return {"provider_company" : "SUSE",
+ "provider_name" : "srTakeover", # provider name = class name
+ "provider_description" : "Replication takeover script to set parameters to default.",
+ "provider_version" : "1.0"}
+
+ def startup(self, hostname, storage_partition, system_replication_mode, **kwargs):
+ self.tracer.debug("enter startup hook; %s" % locals())
+ self.tracer.debug(self.config.toString())
+ self.tracer.info("leave startup hook")
+ return 0
+
+ def shutdown(self, hostname, storage_partition, system_replication_mode, **kwargs):
+ self.tracer.debug("enter shutdown hook; %s" % locals())
+ self.tracer.debug(self.config.toString())
+ self.tracer.info("leave shutdown hook")
+ return 0
+
+ def failover(self, hostname, storage_partition, system_replication_mode, **kwargs):
+ self.tracer.debug("enter failover hook; %s" % locals())
+ self.tracer.debug(self.config.toString())
+ self.tracer.info("leave failover hook")
+ return 0
+
+ def stonith(self, failingHost, **kwargs):
+ self.tracer.debug("enter stonith hook; %s" % locals())
+ self.tracer.debug(self.config.toString())
+ # e.g. stonith of params["failed_host"]
+ # e-g- set vIP active
+ self.tracer.info("leave stonith hook")
+ return 0
+
+ def preTakeover(self, isForce, **kwargs):
+ """Pre takeover hook."""
+ self.tracer.info("%s.preTakeover method called with isForce=%s" %
+ (self.__class__.__name__, isForce))
+ if not isForce:
+ # run pre takeover code
+ # run pre-check, return != 0 in case of error => will abort takeover
+ return 0
+ else:
+ # possible force-takeover only code
+ # usually nothing to do here
+ return 0
+
+ def postTakeover(self, rc, **kwargs):
+ """Post takeover hook."""
+ self.tracer.info("%s.postTakeover method called with rc=%s" % (self.__class__.__name__, rc))
+ if rc == 0:
+ # normal takeover succeeded
+ conn = dbapi.connect('localhost',dbport,dbuser,dbpwd)
+ cursor = conn.cursor()
+ cursor.execute(stmnt1)
+ cursor.execute(stmnt2)
+ return 0
+ elif rc == 1:
+ # waiting for force takeover
+ conn = dbapi.connect('localhost',dbport,dbuser,dbpwd)
+ cursor = conn.cursor()
+ cursor.execute(stmnt1)
+ cursor.execute(stmnt2)
+ return 0
+ elif rc == 2:
+ # error, something went wrong
+ return 0
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package vm-install for openSUSE:Factory checked in at 2019-07-04 15:43:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vm-install (Old)
and /work/SRC/openSUSE:Factory/.vm-install.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vm-install"
Thu Jul 4 15:43:15 2019 rev:168 rq:713099 version:0.10.07
Changes:
--------
--- /work/SRC/openSUSE:Factory/vm-install/vm-install.changes 2019-02-02 21:50:13.179930380 +0100
+++ /work/SRC/openSUSE:Factory/.vm-install.new.4615/vm-install.changes 2019-07-04 15:43:16.862110106 +0200
@@ -1,0 +2,7 @@
+Tue Jun 25 10:27:13 MDT 2019 - carnold(a)suse.com
+
+- bsc#1139355 - vm-install: The use of the 'builder' option in the
+ config file produces an error because it is deprecated
+- Version 0.10.07
+
+-------------------------------------------------------------------
Old:
----
vm-install-0.10.06.tar.bz2
New:
----
vm-install-0.10.07.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vm-install.spec ++++++
--- /var/tmp/diff_new_pack.MAGstk/_old 2019-07-04 15:43:17.426110987 +0200
+++ /var/tmp/diff_new_pack.MAGstk/_new 2019-07-04 15:43:17.426110987 +0200
@@ -27,12 +27,12 @@
%endif
# For directory ownership:
BuildRequires: yast2
-Version: 0.10.06
+Version: 0.10.07
Release: 0
Summary: Tool to Define a Virtual Machine and Install Its Operating System
-License: GPL-2.0-only
+License: GPL-2.0
Group: System/Emulators/PC
-Source0: %{name}-0.10.06.tar.bz2
+Source0: %{name}-0.10.07.tar.bz2
Source1: vm-install.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kdump
++++++ vm-install-0.10.06.tar.bz2 -> vm-install-0.10.07.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.10.06/Makefile new/vm-install-0.10.07/Makefile
--- old/vm-install-0.10.06/Makefile 2019-02-01 18:15:08.047100925 +0100
+++ new/vm-install-0.10.07/Makefile 2019-06-25 18:58:16.736763059 +0200
@@ -1,5 +1,5 @@
PACKAGE = vm-install
-VER = 0.10.06
+VER = 0.10.07
default:
@echo "Run 'make install DESTDIR=$destdir' to install."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.10.06/setup.py new/vm-install-0.10.07/setup.py
--- old/vm-install-0.10.06/setup.py 2019-02-01 18:15:07.967104083 +0100
+++ new/vm-install-0.10.07/setup.py 2019-06-25 18:58:11.896681582 +0200
@@ -1,7 +1,7 @@
from distutils.core import setup
setup(name='vminstall',
- version='0.10.06',
+ version='0.10.07',
description='Define a virtual machine and install its operating system',
author='Charles Coffing',
author_email='ccoffing(a)novell.com',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.10.06/src/vminstall/full_virt_xen_guest.py new/vm-install-0.10.07/src/vminstall/full_virt_xen_guest.py
--- old/vm-install-0.10.06/src/vminstall/full_virt_xen_guest.py 2017-07-07 00:53:28.093792939 +0200
+++ new/vm-install-0.10.07/src/vminstall/full_virt_xen_guest.py 2019-06-25 18:58:00.800494789 +0200
@@ -167,7 +167,7 @@
self.options.initrd = self.dkb.initrd
extra = '%s %s' % (self.options._install_args, self.options.extra_args)
return """%(common)s
-builder="hvm"
+type="hvm"
loader="%(loader)s"
kernel="%(kernel)s"
ramdisk="%(initrd)s"
@@ -193,7 +193,7 @@
'initrd': self.options.initrd, 'mouse': self._get_mouse_xen()}
return """%(common)s
-builder="hvm"
+type="hvm"
boot="%(bootdev)s"
%(disks)s
%(networks)s
1
0
Hello community,
here is the log from the commit of package python-zake for openSUSE:Factory checked in at 2019-07-04 15:43:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zake (Old)
and /work/SRC/openSUSE:Factory/.python-zake.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zake"
Thu Jul 4 15:43:12 2019 rev:10 rq:713081 version:0.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zake/python-zake.changes 2018-05-23 16:09:34.912927238 +0200
+++ /work/SRC/openSUSE:Factory/.python-zake.new.4615/python-zake.changes 2019-07-04 15:43:13.954105562 +0200
@@ -1,0 +2,5 @@
+Tue Jul 2 14:57:10 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Skip one randomly failing test
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-zake.spec ++++++
--- /var/tmp/diff_new_pack.HVdFGw/_old 2019-07-04 15:43:14.866106987 +0200
+++ /var/tmp/diff_new_pack.HVdFGw/_new 2019-07-04 15:43:14.870106993 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-zake
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -31,6 +31,7 @@
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module testtools}
+BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-kazoo
Requires: python-six
@@ -49,10 +50,12 @@
%install
%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Skip upstream failing test_child_watch_no_create
-%python_expand nosetests-%{$python_bin_suffix} -e test_child_watch_no_create
+# Skip test_clients_counter that is absolutely random
+%python_expand nosetests-%{$python_bin_suffix} -v -e '(test_child_watch_no_create|test_clients_counter)'
%files %{python_files}
%license LICENSE
1
0
Hello community,
here is the log from the commit of package python-google-cloud-kms for openSUSE:Factory checked in at 2019-07-04 15:43:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-cloud-kms (Old)
and /work/SRC/openSUSE:Factory/.python-google-cloud-kms.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-cloud-kms"
Thu Jul 4 15:43:09 2019 rev:2 rq:713080 version:1.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-google-cloud-kms/python-google-cloud-kms.changes 2019-02-28 21:41:52.529564249 +0100
+++ /work/SRC/openSUSE:Factory/.python-google-cloud-kms.new.4615/python-google-cloud-kms.changes 2019-07-04 15:43:12.354103062 +0200
@@ -1,0 +2,8 @@
+Tue Jul 2 14:53:37 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.1.0:
+ * Allow kwargs to be passed to create_channel (via synth). (#8395)
+ * Add empty lines (via synth). (#8062)
+ * Remove classifier for Python 3.4 for end-of-life. (#7535)
+
+-------------------------------------------------------------------
Old:
----
google-cloud-kms-1.0.0.tar.gz
New:
----
google-cloud-kms-1.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-google-cloud-kms.spec ++++++
--- /var/tmp/diff_new_pack.K4ZGii/_old 2019-07-04 15:43:13.042104137 +0200
+++ /var/tmp/diff_new_pack.K4ZGii/_new 2019-07-04 15:43:13.046104143 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-google-cloud-kms
-Version: 1.0.0
+Version: 1.1.0
Release: 0
Summary: Cloud Key Management Service (KMS) API API client library
License: Apache-2.0
@@ -57,7 +57,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec -m pytest
+%pytest
%files %{python_files}
%doc README.rst
++++++ google-cloud-kms-1.0.0.tar.gz -> google-cloud-kms-1.1.0.tar.gz ++++++
++++ 4602 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package dstat for openSUSE:Factory checked in at 2019-07-04 15:43:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dstat (Old)
and /work/SRC/openSUSE:Factory/.dstat.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dstat"
Thu Jul 4 15:43:04 2019 rev:9 rq:713079 version:0.7.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/dstat/dstat.changes 2019-06-13 23:03:15.591397941 +0200
+++ /work/SRC/openSUSE:Factory/.dstat.new.4615/dstat.changes 2019-07-04 15:43:05.574092469 +0200
@@ -1,0 +2,6 @@
+Tue Jul 2 14:28:44 UTC 2019 - Stefan Brüns <stefan.bruens(a)rwth-aachen.de>
+
+- Fix CSV output, boo#1138417
+ Add 0001-Use-python3-compatible-way-of-checking-instance-type.patch
+
+-------------------------------------------------------------------
New:
----
0001-Use-python3-compatible-way-of-checking-instance-type.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dstat.spec ++++++
--- /var/tmp/diff_new_pack.J9psWp/_old 2019-07-04 15:43:06.314093625 +0200
+++ /var/tmp/diff_new_pack.J9psWp/_new 2019-07-04 15:43:06.322093637 +0200
@@ -26,6 +26,8 @@
Source: https://github.com/dagwieers/dstat/archive/v%{version}.tar.gz
Source1: dstat.desktop
Patch1: fix_boo_1136279.patch
+# PATCH-FIX-OPENSUSE - boo#1138417
+Patch2: 0001-Use-python3-compatible-way-of-checking-instance-type.patch
BuildRequires: make
Requires: python3
BuildArch: noarch
@@ -52,9 +54,10 @@
%prep
%setup -q
-# repalce env by python
+# replace env by python
sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/python3/' dstat
%patch1 -p1
+%patch2 -p1
%build
@@ -88,8 +91,8 @@
%endif
%files
-%defattr(-,root,root)
-%doc AUTHORS ChangeLog COPYING README.adoc TODO
+%license COPYING
+%doc AUTHORS ChangeLog README.adoc TODO
%doc docs/*.html docs/*.adoc examples/ proc/
%{_bindir}/dstat
%dir %{_datadir}/dstat
++++++ 0001-Use-python3-compatible-way-of-checking-instance-type.patch ++++++
>From 4afc0e352640bb278755beaab81cb2e935f5f1c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens(a)rwth-aachen.de>
Date: Tue, 2 Jul 2019 16:28:07 +0200
Subject: [PATCH] Use python3 compatible way of checking instance type
Previously, "dstat --output file ..." failed on python3.
---
dstat | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dstat b/dstat
index 9359965..df37911 100755
--- a/dstat
+++ b/dstat
@@ -541,12 +541,12 @@ class dstat:
line = ''
for i, name in enumerate(self.vars):
- if isinstance(self.val[name], types.ListType) or isinstance(self.val[name], types.TupleType):
+ if isinstance(self.val[name], (list, type)):
for j, val in enumerate(self.val[name]):
line = line + printcsv(val)
if j + 1 != len(self.val[name]):
line = line + char['sep']
- elif isinstance(self.val[name], types.StringType):
+ elif isinstance(self.val[name], str):
line = line + self.val[name]
else:
line = line + printcsv(self.val[name])
--
2.22.0
1
0
Hello community,
here is the log from the commit of package python-google-api-core for openSUSE:Factory checked in at 2019-07-04 15:43:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-api-core (Old)
and /work/SRC/openSUSE:Factory/.python-google-api-core.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-api-core"
Thu Jul 4 15:43:02 2019 rev:9 rq:713078 version:1.13.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-google-api-core/python-google-api-core.changes 2019-05-16 22:11:14.610220864 +0200
+++ /work/SRC/openSUSE:Factory/.python-google-api-core.new.4615/python-google-api-core.changes 2019-07-04 15:43:02.814088156 +0200
@@ -1,0 +2,6 @@
+Tue Jul 2 14:51:05 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.13.0:
+ * Various fixes for new updated dependencies
+
+-------------------------------------------------------------------
Old:
----
google-api-core-1.11.0.tar.gz
New:
----
google-api-core-1.13.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-google-api-core.spec ++++++
--- /var/tmp/diff_new_pack.jLWvg3/_old 2019-07-04 15:43:03.582089356 +0200
+++ /var/tmp/diff_new_pack.jLWvg3/_new 2019-07-04 15:43:03.586089362 +0200
@@ -18,12 +18,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-google-api-core
-Version: 1.11.0
+Version: 1.13.0
Release: 0
Summary: Google API client core library
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://github.com/GoogleCloudPlatform/google-cloud-python
+URL: https://github.com/GoogleCloudPlatform/google-cloud-python
Source: https://files.pythonhosted.org/packages/source/g/google-api-core/google-api…
BuildRequires: %{python_module google-auth >= 0.4.0}
BuildRequires: %{python_module googleapis-common-protos >= 1.5.3}
@@ -40,25 +40,24 @@
BuildRequires: python-rpm-macros
BuildRequires: python2-enum34
BuildRequires: python2-futures >= 3.2.0
-%ifpython2
-BuildRequires: python2-enum34
-BuildRequires: python2-futures
-%endif
Requires: python-google-auth >= 0.4.0
Requires: python-googleapis-common-protos >= 1.5.3
+Requires: python-grpcio >= 1.8.2
Requires: python-protobuf >= 3.0.0
Requires: python-pytz
Requires: python-requests >= 2.18.0
Requires: python-setuptools >= 34.0.0
Requires: python-six >= 1.10.0
+Suggests: python-grpcio-gcp >= 0.2.2
+BuildArch: noarch
+%ifpython2
+BuildRequires: python2-enum34
+BuildRequires: python2-futures
+%endif
%ifpython2
Requires: python-enum34
Requires: python-futures >= 3.2.0
%endif
-Requires: python-grpcio >= 1.8.2
-Suggests: python-grpcio-gcp >= 0.2.2
-BuildArch: noarch
-
%python_subpackages
%description
@@ -75,7 +74,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec -m pytest
+%pytest
%files %{python_files}
%license LICENSE
++++++ google-api-core-1.11.0.tar.gz -> google-api-core-1.13.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/.coveragerc new/google-api-core-1.13.0/.coveragerc
--- old/google-api-core-1.11.0/.coveragerc 2018-09-13 21:58:16.000000000 +0200
+++ new/google-api-core-1.13.0/.coveragerc 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-[run]
-branch = True
-
-[report]
-fail_under = 100
-show_missing = True
-exclude_lines =
- # Re-enable the standard pragma
- pragma: NO COVER
- # Ignore debug-only repr
- def __repr__
- # Ignore abstract methods
- raise NotImplementedError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/.flake8 new/google-api-core-1.13.0/.flake8
--- old/google-api-core-1.11.0/.flake8 2018-12-03 18:45:52.000000000 +0100
+++ new/google-api-core-1.13.0/.flake8 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-[flake8]
-import-order-style=google
-# Note: this forces all google imports to be in the third group. See
-# https://github.com/PyCQA/flake8-import-order/issues/111
-application-import-names=google
-ignore = E203, E266, E501, W503
-exclude =
- __pycache__,
- .git,
- *.pyc,
- conf.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/CHANGELOG.md new/google-api-core-1.13.0/CHANGELOG.md
--- old/google-api-core-1.11.0/CHANGELOG.md 2019-05-15 19:57:02.000000000 +0200
+++ new/google-api-core-1.13.0/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100
@@ -1,281 +0,0 @@
-# Changelog
-
-[PyPI History][1]
-
-[1]: https://pypi.org/project/google-api-core/#history
-
-## 1.11.0
-
-05-15-2019 10:29 PDT
-
-### New Features
-
-- Refactor 'client_info' support. ([#7849](https://github.com/googleapis/google-cloud-python/pull/7849))
-
-## 1.10.0
-
-04-29-2019 10:12 PDT
-
-### Implementation Changes
-
-- Append leading zeros for nanosecond precision DateTimes
- ([#7663](https://github.com/googleapis/google-cloud-python/pull/7663))
-
-### New Features
-
-- Add `user_agent` property to `ClientInfo`
- ([#7799](https://github.com/googleapis/google-cloud-python/pull/7799))
-
-## 1.9.0
-
-04-05-2019 10:38 PDT
-
-
-### Implementation Changes
-- Allow passing metadata as part of creating a bidi ([#7514](https://github.com/googleapis/google-cloud-python/pull/7514))
-
-### Internal / Testing Changes
-- Update setup.py
-- API Core: specify a pytype output directory in setup.cfg. ([#7639](https://github.com/googleapis/google-cloud-python/pull/7639))
-
-## 1.8.2
-
-03-22-2019 16:27 PDT
-
-
-### Implementation Changes
-- Remove classifier for Python 3.4 for end-of-life. ([#7535](https://github.com/googleapis/google-cloud-python/pull/7535))
-
-### Internal / Testing Changes
-- When re-opening a `ResumableBidiRPC` set `_request_queue_generator` to `None`. ([#7548](https://github.com/googleapis/google-cloud-python/pull/7548))
-
-## 1.8.1
-
-03-12-2019 12:45 PDT
-
-### Implementation Changes
-- Protect the creation of a background thread in BackgroundConsumer and wait on it starting. ([#7499](https://github.com/googleapis/google-cloud-python/pull/7499))
-
-## 1.8.0
-
-02-23-2019 15:46 PST
-
-
-### New Features
-- Add support to unwrap Anys into wrapped pb2 objects. ([#7430](https://github.com/googleapis/google-cloud-python/pull/7430))
-- Add `Operation.deserialize`. ([#7427](https://github.com/googleapis/google-cloud-python/pull/7427))
-
-### Documentation
-- Updated client library documentation URLs. ([#7307](https://github.com/googleapis/google-cloud-python/pull/7307))
-
-### Internal / Testing Changes
-- Fix new lint failure. ([#7382](https://github.com/googleapis/google-cloud-python/pull/7382))
-
-## 1.7.0
-
-12-17-2018 13:56 PST
-
-### New Features
-- Support converting `DatetimeWithNanos` to / from `google.protobuf.timestamp_pb2.Timestamp`. ([#6919](https://github.com/googleapis/google-cloud-python/pull/6919))
-
-### Documentation
-- Document Python 2 deprecation. ([#6910](https://github.com/googleapis/google-cloud-python/pull/6910))
-- Add usage example for `google.api_core.iam.Polcy`. ([#6855](https://github.com/googleapis/google-cloud-python/pull/6855))
-
-### Internal / Testing Changes
-- Work around pytype big for `ABCMeta.register`. ([#6873](https://github.com/googleapis/google-cloud-python/pull/6873))
-
-## 1.6.0
-
-11-30-2018 12:45 PST
-
-
-### Implementation Changes
-- Import stdlib ABCs from 'collections.abc' rather than 'collections'. ([#6451](https://github.com/googleapis/google-cloud-python/pull/6451))
-
-### New Features
-- Move google.cloud.iam (core) to google.api_core.iam ([#6740](https://github.com/googleapis/google-cloud-python/pull/6740))
-- Add bidi support to api_core. ([#6191](https://github.com/googleapis/google-cloud-python/pull/6191))
-
-### Documentation
-- Fix typo ([#6532](https://github.com/googleapis/google-cloud-python/pull/6532))
-
-### Internal / Testing Changes
-- blacken api_core and core ([#6668](https://github.com/googleapis/google-cloud-python/pull/6668))
-
-## 1.5.2
-
-11-09-2018 14:22 PST
-
-
-### Implementation Changes
-- Retry transient errors in 'PollingFuture.result'. ([#6305](https://github.com/googleapis/google-cloud-python/pull/6305))
-
-### Dependencies
-- Remove hyphen from named extra in api_core. ([#6468](https://github.com/googleapis/google-cloud-python/pull/6468))
-- Bump minimum 'api_core' version for all GAPIC libs to 1.4.1. ([#6391](https://github.com/googleapis/google-cloud-python/pull/6391))
-- Avoid broken 'google-common-apis 1.5.4' release. ([#6355](https://github.com/googleapis/google-cloud-python/pull/6355))
-
-## 1.5.1
-
-10-29-2018 13:29 PDT
-
-### Implementation Changes
-- Don't URL-encode slashes in gRPC request headers. ([#6310](https://github.com/googleapis/google-cloud-python/pull/6310))
-
-### Internal / Testing Changes
-- Back out changes from [#6267](https://github.com/googleapis/google-cloud-python/pull/6267) / `api_core-1.6.0a1` release. ([#6328](https://github.com/googleapis/google-cloud-python/pull/6328))
-
-## 1.5.0
-
-### New Features
-- Add bidi, Bidirection Streaming, to api-core ([#6211](https://github.com/GoogleCloudPlatform/google-cloud-python/pull/6211))
-
-### Internal / Testing Changes
-- Use new Nox ([#6175](https://github.com/GoogleCloudPlatform/google-cloud-python/pull/6175))
-
-## 1.4.1
-
-### Dependencies
-- Pin minimum protobuf dependency to 3.4.0. ([#6132](https://github.com/GoogleCloudPlatform/google-cloud-python/pull/6132))
-
-### Internal / Testing Changes
-- Add type-checking via pytype to api_core. ([#6116](https://github.com/GoogleCloudPlatform/google-cloud-python/pull/6116))
-
-## 1.4.0
-
-### Dependencies
-
-- Add support for gRPC connection management (available when using optional grpc_gcp dependency) ([#5553](https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5553)) ([#5904](https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5904))
-- Update classifiers to drop Python 3.4 and add Python 3.7 ([#5702](https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5702))
-
-## 1.3.0
-
-### New Features
-
-- Add protobuf_helpers.field_mask to calculate a field mask from two messages (#5320)
-
-## 1.2.1
-
-### Implementation Changes
-- Make client_info work without gRPC installed. (#5075)
-- Rename `x-goog-header-params` to `x-goog-request-params` (#5495)
-
-## 1.2.0
-
-### Implementation Changes
-- Add close method to grpc Channel (#5333)
-
-### Internal / Testing Changes
-- Fix tests after grpcio update (#5333)
-- Add Test runs for Python 3.7 and remove 3.4 (#5295)
-
-## 1.1.2
-
-### Packaging
-- Update setuptools before packaging (#5265)
-
-## 1.1.1
-
-### Internal / Testing Changes
-- Use `install_requires` for platform dependencies instead of `extras_require` (#4991)
-- Update trove classifer to '5 - Production/Stable'
-
-## 1.1.0
-
-### Interface additions
-
-- Add `datetime_helpers.DatetimeWithNanoSeconds` (#4979)
-
-### Implementation changes
-
-- Use a class to wrap grpc streaming errors instead of monkey-patching (#4995)
-
-## 1.0.0
-
-This is the stable v1.0.0 release of google-api-core for Python. Releases after
-this will not contain breaking changes.
-
-### Interface changes and additions
-
-- Made `api_core.page_iterator.PageIterator.item_to_value` public
-- Added ability to specify retry for `Operation` and `polling.Future`. (#4922)
-
-## 0.1.4
-
-### New Features
-
-- Add `ChannelStub` to `grpc_helpers` for testing gRPC-based clients. (#4705)
-
-### Notable Implementation Changes
-
-- Fix handling of gapic metadata when specified as `None`. (#4701)
-
-## 0.1.3
-
-### Notable Implementation Changes
-
-- Apply scopes to explicitly provided credentials if needed (#4594).
-- Removing `google.api_core.gapic_v1.method.METRICS_METADATA_KEY`. It
- can be accessed via
- `google.api_core.gapic_v1.client_info.METRICS_METADATA_KEY` (#4588).
-
-### Dependencies
-
-- Upgrading to latest `grpcio==1.8.2` (#4642). For details, see
- related gRPC [bug](https://github.com/grpc/grpc/issues/9688)
- and [fix](https://github.com/grpc/grpc/pull/13665).
-
-PyPI: https://pypi.org/project/google-api-core/0.1.3/
-
-## 0.1.2
-
-- Upgrading `concurrent.futures` backport from `>= 3.0.0`
- to `>= 3.2.0` (#4521).
-- Moved `datetime`-related helpers from `google.cloud.core` to
- `google.api_core.datetime_helpers` (#4399).
-- Added missing `client_info` to `gapic_v1/__init__.py`'s
- `__all__` (#4567).
-- Added helpers for routing headers to `gapic_v1` (#4336).
-
-PyPI: https://pypi.org/project/google-api-core/0.1.2/
-
-## 0.1.1
-
-### Dependencies
-
-- Upgrading `grpcio` dependency from `1.2.0, < 1.6dev` to `>= 1.7.0` (#4280)
-
-PyPI: https://pypi.org/project/google-api-core/0.1.1/
-
-## 0.1.0
-
-Initial release
-
-Prior to being separated, this package was developed in `google-cloud-core`, so
-relevant changes from that package are included here.
-
-- Add google.api.core.gapic_v1.config (#4022)
-- Add google.api.core.helpers.grpc_helpers (#4041)
-- Add google.api.core.gapic_v1.method (#4057)
-- Add wrap_with_paging (#4067)
-- Add grpc_helpers.create_channel (#4069)
-- Add DEFAULT sentinel for gapic_v1.method (#4079)
-- Remove `googleapis-common-protos` from deps in non-`core` packages. (#4098)
-- Add google.api.core.operations_v1 (#4081)
-- Fix test assertion in test_wrap_method_with_overriding_retry_deadline (#4131)
-- Add google.api.core.helpers.general_helpers.wraps (#4166)
-- Update Docs with Python Setup Guide (#4187)
-- Move modules in google.api.core.helpers up one level, delete google.api.core.helpers. (#4196)
-- Clarify that PollingFuture timeout is in seconds. (#4201)
-- Add api_core package (#4210)
-- Replace usage of google.api.core with google.api_core (#4221)
-- Add google.api_core.gapic_v2.client_info (#4225)
-- Fix how api_core.operation populates exception errors (#4231)
-- Fix bare except (#4250)
-- Fix parsing of API errors with Unicode err message (#4251)
-- Port gax proto helper methods (#4249)
-- Remove gapic_v1.method.wrap_with_paging (#4257)
-- Add final set of protobuf helpers to api_core (#4259)
-
-PyPI: https://pypi.org/project/google-api-core/0.1.0/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/PKG-INFO new/google-api-core-1.13.0/PKG-INFO
--- old/google-api-core-1.11.0/PKG-INFO 2019-05-15 20:00:54.000000000 +0200
+++ new/google-api-core-1.13.0/PKG-INFO 2019-06-24 23:08:07.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: google-api-core
-Version: 1.11.0
+Version: 1.13.0
Summary: Google API client core library
Home-page: https://github.com/GoogleCloudPlatform/google-cloud-python
Author: Google LLC
@@ -44,5 +44,5 @@
Classifier: Topic :: Internet
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
Provides-Extra: grpcio-gcp
-Provides-Extra: grpc
Provides-Extra: grpcgcp
+Provides-Extra: grpc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/google/api_core/bidi.py new/google-api-core-1.13.0/google/api_core/bidi.py
--- old/google-api-core-1.11.0/google/api_core/bidi.py 2019-05-15 19:22:09.000000000 +0200
+++ new/google-api-core-1.13.0/google/api_core/bidi.py 2019-06-24 23:05:41.000000000 +0200
@@ -14,8 +14,11 @@
"""Bi-directional streaming RPC helpers."""
+import collections
+import datetime
import logging
import threading
+import time
from six.moves import queue
@@ -134,6 +137,73 @@
yield item
+class _Throttle(object):
+ """A context manager limiting the total entries in a sliding time window.
+
+ If more than ``access_limit`` attempts are made to enter the context manager
+ instance in the last ``time window`` interval, the exceeding requests block
+ until enough time elapses.
+
+ The context manager instances are thread-safe and can be shared between
+ multiple threads. If multiple requests are blocked and waiting to enter,
+ the exact order in which they are allowed to proceed is not determined.
+
+ Example::
+
+ max_three_per_second = _Throttle(
+ access_limit=3, time_window=datetime.timedelta(seconds=1)
+ )
+
+ for i in range(5):
+ with max_three_per_second as time_waited:
+ print("{}: Waited {} seconds to enter".format(i, time_waited))
+
+ Args:
+ access_limit (int): the maximum number of entries allowed in the time window
+ time_window (datetime.timedelta): the width of the sliding time window
+ """
+
+ def __init__(self, access_limit, time_window):
+ if access_limit < 1:
+ raise ValueError("access_limit argument must be positive")
+
+ if time_window <= datetime.timedelta(0):
+ raise ValueError("time_window argument must be a positive timedelta")
+
+ self._time_window = time_window
+ self._access_limit = access_limit
+ self._past_entries = collections.deque(maxlen=access_limit) # least recent first
+ self._entry_lock = threading.Lock()
+
+ def __enter__(self):
+ with self._entry_lock:
+ cutoff_time = datetime.datetime.now() - self._time_window
+
+ # drop the entries that are too old, as they are no longer relevant
+ while self._past_entries and self._past_entries[0] < cutoff_time:
+ self._past_entries.popleft()
+
+ if len(self._past_entries) < self._access_limit:
+ self._past_entries.append(datetime.datetime.now())
+ return 0.0 # no waiting was needed
+
+ to_wait = (self._past_entries[0] - cutoff_time).total_seconds()
+ time.sleep(to_wait)
+
+ self._past_entries.append(datetime.datetime.now())
+ return to_wait
+
+ def __exit__(self, *_):
+ pass
+
+ def __repr__(self):
+ return "{}(access_limit={}, time_window={})".format(
+ self.__class__.__name__,
+ self._access_limit,
+ repr(self._time_window),
+ )
+
+
class BidiRpc(object):
"""A helper for consuming a bi-directional streaming RPC.
@@ -323,15 +393,31 @@
whenever an error is encountered on the stream.
metadata Sequence[Tuple(str, str)]: RPC metadata to include in
the request.
+ throttle_reopen (bool): If ``True``, throttling will be applied to
+ stream reopen calls. Defaults to ``False``.
"""
- def __init__(self, start_rpc, should_recover, initial_request=None, metadata=None):
+ def __init__(
+ self,
+ start_rpc,
+ should_recover,
+ initial_request=None,
+ metadata=None,
+ throttle_reopen=False,
+ ):
super(ResumableBidiRpc, self).__init__(start_rpc, initial_request, metadata)
self._should_recover = should_recover
self._operational_lock = threading.RLock()
self._finalized = False
self._finalize_lock = threading.Lock()
+ if throttle_reopen:
+ self._reopen_throttle = _Throttle(
+ access_limit=5, time_window=datetime.timedelta(seconds=10),
+ )
+ else:
+ self._reopen_throttle = None
+
def _finalize(self, result):
with self._finalize_lock:
if self._finalized:
@@ -374,7 +460,11 @@
# retryable error.
try:
- self.open()
+ if self._reopen_throttle:
+ with self._reopen_throttle:
+ self.open()
+ else:
+ self.open()
# If re-opening or re-calling the method fails for any reason,
# consider it a terminal error and finalize the stream.
except Exception as exc:
@@ -573,7 +663,7 @@
thread = threading.Thread(
name=_BIDIRECTIONAL_CONSUMER_NAME,
target=self._thread_main,
- args=(ready,)
+ args=(ready,),
)
thread.daemon = True
thread.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/google/api_core/client_options.py new/google-api-core-1.13.0/google/api_core/client_options.py
--- old/google-api-core-1.11.0/google/api_core/client_options.py 1970-01-01 01:00:00.000000000 +0100
+++ new/google-api-core-1.13.0/google/api_core/client_options.py 2019-06-24 23:05:41.000000000 +0200
@@ -0,0 +1,48 @@
+# Copyright 2019 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Client options class.
+
+Client options provide a consistent interface for user options to be defined
+across clients.
+"""
+
+
+class ClientOptions(object):
+ """Client Options used to set options on clients.
+
+ Args:
+ api_endpoint (str): The desired API endpoint, e.g., compute.googleapis.com
+ """
+
+ def __init__(self, api_endpoint=None):
+ self.api_endpoint = api_endpoint
+
+
+def from_dict(options):
+ """Construct a client options object from a dictionary.
+
+ Args:
+ options (dict): A dictionary with client options.
+ """
+
+ client_options = ClientOptions()
+
+ for key, value in options.items():
+ if hasattr(client_options, key):
+ setattr(client_options, key, value)
+ else:
+ raise ValueError("ClientOptions does not accept an option '" + key + "'")
+
+ return client_options
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/google/api_core/general_helpers.py new/google-api-core-1.13.0/google/api_core/general_helpers.py
--- old/google-api-core-1.11.0/google/api_core/general_helpers.py 2018-12-03 18:45:52.000000000 +0100
+++ new/google-api-core-1.13.0/google/api_core/general_helpers.py 2019-06-24 23:05:41.000000000 +0200
@@ -26,7 +26,8 @@
def wraps(wrapped):
"""A functools.wraps helper that handles partial objects on Python 2."""
- if isinstance(wrapped, functools.partial):
+ # https://github.com/google/pytype/issues/322
+ if isinstance(wrapped, functools.partial): # pytype: disable=wrong-arg-types
return six.wraps(wrapped, assigned=_PARTIAL_VALID_ASSIGNMENTS)
else:
return six.wraps(wrapped)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/google/api_core/retry.py new/google-api-core-1.13.0/google/api_core/retry.py
--- old/google-api-core-1.11.0/google/api_core/retry.py 2018-12-03 18:45:52.000000000 +0100
+++ new/google-api-core-1.13.0/google/api_core/retry.py 2019-06-24 23:05:41.000000000 +0200
@@ -98,7 +98,9 @@
# Pylint sees this as a constant, but it is also an alias that should be
# considered a function.
if_transient_error = if_exception_type(
- (exceptions.InternalServerError, exceptions.TooManyRequests)
+ exceptions.InternalServerError,
+ exceptions.TooManyRequests,
+ exceptions.ServiceUnavailable,
)
"""A predicate that checks if an exception is a transient API error.
@@ -107,6 +109,7 @@
- :class:`google.api_core.exceptions.InternalServerError` - HTTP 500, gRPC
``INTERNAL(13)`` and its subclasses.
- :class:`google.api_core.exceptions.TooManyRequests` - HTTP 429
+- :class:`google.api_core.exceptions.ServiceUnavailable` - HTTP 503
- :class:`google.api_core.exceptions.ResourceExhausted` - gRPC
``RESOURCE_EXHAUSTED(8)``
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/google_api_core.egg-info/PKG-INFO new/google-api-core-1.13.0/google_api_core.egg-info/PKG-INFO
--- old/google-api-core-1.11.0/google_api_core.egg-info/PKG-INFO 2019-05-15 20:00:54.000000000 +0200
+++ new/google-api-core-1.13.0/google_api_core.egg-info/PKG-INFO 2019-06-24 23:08:06.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: google-api-core
-Version: 1.11.0
+Version: 1.13.0
Summary: Google API client core library
Home-page: https://github.com/GoogleCloudPlatform/google-cloud-python
Author: Google LLC
@@ -44,5 +44,5 @@
Classifier: Topic :: Internet
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
Provides-Extra: grpcio-gcp
-Provides-Extra: grpc
Provides-Extra: grpcgcp
+Provides-Extra: grpc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/google_api_core.egg-info/SOURCES.txt new/google-api-core-1.13.0/google_api_core.egg-info/SOURCES.txt
--- old/google-api-core-1.11.0/google_api_core.egg-info/SOURCES.txt 2019-05-15 20:00:54.000000000 +0200
+++ new/google-api-core-1.13.0/google_api_core.egg-info/SOURCES.txt 2019-06-24 23:08:06.000000000 +0200
@@ -1,16 +1,13 @@
-.coveragerc
-.flake8
-CHANGELOG.md
LICENSE
MANIFEST.in
README.rst
-noxfile.py
setup.cfg
setup.py
google/__init__.py
google/api_core/__init__.py
google/api_core/bidi.py
google/api_core/client_info.py
+google/api_core/client_options.py
google/api_core/datetime_helpers.py
google/api_core/exceptions.py
google/api_core/general_helpers.py
@@ -45,6 +42,7 @@
tests/unit/__init__.py
tests/unit/test_bidi.py
tests/unit/test_client_info.py
+tests/unit/test_client_options.py
tests/unit/test_datetime_helpers.py
tests/unit/test_exceptions.py
tests/unit/test_general_helpers.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/google_api_core.egg-info/requires.txt new/google-api-core-1.13.0/google_api_core.egg-info/requires.txt
--- old/google-api-core-1.11.0/google_api_core.egg-info/requires.txt 2019-05-15 20:00:54.000000000 +0200
+++ new/google-api-core-1.13.0/google_api_core.egg-info/requires.txt 2019-06-24 23:08:06.000000000 +0200
@@ -10,7 +10,7 @@
futures>=3.2.0
[grpc]
-grpcio>=1.8.2
+grpcio<2.0dev,>=1.8.2
[grpcgcp]
grpcio-gcp>=0.2.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/noxfile.py new/google-api-core-1.13.0/noxfile.py
--- old/google-api-core-1.11.0/noxfile.py 2019-05-15 19:22:09.000000000 +0200
+++ new/google-api-core-1.13.0/noxfile.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,105 +0,0 @@
-# Copyright 2016 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from __future__ import absolute_import
-import os
-
-# https://github.com/google/importlab/issues/25
-import nox # pytype: disable=import-error
-
-
-def default(session):
- """Default unit test session.
-
- This is intended to be run **without** an interpreter set, so
- that the current ``python`` (on the ``PATH``) or the version of
- Python corresponding to the ``nox`` binary the ``PATH`` can
- run the tests.
- """
- # Install all test dependencies, then install this package in-place.
- session.install("mock", "pytest", "pytest-cov", "grpcio >= 1.0.2")
- session.install("-e", ".")
-
- # Run py.test against the unit tests.
- session.run(
- "py.test",
- "--quiet",
- "--cov=google.api_core",
- "--cov=tests.unit",
- "--cov-append",
- "--cov-config=.coveragerc",
- "--cov-report=",
- "--cov-fail-under=97",
- os.path.join("tests", "unit"),
- *session.posargs
- )
-
-
-(a)nox.session(python=["2.7", "3.5", "3.6", "3.7"])
-def unit(session):
- """Run the unit test suite."""
- default(session)
-
-
-(a)nox.session(python=["2.7", "3.5", "3.6", "3.7"])
-def unit_grpc_gcp(session):
- """Run the unit test suite with grpcio-gcp installed."""
-
- # Install grpcio-gcp
- session.install("grpcio-gcp")
-
- default(session)
-
-
-(a)nox.session(python="3.6")
-def lint(session):
- """Run linters.
-
- Returns a failure if the linters find linting errors or sufficiently
- serious code quality issues.
- """
- session.install("flake8", "flake8-import-order")
- session.install(".")
- session.run("flake8", "google", "tests")
-
-
-(a)nox.session(python="3.6")
-def lint_setup_py(session):
- """Verify that setup.py is valid (including RST check)."""
-
- session.install("docutils", "Pygments")
- session.run("python", "setup.py", "check", "--restructuredtext", "--strict")
-
-
-# No 2.7 due to https://github.com/google/importlab/issues/26.
-# No 3.7 because pytype supports up to 3.6 only.
-(a)nox.session(python="3.6")
-def pytype(session):
- """Run type-checking."""
- session.install(
- ".", "grpcio >= 1.8.2", "grpcio-gcp >= 0.2.2", "pytype >= 2019.3.21"
- )
- session.run("pytype")
-
-
-(a)nox.session(python="3.6")
-def cover(session):
- """Run the final coverage report.
-
- This outputs the coverage report aggregating coverage from the unit
- test runs (not system test runs), and then erases coverage data.
- """
- session.install("coverage", "pytest-cov")
- session.run("coverage", "report", "--show-missing", "--fail-under=100")
- session.run("coverage", "erase")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/setup.py new/google-api-core-1.13.0/setup.py
--- old/google-api-core-1.11.0/setup.py 2019-05-15 19:57:02.000000000 +0200
+++ new/google-api-core-1.13.0/setup.py 2019-06-24 23:05:41.000000000 +0200
@@ -22,7 +22,7 @@
name = "google-api-core"
description = "Google API client core library"
-version = "1.11.0"
+version = "1.13.0"
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'
@@ -39,7 +39,7 @@
'futures >= 3.2.0; python_version < "3.2"',
]
extras = {
- "grpc": "grpcio >= 1.8.2",
+ "grpc": "grpcio >= 1.8.2, < 2.0dev",
"grpcgcp": "grpcio-gcp >= 0.2.2",
"grpcio-gcp": "grpcio-gcp >= 0.2.2",
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/tests/unit/test_bidi.py new/google-api-core-1.13.0/tests/unit/test_bidi.py
--- old/google-api-core-1.11.0/tests/unit/test_bidi.py 2019-05-15 19:22:09.000000000 +0200
+++ new/google-api-core-1.13.0/tests/unit/test_bidi.py 2019-06-24 23:05:41.000000000 +0200
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import datetime
import logging
import threading
@@ -116,6 +117,87 @@
assert items == []
+class Test_Throttle(object):
+ def test_repr(self):
+ delta = datetime.timedelta(seconds=4.5)
+ instance = bidi._Throttle(access_limit=42, time_window=delta)
+ assert repr(instance) == \
+ "_Throttle(access_limit=42, time_window={})".format(repr(delta))
+
+ def test_raises_error_on_invalid_init_arguments(self):
+ with pytest.raises(ValueError) as exc_info:
+ bidi._Throttle(
+ access_limit=10, time_window=datetime.timedelta(seconds=0.0)
+ )
+ assert "time_window" in str(exc_info.value)
+ assert "must be a positive timedelta" in str(exc_info.value)
+
+ with pytest.raises(ValueError) as exc_info:
+ bidi._Throttle(
+ access_limit=0, time_window=datetime.timedelta(seconds=10)
+ )
+ assert "access_limit" in str(exc_info.value)
+ assert "must be positive" in str(exc_info.value)
+
+ def test_does_not_delay_entry_attempts_under_threshold(self):
+ throttle = bidi._Throttle(
+ access_limit=3, time_window=datetime.timedelta(seconds=1)
+ )
+ entries = []
+
+ for _ in range(3):
+ with throttle as time_waited:
+ entry_info = {
+ "entered_at": datetime.datetime.now(),
+ "reported_wait": time_waited,
+ }
+ entries.append(entry_info)
+
+ # check the reported wait times ...
+ assert all(entry["reported_wait"] == 0.0 for entry in entries)
+
+ # .. and the actual wait times
+ delta = entries[1]["entered_at"] - entries[0]["entered_at"]
+ assert delta.total_seconds() < 0.1
+ delta = entries[2]["entered_at"] - entries[1]["entered_at"]
+ assert delta.total_seconds() < 0.1
+
+ def test_delays_entry_attempts_above_threshold(self):
+ throttle = bidi._Throttle(
+ access_limit=3, time_window=datetime.timedelta(seconds=1)
+ )
+ entries = []
+
+ for _ in range(6):
+ with throttle as time_waited:
+ entry_info = {
+ "entered_at": datetime.datetime.now(),
+ "reported_wait": time_waited,
+ }
+ entries.append(entry_info)
+
+ # For each group of 4 consecutive entries the time difference between
+ # the first and the last entry must have been greater than time_window,
+ # because a maximum of 3 are allowed in each time_window.
+ for i, entry in enumerate(entries[3:], start=3):
+ first_entry = entries[i - 3]
+ delta = entry["entered_at"] - first_entry["entered_at"]
+ assert delta.total_seconds() > 1.0
+
+ # check the reported wait times
+ # (NOTE: not using assert all(...), b/c the coverage check would complain)
+ for i, entry in enumerate(entries):
+ if i != 3:
+ assert entry["reported_wait"] == 0.0
+
+ # The delayed entry is expected to have been delayed for a significant
+ # chunk of the full second, and the actual and reported delay times
+ # should reflect that.
+ assert entries[3]["reported_wait"] > 0.7
+ delta = entries[3]["entered_at"] - entries[2]["entered_at"]
+ assert delta.total_seconds() > 0.7
+
+
class _CallAndFuture(grpc.Call, grpc.Future):
pass
@@ -442,6 +524,22 @@
assert bidi_rpc.is_active is False
callback.assert_called_once_with(error2)
+ def test_using_throttle_on_reopen_requests(self):
+ call = CallStub([])
+ start_rpc = mock.create_autospec(
+ grpc.StreamStreamMultiCallable, instance=True, return_value=call
+ )
+ should_recover = mock.Mock(spec=["__call__"], return_value=True)
+ bidi_rpc = bidi.ResumableBidiRpc(
+ start_rpc, should_recover, throttle_reopen=True
+ )
+
+ patcher = mock.patch.object(bidi_rpc._reopen_throttle.__class__, "__enter__")
+ with patcher as mock_enter:
+ bidi_rpc._reopen()
+
+ mock_enter.assert_called_once()
+
def test_send_not_open(self):
bidi_rpc = bidi.ResumableBidiRpc(None, lambda _: False)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/tests/unit/test_client_options.py new/google-api-core-1.13.0/tests/unit/test_client_options.py
--- old/google-api-core-1.11.0/tests/unit/test_client_options.py 1970-01-01 01:00:00.000000000 +0100
+++ new/google-api-core-1.13.0/tests/unit/test_client_options.py 2019-06-24 23:05:41.000000000 +0200
@@ -0,0 +1,36 @@
+# Copyright 2019 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import pytest
+
+from google.api_core import client_options
+
+
+def test_constructor():
+ options = client_options.ClientOptions(api_endpoint="foo.googleapis.com")
+
+ assert options.api_endpoint == "foo.googleapis.com"
+
+
+def test_from_dict():
+ options = client_options.from_dict({"api_endpoint": "foo.googleapis.com"})
+
+ assert options.api_endpoint == "foo.googleapis.com"
+
+
+def test_from_dict_bad_argument():
+ with pytest.raises(ValueError):
+ client_options.from_dict(
+ {"api_endpoint": "foo.googleapis.com", "bad_arg": "1234"}
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/tests/unit/test_datetime_helpers.py new/google-api-core-1.13.0/tests/unit/test_datetime_helpers.py
--- old/google-api-core-1.11.0/tests/unit/test_datetime_helpers.py 2019-05-15 19:25:15.000000000 +0200
+++ new/google-api-core-1.13.0/tests/unit/test_datetime_helpers.py 2019-06-24 23:05:41.000000000 +0200
@@ -270,6 +270,24 @@
assert stamp == expected
@staticmethod
+ @pytest.mark.parametrize(
+ "fractional, nanos",
+ [
+ ("12345678", 123456780),
+ ("1234567", 123456700),
+ ("123456", 123456000),
+ ("12345", 123450000),
+ ("1234", 123400000),
+ ("123", 123000000),
+ ("12", 120000000),
+ ("1", 100000000),
+ ],
+ )
+ def test_from_rfc3339_test_nanoseconds(fractional, nanos):
+ value = "2009-12-17T12:44:32.{}Z".format(fractional)
+ assert datetime_helpers.DatetimeWithNanoseconds.from_rfc3339(value).nanosecond == nanos
+
+ @staticmethod
def test_timestamp_pb_wo_nanos_naive():
stamp = datetime_helpers.DatetimeWithNanoseconds(
2016, 12, 20, 21, 13, 47, 123456)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-1.11.0/tests/unit/test_retry.py new/google-api-core-1.13.0/tests/unit/test_retry.py
--- old/google-api-core-1.11.0/tests/unit/test_retry.py 2018-12-03 18:45:52.000000000 +0100
+++ new/google-api-core-1.13.0/tests/unit/test_retry.py 2019-06-24 23:05:41.000000000 +0200
@@ -41,6 +41,7 @@
def test_if_transient_error():
assert retry.if_transient_error(exceptions.InternalServerError(""))
assert retry.if_transient_error(exceptions.TooManyRequests(""))
+ assert retry.if_transient_error(exceptions.ServiceUnavailable(""))
assert not retry.if_transient_error(exceptions.InvalidArgument(""))
1
0
Hello community,
here is the log from the commit of package python-exiv2 for openSUSE:Factory checked in at 2019-07-04 15:43:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-exiv2 (Old)
and /work/SRC/openSUSE:Factory/.python-exiv2.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-exiv2"
Thu Jul 4 15:43:00 2019 rev:5 rq:713077 version:0.7.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-exiv2/python-exiv2.changes 2019-04-23 14:35:23.725444879 +0200
+++ /work/SRC/openSUSE:Factory/.python-exiv2.new.4615/python-exiv2.changes 2019-07-04 15:43:01.598086256 +0200
@@ -1,0 +2,6 @@
+Tue Jul 2 14:47:21 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 0.7.1:
+ * Various fixes to work with new exiv releases
+
+-------------------------------------------------------------------
Old:
----
py3exiv2-0.6.1.tar.gz
New:
----
py3exiv2-0.7.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-exiv2.spec ++++++
--- /var/tmp/diff_new_pack.d6CFe7/_old 2019-07-04 15:43:02.582087794 +0200
+++ /var/tmp/diff_new_pack.d6CFe7/_new 2019-07-04 15:43:02.582087794 +0200
@@ -20,7 +20,7 @@
# This is a python3 only package
%define skip_python2 1
Name: python-exiv2
-Version: 0.6.1
+Version: 0.7.1
Release: 0
Summary: Python3 bindings for the exiv2 library
License: GPL-3.0-only
++++++ py3exiv2-0.6.1.tar.gz -> py3exiv2-0.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/DESCRIPTION.rst new/py3exiv2-0.7.1/DESCRIPTION.rst
--- old/py3exiv2-0.6.1/DESCRIPTION.rst 2019-02-06 15:38:28.000000000 +0100
+++ new/py3exiv2-0.7.1/DESCRIPTION.rst 2015-02-04 14:56:25.000000000 +0100
@@ -9,8 +9,6 @@
python3-exiv2 is distributed under the GPL version 3 license.
-[![Downloads](https://pepy.tech/badge/py3exiv2)](https://pepy.tech/project/py3exiv2)
-
The main content of the code was initially written by Olivier Tilloy for Python 2 under the name pyexiv2.
py3exiv2 depends on the following libraries:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/PKG-INFO new/py3exiv2-0.7.1/PKG-INFO
--- old/py3exiv2-0.6.1/PKG-INFO 2019-02-06 20:33:41.000000000 +0100
+++ new/py3exiv2-0.7.1/PKG-INFO 2019-05-29 12:22:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: py3exiv2
-Version: 0.6.1
+Version: 0.7.1
Summary: A Python3 binding to the library exiv2
Home-page: https://launchpad.net/py3exiv2
Author: Vincent Vande Vyvre
@@ -17,8 +17,6 @@
python3-exiv2 is distributed under the GPL version 3 license.
- [![Downloads](https://pepy.tech/badge/py3exiv2)](https://pepy.tech/project/py3exiv2)
-
The main content of the code was initially written by Olivier Tilloy for Python 2 under the name pyexiv2.
py3exiv2 depends on the following libraries:
@@ -46,3 +44,4 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/README new/py3exiv2-0.7.1/README
--- old/py3exiv2-0.6.1/README 2018-05-15 11:11:47.000000000 +0200
+++ new/py3exiv2-0.7.1/README 2019-04-13 10:44:33.000000000 +0200
@@ -1,5 +1,5 @@
py3exiv2
-********
+*******
Welcome to py3exiv2, a python 3 binding to exiv2 (http://exiv2.org/) the C++
library for manipulation of EXIF, IPTC and XMP image metadata.
@@ -16,13 +16,17 @@
py3exiv2 depends on the following libraries:
- * python (≥ 3.2)
+ * python (≥ 3.3)
* boost.python3 (http://www.boost.org/libs/python/doc/index.html)
* exiv2 (http://www.exiv2.org/)
+Some examples in src/ use PyGTK (http://www.pygtk.org/) and PyQt
+(http://www.riverbankcomputing.co.uk/software/pyqt/) to display image previews,
+those are optional dependencies.
+
This is a typical list of build dependencies for a Debian/Ubuntu system:
- * python-all-dev (≥ 3.2)
+ * python-all-dev (≥ 3.3)
* libexiv2-dev (≥ 0.20)
* libboost-python-dev (≥ 1.48)
* g++
@@ -72,7 +76,7 @@
=======
Copyright (C) 2006-2011 Olivier Tilloy <olivier(a)tilloy.net>
-Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
+Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
py3exiv2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License version 3 as published by the Free
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/setup.py new/py3exiv2-0.7.1/setup.py
--- old/py3exiv2-0.6.1/setup.py 2019-02-06 20:31:14.000000000 +0100
+++ new/py3exiv2-0.7.1/setup.py 2019-05-28 10:13:30.000000000 +0200
@@ -1,10 +1,14 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
+# Replacement setup.py for py3exiv2, that allows building on OSX
+# https://gist.github.com/ndevenish/6410cab393bd8dec1b016061ddb5573b
+
import sys
import os
import glob
import subprocess
+import platform
from setuptools import setup, find_packages, Extension
@@ -17,33 +21,28 @@
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_description = f.read()
-def get_libboost_name():
- """Returns the name of the lib libboost_python 3
-
- """
- # libboost libs are provided without .pc files, so we can't use pkg-config
- places = ('/usr/lib/', '/usr/local/lib/', '/usr/')
+def get_libboost_osx():
+ places = ["/usr/local/lib/"]
for place in places:
- cmd = ['find', place, '-name', 'libboost_python*']
- rep = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
- if not rep:
- continue
-
- # rep is type bytes
- libs = rep.decode(sys.getfilesystemencoding()).split('\n')
- for l in libs:
- _, l = os.path.split(l)
- if '.so' in l:
- l = l.split('.so')[0]
- # Assume there's no longer python2.3 in the wild
- if '3' in l[-2:]:
- return l.replace('libboost', 'boost')
+ lib = place + "libboost_python3*.dylib"
+ files = glob.glob(lib)
+ for f in files:
+ if not "-mt" in f:
+ return os.path.basename(f).replace("lib", "").split(".")[0]
+
+ print("NOT FOUND", files)
+ sys.exit()
+
+if platform.system() == "Darwin":
+ boostlib = get_libboost_osx()
+ print(boostlib)
-libboost = get_libboost_name()
+else:
+ boostlib = 'boost_python3'
setup(
name='py3exiv2',
- version='0.6.1',
+ version='0.7.1',
description='A Python3 binding to the library exiv2',
long_description=long_description,
url='https://launchpad.net/py3exiv2',
@@ -63,18 +62,17 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8'
],
keywords='exiv2 pyexiv2 EXIF IPTC XMP image metadata',
packages = find_packages('src'),
package_dir = {'': 'src'},
package_data={'':['src/*.cpp', 'src/*.hpp',]},
- #cmdclass={'install': install}
+ #cmdclass={'install': install},
ext_modules=[
Extension('libexiv2python',
['src/exiv2wrapper.cpp', 'src/exiv2wrapper_python.cpp'],
- include_dirs=[],
- library_dirs=[],
- libraries=[libboost, 'exiv2'],
+ libraries=[boostlib, 'exiv2'],
extra_compile_args=['-g']
)
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/exiv2wrapper.cpp new/py3exiv2-0.7.1/src/exiv2wrapper.cpp
--- old/py3exiv2-0.6.1/src/exiv2wrapper.cpp 2019-02-05 09:28:36.000000000 +0100
+++ new/py3exiv2-0.7.1/src/exiv2wrapper.cpp 2019-04-13 09:28:07.000000000 +0200
@@ -1835,6 +1835,42 @@
}
#endif
+bool initialiseXmpParser()
+{
+ if (!Exiv2::XmpParser::initialize())
+ return false;
+
+ std::string prefix("py3exiv2");
+ std::string name("www.py3exiv2.tuxfamily.org/");
+
+ try
+ {
+ const std::string& ns = Exiv2::XmpProperties::ns(prefix);
+ }
+
+ catch (Exiv2::Error& error)
+ {
+ // No namespace exists with the requested prefix, it is safe to
+ // register a new one.
+ Exiv2::XmpProperties::registerNs(name, prefix);
+ }
+
+ return true;
+}
+
+bool closeXmpParser()
+{
+ std::string name("www.py3exiv2.tuxfamily.org/");
+ const std::string& prefix = Exiv2::XmpProperties::prefix(name);
+ if (prefix != "")
+ {
+ Exiv2::XmpProperties::unregisterNs(name);
+ }
+
+ Exiv2::XmpParser::terminate();
+
+ return true;
+}
void registerXmpNs(const std::string& name, const std::string& prefix)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/exiv2wrapper.hpp new/py3exiv2-0.7.1/src/exiv2wrapper.hpp
--- old/py3exiv2-0.6.1/src/exiv2wrapper.hpp 2019-02-06 20:30:31.000000000 +0100
+++ new/py3exiv2-0.7.1/src/exiv2wrapper.hpp 2019-05-29 12:11:36.000000000 +0200
@@ -29,8 +29,7 @@
#include <string>
-#include "exiv2/image.hpp"
-#include "exiv2/preview.hpp"
+#include "exiv2/exiv2.hpp"
#include "boost/python.hpp"
@@ -285,6 +284,8 @@
// Functions to manipulate custom XMP namespaces
+bool initialiseXmpParser();
+bool closeXmpParser();
void registerXmpNs(const std::string& name, const std::string& prefix);
void unregisterXmpNs(const std::string& name);
void unregisterAllXmpNs();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/exiv2wrapper_python.cpp new/py3exiv2-0.7.1/src/exiv2wrapper_python.cpp
--- old/py3exiv2-0.6.1/src/exiv2wrapper_python.cpp 2019-02-05 09:41:52.000000000 +0100
+++ new/py3exiv2-0.7.1/src/exiv2wrapper_python.cpp 2019-05-28 10:09:33.000000000 +0200
@@ -24,6 +24,8 @@
*/
// *****************************************************************************
+#include<iostream>
+
#include "exiv2wrapper.hpp"
#include "exiv2/exv_conf.h"
@@ -157,6 +159,8 @@
.def("_getIptcCharset", &Image::getIptcCharset)
;
+ def("_initialiseXmpParser", initialiseXmpParser);
+ def("_closeXmpParser", closeXmpParser);
def("_registerXmpNs", registerXmpNs, args("name", "prefix"));
def("_unregisterXmpNs", unregisterXmpNs, args("name"));
def("_unregisterAllXmpNs", unregisterAllXmpNs);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/py3exiv2.egg-info/PKG-INFO new/py3exiv2-0.7.1/src/py3exiv2.egg-info/PKG-INFO
--- old/py3exiv2-0.6.1/src/py3exiv2.egg-info/PKG-INFO 2019-02-06 20:33:41.000000000 +0100
+++ new/py3exiv2-0.7.1/src/py3exiv2.egg-info/PKG-INFO 2019-05-29 12:22:11.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: py3exiv2
-Version: 0.6.1
+Version: 0.7.1
Summary: A Python3 binding to the library exiv2
Home-page: https://launchpad.net/py3exiv2
Author: Vincent Vande Vyvre
@@ -17,8 +17,6 @@
python3-exiv2 is distributed under the GPL version 3 license.
- [![Downloads](https://pepy.tech/badge/py3exiv2)](https://pepy.tech/project/py3exiv2)
-
The main content of the code was initially written by Olivier Tilloy for Python 2 under the name pyexiv2.
py3exiv2 depends on the following libraries:
@@ -46,3 +44,4 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/py3exiv2.egg-info/SOURCES.txt new/py3exiv2-0.7.1/src/py3exiv2.egg-info/SOURCES.txt
--- old/py3exiv2-0.6.1/src/py3exiv2.egg-info/SOURCES.txt 2019-02-06 20:33:41.000000000 +0100
+++ new/py3exiv2-0.7.1/src/py3exiv2.egg-info/SOURCES.txt 2019-05-29 12:22:11.000000000 +0200
@@ -1,7 +1,6 @@
DESCRIPTION.rst
MANIFEST.in
README
-setup.cfg
setup.py
src/exiv2wrapper.cpp
src/exiv2wrapper.hpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/pyexiv2/__init__.py new/py3exiv2-0.7.1/src/pyexiv2/__init__.py
--- old/py3exiv2-0.6.1/src/pyexiv2/__init__.py 2018-07-09 11:16:56.000000000 +0200
+++ new/py3exiv2-0.7.1/src/pyexiv2/__init__.py 2019-05-28 10:17:32.000000000 +0200
@@ -3,7 +3,7 @@
# ******************************************************************************
#
# Copyright (C) 2006-2011 Olivier Tilloy <olivier(a)tilloy.net>
-# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
+# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
#
# This file is part of the py3exiv2 distribution.
#
@@ -75,7 +75,7 @@
#: A tuple containing the three components of the version number: major, minor, micro.
-version_info = (0, 4, 0)
+version_info = (0, 7, 1)
#: The version of the module as a string (major.minor.micro).
__version__ = _make_version(version_info)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/pyexiv2/exif.py new/py3exiv2-0.7.1/src/pyexiv2/exif.py
--- old/py3exiv2-0.6.1/src/pyexiv2/exif.py 2018-02-02 14:19:27.000000000 +0100
+++ new/py3exiv2-0.7.1/src/pyexiv2/exif.py 2019-01-30 08:40:36.000000000 +0100
@@ -3,7 +3,7 @@
# ******************************************************************************
#
# Copyright (C) 2006-2011 Olivier Tilloy <olivier(a)tilloy.net>
-# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
+# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
#
# This file is part of the py3exiv2 distribution.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/pyexiv2/iptc.py new/py3exiv2-0.7.1/src/pyexiv2/iptc.py
--- old/py3exiv2-0.6.1/src/pyexiv2/iptc.py 2018-02-02 14:29:01.000000000 +0100
+++ new/py3exiv2-0.7.1/src/pyexiv2/iptc.py 2019-01-30 08:40:55.000000000 +0100
@@ -3,7 +3,7 @@
# ******************************************************************************
#
# Copyright (C) 2006-2011 Olivier Tilloy <olivier(a)tilloy.net>
-# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
+# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
#
# This file is part of the py3exiv2 distribution.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/pyexiv2/utils.py new/py3exiv2-0.7.1/src/pyexiv2/utils.py
--- old/py3exiv2-0.6.1/src/pyexiv2/utils.py 2018-02-02 15:26:42.000000000 +0100
+++ new/py3exiv2-0.7.1/src/pyexiv2/utils.py 2019-01-30 08:42:17.000000000 +0100
@@ -3,7 +3,7 @@
# ******************************************************************************
#
# Copyright (C) 2006-2012 Olivier Tilloy <olivier(a)tilloy.net>
-# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
+# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
#
# This file is part of the py3exiv2 distribution.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.6.1/src/pyexiv2/xmp.py new/py3exiv2-0.7.1/src/pyexiv2/xmp.py
--- old/py3exiv2-0.6.1/src/pyexiv2/xmp.py 2018-05-15 08:52:04.000000000 +0200
+++ new/py3exiv2-0.7.1/src/pyexiv2/xmp.py 2019-04-25 06:07:43.000000000 +0200
@@ -3,7 +3,7 @@
# ******************************************************************************
#
# Copyright (C) 2006-2011 Olivier Tilloy <olivier(a)tilloy.net>
-# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
+# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevyvre(a)oqapy.eu>
#
# This file is part of the py3exiv2 distribution.
#
@@ -522,6 +522,33 @@
self._tag = libexiv2python._XmpTag(key)
self.raw_value = raw_value
+def initialiseXmpParser():
+ """Initialise the xmp parser.
+
+ Calling this method is usually not needed, as encode() and decode() will
+ initialize the XMP Toolkit if necessary.
+
+ The function takes optional pointers to a callback function xmpLockFct and
+ related data pLockData that the parser uses when XMP namespaces are
+ subsequently registered.
+
+ This function itself still is not thread-safe and needs to be
+ called in a thread-safe manner (e.g., on program startup), but if used with
+ suitable additional locking parameters, any subsequent registration of
+ namespaces will be thread-safe.
+ """
+ libexiv2python._initialiseXmpParser()
+
+def closeXmpParser():
+ """Close the xmp parser.
+
+ Terminate the XMP Toolkit and unregister custom namespaces.
+
+ Call this method when the XmpParser is no longer needed to allow the XMP
+ Toolkit to cleanly shutdown.
+ """
+ libexiv2python._closeXmpParser()
+
def register_namespace(name, prefix):
"""Register a custom XMP namespace.
@@ -539,6 +566,8 @@
Raise ValueError: if the name doesn’t end with a ``/``
Raise KeyError: if a namespace already exist with this prefix
"""
+ # How to set the type of tag 'XmpAlt', 'XmpBag', 'XmpSeq'
+ # See: https://www.exiv2.org/doc/xmpsample_8cpp-example.html#a18
if not name.endswith('/'):
raise ValueError('Name should end with a /')
1
0
Hello community,
here is the log from the commit of package apache2-mod_fcgid for openSUSE:Factory checked in at 2019-07-04 15:42:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apache2-mod_fcgid (Old)
and /work/SRC/openSUSE:Factory/.apache2-mod_fcgid.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache2-mod_fcgid"
Thu Jul 4 15:42:57 2019 rev:31 rq:713070 version:2.3.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/apache2-mod_fcgid/apache2-mod_fcgid.changes 2017-05-20 10:14:27.713112995 +0200
+++ /work/SRC/openSUSE:Factory/.apache2-mod_fcgid.new.4615/apache2-mod_fcgid.changes 2019-07-04 15:42:58.814081906 +0200
@@ -1,0 +2,5 @@
+Tue Jun 25 13:53:57 UTC 2019 - pgajdos(a)suse.com
+
+- test via apache-rex instead
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ apache2-mod_fcgid.spec ++++++
--- /var/tmp/diff_new_pack.GjbRhu/_old 2019-07-04 15:42:59.738083350 +0200
+++ /var/tmp/diff_new_pack.GjbRhu/_new 2019-07-04 15:42:59.738083350 +0200
@@ -1,7 +1,7 @@
#
# spec file for package apache2-mod_fcgid
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -20,7 +20,7 @@
Version: 2.3.9
Release: 0
Summary: Alternative FastCGI module for Apache2
-License: GPL-2.0+
+License: GPL-2.0-or-later
Group: Productivity/Networking/Web/Servers
Url: http://httpd.apache.org/mod_fcgid/
Source: http://mirror.synyx.de/apache/httpd/mod_fcgid/mod_fcgid-%{version}.tar.bz2
@@ -31,7 +31,8 @@
BuildRequires: apache-rpm-macros
BuildRequires: apache2-devel
# for testing
-BuildRequires: curl
+BuildRequires: apache-rex
+%apache_rex_deps
BuildRequires: perl-FastCGI
Requires: %{apache_mmn}
Requires: %{apache_suse_maintenance_mmn}
@@ -67,62 +68,7 @@
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/apache2/fcgid/
%check
-set +x
-mkdir -p %{apache_test_module_dir}
-# create test configuration
-cp %{SOURCE1} %{apache_test_module_dir}/mod_fcgid-test.conf
-cat << EOF > %{apache_test_module_dir}/mod_fcgid-test-access.conf
-LogLevel debug
-<Directory %{apache_test_module_dir}/htdocs/fcgi-bin/>
- SetHandler fcgid-script
- Options +ExecCGI
-%if 0%{?apache_access_syntax_version} >= 24
- Require local
-%else
- Allow from localhost
-%endif
-</Directory>
-EOF
-mkdir -p "%{apache_test_module_dir}%{_localstatedir}/lib/apache2/fcgid/"
-sed -i "s:%{_localstatedir}/lib:%{apache_test_module_dir}%{_localstatedir}/lib:" %{apache_test_module_dir}/mod_fcgid-test.conf
-mkdir -p %{apache_test_module_dir}/htdocs/fcgi-bin/
-# create a fcgi script
-cat << 'EOF' > %{apache_test_module_dir}/htdocs/fcgi-bin/showenv.pl
-#!/usr/bin/perl
-use FCGI;
-my $request = FCGI::Request();
-while ($request->Accept() >= 0) {
- print "Content-Type: text/plain\r\n\r\n";
- foreach my $env (keys %ENV) {
- print "env $env = $ENV{$env}\n";
- }
- print STDERR 'request received'
-}
-EOF
-chmod 755 %{apache_test_module_dir}/htdocs/fcgi-bin/showenv.pl
-# start apache
-%apache_test_module_start_apache -m fcgid -i mod_fcgid-test.conf:mod_fcgid-test-access.conf
-# get the document
-%apache_test_module_curl -d /fcgi-bin/showenv.pl -o %{apache_test_module_dir}/output.txt
-# check the output
-echo
-echo 'Testing /fcgi-bin/showenv.pl output'
-exit_code=0
-grep 'HTTP_ACCEPT' %{apache_test_module_dir}/output.txt || exit_code=1
-grep 'REQUEST_METHOD' %{apache_test_module_dir}/output.txt || exit_code=1
-echo 'The output from stderr was logged in error_log'
-grep 'request received' %{apache_test_module_dir}/error_log || exit_code=2
-if [ $exit_code -eq 0 ]; then
- echo 'SUCCESS'
-else
- echo 'FAILED, error_log:'
- cat %{apache_test_module_dir}/error_log
-fi
-echo
-# stop apache
-%apache_test_module_stop_apache
-set -x
-exit $exit_code
+%apache_rex_check -m modules/fcgid/.libs mod_fcgid-basic
%files
%defattr(-,root,root)
1
0
Hello community,
here is the log from the commit of package trojita for openSUSE:Factory checked in at 2019-07-04 15:42:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trojita (Old)
and /work/SRC/openSUSE:Factory/.trojita.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trojita"
Thu Jul 4 15:42:46 2019 rev:10 rq:713040 version:0.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/trojita/trojita.changes 2018-03-28 10:33:22.864730495 +0200
+++ /work/SRC/openSUSE:Factory/.trojita.new.4615/trojita.changes 2019-07-04 15:42:46.586062800 +0200
@@ -1,0 +2,5 @@
+Tue Jul 2 08:49:49 UTC 2019 - wbauer(a)tmo.at
+
+- Add tests-Fix-build-with-Qt-5.13.patch to fix build with Qt 5.13
+
+-------------------------------------------------------------------
New:
----
tests-Fix-build-with-Qt-5.13.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ trojita.spec ++++++
--- /var/tmp/diff_new_pack.wk6ubP/_old 2019-07-04 15:42:47.302063919 +0200
+++ /var/tmp/diff_new_pack.wk6ubP/_new 2019-07-04 15:42:47.306063925 +0200
@@ -35,6 +35,8 @@
Source1: http://sourceforge.net/projects/trojita/files/src/%{name}-%{version}.tar.xz…
# PATCH-FIX-OPENSUSE
Patch: Skip-QtWebKit-tests.patch
+# PATCH-FIX-UPSTREAM
+Patch1: tests-Fix-build-with-Qt-5.13.patch
BuildRequires: cmake >= 2.8.7
BuildRequires: git
BuildRequires: gpgmepp5-devel
@@ -69,7 +71,7 @@
%prep
%setup -q
-%patch -p1
+%autopatch -p1
%build
export CXXFLAGS="%{optflags} -fPIC"
++++++ tests-Fix-build-with-Qt-5.13.patch ++++++
>From 39772585033c1c0aff96f297e93de7be53f9b114 Mon Sep 17 00:00:00 2001
From: Heiko Becker <heirecka(a)exherbo.org>
Date: Sat, 23 Mar 2019 01:17:11 +0100
Subject: tests: Fix build with Qt 5.13
QTest::toString(QModelIndex) was added in
7ef0b575b38d267bd3dc14ff46935d556562ff00 and thus causes a build
error with Qt 5.13 because it's redefined here.
Change-Id: I015800e49cf8d0e87f3541642406396f150d0eeb
---
tests/Imap/test_Imap_BodyParts.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/Imap/test_Imap_BodyParts.cpp b/tests/Imap/test_Imap_BodyParts.cpp
index f1c577f..b6e0421 100644
--- a/tests/Imap/test_Imap_BodyParts.cpp
+++ b/tests/Imap/test_Imap_BodyParts.cpp
@@ -51,6 +51,7 @@ struct Data {
Q_DECLARE_METATYPE(QList<Data>)
+#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
namespace QTest {
template <>
char *toString(const QModelIndex &index)
@@ -60,6 +61,7 @@ char *toString(const QModelIndex &index)
return qstrdup(buf.toUtf8().constData());
}
}
+#endif
using namespace Imap::Mailbox;
--
cgit v1.1
1
0