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
August 2021
- 1 participants
- 1985 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package steinberg-bravura-fonts for openSUSE:Factory checked in at 2021-08-28 22:29:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/steinberg-bravura-fonts (Old)
and /work/SRC/openSUSE:Factory/.steinberg-bravura-fonts.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "steinberg-bravura-fonts"
Sat Aug 28 22:29:36 2021 rev:2 rq:914794 version:1.392
Changes:
--------
--- /work/SRC/openSUSE:Factory/steinberg-bravura-fonts/steinberg-bravura-fonts.changes 2020-02-11 22:24:10.139526932 +0100
+++ /work/SRC/openSUSE:Factory/.steinberg-bravura-fonts.new.1899/steinberg-bravura-fonts.changes 2021-08-28 22:29:57.926028446 +0200
@@ -1,0 +2,6 @@
+Sat Aug 28 13:52:01 UTC 2021 - Luigi Baldoni <aloisio(a)gmx.com>
+
+- Update to version 1.392
+- Trim tarball content
+
+-------------------------------------------------------------------
Old:
----
bravura-1.276.tar.xz
New:
----
bravura-1.392.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ steinberg-bravura-fonts.spec ++++++
--- /var/tmp/diff_new_pack.Id6Ps2/_old 2021-08-28 22:29:58.374028944 +0200
+++ /var/tmp/diff_new_pack.Id6Ps2/_new 2021-08-28 22:29:58.378028948 +0200
@@ -1,7 +1,7 @@
#
# spec file for package steinberg-bravura-fonts
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# 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: steinberg-bravura-fonts
-Version: 1.276
+Version: 1.392
Release: 0
Summary: A complete, SMuFL compliant music font
License: OFL-1.1
++++++ _service ++++++
--- /var/tmp/diff_new_pack.Id6Ps2/_old 2021-08-28 22:29:58.406028979 +0200
+++ /var/tmp/diff_new_pack.Id6Ps2/_new 2021-08-28 22:29:58.410028983 +0200
@@ -6,8 +6,10 @@
<param name="exclude">*/.DS_Store</param>
<param name="subdir">redist</param>
<param name="versionformat">@PARENT_TAG@</param>
- <param name="revision">bravura-1.276</param>
- <param name="versionrewrite-pattern">bravura(.*)</param>
+ <param name="exclude">svg</param>
+ <param name="exclude">woff</param>
+ <param name="revision">bravura-1.392</param>
+ <param name="versionrewrite-pattern">bravura-(.*)</param>
<param name="versionrewrite-replacement">\1</param>
</service>
<service mode="disabled" name="recompress">
++++++ bravura-1.276.tar.xz -> bravura-1.392.tar.xz ++++++
++++ 164871 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package bitlbee for openSUSE:Factory checked in at 2021-08-28 22:29:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bitlbee (Old)
and /work/SRC/openSUSE:Factory/.bitlbee.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bitlbee"
Sat Aug 28 22:29:35 2021 rev:13 rq:914764 version:3.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/bitlbee/bitlbee.changes 2020-07-16 12:17:55.970933177 +0200
+++ /work/SRC/openSUSE:Factory/.bitlbee.new.1899/bitlbee.changes 2021-08-28 22:29:57.134027565 +0200
@@ -1,0 +2,8 @@
+Wed Aug 25 08:20:54 UTC 2021 - Johannes Segitz <jsegitz(a)suse.com>
+
+- Added hardening to systemd service(s). Added patch(es):
+ * harden_bitlbee.service.patch
+ Modified:
+ * bitlbee.service-suse.in
+
+-------------------------------------------------------------------
New:
----
harden_bitlbee.service.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bitlbee.spec ++++++
--- /var/tmp/diff_new_pack.YZPmF7/_old 2021-08-28 22:29:57.622028108 +0200
+++ /var/tmp/diff_new_pack.YZPmF7/_new 2021-08-28 22:29:57.626028112 +0200
@@ -27,6 +27,7 @@
URL: http://www.bitlbee.org/
Source: http://get.bitlbee.org/src/bitlbee-%{version}.tar.gz
Source2: %{name}.service-suse.in
+Patch0: harden_bitlbee.service.patch
BuildRequires: fdupes
BuildRequires: glibc-devel
BuildRequires: gnutls-devel
@@ -82,6 +83,7 @@
%prep
%setup -q
+%patch0 -p1
# make it verbose!
find . -name Makefile -exec sed -i.orig 's|@$(CC)|$(CC)|;s|@$(LD)|$(LD)|' {} +
++++++ bitlbee.service-suse.in ++++++
--- /var/tmp/diff_new_pack.YZPmF7/_old 2021-08-28 22:29:57.662028152 +0200
+++ /var/tmp/diff_new_pack.YZPmF7/_new 2021-08-28 22:29:57.662028152 +0200
@@ -14,6 +14,19 @@
After=network.target
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=read-only
+PrivateDevices=true
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=forking
ExecStartPre=/usr/bin/mkdir -p /run/bitlbee
ExecStartPre=/usr/bin/chown bitlbee.bitlbee /run/bitlbee
++++++ harden_bitlbee.service.patch ++++++
Index: bitlbee-3.6/init/bitlbee.service.in
===================================================================
--- bitlbee-3.6.orig/init/bitlbee.service.in
+++ bitlbee-3.6/init/bitlbee.service.in
@@ -2,6 +2,19 @@
Description=BitlBee IRC/IM gateway
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=read-only
+PrivateDevices=true
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
ExecStart=@sbindir@bitlbee -F -n
KillMode=process
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pyocr for openSUSE:Factory checked in at 2021-08-28 22:29:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyocr (Old)
and /work/SRC/openSUSE:Factory/.python-pyocr.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyocr"
Sat Aug 28 22:29:33 2021 rev:5 rq:914761 version:0.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyocr/python-pyocr.changes 2019-09-11 10:36:43.503273026 +0200
+++ /work/SRC/openSUSE:Factory/.python-pyocr.new.1899/python-pyocr.changes 2021-08-28 22:29:55.734026009 +0200
@@ -1,0 +2,9 @@
+Thu Aug 26 10:41:00 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 0.8:
+ * Replaced libtesseract.image_to_pdf() by an object-oriented API that allows
+ creating PDF with more than 1 page (thanks to Matthias Kraus).
+ * Tesseract 4 + sys.frozen=True: Fix TESSDATA_PREFIX: starting with
+ Tesseract 4, the path must include tessdata/
+
+-------------------------------------------------------------------
Old:
----
python-pyocr-0.7.2.tar.gz
New:
----
python-pyocr-0.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pyocr.spec ++++++
--- /var/tmp/diff_new_pack.ZVIiQh/_old 2021-08-28 22:29:56.114026431 +0200
+++ /var/tmp/diff_new_pack.ZVIiQh/_new 2021-08-28 22:29:56.118026436 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pyocr
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,11 +16,11 @@
#
-%define sha f4b068cdf359186bfbed36959c53e9e52e2eda84
+%define sha f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyocr
-Version: 0.7.2
+Version: 0.8
Release: 0
Summary: Python wrapper for OCR engines
License: GPL-3.0-or-later
++++++ python-pyocr-0.7.2.tar.gz -> python-pyocr-0.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/.git_archival.txt new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/.git_archival.txt
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/.git_archival.txt 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/.git_archival.txt 2021-01-01 16:59:54.000000000 +0100
@@ -1 +1 @@
-ref-names: tag: 0.7.2, refs/keep-around/f4b068cdf359186bfbed36959c53e9e52e2eda84
+ref-names: tag: 0.8, refs/keep-around/f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/.gitlab-ci.yml new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/.gitlab-ci.yml
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/.gitlab-ci.yml 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/.gitlab-ci.yml 2021-01-01 16:59:54.000000000 +0100
@@ -13,6 +13,9 @@
check:
+ only:
+ - branches@World/OpenPaperwork/pyocr
+ - tags@World/OpenPaperwork/pyocr
tags:
- linux
- volatile
@@ -23,12 +26,15 @@
test:
+ only:
+ - branches@World/OpenPaperwork/pyocr
+ - tags@World/OpenPaperwork/pyocr
tags:
- linux
- volatile
<<: *apt
script:
- - apt-get install -y -qq python-tox
+ - apt-get install -y -qq tox
# required for Pillow
- apt-get install -y -qq zlib1g-dev
- apt-get install -y -qq libjpeg-dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/ChangeLog new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/ChangeLog
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/ChangeLog 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/ChangeLog 2021-01-01 16:59:54.000000000 +0100
@@ -1,3 +1,9 @@
+01/01/2020 - 0.8.0:
+- Replaced libtesseract.image_to_pdf() by an object-oriented API that allows
+ creating PDF with more than 1 page (thanks to Matthias Kraus).
+- Tesseract 4 + sys.frozen=True: Fix TESSDATA_PREFIX: starting with
+ Tesseract 4, the path must include tessdata/
+
22/06/2019 - 0.7.2:
- Fix setup.py on Windows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/README.md new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/README.md
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/README.md 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/README.md 2021-01-01 16:59:54.000000000 +0100
@@ -249,11 +249,28 @@
import PIL.Image
import pyocr
-pyocr.libtesseract.image_to_pdf(
- PIL.Image.open("image.jpg"),
- "output_filename" # .pdf will be appended
-)
+image = PIL.Image.open("image.jpg")
+builder = pyocr.libtesseract.LibtesseractPdfBuilder()
+builder.add_image(image) # multiple images are added as separate pages
+builder.set_lang("deu") # optional
+builder.set_output_file("output_filename") # .pdf will be appended
+builder.build()
+```
+
+#### Add text layer to PDF
+
+```Python
+import pyocr
+import pdf2image
+
+images = pdf2image.convert_from_path("file.pdf", dpi=200, fmt='jpg')
+
+builder = pyocr.libtesseract.LibtesseractPdfBuilder()
+for image in images:
+ builder.add_image(image)
+builder.set_output_file("output") # .pdf will be appended
+builder.build()
```
Beware this code hasn't been adapted to libtesseract 3 yet.
@@ -296,7 +313,7 @@
## Contact
-* [Mailing-list](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/wikis/…
+* [Forum](https://forum.openpaper.work/)
* [Bug tracker](https://gitlab.gnome.org/World/OpenPaperwork/pyocr/issues)
@@ -307,7 +324,7 @@
* [Paperwork](https://gitlab.gnome.org/World/OpenPaperwork/paperwork#readme)
If you know of any other applications that use Pyocr, please
-[tell us](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/wikis/Contact#ma… :-)
+[tell us](https://forum.openpaper.work/) :-)
## Copyright
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/setup.py new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/setup.py
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/setup.py 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/setup.py 2021-01-01 16:59:54.000000000 +0100
@@ -54,8 +54,12 @@
setup(
name="pyocr",
- description=("A Python wrapper for OCR engines (Tesseract, Cuneiform,"
- " etc)"),
+ description=(
+ "A Python wrapper for OCR engines (Tesseract, Cuneiform, etc)"
+ ),
+ long_description=(
+ "A Python wrapper for OCR engines (Tesseract, Cuneiform, etc)"
+ ),
keywords="tesseract cuneiform ocr",
version=version,
url="https://gitlab.gnome.org/World/OpenPaperwork/pyocr",
@@ -87,7 +91,7 @@
},
data_files=[],
scripts=[],
- zip_safe=True,
+ zip_safe=(os.name != 'nt'),
python_requires='>=3.4',
install_requires=[
"Pillow",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/src/pyocr/libtesseract/__init__.py new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/src/pyocr/libtesseract/__init__.py
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/src/pyocr/libtesseract/__init__.py 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/src/pyocr/libtesseract/__init__.py 2021-01-01 16:59:54.000000000 +0100
@@ -195,29 +195,96 @@
textonly: create pdf with only one invisible text layer. Defaults to
False.
'''
- handle = tesseract_raw.init(lang=lang)
- renderer = None
- try:
- tesseract_raw.set_image(handle, image)
- tesseract_raw.set_page_seg_mode(
- handle, tesseract_raw.PageSegMode.AUTO_OSD
- )
-
- tesseract_raw.set_input_name(handle, input_file)
- tesseract_raw.recognize(handle)
-
- renderer = tesseract_raw.init_pdf_renderer(
- handle, output_file, textonly
- )
- assert(renderer)
-
- tesseract_raw.begin_document(renderer, "")
- tesseract_raw.add_renderer_image(handle, renderer)
- tesseract_raw.end_document(renderer)
- finally:
- tesseract_raw.cleanup(handle)
- if renderer:
- tesseract_raw.cleanup(renderer)
+ LibtesseractPdfBuilder()\
+ .set_lang(lang)\
+ .set_output_file(output_file)\
+ .set_text_only(textonly)\
+ .add_image(image)\
+ .build()
+
+
+class LibtesseractPdfBuilder(object):
+ '''
+ Creates a pdf file with embeded text based on OCR from one or more images.
+ '''
+
+ def __init__(self):
+ self.images = []
+ self.output_file = None
+ self.lang = None
+ self.text_only = False
+
+ def set_lang(self, lang):
+ '''
+ Language to be used for ocr.
+ :param lang: three letter language code. For available languages see
+ https://github.com/tesseract-ocr/tesseract/blob/master/doc/tesseract.1.asc#….
+ Defaults to None.
+ '''
+ self.lang = lang
+ return self
+
+ def set_output_file(self, output_file):
+ self.output_file = output_file
+ return self
+
+ def set_text_only(self, text_only):
+ '''
+ :param text_only: create pdf with only one invisible text layer.
+ Defaults to False.
+ '''
+ self.text_only = text_only
+ return self
+
+ def add_image(self, img):
+ '''
+ Add an image to be converted to a page in the pdf
+ :param img: image to convert
+ '''
+ self.images.append(img) # or something else
+ return self
+
+ def __validate(self):
+ if len(self.images) < 1:
+ raise ValueError(
+ "At least one image is required to build the pdf!"
+ )
+
+ if self.output_file is None:
+ raise ValueError("An output-file is required to build the pdf!")
+
+ def build(self):
+ '''
+ Create and write PDF file.
+ '''
+ self.__validate()
+
+ handle = tesseract_raw.init(lang=self.lang)
+ renderer = None
+ try:
+ tesseract_raw.set_page_seg_mode(
+ handle, tesseract_raw.PageSegMode.AUTO_OSD
+ )
+
+ renderer = tesseract_raw.init_pdf_renderer(
+ handle, self.output_file, self.text_only
+ )
+ assert renderer
+
+ tesseract_raw.begin_document(renderer, "")
+
+ for image in self.images:
+ tesseract_raw.set_image(handle, image)
+
+ # tesseract_raw.set_input_name(handle, input_file)
+ tesseract_raw.recognize(handle)
+
+ tesseract_raw.add_renderer_image(handle, renderer)
+ tesseract_raw.end_document(renderer)
+ finally:
+ tesseract_raw.cleanup(handle)
+ if renderer:
+ tesseract_raw.cleanup(renderer)
def is_available():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/src/pyocr/libtesseract/tesseract_raw.py new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/src/pyocr/libtesseract/tesseract_raw.py
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/src/pyocr/libtesseract/tesseract_raw.py 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/src/pyocr/libtesseract/tesseract_raw.py 2021-01-01 16:59:54.000000000 +0100
@@ -28,7 +28,7 @@
)
)
else:
- TESSDATA_PREFIX = tessdata
+ TESSDATA_PREFIX = os.path.join(tessdata, "tessdata")
if sys.platform[:3] == "win": # pragma: no cover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/src/pyocr/tesseract.py new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/src/pyocr/tesseract.py
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/src/pyocr/tesseract.py 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/src/pyocr/tesseract.py 2021-01-01 16:59:54.000000000 +0100
@@ -119,8 +119,7 @@
if getattr(sys, 'frozen', False): # pragma: no cover
# Pyinstaller support
- path = os.environ["PATH"]
- if sys._MEIPASS in path:
+ if 'TESSDATA_PREFIX' in os.environ:
# already changed
return
@@ -128,15 +127,6 @@
tessprefix = os.path.join(sys._MEIPASS, "data")
logger.info("Running in packaged environment")
- if not os.path.exists(os.path.join(tessprefix, "tessdata")):
- logger.warning(
- "Running from container, but no tessdata ({}) found !".format(
- tessprefix
- )
- )
- else:
- logger.info("TESSDATA_PREFIX set to [{}]".format(tessprefix))
- os.environ['TESSDATA_PREFIX'] = tessprefix
if not os.path.exists(tesspath):
logger.warning(
"Running from container, but no tesseract ({}) found !".format(
@@ -149,6 +139,19 @@
tesspath + os.pathsep + os.environ['PATH']
)
+ if not os.path.exists(os.path.join(tessprefix, "tessdata")):
+ logger.warning(
+ "Running from container, but no tessdata ({}) found !".format(
+ tessprefix
+ )
+ )
+ else:
+ version = get_version(set_env=False)
+ if version[0] > 3:
+ tessprefix = os.path.join(tessprefix, "tessdata")
+ logger.info("TESSDATA_PREFIX set to [{}]".format(tessprefix))
+ os.environ['TESSDATA_PREFIX'] = tessprefix
+
def can_detect_orientation():
version = get_version()
@@ -413,7 +416,7 @@
return [lang for lang in langs if lang and lang[-1] != ':']
-def get_version():
+def get_version(set_env=True):
"""
Returns Tesseract version.
@@ -428,15 +431,15 @@
if g_version is not None:
return g_version
- _set_environment()
+ if set_env:
+ _set_environment()
command = [TESSERACT_CMD, "-v"]
proc = subprocess.Popen(command,
startupinfo=g_subprocess_startup_info,
creationflags=g_creation_flags,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
+ stdout=subprocess.PIPE)
ver_string = proc.stdout.read()
ver_string = ver_string.decode('utf-8')
ret = proc.wait()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/tests/tests_libtesseract.py new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/tests/tests_libtesseract.py
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/tests/tests_libtesseract.py 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/tests/tests_libtesseract.py 2021-01-01 16:59:54.000000000 +0100
@@ -1379,11 +1379,11 @@
def setUp(self):
self.image = Image.new(mode="RGB", size=(1, 1))
- self.handle = randint(0, 2**32-1)
+ self.handle = 1234567
@patch("pyocr.libtesseract.tesseract_raw")
def test_pdf(self, raw):
- renderer = randint(0, 2**32-1)
+ renderer = 2345671
raw.init.return_value = self.handle
raw.init_pdf_renderer.return_value = renderer
libtesseract.image_to_pdf(self.image, "output")
@@ -1393,7 +1393,6 @@
raw.set_page_seg_mode.assert_called_once_with(
self.handle, raw.PageSegMode.AUTO_OSD
)
- raw.set_input_name.assert_called_once_with(self.handle, "stdin")
raw.recognize.assert_called_once_with(self.handle)
raw.init_pdf_renderer.assert_called_once_with(
self.handle, "output", False
@@ -1408,6 +1407,41 @@
)
@patch("pyocr.libtesseract.tesseract_raw")
+ def test_multipage_pdf(self, raw):
+ renderer = 2345671
+ raw.init.return_value = self.handle
+ raw.init_pdf_renderer.return_value = renderer
+ libtesseract.LibtesseractPdfBuilder() \
+ .set_output_file("output")\
+ .add_image(self.image)\
+ .add_image(self.image)\
+ .build()
+
+ raw.init.assert_called_once_with(lang=None)
+ raw.set_image.assert_called_with(self.handle, self.image)
+ raw.set_image.assert_called_with(self.handle, self.image)
+ raw.set_page_seg_mode.assert_called_once_with(
+ self.handle, raw.PageSegMode.AUTO_OSD
+ )
+ raw.recognize.assert_called_with(self.handle)
+ raw.recognize.assert_called_with(self.handle)
+ raw.init_pdf_renderer.assert_called_once_with(
+ self.handle, "output", False
+ )
+ raw.begin_document.assert_called_once_with(renderer, "")
+ raw.add_renderer_image.assert_called_with(
+ self.handle, renderer
+ )
+ raw.add_renderer_image.assert_called_with(
+ self.handle, renderer
+ )
+ raw.end_document.assert_called_once_with(renderer)
+ self.assertListEqual(
+ raw.cleanup.call_args_list,
+ [call(self.handle), call(renderer)]
+ )
+
+ @patch("pyocr.libtesseract.tesseract_raw")
def test_pdf_renderer_error(self, raw):
renderer = None
raw.init.return_value = self.handle
@@ -1417,15 +1451,15 @@
libtesseract.image_to_pdf(self.image, "output")
raw.init.assert_called_once_with(lang=None)
- raw.set_image.assert_called_once_with(self.handle, self.image)
raw.set_page_seg_mode.assert_called_once_with(
self.handle, raw.PageSegMode.AUTO_OSD
)
- raw.set_input_name.assert_called_once_with(self.handle, "stdin")
- raw.recognize.assert_called_once_with(self.handle)
raw.init_pdf_renderer.assert_called_once_with(
self.handle, "output", False
)
+ self.assertFalse(raw.set_image.called)
+ self.assertFalse(raw.set_input_name.called)
+ self.assertFalse(raw.recognize.called)
self.assertFalse(raw.begin_document.called)
self.assertFalse(raw.add_renderer_image.called)
self.assertFalse(raw.end_document.called)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/tests/tests_tesseract.py new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/tests/tests_tesseract.py
--- old/pyocr-0.7.2-f4b068cdf359186bfbed36959c53e9e52e2eda84/tests/tests_tesseract.py 2019-06-22 20:10:54.000000000 +0200
+++ new/pyocr-0.8-f9f93bbd83ab5814b1c56c3ffe41addc9ec622dc/tests/tests_tesseract.py 2021-01-01 16:59:54.000000000 +0100
@@ -54,6 +54,12 @@
popen.return_value = self.stdout
self.assertSequenceEqual(tesseract.get_version(), (4, 0, 0))
+ # stderr must be explicitely ignored when calling 'tesseract -v'.
+ # See https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/issues/118
+ popen.assert_called_once()
+ (args, kwargs) = popen.call_args
+ self.assertNotIn('stderr', kwargs)
+
@patch("subprocess.Popen")
def test_version_tesseract4dev(self, popen):
tesseract.g_version = None # drop cached version
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-fsspec for openSUSE:Factory checked in at 2021-08-28 22:29:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fsspec (Old)
and /work/SRC/openSUSE:Factory/.python-fsspec.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fsspec"
Sat Aug 28 22:29:34 2021 rev:14 rq:914766 version:2021.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fsspec/python-fsspec.changes 2021-08-11 11:47:30.373725638 +0200
+++ /work/SRC/openSUSE:Factory/.python-fsspec.new.1899/python-fsspec.changes 2021-08-28 22:29:56.410026760 +0200
@@ -1,0 +2,7 @@
+Mon Aug 23 17:04:01 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Add fsspec-pr710-bytesreturn.patch in order to fix zarr
+ * gh#intake/filesystem_spec#710
+ * gh#zarr-developers/zarr-python#812
+
+-------------------------------------------------------------------
New:
----
fsspec-pr710-bytesreturn.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-fsspec.spec ++++++
--- /var/tmp/diff_new_pack.Mi8VVP/_old 2021-08-28 22:29:56.778027170 +0200
+++ /var/tmp/diff_new_pack.Mi8VVP/_new 2021-08-28 22:29:56.782027174 +0200
@@ -35,6 +35,8 @@
URL: https://github.com/intake/filesystem_spec
# the tests are only in the GitHub archive
Source: %{url}/archive/%{ghversion}.tar.gz#/fsspec-%{ghversion}.tar.gz
+# PATCH-FIX-UPSTREAM fsspec-pr710-bytesreturn.patch -- gh#intake/filesystem_spec#710 and gh#zarr-developers/zarr-python#812
+Patch0: %{url}/pull/710.patch#/fsspec-pr710-bytesreturn.patch
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module importlib_metadata if %python-base < 3.8}
BuildRequires: %{python_module setuptools}
@@ -83,7 +85,7 @@
A specification for pythonic filesystems.
%prep
-%setup -q -n filesystem_spec-%{ghversion}
+%autosetup -p1 -n filesystem_spec-%{ghversion}
# don't test nonexistent python36-numpy
sed -i -e '/^import numpy as np/ d' -e '/^import pytest/ a np = pytest.importorskip("numpy")' fsspec/tests/test_spec.py
++++++ fsspec-pr710-bytesreturn.patch ++++++
From 576008ff849392c1c801b0722d595a2369e11797 Mon Sep 17 00:00:00 2001
From: Davis Vann Bennett <davis.v.bennett(a)gmail.com>
Date: Wed, 14 Jul 2021 19:53:48 -0400
Subject: [PATCH] check for bytes return type and dictifiy it
---
fsspec/mapping.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fsspec/mapping.py b/fsspec/mapping.py
index 17fe7ae7..235da8d2 100644
--- a/fsspec/mapping.py
+++ b/fsspec/mapping.py
@@ -88,6 +88,8 @@ def getitems(self, keys, on_error="raise"):
oe = on_error if on_error == "raise" else "return"
try:
out = self.fs.cat(keys2, on_error=oe)
+ if isinstance(out, bytes):
+ out = {keys2[0]: out}
except self.missing_exceptions as e:
raise KeyError from e
out = {
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-versioneer for openSUSE:Factory checked in at 2021-08-28 22:29:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-versioneer (Old)
and /work/SRC/openSUSE:Factory/.python-versioneer.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-versioneer"
Sat Aug 28 22:29:32 2021 rev:4 rq:914758 version:0.20
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-versioneer/python-versioneer.changes 2018-12-24 11:45:52.401213834 +0100
+++ /work/SRC/openSUSE:Factory/.python-versioneer.new.1899/python-versioneer.changes 2021-08-28 22:29:55.086025289 +0200
@@ -1,0 +2,25 @@
+Sat Aug 28 10:09:10 UTC 2021 - Matej Cepl <mcepl(a)suse.com>
+
+- Make testing more verbose
+
+-------------------------------------------------------------------
+Thu Aug 26 09:23:44 UTC 2021 - pgajdos(a)suse.com
+
+- version update to 0.20
+ Release 0.20 (13-Jul-2020)
+ * Respect versionfile_source in __init__.py snippet (#241)
+ * Add pep440-branch and pep440-post-branch styles (#164)
+ * Stop testing deprecated easy_install, support left in for now (#237)
+ * Use versionfile_build instead of versionfile_source where needed (#242)
+ * Improve handling of refname edge cases (#229)
+ * Clarify installation in docs (#235)
+ * Play nicely with custom build_exts (#232)
+ Release 0.19 (10-Nov-2020)
+ * Drop support for Python < 3.6, test up to Python 3.9
+ * Strip GPG signature information from date (#222)
+ * Add bdist_ext cmdclass, to support native code extensions (#171)
+ * Canonicalize pep440-pre style (#163)
+ * Take arguments to get_cmdclass
+- test the package a bit at least
+
+-------------------------------------------------------------------
Old:
----
versioneer-0.18.tar.gz
New:
----
versioneer-0.20.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-versioneer.spec ++++++
--- /var/tmp/diff_new_pack.y673ai/_old 2021-08-28 22:29:55.498025747 +0200
+++ /var/tmp/diff_new_pack.y673ai/_new 2021-08-28 22:29:55.502025751 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-versioneer
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,18 +18,19 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-versioneer
-Version: 0.18
+Version: 0.20
Release: 0
Summary: VCS-based management of project version strings
License: SUSE-Public-Domain
Group: Development/Languages/Python
-Url: https://github.com/warner/python-versioneer
+URL: https://github.com/warner/python-versioneer
Source: https://files.pythonhosted.org/packages/source/v/versioneer/versioneer-%{ve…
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module testsuite}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
@@ -51,7 +52,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec setup.py test
+%pyunittest -v test/test_file.py
%post
%python_install_alternative versioneer
++++++ versioneer-0.18.tar.gz -> versioneer-0.20.tar.gz ++++++
++++ 2915 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ExifRead for openSUSE:Factory checked in at 2021-08-28 22:29:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ExifRead (Old)
and /work/SRC/openSUSE:Factory/.python-ExifRead.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ExifRead"
Sat Aug 28 22:29:31 2021 rev:4 rq:914756 version:2.3.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ExifRead/python-ExifRead.changes 2020-09-07 21:35:42.129390380 +0200
+++ /work/SRC/openSUSE:Factory/.python-ExifRead.new.1899/python-ExifRead.changes 2021-08-28 22:29:54.334024453 +0200
@@ -1,0 +2,7 @@
+Fri Aug 27 12:36:56 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 2.3.2:
+ * Fixes for HEIC files from Note10+ (#127) by Drew Perttula
+ * Add missing EXIF OffsetTime tags (#126) by ��tienne Pelletier
+
+-------------------------------------------------------------------
Old:
----
ExifRead-2.3.1.tar.gz
New:
----
ExifRead-2.3.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ExifRead.spec ++++++
--- /var/tmp/diff_new_pack.AH7z5F/_old 2021-08-28 22:29:54.890025071 +0200
+++ /var/tmp/diff_new_pack.AH7z5F/_new 2021-08-28 22:29:54.894025075 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-ExifRead
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ExifRead
-Version: 2.3.1
+Version: 2.3.2
Release: 0
Summary: Module to read Exif metadata from TIFF and JPEG files
License: BSD-3-Clause
@@ -29,7 +29,7 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
++++++ ExifRead-2.3.1.tar.gz -> ExifRead-2.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExifRead-2.3.1/ChangeLog.rst new/ExifRead-2.3.2/ChangeLog.rst
--- old/ExifRead-2.3.1/ChangeLog.rst 2020-08-07 18:14:14.000000000 +0200
+++ new/ExifRead-2.3.2/ChangeLog.rst 2020-10-29 20:29:53.000000000 +0100
@@ -2,6 +2,10 @@
Change Log
**********
+2.3.2 ��� 2020-10-29
+ * Fixes for HEIC files from Note10+ (#127) by Drew Perttula
+ * Add missing EXIF OffsetTime tags (#126) by ��tienne Pelletier
+
2.3.1 ��� 2020-08-07
* Fix bug introduced with v2.3.0 in HEIC processing.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExifRead-2.3.1/ExifRead.egg-info/PKG-INFO new/ExifRead-2.3.2/ExifRead.egg-info/PKG-INFO
--- old/ExifRead-2.3.1/ExifRead.egg-info/PKG-INFO 2020-08-07 18:14:47.000000000 +0200
+++ new/ExifRead-2.3.2/ExifRead.egg-info/PKG-INFO 2020-10-29 20:34:03.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ExifRead
-Version: 2.3.1
+Version: 2.3.2
Summary: Read Exif metadata from tiff and jpeg files.
Home-page: https://github.com/ianare/exif-py
Author: Ianar�� S��vi
@@ -168,12 +168,13 @@
Usage Example
=============
- This example shows how to use the library to correct the orientation of an image (using PIL for the transformation) before e.g. displaying it.
+ This example shows how to use the library to correct the orientation of an image
+ (using Pillow for the transformation) before e.g. displaying it.
.. code-block:: python
import exifread
- from PIL import Image
+ from Pillow import Image
def _read_img_and_correct_exif_orientation(path):
im = Image.open(path)
@@ -200,10 +201,8 @@
if 8 in val:
logging.debug("Rotating by 90 degrees.")
im = im.transpose(Image.ROTATE_90)
-
return im
-
Credit
******
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExifRead-2.3.1/PKG-INFO new/ExifRead-2.3.2/PKG-INFO
--- old/ExifRead-2.3.1/PKG-INFO 2020-08-07 18:14:48.000000000 +0200
+++ new/ExifRead-2.3.2/PKG-INFO 2020-10-29 20:34:03.177606600 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ExifRead
-Version: 2.3.1
+Version: 2.3.2
Summary: Read Exif metadata from tiff and jpeg files.
Home-page: https://github.com/ianare/exif-py
Author: Ianar�� S��vi
@@ -168,12 +168,13 @@
Usage Example
=============
- This example shows how to use the library to correct the orientation of an image (using PIL for the transformation) before e.g. displaying it.
+ This example shows how to use the library to correct the orientation of an image
+ (using Pillow for the transformation) before e.g. displaying it.
.. code-block:: python
import exifread
- from PIL import Image
+ from Pillow import Image
def _read_img_and_correct_exif_orientation(path):
im = Image.open(path)
@@ -200,10 +201,8 @@
if 8 in val:
logging.debug("Rotating by 90 degrees.")
im = im.transpose(Image.ROTATE_90)
-
return im
-
Credit
******
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExifRead-2.3.1/README.rst new/ExifRead-2.3.2/README.rst
--- old/ExifRead-2.3.1/README.rst 2020-08-07 18:07:46.000000000 +0200
+++ new/ExifRead-2.3.2/README.rst 2020-10-29 20:24:27.000000000 +0100
@@ -160,12 +160,13 @@
Usage Example
=============
-This example shows how to use the library to correct the orientation of an image (using PIL for the transformation) before e.g. displaying it.
+This example shows how to use the library to correct the orientation of an image
+(using Pillow for the transformation) before e.g. displaying it.
.. code-block:: python
import exifread
- from PIL import Image
+ from Pillow import Image
def _read_img_and_correct_exif_orientation(path):
im = Image.open(path)
@@ -192,10 +193,8 @@
if 8 in val:
logging.debug("Rotating by 90 degrees.")
im = im.transpose(Image.ROTATE_90)
-
return im
-
Credit
******
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExifRead-2.3.1/exifread/__init__.py new/ExifRead-2.3.2/exifread/__init__.py
--- old/ExifRead-2.3.1/exifread/__init__.py 2020-08-07 18:14:14.000000000 +0200
+++ new/ExifRead-2.3.2/exifread/__init__.py 2020-10-29 20:26:36.000000000 +0100
@@ -10,7 +10,7 @@
from .utils import ord_, make_string
from .heic import HEICExifFinder
-__version__ = '2.3.1'
+__version__ = '2.3.2'
logger = get_logger()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExifRead-2.3.1/exifread/heic.py new/ExifRead-2.3.2/exifread/heic.py
--- old/ExifRead-2.3.1/exifread/heic.py 2020-08-07 18:14:14.000000000 +0200
+++ new/ExifRead-2.3.2/exifread/heic.py 2020-10-29 20:24:27.000000000 +0100
@@ -49,6 +49,13 @@
read = self.file_handle.read(nbytes)
if not read:
raise EOFError
+ if len(read) != nbytes:
+ msg = "get(nbytes={nbytes}) found {read} bytes at postion {pos}".format(
+ nbytes=nbytes,
+ read=len(read),
+ pos=self.file_handle.tell()
+ )
+ raise BadSize(msg)
return read
def get16(self):
@@ -117,10 +124,11 @@
self.file_handle.seek(box.after)
def expect_parse(self, name):
- box = self.next_box()
- if box.name == name:
- return self.parse_box(box)
- raise WrongBox(name, box.name)
+ while True:
+ box = self.next_box()
+ if box.name == name:
+ return self.parse_box(box)
+ self.skip(box)
def get_parser(self, box):
method = 'parse_%s' % box.name
@@ -210,7 +218,9 @@
raise BoxVersion(2, box.version)
if box.version in (1, 2):
# ignore construction_method
- _ = self.get16()
+ self.get16()
+ # ignore data_reference_index
+ self.get16()
box.base_offset = self.get_int(box.base_offset_size)
extent_count = self.get16()
extents = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExifRead-2.3.1/exifread/tags/exif.py new/ExifRead-2.3.2/exifread/tags/exif.py
--- old/ExifRead-2.3.1/exifread/tags/exif.py 2020-08-03 11:57:29.000000000 +0200
+++ new/ExifRead-2.3.2/exifread/tags/exif.py 2020-10-29 20:24:27.000000000 +0100
@@ -258,6 +258,9 @@
0x9000: ('ExifVersion', make_string),
0x9003: ('DateTimeOriginal', ),
0x9004: ('DateTimeDigitized', ),
+ 0x9010: ('OffsetTime', ),
+ 0x9011: ('OffsetTimeOriginal', ),
+ 0x9012: ('OffsetTimeDigitized', ),
0x9101: ('ComponentsConfiguration', {
0: '',
1: 'Y',
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-vcversioner for openSUSE:Factory checked in at 2021-08-28 22:29:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-vcversioner (Old)
and /work/SRC/openSUSE:Factory/.python-vcversioner.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-vcversioner"
Sat Aug 28 22:29:30 2021 rev:5 rq:914754 version:2.16.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-vcversioner/python-vcversioner.changes 2019-01-03 18:07:21.864101104 +0100
+++ /work/SRC/openSUSE:Factory/.python-vcversioner.new.1899/python-vcversioner.changes 2021-08-28 22:29:53.718023768 +0200
@@ -1,0 +2,5 @@
+Thu Aug 26 09:20:07 UTC 2021 - pgajdos(a)suse.com
+
+- %check: test the package, use %pytest rpm macro
+
+-------------------------------------------------------------------
New:
----
test_vcversioner.py
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-vcversioner.spec ++++++
--- /var/tmp/diff_new_pack.FhLfme/_old 2021-08-28 22:29:54.130024227 +0200
+++ /var/tmp/diff_new_pack.FhLfme/_new 2021-08-28 22:29:54.134024231 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-vcversioner
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,11 +25,17 @@
Group: Development/Languages/Python
URL: https://github.com/habnabit/vcversioner
Source0: https://files.pythonhosted.org/packages/source/v/vcversioner/vcversioner-%{…
+# https://github.com/habnabit/vcversioner/issues/13
Source1: https://raw.githubusercontent.com/habnabit/vcversioner/%{version}/COPYING
+# https://github.com/habnabit/vcversioner/issues/13
+Source2: https://raw.githubusercontent.com/habnabit/vcversioner/%{version}/test_vcve…
Source9: %{name}-rpmlintrc
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+# SECTION test requirements
+BuildRequires: %{python_module pytest}
+# /SECTION
BuildArch: noarch
%python_subpackages
@@ -40,7 +46,7 @@
%prep
%setup -q -n vcversioner-%{version}
-cp %{SOURCE1} .
+cp %{SOURCE1} %{SOURCE2} .
%build
%python_build
@@ -50,7 +56,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec setup.py test
+%pytest -v
%files %{python_files}
%license COPYING
++++++ test_vcversioner.py ++++++
# Copyright (c) Aaron Gallagher <_(a)habnab.it>
# See COPYING for details.
from __future__ import unicode_literals
import os
import pytest
import vcversioner
try:
unicode
except NameError:
unicode = str
class FakePopen(object):
def __init__(self, stdout, stderr=b''):
self.stdout = stdout
self.stderr = stderr
def communicate(self):
return self.stdout, self.stderr
def __call__(self, *args, **kwargs):
return self
class RaisingFakePopen(object):
def __call__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
raise OSError('hi!')
empty = FakePopen(b'')
invalid = FakePopen(b'foob')
basic_version = FakePopen(b'1.0-0-gbeef')
dev_version = FakePopen(b'1.0-2-gfeeb')
hg_version = FakePopen(b'1.0-1-hgbeef')
git_failed = FakePopen(b'', b'fatal: whatever')
class FakeOpen(object):
def __call__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
raise OSError('hi!')
@pytest.fixture
def gitdir(tmpdir):
tmpdir.chdir()
tmpdir.join('.git').mkdir()
return tmpdir
@pytest.fixture
def hgdir(tmpdir):
tmpdir.chdir()
tmpdir.join('.hg').mkdir()
return tmpdir
def test_astounding_success(gitdir):
"Successful output from git is cached and returned."
version = vcversioner.find_version(Popen=basic_version)
assert version == ('1.0', '0', 'gbeef')
with gitdir.join('version.txt').open() as infile:
assert infile.read() == '1.0-0-gbeef'
def test_no_git(gitdir):
"If git fails and there's no version.txt, abort."
with pytest.raises(SystemExit) as excinfo:
vcversioner.find_version(Popen=empty)
assert excinfo.value.args[0] == 2
assert not gitdir.join('version.txt').check()
def test_when_Popen_raises(gitdir):
"If *spawning* git fails and there's no version.txt, abort."
with pytest.raises(SystemExit) as excinfo:
vcversioner.find_version(Popen=RaisingFakePopen())
assert excinfo.value.args[0] == 2
assert not gitdir.join('version.txt').check()
def test_no_git_but_version_file(gitdir):
"If git fails but there's a version.txt, that's fine too."
with gitdir.join('version.txt').open('w') as outfile:
outfile.write('1.0-0-gbeef')
version = vcversioner.find_version(Popen=empty)
assert version == ('1.0', '0', 'gbeef')
def test_Popen_raises_but_version_file(gitdir):
"If spawning git fails but there's a version.txt, that's similarly fine."
with gitdir.join('version.txt').open('w') as outfile:
outfile.write('1.0-0-gbeef')
version = vcversioner.find_version(Popen=RaisingFakePopen())
assert version == ('1.0', '0', 'gbeef')
def test_version_file_with_root(gitdir):
"version.txt gets read from the project root by default."
with gitdir.join('version.txt').open('w') as outfile:
outfile.write('1.0-0-gbeef')
version = vcversioner.find_version(
root=gitdir.strpath, Popen=RaisingFakePopen())
assert version == ('1.0', '0', 'gbeef')
def test_invalid_git(gitdir):
"Invalid output from git is a failure too."
with pytest.raises(SystemExit) as excinfo:
vcversioner.find_version(Popen=invalid)
assert excinfo.value.args[0] == 2
assert not gitdir.join('version.txt').check()
def test_invalid_version_file(gitdir):
"Invalid output in version.txt is similarly a failure."
with gitdir.join('version.txt').open('w') as outfile:
outfile.write('foob')
with pytest.raises(SystemExit) as excinfo:
vcversioner.find_version(Popen=empty)
assert excinfo.value.args[0] == 2
def test_dev_version(gitdir):
".post version numbers are automatically created."
version = vcversioner.find_version(Popen=dev_version)
assert version == ('1.0.post2', '2', 'gfeeb')
with gitdir.join('version.txt').open() as infile:
assert infile.read() == '1.0-2-gfeeb'
def test_dev_version_disabled(gitdir):
".post version numbers can also be disabled."
version = vcversioner.find_version(Popen=dev_version, include_dev_version=False)
assert version == ('1.0', '2', 'gfeeb')
with gitdir.join('version.txt').open() as infile:
assert infile.read() == '1.0-2-gfeeb'
def test_custom_vcs_args(gitdir):
"The command to execute to get the version can be customized."
popen = RaisingFakePopen()
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=popen, vcs_args=('foo', 'bar'))
assert popen.args[0] == ['foo', 'bar']
def test_custom_vcs_args_substitutions(gitdir):
"The command arguments have some substitutions performed."
popen = RaisingFakePopen()
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=popen, vcs_args=('foo', 'bar', '%(pwd)s', '%(root)s'))
assert popen.args[0] == ['foo', 'bar', gitdir.strpath, gitdir.strpath]
def test_custom_vcs_args_substitutions_with_different_root(tmpdir):
"Specifying a different root will cause that root to be substituted."
tmpdir.chdir()
popen = RaisingFakePopen()
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=popen, root='/spam', vcs_args=('%(root)s',))
assert popen.args[0] == ['/spam']
def test_custom_version_file(gitdir):
"The version.txt file can have a unique name."
version = vcversioner.find_version(Popen=basic_version, version_file='custom.txt')
assert version == ('1.0', '0', 'gbeef')
with gitdir.join('custom.txt').open() as infile:
assert infile.read() == '1.0-0-gbeef'
def test_custom_version_file_reading(gitdir):
"The custom version.txt can be read from as well."
with gitdir.join('custom.txt').open('w') as outfile:
outfile.write('1.0-0-gbeef')
version = vcversioner.find_version(Popen=empty, version_file='custom.txt')
assert version == ('1.0', '0', 'gbeef')
def test_version_file_disabled(gitdir):
"The version.txt file can be disabled too."
version = vcversioner.find_version(Popen=basic_version, version_file=None)
assert version == ('1.0', '0', 'gbeef')
assert not gitdir.join('version.txt').check()
def test_version_file_disabled_git_failed(gitdir):
"If version.txt is disabled and git fails, nothing can be done."
with pytest.raises(SystemExit) as excinfo:
vcversioner.find_version(Popen=empty, version_file=None)
assert excinfo.value.args[0] == 2
assert not gitdir.join('version.txt').check()
def test_version_file_disabled_Popen_raises(gitdir):
"If version.txt is disabled and git fails to spawn, abort as well."
with pytest.raises(SystemExit) as excinfo:
vcversioner.find_version(Popen=RaisingFakePopen(), version_file=None)
assert excinfo.value.args[0] == 2
assert not gitdir.join('version.txt').check()
def test_namedtuple(tmpdir):
"The output namedtuple has attribute names too."
tmpdir.chdir()
version = vcversioner.find_version(Popen=basic_version, version_file=None, vcs_args=[])
assert version.version == '1.0'
assert version.commits == '0'
assert version.sha == 'gbeef'
def test_namedtuple_nonzero_commits(tmpdir):
"The output namedtuple can have a nonzero number of commits."
tmpdir.chdir()
version = vcversioner.find_version(Popen=dev_version, version_file=None, vcs_args=[])
assert version.version == '1.0.post2'
assert version.commits == '2'
assert version.sha == 'gfeeb'
def test_version_module_paths(gitdir):
"Version modules can be written out too."
paths = ['foo.py', 'bar.py']
vcversioner.find_version(
Popen=basic_version, version_module_paths=paths)
for path in paths:
with open(path) as infile:
assert infile.read() == """
# This file is automatically generated by setup.py.
__version__ = '1.0'
__sha__ = 'gbeef'
__revision__ = 'gbeef'
"""
def test_git_arg_path_translation(gitdir, monkeypatch):
"/ is translated into the correct path separator in git arguments."
monkeypatch.setattr(os, 'sep', ':')
popen = RaisingFakePopen()
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=popen, vcs_args=['spam/eggs'], version_file=None)
assert popen.args[0] == ['spam:eggs']
def test_version_file_path_translation(gitdir, monkeypatch):
"/ is translated into the correct path separator for version.txt."
monkeypatch.setattr(os, 'sep', ':')
open = FakeOpen()
with pytest.raises(OSError):
vcversioner.find_version(Popen=basic_version, open=open, version_file='spam/eggs', vcs_args=[])
assert open.args[0] == 'spam:eggs'
def test_git_output_on_no_version_file(gitdir, capsys):
"The output from git is shown if it failed and the version file is disabled."
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=git_failed, version_file=None, vcs_args=[])
out, err = capsys.readouterr()
assert not err
assert out == (
'vcversioner: [] failed.\n'
'vcversioner: -- VCS output follows --\n'
'vcversioner: fatal: whatever\n')
def test_git_output_on_version_file_absent(gitdir, capsys):
"The output from git is shown if it failed and the version file doesn't exist."
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=git_failed, version_file='version.txt', vcs_args=[])
out, err = capsys.readouterr()
assert not err
assert out == (
"vcversioner: [] failed and %r isn't present.\n"
'vcversioner: are you installing from a github tarball?\n'
'vcversioner: -- VCS output follows --\n'
'vcversioner: fatal: whatever\n' % ('version.txt',))
def test_git_output_on_version_unparsable(gitdir, capsys):
"The output from git is shown if it failed and the version couldn't be parsed."
gitdir.join('version.txt').write('doof')
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=git_failed, version_file='version.txt', vcs_args=[])
out, err = capsys.readouterr()
assert not err
assert out == (
"vcversioner: %r (from %r) couldn't be parsed into a version.\n"
'vcversioner: -- VCS output follows --\n'
'vcversioner: fatal: whatever\n' % ('doof', 'version.txt'))
def test_no_git_output_on_version_unparsable(capsys):
"The output from git is not shown if git succeeded but the version couldn't be parsed."
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=invalid, version_file='version.txt', vcs_args=[])
out, err = capsys.readouterr()
assert not err
assert out == (
"vcversioner: %r (from VCS) couldn't be parsed into a version.\n" % ('foob',))
def test_no_output_on_success(gitdir, capsys):
"There is no output if everything succeeded."
vcversioner.find_version(Popen=basic_version)
out, err = capsys.readouterr()
assert not out
assert not err
def test_no_output_on_version_file_success(gitdir, capsys):
"There is no output if everything succeeded, even if the version was read from a version file."
gitdir.join('version.txt').write('1.0-0-gbeef')
vcversioner.find_version(Popen=git_failed)
out, err = capsys.readouterr()
assert not out
assert not err
def test_strip_leading_v(gitdir):
"Leading 'v's are stripped from tags."
version = vcversioner.find_version(Popen=FakePopen(b'v1.0-0-gbeef'))
assert version == ('1.0', '0', 'gbeef')
def test_strip_leading_prefix(gitdir):
"The leading prefix stripped from tags can be customized."
version = vcversioner.find_version(Popen=FakePopen(b'debian/1.0-0-gbeef'), strip_prefix='debian/')
assert version == ('1.0', '0', 'gbeef')
def test_git_args_deprecation(gitdir):
"git_args is deprecated."
pytest.deprecated_call(vcversioner.find_version, git_args=['git', 'spam'], Popen=basic_version)
def test_git_args_still_works(gitdir):
"git_args still works like vcs_args."
popen = RaisingFakePopen()
with pytest.raises(SystemExit):
vcversioner.find_version(git_args=['git', 'spam'], Popen=popen)
assert popen.args[0] == ['git', 'spam']
def test_hg_detection(hgdir):
".hg directories get detected and the appropriate hg command gets run."
popen = RaisingFakePopen()
with pytest.raises(SystemExit):
vcversioner.find_version(Popen=popen)
assert popen.args[0] == [
'hg', 'log', '-R', hgdir.strpath, '-r', '.', '--template',
'{latesttag}-{latesttagdistance}-hg{node|short}']
def test_no_vcs_no_version_file(tmpdir, capsys):
"If no VCS is detected with no version_file, vcversioner aborts."
tmpdir.chdir()
with pytest.raises(SystemExit):
vcversioner.find_version(version_file=None, Popen=basic_version)
out, err = capsys.readouterr()
assert not err
assert out == (
'vcversioner: no VCS could be detected in %r.\n' % (unicode(tmpdir.strpath),))
def test_no_vcs_absent_version_file(tmpdir, capsys):
"If no VCS is detected with an absent version_file, vcversioner aborts."
tmpdir.chdir()
with pytest.raises(SystemExit):
vcversioner.find_version(version_file='version.txt', Popen=basic_version)
out, err = capsys.readouterr()
assert not err
assert out == (
"vcversioner: no VCS could be detected in %r and %r isn't present.\n"
"vcversioner: are you installing from a github tarball?\n" % (
unicode(tmpdir.strpath), 'version.txt'))
def test_decrement_dev_version(gitdir):
"decrement_dev_version will subtract one from the number of commits."
version = vcversioner.find_version(decrement_dev_version=True, Popen=dev_version)
assert version == ('1.0.post1', '1', 'gfeeb')
def test_decrement_dev_version_to_zero(gitdir):
"decrement_dev_version with one commit will produce a non-dev version number."
version = vcversioner.find_version(decrement_dev_version=True, Popen=FakePopen(b'1.0-1-gbeef'))
assert version == ('1.0', '0', 'gbeef')
def test_automatic_decrement_dev_version_with_hg(hgdir):
"decrement_dev_version gets turned on automatically with hg revisions."
version = vcversioner.find_version(Popen=hg_version)
assert version == ('1.0', '0', 'hgbeef')
def test_automatic_decrement_dev_version_disabled(hgdir):
"decrement_dev_version does not get turned on automatically if explicitly disabled."
version = vcversioner.find_version(decrement_dev_version=False, Popen=hg_version)
assert version == ('1.0.post1', '1', 'hgbeef')
def test_version_file_substituted_with_no_vcs(tmpdir):
"The version file is substituted even if no VCS is present."
tmpdir.chdir()
tmpdir.join('version.txt').write('1.0-0-gbeef')
version = vcversioner.find_version(Popen=empty)
assert version == ('1.0', '0', 'gbeef')
class Struct(object):
pass
def test_setup_astounding_success(tmpdir):
"``find_version`` can be called through distutils too."
tmpdir.chdir()
dist = Struct()
dist.metadata = Struct()
vcversioner.setup(
dist, 'vcversioner',
{str('Popen'): basic_version, str('version_file'): None,
str('vcs_args'): []})
assert dist.metadata.version == '1.0'
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-EditorConfig for openSUSE:Factory checked in at 2021-08-28 22:29:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-EditorConfig (Old)
and /work/SRC/openSUSE:Factory/.python-EditorConfig.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-EditorConfig"
Sat Aug 28 22:29:29 2021 rev:5 rq:914753 version:0.12.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-EditorConfig/python-EditorConfig.changes 2020-03-16 10:18:36.551593856 +0100
+++ /work/SRC/openSUSE:Factory/.python-EditorConfig.new.1899/python-EditorConfig.changes 2021-08-28 22:29:52.990022959 +0200
@@ -1,0 +2,14 @@
+Fri Aug 27 09:45:50 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 0.12.3
+ * Update 0.12.3 to final version
+ * Add Python 3.9 support
+ * Fix fnmatch adjacent nested curly braces (#33)
+ * tests: bump to master (#32)
+ * editorconfig as a module (#31)
+ * setup.py: read version without installing (#30)
+ * travis: support Python 3.8
+ * Fix deprecation warnings coming with Python 3.7
+ * Add (c) to copyright notices per @xuhdev's request
+
+-------------------------------------------------------------------
Old:
----
EditorConfig-0.12.2.tar.gz
New:
----
EditorConfig-0.12.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-EditorConfig.spec ++++++
--- /var/tmp/diff_new_pack.QWP3EB/_old 2021-08-28 22:29:53.462023484 +0200
+++ /var/tmp/diff_new_pack.QWP3EB/_new 2021-08-28 22:29:53.466023488 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-EditorConfig
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,10 +18,10 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-EditorConfig
-Version: 0.12.2
+Version: 0.12.3
Release: 0
Summary: File Locator and Interpreter for Python
-License: Python-2.0 AND BSD-2-Clause
+License: BSD-2-Clause AND Python-2.0
URL: https://editorconfig.org
Source0: https://files.pythonhosted.org/packages/source/E/EditorConfig/EditorConfig-…
BuildRequires: %{python_module setuptools}
++++++ EditorConfig-0.12.2.tar.gz -> EditorConfig-0.12.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/COPYING new/EditorConfig-0.12.3/COPYING
--- old/EditorConfig-0.12.2/COPYING 2018-04-18 07:42:56.000000000 +0200
+++ new/EditorConfig-0.12.3/COPYING 2020-12-23 05:07:14.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright 2011-2018 EditorConfig Team, including Hong Xu and Trey Hunner
+Copyright (c) 2011-2018 EditorConfig Team, including Hong Xu and Trey Hunner
editorconfig-core-py is free software. You are free to copy,
modify, and/or redistribute this work under the terms of the BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/EditorConfig.egg-info/PKG-INFO new/EditorConfig-0.12.3/EditorConfig.egg-info/PKG-INFO
--- old/EditorConfig-0.12.2/EditorConfig.egg-info/PKG-INFO 2018-04-18 07:45:09.000000000 +0200
+++ new/EditorConfig-0.12.3/EditorConfig.egg-info/PKG-INFO 2020-12-23 05:20:12.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: EditorConfig
-Version: 0.12.2
+Version: 0.12.3
Summary: EditorConfig File Locator and Interpreter for Python
Home-page: http://editorconfig.org/
Author: EditorConfig Team
Author-email: UNKNOWN
License: python
-Description-Content-Type: UNKNOWN
Description: ========================
EditorConfig Python Core
========================
@@ -102,7 +101,9 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: PyPy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/EditorConfig.egg-info/SOURCES.txt new/EditorConfig-0.12.3/EditorConfig.egg-info/SOURCES.txt
--- old/EditorConfig-0.12.2/EditorConfig.egg-info/SOURCES.txt 2018-04-18 07:45:09.000000000 +0200
+++ new/EditorConfig-0.12.3/EditorConfig.egg-info/SOURCES.txt 2020-12-23 05:20:12.000000000 +0100
@@ -10,10 +10,11 @@
EditorConfig.egg-info/entry_points.txt
EditorConfig.egg-info/top_level.txt
editorconfig/__init__.py
+editorconfig/__main__.py
editorconfig/compat.py
editorconfig/exceptions.py
editorconfig/fnmatch.py
editorconfig/handler.py
editorconfig/ini.py
-editorconfig/main.py
+editorconfig/version.py
editorconfig/versiontools.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/EditorConfig.egg-info/entry_points.txt new/EditorConfig-0.12.3/EditorConfig.egg-info/entry_points.txt
--- old/EditorConfig-0.12.2/EditorConfig.egg-info/entry_points.txt 2018-04-18 07:45:09.000000000 +0200
+++ new/EditorConfig-0.12.3/EditorConfig.egg-info/entry_points.txt 2020-12-23 05:20:12.000000000 +0100
@@ -1,3 +1,3 @@
[console_scripts]
-editorconfig = editorconfig.main:main
+editorconfig = editorconfig.__main__:main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/LICENSE.BSD new/EditorConfig-0.12.3/LICENSE.BSD
--- old/EditorConfig-0.12.2/LICENSE.BSD 2018-04-18 07:42:56.000000000 +0200
+++ new/EditorConfig-0.12.3/LICENSE.BSD 2020-12-23 05:07:14.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright 2011-2018 EditorConfig Team, including Hong Xu and Trey Hunner
+Copyright (c) 2011-2018 EditorConfig Team, including Hong Xu and Trey Hunner
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/PKG-INFO new/EditorConfig-0.12.3/PKG-INFO
--- old/EditorConfig-0.12.2/PKG-INFO 2018-04-18 07:45:09.000000000 +0200
+++ new/EditorConfig-0.12.3/PKG-INFO 2020-12-23 05:20:12.393674900 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: EditorConfig
-Version: 0.12.2
+Version: 0.12.3
Summary: EditorConfig File Locator and Interpreter for Python
Home-page: http://editorconfig.org/
Author: EditorConfig Team
Author-email: UNKNOWN
License: python
-Description-Content-Type: UNKNOWN
Description: ========================
EditorConfig Python Core
========================
@@ -102,7 +101,9 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: PyPy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/editorconfig/__init__.py new/EditorConfig-0.12.3/editorconfig/__init__.py
--- old/EditorConfig-0.12.2/editorconfig/__init__.py 2018-04-18 07:44:24.000000000 +0200
+++ new/EditorConfig-0.12.3/editorconfig/__init__.py 2020-12-23 05:07:14.000000000 +0100
@@ -1,8 +1,7 @@
"""EditorConfig Python Core"""
from editorconfig.versiontools import join_version
-
-VERSION = (0, 12, 2, "final")
+from editorconfig.version import VERSION
__all__ = ['get_properties', 'EditorConfigError', 'exceptions']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/editorconfig/__main__.py new/EditorConfig-0.12.3/editorconfig/__main__.py
--- old/EditorConfig-0.12.2/editorconfig/__main__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/EditorConfig-0.12.3/editorconfig/__main__.py 2020-12-23 05:07:14.000000000 +0100
@@ -0,0 +1,82 @@
+"""EditorConfig command line interface
+
+Licensed under Simplified BSD License (see LICENSE.BSD file).
+
+"""
+
+import getopt
+import sys
+
+from editorconfig import VERSION, __version__
+from editorconfig.compat import force_unicode
+from editorconfig.exceptions import ParsingError, PathError, VersionError
+from editorconfig.handler import EditorConfigHandler
+from editorconfig.versiontools import split_version
+
+
+def version():
+ print("EditorConfig Python Core Version %s" % __version__)
+
+
+def usage(command, error=False):
+ if error:
+ out = sys.stderr
+ else:
+ out = sys.stdout
+ out.write("%s [OPTIONS] FILENAME\n" % command)
+ out.write('-f '
+ 'Specify conf filename other than ".editorconfig".\n')
+ out.write("-b "
+ "Specify version (used by devs to test compatibility).\n")
+ out.write("-h OR --help Print this help message.\n")
+ out.write("-v OR --version Display version information.\n")
+
+
+def main():
+ command_name = sys.argv[0]
+ try:
+ opts, args = getopt.getopt(list(map(force_unicode, sys.argv[1:])),
+ "vhb:f:", ["version", "help"])
+ except getopt.GetoptError as e:
+ print(str(e))
+ usage(command_name, error=True)
+ sys.exit(2)
+
+ version_tuple = VERSION
+ conf_filename = '.editorconfig'
+
+ for option, arg in opts:
+ if option in ('-h', '--help'):
+ usage(command_name)
+ sys.exit()
+ if option in ('-v', '--version'):
+ version()
+ sys.exit()
+ if option == '-f':
+ conf_filename = arg
+ if option == '-b':
+ version_tuple = split_version(arg)
+ if version_tuple is None:
+ sys.exit("Invalid version number: %s" % arg)
+
+ if len(args) < 1:
+ usage(command_name, error=True)
+ sys.exit(2)
+ filenames = args
+ multiple_files = len(args) > 1
+
+ for filename in filenames:
+ handler = EditorConfigHandler(filename, conf_filename, version_tuple)
+ try:
+ options = handler.get_configurations()
+ except (ParsingError, PathError, VersionError) as e:
+ print(str(e))
+ sys.exit(2)
+ if multiple_files:
+ print("[%s]" % filename)
+ for key, value in options.items():
+ print("%s=%s" % (key, value))
+
+
+if __name__ == "__main__":
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/editorconfig/fnmatch.py new/EditorConfig-0.12.3/editorconfig/fnmatch.py
--- old/EditorConfig-0.12.2/editorconfig/fnmatch.py 2018-04-18 07:42:56.000000000 +0200
+++ new/EditorConfig-0.12.3/editorconfig/fnmatch.py 2020-12-23 05:07:14.000000000 +0100
@@ -28,7 +28,7 @@
LEFT_BRACE = re.compile(
r"""
- (?: ^ | [^\\] ) # Beginning of string or a character besides "\"
+ (?<! \\ ) # Not preceded by "\"
\{ # "{"
@@ -38,7 +38,7 @@
RIGHT_BRACE = re.compile(
r"""
- (?: ^ | [^\\] ) # Beginning of string or a character besides "\"
+ (?<! \\ ) # Not preceded by "\"
\} # "}"
@@ -135,7 +135,7 @@
else:
result += '[^/]*'
elif current_char == '?':
- result += '.'
+ result += '[^/]'
elif current_char == '[':
if in_brackets:
result += '\\['
@@ -148,8 +148,8 @@
break
pos += 1
if has_slash:
- result += '\\[' + pat[index:(pos + 1)] + '\\]'
- index = pos + 2
+ result += '\\[' + pat[index:(pos + 1)]
+ index = pos + 1
else:
if index < length and pat[index] in '!^':
index += 1
@@ -163,8 +163,11 @@
else:
result += '\\' + current_char
elif current_char == ']':
- result += current_char
- in_brackets = False
+ if in_brackets and pat[index-2] == '\\':
+ result += '\\]'
+ else:
+ result += current_char
+ in_brackets = False
elif current_char == '{':
pos = index
has_comma = False
@@ -178,7 +181,7 @@
num_range = NUMERIC_RANGE.match(pat[index:pos])
if num_range:
numeric_groups.append(map(int, num_range.groups()))
- result += "([+-]?\d+)"
+ result += r"([+-]?\d+)"
else:
inner_result, inner_groups = translate(pat[index:pos],
nested=True)
@@ -216,5 +219,5 @@
else:
is_escaped = False
if not nested:
- result += '\Z(?ms)'
+ result = r'(?s)%s\Z' % result
return result, numeric_groups
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/editorconfig/ini.py new/EditorConfig-0.12.3/editorconfig/ini.py
--- old/EditorConfig-0.12.2/editorconfig/ini.py 2018-04-18 07:42:56.000000000 +0200
+++ new/EditorConfig-0.12.3/editorconfig/ini.py 2020-12-23 05:07:14.000000000 +0100
@@ -27,6 +27,10 @@
__all__ = ["ParsingError", "EditorConfigParser"]
+MAX_SECTION_LENGTH = 4096
+MAX_PROPERTY_LENGTH= 50
+MAX_VALUE_LENGTH = 255
+
class EditorConfigParser(object):
@@ -134,6 +138,8 @@
mo = self.SECTCRE.match(line)
if mo:
sectname = mo.group('header')
+ if len(sectname) > MAX_SECTION_LENGTH:
+ continue
in_section = True
matching_section = self.matches_filename(fpname, sectname)
# So sections can't start with a continuation line
@@ -154,6 +160,9 @@
if optval == '""':
optval = ''
optname = self.optionxform(optname.rstrip())
+ if (len(optname) > MAX_PROPERTY_LENGTH or
+ len(optval) > MAX_VALUE_LENGTH):
+ continue
if not in_section and optname == 'root':
self.root_file = (optval.lower() == 'true')
if matching_section:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/editorconfig/main.py new/EditorConfig-0.12.3/editorconfig/main.py
--- old/EditorConfig-0.12.2/editorconfig/main.py 2018-04-18 07:42:56.000000000 +0200
+++ new/EditorConfig-0.12.3/editorconfig/main.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,78 +0,0 @@
-"""EditorConfig command line interface
-
-Licensed under Simplified BSD License (see LICENSE.BSD file).
-
-"""
-
-import getopt
-import sys
-
-from editorconfig import VERSION, __version__
-from editorconfig.compat import force_unicode
-from editorconfig.exceptions import ParsingError, PathError, VersionError
-from editorconfig.handler import EditorConfigHandler
-from editorconfig.versiontools import split_version
-
-
-def version():
- print("EditorConfig Python Core Version %s" % __version__)
-
-
-def usage(command, error=False):
- if error:
- out = sys.stderr
- else:
- out = sys.stdout
- out.write("%s [OPTIONS] FILENAME\n" % command)
- out.write('-f '
- 'Specify conf filename other than ".editorconfig".\n')
- out.write("-b "
- "Specify version (used by devs to test compatibility).\n")
- out.write("-h OR --help Print this help message.\n")
- out.write("-v OR --version Display version information.\n")
-
-
-def main():
- command_name = sys.argv[0]
- try:
- opts, args = getopt.getopt(list(map(force_unicode, sys.argv[1:])),
- "vhb:f:", ["version", "help"])
- except getopt.GetoptError as e:
- print(str(e))
- usage(command_name, error=True)
- sys.exit(2)
-
- version_tuple = VERSION
- conf_filename = '.editorconfig'
-
- for option, arg in opts:
- if option in ('-h', '--help'):
- usage(command_name)
- sys.exit()
- if option in ('-v', '--version'):
- version()
- sys.exit()
- if option == '-f':
- conf_filename = arg
- if option == '-b':
- version_tuple = split_version(arg)
- if version_tuple is None:
- sys.exit("Invalid version number: %s" % arg)
-
- if len(args) < 1:
- usage(command_name, error=True)
- sys.exit(2)
- filenames = args
- multiple_files = len(args) > 1
-
- for filename in filenames:
- handler = EditorConfigHandler(filename, conf_filename, version_tuple)
- try:
- options = handler.get_configurations()
- except (ParsingError, PathError, VersionError) as e:
- print(str(e))
- sys.exit(2)
- if multiple_files:
- print("[%s]" % filename)
- for key, value in options.items():
- print("%s=%s" % (key, value))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/editorconfig/version.py new/EditorConfig-0.12.3/editorconfig/version.py
--- old/EditorConfig-0.12.2/editorconfig/version.py 1970-01-01 01:00:00.000000000 +0100
+++ new/EditorConfig-0.12.3/editorconfig/version.py 2020-12-23 05:09:27.000000000 +0100
@@ -0,0 +1 @@
+VERSION = (0, 12, 3, "final")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EditorConfig-0.12.2/setup.py new/EditorConfig-0.12.3/setup.py
--- old/EditorConfig-0.12.2/setup.py 2018-04-17 05:59:54.000000000 +0200
+++ new/EditorConfig-0.12.3/setup.py 2020-12-23 05:10:19.000000000 +0100
@@ -1,10 +1,18 @@
+import os
from setuptools import setup
-import editorconfig
+# Read the version
+g = {}
+with open(os.path.join("editorconfig", "version.py"), "rt") as fp:
+ exec(fp.read(), g)
+ v = g['VERSION']
+ version = ".".join(str(x) for x in v[:3])
+ if v[3] != "final":
+ version += "-" + v[3]
setup(
name='EditorConfig',
- version=editorconfig.__version__,
+ version=version,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
@@ -13,7 +21,7 @@
long_description=open('README.rst').read(),
entry_points = {
'console_scripts': [
- 'editorconfig = editorconfig.main:main',
+ 'editorconfig = editorconfig.__main__:main',
]
},
classifiers=[
@@ -22,9 +30,11 @@
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: PyPy',
],
)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package vncmanager-controller for openSUSE:Factory checked in at 2021-08-28 22:29:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vncmanager-controller (Old)
and /work/SRC/openSUSE:Factory/.vncmanager-controller.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vncmanager-controller"
Sat Aug 28 22:29:27 2021 rev:8 rq:914767 version:1.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/vncmanager-controller/vncmanager-controller.changes 2020-09-23 18:48:26.557765238 +0200
+++ /work/SRC/openSUSE:Factory/.vncmanager-controller.new.1899/vncmanager-controller.changes 2021-08-28 22:29:51.486021287 +0200
@@ -1,0 +2,10 @@
+Fri Aug 6 06:53:54 UTC 2021 - Ali Abdallah <ali.abdallah(a)suse.com>
+
+- 0001-fix-js-code-incompatibility-with-gnome-3.34.patch: Fix JS code
+ code incompatibility with newer gnome-shell versions such as gnome-shell
+ 3.34 (bsc#1188118)
+- Explicitly declare newer gnome-shell versions as supported.
+ * Added U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.34-as-supported.patch
+ * Deleted U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.26-as-supported.patch
+
+-------------------------------------------------------------------
Old:
----
U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.26-as-supported.patch
New:
----
0001-fix-js-code-incompatibility-with-gnome-3.34.patch
U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.34-as-supported.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vncmanager-controller.spec ++++++
--- /var/tmp/diff_new_pack.fKdUoA/_old 2021-08-28 22:29:51.970021826 +0200
+++ /var/tmp/diff_new_pack.fKdUoA/_new 2021-08-28 22:29:51.974021830 +0200
@@ -1,7 +1,7 @@
#
# spec file for package vncmanager-controller
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -35,8 +35,9 @@
License: MIT
Group: System/X11/Utilities
Source: vncmanager-controller-%{version}.tar.gz
-Patch1: U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.26-as-supported.patch
+Patch1: U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.34-as-supported.patch
Patch2: n_UsrEtc.patch
+Patch3: 0001-fix-js-code-incompatibility-with-gnome-3.34.patch
Requires: vncmanager
%description
@@ -58,6 +59,7 @@
%if 0%{?suse_version} >= 1550
%patch2 -p1
%endif
+%patch3 -p1
%build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=ON
++++++ 0001-fix-js-code-incompatibility-with-gnome-3.34.patch ++++++
From 4188469706d567e810caac74d221e065c52084b1 Mon Sep 17 00:00:00 2001
From: Ali Abdallah <ali.abdallah(a)suse.com>
Date: Fri, 9 Jul 2021 14:32:50 +0200
Subject: [PATCH] Make it work with newer gnome-shell
Fix JS code incompatibility with newer gnome-shell versions such as
3.34, see bsc#1188118.
---
extension.js | 37 +++++++++++++------------------------
1 file changed, 13 insertions(+), 24 deletions(-)
diff --git a/extension.js b/extension.js
index e42f4fe..ec660a8 100644
--- a/gnome-shell-extension/extension.js
+++ b/gnome-shell-extension/extension.js
@@ -1,5 +1,6 @@
const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
+const GObject = imports.gi.GObject;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const St = imports.gi.St;
@@ -11,30 +12,18 @@ const CONTROLLER_CMD = ['/usr/bin/vncmanager-controller', '--start-setup', '--st
let controller;
let stdoutChannel;
-function VNCController() {
- this._init();
-}
-
-VNCController.prototype = {
- __proto__: PanelMenu.Button.prototype,
-
- _init: function() {
- PanelMenu.Button.prototype._init.call(this, St.Align.START);
-
- this.label = new St.Label({ text: 'VNC', y_expand: true, y_align: Clutter.ActorAlign.CENTER });
- this.actor.add_child(this.label);
- this.actor.connect('button-release-event', this._handleToggle);
- },
-
- _handleToggle: function(actor, event) {
- stdoutChannel.write_chars("TOGGLE\n", 7);
- stdoutChannel.flush();
- },
-}
-
-function init() {
-
-}
+const VNCController = GObject.registerClass(
+class VNCController extends PanelMenu.Button {
+ _init() {
+ super._init(St.Align.START);
+ let label = new St.Label({ text: 'VNC', y_expand: true, y_align: Clutter.ActorAlign.CENTER });
+ this.add_actor(label);
+ this.connect('button-release-event', () => {
+ stdoutChannel.write_chars("TOGGLE\n", 7);
+ stdoutChannel.flush();
+ });
+ }
+});
function enable() {
let process = GLib.spawn_async_with_pipes(null, CONTROLLER_CMD, null, GLib.SpawnFlags.DEFAULT, null);
--
2.31.1
++++++ U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.26-as-supported.patch -> U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.34-as-supported.patch ++++++
--- /work/SRC/openSUSE:Factory/vncmanager-controller/U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.26-as-supported.patch 2018-07-18 22:56:00.658548809 +0200
+++ /work/SRC/openSUSE:Factory/.vncmanager-controller.new.1899/U_vncmanager-controller-Declare-gnome-shell-versions-3.10-to-3.34-as-supported.patch 2021-08-28 22:29:51.470021270 +0200
@@ -1,7 +1,7 @@
From cf9313d2415961efceb503fda94705548d22849f Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb(a)suse.com>
Date: Tue, 17 Jul 2018 10:58:54 +0200
-Subject: [PATCH] Declare gnome shell versions 3.10 to 3.26 as supported.
+Subject: [PATCH] Declare gnome shell versions 3.10 to 3.34 as supported.
Newer versions may work as well, but were not tested.
---
@@ -34,6 +34,12 @@
+ "3.24",
+ "3.25",
+ "3.26"
++ "3.29",
++ "3.30",
++ "3.31",
++ "3.32",
++ "3.33",
++ "3.34",
+ ],
+ "uuid": "vncmanager-controller(a)vncmanager.michalsrb.github.com",
+ "name": "VNC Session Configuration",
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package moarvm for openSUSE:Factory checked in at 2021-08-28 22:29:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/moarvm (Old)
and /work/SRC/openSUSE:Factory/.moarvm.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "moarvm"
Sat Aug 28 22:29:29 2021 rev:34 rq:914760 version:2021.08
Changes:
--------
--- /work/SRC/openSUSE:Factory/moarvm/moarvm.changes 2021-08-27 21:45:14.430064362 +0200
+++ /work/SRC/openSUSE:Factory/.moarvm.new.1899/moarvm.changes 2021-08-28 22:29:52.182022061 +0200
@@ -1,0 +2,6 @@
+Sat Aug 28 10:25:42 UTC 2021 - Stefan Seifert <nine(a)detonation.org>
+
+- Backport a fix for segfaults in NativeCall callbacks from moarvm master
+ Add moarvm-fix-segfaults-in-native-callbacks.diff to be removed on the next release
+
+-------------------------------------------------------------------
New:
----
moarvm-fix-segfaults-in-native-callbacks.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ moarvm.spec ++++++
--- /var/tmp/diff_new_pack.fEhLwQ/_old 2021-08-28 22:29:52.738022679 +0200
+++ /var/tmp/diff_new_pack.fEhLwQ/_new 2021-08-28 22:29:52.742022683 +0200
@@ -19,7 +19,7 @@
%global mvrel 2021.08
Name: moarvm
Version: %mvrel
-Release: 3.1
+Release: 4.1
Summary: A virtual machine built especially for Rakudo Perl 6
License: Artistic-2.0
Group: Development/Libraries/Other
@@ -28,6 +28,7 @@
# PATCH-FIX-OPENSUSE boo#1100677
Patch0: reproducible.patch
Patch1: moarvm-fix-memory-leak.diff
+Patch2: moarvm-fix-segfaults-in-native-callbacks.diff
BuildRequires: perl(ExtUtils::Command)
%description
@@ -48,6 +49,7 @@
%setup -q -n MoarVM-%{mvrel}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
perl Configure.pl --prefix=%{_usr} --libdir=%{_libdir} --debug --optimize=3
++++++ moarvm-fix-segfaults-in-native-callbacks.diff ++++++
commit 7a385a3506cd771ed49715399fbf526bc3ffbd4d
Author: Stefan Seifert <nine(a)detonation.org>
Date: Fri Aug 27 14:16:07 2021 +0200
Fix possible access to fromspace in NativeCall callbacks
An untimely garbage collection between setting the result object in the
callback and unmarshalling of that result object could lead to an outdated
pointer in res.o and further to segfaults and other nastiness.
Fix by adding res.o to the roots. Callbacks always return objects, so no
no special handling of primitive types necessary.
diff --git a/src/core/nativecall_dyncall.c b/src/core/nativecall_dyncall.c
index 742e53208..95247f0f2 100644
--- a/src/core/nativecall_dyncall.c
+++ b/src/core/nativecall_dyncall.c
@@ -232,7 +232,7 @@ static char callback_handler(DCCallback *cb, DCArgs *cb_args, DCValue *cb_result
/* Build a callsite and arguments buffer. */
args = MVM_malloc(data->num_types * sizeof(MVMRegister));
- num_roots = 0;
+ num_roots = 1; /* res.o is always in roots */
for (i = 1; i < data->num_types; i++) {
MVMObject *type = data->types[i];
MVMint16 typeinfo = data->typeinfos[i];
@@ -330,6 +330,7 @@ static char callback_handler(DCCallback *cb, DCArgs *cb_args, DCValue *cb_result
/* Call into a nested interpreter (since we already are in one). Need to
* save a bunch of state around each side of this. */
+ MVM_gc_root_temp_push(tc, (MVMCollectable **)&(res.o));
cid.invokee = data->target;
cid.args = args;
cid.cs = data->cs;
diff --git a/src/core/nativecall_libffi.c b/src/core/nativecall_libffi.c
index a14023930..dd4c7f1ae 100644
--- a/src/core/nativecall_libffi.c
+++ b/src/core/nativecall_libffi.c
@@ -230,7 +230,7 @@ static void callback_handler(ffi_cif *cif, void *cb_result, void **cb_args, void
/* Build a callsite and arguments buffer. */
args = MVM_malloc(data->num_types * sizeof(MVMRegister));
- num_roots = 0;
+ num_roots = 1; /* res.o is always in roots */
for (i = 1; i < data->num_types; i++) {
MVMObject *type = data->types[i];
MVMint16 typeinfo = data->typeinfos[i];
@@ -321,6 +321,7 @@ static void callback_handler(ffi_cif *cif, void *cb_result, void **cb_args, void
/* Call into a nested interpreter (since we already are in one). Need to
* save a bunch of state around each side of this. */
+ MVM_gc_root_temp_push(tc, (MVMCollectable **)&(res.o));
cid.invokee = data->target;
cid.args = args;
cid.cs = data->cs;
1
0