openSUSE Commits
Threads by month
- ----- 2024 -----
- 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
April 2016
- 1 participants
- 1255 discussions
Hello community,
here is the log from the commit of package lollypop for openSUSE:Factory checked in at 2016-04-28 16:57:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lollypop (Old)
and /work/SRC/openSUSE:Factory/.lollypop.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lollypop"
Changes:
--------
--- /work/SRC/openSUSE:Factory/lollypop/lollypop.changes 2016-04-08 09:39:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.lollypop.new/lollypop.changes 2016-04-28 17:02:58.000000000 +0200
@@ -1,0 +2,24 @@
+Wed Apr 27 04:33:40 UTC 2016 - badshah400(a)gmail.com
+
+- Update to version 0.9.98:
+ + Last.fm was not working for users without Gnome Online
+ Account.
+ + Various bug fixes.
+- Changes from version 0.9.97:
+ + Fix an issue in MTP sync.
+ + Fix an issue when showing artists for track.
+- Changes from version 0.9.96:
+ + Various bug fixes.
+
+-------------------------------------------------------------------
+Tue Apr 12 22:12:29 UTC 2016 - badshah400(a)gmail.com
+
+- Update to version 0.9.95:
+ + Various bug fixes.
+ + Enable Gnome Shell 3.20 MPRIS controls.
+ + Move to GIO DBus on GNOME 3.20 (Thanks to Gnome Music code).
+ + Should work again on Elementary OS.
+- Delete unnecessary python cache files to avoid a ton of rpmlint
+ warnings.
+
+-------------------------------------------------------------------
Old:
----
lollypop-0.9.94.tar.xz
New:
----
lollypop-0.9.98.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lollypop.spec ++++++
--- /var/tmp/diff_new_pack.NU9JJx/_old 2016-04-28 17:02:59.000000000 +0200
+++ /var/tmp/diff_new_pack.NU9JJx/_new 2016-04-28 17:02:59.000000000 +0200
@@ -22,7 +22,7 @@
Name: lollypop
Summary: GNOME music playing application
License: GPL-3.0+
-Version: 0.9.94
+Version: 0.9.98
Release: 0
Url: https://github.com/gnumdk/lollypop
Source0: https://github.com/gnumdk/lollypop/releases/download/%{version}/%{name}-%{v…
@@ -90,6 +90,10 @@
%find_lang %{name} %{?no_lang_C}
+# THESE CACHE FILES ARE USELESS REALLY AS THEY ARE NOT ACCOMPANIED BY CORRESPONDING SOURCE FILES
+# DELETING THESE SAVES US A TON OF RPMLINT WARNINGS
+rm -fr %{buildroot}%{python3_sitelib}/lollypop/__pycache__
+
%suse_update_desktop_file %{buildroot}/%{_datadir}/applications/%{name}.desktop
%fdupes %{buildroot}%{python3_sitelib}/%{name}/
++++++ lollypop-0.9.94.tar.xz -> lollypop-0.9.98.tar.xz ++++++
++++ 37517 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package salt for openSUSE:Factory checked in at 2016-04-28 16:57:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/salt (Old)
and /work/SRC/openSUSE:Factory/.salt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/salt/salt.changes 2016-03-26 15:24:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.salt.new/salt.changes 2016-04-28 17:02:56.000000000 +0200
@@ -1,0 +2,130 @@
+Wed Apr 20 09:27:31 UTC 2016 - bmaryniuk(a)suse.com
+
+- Prevent crash if pygit2 package requests recompilation.
+ Add:
+ * 0013-Prevent-crash-if-pygit2-package-is-requesting-re-com.patch
+- Align OS grains from older SLES with the current one (bsc#975757)
+ Add:
+ * 0014-align-OS-grains-from-older-SLES-with-current-one-326.patch
+
+-------------------------------------------------------------------
+Sat Apr 16 15:15:07 UTC 2016 - mc(a)suse.com
+
+- remove patches which produce duplicate functions:
+ Remove:
+ * 0004-implement-version_cmp-for-zypper.patch
+ * 0005-pylint-changes.patch
+ * 0006-Check-if-rpm-python-can-be-imported.patch
+- remove patches which add and revert the same file
+ Remove:
+ * 0007-Initial-Zypper-Unit-Tests-and-bugfixes.patch
+ * 0009-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch
+- rename patches:
+ 0008-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch to
+ 0004-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
+ 0010-Use-SHA256-hash-type-by-default.patch to
+ 0005-Use-SHA256-hash-type-by-default.patch
+ 0011-Update-to-2015.8.8.2.patch to
+ 0006-Update-to-2015.8.8.2.patch
+ 0012-Force-sort-the-RPM-output-to-ensure-latest-version-o.patch to
+ 0007-Force-sort-the-RPM-output-to-ensure-latest-version-o.patch
+ 0013-Cleaner-deprecation-process-with-decorators.patch to
+ 0008-Cleaner-deprecation-process-with-decorators.patch
+- fix sorting by latest package
+ Add:
+ * 0009-fix-sorting-by-latest-version-when-called-with-an-at.patch
+- Prevent metadata download when getting installed products
+ Add:
+ * 0010-Prevent-metadata-download-when-getting-installed-pro.patch
+- Check if EOL is available in a particular product (bsc#975093)
+ Add:
+ * 0011-Check-if-EOL-is-available-in-a-particular-product-bs.patch
+- Bugfix: salt-key crashes if tries to generate keys
+ to the directory w/o write access (bsc#969320)
+ Add:
+ * 0012-Bugfix-salt-key-crashes-if-tries-to-generate-keys-to.patch
+
+-------------------------------------------------------------------
+Thu Apr 7 10:25:36 UTC 2016 - bmaryniuk(a)suse.com
+
+- Deprecation process using decorators and re-implementation
+ of status.update function.
+ Add:
+ * 0013-Cleaner-deprecation-process-with-decorators.patch
+
+-------------------------------------------------------------------
+Fri Apr 1 19:19:10 UTC 2016 - aboe76(a)gmail.com
+
+- Reverted the fake 2015.8.8.2 patch, with the right one,
+- this patch only contains:
+ - https://github.com/saltstack/salt/pull/32135
+ - https://github.com/saltstack/salt/pull/32023
+ - https://github.com/saltstack/salt/pull/32117
+
+-------------------------------------------------------------------
+Fri Apr 1 12:16:10 UTC 2016 - bmaryniuk(a)suse.com
+
+- Ensure that in case of multi-packages installed on the system,
+ the latest is reported by pkg.info_installed (bsc#972490)
+ Add:
+ * 0012-Force-sort-the-RPM-output-to-ensure-latest-version-o.patch
+
+-------------------------------------------------------------------
+Wed Mar 30 22:33:19 UTC 2016 - tampakrap(a)opensuse.org
+
+- Update to the fake 2015.8.8.2 release
+ upstream released a bunch of fixes on top of 2015.8.8, without creating a new
+ tag and proper release. This commit includes all the changes between tag
+ v2015.8.8 and commit ID 596444e2b447b7378dbcdfeb9fc9610b90057745 which
+ introduces the fake 2015.8.8.2 release.
+ see https://docs.saltstack.com/en/latest/topics/releases/2015.8.8.html#salt-201…
+
+-------------------------------------------------------------------
+Thu Mar 24 17:34:03 UTC 2016 - tampakrap(a)opensuse.org
+
+- Update to 2015.8.8
+ see https://docs.saltstack.com/en/latest/topics/releases/2015.8.8.html
+ Patches renamed:
+ * 0004-implement-version_cmp-for-zypper.patch
+ * 0005-pylint-changes.patch
+ * 0006-Check-if-rpm-python-can-be-imported.patch
+ * 0007-Initial-Zypper-Unit-Tests-and-bugfixes.patch
+ * 0008-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
+ * 0009-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch
+ * 0010-Use-SHA256-hash-type-by-default.patch
+ Patches removed:
+ * 0004-Fix-pkg.latest-prevent-crash-on-multiple-package-ins.patch
+ * 0005-Fix-package-status-filtering-on-latest-version-and-i.patch
+ * 0006-add_key-reject_key-do-not-crash-w-Permission-denied-.patch
+ * 0007-Force-kill-websocket-s-child-processes-faster-than-d.patch
+ * 0008-Fix-types-in-the-output-data-and-return-just-a-list-.patch
+ * 0009-The-functions-in-the-state-module-that-return-a-retc.patch
+ * 0010-add-handling-for-OEM-products.patch
+ * 0011-improve-doc-for-list_pkgs.patch
+ * 0012-implement-version_cmp-for-zypper.patch
+ * 0013-pylint-changes.patch
+ * 0014-Check-if-rpm-python-can-be-imported.patch
+ * 0015-call-zypper-with-option-non-interactive-everywhere.patch
+ * 0016-write-a-zypper-command-builder-function.patch
+ * 0017-Fix-crash-with-scheduler-and-runners-31106.patch
+ * 0018-unify-behavior-of-refresh.patch
+ * 0019-add-refresh-option-to-more-functions.patch
+ * 0020-simplify-checking-the-refresh-paramater.patch
+ * 0021-do-not-change-kwargs-in-refresh-while-checking-a-val.patch
+ * 0022-fix-argument-handling-for-pkg.download.patch
+ * 0023-Initial-Zypper-Unit-Tests-and-bugfixes.patch
+ * 0024-proper-checking-if-zypper-exit-codes-and-handling-of.patch
+ * 0025-adapt-tests-to-new-zypper_check_result-output.patch
+ * 0026-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
+ * 0027-make-suse-check-consistent-with-rh_service.patch
+ * 0028-fix-numerical-check-of-osrelease.patch
+ * 0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch
+ * 0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch
+ * 0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch
+ * 0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch
+ * 0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch
+ * 0034-Fix-git_pillar-race-condition.patch
+ * 0035-Fix-the-always-false-behavior-on-checking-state.patch
+ * 0036-Use-SHA256-hash-type-by-default.patch
+
+-------------------------------------------------------------------
Old:
----
0004-Fix-pkg.latest-prevent-crash-on-multiple-package-ins.patch
0005-Fix-package-status-filtering-on-latest-version-and-i.patch
0006-add_key-reject_key-do-not-crash-w-Permission-denied-.patch
0007-Force-kill-websocket-s-child-processes-faster-than-d.patch
0008-Fix-types-in-the-output-data-and-return-just-a-list-.patch
0009-The-functions-in-the-state-module-that-return-a-retc.patch
0010-add-handling-for-OEM-products.patch
0011-improve-doc-for-list_pkgs.patch
0012-implement-version_cmp-for-zypper.patch
0013-pylint-changes.patch
0014-Check-if-rpm-python-can-be-imported.patch
0015-call-zypper-with-option-non-interactive-everywhere.patch
0016-write-a-zypper-command-builder-function.patch
0017-Fix-crash-with-scheduler-and-runners-31106.patch
0018-unify-behavior-of-refresh.patch
0019-add-refresh-option-to-more-functions.patch
0020-simplify-checking-the-refresh-paramater.patch
0021-do-not-change-kwargs-in-refresh-while-checking-a-val.patch
0022-fix-argument-handling-for-pkg.download.patch
0023-Initial-Zypper-Unit-Tests-and-bugfixes.patch
0024-proper-checking-if-zypper-exit-codes-and-handling-of.patch
0025-adapt-tests-to-new-zypper_check_result-output.patch
0026-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
0027-make-suse-check-consistent-with-rh_service.patch
0028-fix-numerical-check-of-osrelease.patch
0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch
0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch
0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch
0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch
0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch
0034-Fix-git_pillar-race-condition.patch
0035-Fix-the-always-false-behavior-on-checking-state.patch
0036-Use-SHA256-hash-type-by-default.patch
salt-2015.8.7.tar.gz
New:
----
0004-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
0005-Use-SHA256-hash-type-by-default.patch
0006-Update-to-2015.8.8.2.patch
0007-Force-sort-the-RPM-output-to-ensure-latest-version-o.patch
0008-Cleaner-deprecation-process-with-decorators.patch
0009-fix-sorting-by-latest-version-when-called-with-an-at.patch
0010-Prevent-metadata-download-when-getting-installed-pro.patch
0011-Check-if-EOL-is-available-in-a-particular-product-bs.patch
0012-Bugfix-salt-key-crashes-if-tries-to-generate-keys-to.patch
0013-Prevent-crash-if-pygit2-package-is-requesting-re-com.patch
0014-align-OS-grains-from-older-SLES-with-current-one-326.patch
salt-2015.8.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ salt.spec ++++++
--- /var/tmp/diff_new_pack.REPLkg/_old 2016-04-28 17:02:58.000000000 +0200
+++ /var/tmp/diff_new_pack.REPLkg/_new 2016-04-28 17:02:58.000000000 +0200
@@ -36,7 +36,7 @@
%bcond_without docs
Name: salt
-Version: 2015.8.7
+Version: 2015.8.8
Release: 0
Summary: A parallel remote execution system
License: Apache-2.0
@@ -53,64 +53,28 @@
Patch2: 0002-Run-salt-master-as-dedicated-salt-user.patch
# PATCH-FIX-OPENSUSE https://github.com/saltstack/salt/pull/30424
Patch3: 0003-Check-if-byte-strings-are-properly-encoded-in-UTF-8.patch
-# PATCH-FIX-OPENSUSE https://github.com/saltstack/salt/pull/30611
-Patch4: 0004-Fix-pkg.latest-prevent-crash-on-multiple-package-ins.patch
-# PATCH-FIX-OPENSUSE https://github.com/saltstack/salt/pull/30663
-Patch5: 0005-Fix-package-status-filtering-on-latest-version-and-i.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/30998
-Patch6: 0006-add_key-reject_key-do-not-crash-w-Permission-denied-.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31125
-Patch7: 0007-Force-kill-websocket-s-child-processes-faster-than-d.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31134
-Patch8: 0008-Fix-types-in-the-output-data-and-return-just-a-list-.patch
-# PATCH-FIX-UPSTREAM
-Patch9: 0009-The-functions-in-the-state-module-that-return-a-retc.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31237
-Patch10: 0010-add-handling-for-OEM-products.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31234
-Patch11: 0011-improve-doc-for-list_pkgs.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31233
-Patch12: 0012-implement-version_cmp-for-zypper.patch
-Patch13: 0013-pylint-changes.patch
-Patch14: 0014-Check-if-rpm-python-can-be-imported.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31305
-Patch15: 0015-call-zypper-with-option-non-interactive-everywhere.patch
-Patch16: 0016-write-a-zypper-command-builder-function.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31189
-Patch17: 0017-Fix-crash-with-scheduler-and-runners-31106.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31378
-Patch18: 0018-unify-behavior-of-refresh.patch
-Patch19: 0019-add-refresh-option-to-more-functions.patch
-Patch20: 0020-simplify-checking-the-refresh-paramater.patch
-Patch21: 0021-do-not-change-kwargs-in-refresh-while-checking-a-val.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31429
-Patch22: 0022-fix-argument-handling-for-pkg.download.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31479
-# https://github.com/saltstack/salt/pull/31488
-Patch23: 0023-Initial-Zypper-Unit-Tests-and-bugfixes.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31508
-Patch24: 0024-proper-checking-if-zypper-exit-codes-and-handling-of.patch
-Patch25: 0025-adapt-tests-to-new-zypper_check_result-output.patch
# PATCH-FIX-OPENSUSE prevent rebuilds in OBS
-Patch26: 0026-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31629
-Patch27: 0027-make-suse-check-consistent-with-rh_service.patch
-Patch28: 0028-fix-numerical-check-of-osrelease.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31162
-Patch29: 0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31786
-Patch30: 0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31445
-Patch31: 0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch
-Patch32: 0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31793
-Patch33: 0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31836
-Patch34: 0034-Fix-git_pillar-race-condition.patch
-# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31745
-Patch35: 0035-Fix-the-always-false-behavior-on-checking-state.patch
+Patch4: 0004-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
# PATCH-FIX-OPENSUSE - Upstream default hash type is set to MD5, while we require SHA256 (bsc#955373)
-Patch36: 0036-Use-SHA256-hash-type-by-default.patch
+Patch5: 0005-Use-SHA256-hash-type-by-default.patch
+# PATCH-FIX-UPSTREAM https://docs.saltstack.com/en/latest/topics/releases/2015.8.8.html#salt-201…
+Patch6: 0006-Update-to-2015.8.8.2.patch
+# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/32243
+Patch7: 0007-Force-sort-the-RPM-output-to-ensure-latest-version-o.patch
+# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/32068
+Patch8: 0008-Cleaner-deprecation-process-with-decorators.patch
+# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/32323
+Patch9: 0009-fix-sorting-by-latest-version-when-called-with-an-at.patch
+# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/32353
+Patch10: 0010-Prevent-metadata-download-when-getting-installed-pro.patch
+# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/32505
+Patch11: 0011-Check-if-EOL-is-available-in-a-particular-product-bs.patch
+# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/32436
+Patch12: 0012-Bugfix-salt-key-crashes-if-tries-to-generate-keys-to.patch
+# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/32652
+Patch13: 0013-Prevent-crash-if-pygit2-package-is-requesting-re-com.patch
+# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/32649
+Patch14: 0014-align-OS-grains-from-older-SLES-with-current-one-326.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: logrotate
@@ -467,28 +431,6 @@
%patch12 -p1
%patch13 -p1
%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
-%patch27 -p1
-%patch28 -p1
-%patch29 -p1
-%patch30 -p1
-%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
-%patch35 -p1
-%patch36 -p1
%build
python setup.py --salt-transport=both build
++++++ 0001-tserong-suse.com-We-don-t-have-python-systemd-so-not.patch ++++++
--- /var/tmp/diff_new_pack.REPLkg/_old 2016-04-28 17:02:58.000000000 +0200
+++ /var/tmp/diff_new_pack.REPLkg/_new 2016-04-28 17:02:58.000000000 +0200
@@ -1,7 +1,7 @@
-From f6534519ed6dcd443e9b5b8f7dc6dfe1fb508ab3 Mon Sep 17 00:00:00 2001
+From f9dbfde1c3e7782d78f6b0b2b6b564f61749941f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf(a)suse.de>
Date: Wed, 20 Jan 2016 11:00:15 +0100
-Subject: [PATCH 01/22] tserong(a)suse.com -- We don't have python-systemd, so
+Subject: [PATCH 01/12] tserong(a)suse.com -- We don't have python-systemd, so
notify can't work
---
++++++ 0002-Run-salt-master-as-dedicated-salt-user.patch ++++++
--- /var/tmp/diff_new_pack.REPLkg/_old 2016-04-28 17:02:58.000000000 +0200
+++ /var/tmp/diff_new_pack.REPLkg/_new 2016-04-28 17:02:58.000000000 +0200
@@ -1,7 +1,7 @@
-From cd60b85c9e6bfd8ebf3505e5ff05e7fdec6211d6 Mon Sep 17 00:00:00 2001
+From af193a109fcae502c4cdd47507aea9f67d809b4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf(a)suse.de>
Date: Wed, 20 Jan 2016 11:01:06 +0100
-Subject: [PATCH 02/22] Run salt master as dedicated salt user
+Subject: [PATCH 02/12] Run salt master as dedicated salt user
---
conf/master | 3 ++-
@@ -9,7 +9,7 @@
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/conf/master b/conf/master
-index 643b5f4..36657e8 100644
+index aae46ef..064828a 100644
--- a/conf/master
+++ b/conf/master
@@ -25,7 +25,8 @@
++++++ 0003-Check-if-byte-strings-are-properly-encoded-in-UTF-8.patch ++++++
--- /var/tmp/diff_new_pack.REPLkg/_old 2016-04-28 17:02:58.000000000 +0200
+++ /var/tmp/diff_new_pack.REPLkg/_new 2016-04-28 17:02:58.000000000 +0200
@@ -1,7 +1,7 @@
-From 9dc25e7dfb08a7cd583215d0206f18b15a44ccb1 Mon Sep 17 00:00:00 2001
+From 6035aef0c80ae12a068bee7613c5b7f7f48aa9d3 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo(a)suse.de>
Date: Mon, 18 Jan 2016 16:28:48 +0100
-Subject: [PATCH 03/22] Check if byte strings are properly encoded in UTF-8
+Subject: [PATCH 03/12] Check if byte strings are properly encoded in UTF-8
Rename keywords arguments variable to a default name.
---
@@ -9,10 +9,10 @@
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
-index 0d62c68..dddcc2f 100644
+index fecb671..27b00d5 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
-@@ -112,9 +112,9 @@ def info_installed(*names, **kwargs):
+@@ -164,9 +164,9 @@ def info_installed(*names, **kwargs):
summary, description.
:param errors:
@@ -25,7 +25,7 @@
Valid attributes are:
ignore, report
-@@ -127,7 +127,8 @@ def info_installed(*names, **kwargs):
+@@ -179,7 +179,8 @@ def info_installed(*names, **kwargs):
salt '*' pkg.info_installed <package1> <package2> <package3> ...
salt '*' pkg.info_installed <package1> attr=version,vendor
salt '*' pkg.info_installed <package1> <package2> <package3> ... attr=version,vendor
@@ -35,7 +35,7 @@
'''
ret = dict()
for pkg_name, pkg_nfo in __salt__['lowpkg.info'](*names, **kwargs).items():
-@@ -138,7 +139,7 @@ def info_installed(*names, **kwargs):
+@@ -190,7 +191,7 @@ def info_installed(*names, **kwargs):
# Check, if string is encoded in a proper UTF-8
value_ = value.decode('UTF-8', 'ignore').encode('UTF-8', 'ignore')
if value != value_:
++++++ 0026-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch -> 0004-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch ++++++
--- /work/SRC/openSUSE:Factory/salt/0026-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch 2016-03-07 13:28:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.salt.new/0004-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch 2016-04-28 17:02:56.000000000 +0200
@@ -1,7 +1,7 @@
-From 80784a70e90d16c5d8290fcc6bf8a0f4ec657ec0 Mon Sep 17 00:00:00 2001
+From a2ffa8e54f3cd8dba3c4b73cad086a6b93fb3a41 Mon Sep 17 00:00:00 2001
From: Michael Calmer <mc(a)suse.de>
Date: Fri, 4 Mar 2016 09:51:22 +0100
-Subject: [PATCH 26/26] do not generate a date in a comment to prevent rebuilds
+Subject: [PATCH 04/12] do not generate a date in a comment to prevent rebuilds
(bsc#969407)
---
@@ -9,10 +9,10 @@
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
-index 8caa45e..dd76c64 100755
+index 742eae5..d2dd8f7 100755
--- a/setup.py
+++ b/setup.py
-@@ -600,8 +600,7 @@ class Clean(clean):
+@@ -605,8 +605,7 @@ class Clean(clean):
INSTALL_VERSION_TEMPLATE = '''\
++++++ 0036-Use-SHA256-hash-type-by-default.patch -> 0005-Use-SHA256-hash-type-by-default.patch ++++++
--- /work/SRC/openSUSE:Factory/salt/0036-Use-SHA256-hash-type-by-default.patch 2016-03-26 15:24:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.salt.new/0005-Use-SHA256-hash-type-by-default.patch 2016-04-28 17:02:56.000000000 +0200
@@ -1,7 +1,7 @@
-From eea48a283a184a02223fc440fec54a47a5b47b62 Mon Sep 17 00:00:00 2001
+From d5fc00efc2f73018c4c6bf3bea03648dfd1340fc Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo(a)suse.de>
Date: Thu, 17 Mar 2016 12:30:23 +0100
-Subject: [PATCH 36/36] Use SHA256 hash type by default
+Subject: [PATCH 05/12] Use SHA256 hash type by default
---
conf/master | 2 +-
@@ -10,7 +10,7 @@
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/conf/master b/conf/master
-index cf05ec4..5f6beaa 100644
+index 064828a..5e75b15 100644
--- a/conf/master
+++ b/conf/master
@@ -474,7 +474,7 @@ syndic_user: salt
@@ -23,10 +23,10 @@
# The buffer size in the file server can be adjusted here:
#file_buffer_size: 1048576
diff --git a/conf/minion b/conf/minion
-index e17ec61..ba4111a 100644
+index b408942..32b0d0a 100644
--- a/conf/minion
+++ b/conf/minion
-@@ -447,7 +447,7 @@
+@@ -451,7 +451,7 @@
#
# Warning: Prior to changing this value, the minion should be stopped and all
# Salt caches should be cleared.
@@ -36,7 +36,7 @@
# The Salt pillar is searched for locally if file_client is set to local. If
# this is the case, and pillar data is defined, then the pillar_roots need to
diff --git a/conf/proxy b/conf/proxy
-index 0de6af8..77ecf3b 100644
+index e6ca631..e697357 100644
--- a/conf/proxy
+++ b/conf/proxy
@@ -427,7 +427,7 @@
@@ -49,5 +49,5 @@
# The Salt pillar is searched for locally if file_client is set to local. If
# this is the case, and pillar data is defined, then the pillar_roots need to
--
-2.7.3
+2.1.4
++++++ 0006-Update-to-2015.8.8.2.patch ++++++
>From 00600229ac41ae618bf01e8af6e2c0183d924204 Mon Sep 17 00:00:00 2001
From: Theo Chatzimichos <tampakrap(a)gmail.com>
Date: Sat, 2 Apr 2016 12:29:04 +0200
Subject: [PATCH 06/12] Update to 2015.8.8.2
upstream released a bunch of fixes on top of 2015.8.8, without creating a new
tag and proper release. This commit includes:
- https://github.com/saltstack/salt/pull/32135
- https://github.com/saltstack/salt/pull/32023
- https://github.com/saltstack/salt/pull/32117
see https://docs.saltstack.com/en/latest/topics/releases/2015.8.8.html#salt-201…
---
salt/config.py | 63 ++++++++++++++++++++++++++++--------------------
salt/modules/win_dacl.py | 7 +++---
2 files changed, 41 insertions(+), 29 deletions(-)
diff --git a/salt/config.py b/salt/config.py
index fe1f572..929e094 100644
--- a/salt/config.py
+++ b/salt/config.py
@@ -63,7 +63,7 @@ FLO_DIR = os.path.join(
VALID_OPTS = {
# The address of the salt master. May be specified as IP address or hostname
- 'master': str,
+ 'master': (str, list),
# The TCP/UDP port of the master to connect to in order to listen to publications
'master_port': int,
@@ -541,7 +541,7 @@ VALID_OPTS = {
'file_recv': bool,
'file_recv_max_size': int,
'file_ignore_regex': list,
- 'file_ignore_glob': bool,
+ 'file_ignore_glob': list,
'fileserver_backend': list,
'fileserver_followsymlinks': bool,
'fileserver_ignoresymlinks': bool,
@@ -833,7 +833,7 @@ DEFAULT_MINION_OPTS = {
'file_recv': False,
'file_recv_max_size': 100,
'file_ignore_regex': [],
- 'file_ignore_glob': None,
+ 'file_ignore_glob': [],
'fileserver_backend': ['roots'],
'fileserver_followsymlinks': True,
'fileserver_ignoresymlinks': False,
@@ -1348,26 +1348,30 @@ def _validate_opts(opts):
Check that all of the types of values passed into the config are
of the right types
'''
+ def format_multi_opt(valid_type):
+ try:
+ num_types = len(valid_type)
+ except TypeError:
+ # Bare type name won't have a length, return the name of the type
+ # passed.
+ return valid_type.__name__
+ else:
+ if num_types == 1:
+ return valid_type.__name__
+ elif num_types > 1:
+ ret = ', '.join(x.__name__ for x in valid_type[:-1])
+ ret += ' or ' + valid_type[-1].__name__
+
errors = []
- err = ('Key {0} with value {1} has an invalid type of {2}, a {3} is '
+
+ err = ('Key \'{0}\' with value {1} has an invalid type of {2}, a {3} is '
'required for this value')
for key, val in six.iteritems(opts):
if key in VALID_OPTS:
- if isinstance(VALID_OPTS[key](), list):
- if isinstance(val, VALID_OPTS[key]):
- continue
- else:
- errors.append(
- err.format(key, val, type(val).__name__, 'list')
- )
- if isinstance(VALID_OPTS[key](), dict):
- if isinstance(val, VALID_OPTS[key]):
- continue
- else:
- errors.append(
- err.format(key, val, type(val).__name__, 'dict')
- )
- else:
+ if isinstance(val, VALID_OPTS[key]):
+ continue
+
+ if hasattr(VALID_OPTS[key], '__call__'):
try:
VALID_OPTS[key](val)
if isinstance(val, (list, dict)):
@@ -1384,14 +1388,21 @@ def _validate_opts(opts):
VALID_OPTS[key].__name__
)
)
- except ValueError:
+ except (TypeError, ValueError):
errors.append(
- err.format(key, val, type(val).__name__, VALID_OPTS[key])
- )
- except TypeError:
- errors.append(
- err.format(key, val, type(val).__name__, VALID_OPTS[key])
+ err.format(key,
+ val,
+ type(val).__name__,
+ VALID_OPTS[key].__name__)
)
+ continue
+
+ errors.append(
+ err.format(key,
+ val,
+ type(val).__name__,
+ format_multi_opt(VALID_OPTS[key].__name__))
+ )
# RAET on Windows uses 'win32file.CreateMailslot()' for IPC. Due to this,
# sock_dirs must start with '\\.\mailslot\' and not contain any colons.
@@ -1404,7 +1415,7 @@ def _validate_opts(opts):
'\\\\.\\mailslot\\' + opts['sock_dir'].replace(':', ''))
for error in errors:
- log.warning(error)
+ log.debug(error)
if errors:
return False
return True
diff --git a/salt/modules/win_dacl.py b/salt/modules/win_dacl.py
index d57bb7b..d9ee27a 100644
--- a/salt/modules/win_dacl.py
+++ b/salt/modules/win_dacl.py
@@ -44,9 +44,10 @@ class daclConstants(object):
# in ntsecuritycon has the extra bits 0x200 enabled.
# Note that you when you set this permission what you'll generally get back is it
# ORed with 0x200 (SI_NO_ACL_PROTECT), which is what ntsecuritycon incorrectly defines.
- FILE_ALL_ACCESS = (ntsecuritycon.STANDARD_RIGHTS_REQUIRED | ntsecuritycon.SYNCHRONIZE | 0x1ff)
def __init__(self):
+ self.FILE_ALL_ACCESS = (ntsecuritycon.STANDARD_RIGHTS_REQUIRED | ntsecuritycon.SYNCHRONIZE | 0x1ff)
+
self.hkeys_security = {
'HKEY_LOCAL_MACHINE': 'MACHINE',
'HKEY_USERS': 'USERS',
@@ -88,7 +89,7 @@ class daclConstants(object):
ntsecuritycon.DELETE,
'TEXT': 'modify'},
'FULLCONTROL': {
- 'BITS': daclConstants.FILE_ALL_ACCESS,
+ 'BITS': self.FILE_ALL_ACCESS,
'TEXT': 'full control'}
}
}
@@ -368,7 +369,7 @@ def add_ace(path, objectType, user, permission, acetype, propagation):
path: path to the object (i.e. c:\\temp\\file, HKEY_LOCAL_MACHINE\\SOFTWARE\\KEY, etc)
user: user to add
permission: permissions for the user
- acetypes: either allow/deny for each user/permission (ALLOW, DENY)
+ acetype: either allow/deny for each user/permission (ALLOW, DENY)
propagation: how the ACE applies to children for Registry Keys and Directories(KEY, KEY&SUBKEYS, SUBKEYS)
CLI Example:
--
2.1.4
++++++ 0007-Force-sort-the-RPM-output-to-ensure-latest-version-o.patch ++++++
>From e3a599712daafb88b6b77ebf6c7684fdd10ffedf Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo(a)suse.de>
Date: Wed, 30 Mar 2016 12:14:21 +0200
Subject: [PATCH 07/12] Force-sort the RPM output to ensure latest version of
the multi-package on top of the list.
- Remove version_cmp from the yumpkg and use just a lowpkg alias
- Remove version_cmp from Zypper module and use just lowpkg alias
- Merge yumpkg's and zypper's version_cmp for a common use
- Sort installed pkgs data by version_cmp
- Move "string to EVR" function to the utilities
- Remove suse/redhat checks, refactor code.
- Fix condition from returning None on 0
- Remove tests from the zypper_test that belongs to rpm_test
- Add lowpkg tests for version comparison
- Fix lint
- Fix the documentation
---
salt/modules/rpm.py | 60 +++++++++++++++++++++++++++++++++++++--
salt/modules/yumpkg.py | 28 ++----------------
salt/modules/zypper.py | 58 +------------------------------------
salt/utils/__init__.py | 35 +++++++++++++++++++++++
tests/unit/modules/rpm_test.py | 21 ++++++++++++++
tests/unit/modules/zypper_test.py | 22 --------------
6 files changed, 117 insertions(+), 107 deletions(-)
diff --git a/salt/modules/rpm.py b/salt/modules/rpm.py
index 5d60dd2..6026f18 100644
--- a/salt/modules/rpm.py
+++ b/salt/modules/rpm.py
@@ -17,6 +17,19 @@ import salt.utils.pkg.rpm
# pylint: disable=import-error,redefined-builtin
from salt.ext.six.moves import shlex_quote as _cmd_quote
from salt.ext.six.moves import zip
+
+try:
+ import rpm
+ HAS_RPM = True
+except ImportError:
+ HAS_RPM = False
+
+try:
+ import rpmUtils.miscutils
+ HAS_RPMUTILS = True
+except ImportError:
+ HAS_RPMUTILS = False
+
# pylint: enable=import-error,redefined-builtin
from salt.exceptions import CommandExecutionError, SaltInvocationError
@@ -491,7 +504,7 @@ def info(*packages, **attr):
else:
out = call['stdout']
- ret = dict()
+ _ret = list()
for pkg_info in re.split(r"----*", out):
pkg_info = pkg_info.strip()
if not pkg_info:
@@ -538,6 +551,49 @@ def info(*packages, **attr):
if attr and 'description' in attr or not attr:
pkg_data['description'] = os.linesep.join(descr)
if pkg_name:
- ret[pkg_name] = pkg_data
+ pkg_data['name'] = pkg_name
+ _ret.append(pkg_data)
+
+ # Force-sort package data by version,
+ # pick only latest versions
+ # (in case multiple packages installed, e.g. kernel)
+ ret = dict()
+ for pkg_data in reversed(sorted(_ret, cmp=lambda a_vrs, b_vrs: version_cmp(a_vrs['version'], b_vrs['version']))):
+ pkg_name = pkg_data.pop('name')
+ if pkg_name not in ret:
+ ret[pkg_name] = pkg_data.copy()
return ret
+
+
+def version_cmp(ver1, ver2):
+ '''
+ .. versionadded:: 2015.8.9
+
+ Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if
+ ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem
+ making the comparison.
+
+ CLI Example:
+
+ .. code-block:: bash
+
+ salt '*' pkg.version_cmp '0.2-001' '0.2.0.1-002'
+ '''
+ try:
+ if HAS_RPM:
+ cmp_func = rpm.labelCompare
+ elif HAS_RPMUTILS:
+ cmp_func = rpmUtils.miscutils.compareEVR
+ else:
+ cmp_func = None
+ cmp_result = cmp_func is None and 2 or cmp_func(salt.utils.str_version_to_evr(ver1),
+ salt.utils.str_version_to_evr(ver2))
+ if cmp_result not in (-1, 0, 1):
+ raise Exception("Comparison result '{0}' is invalid".format(cmp_result))
+
+ return cmp_result
+ except Exception as exc:
+ log.warning("Failed to compare version '{0}' to '{1}' using RPM: {2}".format(ver1, ver2, exc))
+
+ return salt.utils.version_cmp(ver1, ver2)
diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py
index 1bfc38d..1cde676 100644
--- a/salt/modules/yumpkg.py
+++ b/salt/modules/yumpkg.py
@@ -40,12 +40,6 @@ try:
except ImportError:
from salt.ext.six.moves import configparser
HAS_YUM = False
-
-try:
- import rpmUtils.miscutils
- HAS_RPMUTILS = True
-except ImportError:
- HAS_RPMUTILS = False
# pylint: enable=import-error,redefined-builtin
# Import salt libs
@@ -665,26 +659,8 @@ def version_cmp(pkg1, pkg2):
salt '*' pkg.version_cmp '0.2-001' '0.2.0.1-002'
'''
- if HAS_RPMUTILS:
- try:
- cmp_result = rpmUtils.miscutils.compareEVR(
- rpmUtils.miscutils.stringToVersion(pkg1),
- rpmUtils.miscutils.stringToVersion(pkg2)
- )
- if cmp_result not in (-1, 0, 1):
- raise Exception(
- 'cmp result \'{0}\' is invalid'.format(cmp_result)
- )
- return cmp_result
- except Exception as exc:
- log.warning(
- 'Failed to compare version \'%s\' to \'%s\' using '
- 'rpmUtils: %s', pkg1, pkg2, exc
- )
- # Fall back to distutils.version.LooseVersion (should only need to do
- # this for RHEL5, or if an exception is raised when attempting to compare
- # using rpmUtils)
- return salt.utils.version_cmp(pkg1, pkg2)
+
+ return __salt__['lowpkg.version_cmp'](pkg1, pkg2)
def list_pkgs(versions_as_list=False, **kwargs):
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index 27b00d5..63c473c 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -17,12 +17,6 @@ import os
import salt.ext.six as six
from salt.ext.six.moves import configparser
from salt.ext.six.moves.urllib.parse import urlparse as _urlparse
-
-try:
- import rpm
- HAS_RPM = True
-except ImportError:
- HAS_RPM = False
# pylint: enable=import-error,redefined-builtin,no-name-in-module
from xml.dom import minidom as dom
@@ -347,40 +341,6 @@ def version(*names, **kwargs):
return __salt__['pkg_resource.version'](*names, **kwargs) or {}
-def _string_to_evr(verstring):
- '''
- Split the version string into epoch, version and release and
- return this as tuple.
-
- epoch is always not empty.
- version and release can be an empty string if such a component
- could not be found in the version string.
-
- "2:1.0-1.2" => ('2', '1.0', '1.2)
- "1.0" => ('0', '1.0', '')
- "" => ('0', '', '')
- '''
- if verstring in [None, '']:
- return ('0', '', '')
- idx_e = verstring.find(':')
- if idx_e != -1:
- try:
- epoch = str(int(verstring[:idx_e]))
- except ValueError:
- # look, garbage in the epoch field, how fun, kill it
- epoch = '0' # this is our fallback, deal
- else:
- epoch = '0'
- idx_r = verstring.find('-')
- if idx_r != -1:
- version = verstring[idx_e + 1:idx_r]
- release = verstring[idx_r + 1:]
- else:
- version = verstring[idx_e + 1:]
- release = ''
- return (epoch, version, release)
-
-
def version_cmp(ver1, ver2):
'''
.. versionadded:: 2015.5.4
@@ -395,23 +355,7 @@ def version_cmp(ver1, ver2):
salt '*' pkg.version_cmp '0.2-001' '0.2.0.1-002'
'''
- if HAS_RPM:
- try:
- cmp_result = rpm.labelCompare(
- _string_to_evr(ver1),
- _string_to_evr(ver2)
- )
- if cmp_result not in (-1, 0, 1):
- raise Exception(
- 'cmp result \'{0}\' is invalid'.format(cmp_result)
- )
- return cmp_result
- except Exception as exc:
- log.warning(
- 'Failed to compare version \'{0}\' to \'{1}\' using '
- 'rpmUtils: {2}'.format(ver1, ver2, exc)
- )
- return salt.utils.version_cmp(ver1, ver2)
+ return __salt__['lowpkg.version_cmp'](ver1, ver2)
def list_pkgs(versions_as_list=False, **kwargs):
diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py
index f83a677..8956a15 100644
--- a/salt/utils/__init__.py
+++ b/salt/utils/__init__.py
@@ -2881,3 +2881,38 @@ def split_input(val):
return [x.strip() for x in val.split(',')]
except AttributeError:
return [x.strip() for x in str(val).split(',')]
+
+
+def str_version_to_evr(verstring):
+ '''
+ Split the package version string into epoch, version and release.
+ Return this as tuple.
+
+ The epoch is always not empty. The version and the release can be an empty
+ string if such a component could not be found in the version string.
+
+ "2:1.0-1.2" => ('2', '1.0', '1.2)
+ "1.0" => ('0', '1.0', '')
+ "" => ('0', '', '')
+ '''
+ if verstring in [None, '']:
+ return '0', '', ''
+
+ idx_e = verstring.find(':')
+ if idx_e != -1:
+ try:
+ epoch = str(int(verstring[:idx_e]))
+ except ValueError:
+ # look, garbage in the epoch field, how fun, kill it
+ epoch = '0' # this is our fallback, deal
+ else:
+ epoch = '0'
+ idx_r = verstring.find('-')
+ if idx_r != -1:
+ version = verstring[idx_e + 1:idx_r]
+ release = verstring[idx_r + 1:]
+ else:
+ version = verstring[idx_e + 1:]
+ release = ''
+
+ return epoch, version, release
diff --git a/tests/unit/modules/rpm_test.py b/tests/unit/modules/rpm_test.py
index 8bfce9b..f180736 100644
--- a/tests/unit/modules/rpm_test.py
+++ b/tests/unit/modules/rpm_test.py
@@ -95,6 +95,27 @@ class RpmTestCase(TestCase):
self.assertDictEqual(rpm.owner('/usr/bin/python', '/usr/bin/vim'),
ret)
+ @patch('salt.modules.rpm.HAS_RPM', True)
+ def test_version_cmp_rpm(self):
+ '''
+ Test package version is called RPM version if RPM-Python is installed
+
+ :return:
+ '''
+ rpm.rpm = MagicMock(return_value=MagicMock)
+ with patch('salt.modules.rpm.rpm.labelCompare', MagicMock(return_value=0)):
+ self.assertEqual(0, rpm.version_cmp('1', '2')) # mock returns 0, which means RPM was called
+
+ @patch('salt.modules.rpm.HAS_RPM', False)
+ def test_version_cmp_fallback(self):
+ '''
+ Test package version is called RPM version if RPM-Python is installed
+
+ :return:
+ '''
+ rpm.rpm = MagicMock(return_value=MagicMock)
+ with patch('salt.modules.rpm.rpm.labelCompare', MagicMock(return_value=0)):
+ self.assertEqual(-1, rpm.version_cmp('1', '2')) # mock returns -1, a python implementation was called
if __name__ == '__main__':
from integration import run_tests
diff --git a/tests/unit/modules/zypper_test.py b/tests/unit/modules/zypper_test.py
index 5c4eb67..67cf52a 100644
--- a/tests/unit/modules/zypper_test.py
+++ b/tests/unit/modules/zypper_test.py
@@ -301,28 +301,6 @@ class ZypperTestCase(TestCase):
self.assertFalse(zypper.upgrade_available(pkg_name))
self.assertTrue(zypper.upgrade_available('vim'))
- @patch('salt.modules.zypper.HAS_RPM', True)
- def test_version_cmp_rpm(self):
- '''
- Test package version is called RPM version if RPM-Python is installed
-
- :return:
- '''
- with patch('salt.modules.zypper.rpm', MagicMock(return_value=MagicMock)):
- with patch('salt.modules.zypper.rpm.labelCompare', MagicMock(return_value=0)):
- self.assertEqual(0, zypper.version_cmp('1', '2')) # mock returns 0, which means RPM was called
-
- @patch('salt.modules.zypper.HAS_RPM', False)
- def test_version_cmp_fallback(self):
- '''
- Test package version is called RPM version if RPM-Python is installed
-
- :return:
- '''
- with patch('salt.modules.zypper.rpm', MagicMock(return_value=MagicMock)):
- with patch('salt.modules.zypper.rpm.labelCompare', MagicMock(return_value=0)):
- self.assertEqual(-1, zypper.version_cmp('1', '2')) # mock returns -1, a python implementation was called
-
def test_list_pkgs(self):
'''
Test packages listing.
--
2.1.4
++++++ 0008-Cleaner-deprecation-process-with-decorators.patch ++++++
++++ 922 lines (skipped)
++++++ 0009-fix-sorting-by-latest-version-when-called-with-an-at.patch ++++++
>From cb588505919b6c74ed824d26a184eec0f47a585b Mon Sep 17 00:00:00 2001
From: Michael Calmer <mc(a)suse.de>
Date: Mon, 4 Apr 2016 09:49:31 +0200
Subject: [PATCH 09/12] fix sorting by latest version when called with an
attribute
---
salt/modules/rpm.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/salt/modules/rpm.py b/salt/modules/rpm.py
index 6026f18..1469368 100644
--- a/salt/modules/rpm.py
+++ b/salt/modules/rpm.py
@@ -471,6 +471,7 @@ def info(*packages, **attr):
"url": "%|URL?{url: %{URL}\\n}|",
"summary": "summary: %{SUMMARY}\\n",
"description": "description:\\n%{DESCRIPTION}\\n",
+ "edition": "edition: %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}\\n",
}
attr = attr.get('attr', None) and attr['attr'].split(",") or None
@@ -484,6 +485,9 @@ def info(*packages, **attr):
if 'name' not in attr:
attr.append('name')
query.append(attr_map['name'])
+ if 'edition' not in attr:
+ attr.append('edition')
+ query.append(attr_map['edition'])
else:
for attr_k, attr_v in attr_map.iteritems():
if attr_k != 'description':
@@ -558,10 +562,11 @@ def info(*packages, **attr):
# pick only latest versions
# (in case multiple packages installed, e.g. kernel)
ret = dict()
- for pkg_data in reversed(sorted(_ret, cmp=lambda a_vrs, b_vrs: version_cmp(a_vrs['version'], b_vrs['version']))):
+ for pkg_data in reversed(sorted(_ret, cmp=lambda a_vrs, b_vrs: version_cmp(a_vrs['edition'], b_vrs['edition']))):
pkg_name = pkg_data.pop('name')
if pkg_name not in ret:
ret[pkg_name] = pkg_data.copy()
+ del ret[pkg_name]['edition']
return ret
--
2.1.4
++++++ 0010-Prevent-metadata-download-when-getting-installed-pro.patch ++++++
>From 336929a4cadca55b00dbf1cd33eb35d19f420c73 Mon Sep 17 00:00:00 2001
From: Michael Calmer <mc(a)suse.de>
Date: Tue, 5 Apr 2016 12:06:29 +0200
Subject: [PATCH 10/12] Prevent metadata download when getting installed
products
---
salt/modules/zypper.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index 63c473c..9702f42 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -1309,7 +1309,10 @@ def list_products(all=False, refresh=False):
ret = list()
OEM_PATH = "/var/lib/suseRegister/OEM"
- cmd = _zypper('-x', 'products')
+ cmd = _zypper()
+ if not all:
+ cmd.append('--disable-repos')
+ cmd.extend(['-x', 'products'])
if not all:
cmd.append('-i')
--
2.1.4
++++++ 0011-Check-if-EOL-is-available-in-a-particular-product-bs.patch ++++++
>From aae1c09957eab3c89a6c8f78a579cdf9dcfbe188 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo(a)suse.de>
Date: Tue, 12 Apr 2016 13:52:35 +0200
Subject: [PATCH 11/12] Check if EOL is available in a particular product
(bsc#975093)
Update SLE11 SP3 data
Update SLE12 SP1 data
Adjust test values according to the testing data
---
salt/modules/zypper.py | 13 +++++++--
.../unit/modules/zypp/zypper-products-sle11sp3.xml | 10 +++++++
.../unit/modules/zypp/zypper-products-sle12sp1.xml | 8 ++++++
tests/unit/modules/zypper_test.py | 32 ++++++++++++----------
4 files changed, 45 insertions(+), 18 deletions(-)
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index 9702f42..4ce5853 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -1318,12 +1318,19 @@ def list_products(all=False, refresh=False):
call = __salt__['cmd.run_all'](cmd, output_loglevel='trace')
doc = dom.parseString(_zypper_check_result(call, xml=True))
- for prd in doc.getElementsByTagName('product-list')[0].getElementsByTagName('product'):
+ product_list = doc.getElementsByTagName('product-list')
+ if not product_list:
+ return ret # No products found
+
+ for prd in product_list[0].getElementsByTagName('product'):
p_nfo = dict()
for k_p_nfo, v_p_nfo in prd.attributes.items():
p_nfo[k_p_nfo] = k_p_nfo not in ['isbase', 'installed'] and v_p_nfo or v_p_nfo in ['true', '1']
- p_nfo['eol'] = prd.getElementsByTagName('endoflife')[0].getAttribute('text')
- p_nfo['eol_t'] = int(prd.getElementsByTagName('endoflife')[0].getAttribute('time_t'))
+
+ eol = prd.getElementsByTagName('endoflife')
+ if eol:
+ p_nfo['eol'] = eol[0].getAttribute('text')
+ p_nfo['eol_t'] = int(eol[0].getAttribute('time_t') or 0)
p_nfo['description'] = " ".join(
[line.strip() for line in _get_first_aggregate_text(
prd.getElementsByTagName('description')
diff --git a/tests/unit/modules/zypp/zypper-products-sle11sp3.xml b/tests/unit/modules/zypp/zypper-products-sle11sp3.xml
index 89a85e3..99444fe 100644
--- a/tests/unit/modules/zypp/zypper-products-sle11sp3.xml
+++ b/tests/unit/modules/zypp/zypper-products-sle11sp3.xml
@@ -31,7 +31,17 @@
offers common management tools and technology
certifications across the platform, and
each product is enterprise-class.</description></product>
+<product name="SUSE_SLES" version="11.3" release="1.201" epoch="0" arch="x86_64" productline="" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Linux Enterprise Server 11 SP3 No EOL" shortname="" flavor="" isbase="0" repo="nu_novell_com:SLES11-SP3-Updates" installed="0">0x7ffdb538e948<description>SUSE Linux Enterprise offers a comprehensive
+ suite of products built on a single code base.
+ The platform addresses business needs from
+ the smallest thin-client devices to the world’s
+ most powerful high-performance computing
+ and mainframe servers. SUSE Linux Enterprise
+ offers common management tools and technology
+ certifications across the platform, and
+ each product is enterprise-class.</description></product>
<product name="SUSE-Manager-Server" version="2.1" release="1.2" epoch="0" arch="x86_64" productline="" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Manager Server" shortname="" flavor="cd" isbase="0" repo="nu_novell_com:SUSE-Manager-Server-2.1-Pool" installed="0"><endoflife time_t="0" text="1970-01-01T01:00:00+0100"/>0x7ffdb538e948<description>SUSE Manager Server appliance</description></product>
<product name="SUSE-Manager-Server" version="2.1" release="1.2" epoch="0" arch="x86_64" productline="manager" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Manager Server" shortname="" flavor="cd" isbase="1" repo="@System" installed="1"><endoflife time_t="0" text="1970-01-01T01:00:00+0100"/>0x7ffdb538e948<description>SUSE Manager Server appliance</description></product>
+<product name="SUSE-Manager-Server-Broken-EOL" version="2.1" release="1.2" epoch="0" arch="x86_64" productline="manager" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Manager Server" shortname="" flavor="cd" isbase="1" repo="@System" installed="1"><endoflife wrong="attribute"/>0x7ffdb538e948<description>SUSE Manager Server appliance</description></product>
</product-list>
</stream>
diff --git a/tests/unit/modules/zypp/zypper-products-sle12sp1.xml b/tests/unit/modules/zypp/zypper-products-sle12sp1.xml
index 1a50363..a086058 100644
--- a/tests/unit/modules/zypp/zypper-products-sle12sp1.xml
+++ b/tests/unit/modules/zypp/zypper-products-sle12sp1.xml
@@ -24,6 +24,14 @@ provisioning.</description></product>
SUSE Manager Tools provide packages required to connect to a
SUSE Manager Server.
<p></description></product>
+<product name="sle-manager-tools-beta-no-eol" version="12" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Tools" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="Manager-Tools" flavor="POOL" isbase="false" installed="false"><registerflavor>extension</registerflavor><description><p>
+ SUSE Manager Tools provide packages required to connect to a
+ SUSE Manager Server.
+ <p></description></product>
+<product name="sle-manager-tools-beta-broken-eol" version="12" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Tools" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="Manager-Tools" flavor="POOL" isbase="false" installed="false"><endoflife wrong="attribute"/><registerflavor>extension</registerflavor><description><p>
+ SUSE Manager Tools provide packages required to connect to a
+ SUSE Manager Server.
+ <p></description></product>
<product name="SLES" version="12.1" release="0" epoch="0" arch="x86_64" vendor="SUSE" summary="SUSE Linux Enterprise Server 12 SP1" repo="@System" productline="sles" registerrelease="" shortname="SLES12-SP1" flavor="DVD" isbase="true" installed="true"><endoflife time_t="1730332800" text="2024-10-31T01:00:00+01"/><registerflavor/><description>SUSE Linux Enterprise offers a comprehensive
suite of products built on a single code base.
The platform addresses business needs from
diff --git a/tests/unit/modules/zypper_test.py b/tests/unit/modules/zypper_test.py
index 67cf52a..97e42ef 100644
--- a/tests/unit/modules/zypper_test.py
+++ b/tests/unit/modules/zypper_test.py
@@ -153,24 +153,26 @@ class ZypperTestCase(TestCase):
for filename, test_data in {
'zypper-products-sle12sp1.xml': {
'name': ['SLES', 'SLES', 'SUSE-Manager-Proxy',
- 'SUSE-Manager-Server', 'sle-manager-tools-beta'],
+ 'SUSE-Manager-Server', 'sle-manager-tools-beta',
+ 'sle-manager-tools-beta-broken-eol', 'sle-manager-tools-beta-no-eol'],
'vendor': 'SUSE LLC <https://www.suse.com/>',
- 'release': ['0', '0', '0', '0', '0'],
- 'productline': [False, False, False, False, 'sles'],
- 'eol_t': [1509408000, 1522454400, 1522454400, 1730332800, 1730332800],
- 'isbase': [False, False, False, False, True],
- 'installed': [False, False, False, False, True],
+ 'release': ['0', '0', '0', '0', '0', '0', '0'],
+ 'productline': [False, False, False, False, False, False, 'sles'],
+ 'eol_t': [None, 0, 1509408000, 1522454400, 1522454400, 1730332800, 1730332800],
+ 'isbase': [False, False, False, False, False, False, True],
+ 'installed': [False, False, False, False, False, False, True],
},
'zypper-products-sle11sp3.xml': {
- 'name': ['SUSE-Manager-Server', 'SUSE-Manager-Server',
- 'SUSE_SLES', 'SUSE_SLES', 'SUSE_SLES-SP4-migration'],
+ 'name': ['SUSE-Manager-Server', 'SUSE-Manager-Server', 'SUSE-Manager-Server-Broken-EOL',
+ 'SUSE_SLES', 'SUSE_SLES', 'SUSE_SLES', 'SUSE_SLES-SP4-migration'],
'vendor': 'SUSE LINUX Products GmbH, Nuernberg, Germany',
- 'release': ['1.138', '1.2', '1.2', '1.201', '1.4'],
- 'productline': [False, False, False, False, 'manager'],
- 'eol_t': [0, 0, 0, 0, 0],
- 'isbase': [False, False, False, False, True],
- 'installed': [False, False, False, False, True],
+ 'release': ['1.138', '1.2', '1.2', '1.2', '1.201', '1.201', '1.4'],
+ 'productline': [False, False, False, False, False, 'manager', 'manager'],
+ 'eol_t': [None, 0, 0, 0, 0, 0, 0],
+ 'isbase': [False, False, False, False, False, True, True],
+ 'installed': [False, False, False, False, False, True, True],
}}.items():
+
ref_out = {
'retcode': 0,
'stdout': get_test_data(filename)
@@ -178,10 +180,10 @@ class ZypperTestCase(TestCase):
with patch.dict(zypper.__salt__, {'cmd.run_all': MagicMock(return_value=ref_out)}):
products = zypper.list_products()
- self.assertEqual(len(products), 5)
+ self.assertEqual(len(products), 7)
self.assertIn(test_data['vendor'], [product['vendor'] for product in products])
for kwd in ['name', 'isbase', 'installed', 'release', 'productline', 'eol_t']:
- self.assertEqual(test_data[kwd], sorted([prod[kwd] for prod in products]))
+ self.assertEqual(test_data[kwd], sorted([prod.get(kwd) for prod in products]))
def test_refresh_db(self):
'''
--
2.1.4
++++++ 0012-Bugfix-salt-key-crashes-if-tries-to-generate-keys-to.patch ++++++
>From 5e99ee2bec1139b1944284975454c716d477f3e0 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo(a)maryniuk.net>
Date: Wed, 13 Apr 2016 16:15:37 +0200
Subject: [PATCH 12/12] Bugfix: salt-key crashes if tries to generate keys to
the directory w/o write access (#32436)
* Raise an exception if keys are tried to be written to the directory that has no write access permissions
* Show an reasonable error message instead of a traceback crash.
* Fix the unit tests
---
salt/crypt.py | 6 ++++++
salt/scripts.py | 2 ++
tests/unit/crypt_test.py | 1 +
3 files changed, 9 insertions(+)
diff --git a/salt/crypt.py b/salt/crypt.py
index 573a3c1..e5f3317 100644
--- a/salt/crypt.py
+++ b/salt/crypt.py
@@ -15,6 +15,7 @@ import logging
import traceback
import binascii
import weakref
+import getpass
from salt.ext.six.moves import zip # pylint: disable=import-error,redefined-builtin
# Import third party libs
@@ -94,6 +95,11 @@ def gen_keys(keydir, keyname, keysize, user=None):
# Between first checking and the generation another process has made
# a key! Use the winner's key
return priv
+
+ # Do not try writing anything, if directory has no permissions.
+ if not os.access(keydir, os.W_OK):
+ raise IOError('Write access denied to "{0}" for user "{1}".'.format(os.path.abspath(keydir), getpass.getuser()))
+
cumask = os.umask(191)
with salt.utils.fopen(priv, 'wb+') as f:
f.write(gen.exportKey('PEM'))
diff --git a/salt/scripts.py b/salt/scripts.py
index 7da79bf..38b100d 100644
--- a/salt/scripts.py
+++ b/salt/scripts.py
@@ -297,6 +297,8 @@ def salt_key():
SystemExit('\nExiting gracefully on Ctrl-c'),
err,
hardcrash, trace=trace)
+ except Exception as err:
+ sys.stderr.write("Error: {0}\n".format(err.message))
def salt_cp():
diff --git a/tests/unit/crypt_test.py b/tests/unit/crypt_test.py
index 3ff3b09..f548820 100644
--- a/tests/unit/crypt_test.py
+++ b/tests/unit/crypt_test.py
@@ -86,6 +86,7 @@ class CryptTestCase(TestCase):
@patch('os.umask', MagicMock())
@patch('os.chmod', MagicMock())
@patch('os.chown', MagicMock())
+ @patch('os.access', MagicMock(return_value=True))
def test_gen_keys(self):
with patch('salt.utils.fopen', mock_open()):
open_priv_wb = call('/keydir/keyname.pem', 'wb+')
--
2.1.4
++++++ 0013-Prevent-crash-if-pygit2-package-is-requesting-re-com.patch ++++++
>From f187ee058eb221eb5a34d51ca5db53bb8eeea5e1 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo(a)maryniuk.net>
Date: Mon, 18 Apr 2016 16:25:05 +0200
Subject: [PATCH 13/14] Prevent crash if pygit2 package is requesting
re-compilation
* Prevent crash if pygit2 package is requesting re-compilation of the entire library on production systems (no *devel packages)
* Fix PEP8: move imports to the top of the file
* Move logger up
* Add log error message in case if exception is not an ImportError
---
salt/utils/gitfs.py | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/salt/utils/gitfs.py b/salt/utils/gitfs.py
index 164c92e..5452c28 100644
--- a/salt/utils/gitfs.py
+++ b/salt/utils/gitfs.py
@@ -19,6 +19,18 @@ import subprocess
import time
from datetime import datetime
+# Import salt libs
+import salt.utils
+import salt.utils.itertools
+import salt.utils.url
+import salt.fileserver
+from salt.utils.process import os_is_running as pid_exists
+from salt.exceptions import FileserverConfigError, GitLockError
+from salt.utils.event import tagify
+
+# Import third party libs
+import salt.ext.six as six
+
VALID_PROVIDERS = ('gitpython', 'pygit2', 'dulwich')
# Optional per-remote params that can only be used on a per-remote basis, and
# thus do not have defaults in salt/config.py.
@@ -54,16 +66,8 @@ _INVALID_REPO = (
'master to continue to use this {2} remote.'
)
-# Import salt libs
-import salt.utils
-import salt.utils.itertools
-import salt.utils.url
-import salt.fileserver
-from salt.exceptions import FileserverConfigError, GitLockError
-from salt.utils.event import tagify
+log = logging.getLogger(__name__)
-# Import third party libs
-import salt.ext.six as six
# pylint: disable=import-error
try:
import git
@@ -79,8 +83,13 @@ try:
GitError = pygit2.errors.GitError
except AttributeError:
GitError = Exception
-except ImportError:
- HAS_PYGIT2 = False
+except Exception as err: # cffi VerificationError also may happen
+ HAS_PYGIT2 = False # and pygit2 requrests re-compilation
+ # on a production system (!),
+ # but cffi might be absent as well!
+ # Therefore just a generic Exception class.
+ if not isinstance(err, ImportError):
+ log.error('Import pygit2 failed: {0}'.format(err))
try:
import dulwich.errors
@@ -93,8 +102,6 @@ except ImportError:
HAS_DULWICH = False
# pylint: enable=import-error
-log = logging.getLogger(__name__)
-
# Minimum versions for backend providers
GITPYTHON_MINVER = '0.3'
PYGIT2_MINVER = '0.20.3'
--
2.8.1
++++++ 0014-align-OS-grains-from-older-SLES-with-current-one-326.patch ++++++
>From 0961f5bd3e3b7aa3ebd75fe064044d078df62724 Mon Sep 17 00:00:00 2001
From: Michael Calmer <mc(a)suse.de>
Date: Mon, 18 Apr 2016 16:31:58 +0200
Subject: [PATCH 14/14] align OS grains from older SLES with current one
(#32649)
---
salt/grains/core.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py
index eb62b97..d5dbef8 100644
--- a/salt/grains/core.py
+++ b/salt/grains/core.py
@@ -1184,14 +1184,19 @@ def os_data():
for line in fhr:
if 'enterprise' in line.lower():
grains['lsb_distrib_id'] = 'SLES'
+ grains['lsb_distrib_codename'] = re.sub(r'\(.+\)', '', line).strip()
elif 'version' in line.lower():
version = re.sub(r'[^0-9]', '', line)
elif 'patchlevel' in line.lower():
patch = re.sub(r'[^0-9]', '', line)
grains['lsb_distrib_release'] = version
if patch:
- grains['lsb_distrib_release'] += ' SP' + patch
- grains['lsb_distrib_codename'] = 'n.a'
+ grains['lsb_distrib_release'] += '.' + patch
+ patchstr = 'SP' + patch
+ if grains['lsb_distrib_codename'] and patchstr not in grains['lsb_distrib_codename']:
+ grains['lsb_distrib_codename'] += ' ' + patchstr
+ if not grains['lsb_distrib_codename']:
+ grains['lsb_distrib_codename'] = 'n.a'
elif os.path.isfile('/etc/altlinux-release'):
# ALT Linux
grains['lsb_distrib_id'] = 'altlinux'
--
2.8.1
++++++ salt-2015.8.7.tar.gz -> salt-2015.8.8.tar.gz ++++++
/work/SRC/openSUSE:Factory/salt/salt-2015.8.7.tar.gz /work/SRC/openSUSE:Factory/.salt.new/salt-2015.8.8.tar.gz differ: char 5, line 1
1
0
Hello community,
here is the log from the commit of package ccache for openSUSE:Factory checked in at 2016-04-28 16:57:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ccache (Old)
and /work/SRC/openSUSE:Factory/.ccache.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ccache"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ccache/ccache.changes 2015-10-12 10:02:42.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ccache.new/ccache.changes 2016-04-28 17:02:54.000000000 +0200
@@ -1,0 +2,18 @@
+Thu Apr 28 07:17:22 UTC 2016 - idonmez(a)suse.com
+
+- Update to 3.2.5
+ * Only pass clang-specific -stdlib= to the preprocessor.
+ * Improved handling of stale NFS handles.
+ * Made it harder to misinterpret documentation of boolean
+ environment settings' semantics.
+ * Corrected "Performance" section in the manual regarding __DATE_,
+ __TIME__ and __FILE__ macros.
+ * Don’t (try to) update manifest file in “read-only” and
+ “read-only direct” modes.
+ * Fixed a bug in caching of stat system calls in “file_stat_matches
+ sloppiness mode”.
+ * Fixed bug in hashing of clang plugins, leading to unnecessary
+ cache misses.
+ * Fixed --print-config to show “pch_defines sloppiness”.
+
+-------------------------------------------------------------------
Old:
----
ccache-3.2.4.tar.xz
ccache-3.2.4.tar.xz.asc
New:
----
ccache-3.2.5.tar.xz
ccache-3.2.5.tar.xz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ccache.spec ++++++
--- /var/tmp/diff_new_pack.GM9W43/_old 2016-04-28 17:02:55.000000000 +0200
+++ /var/tmp/diff_new_pack.GM9W43/_new 2016-04-28 17:02:56.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ccache
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -17,7 +17,7 @@
Name: ccache
-Version: 3.2.4
+Version: 3.2.5
Release: 0
Summary: A Fast C/C++ Compiler Cache
License: GPL-3.0+
++++++ ccache-3.2.4.tar.xz -> ccache-3.2.5.tar.xz ++++++
++++ 2200 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package numix-gtk-theme for openSUSE:Factory checked in at 2016-04-28 16:57:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/numix-gtk-theme (Old)
and /work/SRC/openSUSE:Factory/.numix-gtk-theme.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "numix-gtk-theme"
Changes:
--------
--- /work/SRC/openSUSE:Factory/numix-gtk-theme/numix-gtk-theme.changes 2016-04-22 16:25:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.numix-gtk-theme.new/numix-gtk-theme.changes 2016-04-28 17:02:52.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Apr 27 08:23:43 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 2.5.1+git20160426.
+
+-------------------------------------------------------------------
Old:
----
numix-gtk-theme-2.5.1+git20160414.tar.gz
New:
----
numix-gtk-theme-2.5.1+git20160426.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ numix-gtk-theme.spec ++++++
--- /var/tmp/diff_new_pack.HDxvlz/_old 2016-04-28 17:02:53.000000000 +0200
+++ /var/tmp/diff_new_pack.HDxvlz/_new 2016-04-28 17:02:53.000000000 +0200
@@ -19,7 +19,7 @@
%define _theme Numix
%define _name numix
Name: numix-gtk-theme
-Version: 2.5.1+git20160414
+Version: 2.5.1+git20160426
Release: 0
Summary: Numix GTK+ theme for MATE, GNOME, and Xfce
License: GPL-3.0+
@@ -28,6 +28,7 @@
Source: %{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: glib2-tools
+BuildRequires: pkg-config
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: rubygem(sass)
BuildArch: noarch
@@ -73,7 +74,7 @@
This package contains the GTK+3 theme.
%prep
-%setup -q -n %{_theme}-%{version}
+%setup -q
chmod a-x CREDITS LICENSE README.md
%build
++++++ numix-gtk-theme-2.5.1+git20160414.tar.gz -> numix-gtk-theme-2.5.1+git20160426.tar.gz ++++++
++++ 9804 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package xviewer-plugins for openSUSE:Factory checked in at 2016-04-28 16:57:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xviewer-plugins (Old)
and /work/SRC/openSUSE:Factory/.xviewer-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xviewer-plugins"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xviewer-plugins/xviewer-plugins.changes 2016-03-26 18:17:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xviewer-plugins.new/xviewer-plugins.changes 2016-04-28 17:02:50.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Apr 27 16:43:54 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 1.0.2.
+
+-------------------------------------------------------------------
Old:
----
xviewer-plugins-1.0.1.tar.gz
New:
----
xviewer-plugins-1.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xviewer-plugins.spec ++++++
--- /var/tmp/diff_new_pack.iYCEVf/_old 2016-04-28 17:02:52.000000000 +0200
+++ /var/tmp/diff_new_pack.iYCEVf/_new 2016-04-28 17:02:52.000000000 +0200
@@ -18,7 +18,7 @@
%define _name xviewer
Name: xviewer-plugins
-Version: 1.0.1
+Version: 1.0.2
Release: 0
# FIXME: Add postr BuildRequires when we have a package.
Summary: A collection of plugins for xviewer
@@ -29,6 +29,7 @@
Source1: %{name}.SUSE
BuildRequires: fdupes
BuildRequires: gnome-common
+BuildRequires: pkg-config
BuildRequires: python3 >= 3.2
BuildRequires: pkgconfig(champlain-gtk-0.12) >= 0.9.0
BuildRequires: pkgconfig(clutter-gtk-1.0) >= 1.1.2
++++++ xviewer-plugins-1.0.1.tar.gz -> xviewer-plugins-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xviewer-plugins-1.0.1/configure.ac new/xviewer-plugins-1.0.2/configure.ac
--- old/xviewer-plugins-1.0.1/configure.ac 2016-02-06 17:49:09.000000000 +0100
+++ new/xviewer-plugins-1.0.2/configure.ac 2016-04-27 14:40:02.000000000 +0200
@@ -3,7 +3,7 @@
XVIEWER_MAJOR=3.0.0
XVIEWER_PLUGINS_MAJOR=3.0.0
-AC_INIT([xviewer-plugins], [1.0.1], [http://github.com/linuxmint/xviewer-plugins/issues])
+AC_INIT([xviewer-plugins], [1.0.2], [http://github.com/linuxmint/xviewer-plugins/issues])
AC_CONFIG_SRCDIR([plugins])
AC_PREFIX_PROGRAM([xviewer])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xviewer-plugins-1.0.1/debian/changelog new/xviewer-plugins-1.0.2/debian/changelog
--- old/xviewer-plugins-1.0.1/debian/changelog 2016-02-06 17:49:09.000000000 +0100
+++ new/xviewer-plugins-1.0.2/debian/changelog 2016-04-27 14:40:02.000000000 +0200
@@ -1,3 +1,9 @@
+xviewer-plugins (1.0.2) sarah; urgency=medium
+
+ * buil-dep on dh-autoreconf
+
+ -- Clement Lefebvre <root(a)linuxmint.com> Wed, 27 Apr 2016 13:39:25 +0100
+
xviewer-plugins (1.0.1) sarah; urgency=medium
* Migration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xviewer-plugins-1.0.1/debian/control new/xviewer-plugins-1.0.2/debian/control
--- old/xviewer-plugins-1.0.1/debian/control 2016-02-06 17:49:09.000000000 +0100
+++ new/xviewer-plugins-1.0.2/debian/control 2016-04-27 14:40:02.000000000 +0200
@@ -5,6 +5,7 @@
Build-Depends: cdbs,
gnome-pkg-tools (>= 0.11),
debhelper (>= 8),
+ dh-autoreconf,
autotools-dev,
intltool (>= 0.40.0),
libglib2.0-dev (>= 2.32.0),
1
0
Hello community,
here is the log from the commit of package xreader for openSUSE:Factory checked in at 2016-04-28 16:57:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xreader (Old)
and /work/SRC/openSUSE:Factory/.xreader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xreader"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xreader/xreader.changes 2016-02-24 14:25:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xreader.new/xreader.changes 2016-04-28 17:02:48.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Apr 27 16:43:54 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 1.0.3 (changes since 1.0.1):
+ * Remove Nemo extension .la files.
+ * Don't use gi typelibdir for nemo extension path, use
+ libnemo-extension libdir instead.
+ * Fix WebKit detection.
+ * Fix wrong return type in ev-page-action-widget.c.
+ * Update translations.
+- Remove xreader-fix-epub.patch, xreader-fix-func-decl.patch: merged
+ upstream.
+
+-------------------------------------------------------------------
Old:
----
xreader-1.0.1.tar.gz
xreader-fix-epub.patch
xreader-fix-func-decl.patch
New:
----
xreader-1.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xreader.spec ++++++
--- /var/tmp/diff_new_pack.MOJj2E/_old 2016-04-28 17:02:50.000000000 +0200
+++ /var/tmp/diff_new_pack.MOJj2E/_new 2016-04-28 17:02:50.000000000 +0200
@@ -20,21 +20,18 @@
%define typelib1 typelib-1_0-XreaderDocument-1_5_0
%define typelib2 typelib-1_0-XreaderView-1_5_0
Name: xreader
-Version: 1.0.1
+Version: 1.0.3
Release: 0
Summary: Simple document viewer
License: GPL-2.0 and LGPL-2.0
Group: Productivity/Office/Other
Url: https://github.com/linuxmint/xreader
Source: https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{v…
-# PATCH-FIX-UPSTREAM xreader-epub.patch sor.alexei(a)meowr.ru -- Fix EPUB support.
-Patch0: %{name}-fix-epub.patch
-# PATCH-FIX-UPSTREAM xreader-fix-func-decl.patch sor.alexei(a)meowr.ru -- Fix wrong return type in ev-page-action-widget.c.
-Patch1: %{name}-fix-func-decl.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gnome-common
BuildRequires: libtiff-devel >= 3.6
+BuildRequires: pkg-config
BuildRequires: texlive-devel
BuildRequires: update-desktop-files
BuildRequires: yelp-tools
@@ -151,8 +148,6 @@
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
%build
NOCONFIGURE=1 gnome-autogen.sh
++++++ xreader-1.0.1.tar.gz -> xreader-1.0.3.tar.gz ++++++
++++ 169111 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package xviewer for openSUSE:Factory checked in at 2016-04-28 16:57:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xviewer (Old)
and /work/SRC/openSUSE:Factory/.xviewer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xviewer"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xviewer/xviewer.changes 2016-02-24 14:25:31.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xviewer.new/xviewer.changes 2016-04-28 17:02:46.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Apr 27 16:43:54 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 1.0.2:
+ * Avoid integer overflow when allocating a large block of memory.
+ * Update description and pot file.
+ * Update translations.
+
+-------------------------------------------------------------------
Old:
----
xviewer-1.0.1.tar.gz
New:
----
xviewer-1.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xviewer.spec ++++++
--- /var/tmp/diff_new_pack.Q9KLft/_old 2016-04-28 17:02:48.000000000 +0200
+++ /var/tmp/diff_new_pack.Q9KLft/_new 2016-04-28 17:02:48.000000000 +0200
@@ -17,7 +17,7 @@
Name: xviewer
-Version: 1.0.1
+Version: 1.0.2
Release: 0
Summary: Fast and functional graphics viewer
License: GPL-2.0+ and LGPL-2.1+
@@ -29,6 +29,7 @@
BuildRequires: hicolor-icon-theme
BuildRequires: libjpeg-devel
BuildRequires: libxml2-python
+BuildRequires: pkg-config
BuildRequires: update-desktop-files
BuildRequires: yelp-tools
BuildRequires: pkgconfig(dbus-glib-1)
++++++ xviewer-1.0.1.tar.gz -> xviewer-1.0.2.tar.gz ++++++
++++ 200462 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package xplayer-plparser for openSUSE:Factory checked in at 2016-04-28 16:57:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xplayer-plparser (Old)
and /work/SRC/openSUSE:Factory/.xplayer-plparser.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xplayer-plparser"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xplayer-plparser/xplayer-plparser.changes 2016-02-26 00:48:02.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xplayer-plparser.new/xplayer-plparser.changes 2016-04-28 17:02:44.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Apr 27 16:43:54 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 1.0.2:
+ * Update hr.po.
+
+-------------------------------------------------------------------
Old:
----
xplayer-plparser-1.0.1.tar.gz
New:
----
xplayer-plparser-1.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xplayer-plparser.spec ++++++
--- /var/tmp/diff_new_pack.bPQ9xH/_old 2016-04-28 17:02:45.000000000 +0200
+++ /var/tmp/diff_new_pack.bPQ9xH/_new 2016-04-28 17:02:45.000000000 +0200
@@ -19,7 +19,7 @@
%define _sover 18
%define _name xplayer-pl-parser
Name: xplayer-plparser
-Version: 1.0.1
+Version: 1.0.2
Release: 0
Summary: Simple GObject-based library to parse playlist formats
License: LGPL-2.0+
@@ -29,6 +29,7 @@
Source1: baselibs.conf
BuildRequires: gnome-common
BuildRequires: libgcrypt-devel
+BuildRequires: pkg-config
BuildRequires: pkgconfig(glib-2.0) >= 2.31.0
BuildRequires: pkgconfig(gmime-2.6)
BuildRequires: pkgconfig(gobject-introspection-1.0)
@@ -81,8 +82,8 @@
%package devel
Summary: Simple GObject-based library to parse playlist formats
Group: Development/Libraries/C and C++
-Requires: lib%{name}-mini%{_sover} = %{version}
Requires: lib%{name}%{_sover} = %{version}
+Requires: lib%{name}-mini%{_sover} = %{version}
Requires: typelib-1_0-XplayerPlParser-1_0 = %{version}
%description devel
++++++ xplayer-plparser-1.0.1.tar.gz -> xplayer-plparser-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xplayer-plparser-1.0.1/configure.ac new/xplayer-plparser-1.0.2/configure.ac
--- old/xplayer-plparser-1.0.1/configure.ac 2016-02-06 17:36:31.000000000 +0100
+++ new/xplayer-plparser-1.0.2/configure.ac 2016-04-27 16:24:56.000000000 +0200
@@ -2,7 +2,7 @@
m4_define(xplayer_version_major, 1)
m4_define(xplayer_version_minor, 0)
-m4_define(xplayer_version_micro, 1)
+m4_define(xplayer_version_micro, 2)
AC_INIT([xplayer-pl-parser],
[xplayer_version_major.xplayer_version_minor.xplayer_version_micro],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xplayer-plparser-1.0.1/debian/changelog new/xplayer-plparser-1.0.2/debian/changelog
--- old/xplayer-plparser-1.0.1/debian/changelog 2016-02-06 17:36:31.000000000 +0100
+++ new/xplayer-plparser-1.0.2/debian/changelog 2016-04-27 16:24:56.000000000 +0200
@@ -1,3 +1,11 @@
+xplayer-pl-parser (1.0.2) sarah; urgency=medium
+
+ [ gogogogi ]
+ * Update hr.po
+ * Update hr.po
+
+ -- Clement Lefebvre <root(a)linuxmint.com> Wed, 27 Apr 2016 15:24:25 +0100
+
xplayer-pl-parser (1.0.1) sarah; urgency=medium
* 1.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xplayer-plparser-1.0.1/po/hr.po new/xplayer-plparser-1.0.2/po/hr.po
--- old/xplayer-plparser-1.0.1/po/hr.po 2016-02-06 17:36:31.000000000 +0100
+++ new/xplayer-plparser-1.0.2/po/hr.po 2016-04-27 16:24:56.000000000 +0200
@@ -1,49 +1,55 @@
-# Translation of xplayer to Croatiann
-# Copyright (C) Croatiann team
-# Translators: Automatski Prijevod <>,Danijel Studen <dstuden(a)vuka.hr>,Denis Lackovic <delacko(a)fly.srk.fer.hr>,Diana Ćorluka <dina(a)iskrameco.hr>,Ivan Jankovic <rbrrneck(a)gmx.net>,Nikola Planinac <>,Robert Sedak <robert.sedak(a)sk.tel.hr>,
+# Croatian translation.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# gogo <trebelnik2(a)gmail.com>, 2016.
+#
msgid ""
msgstr ""
-"Project-Id-Version: xplayer 0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-09 18:46+0200\n"
-"PO-Revision-Date: 2008-05-17 14:51+0000\n"
-"Last-Translator: Launchpad Translations Administrators <rosetta@launchpad."
-"net>\n"
-"Language-Team: Croatian <lokalizacija(a)linux.hr>\n"
+"Project-Id-Version: xplayer-pl-parser 1.0.1\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Last-Translator: gogo <trebelnik2(a)gmail.com>\n"
+"Language-Team: Croatian <hr(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2008-05-28 14:51+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Language: hr\n"
+"X-Generator: Poedit 1.5.4\n"
-#: ../plparse/xplayer-disc.c:284 ../plparse/xplayer-disc.c:423
+#: ../plparse/xplayer-disc.c:276 ../plparse/xplayer-disc.c:289
+#: ../plparse/xplayer-disc.c:533
#, c-format
-msgid "Failed to mount %s"
-msgstr "Greška kod montiranja %s"
+msgid "Failed to mount %s."
+msgstr "Neuspješno montiranje %s."
-#: ../plparse/xplayer-disc.c:314
+#: ../plparse/xplayer-disc.c:418
#, c-format
-msgid "No media in drive for device '%s'"
-msgstr "Nema medija u uređaju '%s'"
+msgid "No media in drive for device '%s'."
+msgstr "Nema medija u uređaju '%s'."
-#: ../plparse/xplayer-disc.c:366
+#: ../plparse/xplayer-disc.c:476
+#, c-format
msgid "Please check that a disc is present in the drive."
-msgstr "Molim, provjerite nalazi li se disk u uređaju."
+msgstr "Provjerite je li disk prisutan u uređaju."
-#: ../plparse/xplayer-disc.c:792
+#: ../plparse/xplayer-disc.c:947
msgid "Audio CD"
-msgstr "Zvučni CD"
+msgstr "Glazbeni CD"
-#: ../plparse/xplayer-disc.c:794
+#: ../plparse/xplayer-disc.c:949
msgid "Video CD"
msgstr "Video CD"
-#: ../plparse/xplayer-disc.c:796
+#: ../plparse/xplayer-disc.c:951
msgid "DVD"
msgstr "DVD"
-#: ../plparse/xplayer-disc.c:798
+#: ../plparse/xplayer-disc.c:953
msgid "Digital Television"
msgstr "Digitalna televizija"
+
+#: ../plparse/xplayer-disc.c:955
+msgid "Blu-ray"
+msgstr "Blu-ray"
1
0
Hello community,
here is the log from the commit of package xed for openSUSE:Factory checked in at 2016-04-28 16:57:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xed (Old)
and /work/SRC/openSUSE:Factory/.xed.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xed"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xed/xed.changes 2016-02-23 16:54:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xed.new/xed.changes 2016-04-28 17:02:41.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Apr 27 16:43:54 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 1.0.4 (changes since 1.0.2):
+ * Fix wrong dconf paths.
+ * Switch to gnome-common.
+ * Fix few build warnings.
+ * GTK+ 3.10 compatibility.
+ * notebooks: Remove the extra frame from the main and documents
+ panel scrolled windows.
+ * Use Ctrl+Y for Redo.
+ * Update translations.
+
+-------------------------------------------------------------------
Old:
----
xed-1.0.2.tar.gz
New:
----
xed-1.0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xed.spec ++++++
--- /var/tmp/diff_new_pack.sGkGkX/_old 2016-04-28 17:02:42.000000000 +0200
+++ /var/tmp/diff_new_pack.sGkGkX/_new 2016-04-28 17:02:42.000000000 +0200
@@ -17,7 +17,7 @@
Name: xed
-Version: 1.0.2
+Version: 1.0.4
Release: 0
Summary: A small and lightweight text editor
License: GPL-2.0+
@@ -25,11 +25,12 @@
Url: https://github.com/linuxmint/xed
Source: https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{v…
BuildRequires: fdupes
-BuildRequires: mate-common
+BuildRequires: gnome-common
+BuildRequires: pkg-config
BuildRequires: update-desktop-files
BuildRequires: yelp-tools
BuildRequires: pkgconfig(enchant)
-BuildRequires: pkgconfig(gtk+-3.0)
+BuildRequires: pkgconfig(gtk+-3.0) >= 3.10
BuildRequires: pkgconfig(gtksourceview-3.0)
BuildRequires: pkgconfig(iso-codes)
BuildRequires: pkgconfig(libxml-2.0)
@@ -38,34 +39,35 @@
%glib2_gsettings_schema_requires
%description
-X-Apps Text Editor is a small, but powerful text editor designed
-for the Cinnamon desktop and others. It has most standard text
-editor functions and fully supports international text in Unicode.
+xed is a small, but powerful text editor designed for the Cinnamon
+desktop and others. It has most standard text editor functions and
+fully supports international text in Unicode.
Advanced features include syntax highlighting and automatic
indentation of source code, printing and editing of multiple
documents in one window.
-X-Apps Text Editor is extensible through a plugin system, which
-currently includes support for spell checking, comparing files,
-viewing VCS ChangeLogs, and adjusting indentation levels.
+xed is extensible through a plugin system, which currently
+includes support for spell checking, comparing files, viewing VCS
+ChangeLogs, and adjusting indentation levels.
%package devel
Summary: Small and lightweight text editor
Group: Development/Libraries/Other
Requires: %{name} = %{version}
+Requires: pkg-config
Requires: pkgconfig(gtksourceview-3.0)
%description devel
-X-Apps Text Editor is a small, but powerful text editor designed
-for the Cinnamon desktop and others. It has most standard text
-editor functions and fully supports international text in Unicode.
+xed is a small, but powerful text editor designed for the Cinnamon
+desktop and others. It has most standard text editor functions and
+fully supports international text in Unicode.
Advanced features include syntax highlighting and automatic
indentation of source code, printing and editing of multiple
documents in one window.
-X-Apps Text Editor is extensible through a plugin system, which
-currently includes support for spell checking, comparing files,
-viewing VCS ChangeLogs, and adjusting indentation levels.
+xed is extensible through a plugin system, which currently
+includes support for spell checking, comparing files, viewing VCS
+ChangeLogs, and adjusting indentation levels.
%lang_package
@@ -73,7 +75,7 @@
%setup -q
%build
-NOCONFIGURE=1 mate-autogen
+NOCONFIGURE=1 gnome-autogen.sh
%configure \
--with-gtk=3.0
make %{?_smp_mflags}
++++++ xed-1.0.2.tar.gz -> xed-1.0.4.tar.gz ++++++
++++ 402406 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package pdfcompare for openSUSE:Factory checked in at 2016-04-28 16:57:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pdfcompare (Old)
and /work/SRC/openSUSE:Factory/.pdfcompare.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pdfcompare"
Changes:
--------
--- /work/SRC/openSUSE:Factory/pdfcompare/pdfcompare.changes 2014-01-14 21:51:50.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.pdfcompare.new/pdfcompare.changes 2016-04-28 17:02:38.000000000 +0200
@@ -1,0 +2,18 @@
+Tue Apr 19 15:24:08 UTC 2016 - jw(a)owncloud.com
+
+- V1.6.8 - cleaner popup annotations unless -S
+ - no navigation buttons unless -f ..N..
+
+-------------------------------------------------------------------
+Mon Apr 18 18:17:25 UTC 2016 - jnweiger(a)gmail.com
+
+- V1.6.7 - support Ubuntu 14.04
+
+-------------------------------------------------------------------
+Mon Apr 18 13:57:26 UTC 2016 - jw(a)owncloud.com
+
+- V1.6.6 - hunspell usage hint: how to add words to private dictonary.
+- pull_github.sh added.
+- use pdf_highlight.py if pdfcompare.py is not in the tar. Historic name.
+
+-------------------------------------------------------------------
Old:
----
pdfcompare-1.6.5.tar.bz2
New:
----
Makefile
debian.changelog
debian.compat
debian.control
debian.pdfcompare.install
debian.rules
debian.series
pdfcompare-1.6.8.tar.bz2
pdfcompare.dsc
pull_github.sh
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pdfcompare.spec ++++++
--- /var/tmp/diff_new_pack.71YLEz/_old 2016-04-28 17:02:40.000000000 +0200
+++ /var/tmp/diff_new_pack.71YLEz/_new 2016-04-28 17:02:40.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package pdfcompare
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -17,13 +17,14 @@
Name: pdfcompare
-Version: 1.6.5
+Version: 1.6.8
Release: 0
Summary: Compare two PDF files, write a resulting PDF with highlighted changes
License: GPL-2.0
Group: Productivity/Publishing/PDF
Url: https://github.com/jnweiger/pdfcompare
Source: pdfcompare-%version.tar.bz2
+Source100: pull_github.sh
# These BuildRequires are only required for the testsuite
BuildRequires: poppler-tools
@@ -75,6 +76,7 @@
%endif
%install
+test -f pdfcompare.py || mv pdf_highlight.py pdfcompare.py
install -Dm 0755 pdfcompare.py %{buildroot}%{_bindir}/pdfcompare
%files
++++++ debian.changelog ++++++
pdfcompare (1.6.8-1) stable; urgency=low
* V1.6.8 - cleaner popup annotations unless -S
* no navigation buttons unless -f ..N..
-- Jürgen Weigert <jw(a)owncloud.com> Tue, 19 Apr 2016 15:45:49 +0200
pdfcompare (1.6.7-1ubuntu1) stable; urgency=medium
* 1.6.7 support ubuntu 14.04
-- Jürgen Weigert <jw(a)owncloud.com> Mon, 18 Apr 2016 20:17:01 +0200
pdfcompare (1.6.6-1) stable; urgency=low
* V1.6.6 - hunspell usage hint: how to add words to private dictonary.
* pull_github.sh added.
-- Jürgen Weigert <jw(a)owncloud.com> Mon, 18 Apr 2016 13:55:48 +0200
pdfcompare (1.6.5-2) stable; urgency=medium
* Dependencies added, debian.rules file fixed.
-- Jürgen Weigert <jw@jw-ThinkPad-T440s> Mon, 18 Apr 2016 13:13:31 +0200
pdfcompare (1.6.5-1) stable; urgency=medium
* first DEB packaging
-- Jürgen Weigert <jw@jw-ThinkPad-T440s> Mon, 04 Apr 2016 20:40:05 +0200
++++++ debian.compat ++++++
9
++++++ debian.control ++++++
Source: pdfcompare
Section: unknown
Priority: optional
Maintainer: Jürgen Weigert <juewei(a)fabfolk.com>
Build-Depends: debhelper (>= 4.2.21)
Package: pdfcompare
Architecture: all
# poppler-utils is needed for /usr/bin/pdftohtml
# python-pygame is needed for pygame.font only.
Depends: ${shlibs:Depends}, ${misc:Depends},
python-pypdf, python-pygame, poppler-utils, python-reportlab,
hunspell, hunspell-en-us, hunspell-de-de
Description: Compare two PDF files, write a resulting PDF with highlighted changes.
Potential text portions that were moved around are recognized and analyzed
for similarity with a second level diff.
++++++ debian.pdfcompare.install ++++++
pdfcompare /usr/bin
++++++ debian.rules ++++++
#!/usr/bin/make -f
%:
echo 'all:' > Makefile # don't build anything
dh $@
override_dh_auto_install:
mv pdfcompare.py pdfcompare || mv pdf_highlight.py pdfcompare
chmod 0755 pdfcompare
dh_auto_install -- INSTALL_ROOT=$(CURDIR)/debian/tmp
++++++ pdfcompare-1.6.5.tar.bz2 -> pdfcompare-1.6.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/MANIFEST.in new/pdfcompare-1.6.8/MANIFEST.in
--- old/pdfcompare-1.6.5/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/MANIFEST.in 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1 @@
+include *.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/Makefile new/pdfcompare-1.6.8/Makefile
--- old/pdfcompare-1.6.5/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/Makefile 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,26 @@
+
+VER=1.6.8
+D=dist/pdfcompare-$(VER)
+EXCL=--exclude \*.orig --exclude \*~
+
+all: check tar
+
+check test:
+ cd test; make test VER=$(VER)
+
+testrefresh refreshtest:
+ cd test; make test refresh=yes
+
+clean:
+ rm -rf dist *.orig *~
+ rm -rf test/*.orig test/*~
+
+tar dist:
+ rm -rf dist
+ mkdir -p $D
+ ln -s ../../pdfcompare.py $D/pdfcompare.py
+ ln -s ../../COPYING $D/
+ ln -s ../../test $D/test
+ cd dist; tar jhcvf ../pdfcompare-$(VER).tar.bz2 pdfcompare-$(VER) $(EXCL)
+ rm -rf dist
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/README.txt new/pdfcompare-1.6.8/README.txt
--- old/pdfcompare-1.6.5/README.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/README.txt 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,13 @@
+pdfcompare
+==========
+
+Compare text of two PDF files, write a resulting PDF with highlighted changes.
+Potential text portions that were moved around are recognized and analyzed
+for similarity with a second level diff.
+
+Required Packages:
+
+* pyPdf
+* reportlab.pdfgen
+* reportlab.lib.colors
+* pygame.font'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/TODO.md new/pdfcompare-1.6.8/TODO.md
--- old/pdfcompare-1.6.5/TODO.md 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/TODO.md 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,81 @@
+TODO
+
+* Test with pyPDF2
+
+* Test with python3
+
+* Is a Windows installer possible?
+
+* Test popups with Microsoft Edge Browser
+
+* hunspell issues:
+ - python-HunspellPure should be a separate module. Split it.
+ - we artificially limit to [A-Z_-]+ for words. This is bad for german umlauts.
+ - extend hunspell to allow a progress indicator callback.
+ (counting newlines seen in response)
+
+* testsuite
+ - maybe prepare a test script that allows numbers to be off by some
+ percentage, but wants everything else precise.
+ This helps with pdf source checking.
+
+* improve --log logfile generator.
+ produce a json/xml/csv/txt file describing the diffs, -s word locations
+ and --spellcheck results.
+
+* one letter changes always become word changes.
+ Either run in single character mode. Or try to trim the replaced text for
+ common suffix or common prefix.
+
+* Normalize nonbreaking spaces to spaces.
+ This is important when e.g. markdown source has a 0x20 space, but rendered
+ PDF may have instead.
+
+
+
+DONE:
+
+* write compressed streams.
+
+* catch file open errors, before ET complains about 0 elements.
+
+* perform only same-length-replace. All other replace-ops should be replace+insert
+ or replace+delete.
+
+* place delete marker at last text end position, rather than next text start position.
+ This is a tricky, implementation in markword().
+
+* testsuite
+ - a 1:1 comparison is not possible, as e.g. poppler-0.18 and poppler-0.20
+ produce differences in the exact coordinates used.
+ - make a fuzzy comparison against templates with python-cv, pHash, etc...
+ http://stackoverflow.com/questions/1819124/image-comparison-algorithm suggests
+ Scipy. imgcmp.py does this.
+ - generate several output.pdf, convert via ImageMagick to png,
+ - run pdfcompare --version.
+
+* nicer +++---~~~== git style diagnostics per page, rather than saying '87 hits'.
+
+* if pagebreaks are within deleted text, point this out in the baloon popup.
+
+* Navigation from changebar to changebar, if there are many unchanged pages to jump over.
+ - calculation, graphics done. Hack with relocated navigation done.
+
+* popups are all in one line in okular. Need to provide linebreaks manually, sigh.
+
+* introduce an ignore-margin for text changes. Any words there will not go into
+ the compare wordlists, and will not match with --search. This is meant to skip
+ over pagenumbers and other bottom or top matter, that is not considered part
+ of the document contents stream.
+ --feature margin shall draw the margin area as shaded gray, so that we know
+ where we are.
+
+* feature:
+ pipe the wordlist through hunspell, if hunspell is available.
+ use search-highlights to mark all words for which hunspell has spelling
+ suggestions.
+
+* feature:
+ added a trivial --log implementation
+
+* second level diff for moved blocks.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/hunspell.py new/pdfcompare-1.6.8/hunspell.py
--- old/pdfcompare-1.6.5/hunspell.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/hunspell.py 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,184 @@
+# hunspell.py -- a wrapper class for hunspell
+#
+# (c) 2013 Juergen Weigert jw(a)suse.de
+# Distribute under GPL-2.0 or ask
+#
+# 2013-01-31, V0.1 jw - initial draught: word by word I/O
+# 2013-02-01, V0.1 jw - added own _readline() to use buffering. Pythons readline()
+# does single byte read()s, which is slow.
+# 2013-02-02, V0.2 jw - check_words() now remembers a wordlist, pushes all out
+# with an extra thread, reads back async, and reassembles.
+# This is much more efficient
+#
+import os,subprocess,re
+
+__VERSION__ = '0.2'
+
+class Hunspell():
+ """A pure python module to interface with hunspell.
+ It was written as a replacement for the hunspell module from
+ http://code.google.com/p/pyhunspell/, which appears to be in unmaintained.
+ and more difficult to use, due to lack of examples and documentation.
+ """
+ def __init__(self, dicts=['en_US']):
+ self.cmd = ['hunspell', '-i', 'utf-8', '-a']
+ self.dicts = dicts
+ self.proc = None
+ self.attr = None
+ self.buffer = ''
+
+ def _start(self):
+ cmd = self.cmd
+ if self.dicts is not None and len(self.dicts):
+ cmd += ['-d', ','.join(self.dicts)]
+ try:
+ self.proc = subprocess.Popen(cmd, shell=False,
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ except OSError as e:
+ self.proc = "%s failed: errno=%d %s" % (cmd, e.errno, e.strerror)
+ raise OSError(self.proc)
+ header = ''
+ while True:
+ more = self.proc.stdout.readline().rstrip()
+ if len(more) > 5 and more[0:5] == '@(#) ': # version line with -a
+ self.version = more[5:]
+ break
+ elif len(more) > 9 and more[0:9] == 'Hunspell ': # version line w/o -a
+ self.version = more
+ break
+ else:
+ header += more # stderr should be collected here. It does not work
+ if len(header): self.header = header
+ self.buffer = ''
+
+ def _readline(self):
+ # python readline() is horribly stupid on this pipe. It reads single
+ # byte, just like java did in the 1980ies. Sorry, this is not
+ # acceptable in 2013.
+ if self.proc is None:
+ raise Error("Hunspell_readline before _start")
+ while True:
+ idx = self.buffer.find('\n')
+ if idx < 0:
+ more = self.proc.stdout.read()
+ if not len(more):
+ r = self.buffer
+ self.buffer = ''
+ return r
+ self.buffer += more
+ else:
+ break
+ r = self.buffer[0:idx+1]
+ self.buffer = self.buffer[idx+1:]
+ return r
+
+ def _load_attr(self):
+ try:
+ p = subprocess.Popen(self.cmd + ['-D'], shell=False,
+ stdin=open('/dev/null'), stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
+ except OSError as e:
+ raise OSError("%s failed: errno=%d %s" % (self.cmd + ['-D'], e.errno, e.strerror))
+ self.attr = {}
+ header=''
+ while True:
+ line = p.stdout.readline().rstrip()
+ if not len(line):
+ break
+ # AVAILABLE DICTIONARIES (path is not mandatory for -d option):
+ m = re.match('([A-Z]+\s[A-Z]+).*:$', line)
+ if m:
+ header = m.group(1)
+ self.attr[header] = []
+ elif len(header):
+ self.attr[header].append(line)
+ return self.attr
+
+ def dicts(self,dicts=None):
+ """returns or sets the dictionaries that hunspell shall try to use"""
+ if dicts is not None:
+ self.dicts = dicts
+ return self.dicts
+
+ def list_dicts(self):
+ """query hunspell about the available dictionaries.
+ Returns a key value dict where keys are short names, and values
+ are path names. You can pick some or all of the returned keys,
+ and use the list (or one) as an argument to
+ the next Hunspell() instance, or as an argument
+ to the dicts() method.
+ """
+ if self.attr is None: self._load_attr()
+ r = {}
+ for d in self.attr['AVAILABLE DICTIONARIES']:
+ words = d.split('/')
+ r[words[-1]] = d
+ return r
+
+ def dict_search_path(self):
+ """returns a list of pathnames, actually used by hunspell to load
+ spelling dictionaries from.
+ """
+ if self.attr is None: self._load_attr()
+ r = []
+ for d in self.attr['SEARCH PATH']:
+ r += d.split(':')
+ return r
+
+ def dicts_loaded(self):
+ """query the spelling dictionaries that will actually be used for
+ the next check_words() call.
+ """
+ if self.attr is None: self._load_attr()
+ return self.attr['LOADED DICTIONARY']
+
+ def check_words(self, words):
+ """takes a list of words as parameter, and checks them against the
+ loaded spelling dictionaries. A key value dict is returned, where
+ every key represents a word that was not found in the
+ spelling dictionaries. Values are lists of correction suggestions.
+ check_words() is implemented by calling the hunspell binary in pipe mode.
+ This is fairly robust, but not optimized for efficiency.
+ """
+ if self.proc is None:
+ self._start()
+ childpid = os.fork()
+ if childpid == 0:
+ for w in words:
+ self.proc.stdin.write(("^"+w+"\n").encode('utf8'))
+ os._exit(0)
+ self.proc.stdin.close()
+ bad_words = {}
+
+ while True:
+ line = self._readline()
+ if len(line) == 0:
+ break
+ line = line.rstrip()
+ if not len(line) or line[0] in '*+-': continue
+
+ if line[0] == '#':
+ car = line.split(' ')
+ bad_words[car[1]] = [] # no suggestions
+ elif line[0] != '&':
+ print "hunspell protocoll error: '%s'" % line
+ continue # unknown stuff
+ # '& Radae 7 0: Radar, Ramada, Estrada, Prada, Rad, Roadie, Readable\n'
+ a = line.split(': ')
+ if len(a) >= 2:
+ car = a[0].split(' ')
+ cdr = a[1].split(', ')
+ bad_words[car[1]] = cdr
+ else:
+ print("bad hunspell reply: %s, split as %s" % (line, a))
+ self.proc = None
+ return bad_words
+
+
+if __name__ == "__main__":
+ from pprint import pprint
+ h = Hunspell()
+ pprint(h.list_dicts())
+ pprint(h.dict_search_path())
+ pprint(h.check_words(["ppppp", '123', '', 'gorkicht', 'gemank', 'haus', '']))
+ pprint(h.check_words(["Radae", 'blood', 'mensch', 'green', 'blea', 'fork']))
+ pprint(h.version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/imgcmp.py new/pdfcompare-1.6.8/imgcmp.py
--- old/pdfcompare-1.6.5/imgcmp.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/imgcmp.py 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,109 @@
+#! /usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# compare two images using Scipy
+# (c) 2013 - jw(a)suse.de - distributer under GPL-2.0 or ask.
+#
+# Dependencies:
+# sudo zypper in python-scipy
+# sudo zypper in ImageMagick
+#
+# See also python-pHash, and python-opencv
+# http://stackoverflow.com/questions/13379909/compare-similarity-of-images-us…
+
+from __future__ import print_function, division
+
+import sys, os, re, tempfile
+from pprint import pprint
+
+import scipy as sp
+from scipy.misc import imread
+from scipy.signal.signaltools import correlate2d as c2d
+
+
+class CompareImageException(Exception):
+ """
+ Exception class for comparing two files
+ """
+ def __init__(self, c11, c12, c22):
+ self.c11=c11
+ self.c12=c12
+ self.c22=c22
+ def __repr__(self):
+ return "(%.2f %.2f %.2f)" % (self.c11, self.c12, self.c22)
+ __str__=__repr__
+
+
+def load_img(fname):
+ """
+ Load and convert images
+ """
+ # get JPG image as Scipy array, RGB (3 layer)
+ if re.search("\.pdf$", fname, re.I):
+ # convert PDF to JPG
+ tf = tempfile.NamedTemporaryFile(delete=True, suffix=".jpg")
+ print("creating %s" % tf.name)
+ os.system("convert '%s[0]' -geometry 100x100 '%s'" % (fname, tf.name))
+ data = imread(tf.name)
+ tf.close()
+ else:
+ data = imread(fname)
+ # convert to grey-scale using W3C luminance calc
+ ## pprint([data])
+ ## ValueError: matrices are not aligned, if alpha channel...
+ lum = [299, 587, 114]
+ if len(data[0][0]) > 3:
+ lum.append(0)
+ data = sp.inner(data, lum) / 1000.0
+ # normalize per http://en.wikipedia.org/wiki/Cross-correlation
+ return (data - data.mean()) / data.std()
+
+
+def compare(file1, file2, diff):
+ """
+ Compares two files (JPEG, PNG or PDF)
+ """
+ im1 = load_img(file1)
+ im2 = load_img(file2)
+ c11 = c2d(im1, im1, mode='same') # baseline
+ c22 = c2d(im2, im2, mode='same') # baseline
+ c12 = c2d(im1, im2, mode='same')
+ m = [c11.max(), c12.max(), c22.max()]
+ diff_ab = 100 * (1-m[1]/m[0])
+ diff_ba = 100 * (1-m[1]/m[2])
+
+ fail=max(diff_ab,diff_ba) > diff
+
+ if fail:
+ raise CompareImageException(c11.max(), c12.max(), c22.max())
+
+ return fail
+
+def main():
+ """
+ Compares two files (JPEG, PNG or PDF)
+ """
+ if len(sys.argv) < 4:
+ print("""Usage: %s FILE1 FILE2 N.NN
+
+ FILE1,FILE2 can be in JPEG, PNG, or PDF format.
+ N.NN should be a small floating point number. It represents
+ the allowed difference in the image metrics.
+ correlate2d from scipy.signal.signaltools is used to compute
+ the metrics.
+ """ % sys.argv[0])
+ sys.exit(0)
+ diff_allowed=float(sys.argv[3])
+ try:
+ fail=compare(sys.argv[1],sys.argv[2],diff_allowed)
+ except CompareImageException as i:
+ print("error: %s" % i)
+
+
+ print("limit: %.2f%% -> %s" % (diff_allowed, ("OK","FAIL")[fail]))
+ if fail: sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/man/Makefile new/pdfcompare-1.6.8/man/Makefile
--- old/pdfcompare-1.6.5/man/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/man/Makefile 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,20 @@
+#
+# apt-get install xsltproc fop
+#
+
+## openSUSE:
+DB=/usr/share/xml/docbook/stylesheet/nwalsh/current/
+## Ubuntu:
+DB=/usr/share/xml/docbook/stylesheet/nwalsh/
+
+all: man html pdf
+
+man:
+ xsltproc $(DB)/manpages/docbook.xsl pdfcompare.xml
+
+html:
+ xsltproc --output pdfcompare.html $(DB)/xhtml/docbook.xsl pdfcompare.xml
+
+pdf:
+ xsltproc --stringparam paper.type A4 --output pdfcompare.fo $(DB)/fo/docbook.xsl pdfcompare.xml
+ fop pdfcompare.fo pdfcompare.pdf && rm pdfcompare.fo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/man/pdfcompare.1 new/pdfcompare-1.6.8/man/pdfcompare.1
--- old/pdfcompare-1.6.5/man/pdfcompare.1 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/man/pdfcompare.1 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,189 @@
+'\" t
+.\" Title: pdfcompare
+.\" Author: Jürgen Weigert
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 04/18/2016
+.\" Manual: @VERSION@
+.\" Source: https://github.com/jnweiger/pdfcompare @VERSION@
+.\" Language: English
+.\"
+.TH "PDFCOMPARE" "1" "04/18/2016" "https://github\&.com/jnweiger/" "@VERSION@"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+pdfcompare \- Highlight words in a PDF file
+.SH "SYNOPSIS"
+.HP \w'\fBpdfcompare\fR\ 'u
+\fBpdfcompare\fR [\-h] [\-c\ \fIOLDFILE\fR] [\-d\ \fIDECRYPT_KEY\fR] [\-e] [\-i] [\-l\ \fILOGFILE\fR] [\-m\ \fIOPS\fR] [\-n] [\-o\ \fIOUTFILE\fR] [\-s\ \fIWORD_REGEXP\fR] [\-\-spell] [\-\-strict] [\-t\ \fITRANSP\fR] [\-B] [\-C\ NAME=\fIR\fR,\fIG\fR,\fIB\fR] [\-D] [\-F\ \fIFIRST_PAGE\fR] [\-L\ \fILAST_PAGE\fR] [\-M\ N,E,W,S] [\-V] [\-X]
+.br
+{INFILE} [INFILE2]
+.SH "POSITIONAL ARGUMENTS"
+.PP
+\fBINFILE\fR
+.RS 4
+the required PDF input file
+.RE
+.PP
+\fBINFILE2\fR
+.RS 4
+an optional
+\(lqnewer\(rq
+PDF input file; alternate syntax to
+\fB\-c\fR
+.RE
+.SH "OPTIONAL ARGUMENTS"
+.PP
+\fB\-B\fR, \fB\-\-below\fR
+.RS 4
+Paint the highlight markers below the text\&. Try this if the normal merge crashes\&. Use with care, highlights may disappear below background graphics\&. Default: BELOW=\*(AqFALSE\*(Aq
+.RE
+.PP
+\fB\-c \fR\fB\fIOLDFILE\fR\fR, \fB\-\-compare\-text \fR\fB\fIOLDFILE\fR\fR
+.RS 4
+Mark added, deleted and replaced text (or see
+\fB\-m\fR) with regard to
+\fIOLDFILE\fR\&. File formats
+\&.pdf,
+\&.xml,
+\&.txt
+are recognized by their suffix\&. The comparison works word by word\&.
+.RE
+.PP
+\fB\-C NAME=\fR\fB\fIR\fR\fR\fB,\fR\fB\fIG\fR\fR\fB,\fR\fB\fIB\fR\fR, \fB\-\-search\-color NAME=\fR\fB\fIR\fR\fR\fB,\fR\fB\fIG\fR\fR\fB,\fR\fB\fIB\fR\fR
+.RS 4
+Set colors of the search highlights as an RGB triplet; R,G,B ranges are 0\&.0\-1\&.0 each; valid names are \*(Aqadd,\*(Aqdelete\*(Aq,\*(Aqchange\*(Aq,\*(Aqequal\*(Aq,\*(Aqmargin\*(Aq,\*(Aqall\*(Aq; default name is \*(Aqequal\*(Aq, which is also used for
+\fB\-s\fR; default colors are A=0\&.3,1,0\&.3 /*green*/ C=0\&.9,0\&.8,0 /*yellow*/ B=0\&.9,0\&.9,0\&.9 /*gray*/ E=1,0,1 /*pink*/ D=1,0\&.3,0\&.3 /*red*/ M=0\&.7,1,1 /*blue*/
+.RE
+.PP
+\fB\-D\fR, \fB\-\-debug\fR
+.RS 4
+Enable debugging\&. Prints more on stdout, dumps several
+*\&.xml
+and
+*\&.pdf
+files\&.
+.RE
+.PP
+\fB\-e\fR, \fB\-\-exclude\-irrelevant\-pages\fR
+.RS 4
+With
+\fB\-s\fR; show only matching pages\&. With
+\fB\-c\fR: show only changed pages; default: reproduce all pages from
+\fIINFILE\fR
+in
+\fIOUTFILE\fR
+.RE
+.PP
+\fB\-f \fR\fB\fIFEATURES\fR\fR, \fB\-\-features \fR\fB\fIFEATURES\fR\fR
+.RS 4
+Specify how to mark\&. Allowed values are \*(Aqhighlight\*(Aq, \*(Aqchangebar\*(Aq, \*(Aqpopup\*(Aq, \*(Aqnavigation\*(Aq, \*(Aqwatermark\*(Aq, \*(Aqmargin\*(Aq\&. Default: H,C,P,N,W,B
+.RE
+.PP
+\fB\-F \fR\fB\fIFIRST_PAGE\fR\fR, \fB\-\-first\-page \fR\fB\fIFIRST_PAGE\fR\fR
+.RS 4
+Skip some pages at start of document; see also
+\fB\-L\fR; default: all pages
+.RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Show this help message and exit
+.RE
+.PP
+\fB\-i\fR, \fB\-\-nocase\fR
+.RS 4
+Make
+\fB\-s\fR
+case insensitive; default: case sensitive
+.RE
+.PP
+\fB\-L \fR\fB\fILAST_PAGE\fR\fR, \fB\-\-last\-page \fR\fB\fILAST_PAGE\fR\fR
+.RS 4
+Limit pages processed; this counts pages, it does not use document page numbers; see also
+\fB\-F\fR; default: all pages
+.RE
+.PP
+\fB\-l \fR\fB\fILOGFILE\fR\fR, \fB\-\-log \fR\fB\fILOGFILE\fR\fR
+.RS 4
+Write an python datastructure describing all the overlay objects on each page\&. Default none\&.
+.RE
+.PP
+\fB\-M N,E,W,S\fR, \fB\-\-margins N,E,W,S\fR
+.RS 4
+Specify margin space to ignore on each page\&. A margin width is expressed in units of ca\&. 100dpi\&. Specify four numbers in the order north,east,west,south\&. Default: 0,0,0,0
+.RE
+.PP
+\fB\-m \fR\fB\fIOPS\fR\fR, \fB\-\-mark \fR\fB\fIOPS\fR\fR
+.RS 4
+Specify what to mark\&. Used with
+\fB\-c\fR\&. Allowed values are \*(Aqadd\*(Aq,\*(Aqdelete\*(Aq,\*(Aqchange\*(Aq,\*(Aqequal\*(Aq\&. Multiple values can be listed comma\-seperated; abbreviations are allowed\&. Default: A,D,C
+.RE
+.PP
+\fB\-n\fR, \fB\-\-no\-output\fR
+.RS 4
+Do not write an output file; print diagnostics only; default: write output file as per
+\fB\-o\fR
+.RE
+.PP
+\fB\-o \fR\fB\fIOUTFILE\fR\fR, \fB\-\-output \fR\fB\fIOUTFILE\fR\fR
+.RS 4
+Write output to FILE; default:
+output\&.pdf
+.RE
+.PP
+\fB\-\-spell\fR, \fB\-\-spell\-check\fR
+.RS 4
+Run the text body of the (new) PDF through
+\fBhunspell\fR\&. Unknown words are underlined\&. Use e\&.g\&. \*(Aqenv DICTIONARY=en_US \&.\&.\&.\*(Aq (or de_DE, \&.\&.\&.) to specify the spelling dictionary, if your system has more than one\&. To add new words to your private dictionary use e\&.g\&. \*(Aqecho "ownCloud" >> ~/\&.hunspell_en_US\*(Aq Check with
+\fBhunspell \fR\fB\fB\-D\fR\fR
+and study
+\fBhunspell\fR(1)\&.
+.RE
+.PP
+\fB\-\-strict\fR
+.RS 4
+Show really all differences; default: ignore removed hyphenation; ignore character spacing inside a word
+.RE
+.PP
+\fB\-t \fR\fB\fITRANSP\fR\fR, \fB\-\-transparency \fR\fB\fITRANSP\fR\fR
+.RS 4
+Set transparency of the highlight; invisible: 0\&.0; full opaque: 1\&.0; default: 0\&.6
+.RE
+.PP
+\fB\-V\fR, \fB\-\-version\fR
+.RS 4
+Print the version number and exit
+.RE
+.PP
+\fB\-X\fR, \fB\-\-no\-compression\fR
+.RS 4
+Write uncompressed PDF\&. Default: FlateEncode filter compression\&.
+.RE
+.SH "AUTHORS"
+.PP
+\fBJürgen Weigert\fR
+.RS 4
+Developer
+.RE
+.PP
+\fBThomas Schraitle\fR <\&toms(a)opensuse\&.org\&>
+.RS 4
+Manpage author
+.RE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/man/pdfcompare.xml new/pdfcompare-1.6.8/man/pdfcompare.xml
--- old/pdfcompare-1.6.5/man/pdfcompare.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/man/pdfcompare.xml 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.docbook.org/xml/4.5/docbookx.dtd"
+[
+ <!ENTITY product "pdfcompare">
+ <!ENTITY cmd "pdfcompare">
+]>
+<refentry lang="en" id="pdfcompare">
+ <refentryinfo>
+ <productname>&product;</productname>
+ <author>
+ <firstname>Jürgen</firstname>
+ <surname>Weigert</surname>
+ <contrib>Developer</contrib>
+ </author>
+ <othercredit class="technicaleditor">
+ <firstname>Thomas</firstname>
+ <surname>Schraitle</surname>
+ <email>toms(a)opensuse.org</email>
+ <contrib>Manpage author</contrib>
+ </othercredit>
+ </refentryinfo>
+ <refmeta>
+ <refentrytitle>&cmd;</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="version">@VERSION@</refmiscinfo>
+ <refmiscinfo class="source">https://github.com/jnweiger/pdfcompare</refmiscinfo>
+ <!--<refmiscinfo class="manual"></refmiscinfo>-->
+ </refmeta>
+
+ <refnamediv>
+ <refname>&product;</refname>
+ <refpurpose>Highlight words in a PDF file</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv id="calabash.synopsis">
+ <title>Synopsis</title>
+ <cmdsynopsis><command>&cmd;</command>
+ <arg choice="opt">-h</arg>
+ <arg choice="opt">-c <replaceable>OLDFILE</replaceable></arg>
+ <arg choice="opt">-d <replaceable>DECRYPT_KEY</replaceable></arg>
+ <arg choice="opt">-e</arg>
+ <arg choice="opt">-i</arg>
+ <arg choice="opt">-l <replaceable>LOGFILE</replaceable></arg>
+ <arg choice="opt">-m <replaceable>OPS</replaceable></arg>
+ <arg choice="opt">-n</arg>
+ <arg choice="opt">-o <replaceable>OUTFILE</replaceable></arg>
+ <arg choice="opt">-s <replaceable>WORD_REGEXP</replaceable></arg>
+ <arg choice="opt">--spell</arg>
+ <arg choice="opt">--strict</arg>
+ <arg choice="opt">-t <replaceable>TRANSP</replaceable></arg>
+ <arg choice="opt">-B</arg>
+ <arg choice="opt">-C NAME=<replaceable>R</replaceable>,<replaceable>G</replaceable>,<replaceable>B</replaceable></arg>
+ <arg choice="opt">-D</arg>
+ <arg choice="opt">-F <replaceable>FIRST_PAGE</replaceable></arg>
+ <arg choice="opt">-L <replaceable>LAST_PAGE</replaceable></arg>
+ <arg choice="opt">-M N,E,W,S</arg>
+ <arg choice="opt">-V</arg>
+ <arg choice="opt">-X</arg>
+ <sbr/>
+ <arg choice="req">INFILE</arg>
+ <arg choice="opt">INFILE2</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Positional Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term><option>INFILE</option></term>
+ <listitem>
+ <para>the required PDF input file</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>INFILE2</option></term>
+ <listitem>
+ <para>an optional <quote>newer</quote> PDF input file;
+ alternate syntax to <option>-c</option></para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Optional Arguments</title>
+ <variablelist>
+ <varlistentry id="pdfcompare.below">
+ <term><option>-B</option></term>
+ <term><option>--below</option></term>
+ <listitem>
+ <para>Paint the highlight markers below the text. Try this if
+ the normal merge crashes. Use with care, highlights may
+ disappear below background graphics. Default: BELOW='FALSE'</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.compare-text">
+ <term><option>-c <replaceable>OLDFILE</replaceable></option></term>
+ <term><option>--compare-text <replaceable>OLDFILE</replaceable></option></term>
+ <listitem>
+ <para>Mark added, deleted and replaced text (or see <option>-m</option>) with
+ regard to <replaceable>OLDFILE</replaceable>. File formats <filename>.pdf</filename>,
+ <filename>.xml</filename>, <filename>.txt</filename> are
+ recognized by their suffix. The comparison works word by
+ word.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.search-color">
+ <term><option>-C NAME=<replaceable>R</replaceable>,<replaceable>G</replaceable>,<replaceable>B</replaceable></option></term>
+ <term><option>--search-color NAME=<replaceable>R</replaceable>,<replaceable>G</replaceable>,<replaceable>B</replaceable></option></term>
+ <listitem>
+ <para>Set colors of the search highlights as an RGB triplet;
+ R,G,B ranges are 0.0-1.0 each; valid names are
+ 'add,'delete','change','equal','margin','all'; default name
+ is 'equal', which is also used for <option>-s</option>; default colors are
+ A=0.3,1,0.3 /*green*/ C=0.9,0.8,0 /*yellow*/ B=0.9,0.9,0.9
+ /*gray*/ E=1,0,1 /*pink*/ D=1,0.3,0.3 /*red*/ M=0.7,1,1
+ /*blue*/</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.debug">
+ <term><option>-D</option></term>
+ <term><option>--debug</option></term>
+ <listitem>
+ <para>Enable debugging. Prints more on stdout, dumps several
+ <filename>*.xml</filename> and <filename>*.pdf</filename>
+ files.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.exclude-irrelevant-pages">
+ <term><option>-e</option></term>
+ <term><option>--exclude-irrelevant-pages</option></term>
+ <listitem>
+ <para>With <option>-s</option>; show only matching pages. With
+ <option>-c</option>: show only changed pages; default:
+ reproduce all pages from <replaceable>INFILE</replaceable>
+ in <replaceable>OUTFILE</replaceable></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.features">
+ <term><option>-f <replaceable>FEATURES</replaceable></option></term>
+ <term><option>--features <replaceable>FEATURES</replaceable></option></term>
+ <listitem>
+ <para>Specify how to mark. Allowed values are 'highlight',
+ 'changebar', 'popup', 'navigation', 'watermark', 'margin'.
+ Default: H,C,P,N,W,B</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.first-page">
+ <term><option>-F <replaceable>FIRST_PAGE</replaceable></option></term>
+ <term><option>--first-page <replaceable>FIRST_PAGE</replaceable></option></term>
+ <listitem>
+ <para>Skip some pages at start of document; see also
+ <option>-L</option>; default: all pages</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.help">
+ <term><option>-h</option></term>
+ <term><option>--help</option></term>
+ <listitem>
+ <para>Show this help message and exit</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.nocase">
+ <term><option>-i</option></term>
+ <term><option>--nocase</option></term>
+ <listitem>
+ <para>Make <option>-s</option> case insensitive; default: case
+ sensitive</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.last-page">
+ <term><option>-L <replaceable>LAST_PAGE</replaceable></option></term>
+ <term><option>--last-page <replaceable>LAST_PAGE</replaceable></option></term>
+ <listitem>
+ <para>Limit pages processed; this counts pages, it does not
+ use document page numbers; see also <option>-F</option>; default: all
+ pages</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.log">
+ <term><option>-l <replaceable>LOGFILE</replaceable></option></term>
+ <term><option>--log <replaceable>LOGFILE</replaceable></option></term>
+ <listitem>
+ <para>Write an python datastructure describing all the overlay
+ objects on each page. Default none.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.margins">
+ <term><option>-M N,E,W,S</option></term>
+ <term><option>--margins N,E,W,S</option></term>
+ <listitem>
+ <para>Specify margin space to ignore on each page. A margin
+ width is expressed in units of ca. 100dpi. Specify four
+ numbers in the order north,east,west,south. Default:
+ 0,0,0,0</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.mark">
+ <term><option>-m <replaceable>OPS</replaceable></option></term>
+ <term><option>--mark <replaceable>OPS</replaceable></option></term>
+ <listitem>
+ <para>Specify what to mark. Used with <option>-c</option>. Allowed values are
+ 'add','delete','change','equal'. Multiple values can be
+ listed comma-seperated; abbreviations are allowed. Default:
+ A,D,C</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.no-output">
+ <term><option>-n</option></term>
+ <term><option>--no-output</option></term>
+ <listitem>
+ <para>Do not write an output file; print diagnostics only;
+ default: write output file as per <option>-o</option></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.output">
+ <term><option>-o <replaceable>OUTFILE</replaceable></option></term>
+ <term><option>--output <replaceable>OUTFILE</replaceable></option></term>
+ <listitem>
+ <para>Write output to FILE; default: <filename>output.pdf</filename></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.spell">
+ <term><option>--spell</option></term>
+ <term><option>--spell-check</option></term>
+ <listitem>
+ <para>Run the text body of the (new) PDF through <command>hunspell</command>.
+ Unknown words are underlined. Use e.g. 'env DICTIONARY=en_US
+ ...' (or de_DE, ...) to specify the spelling dictionary, if
+ your system has more than one. To add new words to your
+ private dictionary use e.g. 'echo "ownCloud" >> ~/.hunspell_en_US'
+ Check with <command>hunspell <option>-D</option></command> and
+ study <citerefentry>
+ <refentrytitle>hunspell</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>. </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.strict">
+ <term><option>--strict</option></term>
+ <listitem>
+ <para>Show really all differences; default: ignore removed
+ hyphenation; ignore character spacing inside a word</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.transparency">
+ <term><option>-t <replaceable>TRANSP</replaceable></option></term>
+ <term><option>--transparency <replaceable>TRANSP</replaceable></option></term>
+ <listitem>
+ <para>Set transparency of the highlight; invisible: 0.0; full
+ opaque: 1.0; default: 0.6 </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.version">
+ <term><option>-V</option></term>
+ <term><option>--version</option></term>
+ <listitem>
+ <para>Print the version number and exit</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="pdfcompare.no-compression">
+ <term><option>-X</option></term>
+ <term><option>--no-compression</option></term>
+ <listitem>
+ <para>Write uncompressed PDF. Default: FlateEncode filter
+ compression.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+</refentry>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/pdfcompare.py new/pdfcompare-1.6.8/pdfcompare.py
--- old/pdfcompare-1.6.5/pdfcompare.py 2014-01-07 15:28:01.000000000 +0100
+++ new/pdfcompare-1.6.8/pdfcompare.py 2016-04-19 17:23:08.000000000 +0200
@@ -1,9 +1,9 @@
#! /usr/bin/python
# -*- coding: UTF-8 -*-
#
-# pdf_highlight.py -- command line tool to show search or compare results in a PDF
+# pdfcompare.py -- command line tool to show search or compare results in a PDF
#
-# (c) 2012-2013 Juergen Weigert jw(a)suse.de
+# (c) 2012-2016 Juergen Weigert juewei(a)fabfolk.com
# Distribute under GPL-2.0 or ask
#
# 2012-03-16, V0.1 jw - initial draught: argparse, pdftohtml-xml, font.metrics
@@ -88,6 +88,12 @@
# later on. Strange.
# 2014-01-07, V1.6.5 jw - manually merged https://github.com/jnweiger/pdfcompare/pull/4
# hope, I did not break too much...
+# 2014-11-07, V1.6.6 jw - hint added for hunspell use: add word.
+# 2015-04-18, V1.6.7 jw - fall back to pyPdf from PyPDF2, for Ubuntu 14.04 LTS
+# 2015-04-19, V1.6.8 jw - popup pN[tcb]: source location descriptors optional.
+# No normal user expects or understands them.
+# No navigation marks per default. They are often broken, and often
+# useless due to page number changes. Include in -f to enable.
#
# osc in devel:languages:python python-pypdf >= 1.13+20130112
# need fix from https://bugs.launchpad.net/pypdf/+bug/242756
@@ -113,9 +119,9 @@
# Compatibility for older Python versions
from __future__ import with_statement
from __future__ import print_function
-# from __future__ import division
+from __future__ import division
-__VERSION__ = '1.6.5'
+__VERSION__ = '1.6.8'
try:
# python2
@@ -123,7 +129,12 @@
except ImportError:
# python3, breaks python2-reportlab
from io import StringIO
-from pyPdf import PdfFileWriter, PdfFileReader, generic as Pdf
+try:
+ # Ubuntu 15.x
+ from PyPDF2 import PdfFileWriter, PdfFileReader, generic as Pdf
+except ImportError:
+ # Ubuntu 14.04 LTS
+ from pyPdf import PdfFileWriter, PdfFileReader, generic as Pdf
from reportlab.pdfgen import canvas
from reportlab.lib.colors import Color
import urllib # used when normal encode fails.
@@ -150,6 +161,7 @@
highlight_height = 1.2 # some fonts cause too much overlap with 1.4
# 1.2 is often not enough to look symmetric.
+anno_popup_src_loc_ref = False # False: 'chg: bla' True: 'chg:p1t: bla'
# from pdfminer.fontmetrics import FONT_METRICS
# FONT_METRICS['Helvetica'][1]['W']
@@ -283,7 +295,10 @@
text = mark.get('t', '.') + ':'
if 'o' in mark:
if isinstance(mark['o'], list):
- text += mark['o'][1]+': '+ mark['o'][0]
+ if anno_popup_src_loc_ref:
+ text += mark['o'][1]+': '+ mark['o'][0]
+ else:
+ text += ' '+mark['o'][0]
else:
text += ' '+mark['o']
# need ascii here. anything else triggers
@@ -585,7 +600,7 @@
i = word[2]
l = len(word[0])
- char_width = float(x2-x1)/len(word[1])
+ char_width = (x2-x1)/len(word[1])
x1 += i * char_width
x2 = x1 + l * char_width
# Given the fast track above, maybe for the rest, a
@@ -713,7 +728,7 @@
return finfo
def main():
- parser = ArgumentParser(epilog="version: "+__VERSION__, description="highlight words in a PDF file.")
+ parser = ArgumentParser(epilog="version: "+__VERSION__, description="Highlight changed/added/deleted/moved text in a PDF file.")
parser.def_trans = 0.6
parser.def_decrypt_key = ''
parser.def_colors = { 'E': [1,0,1, 'pink'], # extra
@@ -724,75 +739,87 @@
'B': [.9,.9,.9, 'gray'] } # borders
parser.def_output = 'output.pdf'
parser.def_marks = 'A,D,C'
- parser.def_features = 'H,C,P,N,W,B'
+ parser.def_features = 'H,C,P,W,B'
parser.def_margins = '0,0,0,0'
parser.def_margins = '0,0,0,0'
parser.def_below = False
parser.add_argument("-c", "--compare-text", metavar="OLDFILE",
- help="mark added, deleted and replaced text (or see -m) with regard to OLDFILE. \
+ help="Mark added, deleted and replaced text (or see -m) with regard to OLDFILE. \
File formats .pdf, .xml, .txt are recognized by their suffix. \
The comparison works word by word.")
parser.add_argument("-d", "--decrypt-key", metavar="DECRYPT_KEY", default=parser.def_decrypt_key,
- help="open an encrypted PDF; default: KEY='"+parser.def_decrypt_key+"'")
+ help="Open an encrypted PDF. Default: KEY='"+parser.def_decrypt_key+"'")
parser.add_argument("-e", "--exclude-irrelevant-pages", default=False, action="store_true",
- help="with -s: show only matching pages; with -c: show only changed pages; \
- default: reproduce all pages from INFILE in OUTFILE")
+ help="With -s: show only matching pages; with -c: show only changed pages. \
+ Default: reproduce all pages from INFILE in OUTFILE.")
parser.add_argument("-f", "--features", metavar="FEATURES", default=parser.def_features,
- help="specify how to mark. Allowed values are 'highlight', 'changebar', 'popup', \
+ help="Specify how to mark. Allowed values are 'highlight', 'changebar', 'popup', \
'navigation', 'watermark', 'margin'. Default: " + str(parser.def_features))
parser.add_argument("-i", "--nocase", default=False, action="store_true",
- help="make -s case insensitive; default: case sensitive")
+ help="Make -s case insensitive; default: case sensitive.")
parser.add_argument("-l", "--log", metavar="LOGFILE",
- help="write an python datastructure describing all the overlay objects on each page. Default none.")
+ help="Write an python datastructure describing all the overlay objects on each page. Default none.")
parser.add_argument("-m", "--mark", metavar="OPS", default=parser.def_marks,
- help="specify what to mark. Used with -c. Allowed values are 'add','delete','change','equal'. \
+ help="Specify what to mark. Used with -c. Allowed values are 'add','delete','change','equal'. \
Multiple values can be listed comma-seperated; abbreviations are allowed.\
Default: " + str(parser.def_marks))
parser.add_argument("-n", "--no-output", default=False, action="store_true",
- help="do not write an output file; print diagnostics only; default: write output file as per -o")
+ help="Do not write an output file; print diagnostics only. Default: write output file as per -o option.")
parser.add_argument("-o", "--output", metavar="OUTFILE", default=parser.def_output,
- help="write output to FILE; default: "+parser.def_output)
+ help="Write output to FILE; default: "+parser.def_output)
parser.add_argument("-s", "--search", metavar="WORD_REGEXP",
- help="highlight WORD_REGEXP")
+ help="Highlight WORD_REGEXP")
parser.add_argument("--spell", "--spell-check", default=False, action="store_true",
- help="run the text body of the (new) pdf through hunspell. Unknown words are underlined. Use e.g. 'env DICTIONARY=de_DE ...' (or en_US, ...) to specify the spelling dictionary, if your system has more than one. Check with 'hunspell -D' and study 'man hunspell'.")
+ help="Run the text body of the (new) pdf through hunspell. Unknown words are underlined. \
+ Use e.g. 'env DICTIONARY=en_US ...' (or de_DE, ...) to specify the spelling dictionary, \
+ if your system has more than one. To add new words to your private dictionary use e.g. \
+ 'echo >> ~/.hunspell_en_US ownCloud'. Check with 'hunspell -D' and study 'man hunspell'.")
parser.add_argument("--strict", default=False, action="store_true",
- help="show really all differences; default: ignore removed hyphenation; ignore character spacing inside a word")
+ help="Show really all differences. Default: ignore removed hyphenation; \
+ ignore character spacing inside a word.")
parser.add_argument("-t", "--transparency", type=float, default=parser.def_trans, metavar="TRANSP",
- help="set transparency of the highlight; invisible: 0.0; full opaque: 1.0; \
+ help="Set transparency of the highlight; invisible: 0.0; full opaque: 1.0; \
default: " + str(parser.def_trans))
parser.add_argument("-B", "--below", default=parser.def_below, action="store_true",
- help="Paint the highlight markers below the text. Try this if the normal merge crashes. Use with care, highlights may disappear below background graphics. Default: BELOW='"+str(parser.def_below)+"'")
+ help="Paint the highlight markers below the text. Try this if the normal merge crashes. Use with care, highlights may disappear below background graphics. Default: BELOW='"+str(parser.def_below)+"'.")
parser.add_argument("-C", "--search-color", metavar="NAME=R,G,B", action="append",
- help="set colors of the search highlights as an RGB triplet; R,G,B ranges are 0.0-1.0 each; valid names are 'add,'delete','change','equal','margin','all'; default name is 'equal', which is also used for -s; default colors are " +
+ help="Set colors of the search highlights as an RGB triplet; R,G,B ranges are 0.0-1.0 each; valid names are 'add,'delete','change','equal','margin','all'; default name is 'equal', which is also used for -s; default colors are " +
" ".join(["%s=%s,%s,%s /*%s*/ " %(x_y[0],x_y[1][0],x_y[1][1],x_y[1][2],x_y[1][3]) for x_y in list(parser.def_colors.items())]))
parser.add_argument("-D", "--debug", default=False, action="store_true",
- help="enable debugging. Prints more on stdout, dumps several *.xml or *.pdf files.")
+ help="Enable debugging. Prints more on stdout, dumps several *.xml or *.pdf files.")
parser.add_argument("-F", "--first-page", metavar="FIRST_PAGE",
- help="skip some pages at start of document; see also -L; default: all pages")
+ help="Skip some pages at start of document; see also -L option. Default: all pages.")
parser.add_argument("-L", "--last-page", metavar="LAST_PAGE",
- help="limit pages processed; this counts pages, it does not use document \
- page numbers; see also -F; default: all pages")
+ help="Limit pages processed; this counts pages, it does not use document \
+ page numbers; see also -F; default: all pages.")
parser.add_argument("-M", "--margins", metavar="N,E,W,S", default=parser.def_margins,
- help="specify margin space to ignore on each page. A margin width is expressed \
+ help="Specify margin space to ignore on each page. A margin width is expressed \
in units of ca. 100dpi. Specify four numbers in the order north,east,west,south. Default: "\
+ str(parser.def_margins))
+ parser.add_argument("-S", "--source-location", default=False, action="store_true",
+ help="Annotation start includes :pNX: markers where 'N' is the page number of the location \
+ in the original document and X is 't' for top, 'c' for center, or 'b' for bottom of the page. \
+ Default: Annotations start only with 'chg:', 'add:', 'del:' optionally followed by original text.")
parser.add_argument("-V", "--version", default=False, action="store_true",
- help="print the version number and exit")
+ help="Print the version number and exit.")
parser.add_argument("-X", "--no-compression", default=False, action="store_true",
- help="write uncompressed PDF. Default: FlateEncode filter compression.")
+ help="Write uncompressed PDF. Default: FlateEncode filter compression.")
parser.add_argument("--leftside", default=False, action="store_true",
- help="put changebars and navigation at the left hand side of the page. Default: right hand side.")
- parser.add_argument("infile", metavar="INFILE", help="the input file")
- parser.add_argument("infile2", metavar="INFILE2", nargs="?", help="optional 'newer' input file; alternate syntax to -c")
+ help="Put changebars and navigation at the left hand side of the page. Default: right hand side.")
+ parser.add_argument("infile", metavar="INFILE", help="The input file.")
+ parser.add_argument("infile2", metavar="INFILE2", nargs="?", help="Optional 'newer' input file; alternate syntax to -c")
args = parser.parse_args() # --help is automatic
args.transparency = 1 - args.transparency # it is needed reversed.
if args.version: parser.exit(__VERSION__)
+
global debug
debug = args.debug
+ global anno_popup_src_loc_ref
+ anno_popup_src_loc_ref = args.source_location
+
args.search_colors = parser.def_colors.copy()
if args.search_color:
for col in args.search_color:
@@ -821,7 +848,7 @@
args.compare_text,args.infile = args.infile,args.infile2
if args.search is None and args.compare_text is None and args.spell is None:
- parser.exit("Oops. Nothing to do. Specify either -s or --spell or -c or two input files")
+ parser.exit("Oops. Nothing to do. Specify either -s or --spell or -c or two input files.")
if not os.access(args.infile, os.R_OK):
parser.exit("Cannot read input file: %s" % args.infile)
@@ -926,13 +953,14 @@
print("DocumentInfo():")
pprint(di)
output._objects.append(di)
- except Exception,e:
+ except Exception as e:
print("WARNING: getDocumentInfo() failed: " + str(e) )
output._info = Pdf.IndirectObject(len(output._objects), 0, output)
pages_written = 0
total_hits = 0
+ outline = []
page_idx = 0
nav_bwd = None
@@ -961,6 +989,7 @@
if hitdetails[det]: hits_fmt += '%s%d' % (ch,hitdetails[det])
print(" page %d: %d hits %s" % (page_marks[i]['nr'], len(page_marks[i]['rect']), hits_fmt))
+ outline.append(" page %d: %d hits %s" % (page_marks[i]['nr'], len(page_marks[i]['rect']), hits_fmt))
# pprint(hitdetails)
page = input1.getPage(i)
@@ -1009,8 +1038,15 @@
output.addPage(page)
pages_written += 1
-
print("saving %s" % args.output)
+ # add outline
+ try:
+ parent = output.addBookmark('Hits', 0) # add parent bookmark
+ for bm in outline:
+ output.addBookmark(bm,outline.index(bm),parent=parent)
+ except Exception as e:
+ print("Warning: cannot add Bookmarks (pyPdf too old?): %s" % str(e))
+
if args.no_output is False:
outputStream = file(args.output, "wb")
try:
@@ -1068,7 +1104,7 @@
if (width is not None):
tot_w = pre_w+str_w+suf_w
if (tot_w == 0): tot_w = 1
- ratio = float(width)/tot_w
+ ratio = width/tot_w
#pprint([[pre,str,suf,width],[pre_w,str_w,suf_w,tot_w],ratio])
return (xoff+pre_w*ratio, str_w*ratio)
@@ -1159,9 +1195,9 @@
def catwords(dw, idx1, idx2, maxwords=666):
# make maxwords low enough, so that the popup fits on the screen.
if (maxwords is not None and idx2-idx1 > maxwords):
- cw1_text, cw1_loc = catwords(dw, idx1, idx1+maxwords/3, None)
- cw2_text, cw2_loc = catwords(dw, idx2-maxwords/3, idx2, None)
- text = cw1_text + ("<br><br> --]-------- snip %d words --------[-- <br><br>" % (idx2-idx1-maxwords*2/3)) + cw2_text
+ cw1_text, cw1_loc = catwords(dw, idx1, idx1+int(maxwords/3), None)
+ cw2_text, cw2_loc = catwords(dw, idx2-int(maxwords/3), idx2, None)
+ text = cw1_text + ("<br><br> --]-------- snip %d words --------[-- <br><br>" % (idx2-idx1-int(maxwords*2/3))) + cw2_text
return [ text, cw1_loc ]
text = ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/runtests.py new/pdfcompare-1.6.8/runtests.py
--- old/pdfcompare-1.6.5/runtests.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/runtests.py 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import pytest
+import sys
+
+class MyPlugin:
+ def pytest_sessionfinish(self):
+ print("\n*** test run reporting finishing")
+
+
+# Empty statement here needed so minversion reports no error
+#pytest
+
+pytest.main(plugins=[MyPlugin()] )
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/setup.py new/pdfcompare-1.6.8/setup.py
--- old/pdfcompare-1.6.5/setup.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/setup.py 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import sys
+
+from distutils.core import setup
+from setuptools.command.test import test as TestCommand
+
+class PyTest(TestCommand):
+ def finalize_options(self):
+ TestCommand.finalize_options(self)
+ self.test_args = []
+ self.test_suite = True
+ def run_tests(self):
+ #import here, cause outside the eggs aren't loaded
+ import pytest
+ errno = pytest.main(self.test_args)
+ sys.exit(errno)
+
+
+setup(name='pdfcompare',
+ version='1.0',
+ description='Compare two PDF files',
+ author='Jürgen Weigert',
+ author_email='juewei(a)fabfolk.com',
+ url='https://github.com/jnweiger/pdfcompare',
+ scripts=['pdfcompare.py', 'imgcmp.py'],
+ license='GPL-2.0',
+ classifiers=[
+ 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
+ 'Environment :: Console',
+ 'Development Status :: 5 - Production/Stable',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ ],
+ cmdclass={'test': PyTest},
+ long_description="".join(open('README.txt').readlines()),
+ tests_require=['pytest', 'scipy'],
+ #packages=['pyPdf','reportlab.pdfgen','reportlab.lib.colors','pygame.font' ],
+#
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/test/Makefile new/pdfcompare-1.6.8/test/Makefile
--- old/pdfcompare-1.6.5/test/Makefile 2013-10-24 14:09:14.000000000 +0200
+++ new/pdfcompare-1.6.8/test/Makefile 2016-04-19 17:23:08.000000000 +0200
@@ -1,10 +1,16 @@
-VER=1.3
refresh=
all: test
-test:
- ln -sf ../pdf_highlight.py pdfcompare
+test_requires:
+ @echo The selftest uses the following extra packages:
+ @rpm -q shunit2 || exit 2
+ @rpm -q python-scipy || exit 2
+ @rpm -q pdftk || exit 2
+ @echo -----------------------------------------------
+
+test: test_requires
+ ln -sf ../pdfcompare.py pdfcompare
env PATH=.:$$PATH sh ./helptest.sh $(VER) VER=$(VER)
env PATH=.:$$PATH sh ./python3.sh
env PATH=.:$$PATH refresh=$(refresh) sh ./restest.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdfcompare-1.6.5/test/cli/test_cli.py new/pdfcompare-1.6.8/test/cli/test_cli.py
--- old/pdfcompare-1.6.5/test/cli/test_cli.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pdfcompare-1.6.8/test/cli/test_cli.py 2016-04-19 17:23:08.000000000 +0200
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import os.path
+
+
+def test_version():
+ """
+ Checks, if version number in last line of help output is available
+ """
+ import subprocess
+ L=subprocess.check_output(['./pdf_highlight.py','-h'])
+ L=L.strip()
+ LL=L.split("\n")
+ assert 'version' in LL[-1]
+
+
+
+def test_pdfcompare_exists():
+ assert os.path.exists('pdf_highlight.py')
+
+def test_scipy():
+ """
+ Checks, if the module scipy is available
+ """
+ import scipy
+ assert scipy.__version__
+
++++++ pdfcompare.dsc ++++++
Format: 1.0
Source: pdfcompare
Version: 1.6.8-1
Binary: pdfcompare
Maintainer: Jürgen Weigert <jw(a)owncloud.com>
Architecture: any
Build-Depends: debhelper (>= 4.2.21)
# https://github.com/openSUSE/obs-build/pull/147
DEBTRANSFORM-RELEASE: 1
++++++ pull_github.sh ++++++
#! /bin/sh
#
url=git@github.com:jnweiger/pdfcompare.git
name=pdfcompare
rm -rf $name
tstamp=$(date +%Y%m%d)
git clone --depth 1 --branch master $url -o $name
version=$(grep '^__VERSION__' $name/pdfcompare.py | sed -e "s@.*'\(.*\)'.*@\1@")
#version=$version.git$tstamp
mv $name $name-$version
rm $name-*.tar.bz2
tar jcvf $name-$version.tar.bz2 --exclude '.??*' $name-$version
rm -rf $name-$version
sed -i -e "s@^\(Version:\s*\).*@\1"$version"@" *.spec
sed -i -e "s@^\(Source0:\s*\).*@\1"$name-$version.tar.bz2"@" *.spec
osc addremove
echo "now run: vi *.dsc; debchange -mc debian.changelog; osc vc; osc up; osc ci"
1
0