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
July 2023
- 1 participants
- 1987 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package openSUSE-release-tools for openSUSE:Factory checked in at 2023-07-31 15:25:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-release-tools"
Mon Jul 31 15:25:07 2023 rev:490 rq:1101499 version:20230731.178896c
Changes:
--------
--- /work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes 2023-07-29 20:10:55.986153354 +0200
+++ /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.32662/openSUSE-release-tools.changes 2023-07-31 15:25:12.455614563 +0200
@@ -1,0 +2,6 @@
+Mon Jul 31 09:56:38 UTC 2023 - opensuse-releaseteam(a)opensuse.org
+
+- Update to version 20230731.178896c:
+ * Add LeapMicro 5.5 pipelines
+
+-------------------------------------------------------------------
Old:
----
openSUSE-release-tools-20230729.e576376.obscpio
New:
----
openSUSE-release-tools-20230731.178896c.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.rdjD6R/_old 2023-07-31 15:25:13.455620336 +0200
+++ /var/tmp/diff_new_pack.rdjD6R/_new 2023-07-31 15:25:13.459620359 +0200
@@ -20,7 +20,7 @@
%define source_dir openSUSE-release-tools
%define announcer_filename factory-package-news
Name: openSUSE-release-tools
-Version: 20230729.e576376
+Version: 20230731.178896c
Release: 0
Summary: Tools to aid in staging and release work for openSUSE/SUSE
License: GPL-2.0-or-later AND MIT
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.rdjD6R/_old 2023-07-31 15:25:13.503620613 +0200
+++ /var/tmp/diff_new_pack.rdjD6R/_new 2023-07-31 15:25:13.507620636 +0200
@@ -1,7 +1,7 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param>
- <param name="changesrevision">e57637683cfef4f154cff203d343c2ec6a719115</param>
+ <param name="changesrevision">178896cc1fda3bf5a4295e5b12f0e1bf49d7293f</param>
</service>
</servicedata>
++++++ openSUSE-release-tools-20230729.e576376.obscpio -> openSUSE-release-tools-20230731.178896c.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20230729.e576376/gocd/leapmicro.target.gocd.yaml new/openSUSE-release-tools-20230731.178896c/gocd/leapmicro.target.gocd.yaml
--- old/openSUSE-release-tools-20230729.e576376/gocd/leapmicro.target.gocd.yaml 2023-07-29 09:40:51.000000000 +0200
+++ new/openSUSE-release-tools-20230731.178896c/gocd/leapmicro.target.gocd.yaml 2023-07-31 11:55:33.000000000 +0200
@@ -17,7 +17,7 @@
resources:
- repo-checker
tasks:
- - script: ./pkglistgen.py -A https://api.opensuse.org update_and_solve -p openSUSE:Leap:Micro:5.4 -s target --only-release-packages
+ - script: ./pkglistgen.py -A https://api.opensuse.org update_and_solve -p openSUSE:Leap:Micro:5.5 -s target --only-release-packages
LeapMicro.Package.Lists:
group: Leap
@@ -35,4 +35,4 @@
resources:
- repo-checker
tasks:
- - script: ./pkglistgen.py -A https://api.opensuse.org --debug update_and_solve -p openSUSE:Leap:Micro:5.4 -s target
+ - script: ./pkglistgen.py -A https://api.opensuse.org --debug update_and_solve -p openSUSE:Leap:Micro:5.5 -s target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20230729.e576376/gocd/totestmanager.gocd.yaml new/openSUSE-release-tools-20230731.178896c/gocd/totestmanager.gocd.yaml
--- old/openSUSE-release-tools-20230729.e576376/gocd/totestmanager.gocd.yaml 2023-07-29 09:40:51.000000000 +0200
+++ new/openSUSE-release-tools-20230731.178896c/gocd/totestmanager.gocd.yaml 2023-07-31 11:55:33.000000000 +0200
@@ -315,7 +315,7 @@
- script: |-
install -D /home/go/config/openqa-client.conf /home/go/.config/openqa/client.conf
scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:15.6:ARM:Images
- TTM.Leap_Micro_5.4:
+ TTM.Leap_Micro_5.5:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
environment_variables:
@@ -335,8 +335,8 @@
tasks:
- script: |-
install -D /home/go/config/openqa-client.conf /home/go/.config/openqa/client.conf
- scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:Micro:5.4
- TTM.Leap_Micro_5.4_Images:
+ scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:Micro:5.5
+ TTM.Leap_Micro_5.5_Images:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
environment_variables:
@@ -356,4 +356,4 @@
tasks:
- script: |-
install -D /home/go/config/openqa-client.conf /home/go/.config/openqa/client.conf
- scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:Micro:5.4:Images
+ scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:Micro:5.5:Images
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20230729.e576376/gocd/totestmanager.gocd.yaml.erb new/openSUSE-release-tools-20230731.178896c/gocd/totestmanager.gocd.yaml.erb
--- old/openSUSE-release-tools-20230729.e576376/gocd/totestmanager.gocd.yaml.erb 2023-07-29 09:40:51.000000000 +0200
+++ new/openSUSE-release-tools-20230731.178896c/gocd/totestmanager.gocd.yaml.erb 2023-07-31 11:55:33.000000000 +0200
@@ -16,8 +16,8 @@
openSUSE:Leap:15.6:Images
openSUSE:Leap:15.6:ARM
openSUSE:Leap:15.6:ARM:Images
- openSUSE:Leap:Micro:5.4
- openSUSE:Leap:Micro:5.4:Images
+ openSUSE:Leap:Micro:5.5
+ openSUSE:Leap:Micro:5.5:Images
) -%>
TTM.<%= project.gsub('openSUSE:', '').gsub(':', '_') %>:
group: openSUSE.Checkers
++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.rdjD6R/_old 2023-07-31 15:25:14.247624908 +0200
+++ /var/tmp/diff_new_pack.rdjD6R/_new 2023-07-31 15:25:14.251624931 +0200
@@ -1,5 +1,5 @@
name: openSUSE-release-tools
-version: 20230729.e576376
-mtime: 1690616451
-commit: e57637683cfef4f154cff203d343c2ec6a719115
+version: 20230731.178896c
+mtime: 1690797333
+commit: 178896cc1fda3bf5a4295e5b12f0e1bf49d7293f
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package tor for openSUSE:Factory checked in at 2023-07-31 15:25:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tor (Old)
and /work/SRC/openSUSE:Factory/.tor.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tor"
Mon Jul 31 15:25:05 2023 rev:112 rq:1101498 version:0.4.7.14
Changes:
--------
--- /work/SRC/openSUSE:Factory/tor/tor.changes 2023-03-14 18:17:27.527992905 +0100
+++ /work/SRC/openSUSE:Factory/.tor.new.32662/tor.changes 2023-07-31 15:25:09.047594888 +0200
@@ -1,0 +2,6 @@
+Sun Jul 30 07:33:04 UTC 2023 - Andreas Stieger <andreas.stieger(a)gmx.de>
+
+- tor 0.4.7.14:
+ * bugfix affecting vanguards (onion service), and minor fixes
+
+-------------------------------------------------------------------
Old:
----
tor-0.4.7.13.tar.gz
tor-0.4.7.13.tar.gz.sha256sum
tor-0.4.7.13.tar.gz.sha256sum.asc
New:
----
tor-0.4.7.14.tar.gz
tor-0.4.7.14.tar.gz.sha256sum
tor-0.4.7.14.tar.gz.sha256sum.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tor.spec ++++++
--- /var/tmp/diff_new_pack.Xic8p4/_old 2023-07-31 15:25:10.931605764 +0200
+++ /var/tmp/diff_new_pack.Xic8p4/_new 2023-07-31 15:25:10.935605788 +0200
@@ -20,7 +20,7 @@
%define torgroup %{name}
%define home_dir %{_localstatedir}/lib/empty
Name: tor
-Version: 0.4.7.13
+Version: 0.4.7.14
Release: 0
Summary: Anonymizing overlay network for TCP (The onion router)
License: BSD-3-Clause
++++++ tor-0.4.7.13.tar.gz -> tor-0.4.7.14.tar.gz ++++++
/work/SRC/openSUSE:Factory/tor/tor-0.4.7.13.tar.gz /work/SRC/openSUSE:Factory/.tor.new.32662/tor-0.4.7.14.tar.gz differ: char 13, line 1
++++++ tor-0.4.7.13.tar.gz.sha256sum -> tor-0.4.7.14.tar.gz.sha256sum ++++++
--- /work/SRC/openSUSE:Factory/tor/tor-0.4.7.13.tar.gz.sha256sum 2023-01-14 00:03:40.625871440 +0100
+++ /work/SRC/openSUSE:Factory/.tor.new.32662/tor-0.4.7.14.tar.gz.sha256sum 2023-07-31 15:25:08.959594381 +0200
@@ -1 +1 @@
-2079172cce034556f110048e26083ce9bea751f3154b0ad2809751815b11ea9d tor-0.4.7.13.tar.gz
+a5ac67f6466380fc05e8043d01c581e4e8a2b22fe09430013473e71065e65df8 tor-0.4.7.14.tar.gz
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package aravis for openSUSE:Factory checked in at 2023-07-31 15:25:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/aravis (Old)
and /work/SRC/openSUSE:Factory/.aravis.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "aravis"
Mon Jul 31 15:25:04 2023 rev:4 rq:1101480 version:0.8.27
Changes:
--------
--- /work/SRC/openSUSE:Factory/aravis/aravis.changes 2023-03-31 21:16:07.742555163 +0200
+++ /work/SRC/openSUSE:Factory/.aravis.new.32662/aravis.changes 2023-07-31 15:25:05.375573689 +0200
@@ -1,0 +2,14 @@
+Mon Jul 24 18:39:12 UTC 2023 - Matwey Kornilov <matwey.kornilov(a)gmail.com>
+
+- Update to 0.8.26:
+ * camera: add vendor specific quirks to frame rate
+ * camera: multiple tap helpers
+ * gv: start packet timeout after the first non leader packet
+ * gv: auto packet size fix
+ * gv: add more camera to the legacy endianness mechanism exception list
+ * u3v: fix u3vcp_capability register size
+ * chore: compilation warning fixes
+ * ci: pipeline babysitting
+ * doc: link fix
+
+-------------------------------------------------------------------
Old:
----
aravis-0.8.26.tar.xz
New:
----
aravis-0.8.27.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ aravis.spec ++++++
--- /var/tmp/diff_new_pack.Y3n59R/_old 2023-07-31 15:25:08.347590847 +0200
+++ /var/tmp/diff_new_pack.Y3n59R/_new 2023-07-31 15:25:08.351590870 +0200
@@ -24,7 +24,7 @@
%define devname lib%{name}-%{sorel}-devel
%define typelibname typelib-1_0-Aravis-%{api}
Name: aravis
-Version: 0.8.26
+Version: 0.8.27
Release: 0
Summary: Glib/gobject based library implementing a Genicam interface
License: LGPL-2.1-or-later
++++++ aravis-0.8.26.tar.xz -> aravis-0.8.27.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/.github/workflows/aravis-msvc.yml new/aravis-0.8.27/.github/workflows/aravis-msvc.yml
--- old/aravis-0.8.26/.github/workflows/aravis-msvc.yml 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/.github/workflows/aravis-msvc.yml 2023-06-09 10:47:49.000000000 +0200
@@ -21,7 +21,7 @@
steps:
- name: pip
run: |
- pip install conan
+ pip install "conan<2.0.0"
- name: disable-perl
run: |
rm -r C:\Strawberry\perl
@@ -32,7 +32,7 @@
INPUT_CONANFILE: |
[requires]
libiconv/1.17
- glib/2.74.1
+ glib/2.76.2
#gobject-introspection/1.69.0
gstreamer/1.19.2
gst-plugins-base/1.19.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/NEWS.md new/aravis-0.8.27/NEWS.md
--- old/aravis-0.8.26/NEWS.md 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/NEWS.md 2023-06-09 10:47:49.000000000 +0200
@@ -1,3 +1,16 @@
+Stable release 0.8.27
+=====================
+
+ * camera: add vendor specific quirks to frame rate (durnezj)
+ * camera: multiple tap helpers #745 (Brian)
+ * gv: start packet timeout after the first non leader packet #746 (Brian)
+ * gv: auto packet size fix (Emmanuel)
+ * gv: add more camera to the legacy endianness mechanism exception list (Emmanuel)
+ * u3v: fix u3vcp_cpability register size (Emmanuel)
+ * chore: compilation warning fixes (Marco, Emmanuel)
+ * ci: pipeline babysitting (Emmanuel)
+ * doc: link fix (Henrique)
+
Stable release 0.8.26
=====================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/RELEASING.md new/aravis-0.8.27/RELEASING.md
--- old/aravis-0.8.26/RELEASING.md 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/RELEASING.md 2023-06-09 10:47:49.000000000 +0200
@@ -12,10 +12,10 @@
easily done with a command such as:
```
-git log --stat X.Y.Z..
+git log --stat x.y.z..
```
- where X.Y.Z is the previous release version.
+ where x.y.z is the previous release version.
Summarize major changes briefly in a style similar to other
entries in NEWS. Take special care to note any additions in
@@ -40,13 +40,13 @@
the release directory.
```
-$ git tag -a ARAVIS_X_Y_Z (from whatever branch you're releasing)
-$ git push origin ARAVIS_X_Y_Z
+$ git tag -a x.y.z (from whatever branch you're releasing)
+$ git push origin x.y.z
```
If that fails because someone has pushed since you last updated, then you'll
need to repeat the entire process. Well, update, add a new NEWS entry, and
- make distcheck again.
+ ninja dist again.
* Upload the tarball to github.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/docs/reference/aravis/ethernet.md new/aravis-0.8.27/docs/reference/aravis/ethernet.md
--- old/aravis-0.8.26/docs/reference/aravis/ethernet.md 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/docs/reference/aravis/ethernet.md 2023-06-09 10:47:49.000000000 +0200
@@ -101,3 +101,28 @@
```
sudo setcap cap_net_raw+ep arv-viewer
```
+
+# Legacy endianess mechanism
+
+Some GigEVision devices incorrectly report a Genicam schema version greater or
+equal to 1.1, while implementing the legacy behavior for register access. We
+maintain a list in
+[arvgcport.c](https://github.com/AravisProject/aravis/blob/6f1d65608dcecef2326ae2b3a542f5f59771ea32/src/arvgcport.c#L44)
+which allows to force the use of the legacy endianness mechanism.
+
+The documentation about the legacy endianness mechanism is in the 3.1 appendix
+('Endianess of GigE Vision Cameras') of the GenICam Standard.
+
+There is a chance this part of Aravis is due to a misunderstanding of how a
+GigEVision device is supposed to behave (Remember we can not use the GigEVision
+specification documentation). But until now, there was no evidence in the issue
+reports it is the case. If you think this should be implemented differently,
+don't hesitate to explain your thoughts on Aravis issue report system, or even
+better, to open a pull request. The related Aravis issues are available here:
+[https://github.com/AravisProject/aravis/labels/5. Genicam 1.0 legacy
+mode](https://github.com/AravisProject/aravis/labels/5.%20Genicam%201.0%20legacy%20mode).
+
+Meanwhile, if you want to add a device to the exception list, please open an
+issue on github, giving the vendor name and model name as found in the Genicam
+data of your device, using the `genicam` command of `arv-tool`. They are stored
+in the ModelName and VendorName attributes of the RegisterDescription element.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/docs/reference/aravis/porting-0.8.md new/aravis-0.8.27/docs/reference/aravis/porting-0.8.md
--- old/aravis-0.8.26/docs/reference/aravis/porting-0.8.md 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/docs/reference/aravis/porting-0.8.md 2023-06-09 10:47:49.000000000 +0200
@@ -13,7 +13,7 @@
this opportunity to correctly handle errors.
There is a page explaining Glib errors and how to manage them in the [Glib
-documentation](https://developer.gnome.org/glib/stable/glib-Error-Reporting.html).
+documentation](https://docs.gtk.org/glib/error-reporting.html).
During the camera configuration, in C language it can be somehow cumbersome to
check for errors at each function call. A convenient way to deal with this issue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/meson.build new/aravis-0.8.27/meson.build
--- old/aravis-0.8.26/meson.build 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/meson.build 2023-06-09 10:47:49.000000000 +0200
@@ -1,4 +1,4 @@
-project ('aravis', 'c', 'cpp', version: '0.8.26', meson_version: '>=0.57.0')
+project ('aravis', 'c', 'cpp', version: '0.8.27', meson_version: '>=0.57.0')
gnome = import('gnome')
pkg = import ('pkgconfig')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arv.h new/aravis-0.8.27/src/arv.h
--- old/aravis-0.8.26/src/arv.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arv.h 2023-06-09 10:47:49.000000000 +0200
@@ -85,6 +85,7 @@
#include <arvgcregisternode.h>
#include <arvgcselector.h>
#include <arvgcstring.h>
+#include <arvgcstringnode.h>
#include <arvgcstringregnode.h>
#include <arvgcstructregnode.h>
#include <arvgcstructentrynode.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvcamera.c new/aravis-0.8.27/src/arvcamera.c
--- old/aravis-0.8.26/src/arvcamera.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvcamera.c 2023-06-09 10:47:49.000000000 +0200
@@ -1035,17 +1035,16 @@
g_return_if_fail (ARV_IS_CAMERA (camera));
if (frame_rate <= 0.0) {
- if (arv_camera_is_feature_available (camera, "AcquisitionFrameRateEnable", &local_error)) {
- if (local_error == NULL)
- arv_camera_set_boolean (camera, "AcquisitionFrameRateEnable", FALSE, error);
- else
- g_propagate_error (error, local_error);
+ arv_camera_set_frame_rate_enable(camera, FALSE, &local_error);
+ if (local_error != NULL)
+ {
+ g_propagate_error (error, local_error);
}
return;
}
- /* Ignore the error in order to be able to change the frame rate during the acquisition, as some devices don't
- * allow to change TriggerMode if the acquisition is already started. */
+ /* Ignore the error in order to be able to change the frame rate during the acquisition, as some devices don't
+ * allow to change TriggerMode if the acquisition is already started. */
arv_camera_clear_triggers (camera, NULL);
arv_camera_get_frame_rate_bounds (camera, &minimum, &maximum, &local_error);
@@ -1062,11 +1061,7 @@
switch (priv->vendor) {
case ARV_CAMERA_VENDOR_BASLER:
if (local_error == NULL){
- if (arv_camera_is_feature_available (camera, "AcquisitionFrameRateEnable", &local_error)){
- /* enable is optional on some devices */
- if (local_error == NULL)
- arv_camera_set_boolean (camera, "AcquisitionFrameRateEnable", TRUE, &local_error);
- }
+ arv_camera_set_frame_rate_enable(camera, TRUE, &local_error);
}
if (local_error == NULL)
arv_camera_set_float (camera,
@@ -1104,17 +1099,15 @@
}
break;
case ARV_CAMERA_VENDOR_POINT_GREY_FLIR:
- if (local_error == NULL) {
- if (priv->has_acquisition_frame_rate_enabled)
- arv_camera_set_boolean (camera, "AcquisitionFrameRateEnabled", TRUE, &local_error);
- else
- arv_camera_set_boolean (camera, "AcquisitionFrameRateEnable", TRUE, &local_error);
+ arv_camera_set_frame_rate_enable(camera, TRUE, &local_error);
+ if (local_error == NULL && priv->has_acquisition_frame_rate_auto) {
+ arv_camera_set_string (camera, "AcquisitionFrameRateAuto", "Off", &local_error);
}
- if (local_error == NULL)
- if (priv->has_acquisition_frame_rate_auto)
- arv_camera_set_string (camera, "AcquisitionFrameRateAuto", "Off", &local_error);
- if (local_error == NULL)
+
+ if (local_error == NULL) {
arv_camera_set_float (camera, "AcquisitionFrameRate", frame_rate, &local_error);
+ }
+
break;
case ARV_CAMERA_VENDOR_DALSA:
case ARV_CAMERA_VENDOR_RICOH:
@@ -1122,19 +1115,14 @@
case ARV_CAMERA_VENDOR_MATRIX_VISION:
case ARV_CAMERA_VENDOR_IMPERX:
case ARV_CAMERA_VENDOR_UNKNOWN:
- if (local_error == NULL) {
- if (arv_camera_is_feature_available (camera, "AcquisitionFrameRateEnable", &local_error)) {
- if (local_error == NULL)
- arv_camera_set_boolean (camera, "AcquisitionFrameRateEnable", TRUE, &local_error);
- }
- }
- if (local_error == NULL)
- arv_camera_set_float (camera,
- priv->has_acquisition_frame_rate ?
- "AcquisitionFrameRate":
- "AcquisitionFrameRateAbs", frame_rate, &local_error);
- break;
- }
+ arv_camera_set_frame_rate_enable(camera, TRUE, &local_error);
+ if (local_error == NULL)
+ arv_camera_set_float (camera,
+ priv->has_acquisition_frame_rate ?
+ "AcquisitionFrameRate":
+ "AcquisitionFrameRateAbs", frame_rate, &local_error);
+ break;
+ }
if (local_error != NULL)
g_propagate_error (error, local_error);
@@ -1271,6 +1259,66 @@
}
}
+/*
+* arv_camera_set_frame_rate_enable:
+* @camera: an #ArvCamera
+* @enable: true to enable, false to disable
+* @error: a #GError placeholer, %NULL to ignore
+*
+* Configures whether to enable the upper frame rate limit set by #arv_camera_set_frame_rate.
+* Implements vendor specific quirks if needed.
+* Since: 0.8.26
+*/
+void
+arv_camera_set_frame_rate_enable(ArvCamera *camera, gboolean enable, GError **error)
+{
+ ArvCameraPrivate *priv = arv_camera_get_instance_private (camera);
+ GError *local_error = NULL;
+
+ g_return_if_fail (ARV_IS_CAMERA (camera));
+
+ switch (priv->vendor) {
+ case ARV_CAMERA_VENDOR_BASLER:
+ if (local_error == NULL){
+ if (arv_camera_is_feature_available (camera, "AcquisitionFrameRateEnable", &local_error)){
+ /* enable is optional on some devices */
+ if (local_error == NULL)
+ arv_camera_set_boolean (camera, "AcquisitionFrameRateEnable", enable, &local_error);
+ }
+ }
+ break;
+ case ARV_CAMERA_VENDOR_POINT_GREY_FLIR:
+ if (local_error == NULL) {
+ if (priv->has_acquisition_frame_rate_enabled)
+ arv_camera_set_boolean (camera, "AcquisitionFrameRateEnabled", enable, &local_error);
+ else
+ arv_camera_set_boolean (camera, "AcquisitionFrameRateEnable", enable, &local_error);
+ }
+ break;
+ case ARV_CAMERA_VENDOR_DALSA:
+ case ARV_CAMERA_VENDOR_RICOH:
+ case ARV_CAMERA_VENDOR_XIMEA:
+ case ARV_CAMERA_VENDOR_MATRIX_VISION:
+ case ARV_CAMERA_VENDOR_IMPERX:
+ case ARV_CAMERA_VENDOR_UNKNOWN:
+ if (local_error == NULL) {
+ if (arv_camera_is_feature_available (camera, "AcquisitionFrameRateEnable", &local_error)) {
+ if (local_error == NULL)
+ arv_camera_set_boolean (camera, "AcquisitionFrameRateEnable", TRUE, &local_error);
+ }
+ }
+ break;
+ case ARV_CAMERA_VENDOR_PROSILICA:
+ case ARV_CAMERA_VENDOR_TIS:
+ default:
+ break; /* No specific frame rate enable code */
+ }
+
+ if (local_error != NULL) {
+ g_propagate_error (error, local_error);
+ }
+}
+
/**
* arv_camera_set_trigger:
* @camera: a #ArvCamera
@@ -1822,6 +1870,45 @@
}
/**
+ * arv_camera_select_gain:
+ * @camera: a #ArvCamera
+ * @selector: gain selector
+ * @error: a #GError placeholder, %NULL to ignore
+ *
+ * Configures Gain Selector feature.
+ *
+ * Since: 0.8.27
+ **/
+
+void
+arv_camera_select_gain (ArvCamera *camera, const char *selector, GError **error)
+{
+ arv_camera_set_string (camera, "GainSelector", selector, error);
+}
+
+/**
+ * arv_camera_dup_available_gains:
+ * @camera: a #ArvCamera
+ * @n_selectors: (out): number of different gain selectors
+ * @error: a #GError placeholder, %NULL to ignore
+ *
+ * Retrieves the list of all available gain selectors as strings.
+ *
+ * Returns: (array length=n_selectors) (transfer container): a newly allocated array of strings, to be freed after use with
+ * g_free().
+ *
+ * Since: 0.8.27
+ */
+
+const char **
+arv_camera_dup_available_gains (ArvCamera *camera, guint *n_selectors, GError **error)
+{
+ g_return_val_if_fail (ARV_IS_CAMERA (camera), NULL);
+
+ return arv_camera_dup_available_enumerations_as_strings (camera, "GainSelector", n_selectors, error);
+}
+
+/**
* arv_camera_is_black_level_available:
* @camera: a #ArvCamera
* @error: a #GError placeholder, %NULL to ignore
@@ -1897,6 +1984,45 @@
}
/**
+ * arv_camera_select_black_level:
+ * @camera: a #ArvCamera
+ * @selector: black level selection
+ * @error: a #GError placeholder, %NULL to ignore
+ *
+ * Configures Black Level Selector feature.
+ *
+ * Since: 0.8.27
+ **/
+
+void
+arv_camera_select_black_level (ArvCamera *camera, const char *selector, GError **error)
+{
+ arv_camera_set_string (camera, "BlackLevelSelector", selector, error);
+}
+
+/**
+ * arv_camera_dup_available_black_levels:
+ * @camera: a #ArvCamera
+ * @n_selectors: (out): number of different black level selectors
+ * @error: a #GError placeholder, %NULL to ignore
+ *
+ * Retrieves the list of all available black level selectors as strings.
+ *
+ * Returns: (array length=n_selectors) (transfer container): a newly allocated array of strings, to be freed after use with
+ * g_free().
+ *
+ * Since: 0.8.27
+ */
+
+const char **
+arv_camera_dup_available_black_levels (ArvCamera *camera, guint *n_selectors, GError **error)
+{
+ g_return_val_if_fail (ARV_IS_CAMERA (camera), NULL);
+
+ return arv_camera_dup_available_enumerations_as_strings (camera, "BlackLevelSelector", n_selectors, error);
+}
+
+/**
* arv_camera_get_black_level_bounds:
* @camera: a #ArvCamera
* @min: (out): minimum blacklevel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvcamera.h new/aravis-0.8.27/src/arvcamera.h
--- old/aravis-0.8.26/src/arvcamera.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvcamera.h 2023-06-09 10:47:49.000000000 +0200
@@ -110,6 +110,7 @@
ARV_API void arv_camera_set_frame_count (ArvCamera *camera, gint64 frame_count, GError **error);
ARV_API gint64 arv_camera_get_frame_count (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_frame_count_bounds (ArvCamera *camera, gint64 *min, gint64 *max, GError **error);
+ARV_API void arv_camera_set_frame_rate_enable (ArvCamera *camera, gboolean enable, GError **error);
ARV_API gboolean arv_camera_is_frame_rate_available (ArvCamera *camera, GError **error);
@@ -140,6 +141,8 @@
ARV_API gboolean arv_camera_is_gain_available (ArvCamera *camera, GError **error);
ARV_API gboolean arv_camera_is_gain_auto_available (ArvCamera *camera, GError **error);
+ARV_API void arv_camera_select_gain (ArvCamera *camera, const char *selector, GError **error);
+ARV_API const char ** arv_camera_dup_available_gains (ArvCamera *camera, guint *n_selectors, GError **error);
ARV_API void arv_camera_set_gain (ArvCamera *camera, double gain, GError **error);
ARV_API double arv_camera_get_gain (ArvCamera *camera, GError **error);
@@ -149,6 +152,8 @@
ARV_API gboolean arv_camera_is_black_level_available (ArvCamera *camera, GError **error);
ARV_API gboolean arv_camera_is_black_level_auto_available(ArvCamera *camera, GError **error);
+ARV_API void arv_camera_select_black_level (ArvCamera *camera, const char *selector, GError **error);
+ARV_API const char ** arv_camera_dup_available_black_levels (ArvCamera *camera, guint *n_selectors, GError **error);
ARV_API void arv_camera_set_black_level (ArvCamera *camera, double blacklevel, GError **error);
ARV_API double arv_camera_get_black_level (ArvCamera *camera, GError **error);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvdebug.c new/aravis-0.8.27/src/arvdebug.c
--- old/aravis-0.8.26/src/arvdebug.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvdebug.c 2023-06-09 10:47:49.000000000 +0200
@@ -264,7 +264,6 @@
GEnumClass *debug_level_class = g_type_class_ref (ARV_TYPE_DEBUG_LEVEL);
GString *string = g_string_new ("");
unsigned int i;
- char *str;
g_string_append (string, "Debug categories:\n");
for (i = 0; i < ARV_DEBUG_CATEGORY_N_ELEMENTS; i++) {
@@ -285,10 +284,7 @@
g_type_class_unref (debug_level_class);
- str = string->str;
- g_string_free (string, FALSE);
-
- return str;
+ return arv_g_string_free_and_steal(string);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvenums.h new/aravis-0.8.27/src/arvenums.h
--- old/aravis-0.8.26/src/arvenums.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvenums.h 2023-06-09 10:47:49.000000000 +0200
@@ -1,6 +1,6 @@
/* Aravis - Digital camera library
*
- * Copyright © 2009-2022 Emmanuel Pacaud
+ * Copyright © 2009-2023 Emmanuel Pacaud
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgc.c new/aravis-0.8.27/src/arvgc.c
--- old/aravis-0.8.26/src/arvgc.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgc.c 2023-06-09 10:47:49.000000000 +0200
@@ -256,6 +256,12 @@
node = arv_gc_invalidator_node_new ();
else if (strcmp (tag_name, "Streamable") == 0)
node = arv_gc_property_node_new_streamable ();
+ else if (strcmp (tag_name, "IsDeprecated") == 0)
+ node = arv_gc_property_node_new_is_deprecated ();
+ else if (strcmp (tag_name, "pAlias") == 0)
+ node = arv_gc_property_node_new_p_alias ();
+ else if (strcmp (tag_name, "pCastAlias") == 0)
+ node = arv_gc_property_node_new_p_cast_alias ();
else if (strcmp (tag_name, "CommandValue") == 0)
node = arv_gc_property_node_new_command_value ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgcfeaturenode.c new/aravis-0.8.27/src/arvgcfeaturenode.c
--- old/aravis-0.8.26/src/arvgcfeaturenode.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgcfeaturenode.c 2023-06-09 10:47:49.000000000 +0200
@@ -56,6 +56,9 @@
ArvGcPropertyNode *is_locked;
ArvGcPropertyNode *imposed_access_mode;
ArvGcPropertyNode *streamable;
+ ArvGcPropertyNode *is_deprecated;
+ ArvGcPropertyNode *alias;
+ ArvGcPropertyNode *cast_alias;
guint64 change_count;
@@ -106,7 +109,16 @@
priv->imposed_access_mode = property_node;
break;
case ARV_GC_PROPERTY_NODE_TYPE_STREAMABLE:
- priv->streamable = property_node; /* TODO */
+ priv->streamable = property_node; /* TODO */
+ break;
+ case ARV_GC_PROPERTY_NODE_TYPE_IS_DEPRECATED:
+ priv->is_deprecated = property_node; /* TODO */
+ break;
+ case ARV_GC_PROPERTY_NODE_TYPE_P_ALIAS:
+ priv->alias = property_node; /* TODO */
+ break;
+ case ARV_GC_PROPERTY_NODE_TYPE_P_CAST_ALIAS:
+ priv->alias = property_node; /* TODO */
break;
default:
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgcport.c new/aravis-0.8.27/src/arvgcport.c
--- old/aravis-0.8.26/src/arvgcport.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgcport.c 2023-06-09 10:47:49.000000000 +0200
@@ -41,11 +41,31 @@
const char *model_selection;
} ArvGvLegacyInfos;
+/*
+ * Some GigEVision devices incorrectly report a Genicam schema version greater or equal to 1.1, while implementing the
+ * legacy behavior for register access. This list allows to force the use of the legacy endianness mechanism. Vendor and
+ * model listed below are those found in the Genicam XML data, which can be obtained using the `genicam` command of
+ * `arv-tool`. They are stored in the ModelName and VendorName attributes of the RegisterDescription element.
+ *
+ * The documentation about the legacy endianness mechanism is in the 3.1 appendix ('Endianess of GigE Vision Cameras')
+ * of the GenICam Standard.
+ *
+ * There is a chance this part of Aravis is due to a misunderstanding of how a GigEVision device is supposed to behave
+ * (Remember we can not use the GigEVision specification documentation). But until now, there was no evidence in the
+ * issue reports it is the case. If you think this should be implemented differently, don't hesitate to explain your
+ * thoughts on Aravis issue report system, or even better, to open a pull request. The related Aravis issues are
+ * available here:
+ *
+ * https://github.com/AravisProject/aravis/labels/5.%20Genicam%201.0%20legacy%…
+ */
+
static ArvGvLegacyInfos arv_gc_port_legacy_infos[] = {
{ .vendor_selection = "Imperx", .model_selection = "IpxGEVCamera"},
{ .vendor_selection = "KowaOptronics", .model_selection = "SC130ET3"},
+ { .vendor_selection = "NIT", .model_selection = "Tachyon16k"},
{ .vendor_selection = "PleoraTechnologiesInc", .model_selection = "iPORTCLGigE"},
{ .vendor_selection = "PleoraTechnologiesInc", .model_selection = "NTxGigE"},
+ { .vendor_selection = "TeledyneDALSA", .model_selection = "ICE"},
{ .vendor_selection = "Sony", .model_selection = "XCG_CGSeries"},
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgcpropertynode.c new/aravis-0.8.27/src/arvgcpropertynode.c
--- old/aravis-0.8.26/src/arvgcpropertynode.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgcpropertynode.c 2023-06-09 10:47:49.000000000 +0200
@@ -36,7 +36,7 @@
#include <arvgcstring.h>
#include <arvgc.h>
#include <arvdomtext.h>
-#include <arvmisc.h>
+#include <arvmiscprivate.h>
#include <arvdebugprivate.h>
#include <arvenumtypes.h>
#include <string.h>
@@ -242,8 +242,7 @@
iter = arv_dom_node_get_next_sibling (iter))
g_string_append (string, arv_dom_character_data_get_data (ARV_DOM_CHARACTER_DATA (iter)));
g_free (priv->value_data);
- priv->value_data = string->str;
- g_string_free (string, FALSE);
+ priv->value_data = arv_g_string_free_and_steal(string);
priv->value_data_up_to_date = TRUE;
}
@@ -1054,6 +1053,24 @@
return arv_gc_property_node_new (ARV_GC_PROPERTY_NODE_TYPE_STREAMABLE);
}
+ArvGcNode *
+arv_gc_property_node_new_is_deprecated (void)
+{
+ return arv_gc_property_node_new (ARV_GC_PROPERTY_NODE_TYPE_IS_DEPRECATED);
+}
+
+ArvGcNode *
+arv_gc_property_node_new_p_alias (void)
+{
+ return arv_gc_property_node_new (ARV_GC_PROPERTY_NODE_TYPE_P_ALIAS);
+}
+
+ArvGcNode *
+arv_gc_property_node_new_p_cast_alias (void)
+{
+ return arv_gc_property_node_new (ARV_GC_PROPERTY_NODE_TYPE_P_CAST_ALIAS);
+}
+
static void
_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgcpropertynode.h new/aravis-0.8.27/src/arvgcpropertynode.h
--- old/aravis-0.8.26/src/arvgcpropertynode.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgcpropertynode.h 2023-06-09 10:47:49.000000000 +0200
@@ -74,6 +74,7 @@
ARV_GC_PROPERTY_NODE_TYPE_VALUE_INDEXED,
ARV_GC_PROPERTY_NODE_TYPE_VALUE_DEFAULT,
ARV_GC_PROPERTY_NODE_TYPE_STREAMABLE,
+ ARV_GC_PROPERTY_NODE_TYPE_IS_DEPRECATED,
ARV_GC_PROPERTY_NODE_TYPE_P_UNKNONW = 1000,
ARV_GC_PROPERTY_NODE_TYPE_P_FEATURE,
@@ -93,7 +94,9 @@
ARV_GC_PROPERTY_NODE_TYPE_P_INVALIDATOR,
ARV_GC_PROPERTY_NODE_TYPE_P_COMMAND_VALUE,
ARV_GC_PROPERTY_NODE_TYPE_P_VALUE_INDEXED,
- ARV_GC_PROPERTY_NODE_TYPE_P_VALUE_DEFAULT
+ ARV_GC_PROPERTY_NODE_TYPE_P_VALUE_DEFAULT,
+ ARV_GC_PROPERTY_NODE_TYPE_P_ALIAS,
+ ARV_GC_PROPERTY_NODE_TYPE_P_CAST_ALIAS
} ArvGcPropertyNodeType;
#define ARV_TYPE_GC_PROPERTY_NODE (arv_gc_property_node_get_type ())
@@ -155,6 +158,9 @@
ARV_API ArvGcNode * arv_gc_property_node_new_value_default (void);
ARV_API ArvGcNode * arv_gc_property_node_new_p_value_default (void);
ARV_API ArvGcNode * arv_gc_property_node_new_streamable (void);
+ARV_API ArvGcNode * arv_gc_property_node_new_is_deprecated (void);
+ARV_API ArvGcNode * arv_gc_property_node_new_p_alias (void);
+ARV_API ArvGcNode * arv_gc_property_node_new_p_cast_alias (void);
ARV_API const char * arv_gc_property_node_get_name (ArvGcPropertyNode *node);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgvcp.c new/aravis-0.8.27/src/arvgvcp.c
--- old/aravis-0.8.26/src/arvgvcp.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgvcp.c 2023-06-09 10:47:49.000000000 +0200
@@ -27,6 +27,7 @@
#include <arvgvcpprivate.h>
#include <arvgvspprivate.h>
+#include <arvmiscprivate.h>
#include <arvenumtypes.h>
#include <arvenumtypesprivate.h>
#include <string.h>
@@ -487,7 +488,6 @@
arv_gvcp_packet_flags_to_string_new (ArvGvcpCommand command, guint8 flags)
{
GString *string = g_string_new ("");
- char *buffer = NULL;
unsigned i;
for (i = 0; i < 8; i++) {
@@ -518,11 +518,7 @@
if (string->len == 0)
g_string_append (string, "none");
- buffer = string->str;
-
- g_string_free (string, FALSE);
-
- return buffer;
+ return arv_g_string_free_and_steal(string);
}
/**
@@ -572,7 +568,6 @@
arv_gvcp_packet_to_string (const ArvGvcpPacket *packet)
{
GString *string;
- char *c_string;
char *data;
int packet_size;
guint32 value;
@@ -663,11 +658,7 @@
arv_g_string_append_hex_dump (string, packet, packet_size);
- c_string = string->str;
-
- g_string_free (string, FALSE);
-
- return c_string;
+ return arv_g_string_free_and_steal(string);
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgvdevice.c new/aravis-0.8.27/src/arvgvdevice.c
--- old/aravis-0.8.26/src/arvgvdevice.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgvdevice.c 2023-06-09 10:47:49.000000000 +0200
@@ -728,19 +728,20 @@
do {
if (current_size == last_size ||
- min_size + inc >= max_size)
+ min_size + inc > max_size)
break;
last_size = current_size;
- arv_info_device ("[GvDevice::auto_packet_size] Try packet size = %d (min: %d - max: %d - inc: %d)",
- current_size, min_size, max_size, inc);
arv_device_set_integer_feature_value (device, "ArvGevSCPSPacketSize", current_size, NULL);
current_size = arv_device_get_integer_feature_value (device, "ArvGevSCPSPacketSize", &local_error);
if (local_error != NULL)
break;
+ arv_info_device ("[GvDevice::auto_packet_size] Try packet size = %d (%d - min: %d - max: %d - inc: %d)",
+ current_size, last_size, min_size, max_size, inc);
+
success = test_packet_check (device, &poll_fd, socket, buffer, max_size, current_size);
if (success) {
@@ -753,7 +754,7 @@
max_size = current_size;
}
- current_size = min_size + (((max_size - min_size) / 2 + 1) / inc) * inc;
+ current_size = min_size + (((max_size - min_size) / 2) / inc) * inc;
} while (TRUE);
if (local_error == NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgvsp.c new/aravis-0.8.27/src/arvgvsp.c
--- old/aravis-0.8.26/src/arvgvsp.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgvsp.c 2023-06-09 10:47:49.000000000 +0200
@@ -26,7 +26,7 @@
*/
#include <arvdebug.h>
-#include <arvmisc.h>
+#include <arvmiscprivate.h>
#include <arvenumtypes.h>
#include <arvgvspprivate.h>
#include <arvenumtypesprivate.h>
@@ -173,7 +173,6 @@
guint part_id;
ptrdiff_t offset;
GString *string;
- char *c_string;
string = g_string_new ("");
@@ -275,11 +274,7 @@
break;
}
- c_string = string->str;
-
- g_string_free (string, FALSE);
-
- return c_string;
+ return arv_g_string_free_and_steal(string);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgvspprivate.h new/aravis-0.8.27/src/arvgvspprivate.h
--- old/aravis-0.8.26/src/arvgvspprivate.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgvspprivate.h 2023-06-09 10:47:49.000000000 +0200
@@ -270,12 +270,12 @@
arv_gvsp_packet_get_content_type (const ArvGvspPacket *packet)
{
if (arv_gvsp_packet_has_extended_ids (packet)) {
- ArvGvspExtendedHeader *header = (void *) &packet->header;
+ ArvGvspExtendedHeader *header = (ArvGvspExtendedHeader *) &packet->header;
return (ArvGvspContentType) ((g_ntohl (header->packet_infos) & ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_MASK) >>
ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_POS);
} else {
- ArvGvspHeader *header = (void *) &packet->header;
+ ArvGvspHeader *header = (ArvGvspHeader *) &packet->header;
return (ArvGvspContentType) ((g_ntohl (header->packet_infos) & ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_MASK) >>
ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_POS);
@@ -327,11 +327,11 @@
arv_gvsp_packet_get_packet_id (const ArvGvspPacket *packet)
{
if (arv_gvsp_packet_has_extended_ids (packet)) {
- ArvGvspExtendedHeader *header = (void *) &packet->header;
+ ArvGvspExtendedHeader *header = (ArvGvspExtendedHeader *) &packet->header;
return g_ntohl (header->packet_id);
} else {
- ArvGvspHeader *header = (void *) &packet->header;
+ ArvGvspHeader *header = (ArvGvspHeader *) &packet->header;
return g_ntohl (header->packet_infos) & ARV_GVSP_PACKET_ID_MASK;
}
@@ -341,11 +341,11 @@
arv_gvsp_packet_get_frame_id (const ArvGvspPacket *packet)
{
if (arv_gvsp_packet_has_extended_ids (packet)) {
- ArvGvspExtendedHeader *header = (void *) &packet->header;
+ ArvGvspExtendedHeader *header = (ArvGvspExtendedHeader *) &packet->header;
return GUINT64_FROM_BE(header->frame_id);
} else {
- ArvGvspHeader *header = (void *) &packet->header;
+ ArvGvspHeader *header = (ArvGvspHeader *) &packet->header;
return g_ntohs (header->frame_id);
}
@@ -355,11 +355,11 @@
arv_gvsp_packet_get_data (const ArvGvspPacket *packet)
{
if (arv_gvsp_packet_has_extended_ids (packet)) {
- ArvGvspExtendedHeader *header = (void *) &packet->header;
+ ArvGvspExtendedHeader *header = (ArvGvspExtendedHeader *) &packet->header;
return &header->data;
} else {
- ArvGvspHeader *header = (void *) &packet->header;
+ ArvGvspHeader *header = (ArvGvspHeader *) &packet->header;
return &header->data;
}
@@ -372,14 +372,14 @@
ArvGvspLeader *leader;
guint16 payload_type;
- leader = arv_gvsp_packet_get_data (packet);
+ leader = (ArvGvspLeader *) arv_gvsp_packet_get_data (packet);
payload_type = g_ntohs (leader->payload_type);
if (has_chunks != NULL)
*has_chunks = ((payload_type & 0x4000) != 0 ||
(payload_type == 0x0004));
- return payload_type & 0x3fff;
+ return (ArvBufferPayloadType) (payload_type & 0x3fff);
}
return ARV_BUFFER_PAYLOAD_TYPE_UNKNOWN;
@@ -391,7 +391,7 @@
if (G_LIKELY (arv_gvsp_packet_get_content_type (packet) == ARV_GVSP_CONTENT_TYPE_LEADER)) {
ArvGvspLeader *leader;
- leader = arv_gvsp_packet_get_data (packet);
+ leader = (ArvGvspLeader *) arv_gvsp_packet_get_data (packet);
return ((guint64) g_ntohl (leader->timestamp_high) << 32) | g_ntohl (leader->timestamp_low);
}
@@ -404,10 +404,10 @@
{
if (arv_gvsp_leader_packet_get_buffer_payload_type (packet, NULL) == ARV_BUFFER_PAYLOAD_TYPE_MULTIPART) {
if (arv_gvsp_packet_has_extended_ids (packet)) {
- ArvGvspExtendedHeader *header = (void *) &packet->header;
+ ArvGvspExtendedHeader *header = (ArvGvspExtendedHeader *) &packet->header;
return (g_ntohl (header->packet_infos) & ARV_GVSP_PACKET_INFOS_N_PARTS_MASK);
} else {
- ArvGvspHeader *header = (void *) &packet->header;
+ ArvGvspHeader *header = (ArvGvspHeader *) &packet->header;
return (g_ntohl (header->packet_infos) & ARV_GVSP_PACKET_INFOS_N_PARTS_MASK);
}
}
@@ -437,11 +437,11 @@
if (part_id >= n_parts)
return FALSE;
- leader = arv_gvsp_packet_get_data (packet);
+ leader = (ArvGvspMultipartLeader *) arv_gvsp_packet_get_data (packet);
infos = &leader->parts[part_id];
*purpose_id = g_ntohs(infos->data_purpose_id);
- *data_type = g_ntohs (infos->data_type);
+ *data_type = (ArvBufferPartDataType) g_ntohs (infos->data_type);
*size = g_ntohl (infos->part_length_low) + (((guint64) g_ntohs (infos->part_length_high)) << 32);
*pixel_format = g_ntohl (infos->pixel_format);
*width = g_ntohl (infos->width);
@@ -466,7 +466,7 @@
if (part_id >= n_parts)
return 0;
- leader = arv_gvsp_packet_get_data (packet);
+ leader = (ArvGvspMultipartLeader *) arv_gvsp_packet_get_data (packet);
infos = &leader->parts[part_id];
return g_ntohl (infos->part_length_low) + (((guint64) g_ntohs (infos->part_length_high)) << 32);
@@ -487,7 +487,7 @@
payload_type == ARV_BUFFER_PAYLOAD_TYPE_EXTENDED_CHUNK_DATA) {
ArvGvspImageLeader *leader;
- leader = arv_gvsp_packet_get_data (packet);
+ leader = (ArvGvspImageLeader *) arv_gvsp_packet_get_data (packet);
*pixel_format = g_ntohl (leader->infos.pixel_format);
*width = g_ntohl (leader->infos.width);
@@ -526,7 +526,7 @@
return FALSE;
}
- multipart = arv_gvsp_packet_get_data(packet);
+ multipart = (ArvGvspMultipart *) arv_gvsp_packet_get_data(packet);
*part_id = multipart->part_id;
*offset = ( (guint64) g_ntohs(multipart->offset_high) << 32) + g_ntohl(multipart->offset_low);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvgvstream.c new/aravis-0.8.27/src/arvgvstream.c
--- old/aravis-0.8.26/src/arvgvstream.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvgvstream.c 2023-06-09 10:47:49.000000000 +0200
@@ -814,6 +814,10 @@
}
if (can_close_frame &&
+ /* Do not timeout on the most recent frame if the LEADER packet is so far the ONLY
+ * valid packet received. This is needed by some devices sending the leader packet early, at
+ * acquisition start. */
+ (frame->frame_id != thread_data->last_frame_id || frame->last_valid_packet != 0) &&
time_us - frame->last_packet_time_us >= thread_data->frame_retention_us) {
frame->buffer->priv->status = ARV_BUFFER_STATUS_TIMEOUT;
arv_warning_stream_thread ("[GvStream::check_frame_completion] Timeout for frame %"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvmisc.c new/aravis-0.8.27/src/arvmisc.c
--- old/aravis-0.8.26/src/arvmisc.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvmisc.c 2023-06-09 10:47:49.000000000 +0200
@@ -279,7 +279,6 @@
int i, j, bin_max;
gboolean max_found = FALSE;
GString *string;
- char *str;
g_return_val_if_fail (histogram != NULL, NULL);
@@ -369,10 +368,7 @@
g_string_append_printf (string, ":%12llu", (unsigned long long) histogram->variables[j].counter);
}
- str = string->str;
- g_string_free (string, FALSE);
-
- return str;
+ return arv_g_string_free_and_steal(string);
}
ArvValue *
@@ -1158,3 +1154,17 @@
return regex;
}
+
+char *
+arv_g_string_free_and_steal (GString *string)
+{
+#if GLIB_CHECK_VERSION(2,75,4)
+ return g_string_free_and_steal(string);
+#else
+ char *buffer = string->str;
+
+ g_string_free (string, FALSE);
+
+ return buffer;
+#endif
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvmiscprivate.h new/aravis-0.8.27/src/arvmiscprivate.h
--- old/aravis-0.8.26/src/arvmiscprivate.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvmiscprivate.h 2023-06-09 10:47:49.000000000 +0200
@@ -66,6 +66,10 @@
gboolean arv_value_holds_int64 (ArvValue *value);
double arv_value_holds_double (ArvValue *value);
+/* Compatibility functions */
+
+char * arv_g_string_free_and_steal (GString *string) G_GNUC_WARN_UNUSED_RESULT;
+
/* private, but used by tests */
ARV_API gboolean arv_parse_genicam_url (const char *url, gssize url_length,
char **scheme, char **authority, char **path,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvuvcp.c new/aravis-0.8.27/src/arvuvcp.c
--- old/aravis-0.8.26/src/arvuvcp.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvuvcp.c 2023-06-09 10:47:49.000000000 +0200
@@ -25,6 +25,7 @@
* @short_description: USB3Vision control packet handling
*/
+#include <arvmiscprivate.h>
#include <arvuvcpprivate.h>
#include <arvenumtypesprivate.h>
#include <arvdebug.h>
@@ -148,7 +149,6 @@
{
ArvUvcpCommand command;
GString *string;
- char *c_string;
int packet_size;
guint64 value;
@@ -206,11 +206,7 @@
arv_g_string_append_hex_dump (string, packet, packet_size);
- c_string = string->str;
-
- g_string_free (string, FALSE);
-
- return c_string;
+ return arv_g_string_free_and_steal(string);
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvuvcpprivate.h new/aravis-0.8.27/src/arvuvcpprivate.h
--- old/aravis-0.8.26/src/arvuvcpprivate.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvuvcpprivate.h 2023-06-09 10:47:49.000000000 +0200
@@ -314,7 +314,7 @@
arv_uvcp_packet_get_flags (const ArvUvcpPacket *packet)
{
if (packet == NULL)
- return 0;
+ return (ArvUvcpFlags) 0;
return (ArvUvcpFlags) GUINT16_FROM_LE (packet->header.flags);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvuvdevice.c new/aravis-0.8.27/src/arvuvdevice.c
--- old/aravis-0.8.26/src/arvuvdevice.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvuvdevice.c 2023-06-09 10:47:49.000000000 +0200
@@ -462,7 +462,7 @@
guint64 device_capability;
guint32 max_cmd_transfer;
guint32 max_ack_transfer;
- guint32 u3vcp_capability;
+ guint64 u3vcp_capability;
guint64 sirm_offset;
guint32 si_info;
guint32 si_control;
@@ -493,10 +493,14 @@
manufacturer[63] = 0;
arv_info_device ("MANUFACTURER_NAME = '%s'", manufacturer);
- success = success && arv_device_read_memory (device, ARV_ABRM_SBRM_ADDRESS, sizeof (guint64), &offset, NULL);
- success = success && arv_device_read_memory (device, ARV_ABRM_MAX_DEVICE_RESPONSE_TIME, sizeof (guint32), &response_time, NULL);
- success = success && arv_device_read_memory (device, ARV_ABRM_DEVICE_CAPABILITY, sizeof (guint64), &device_capability, NULL);
- success = success && arv_device_read_memory (device, ARV_ABRM_MANIFEST_TABLE_ADDRESS, sizeof (guint64), &manifest_table_address, NULL);
+ success = success && arv_device_read_memory (device, ARV_ABRM_SBRM_ADDRESS,
+ sizeof (offset), &offset, NULL);
+ success = success && arv_device_read_memory (device, ARV_ABRM_MAX_DEVICE_RESPONSE_TIME,
+ sizeof (response_time), &response_time, NULL);
+ success = success && arv_device_read_memory (device, ARV_ABRM_DEVICE_CAPABILITY,
+ sizeof (device_capability), &device_capability, NULL);
+ success = success && arv_device_read_memory (device, ARV_ABRM_MANIFEST_TABLE_ADDRESS,
+ sizeof (manifest_table_address), &manifest_table_address, NULL);
if (!success) {
arv_warning_device ("[UvDevice::_bootstrap] Error during memory read");
return FALSE;
@@ -509,16 +513,20 @@
priv->timeout_ms = MAX (ARV_UVCP_DEFAULT_RESPONSE_TIME_MS, response_time);
- success = success && arv_device_read_memory (device, offset + ARV_SBRM_U3VCP_CAPABILITY, sizeof (guint32), &u3vcp_capability, NULL);
- success = success && arv_device_read_memory (device, offset + ARV_SBRM_MAX_CMD_TRANSFER, sizeof (guint32), &max_cmd_transfer, NULL);
- success = success && arv_device_read_memory (device, offset + ARV_SBRM_MAX_ACK_TRANSFER, sizeof (guint32), &max_ack_transfer, NULL);
- success = success && arv_device_read_memory (device, offset + ARV_SBRM_SIRM_ADDRESS, sizeof (guint64), &sirm_offset, NULL);
+ success = success && arv_device_read_memory (device, offset + ARV_SBRM_U3VCP_CAPABILITY,
+ sizeof (u3vcp_capability), &u3vcp_capability, NULL);
+ success = success && arv_device_read_memory (device, offset + ARV_SBRM_MAX_CMD_TRANSFER,
+ sizeof (max_cmd_transfer), &max_cmd_transfer, NULL);
+ success = success && arv_device_read_memory (device, offset + ARV_SBRM_MAX_ACK_TRANSFER,
+ sizeof (max_ack_transfer), &max_ack_transfer, NULL);
+ success = success && arv_device_read_memory (device, offset + ARV_SBRM_SIRM_ADDRESS,
+ sizeof (sirm_offset), &sirm_offset, NULL);
if (!success) {
arv_warning_device ("[UvDevice::_bootstrap] Error during memory read");
return FALSE;
}
- arv_info_device ("U3VCP_CAPABILITY = 0x%08x", u3vcp_capability);
+ arv_info_device ("U3VCP_CAPABILITY = 0x%016" G_GINT64_MODIFIER "x", u3vcp_capability);
arv_info_device ("MAX_CMD_TRANSFER = 0x%08x", max_cmd_transfer);
arv_info_device ("MAX_ACK_TRANSFER = 0x%08x", max_ack_transfer);
arv_info_device ("SIRM_OFFSET = 0x%016" G_GINT64_MODIFIER "x", sirm_offset);
@@ -526,36 +534,49 @@
priv->cmd_packet_size_max = MIN (priv->cmd_packet_size_max, max_cmd_transfer);
priv->ack_packet_size_max = MIN (priv->ack_packet_size_max, max_ack_transfer);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_INFO, sizeof (si_info), &si_info, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_CONTROL, sizeof (si_control), &si_control, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_REQ_PAYLOAD_SIZE, sizeof (si_req_payload_size), &si_req_payload_size, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_REQ_LEADER_SIZE, sizeof (si_req_leader_size), &si_req_leader_size, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_REQ_TRAILER_SIZE, sizeof (si_req_trailer_size), &si_req_trailer_size, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_MAX_LEADER_SIZE, sizeof (si_max_leader_size), &si_max_leader_size, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_PAYLOAD_SIZE, sizeof (si_payload_size), &si_payload_size, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_PAYLOAD_COUNT, sizeof (si_payload_count), &si_payload_count, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_TRANSFER1_SIZE, sizeof (si_transfer1_size), &si_transfer1_size, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_TRANSFER2_SIZE, sizeof (si_transfer2_size), &si_transfer2_size, NULL);
- success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_MAX_TRAILER_SIZE, sizeof (si_max_trailer_size), &si_max_trailer_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_INFO,
+ sizeof (si_info), &si_info, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_CONTROL,
+ sizeof (si_control), &si_control, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_REQ_PAYLOAD_SIZE,
+ sizeof (si_req_payload_size), &si_req_payload_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_REQ_LEADER_SIZE,
+ sizeof (si_req_leader_size), &si_req_leader_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_REQ_TRAILER_SIZE,
+ sizeof (si_req_trailer_size), &si_req_trailer_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_MAX_LEADER_SIZE,
+ sizeof (si_max_leader_size), &si_max_leader_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_PAYLOAD_SIZE,
+ sizeof (si_payload_size), &si_payload_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_PAYLOAD_COUNT,
+ sizeof (si_payload_count), &si_payload_count, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_TRANSFER1_SIZE,
+ sizeof (si_transfer1_size), &si_transfer1_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_TRANSFER2_SIZE,
+ sizeof (si_transfer2_size), &si_transfer2_size, NULL);
+ success = success && arv_device_read_memory (device, sirm_offset + ARV_SIRM_MAX_TRAILER_SIZE,
+ sizeof (si_max_trailer_size), &si_max_trailer_size, NULL);
if (!success) {
arv_warning_device ("[UvDevice::_bootstrap] Error during memory read");
return FALSE;
}
- arv_info_device ("SIRM_INFO = 0x%08x", si_info);
- arv_info_device ("SIRM_CONTROL = 0x%08x", si_control);
- arv_info_device ("SIRM_REQ_PAYLOAD_SIZE = 0x%016" G_GINT64_MODIFIER "x", si_req_payload_size);
- arv_info_device ("SIRM_REQ_LEADER_SIZE = 0x%08x", si_req_leader_size);
- arv_info_device ("SIRM_REQ_TRAILER_SIZE = 0x%08x", si_req_trailer_size);
- arv_info_device ("SIRM_MAX_LEADER_SIZE = 0x%08x", si_max_leader_size);
- arv_info_device ("SIRM_PAYLOAD_SIZE = 0x%08x", si_payload_size);
- arv_info_device ("SIRM_PAYLOAD_COUNT = 0x%08x", si_payload_count);
- arv_info_device ("SIRM_TRANSFER1_SIZE = 0x%08x", si_transfer1_size);
- arv_info_device ("SIRM_TRANSFER2_SIZE = 0x%08x", si_transfer2_size);
- arv_info_device ("SIRM_MAX_TRAILER_SIZE = 0x%08x", si_max_trailer_size);
-
- success = success && arv_device_read_memory (device, manifest_table_address, sizeof (guint64), &manifest_n_entries, NULL);
- success = success && arv_device_read_memory (device, manifest_table_address + 0x08, sizeof (entry), &entry, NULL);
+ arv_info_device ("SIRM_INFO = 0x%08x", si_info);
+ arv_info_device ("SIRM_CONTROL = 0x%08x", si_control);
+ arv_info_device ("SIRM_REQ_PAYLOAD_SIZE = 0x%016" G_GINT64_MODIFIER "x", si_req_payload_size);
+ arv_info_device ("SIRM_REQ_LEADER_SIZE = 0x%08x", si_req_leader_size);
+ arv_info_device ("SIRM_REQ_TRAILER_SIZE = 0x%08x", si_req_trailer_size);
+ arv_info_device ("SIRM_MAX_LEADER_SIZE = 0x%08x", si_max_leader_size);
+ arv_info_device ("SIRM_PAYLOAD_SIZE = 0x%08x", si_payload_size);
+ arv_info_device ("SIRM_PAYLOAD_COUNT = 0x%08x", si_payload_count);
+ arv_info_device ("SIRM_TRANSFER1_SIZE = 0x%08x", si_transfer1_size);
+ arv_info_device ("SIRM_TRANSFER2_SIZE = 0x%08x", si_transfer2_size);
+ arv_info_device ("SIRM_MAX_TRAILER_SIZE = 0x%08x", si_max_trailer_size);
+
+ success = success && arv_device_read_memory (device, manifest_table_address,
+ sizeof (manifest_n_entries), &manifest_n_entries, NULL);
+ success = success && arv_device_read_memory (device, manifest_table_address + 0x08,
+ sizeof (entry), &entry, NULL);
if (!success) {
arv_warning_device ("[UvDevice::_bootstrap] Error during memory read");
return FALSE;
@@ -972,7 +993,7 @@
if (result != 0) {
arv_device_take_init_error (ARV_DEVICE (uv_device),
g_error_new (ARV_DEVICE_ERROR, ARV_DEVICE_ERROR_PROTOCOL_ERROR,
- "Failed to claim USB interface to '%s-%s-%s-%s': %s",
+ "Failed to claim USB control interface to '%s-%s-%s-%s': %s",
priv->vendor, priv->product, priv->serial_number, priv->guid,
libusb_error_name (result)));
return;
@@ -982,7 +1003,7 @@
if (result != 0) {
arv_device_take_init_error (ARV_DEVICE (uv_device),
g_error_new (ARV_DEVICE_ERROR, ARV_DEVICE_ERROR_PROTOCOL_ERROR,
- "Failed to claim USB interface to '%s-%s-%s-%s': %s",
+ "Failed to claim USB data interface to '%s-%s-%s-%s': %s",
priv->vendor, priv->product, priv->serial_number, priv->guid,
libusb_error_name (result)));
return;
@@ -1040,7 +1061,8 @@
libusb_hotplug_deregister_callback (priv->usb, priv->hotplug_cb_handle);
priv->event_thread_run = 0;
- g_thread_join (priv->event_thread);
+ if (priv->event_thread)
+ g_thread_join (priv->event_thread);
g_clear_object (&priv->genicam);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvuvsp.c new/aravis-0.8.27/src/arvuvsp.c
--- old/aravis-0.8.26/src/arvuvsp.c 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvuvsp.c 2023-06-09 10:47:49.000000000 +0200
@@ -22,7 +22,7 @@
#include <arvuvspprivate.h>
#include <arvstr.h>
-#include <arvmisc.h>
+#include <arvmiscprivate.h>
/*
* SECTION: arvuvsp
@@ -44,7 +44,6 @@
ArvUvspLeader *leader = (ArvUvspLeader *) packet;
ArvUvspTrailer *trailer = (ArvUvspTrailer *) packet;
GString *string;
- char *c_string;
g_return_val_if_fail (packet != NULL, NULL);
@@ -101,11 +100,7 @@
}
#endif
- c_string = string->str;
-
- g_string_free (string, FALSE);
-
- return c_string;
+ return arv_g_string_free_and_steal(string);
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aravis-0.8.26/src/arvuvspprivate.h new/aravis-0.8.27/src/arvuvspprivate.h
--- old/aravis-0.8.26/src/arvuvspprivate.h 2023-02-17 08:27:02.000000000 +0100
+++ new/aravis-0.8.27/src/arvuvspprivate.h 2023-06-09 10:47:49.000000000 +0200
@@ -123,7 +123,7 @@
if (has_chunks != NULL)
*has_chunks = (payload_type & 0x4000) != 0;
- return payload_type & 0x3fff;
+ return (ArvBufferPayloadType) (payload_type & 0x3fff);
}
static inline guint64
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package shotcut for openSUSE:Factory checked in at 2023-07-31 15:25:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/shotcut (Old)
and /work/SRC/openSUSE:Factory/.shotcut.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "shotcut"
Mon Jul 31 15:25:02 2023 rev:58 rq:1101465 version:23.07.29
Changes:
--------
--- /work/SRC/openSUSE:Factory/shotcut/shotcut.changes 2023-06-23 21:53:43.891002393 +0200
+++ /work/SRC/openSUSE:Factory/.shotcut.new.32662/shotcut.changes 2023-07-31 15:25:03.855564914 +0200
@@ -1,0 +2,53 @@
+Mon Jul 31 06:34:04 UTC 2023 - Michael Vetter <mvetter(a)suse.com>
+
+- Update to 23.07.29:
+ * Fixed crash on startup on older Windows 10 computers that do not have Direct3D 11
+ (broke in v23.05).
+ * Fixed Timeline scrubbing and skimming accelerate too much (broke in v23.06).
+ * Fixed Stabilize analysis jobs not working on a speed-adjusted timeline clip (broke in
+ v23.05).
+ * Fixed the visibility of the cursor in the Text: Rich filter’s editor (broke in
+ v23.05).
+ * Fixed the up and down cursor keys not working in some numeric fields (broke in
+ v23.05).
+ * Fixed seeking on the new Speed: Forward Only and Speed: Forward & Reverse filters.
+ * Fixed the buttons in the Delete Filter Set confirm dialog are hidden if the name is
+ long.
+ * Fixed the color level of RGB and RGBA sources (e.g. images) with GPU Effects.
+ * Fixed crash adding a GPU filter to Timeline > Output by not showing GPU filters for
+ that selection.
+ * Fixed shift-drag-drop from Windows Explorer to Playlist deletes the files! This is an
+ old bug, and Shotcut is not deleting the files. But it accepts a move drop action for
+ the purpose of reordering playlist items. However, doing so with a list of filenames
+ makes Windows assume the receiving application did something appropriate with thes file
+ and then… delete them on behalf of the app just to be sure?!? Smooth move. (Another
+ Windows file manager Directory Opus does not exhibit this bad behavior.)
+ * Fixed another very old bug on Windows where sound does not follow the default output
+ device, for example plugging headphones, until you restart the app. Please note that if
+ you are using Settings > Audio Channels > 6 (5.1) after the default sound output
+ changes, you will likely experience distortion in the audio playback until you restart
+ the app.
+ * Added the --SDL_AUDIODRIVER command line option for Windows and Linux.
+ * Fixed appending to Playlist from clipboard with nothing yet opened in the Source
+ player.
+ * Fixed the Export > Audio > Quality range for the aac codec.
+ * Fixed trying to drag a keyframe vertically may snap changing its horizontal position.
+ * Fixed clicking OK in a color dialog on Windows without changing anything resets the
+ alpha to 255.
+ * Fixed top-field-first interlaced output.
+ * Added Track Auto Fade and Track Seam audio filters. These filters address an old
+ problem where clicks and pops may be heard in export when switching between clips due
+ to discontinuities in the audio stream. A recommended technique was to add a 2 frame
+ Fade Audio Out and Fade Audio in filters on clips. Track Auto Fade automates that.
+ Track Seam works on a similar level but rather attempts to do a smoothing between
+ outgoing and incoming samples around edit points. Both of these new filters may ONLY be
+ added to individual tracks—audio or video.
+ * Added Transition type > Cut to the Slideshow Generator.
+ * Added Ctrl+Wheel (command on macOS) to numeric fields to increment and decrement by a
+ larger amount.
+ * Updated Qt libraries to version 6.4.3.
+ * Updated libebur128 to version 1.2.6.
+ * Updated rubberband library to version 3.2.1.
+ * Updated MLT to version 7.18.0.
+
+-------------------------------------------------------------------
Old:
----
shotcut-23.06.14.tar.gz
New:
----
shotcut-23.07.29.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ shotcut.spec ++++++
--- /var/tmp/diff_new_pack.g3jhs7/_old 2023-07-31 15:25:05.071571934 +0200
+++ /var/tmp/diff_new_pack.g3jhs7/_new 2023-07-31 15:25:05.075571957 +0200
@@ -27,7 +27,7 @@
#%%(pkg-config --modversion Qt6Core)
%bcond_with x264
Name: shotcut
-Version: 23.06.14
+Version: 23.07.29
Release: 0
Summary: Video and audio editor and creator
License: GPL-3.0-or-later
@@ -37,11 +37,12 @@
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
+BuildRequires: libebur128-devel >= 1.2.6
BuildRequires: pkgconfig
-BuildRequires: qt6-declarative-private-devel >= 6.4.2
+BuildRequires: qt6-declarative-private-devel >= 6.4.3
BuildRequires: update-desktop-files
-BuildRequires: cmake(Qt6Concurrent) >= 6.4.2
-BuildRequires: cmake(Qt6Core) >= 6.4.2
+BuildRequires: cmake(Qt6Concurrent) >= 6.4.3
+BuildRequires: cmake(Qt6Core) >= 6.4.3
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Multimedia)
++++++ shotcut-23.06.14.tar.gz -> shotcut-23.07.29.tar.gz ++++++
/work/SRC/openSUSE:Factory/shotcut/shotcut-23.06.14.tar.gz /work/SRC/openSUSE:Factory/.shotcut.new.32662/shotcut-23.07.29.tar.gz differ: char 15, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package cgal for openSUSE:Factory checked in at 2023-07-31 15:24:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cgal (Old)
and /work/SRC/openSUSE:Factory/.cgal.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cgal"
Mon Jul 31 15:24:58 2023 rev:32 rq:1101456 version:5.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/cgal/cgal.changes 2023-04-03 17:46:04.764831734 +0200
+++ /work/SRC/openSUSE:Factory/.cgal.new.32662/cgal.changes 2023-07-31 15:25:01.527551474 +0200
@@ -1,0 +2,12 @@
+Mon Jul 31 06:06:33 UTC 2023 - Michael Vetter <mvetter(a)suse.com>
+
+- Update to 5.6:
+ * See https://github.com/CGAL/cgal/releases/tag/v5.6
+
+-------------------------------------------------------------------
+Mon Jul 31 06:05:33 UTC 2023 - Michael Vetter <mvetter(a)suse.com>
+
+- Update to 5.5.3:
+ * https://github.com/CGAL/cgal/issues?q=sort%3Aupdated-desc+label%3AMerged_in…
+
+-------------------------------------------------------------------
Old:
----
CGAL-5.5.2-doc_html.tar.xz
CGAL-5.5.2.tar.xz
New:
----
CGAL-5.6-doc_html.tar.xz
CGAL-5.6.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cgal.spec ++++++
--- /var/tmp/diff_new_pack.zY4n0Q/_old 2023-07-31 15:25:03.347561981 +0200
+++ /var/tmp/diff_new_pack.zY4n0Q/_new 2023-07-31 15:25:03.351562004 +0200
@@ -23,7 +23,7 @@
#@TODO : ask for rename and take into account the obsolete existant thing. like libcgal deps
%define _sourcename CGAL
Name: cgal
-Version: 5.5.2
+Version: 5.6
Release: 0
Summary: Computational Geometry Algorithms Library
License: GPL-3.0-or-later AND LGPL-3.0-or-later
@@ -51,7 +51,6 @@
BuildRequires: gcc-c++
%endif
-
%description
CGAL provides geometric algorithms in a C++ library.
++++++ CGAL-5.5.2-doc_html.tar.xz -> CGAL-5.6-doc_html.tar.xz ++++++
/work/SRC/openSUSE:Factory/cgal/CGAL-5.5.2-doc_html.tar.xz /work/SRC/openSUSE:Factory/.cgal.new.32662/CGAL-5.6-doc_html.tar.xz differ: char 27, line 1
++++++ CGAL-5.5.2-doc_html.tar.xz -> CGAL-5.6.tar.xz ++++++
/work/SRC/openSUSE:Factory/cgal/CGAL-5.5.2-doc_html.tar.xz /work/SRC/openSUSE:Factory/.cgal.new.32662/CGAL-5.6.tar.xz differ: char 17, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package kakoune for openSUSE:Factory checked in at 2023-07-31 15:24:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kakoune (Old)
and /work/SRC/openSUSE:Factory/.kakoune.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kakoune"
Mon Jul 31 15:24:57 2023 rev:25 rq:1101490 version:2023.07.29
Changes:
--------
--- /work/SRC/openSUSE:Factory/kakoune/kakoune.changes 2023-04-11 15:54:43.518057324 +0200
+++ /work/SRC/openSUSE:Factory/.kakoune.new.32662/kakoune.changes 2023-07-31 15:24:58.779535609 +0200
@@ -1,0 +2,15 @@
+Mon Jul 31 06:00:45 UTC 2023 - Michael Vetter <mvetter(a)suse.com>
+
+- Update to 2023.07.29:
+ * <a-u> and <a-U> now undo/redo selection changes; the previous
+ meaning of moving in history tree has been moved to <c-j> and <c-k>
+ * %exp{...} expansions provide flexible quoting for expanded
+ strings (as double quoted strings)
+ * <c-g> cancels the current operation and goes back to the main
+ event loop, this provides an escape hatch when Kakoune seems
+ to hang due to a costly operation
+ * show-matching -previous highlighter will fall back onto the
+ character preceeding the cursor
+- Remove 894e44fdbff4221549d358faa4a73ea43e1283a5.patch
+
+-------------------------------------------------------------------
Old:
----
894e44fdbff4221549d358faa4a73ea43e1283a5.patch
kakoune-2022.10.31.tar.bz2
New:
----
kakoune-2023.07.29.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kakoune.spec ++++++
--- /var/tmp/diff_new_pack.4Xsefh/_old 2023-07-31 15:24:59.779541383 +0200
+++ /var/tmp/diff_new_pack.4Xsefh/_new 2023-07-31 15:24:59.783541405 +0200
@@ -17,14 +17,13 @@
Name: kakoune
-Version: 2022.10.31
+Version: 2023.07.29
Release: 0
Summary: A code editor heavily inspired by Vim
License: Unlicense
Group: Productivity/Text/Editors
URL: https://kakoune.org/
Source: https://github.com/mawww/kakoune/releases/download/v%{version}/kakoune-%{ve…
-Patch: https://github.com/mawww/kakoune/commit/894e44fdbff4221549d358faa4a73ea43e1…
BuildRequires: asciidoc
BuildRequires: fdupes
BuildRequires: gcc-c++ >= 12
++++++ kakoune-2022.10.31.tar.bz2 -> kakoune-2023.07.29.tar.bz2 ++++++
++++ 8136 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rehex for openSUSE:Factory checked in at 2023-07-31 15:24:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rehex (Old)
and /work/SRC/openSUSE:Factory/.rehex.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rehex"
Mon Jul 31 15:24:56 2023 rev:8 rq:1101459 version:0.60.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/rehex/rehex.changes 2022-11-04 17:35:42.945045811 +0100
+++ /work/SRC/openSUSE:Factory/.rehex.new.32662/rehex.changes 2023-07-31 15:24:57.523528358 +0200
@@ -1,0 +2,41 @@
+Mon Jul 31 06:17:56 UTC 2023 - Michael Vetter <mvetter(a)suse.com>
+
+- Update to 0.60.1:
+ New features:
+ * Add data histogram tool (#140).
+ * Monitor for open files being externally modified and allow
+ reloading (#124).
+ * Add "Delete comment and children" context menu command to
+ delete a comment and any comments encapsulated by it (#198).
+ * Allow dragging tabs between windows or out to new ones.
+ Quality of life improvements:
+ * Use virtual offsets in "Select range" dialog.
+ * Don't re-open files to save when there are no changes (#193).
+ * Improve performance when large numbers of comments are defined.
+ * Open original file when passed a rehex-meta file on the command line (#207).
+ Character set handling:
+ * Add <charset = "XXX"> syntax to templates (#184).
+ * Add character set option to text search (#182, #200).
+ * Add IBM codepage 866 and Windows-1251 (#208).
+ Binary templates:
+ * Expose current array index as ArrayIndex when expanding arrays
+ of structs in templates (#191).
+ * Fix true/false not being usable inside template functions/structs (#197).
+ * Add new ReadString(), SPrintf(), SetComment(), StringLengthBytes(),
+ ArrayPush(), ArrayPop() and OffsetOf() template function.
+ * Fix repeated execution of the same switch() block in a template (#202).
+ * Add 'private' variables to template language.
+ * Fix template format strings that expand to further format tokens.
+ * Fix template error when converting a float to an int.
+ * Remember recently selected templates (#183).
+ * Implement lexical variable scoping in templates and allow functions
+ to access global variables defined above them (#190).
+ * Add "Apply template from cursor" option to binary template tool.
+ Bug fixes:
+ * Fix crash when running rehex for the first time on some systems (#194).
+ * Correctly draw insert cursor over highlighted data and at the end of the file (#196).
+ * Fix cases where the strings tool would appear to run forever with an empty file.
+ * Remove strings from the strings panel when they are deleted from the file.
+ * Fix crash when attempting to open a directory/bundle on macOS.
+
+-------------------------------------------------------------------
Old:
----
rehex-0.5.4.tar.gz
New:
----
rehex-0.60.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rehex.spec ++++++
--- /var/tmp/diff_new_pack.L6TvBa/_old 2023-07-31 15:24:58.211532330 +0200
+++ /var/tmp/diff_new_pack.L6TvBa/_new 2023-07-31 15:24:58.219532376 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rehex
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: rehex
-Version: 0.5.4
+Version: 0.60.1
Release: 0
Summary: Reverse Engineers' Hex Editor
License: GPL-2.0-only
++++++ rehex-0.5.4.tar.gz -> rehex-0.60.1.tar.gz ++++++
++++ 50768 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-qsymm for openSUSE:Factory checked in at 2023-07-31 15:24:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-qsymm (Old)
and /work/SRC/openSUSE:Factory/.python-qsymm.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-qsymm"
Mon Jul 31 15:24:48 2023 rev:4 rq:1101478 version:1.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-qsymm/python-qsymm.changes 2021-02-15 23:21:00.767818115 +0100
+++ /work/SRC/openSUSE:Factory/.python-qsymm.new.32662/python-qsymm.changes 2023-07-31 15:24:52.123497183 +0200
@@ -1,0 +2,8 @@
+Mon Jul 31 07:40:42 UTC 2023 - Steve Kowalik <steven.kowalik(a)suse.com>
+
+- Add patch support-sympy-1.12.patch:
+ * Support sympy 1.12.
+- Switch to pyproject macros.
+- Skip a truculent test.
+
+-------------------------------------------------------------------
New:
----
support-sympy-1.12.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-qsymm.spec ++++++
--- /var/tmp/diff_new_pack.yf3PwH/_old 2023-07-31 15:24:53.295503949 +0200
+++ /var/tmp/diff_new_pack.yf3PwH/_new 2023-07-31 15:24:53.303503995 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-qsymm
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,6 @@
#
-%define skip_python2 1
-%define skip_python36 1
%define modname qsymm
Name: python-qsymm
Version: 1.3.0
@@ -26,8 +24,11 @@
License: BSD-2-Clause
URL: https://gitlab.kwant-project.org/qt/qsymm
Source: https://files.pythonhosted.org/packages/source/q/qsymm/qsymm-%{version}.tar…
+Patch0: support-sympy-1.12.patch
BuildRequires: %{python_module devel}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-numpy
@@ -50,25 +51,25 @@
group of your Hamiltonian.
%prep
-%setup -q -n qsymm-%{version}
+%autosetup -p1 -n qsymm-%{version}
sed -i -e '/pytest-runner/d' setup.py
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# 3 tests randomply fail
# test_check_symmetry test_cont_finder test_disc_finder
-%pytest -k 'not (test_check_symmetry or test_cont_finder or test_disc_finder)'
+%pytest -k 'not (test_check_symmetry or test_cont_finder or test_disc_finder or test_Model_subs)'
%files %{python_files}
%doc AUTHORS.md CHANGELOG.md README.md
%license LICENSE
-%{python_sitelib}/%{modname}/
-%{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
+%{python_sitelib}/%{modname}
+%{python_sitelib}/%{modname}-%{version}.dist-info
%changelog
++++++ support-sympy-1.12.patch ++++++
diff --git a/qsymm/_scipy_patch.py b/qsymm/_scipy_patch.py
deleted file mode 100644
index ac5a5d1918f43d2203fcdd5ff510313c415fe743..0000000000000000000000000000000000000000
--- a/qsymm/_scipy_patch.py
+++ /dev/null
@@ -1,224 +0,0 @@
-# This file has been taken from Scipy 1.1.0 under the
-# BSD 3-Clause license, reproduced below:
-#
-# Copyright (c) 2001-2002 Enthought, Inc. 2003-2019, SciPy Developers.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# 3. Neither the name of the copyright holder nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-from pkg_resources import parse_version
-
-import scipy.sparse
-
-# Scipy 1.1 implemented sparse matrix reshaping. In order to allow a lower
-# version of scipy (to remain compatible with Kwant's requirements) we do
-# not want to use this more recent version of scipy. We monkey patch the
-# "reshape" method onto the appropriate sparse matrix classes.
-#
-# This module should be imported in all modules that use the "reshape"
-# method of sparse matrices (this is a sufficient but not necessary
-# condition for the monkey patching to work, because the patch may already
-# have been applied by other modules that themselves import this).
-#
-# TODO: remove this file (and all the places it is imported) when we can
-# depend on scipy >= 1.1
-
-if parse_version(scipy.__version__) < parse_version("1.1"):
-
- import operator
-
- import numpy as np
- from scipy.sparse import coo_matrix
-
-
- def check_shape(args, current_shape=None):
- """Imitate numpy.matrix handling of shape arguments"""
- if len(args) == 0:
- raise TypeError("function missing 1 required positional argument: "
- "'shape'")
- elif len(args) == 1:
- try:
- shape_iter = iter(args[0])
- except TypeError:
- new_shape = (operator.index(args[0]), )
- else:
- new_shape = tuple(operator.index(arg) for arg in shape_iter)
- else:
- new_shape = tuple(operator.index(arg) for arg in args)
-
- if current_shape is None:
- if len(new_shape) != 2:
- raise ValueError('shape must be a 2-tuple of positive integers')
- elif new_shape[0] < 0 or new_shape[1] < 0:
- raise ValueError("'shape' elements cannot be negative")
-
- else:
- # Check the current size only if needed
- current_size = np.prod(current_shape, dtype=int)
-
- # Check for negatives
- negative_indexes = [i for i, x in enumerate(new_shape) if x < 0]
- if len(negative_indexes) == 0:
- new_size = np.prod(new_shape, dtype=int)
- if new_size != current_size:
- raise ValueError('cannot reshape array of size {} into shape {}'
- .format(current_size, new_shape))
- elif len(negative_indexes) == 1:
- skip = negative_indexes[0]
- specified = np.prod(new_shape[0:skip] + new_shape[skip+1:])
- unspecified, remainder = divmod(current_size, specified)
- if remainder != 0:
- err_shape = tuple('newshape' if x < 0 else x for x in new_shape)
- raise ValueError('cannot reshape array of size {} into shape {}'
- ''.format(current_size, err_shape))
- new_shape = new_shape[0:skip] + (unspecified,) + new_shape[skip+1:]
- else:
- raise ValueError('can only specify one unknown dimension')
-
- # Add and remove ones like numpy.matrix.reshape
- if len(new_shape) != 2:
- new_shape = tuple(arg for arg in new_shape if arg != 1)
-
- if len(new_shape) == 0:
- new_shape = (1, 1)
- elif len(new_shape) == 1:
- new_shape = (1, new_shape[0])
-
- if len(new_shape) > 2:
- raise ValueError('shape too large to be a matrix')
-
- return new_shape
-
-
- def check_reshape_kwargs(kwargs):
- """Unpack keyword arguments for reshape function.
- This is useful because keyword arguments after star arguments are not
- allowed in Python 2, but star keyword arguments are. This function unpacks
- 'order' and 'copy' from the star keyword arguments (with defaults) and
- throws an error for any remaining.
- """
-
- order = kwargs.pop('order', 'C')
- copy = kwargs.pop('copy', False)
- if kwargs: # Some unused kwargs remain
- raise TypeError('reshape() got unexpected keywords arguments: {}'
- .format(', '.join(kwargs.keys())))
- return order, copy
-
-
- def get_index_dtype(arrays=(), maxval=None, check_contents=False):
-
- int32min = np.iinfo(np.int32).min
- int32max = np.iinfo(np.int32).max
-
- dtype = np.intc
- if maxval is not None:
- if maxval > int32max:
- dtype = np.int64
-
- if isinstance(arrays, np.ndarray):
- arrays = (arrays,)
-
- for arr in arrays:
- arr = np.asarray(arr)
- if not np.can_cast(arr.dtype, np.int32):
- if check_contents:
- if arr.size == 0:
- # a bigger type not needed
- continue
- elif np.issubdtype(arr.dtype, np.integer):
- maxval = arr.max()
- minval = arr.min()
- if minval >= int32min and maxval <= int32max:
- # a bigger type not needed
- continue
-
- dtype = np.int64
- break
-
- return dtype
-
-
- def sparse_reshape(self, *args, **kwargs):
- # If the shape already matches, don't bother doing an actual reshape
- # Otherwise, the default is to convert to COO and use its reshape
- shape = check_shape(args, self.shape)
- order, copy = check_reshape_kwargs(kwargs)
- if shape == self.shape:
- if copy:
- return self.copy()
- else:
- return self
-
- return self.tocoo(copy=copy).reshape(shape, order=order, copy=False)
-
-
- def coo_reshape(self, *args, **kwargs):
- shape = check_shape(args, self.shape)
- order, copy = check_reshape_kwargs(kwargs)
-
- # Return early if reshape is not required
- if shape == self.shape:
- if copy:
- return self.copy()
- else:
- return self
-
- nrows, ncols = self.shape
-
- if order == 'C':
- # Upcast to avoid overflows: the coo_matrix constructor
- # below will downcast the results to a smaller dtype, if
- # possible.
- dtype = get_index_dtype(maxval=(ncols * max(0, nrows - 1) + max(0, ncols - 1)))
-
- flat_indices = np.multiply(ncols, self.row, dtype=dtype) + self.col
- new_row, new_col = divmod(flat_indices, shape[1])
- elif order == 'F':
- dtype = get_index_dtype(maxval=(nrows * max(0, ncols - 1) + max(0, nrows - 1)))
-
- flat_indices = np.multiply(nrows, self.col, dtype=dtype) + self.row
- new_col, new_row = divmod(flat_indices, shape[0])
- else:
- raise ValueError("'order' must be 'C' or 'F'")
-
- # Handle copy here rather than passing on to the constructor so that no
- # copy will be made of new_row and new_col regardless
- if copy:
- new_data = self.data.copy()
- else:
- new_data = self.data
-
- return coo_matrix((new_data, (new_row, new_col)),
- shape=shape, copy=False)
-
-
- # Apply monkey patches
- scipy.sparse.spmatrix.reshape = sparse_reshape
- scipy.sparse.coo_matrix.reshape = coo_reshape
diff --git a/qsymm/kwant_continuum.py b/qsymm/kwant_continuum.py
index 842bf125c3212b079f366b13ea8ba85ec8f04b31..c2e5695e4368bf838f4af8b4c57944831fdefdde 100644
--- a/qsymm/kwant_continuum.py
+++ b/qsymm/kwant_continuum.py
@@ -45,14 +45,10 @@ import sympy.abc
import sympy.physics.quantum
from sympy.core.function import AppliedUndef
from sympy.core.sympify import converter
-from sympy.core.core import all_classes as sympy_classes
from sympy.physics.matrices import msigma as _msigma
import warnings
-# TODO: remove when sympy correctly includes MutableDenseMatrix (lol).
-sympy_classes = set(sympy_classes) | {sympy.MutableDenseMatrix}
-
momentum_operators = sympy.symbols('k_x k_y k_z', commutative=False)
position_operators = sympy.symbols('x y z', commutative=False)
@@ -178,7 +174,7 @@ def sympify(expr, locals=None):
stored_value = None
# if ``expr`` is already a ``sympy`` object we may terminate a code path
- if isinstance(expr, tuple(sympy_classes)):
+ if isinstance(expr, sympy.Basic):
if locals:
warnings.warn('Input expression is already SymPy object: '
'"locals" will not be used.',
diff --git a/qsymm/linalg.py b/qsymm/linalg.py
index 05a4a7413e4715734122ebb8464beb6c6d4a38c1..f4a125e795e41e9009a0e411c5cf45d507da87cf 100644
--- a/qsymm/linalg.py
+++ b/qsymm/linalg.py
@@ -4,14 +4,11 @@ import scipy.linalg as la
import scipy.sparse.linalg as sla
import scipy
from numbers import Number
-from scipy.optimize import minimize
from scipy.spatial.distance import cdist
from scipy.sparse.csgraph import connected_components
import itertools as it
import tinyarray as ta
-from . import _scipy_patch
-
def commutator(A, B):
return np.dot(A, B) - np.dot(B, A)
@@ -97,11 +94,17 @@ def matrix_basis(dim, traceless=False, antihermitian=False, real=False, sparse=F
A generator that returns matrices that span the vector space.
"""
if sparse:
- null = lambda: scipy.sparse.lil_matrix((dim, dim), dtype=complex)
- set_type = lambda x: x.tocsr()
+ def null():
+ return scipy.sparse.lil_matrix((dim, dim), dtype=complex)
+
+ def set_type(x):
+ return x.tocsr()
else:
- null = lambda: np.zeros((dim, dim), dtype=complex)
- set_type = lambda x: x
+ def null():
+ return np.zeros((dim, dim), dtype=complex)
+
+ def set_type(x):
+ return x
# Matrix basis for dim x dim matrices. With real coefficients spans
# Hermitian matrices, with complex spans all matrices
coeff = (1j if antihermitian else 1)
@@ -424,13 +427,15 @@ def solve_mat_eqn(HL, HR=None, hermitian=False, traceless=False,
sparse = isinstance(HL[0], scipy.sparse.spmatrix)
if HR is None:
HR = HL
- if len(HL) != len(HR) or not all(l.shape == r.shape for l, r in zip(HL, HR)):
+ if len(HL) != len(HR) or not all(
+ left.shape == right.shape for left, right in zip(HL, HR)
+ ):
raise ValueError('HL and HR must have the same shape.')
if isinstance(conjugate, bool):
conjugate = [conjugate] * len(HL)
if len(conjugate) != len(HL):
- raise ValueError('Conugate must have the same length as HL.')
- if not all(l.shape[0] == l.shape[1] == r.shape[0] == r.shape[1] for l, r in zip(HL, HR)):
+ raise ValueError('Conjugate must have the same length as HL.')
+ if not all(term.shape[0] == term.shape[1] for term in HL):
raise ValueError('HL and HR must be a list of square matrices.')
dim = HL[0].shape[-1]
@@ -441,16 +446,20 @@ def solve_mat_eqn(HL, HR=None, hermitian=False, traceless=False,
# Prepare for differences in sparse and dense algebra
if sparse:
- basis = lambda: matrix_basis(dim, traceless=traceless, sparse=True)
+ def basis():
+ return matrix_basis(dim, traceless=traceless, sparse=True)
vstack = scipy.sparse.vstack
bmat = scipy.sparse.bmat
# Cast it to coo format and reshape
- flatten = lambda x: scipy.sparse.coo_matrix(x).reshape((x.shape[0]*x.shape[1], 1))
+ def flatten(x):
+ return scipy.sparse.coo_matrix(x).reshape((x.shape[0]*x.shape[1], 1))
else:
- basis = lambda: matrix_basis(dim, traceless=traceless, sparse=False)
+ def basis():
+ return matrix_basis(dim, traceless=traceless, sparse=False)
vstack = np.vstack
bmat = np.block
- flatten = lambda x: x.reshape((-1, 1))
+ def flatten(x):
+ return x.reshape((-1, 1))
# Calculate coefficients from commutators of the basis matrices
null_mat = []
@@ -472,7 +481,8 @@ def solve_mat_eqn(HL, HR=None, hermitian=False, traceless=False,
ns = nullspace(null_mat, sparse=sparse, k_max=k_max)
# Make all solutions
# 'ij,jkl->ikl'
- basis = lambda: matrix_basis(dim, traceless=traceless, sparse=False)
+ def basis():
+ return matrix_basis(dim, traceless=traceless, sparse=False)
return np.array([sum((v * mat for v, mat in zip(vec, basis()))) for vec in ns])
diff --git a/qsymm/model.py b/qsymm/model.py
index 48ad102a8ebdb5ed32b919a71ee454549a975d78..2ec3b23909be7d1c9a68587669c5223672ca6c0f 100644
--- a/qsymm/model.py
+++ b/qsymm/model.py
@@ -3,26 +3,24 @@ from copy import copy
from numbers import Number
from warnings import warn
from functools import lru_cache
-from collections import defaultdict, abc, UserDict
+from collections import abc, UserDict
import numpy as np
import scipy
-import tinyarray as ta
-import scipy.linalg as la
import sympy
from sympy.core.numbers import One
from sympy.matrices.matrices import MatrixBase
from sympy.core.basic import Basic
from sympy.core.function import AppliedUndef
-from .linalg import prop_to_id, allclose
-from . import kwant_continuum, _scipy_patch
+from .linalg import allclose
+from . import kwant_continuum
_commutative_momenta = [kwant_continuum.make_commutative(k, k)
for k in kwant_continuum.momentum_operators]
e = kwant_continuum.sympify('e')
-I = kwant_continuum.sympify('I')
+I = kwant_continuum.sympify('I') # noqa: E741
def substitute_exponents(expr):
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pscript for openSUSE:Factory checked in at 2023-07-31 15:24:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pscript (Old)
and /work/SRC/openSUSE:Factory/.python-pscript.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pscript"
Mon Jul 31 15:24:47 2023 rev:9 rq:1101457 version:0.7.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pscript/python-pscript.changes 2022-10-06 07:42:24.660714944 +0200
+++ /work/SRC/openSUSE:Factory/.python-pscript.new.32662/python-pscript.changes 2023-07-31 15:24:51.435493211 +0200
@@ -1,0 +2,7 @@
+Mon Jul 31 06:13:34 UTC 2023 - Steve Kowalik <steven.kowalik(a)suse.com>
+
+- Stop using greedy globs in %files.
+- Switch to %pytest from invoke.
+- Switch to pyproject macros.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pscript.spec ++++++
--- /var/tmp/diff_new_pack.qJZdzb/_old 2023-07-31 15:24:52.007496513 +0200
+++ /var/tmp/diff_new_pack.qJZdzb/_new 2023-07-31 15:24:52.011496536 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pscript
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname pscript
Name: python-pscript
Version: 0.7.7
@@ -25,12 +24,13 @@
License: BSD-2-Clause
URL: https://github.com/flexxui/pscript
Source: https://github.com/flexxui/%{modname}/archive/v%{version}/%{modname}-%{vers…
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
# SECTION test requirements
-BuildRequires: %{python_module invoke}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: nodejs
@@ -42,22 +42,23 @@
of Python that this compiler supports.
%prep
-%setup -q -n %{modname}-%{version}
+%autosetup -p1 -n %{modname}-%{version}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-# the tests actually do not invoke themselves
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} invoke-%{$python_bin_suffix} test --unit
+%pytest pscript/tests
%files %{python_files}
%doc README.md
%license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/pscript
+%{python_sitelib}/pscript_legacy
+%{python_sitelib}/pscript-%{version}.dist-info
%changelog
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package lxc for openSUSE:Factory checked in at 2023-07-31 15:24:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lxc (Old)
and /work/SRC/openSUSE:Factory/.lxc.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lxc"
Mon Jul 31 15:24:42 2023 rev:106 rq:1101506 version:5.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/lxc/lxc.changes 2023-05-15 16:54:59.304394288 +0200
+++ /work/SRC/openSUSE:Factory/.lxc.new.32662/lxc.changes 2023-07-31 15:24:50.179485960 +0200
@@ -1,0 +2,9 @@
+Mon Jul 31 10:43:32 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 5.0.3:
+ * Fix nftables syntax for IPv6 NAT
+ * Added support for squashfs OCI images
+ * Fixes when running LXC with io_uring
+ + detailed changelog at https://discuss.linuxcontainers.org/t/lxc-5-0-3-lts-has-been-released/17708
+
+-------------------------------------------------------------------
Old:
----
lxc-5.0.2.tar.gz
lxc-5.0.2.tar.gz.asc
New:
----
lxc-5.0.3.tar.gz
lxc-5.0.3.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lxc.spec ++++++
--- /var/tmp/diff_new_pack.M0PucJ/_old 2023-07-31 15:24:50.923490255 +0200
+++ /var/tmp/diff_new_pack.M0PucJ/_new 2023-07-31 15:24:50.927490278 +0200
@@ -23,7 +23,7 @@
%define shlib_version 1
Name: lxc
-Version: 5.0.2
+Version: 5.0.3
Release: 0
URL: http://linuxcontainers.org/
Summary: Userspace tools for Linux kernel containers
++++++ lxc-5.0.2.tar.gz -> lxc-5.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/.github/workflows/commits.yml new/lxc-5.0.3/.github/workflows/commits.yml
--- old/lxc-5.0.2/.github/workflows/commits.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/lxc-5.0.3/.github/workflows/commits.yml 2023-07-26 00:00:11.000000000 +0200
@@ -0,0 +1,40 @@
+name: Commits
+on:
+ - pull_request
+
+permissions:
+ contents: read
+
+jobs:
+ dco-check:
+ permissions:
+ pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
+ name: Signed-off-by (DCO)
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Get PR Commits
+ id: 'get-pr-commits'
+ uses: tim-actions/get-pr-commits@master
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Check that all commits are signed-off
+ uses: tim-actions/dco@master
+ with:
+ commits: ${{ steps.get-pr-commits.outputs.commits }}
+
+ target-branch:
+ permissions:
+ contents: none
+ name: Branch target
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Check branch target
+ env:
+ TARGET: ${{ github.event.pull_request.base.ref }}
+ run: |
+ set -x
+ [ "${TARGET}" = "main" ] && exit 0
+
+ echo "Invalid branch target: ${TARGET}"
+ exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/CONTRIBUTING new/lxc-5.0.3/CONTRIBUTING
--- old/lxc-5.0.2/CONTRIBUTING 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/CONTRIBUTING 2023-07-26 00:00:11.000000000 +0200
@@ -107,3 +107,15 @@
Co-developed-by: Random J Developer 1 <random_1(a)developer.org>
Co-developed-by: Random J Developer 2 <random_1(a)developer.org>
+
+AI Generated Code:
+------------------
+
+Substantially AI generated code is not welcome. There are several
+reasons for this. First, it violates the "The contribution was created
+in whole or in part by me" statement of DCO. Second, the licensing
+implications are not yet clear. Thirdly, we expect anyone who submits
+code to fully understand what they are submitting. Finally, we put
+a lot of time into reviewing patch submissions. Increasing the
+volume of code to be reviewed with autogenerated boilerplate drivel
+will take away time from more important reviews.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/config/apparmor/abstractions/start-container.in new/lxc-5.0.3/config/apparmor/abstractions/start-container.in
--- old/lxc-5.0.2/config/apparmor/abstractions/start-container.in 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/config/apparmor/abstractions/start-container.in 2023-07-26 00:00:11.000000000 +0200
@@ -20,6 +20,7 @@
mount options=(rw, make-shared) -> **,
mount options=(rw, make-rshared) -> **,
mount fstype=debugfs,
+ mount fstype=fuse.*,
# allow pre-mount hooks to stage mounts under /var/lib/lxc/<container>/
mount -> /var/lib/lxc/{**,},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/config/init/common/lxc-net.in new/lxc-5.0.3/config/init/common/lxc-net.in
--- old/lxc-5.0.2/config/init/common/lxc-net.in 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/config/init/common/lxc-net.in 2023-07-26 00:00:11.000000000 +0200
@@ -92,7 +92,7 @@
add table ip6 lxc;
flush table ip6 lxc;
add chain ip6 lxc postrouting { type nat hook postrouting priority 100; };
-add rule ip6 lxc postrouting ip saddr ${LXC_IPV6_NETWORK} ip daddr != ${LXC_IPV6_NETWORK} counter masquerade;
+add rule ip6 lxc postrouting ip6 saddr ${LXC_IPV6_NETWORK} ip6 daddr != ${LXC_IPV6_NETWORK} counter masquerade;
"
fi
NFT_RULESET="${NFT_RULESET};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/meson.build new/lxc-5.0.3/meson.build
--- old/lxc-5.0.2/meson.build 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/meson.build 2023-07-26 00:00:11.000000000 +0200
@@ -4,7 +4,7 @@
project(
'lxc',
'c',
- version: '5.0.2',
+ version: '5.0.3',
license: 'LGPLv2+',
default_options: [
'b_lto=true',
@@ -30,7 +30,7 @@
version_data = configuration_data()
version_data.set('LXC_VERSION_MAJOR', '5')
version_data.set('LXC_VERSION_MINOR', '0')
-version_data.set('LXC_VERSION_MICRO', '2')
+version_data.set('LXC_VERSION_MICRO', '3')
version_data.set('LXC_VERSION_BETA', '')
version_data.set('LXC_ABI', liblxc_version)
version_data.set('LXC_DEVEL', '0')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/attach.c new/lxc-5.0.3/src/lxc/attach.c
--- old/lxc-5.0.2/src/lxc/attach.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/attach.c 2023-07-26 00:00:11.000000000 +0200
@@ -1319,7 +1319,7 @@
* here, ignore errors.
*/
for (int fd = STDIN_FILENO; fd <= STDERR_FILENO; fd++) {
- ret = fd_cloexec(fd, false);
+ ret = lxc_fd_cloexec(fd, false);
if (ret < 0) {
SYSERROR("Failed to clear FD_CLOEXEC from file descriptor %d", fd);
goto on_error;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/cgroups/cgfsng.c new/lxc-5.0.3/src/lxc/cgroups/cgfsng.c
--- old/lxc-5.0.2/src/lxc/cgroups/cgfsng.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/cgroups/cgfsng.c 2023-07-26 00:00:11.000000000 +0200
@@ -146,7 +146,7 @@
}
if (controller)
- WARN("There is no useable %s controller", controller);
+ INFO("There is no useable %s controller", controller);
else
WARN("There is no empty unified cgroup hierarchy");
@@ -2167,7 +2167,7 @@
hierarchy_mnt = must_make_path(cgroup_root, h->at_mnt, NULL);
path2 = must_make_path(hierarchy_mnt, h->at_base,
ops->container_cgroup, NULL);
- ret = mkdir_p(path2, 0755);
+ ret = lxc_mkdir_p(path2, 0755);
if (ret < 0 && (errno != EEXIST))
return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/cgroups/cgroup_utils.c new/lxc-5.0.3/src/lxc/cgroups/cgroup_utils.c
--- old/lxc-5.0.2/src/lxc/cgroups/cgroup_utils.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/cgroups/cgroup_utils.c 2023-07-26 00:00:11.000000000 +0200
@@ -26,7 +26,7 @@
struct statfs fs;
ret = fstatfs(fd, &fs);
- if (!ret && is_fs_type(&fs, CGROUP2_SUPER_MAGIC))
+ if (!ret && lxc_is_fs_type(&fs, CGROUP2_SUPER_MAGIC))
return true;
return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/cmd/lxc_monitord.c new/lxc-5.0.3/src/lxc/cmd/lxc_monitord.c
--- old/lxc-5.0.2/src/lxc/cmd/lxc_monitord.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/cmd/lxc_monitord.c 2023-07-26 00:00:11.000000000 +0200
@@ -159,17 +159,12 @@
socklen_t credsz = sizeof(cred);
ret = LXC_MAINLOOP_ERROR;
- clientfd = accept(fd, NULL, 0);
+ clientfd = accept4(fd, NULL, 0, SOCK_CLOEXEC);
if (clientfd < 0) {
SYSERROR("Failed to accept connection for client file descriptor %d", fd);
goto out;
}
- if (fcntl(clientfd, F_SETFD, FD_CLOEXEC)) {
- SYSERROR("Failed to set FD_CLOEXEC on client socket connection %d", clientfd);
- goto err1;
- }
-
if (getsockopt(clientfd, SOL_SOCKET, SO_PEERCRED, &cred, &credsz)) {
SYSERROR("Failed to get credentials on client socket connection %d", clientfd);
goto err1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/commands.c new/lxc-5.0.3/src/lxc/commands.c
--- old/lxc-5.0.2/src/lxc/commands.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/commands.c 2023-07-26 00:00:11.000000000 +0200
@@ -2080,14 +2080,10 @@
__do_close int connection = -EBADF;
int opt = 1, ret = -1;
- connection = accept(fd, NULL, 0);
+ connection = accept4(fd, NULL, 0, SOCK_CLOEXEC);
if (connection < 0)
return log_error_errno(LXC_MAINLOOP_ERROR, errno, "Failed to accept connection to run command");
- ret = fcntl(connection, F_SETFD, FD_CLOEXEC);
- if (ret < 0)
- return log_error_errno(ret, errno, "Failed to set close-on-exec on incoming command connection");
-
ret = setsockopt(connection, SOL_SOCKET, SO_PASSCRED, &opt, sizeof(opt));
if (ret < 0)
return log_error_errno(ret, errno, "Failed to enable necessary credentials on command socket");
@@ -2122,10 +2118,6 @@
return log_error_errno(-1, errno, "Failed to create command socket %s", &path[1]);
}
- ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
- if (ret < 0)
- return log_error_errno(-1, errno, "Failed to set FD_CLOEXEC on command socket file descriptor");
-
return log_trace(move_fd(fd), "Created abstract unix socket \"%s\"", &path[1]);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/conf.c new/lxc-5.0.3/src/lxc/conf.c
--- old/lxc-5.0.2/src/lxc/conf.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/conf.c 2023-07-26 00:00:11.000000000 +0200
@@ -2212,7 +2212,7 @@
static int parse_mntopt(char *opt, unsigned long *flags, char **data, size_t size)
{
- ssize_t ret;
+ size_t ret;
/* If '=' is contained in opt, the option must go into data. */
if (!strchr(opt, '=')) {
@@ -2236,12 +2236,12 @@
if (strlen(*data)) {
ret = strlcat(*data, ",", size);
- if (ret < 0)
+ if (ret >= size)
return log_error_errno(ret, errno, "Failed to append \",\" to %s", *data);
}
ret = strlcat(*data, opt, size);
- if (ret < 0)
+ if (ret >= size)
return log_error_errno(ret, errno, "Failed to append \"%s\" to %s", opt, *data);
return 0;
@@ -2597,7 +2597,7 @@
}
if (hasmntopt(mntent, "create=dir")) {
- ret = mkdir_p(path, 0755);
+ ret = lxc_mkdir_p(path, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-1, errno, "Failed to create directory \"%s\"", path);
}
@@ -2615,7 +2615,7 @@
p2 = dirname(p1);
- ret = mkdir_p(p2, 0755);
+ ret = lxc_mkdir_p(p2, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-1, errno, "Failed to create directory \"%s\"", path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/conf.h new/lxc-5.0.3/src/lxc/conf.h
--- old/lxc-5.0.2/src/lxc/conf.h 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/conf.h 2023-07-26 00:00:11.000000000 +0200
@@ -233,7 +233,7 @@
* @path : the rootfs source (directory or device)
* @mount : where it is mounted
* @buf : static buffer to construct paths
- * @bev_type : optional backing store type
+ * @bdev_type : optional backing store type
* @managed : whether it is managed by LXC
* @dfd_mnt : fd for @mount
* @dfd_dev : fd for /dev of the container
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/confile.c new/lxc-5.0.3/src/lxc/confile.c
--- old/lxc-5.0.2/src/lxc/confile.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/confile.c 2023-07-26 00:00:11.000000000 +0200
@@ -2770,7 +2770,7 @@
return 0;
}
- if (value[strlen(value)-1] == '/' || is_dir(value))
+ if (value[strlen(value)-1] == '/' || lxc_is_dir(value))
return do_includedir(value, lxc_conf);
return lxc_config_read(value, lxc_conf, true);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/confile_utils.c new/lxc-5.0.3/src/lxc/confile_utils.c
--- old/lxc-5.0.2/src/lxc/confile_utils.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/confile_utils.c 2023-07-26 00:00:11.000000000 +0200
@@ -653,7 +653,7 @@
{
__do_free char *valdup = NULL;
- valdup = path_simplify(value);
+ valdup = lxc_path_simplify(value);
if (!valdup)
return -ENOMEM;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/criu.c new/lxc-5.0.3/src/lxc/criu.c
--- old/lxc-5.0.2/src/lxc/criu.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/criu.c 2023-07-26 00:00:11.000000000 +0200
@@ -321,7 +321,7 @@
return log_error_errno(-ENOMEM, ENOMEM, "Failed to duplicate limit cgroup path");
}
- tmp = path_simplify(cgroup_base_path);
+ tmp = lxc_path_simplify(cgroup_base_path);
if (!tmp)
return log_error_errno(-ENOMEM, ENOMEM, "Failed to remove extraneous slashes from \"%s\"", cgroup_base_path);
free_move_ptr(cgroup_base_path, tmp);
@@ -1224,7 +1224,7 @@
return false;
}
- if (mkdir_p(opts->directory, 0700) < 0)
+ if (lxc_mkdir_p(opts->directory, 0700) < 0)
goto fail;
pid = fork();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/file_utils.c new/lxc-5.0.3/src/lxc/file_utils.c
--- old/lxc-5.0.2/src/lxc/file_utils.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/file_utils.c 2023-07-26 00:00:11.000000000 +0200
@@ -275,7 +275,7 @@
return ret;
}
-int is_dir(const char *path)
+int lxc_is_dir(const char *path)
{
int ret;
struct stat statbuf;
@@ -332,7 +332,7 @@
return move_fd(fd);
}
-bool is_fs_type(const struct statfs *fs, fs_type_magic magic_val)
+bool lxc_is_fs_type(const struct statfs *fs, fs_type_magic magic_val)
{
return (fs->f_type == (fs_type_magic)magic_val);
}
@@ -346,7 +346,7 @@
if (ret < 0)
return false;
- return is_fs_type(&sb, magic_val);
+ return lxc_is_fs_type(&sb, magic_val);
}
bool fhas_fs_type(int fd, fs_type_magic magic_val)
@@ -358,7 +358,7 @@
if (ret < 0)
return false;
- return is_fs_type(&sb, magic_val);
+ return lxc_is_fs_type(&sb, magic_val);
}
FILE *fopen_cloexec(const char *path, const char *mode)
@@ -549,7 +549,7 @@
return f;
}
-int fd_cloexec(int fd, bool cloexec)
+int lxc_fd_cloexec(int fd, bool cloexec)
{
int oflags, nflags;
@@ -688,7 +688,7 @@
return move_fd(fd);
}
-int fd_make_nonblocking(int fd)
+int fd_make_blocking(int fd)
{
int flags;
@@ -700,6 +700,18 @@
return fcntl(fd, F_SETFL, flags);
}
+int fd_make_nonblocking(int fd)
+{
+ int flags;
+
+ flags = fcntl(fd, F_GETFL);
+ if (flags < 0)
+ return -1;
+
+ flags |= O_NONBLOCK;
+ return fcntl(fd, F_SETFL, flags);
+}
+
#define BATCH_SIZE 50
static void batch_realloc(char **mem, size_t oldlen, size_t newlen)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/file_utils.h new/lxc-5.0.3/src/lxc/file_utils.h
--- old/lxc-5.0.2/src/lxc/file_utils.h 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/file_utils.h 2023-07-26 00:00:11.000000000 +0200
@@ -75,7 +75,7 @@
__hidden extern bool file_exists(const char *f);
__hidden extern int print_to_file(const char *file, const char *content);
-__hidden extern int is_dir(const char *path);
+__hidden extern int lxc_is_dir(const char *path);
__hidden extern int lxc_count_file_lines(const char *fn);
__hidden extern int lxc_make_tmpfile(char *template, bool rm);
@@ -83,7 +83,7 @@
typedef __typeof__(((struct statfs *)NULL)->f_type) fs_type_magic;
__hidden extern bool has_fs_type(const char *path, fs_type_magic magic_val);
__hidden extern bool fhas_fs_type(int fd, fs_type_magic magic_val);
-__hidden extern bool is_fs_type(const struct statfs *fs, fs_type_magic magic_val);
+__hidden extern bool lxc_is_fs_type(const struct statfs *fs, fs_type_magic magic_val);
__hidden extern FILE *fopen_cloexec(const char *path, const char *mode);
__hidden extern ssize_t lxc_sendfile_nointr(int out_fd, int in_fd, off_t *offset, size_t count);
__hidden extern char *file_to_buf(const char *path, size_t *length);
@@ -93,7 +93,7 @@
{
return __fd_to_fd(from, to) >= 0;
}
-__hidden extern int fd_cloexec(int fd, bool cloexec);
+__hidden extern int lxc_fd_cloexec(int fd, bool cloexec);
__hidden extern int lxc_open_dirfd(const char *dir);
__hidden extern FILE *fdopen_cached(int fd, const char *mode, void **caller_freed_buffer);
__hidden extern FILE *fdopen_at(int dfd, const char *path, const char *mode,
@@ -109,6 +109,7 @@
unsigned int o_flags,
unsigned int resolve_flags, mode_t mode);
__hidden extern int open_beneath(int dfd, const char *path, unsigned int flags);
+__hidden int fd_make_blocking(int fd);
__hidden int fd_make_nonblocking(int fd);
__hidden extern char *read_file_at(int dfd, const char *fnam,
unsigned int o_flags,
@@ -132,7 +133,7 @@
if (fd_dup < 0)
return -errno;
- if (fd_cloexec(fd_dup, true))
+ if (lxc_fd_cloexec(fd_dup, true))
return -errno;
return move_fd(fd_dup);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/initutils.c new/lxc-5.0.3/src/lxc/initutils.c
--- old/lxc-5.0.2/src/lxc/initutils.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/initutils.c 2023-07-26 00:00:11.000000000 +0200
@@ -224,7 +224,7 @@
* PR_SET_MM_MAP requires us to set it all at once, so we have to
* figure it out anyway.
*/
- unsigned long start_data, end_data, start_brk, start_code, end_code,
+ uint64_t start_data, end_data, start_brk, start_code, end_code,
start_stack, arg_start, arg_end, env_start, env_end, brk_val;
struct prctl_mm_map prctl_map;
@@ -242,32 +242,35 @@
buf[bytes_read] = '\0';
- /* Skip the first 25 fields, column 26-28 are start_code, end_code,
- * and start_stack */
- buf_ptr = strchr(buf, ' ');
+ /*
+ * executable names may contain spaces, so we search backwards for the
+ * ), which is the kernel's marker for "end of executable name". this
+ * puts the pointer at the end of the second field.
+ */
+ buf_ptr = strrchr(buf, ')');
+ if (!buf_ptr)
+ return -1;
+
+ /* Skip the space and the next 23 fields, column 26-28 are start_code,
+ * end_code, and start_stack */
for (i = 0; i < 24; i++) {
+ buf_ptr = strchr(buf_ptr + 1, ' ');
if (!buf_ptr)
return -1;
- buf_ptr = strchr(buf_ptr + 1, ' ');
}
- if (!buf_ptr)
- return -1;
- i = sscanf(buf_ptr, "%lu %lu %lu", &start_code, &end_code, &start_stack);
+ i = sscanf(buf_ptr, "%" PRIu64 " %" PRIu64 " %" PRIu64, &start_code, &end_code, &start_stack);
if (i != 3)
return -1;
/* Skip the next 19 fields, column 45-51 are start_data to arg_end */
for (i = 0; i < 19; i++) {
+ buf_ptr = strchr(buf_ptr + 1, ' ');
if (!buf_ptr)
return -1;
- buf_ptr = strchr(buf_ptr + 1, ' ');
}
- if (!buf_ptr)
- return -1;
-
- i = sscanf(buf_ptr, "%lu %lu %lu %*u %*u %lu %lu", &start_data,
+ i = sscanf(buf_ptr, "%" PRIu64 " %" PRIu64 " %" PRIu64 " %*u %*u %" PRIu64 " %" PRIu64, &start_data,
&end_data, &start_brk, &env_start, &env_end);
if (i != 5)
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/lsm/apparmor.c new/lxc-5.0.3/src/lxc/lsm/apparmor.c
--- old/lxc-5.0.2/src/lxc/lsm/apparmor.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/lsm/apparmor.c 2023-07-26 00:00:11.000000000 +0200
@@ -973,12 +973,14 @@
goto out;
}
old_len = profile_sb.st_size;
- old_content = lxc_strmmap(NULL, old_len, PROT_READ,
- MAP_PRIVATE, profile_fd, 0);
- if (old_content == MAP_FAILED) {
- SYSERROR("Failed to mmap old profile from %s",
- profile_path);
- goto out;
+ if (old_len) {
+ old_content = lxc_strmmap(NULL, old_len, PROT_READ,
+ MAP_PRIVATE, profile_fd, 0);
+ if (old_content == MAP_FAILED) {
+ SYSERROR("Failed to mmap old profile from %s",
+ profile_path);
+ goto out;
+ }
}
} else if (errno != ENOENT) {
SYSERROR("Error reading old profile from %s", profile_path);
@@ -994,14 +996,14 @@
if (!old_content || old_len != content_len || memcmp(old_content, new_content, content_len) != 0) {
char *path;
- ret = mkdir_p(APPARMOR_CACHE_DIR, 0755);
+ ret = lxc_mkdir_p(APPARMOR_CACHE_DIR, 0755);
if (ret < 0) {
SYSERROR("Error creating AppArmor profile cache directory " APPARMOR_CACHE_DIR);
goto out;
}
path = apparmor_dir(conf->name, lxcpath);
- ret = mkdir_p(path, 0755);
+ ret = lxc_mkdir_p(path, 0755);
if (ret < 0) {
SYSERROR("Error creating AppArmor profile directory: %s", path);
free(path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/lxccontainer.c new/lxc-5.0.3/src/lxc/lxccontainer.c
--- old/lxc-5.0.2/src/lxc/lxccontainer.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/lxccontainer.c 2023-07-26 00:00:11.000000000 +0200
@@ -4159,7 +4159,7 @@
i = get_next_index(snappath, c->name);
- if (mkdir_p(snappath, 0755) < 0) {
+ if (lxc_mkdir_p(snappath, 0755) < 0) {
ERROR("Failed to create snapshot directory %s", snappath);
return -1;
}
@@ -4174,7 +4174,7 @@
*/
flags = LXC_CLONE_SNAPSHOT | LXC_CLONE_KEEPMACADDR | LXC_CLONE_KEEPNAME |
LXC_CLONE_KEEPBDEVTYPE | LXC_CLONE_MAYBE_SNAPSHOT;
- if (storage_is_dir(c->lxc_conf)) {
+ if (storage_lxc_is_dir(c->lxc_conf)) {
ERROR("Snapshot of directory-backed container requested");
ERROR("Making a copy-clone. If you do want snapshots, then");
ERROR("please create overlay clone first, snapshot that");
@@ -4608,7 +4608,7 @@
_exit(EXIT_FAILURE);
directory_path = dirname(tmp);
- ret = mkdir_p(directory_path, 0755);
+ ret = lxc_mkdir_p(directory_path, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create path \"%s\"", directory_path);
free(tmp);
@@ -4978,7 +4978,7 @@
}
destdirname = dirname(dirdup);
- ret = mkdir_p(destdirname, 0755);
+ ret = lxc_mkdir_p(destdirname, 0755);
if (ret < 0) {
SYSERROR("Failed to create \"%s\"", destdirname);
free(dirdup);
@@ -5012,7 +5012,7 @@
char template[PATH_MAX], path[PATH_MAX];
pid_t pid, init_pid;
struct stat sb;
- bool is_dir;
+ bool lxc_is_dir;
int ret = -1, fd = -EBADF;
if (!c || !c->lxc_conf) {
@@ -5043,8 +5043,8 @@
}
}
- is_dir = (S_ISDIR(sb.st_mode) != 0);
- if (is_dir) {
+ lxc_is_dir = (S_ISDIR(sb.st_mode) != 0);
+ if (lxc_is_dir) {
sret = mkdtemp(template);
if (!sret) {
SYSERROR("Could not create shmounts temporary dir");
@@ -5133,7 +5133,7 @@
if (umount2(template, MNT_DETACH))
SYSWARN("Failed to remove temporary mount \"%s\"", template);
- if (is_dir)
+ if (lxc_is_dir)
(void)rmdir(template);
else
(void)unlink(template);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/lxclock.c new/lxc-5.0.3/src/lxc/lxclock.c
--- old/lxc-5.0.2/src/lxc/lxclock.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/lxclock.c 2023-07-26 00:00:11.000000000 +0200
@@ -105,7 +105,7 @@
if (ret < 0)
return NULL;
- ret = mkdir_p(dest, 0755);
+ ret = lxc_mkdir_p(dest, 0755);
if (ret < 0)
return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/mainloop.c new/lxc-5.0.3/src/lxc/mainloop.c
--- old/lxc-5.0.2/src/lxc/mainloop.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/mainloop.c 2023-07-26 00:00:11.000000000 +0200
@@ -163,6 +163,16 @@
io_uring_prep_poll_add(sqe, handler->fd, EPOLLIN);
/*
+ * FIXME: workaround an issue with false-positive
+ * io_uring POLL events when multishot mode is enabled.
+ *
+ * It's safe to override oneshot argument here, execution
+ * will go to the same codepath as if kernel lacks IORING_POLL_ADD_MULTI
+ * mode support.
+ */
+ oneshot = true;
+
+ /*
* Raise IORING_POLL_ADD_MULTI to set up a multishot poll. The same sqe
* will now produce multiple cqes. A cqe produced from a multishot sqe
* will raise IORING_CQE_F_MORE in cqe->flags.
@@ -205,7 +215,7 @@
return syserror_set(ENOENT,
"Failed to get submission queue entry");
- io_uring_prep_poll_remove(sqe, handler);
+ io_uring_prep_poll_remove(sqe, PTR_TO_U64(handler));
io_uring_sqe_set_data(sqe, handler);
ret = io_uring_submit(descr->ring);
if (ret < 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/monitor.c new/lxc-5.0.3/src/lxc/monitor.c
--- old/lxc-5.0.2/src/lxc/monitor.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/monitor.c 2023-07-26 00:00:11.000000000 +0200
@@ -54,7 +54,7 @@
free(rundir);
return -1;
}
- ret = mkdir_p(fifo_path, 0755);
+ ret = lxc_mkdir_p(fifo_path, 0755);
if (ret < 0) {
ERROR("Unable to create monitor fifo directory %s", fifo_path);
free(rundir);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/pam/pam_cgfs.c new/lxc-5.0.3/src/lxc/pam/pam_cgfs.c
--- old/lxc-5.0.2/src/lxc/pam/pam_cgfs.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/pam/pam_cgfs.c 2023-07-26 00:00:11.000000000 +0200
@@ -197,7 +197,7 @@
}
/* Create directory and (if necessary) its parents. */
-static bool mkdir_parent(const char *root, char *path)
+static bool lxc_mkdir_parent(const char *root, char *path)
{
char *b, orig, *e;
@@ -2042,7 +2042,7 @@
return our_cg;
}
- created = mkdir_parent(it->mountpoint, path);
+ created = lxc_mkdir_parent(it->mountpoint, path);
if (!created) {
free(path);
continue;
@@ -2198,7 +2198,7 @@
}
}
- created = mkdir_parent(v2->mountpoint, path);
+ created = lxc_mkdir_parent(v2->mountpoint, path);
if (!created) {
free(path);
return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/seccomp.c new/lxc-5.0.3/src/lxc/seccomp.c
--- old/lxc-5.0.2/src/lxc/seccomp.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/seccomp.c 2023-07-26 00:00:11.000000000 +0200
@@ -1282,8 +1282,8 @@
return -1;
}
- if (fd_make_nonblocking(ret))
- return log_error_errno(-1, errno, "Failed to make seccomp listener fd non-blocking");;
+ if (fd_make_blocking(ret))
+ return log_error_errno(-1, errno, "Failed to make seccomp listener fd blocking");
conf->seccomp.notifier.notify_fd = ret;
TRACE("Retrieved new seccomp listener fd %d", ret);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/dir.c new/lxc-5.0.3/src/lxc/storage/dir.c
--- old/lxc-5.0.2/src/lxc/storage/dir.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/dir.c 2023-07-26 00:00:11.000000000 +0200
@@ -81,7 +81,7 @@
if (!bdev_dest)
return ret_errno(ENOMEM);
- ret = mkdir_p(dest, 0755);
+ ret = lxc_mkdir_p(dest, 0755);
if (ret < 0)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", dest);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/loop.c new/lxc-5.0.3/src/lxc/storage/loop.c
--- old/lxc-5.0.2/src/lxc/storage/loop.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/loop.c 2023-07-26 00:00:11.000000000 +0200
@@ -165,7 +165,7 @@
return -1;
}
- ret = mkdir_p(bdev->dest, 0755);
+ ret = lxc_mkdir_p(bdev->dest, 0755);
if (ret < 0) {
ERROR("Failed creating directory \"%s\"", bdev->dest);
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/lvm.c new/lxc-5.0.3/src/lxc/storage/lvm.c
--- old/lxc-5.0.2/src/lxc/storage/lvm.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/lvm.c 2023-07-26 00:00:11.000000000 +0200
@@ -456,7 +456,7 @@
return -1;
}
- ret = mkdir_p(new->dest, 0755);
+ ret = lxc_mkdir_p(new->dest, 0755);
if (ret < 0) {
SYSERROR("Failed to create directory \"%s\"", new->dest);
return -1;
@@ -645,7 +645,7 @@
return -1;
}
- ret = mkdir_p(bdev->dest, 0755);
+ ret = lxc_mkdir_p(bdev->dest, 0755);
if (ret < 0) {
SYSERROR("Failed to create directory \"%s\"", bdev->dest);
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/overlay.c new/lxc-5.0.3/src/lxc/storage/overlay.c
--- old/lxc-5.0.2/src/lxc/storage/overlay.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/overlay.c 2023-07-26 00:00:11.000000000 +0200
@@ -50,7 +50,7 @@
new->dest = must_make_path(lxcpath, cname, "rootfs", NULL);
- ret = mkdir_p(new->dest, 0755);
+ ret = lxc_mkdir_p(new->dest, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create directory \"%s\"", new->dest);
return -1;
@@ -68,7 +68,7 @@
delta = must_make_path(lxcpath, cname, LXC_OVERLAY_DELTA_PATH, NULL);
- ret = mkdir_p(delta, 0755);
+ ret = lxc_mkdir_p(delta, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", delta);
@@ -83,7 +83,7 @@
*/
work = must_make_path(lxcpath, cname, LXC_OVERLAY_WORK_PATH, NULL);
- ret = mkdir_p(work, 0755);
+ ret = lxc_mkdir_p(work, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", work);
@@ -142,7 +142,7 @@
odelta++;
ndelta = must_make_path(lxcpath, cname, LXC_OVERLAY_DELTA_PATH, NULL);
- ret = mkdir_p(ndelta, 0755);
+ ret = lxc_mkdir_p(ndelta, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", ndelta);
@@ -150,7 +150,7 @@
* further up.).
*/
work = must_make_path(lxcpath, cname, LXC_OVERLAY_WORK_PATH, NULL);
- ret = mkdir_p(work, 0755);
+ ret = lxc_mkdir_p(work, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", ndelta);
@@ -191,11 +191,11 @@
* don't need to record a dependency. If we would restore would
* also fail.
*/
- clean_old_path = path_simplify(oldpath);
+ clean_old_path = lxc_path_simplify(oldpath);
if (!clean_old_path)
return log_error_errno(-ENOMEM, ENOMEM, "Failed to create clean path for \"%s\"", oldpath);
- clean_new_path = path_simplify(lxcpath);
+ clean_new_path = lxc_path_simplify(lxcpath);
if (!clean_new_path)
return log_error_errno(-ENOMEM, ENOMEM, "Failed to create clean path for \"%s\"", lxcpath);
@@ -271,7 +271,7 @@
delta = must_make_path(tmp, LXC_OVERLAY_DELTA_PATH, NULL);
- ret = mkdir_p(delta, 0755);
+ ret = lxc_mkdir_p(delta, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", delta);
@@ -298,7 +298,7 @@
if (ret < 0 || (size_t)ret >= len)
return log_error_errno(-EIO, EIO, "Failed to create rootfs path");
- ret = mkdir_p(bdev->dest, 0755);
+ ret = lxc_mkdir_p(bdev->dest, 0755);
if (ret < 0 && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", bdev->dest);
@@ -389,7 +389,7 @@
upper++;
/* if delta doesn't yet exist, create it */
- ret = mkdir_p(upper, 0755);
+ ret = lxc_mkdir_p(upper, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create directory \"%s\"", upper);
free(dup);
@@ -422,7 +422,7 @@
return -22;
}
- ret = mkdir_p(work, 0755);
+ ret = lxc_mkdir_p(work, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create directory \"%s\"", work);
free(mntdata);
@@ -623,10 +623,10 @@
ret = 0;
if (upperdir) {
if (!rootfs_path)
- ret = mkdir_p(upperdir, 0755);
+ ret = lxc_mkdir_p(upperdir, 0755);
else if (!strncmp(upperdir, lxcpath, dirlen) &&
strncmp(upperdir, rootfs_dir, rootfslen))
- ret = mkdir_p(upperdir, 0755);
+ ret = lxc_mkdir_p(upperdir, 0755);
if (ret < 0)
SYSWARN("Failed to create directory \"%s\"", upperdir);
@@ -635,10 +635,10 @@
ret = 0;
if (workdir) {
if (!rootfs_path)
- ret = mkdir_p(workdir, 0755);
+ ret = lxc_mkdir_p(workdir, 0755);
else if (!strncmp(workdir, lxcpath, dirlen) &&
strncmp(workdir, rootfs_dir, rootfslen))
- ret = mkdir_p(workdir, 0755);
+ ret = lxc_mkdir_p(workdir, 0755);
if (ret < 0)
SYSWARN("Failed to create directory \"%s\"", workdir);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/rbd.c new/lxc-5.0.3/src/lxc/storage/rbd.c
--- old/lxc-5.0.2/src/lxc/storage/rbd.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/rbd.c 2023-07-26 00:00:11.000000000 +0200
@@ -160,7 +160,7 @@
return -1;
}
- ret = mkdir_p(bdev->dest, 0755);
+ ret = lxc_mkdir_p(bdev->dest, 0755);
if (ret < 0 && errno != EEXIST) {
ERROR("Failed to create directory \"%s\"", bdev->dest);
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/storage.c new/lxc-5.0.3/src/lxc/storage/storage.c
--- old/lxc-5.0.2/src/lxc/storage/storage.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/storage.c 2023-07-26 00:00:11.000000000 +0200
@@ -370,7 +370,7 @@
ret = stat(orig->dest, &sb);
if (ret < 0 && errno == ENOENT) {
- ret = mkdir_p(orig->dest, 0755);
+ ret = lxc_mkdir_p(orig->dest, 0755);
if (ret < 0)
WARN("Failed to create directory \"%s\"", orig->dest);
}
@@ -638,7 +638,7 @@
return bdev;
}
-bool storage_is_dir(struct lxc_conf *conf)
+bool storage_lxc_is_dir(struct lxc_conf *conf)
{
struct lxc_storage *orig;
char *type = conf->rootfs.bdev_type;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/storage.h new/lxc-5.0.3/src/lxc/storage/storage.h
--- old/lxc-5.0.2/src/lxc/storage/storage.h 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/storage.h 2023-07-26 00:00:11.000000000 +0200
@@ -94,7 +94,7 @@
};
/**
- * storage_is_dir : Check whether the roots is a directory. This function will
+ * storage_lxc_is_dir : Check whether the roots is a directory. This function will
* trust the config file. If the config file key
* lxc.rootfs.path is set to <storage type>:<container path>
* the confile parser will have split this into <storage type>
@@ -105,7 +105,7 @@
* type specifications. If the <storage type> prefix is not
* detected liblxc will try to detect the storage type.
*/
-__hidden extern bool storage_is_dir(struct lxc_conf *conf);
+__hidden extern bool storage_lxc_is_dir(struct lxc_conf *conf);
__hidden extern bool storage_can_backup(struct lxc_conf *conf);
__hidden extern struct lxc_storage *storage_init(struct lxc_conf *conf);
__hidden extern struct lxc_storage *storage_copy(struct lxc_container *c, const char *cname,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/storage/zfs.c new/lxc-5.0.3/src/lxc/storage/zfs.c
--- old/lxc-5.0.2/src/lxc/storage/zfs.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/storage/zfs.c 2023-07-26 00:00:11.000000000 +0200
@@ -293,7 +293,7 @@
TRACE("Created zfs dataset \"%s\"", new->src);
}
- ret = mkdir_p(new->dest, 0755);
+ ret = lxc_mkdir_p(new->dest, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create directory \"%s\"", new->dest);
return false;
@@ -542,7 +542,7 @@
return -1;
}
- ret = mkdir_p(new->dest, 0755);
+ ret = lxc_mkdir_p(new->dest, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create directory \"%s\"", new->dest);
return -1;
@@ -740,7 +740,7 @@
TRACE("Created zfs dataset \"%s\"", bdev->src);
}
- ret = mkdir_p(bdev->dest, 0755);
+ ret = lxc_mkdir_p(bdev->dest, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create directory \"%s\"", bdev->dest);
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/string_utils.c new/lxc-5.0.3/src/lxc/string_utils.c
--- old/lxc-5.0.2/src/lxc/string_utils.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/string_utils.c 2023-07-26 00:00:11.000000000 +0200
@@ -187,7 +187,7 @@
}
/* taken from systemd */
-char *path_simplify(const char *path)
+char *lxc_path_simplify(const char *path)
{
__do_free char *path_new = NULL;
char *f, *t;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/string_utils.h new/lxc-5.0.3/src/lxc/string_utils.h
--- old/lxc-5.0.2/src/lxc/string_utils.h 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/string_utils.h 2023-07-26 00:00:11.000000000 +0200
@@ -188,6 +188,6 @@
(__iterator = __it); \
__iterator = __it = strtok_r(NULL, __separators, &__p))
-__hidden extern char *path_simplify(const char *path);
+__hidden extern char *lxc_path_simplify(const char *path);
#endif /* __LXC_STRING_UTILS_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/terminal.c new/lxc-5.0.3/src/lxc/terminal.c
--- old/lxc-5.0.2/src/lxc/terminal.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/terminal.c 2023-07-26 00:00:11.000000000 +0200
@@ -334,9 +334,12 @@
int r, w, w_log, w_rbuf;
w = r = lxc_read_nointr(terminal->ptx, buf, sizeof(buf));
- if (r <= 0)
- return -1;
+ if (r <= 0) {
+ if (errno == EWOULDBLOCK)
+ return 0;
+ return -1;
+ }
w_rbuf = w_log = 0;
/* write to peer first */
if (terminal->peer >= 0)
@@ -370,8 +373,12 @@
int r, w;
w = r = lxc_read_nointr(terminal->peer, buf, sizeof(buf));
- if (r <= 0)
+ if (r <= 0) {
+ if (errno == EWOULDBLOCK)
+ return 0;
+
return -1;
+ }
w = lxc_write_nointr(terminal->ptx, buf, r);
if (w != r)
@@ -415,6 +422,9 @@
int ret;
if (terminal->peer >= 0) {
+ if (fd_make_nonblocking(terminal->peer))
+ return log_error_errno(-1, errno, "Failed to make terminal peer fd non-blocking");
+
ret = lxc_mainloop_add_handler(terminal->descr, terminal->peer,
lxc_terminal_peer_io_handler,
default_cleanup_handler,
@@ -452,6 +462,9 @@
return 0;
}
+ if (fd_make_nonblocking(terminal->ptx))
+ return log_error_errno(-1, errno, "Failed to make terminal ptx fd non-blocking");
+
ret = lxc_mainloop_add_handler(descr, terminal->ptx,
lxc_terminal_ptx_io_handler,
default_cleanup_handler,
@@ -577,13 +590,13 @@
goto on_error;
}
- ret = fd_cloexec(terminal->proxy.ptx, true);
+ ret = lxc_fd_cloexec(terminal->proxy.ptx, true);
if (ret < 0) {
SYSERROR("Failed to set FD_CLOEXEC flag on proxy terminal ptx");
goto on_error;
}
- ret = fd_cloexec(terminal->proxy.pty, true);
+ ret = lxc_fd_cloexec(terminal->proxy.pty, true);
if (ret < 0) {
SYSERROR("Failed to set FD_CLOEXEC flag on proxy terminal pty");
goto on_error;
@@ -917,13 +930,13 @@
goto err;
}
- ret = fd_cloexec(terminal->ptx, true);
+ ret = lxc_fd_cloexec(terminal->ptx, true);
if (ret < 0) {
SYSERROR("Failed to set FD_CLOEXEC flag on terminal ptx");
goto err;
}
- ret = fd_cloexec(terminal->pty, true);
+ ret = lxc_fd_cloexec(terminal->pty, true);
if (ret < 0) {
SYSERROR("Failed to set FD_CLOEXEC flag on terminal pty");
goto err;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/tools/lxc_copy.c new/lxc-5.0.3/src/lxc/tools/lxc_copy.c
--- old/lxc-5.0.2/src/lxc/tools/lxc_copy.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/tools/lxc_copy.c 2023-07-26 00:00:11.000000000 +0200
@@ -358,7 +358,7 @@
goto err;
} else if (m->mnt_type == LXC_MNT_BIND) {
len = strlen(" none bind,optional,, 0 0") +
- strlen(is_dir(m->src) ? "create=dir" : "create=file") +
+ strlen(lxc_is_dir(m->src) ? "create=dir" : "create=file") +
strlen(m->src) + strlen(m->dest) + strlen(m->options) + 1;
mntentry = malloc(len);
@@ -367,7 +367,7 @@
ret = snprintf(mntentry, len, "%s %s none bind,optional,%s,%s 0 0",
m->src, m->dest, m->options,
- is_dir(m->src) ? "create=dir" : "create=file");
+ lxc_is_dir(m->src) ? "create=dir" : "create=file");
if (ret < 0 || (size_t)ret >= len)
goto err;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/tools/lxc_create.c new/lxc-5.0.3/src/lxc/tools/lxc_create.c
--- old/lxc-5.0.2/src/lxc/tools/lxc_create.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/tools/lxc_create.c 2023-07-26 00:00:11.000000000 +0200
@@ -244,7 +244,7 @@
if (!my_args.lxcpath[0])
my_args.lxcpath[0] = lxc_get_global_config_item("lxc.lxcpath");
- if (mkdir_p(my_args.lxcpath[0], 0755))
+ if (lxc_mkdir_p(my_args.lxcpath[0], 0755))
exit(EXIT_FAILURE);
if (geteuid())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/utils.c new/lxc-5.0.3/src/lxc/utils.c
--- old/lxc-5.0.2/src/lxc/utils.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/utils.c 2023-07-26 00:00:11.000000000 +0200
@@ -212,7 +212,7 @@
return 0;
}
-int mkdir_p(const char *dir, mode_t mode)
+int lxc_mkdir_p(const char *dir, mode_t mode)
{
const char *tmp = dir;
const char *orig = dir;
@@ -1690,7 +1690,7 @@
if (dupfd < 0)
return -1;
- if (fd_cloexec(dupfd, true) < 0)
+ if (lxc_fd_cloexec(dupfd, true) < 0)
return -1;
f = fdopen(dupfd, "re");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/lxc/utils.h new/lxc-5.0.3/src/lxc/utils.h
--- old/lxc-5.0.2/src/lxc/utils.h 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/lxc/utils.h 2023-07-26 00:00:11.000000000 +0200
@@ -26,7 +26,7 @@
/* returns 1 on success, 0 if there were any failures */
__hidden extern int lxc_rmdir_onedev(const char *path, const char *exclude);
__hidden extern int get_u16(unsigned short *val, const char *arg, int base);
-__hidden extern int mkdir_p(const char *dir, mode_t mode);
+__hidden extern int lxc_mkdir_p(const char *dir, mode_t mode);
__hidden extern char *get_rundir(void);
/* Define getline() if missing from the C library */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/tests/console_log.c new/lxc-5.0.3/src/tests/console_log.c
--- old/lxc-5.0.2/src/tests/console_log.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/tests/console_log.c 2023-07-26 00:00:11.000000000 +0200
@@ -133,6 +133,11 @@
goto on_error_stop;
}
+ if (!c->wait(c, "STOPPED", 5)) {
+ lxc_error("%s\n", "Failed waiting for container \"console-log\" to stop");
+ goto on_error_stop;
+ }
+
c->clear_config(c);
if (!c->load_config(c, NULL)) {
@@ -165,6 +170,11 @@
goto on_error_stop;
}
+ if (!c->wait(c, "STOPPED", 5)) {
+ lxc_error("%s\n", "Failed waiting for container \"console-log\" to stop");
+ goto on_error_stop;
+ }
+
if (!c->startl(c, 0, NULL)) {
lxc_error("%s\n", "Failed to start container \"console-log\" daemonized");
goto on_error_destroy;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/tests/createtest.c new/lxc-5.0.3/src/tests/createtest.c
--- old/lxc-5.0.2/src/tests/createtest.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/tests/createtest.c 2023-07-26 00:00:11.000000000 +0200
@@ -56,7 +56,7 @@
c->set_config_item(c, "lxc.net.0.flags", "up");
if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
- fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__);
+ fprintf(stderr, "%d: failed to create a container\n", __LINE__);
goto out;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/tests/get_item.c new/lxc-5.0.3/src/tests/get_item.c
--- old/lxc-5.0.2/src/tests/get_item.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/tests/get_item.c 2023-07-26 00:00:11.000000000 +0200
@@ -509,7 +509,7 @@
}
if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
- fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__);
+ fprintf(stderr, "%d: failed to create a container\n", __LINE__);
goto out;
}
lxc_container_put(c);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/tests/lxc-test-fuzzers new/lxc-5.0.3/src/tests/lxc-test-fuzzers
--- old/lxc-5.0.2/src/tests/lxc-test-fuzzers 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/tests/lxc-test-fuzzers 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-set -eux
-set -o pipefail
-
-TMP_DIR=$(mktemp -d)
-export ASAN_OPTIONS=${ASAN_OPTIONS:-detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:strict_string_checks=1}
-export UBSAN_OPTIONS=${UBSAN_OPTIONS:-print_stacktrace=1:print_summary=1:halt_on_error=1}
-
-cleanup() {
- rm -rf "$TMP_DIR"
-}
-
-trap cleanup exit
-
-for fuzzer in /usr/bin/fuzz-lxc-*; do
- name=$(basename "$fuzzer")
- corpus_dir="$TMP_DIR/$name"
-
- mkdir -p "$corpus_dir"
- if wget --directory-prefix="$TMP_DIR" https://storage.googleapis.com/lxc-backup.clusterfuzz-external.appspot.com/…; then
- unzip -q -d "$corpus_dir" "$TMP_DIR/public.zip"
- fi
- "$fuzzer" -max_total_time=120 "$corpus_dir"
-done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/tests/lxc-test-utils.c new/lxc-5.0.3/src/tests/lxc-test-utils.c
--- old/lxc-5.0.2/src/tests/lxc-test-utils.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/tests/lxc-test-utils.c 2023-07-26 00:00:11.000000000 +0200
@@ -43,12 +43,12 @@
#include "macro.h"
#include "utils.h"
-void test_path_simplify(void)
+void test_lxc_path_simplify(void)
{
char *s = "/A///B//C/D/E/";
char *t;
- t = path_simplify(s);
+ t = lxc_path_simplify(s);
if (!t)
exit(EXIT_FAILURE);
@@ -57,7 +57,7 @@
s = "/A";
- t = path_simplify(s);
+ t = lxc_path_simplify(s);
if (!t)
exit(EXIT_FAILURE);
@@ -65,7 +65,7 @@
free(t);
s = "";
- t = path_simplify(s);
+ t = lxc_path_simplify(s);
if (!t)
exit(EXIT_FAILURE);
@@ -74,7 +74,7 @@
s = "//";
- t = path_simplify(s);
+ t = lxc_path_simplify(s);
if (!t)
exit(EXIT_FAILURE);
@@ -607,7 +607,7 @@
{
test_lxc_string_replace();
test_lxc_string_in_array();
- test_path_simplify();
+ test_lxc_path_simplify();
test_detect_ramfs_rootfs();
test_lxc_safe_uint();
test_lxc_safe_int();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/tests/mount_injection.c new/lxc-5.0.3/src/tests/mount_injection.c
--- old/lxc-5.0.2/src/tests/mount_injection.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/tests/mount_injection.c 2023-07-26 00:00:11.000000000 +0200
@@ -391,7 +391,7 @@
{
int ret;
- ret = mkdir_p(shmount_path, 0711);
+ ret = lxc_mkdir_p(shmount_path, 0711);
if (ret < 0 && errno != EEXIST) {
fprintf(stderr, "Failed to create directory \"%s\"\n", shmount_path);
return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/src/tests/parse_config_file.c new/lxc-5.0.3/src/tests/parse_config_file.c
--- old/lxc-5.0.2/src/tests/parse_config_file.c 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/src/tests/parse_config_file.c 2023-07-26 00:00:11.000000000 +0200
@@ -576,7 +576,14 @@
goto non_test_error;
}
- if (set_get_compare_clear_save_load(c, "lxc.seccomp.profile", "/some/seccomp/file", tmpf, true) < 0) {
+ ret = set_get_compare_clear_save_load(c, "lxc.seccomp.profile", "/some/seccomp/file", tmpf, true);
+
+#if HAVE_SECCOMP
+ if (ret < 0)
+#else
+ if (ret == 0)
+#endif
+ {
lxc_error("%s\n", "lxc.seccomp.profile");
goto non_test_error;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxc-5.0.2/templates/lxc-oci.in new/lxc-5.0.3/templates/lxc-oci.in
--- old/lxc-5.0.2/templates/lxc-oci.in 2023-01-16 22:08:50.000000000 +0100
+++ new/lxc-5.0.3/templates/lxc-oci.in 2023-07-26 00:00:11.000000000 +0200
@@ -36,16 +36,19 @@
LOCALSTATEDIR=@LOCALSTATEDIR@
LXC_TEMPLATE_CONFIG=@LXCTEMPLATECONFIG@
LXC_HOOK_DIR=@LXCHOOKDIR@
+MOUNT_HELPER="atomfs"
+MOUNTED_WORKDIR=""
# Some useful functions
cleanup() {
- if [ -d "${DOWNLOAD_TEMP}" ]; then
- rm -Rf "${DOWNLOAD_TEMP}"
- fi
-
if [ -d "${LXC_ROOTFS}.tmp" ]; then
rm -Rf "${LXC_ROOTFS}.tmp"
fi
+ if [ -n "${MOUNTED_WORKDIR}" ]; then
+ echo "${MOUNT_HELPER} unmount ${MOUNTED_WORKDIR}" >&2
+ "${MOUNT_HELPER}" umount "${MOUNTED_WORKDIR}"
+ MOUNTED_WORKDIR=""
+ fi
}
in_userns() {
@@ -72,28 +75,50 @@
}
getconfigpath() {
- basedir="$1"
- q="$2"
-
- digest=$(jq -c -r --arg q "$q" '.manifests[] | if .annotations."org.opencontainers.image.ref.name" == $q then .digest else empty end' < "${basedir}/index.json")
- if [ -z "${digest}" ]; then
- echo "$q not found in index.json" >&2
- return
- fi
-
- # Ok we have the image config digest, now get the config from that
+ local basedir="$1" mfpath="$2" cdigest=""
+ # Ok we have the image config digest, now get the config ref from the manifest.
# shellcheck disable=SC2039
- d=${digest:7}
- cdigest=$(jq -c -r '.config.digest' < "${basedir}/blobs/sha256/${d}")
+ cdigest=$(jq -c -r '.config.digest' < "$mfpath")
if [ -z "${cdigest}" ]; then
echo "container config not found" >&2
return
fi
- # shellcheck disable=SC2039
- d2=${cdigest:7}
- echo "${basedir}/blobs/sha256/${d2}"
- return
+ # cdigest is '<hashtype>:<hash>', so 'ht' gets type, hv gets value.
+ local ht="${cdigest%%:*}" hv="${cdigest#*:}" p=""
+ p="$basedir/blobs/$ht/$hv"
+ if [ ! -f "$p" ]; then
+ echo "config file did not exist for digest $cdigest" >&2
+ return 1
+ fi
+ echo "$p"
+}
+
+getmanifestpath() {
+ local basedir="$1" ref="$2" p=""
+ # if given 'sha256:<hash>' then return the blobs/sha256/hash
+ case "$ref" in
+ sha256:*)
+ p="$basedir/blobs/sha256/${ref#sha256:}"
+ [ -f "$p" ] && echo "$p" && return 0
+ echo "could not find manifest path to blob $ref. file did not exist: $p" >&2
+ return 1
+ ;;
+ esac
+ # find the reference by annotation
+ local blobref="" hashtype="" hashval=""
+ blobref=$(jq -c -r --arg q "$ref" '.manifests[] | if .annotations."org.opencontainers.image.ref.name" == $q then .digest else empty end' < "${basedir}/index.json")
+ # blobref is 'hashtype:hash'
+ hashtype="${blobref%%:*}"
+ hashval="${blobref#*:}"
+ p="$basedir/blobs/$hashtype/$hashval"
+ [ -f "$p" ] && echo "$p" && return 0
+ echo "did not find manifest for $ref. file did not exist: $p" >&2
+ return 1
+}
+
+getlayermediatype() {
+ jq -c -r '.layers[0].mediaType' <"$1"
}
# Get entrypoint from oci image. Use sh if unspecified
@@ -211,6 +236,13 @@
Optional arguments:
[ --username <username> ]: The username for the registry
[ --password <password> ]: The password for the registry
+[ --mount-helper <command> ]: program that will be used to mount. default is 'atomfs'
+
+ mount-helper is expected to support being called with 'mount'
+ and 'umount' subcommands as below:
+
+ mount-helper mount oci:<oci_dir>:<oci_name> <mountpoint>
+ mount-helper umount <mountpoint>
LXC internal arguments (do not pass manually!):
[ --name <name> ]: The container name
@@ -222,7 +254,7 @@
return 0
}
-if ! options=$(getopt -o u:h -l help,url:,username:,password:,no-cache,dhcp,name:,path:,rootfs:,mapped-uid:,mapped-gid: -- "$@"); then
+if ! options=$(getopt -o u:h -l help,url:,username:,password:,no-cache,dhcp,name:,path:,rootfs:,mapped-uid:,mapped-gid:,mount-helper: -- "$@"); then
usage
exit 1
fi
@@ -253,6 +285,7 @@
--rootfs) LXC_ROOTFS=$2; shift 2;;
--mapped-uid) LXC_MAPPED_UID=$2; shift 2;;
--mapped-gid) LXC_MAPPED_GID=$2; shift 2;;
+ --mount-helper) MOUNT_HELPER=$2; shift 2;;
*) break;;
esac
done
@@ -289,6 +322,7 @@
fi
fi
+OCI_DIR="$LXC_PATH/oci"
if [ "${OCI_USE_CACHE}" = "true" ]; then
if [ "$USERNS" = "yes" ]; then
DOWNLOAD_BASE="${HOME}/.cache/lxc"
@@ -296,23 +330,16 @@
DOWNLOAD_BASE="${LOCALSTATEDIR}/cache/lxc"
fi
else
- DOWNLOAD_BASE=/tmp
+ DOWNLOAD_BASE="$OCI_DIR"
fi
mkdir -p "${DOWNLOAD_BASE}"
# Trap all exit signals
trap cleanup EXIT HUP INT TERM
-if ! command -v mktemp >/dev/null 2>&1; then
- DOWNLOAD_TEMP="${DOWNLOAD_BASE}/lxc-oci.$$"
- mkdir -p "${DOWNLOAD_TEMP}"
-else
- DOWNLOAD_TEMP=$(mktemp -d -p "${DOWNLOAD_BASE}")
-fi
-
# Download the image
# shellcheck disable=SC2039
-skopeo_args=("")
+skopeo_args=("--remove-signatures" "--insecure-policy")
if [ -n "$OCI_USERNAME" ]; then
CREDENTIALS="${OCI_USERNAME}"
@@ -324,38 +351,66 @@
skopeo_args+=(--src-creds "${CREDENTIALS}")
fi
+OCI_NAME="$LXC_NAME"
if [ "${OCI_USE_CACHE}" = "true" ]; then
- # shellcheck disable=SC2039
- # shellcheck disable=SC2068
skopeo_args+=(--dest-shared-blob-dir "${DOWNLOAD_BASE}")
- # shellcheck disable=SC2039
- # shellcheck disable=SC2068
- skopeo copy ${skopeo_args[@]} "${OCI_URL}" "oci:${DOWNLOAD_TEMP}:latest"
- ln -s "${DOWNLOAD_BASE}/sha256" "${DOWNLOAD_TEMP}/blobs/sha256"
-else
- # shellcheck disable=SC2039
- # shellcheck disable=SC2068
- skopeo copy ${skopeo_args[@]} "${OCI_URL}" "oci:${DOWNLOAD_TEMP}:latest"
+ mkdir -p "${OCI_DIR}/blobs/"
+ ln -s "${DOWNLOAD_BASE}/sha256" "${OCI_DIR}/blobs/sha256"
fi
-echo "Unpacking the rootfs"
-# shellcheck disable=SC2039
-umoci_args=("")
-if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ]; then
- # shellcheck disable=SC2039
- umoci_args+=(--rootless)
-fi
-# shellcheck disable=SC2039
-# shellcheck disable=SC2068
-umoci --log=error unpack ${umoci_args[@]} --image "${DOWNLOAD_TEMP}:latest" "${LXC_ROOTFS}.tmp"
-find "${LXC_ROOTFS}.tmp/rootfs" -mindepth 1 -maxdepth 1 -exec mv '{}' "${LXC_ROOTFS}/" \;
+skopeo copy "${skopeo_args[@]}" "${OCI_URL}" "oci:${OCI_DIR}:${OCI_NAME}"
+
+mfpath=$(getmanifestpath "${OCI_DIR}" "${OCI_NAME}")
+OCI_CONF_FILE=$(getconfigpath "${OCI_DIR}" "$mfpath")
+mediatype=$(getlayermediatype "$mfpath")
+echo "mfpath=$mfpath conf=$OCI_CONF_FILE" 1>&2
+echo "mediatype=$mediatype" >&2
+
+case "$mediatype" in
+ #application/vnd.oci.image.layer.v1.tar+gzip
+ application/vnd.oci.image.layer.v1.tar*)
+ echo "Unpacking tar rootfs" 2>&1
+ # shellcheck disable=SC2039
+ umoci_args=("")
+ if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ]; then
+ # shellcheck disable=SC2039
+ umoci_args+=(--rootless)
+ fi
+ # shellcheck disable=SC2039
+ # shellcheck disable=SC2068
+ umoci --log=error unpack ${umoci_args[@]} --image "${OCI_DIR}:${OCI_NAME}" "${LXC_ROOTFS}.tmp"
+ find "${LXC_ROOTFS}.tmp/rootfs" -mindepth 1 -maxdepth 1 -exec mv '{}' "${LXC_ROOTFS}/" \;
+ ;;
+ #application/vnd.stacker.image.layer.squashfs+zstd+verity
+ application/vnd.*.image.layer.squashfs*)
+ if ! command -v "${MOUNT_HELPER}" >/dev/null 2>&1; then
+ echo "media type $mediatype requires $MOUNT_HELPER" >&2
+ exit 1
+ fi
+ echo "$MOUNT_HELPER mount ${OCI_DIR}:${OCI_NAME} $LXC_ROOTFS" >&2
+ "$MOUNT_HELPER" mount "${OCI_DIR}:${OCI_NAME}" "$LXC_ROOTFS"
+ MOUNTED_WORKDIR="$LXC_ROOTFS"
+ ;;
+ *)
+ echo "Unknown media type $mediatype" >&2
+ exit 1
+ ;;
+esac
-OCI_CONF_FILE=$(getconfigpath "${DOWNLOAD_TEMP}" latest)
LXC_CONF_FILE="${LXC_PATH}/config"
entrypoint=$(getep "${OCI_CONF_FILE}")
echo "lxc.execute.cmd = '${entrypoint}'" >> "${LXC_CONF_FILE}"
echo "lxc.mount.auto = proc:mixed sys:mixed cgroup:mixed" >> "${LXC_CONF_FILE}"
+case "$mediatype" in
+ application/vnd.*.image.layer.squashfs*)
+ echo "lxc.hook.version = 1" >> "${LXC_CONF_FILE}"
+ # shellcheck disable=SC2016
+ echo "lxc.hook.pre-mount = $MOUNT_HELPER mount" \
+ '${LXC_ROOTFS_PATH}/../oci:${LXC_NAME} ${LXC_ROOTFS_PATH}' \
+ >> "${LXC_CONF_FILE}";;
+esac
+
environment=$(getenv "${OCI_CONF_FILE}")
# shellcheck disable=SC2039
while read -r line; do
1
0