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
January 2018
- 1 participants
- 2007 discussions
Hello community,
here is the log from the commit of package python-tox for openSUSE:Factory checked in at 2018-01-02 16:31:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tox (Old)
and /work/SRC/openSUSE:Factory/.python-tox.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tox"
Tue Jan 2 16:31:56 2018 rev:21 rq:559371 version:2.9.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tox/python-tox.changes 2017-10-07 17:47:02.784849643 +0200
+++ /work/SRC/openSUSE:Factory/.python-tox.new/python-tox.changes 2018-01-02 16:32:02.863299088 +0100
@@ -1,0 +2,5 @@
+Fri Dec 22 13:02:40 UTC 2017 - dimstar(a)opensuse.org
+
+- Fix generation of html documentation.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-tox.spec ++++++
--- /var/tmp/diff_new_pack.Vl60mR/_old 2018-01-02 16:32:04.574728382 +0100
+++ /var/tmp/diff_new_pack.Vl60mR/_new 2018-01-02 16:32:04.578727049 +0100
@@ -89,7 +89,7 @@
%build
%python_build
-cd doc && make html && rm -r _build/html/.buildinfo # Generate HTML documentation
+python3 setup.py build_sphinx && rm -r doc/build/html/.buildinfo # Generate HTML documentation
%install
%python_install
@@ -124,6 +124,6 @@
%{python_sitelib}/tox
%files -n %{name}-doc
-%doc LICENSE README.rst doc/_build/html
+%doc LICENSE README.rst doc/build/html
%changelog
1
0
Hello community,
here is the log from the commit of package tiff for openSUSE:Factory checked in at 2018-01-02 16:31:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tiff (Old)
and /work/SRC/openSUSE:Factory/.tiff.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tiff"
Tue Jan 2 16:31:45 2018 rev:69 rq:559098 version:4.0.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/tiff/tiff.changes 2017-12-15 13:59:24.573925116 +0100
+++ /work/SRC/openSUSE:Factory/.tiff.new/tiff.changes 2018-01-02 16:31:49.579728714 +0100
@@ -1,0 +2,9 @@
+Thu Dec 21 13:03:18 UTC 2017 - dimstar(a)opensuse.org
+
+- Fix check section:
+ + Make sure to get back to the right directory after chdir to
+ 'tools', or we can't run the 2nd test suite.
+ + Fix typo: the tests are located in a directory called 'test',
+ not 'tests'.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tiff.spec ++++++
--- /var/tmp/diff_new_pack.emAjeE/_old 2018-01-02 16:31:51.343140676 +0100
+++ /var/tmp/diff_new_pack.emAjeE/_new 2018-01-02 16:31:51.343140676 +0100
@@ -114,8 +114,8 @@
find html -name "Makefile*" | xargs rm
%check
-for i in tools tests; do
- cd $i && make %{?_smp_mflags} check
+for i in tools test; do
+ (cd $i && make %{?_smp_mflags} check)
done
%post -n libtiff5 -p /sbin/ldconfig
1
0
Hello community,
here is the log from the commit of package systemd-rpm-macros for openSUSE:Factory checked in at 2018-01-02 16:31:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/systemd-rpm-macros (Old)
and /work/SRC/openSUSE:Factory/.systemd-rpm-macros.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "systemd-rpm-macros"
Tue Jan 2 16:31:39 2018 rev:22 rq:557293 version:3
Changes:
--------
--- /work/SRC/openSUSE:Factory/systemd-rpm-macros/systemd-rpm-macros.changes 2017-11-21 15:17:50.592807895 +0100
+++ /work/SRC/openSUSE:Factory/.systemd-rpm-macros.new/systemd-rpm-macros.changes 2018-01-02 16:31:39.719016929 +0100
@@ -1,0 +2,55 @@
+Thu Dec 14 08:39:15 UTC 2017 - fbui(a)suse.com
+
+- Move macros.systemd in /usr/lib/rpm
+
+ The file is not supposed to be customized by the user.
+
+-------------------------------------------------------------------
+Wed Dec 13 17:14:25 UTC 2017 - fbui(a)suse.com
+
+- Make %systemd_add_pre() more similar to %systemd_add_post()
+
+ The main advantage is that we pass only one argument to
+ systemd-sysv-convert script. The later can now be improved/rewritten
+ to handle only one argument and return a useful exit status.
+
+-------------------------------------------------------------------
+Wed Dec 13 16:42:56 UTC 2017 - fbui(a)suse.com
+
+- Make sure to apply presets if packages start shipping units during upgrades (bsc#1071543)
+
+ If a package started shipping units during upgrade only sysv
+ migration was done. However if the package didn't ship any sysv
+ scripts before no presets were applied.
+
+ Now during upgrades, preset are always applied (still only during
+ the first time the units are installed) then followed by the sysv
+ migration machinery.
+
+ The downside of this is that migrated services can have symlinks in
+ both runlevel.target.wants/ (created by the sysv migration) and in
+ the directory specified by the [Install] sections (created by
+ "systemctl preset")...
+
+ The whole thing should be rewritten.
+
+-------------------------------------------------------------------
+Fri Dec 1 10:47:29 UTC 2017 - fbui(a)suse.com
+
+- Make sure to clean up "new-in-upgrade" tag file (bsc#1059627)
+
+ The tag file might have been incorrectly left by a preceding update.
+
+-------------------------------------------------------------------
+Wed Nov 22 14:41:00 UTC 2017 - fbui(a)suse.com
+
+- Restore previous changes
+
+-------------------------------------------------------------------
+Fri Nov 17 09:23:14 UTC 2017 - fbui(a)suse.com
+
+- Revert previous changes
+
+ Also added reasons why the previous changes would be needed.
+
+-------------------------------------------------------------------
@@ -5,0 +61,8 @@
+
+ If you do transactional updates, it doesn't make any sense to
+ execute the tmpfiles. They will only create a lot of directories,
+ files or symlinks in empty directories without any use and later
+ hidden under the real mount points. With transactional updates, you
+ should do such things always during the boot phase, as designed by
+ systemd (and like Fedora and RHEL doing, but in their use case it's
+ in my opinion a bug).
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ systemd-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.7kdqMv/_old 2018-01-02 16:31:41.322482228 +0100
+++ /var/tmp/diff_new_pack.7kdqMv/_new 2018-01-02 16:31:41.326480894 +0100
@@ -39,9 +39,8 @@
%build
%install
-mkdir -p %{buildroot}%{_sysconfdir}/rpm
-install -m644 %{S:0} %{buildroot}%{_sysconfdir}/rpm
-UNITDIR="`cat %{S:0} | sed -n 's|.*_unitdir[[:blank:]]*||p'`"
+install -Dm644 %{S:0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.systemd
+UNITDIR="$(sed -n 's/.*_unitdir[[:blank:]]*//p' %{S:0})"
for i in $UNITDIR `dirname $UNITDIR`; do
mkdir -p %{buildroot}$i
echo $i >> unitdir
@@ -49,6 +48,6 @@
%files -f unitdir
%defattr(-,root,root)
-%config %{_sysconfdir}/rpm/macros.systemd
+%{_rpmconfigdir}/macros.d/macros.systemd
%changelog
++++++ macros.systemd ++++++
--- /var/tmp/diff_new_pack.7kdqMv/_old 2018-01-02 16:31:41.370466226 +0100
+++ /var/tmp/diff_new_pack.7kdqMv/_new 2018-01-02 16:31:41.374464893 +0100
@@ -78,19 +78,24 @@
done \
else \
for service in %{?*} ; do \
+ # The tag file might have been left by a preceding \
+ # update (see 1059627) \
+ rm -f "/run/rpm-%{name}-update-$service-new-in-upgrade" \
+ \
if [ ! -e "/usr/lib/systemd/system/$service" ]; then \
touch "/run/rpm-%{name}-update-$service-new-in-upgrade" \
fi \
done \
for service in %{?*} ; do \
sysv_service="${service%%.*}" \
- if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
- services_to_migrate="$services_to_migrate $sysv_service" \
+ if [ -e /var/lib/systemd/migrated/$sysv_service ]; then \
+ continue \
+ fi \
+ if [ ! -x /usr/sbin/systemd-sysv-convert ]; then \
+ continue \
fi \
+ /usr/sbin/systemd-sysv-convert --save $sysv_service || : \
done \
- if [ -n "$services_to_migrate" -a -x /usr/sbin/systemd-sysv-convert ]; then \
- /usr/sbin/systemd-sysv-convert --save $services_to_migrate || : \
- fi \
fi \
%{nil}
@@ -98,21 +103,11 @@
%service_add_post() \
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
[ -d /var/lib/systemd/migrated ] || mkdir -p /var/lib/systemd/migrated || : \
-for service in %{?*} ; do \
- sysv_service="${service%%.*}" \
- if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
- services_to_migrate="$services_to_migrate $sysv_service" \
- touch "/var/lib/systemd/migrated/$sysv_service" || : \
- fi \
-done \
+ \
if [ "$YAST_IS_RUNNING" != "instsys" -a -x /usr/bin/systemctl ]; then \
/usr/bin/systemctl daemon-reload || : \
fi \
-if [ -n "$services_to_migrate" ]; then \
- if [ -x /usr/sbin/systemd-sysv-convert ]; then \
- /usr/sbin/systemd-sysv-convert --apply $services_to_migrate || : \
- fi \
-elif [ "$FIRST_ARG" -eq 1 ]; then \
+if [ "$FIRST_ARG" -eq 1 ]; then \
if [ -x /usr/bin/systemctl ]; then \
/usr/bin/systemctl preset %{?*} || : \
fi \
@@ -127,6 +122,17 @@
fi \
/usr/bin/systemctl preset "$service" || : \
done \
+ for service in %{?*} ; do \
+ sysv_service=${service%%.*} \
+ if [ -e /var/lib/systemd/migrated/$sysv_service ]; then \
+ continue \
+ fi \
+ if [ ! -x /usr/sbin/systemd-sysv-convert ]; then \
+ continue \
+ fi \
+ /usr/sbin/systemd-sysv-convert --apply $sysv_service || : \
+ touch /var/lib/systemd/migrated/$sysv_service || : \
+ done \
fi \
%{nil}
1
0
Hello community,
here is the log from the commit of package normaliz for openSUSE:Factory checked in at 2018-01-01 22:36:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/normaliz (Old)
and /work/SRC/openSUSE:Factory/.normaliz.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "normaliz"
Mon Jan 1 22:36:45 2018 rev:3 rq:561006 version:3.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/normaliz/normaliz.changes 2017-11-23 09:43:51.573728377 +0100
+++ /work/SRC/openSUSE:Factory/.normaliz.new/normaliz.changes 2018-01-01 22:38:24.932192519 +0100
@@ -1,0 +2,10 @@
+Mon Dec 25 13:13:38 UTC 2017 - jengelh(a)inai.de
+
+- Update to new upstream release 3.5.0
+ * Euclidean volume of polytopes
+ * Expansion of series
+ * Projection of cones and polyhedra
+ * LLL reduced coordinates for project-and-lift
+- Add 0001-Fix-compiler-warnings-in-matrix.cpp.patch
+
+-------------------------------------------------------------------
Old:
----
normaliz-3.4.1.tar.gz
New:
----
0001-Fix-compiler-warnings-in-matrix.cpp.patch
normaliz-3.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ normaliz.spec ++++++
--- /var/tmp/diff_new_pack.XgP4OH/_old 2018-01-01 22:38:25.895870773 +0100
+++ /var/tmp/diff_new_pack.XgP4OH/_new 2018-01-01 22:38:25.907866767 +0100
@@ -17,7 +17,7 @@
Name: normaliz
-Version: 3.4.1
+Version: 3.5.0
Release: 0
Summary: Tools for computations in affine monoids and rational cones
License: GPL-3.0+
@@ -25,10 +25,13 @@
Url: https://www.normaliz.uni-osnabrueck.de/
Source: https://github.com/Normaliz/Normaliz/releases/download/v%version/%name-%ver…
+Patch1: 0001-Fix-compiler-warnings-in-matrix.cpp.patch
BuildRequires: boost-devel
BuildRequires: cmake >= 2.6
+#maybe with flint-devel later on
BuildRequires: gcc-c++
BuildRequires: gmp-devel
+BuildRequires: mpfr-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -75,6 +78,7 @@
%prep
%setup -q
+%patch -P 1 -p1
%build
pushd source/
++++++ 0001-Fix-compiler-warnings-in-matrix.cpp.patch ++++++
>From c67e8c9246ba6e51fb9f35da4bec8e23a744f4f7 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh(a)inai.de>
Date: Mon, 25 Dec 2017 14:21:54 +0100
Subject: [PATCH] Fix compiler warnings in matrix.cpp
Add a return clause, because assert() may be replaced with nothing by
the preprocessor under -DNDEBUG.
matrix.cpp: In member function 'std::vector<Integer> libnormaliz::Matrix<Integer>::VxM_div(const
std::vector<Integer>&, const Integer&, bool&) const [with Integer = double]':
matrix.cpp:942:1: warning: no return statement in function returning non-void [-Wreturn-type]
matrix.cpp:2262:1: warning: no return statement in function returning non-void [-Wreturn-type]
matrix.cpp:2696:1: warning: no return statement in function returning non-void [-Wreturn-type]
---
source/libnormaliz/matrix.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/source/libnormaliz/matrix.cpp b/source/libnormaliz/matrix.cpp
index ebec2958..c551c4d2 100644
--- a/source/libnormaliz/matrix.cpp
+++ b/source/libnormaliz/matrix.cpp
@@ -939,6 +939,7 @@ vector<Integer> Matrix<Integer>::VxM_div(const vector<Integer>& v, const Integer
template<>
vector<nmz_float> Matrix<nmz_float>::VxM_div(const vector<nmz_float>& v, const nmz_float& divisor, bool& success) const{
assert(false);
+ return {};
}
//---------------------------------------------------------------------------
@@ -2259,6 +2260,7 @@ template<>
bool Matrix<nmz_float>::SmithNormalForm_inner(size_t& rk, Matrix<nmz_float>& Right){
assert(false);
+ return {};
}
// Converts "this" into Smith normal form, returns column transformation matrix
@@ -2693,6 +2695,7 @@ vector<mpz_class> Matrix<mpz_class>::optimal_subdivision_point() const{
template<>
vector<nmz_float> Matrix<nmz_float>::optimal_subdivision_point_inner() const{
assert(false);
+ return {};
}
/*
--
2.15.1
++++++ normaliz-3.4.1.tar.gz -> normaliz-3.5.0.tar.gz ++++++
++++ 94607 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package dumpvdl2 for openSUSE:Factory checked in at 2018-01-01 22:36:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dumpvdl2 (Old)
and /work/SRC/openSUSE:Factory/.dumpvdl2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dumpvdl2"
Mon Jan 1 22:36:39 2018 rev:3 rq:561005 version:1.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/dumpvdl2/dumpvdl2.changes 2017-10-13 14:17:39.160099843 +0200
+++ /work/SRC/openSUSE:Factory/.dumpvdl2.new/dumpvdl2.changes 2018-01-01 22:38:17.498674375 +0100
@@ -1,0 +2,19 @@
+Mon Jan 1 12:12:40 UTC 2018 - mardnh(a)gmx.de
+
+- Update to version 1.2.0
+ * Better input signal filtering - reduced bit error rate, 10-50% more
+ messages successfully decoded.
+ * SDRPlay: major bugfixes in sample buffer handling code - shall now
+ perform equally well as RTLSDR (or even better).
+ * SDRPlay: --gain knob replaced with --gr (gain reduction). This makes
+ gain configuration in dumpvdl2 compatible with other SDRPlay apps.
+ See README.md for details.
+ * SDRPlay: support for selecting device by serial number.
+ Added optional build-time PLATFORM knob which sets CPU-specific
+ * compiler flags to optimize the code for various flavours of
+ Raspberry Pi. Supported values: rpiv1, rpiv2, rpiv3.
+ * Other minor bug fixes
+- Remove patch:
+ * dumpvdl2-obey-cflags.diff
+
+-------------------------------------------------------------------
Old:
----
dumpvdl2-1.1.0.tar.xz
dumpvdl2-obey-cflags.diff
New:
----
dumpvdl2-1.2.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dumpvdl2.spec ++++++
--- /var/tmp/diff_new_pack.XL2uEa/_old 2018-01-01 22:38:18.298407365 +0100
+++ /var/tmp/diff_new_pack.XL2uEa/_new 2018-01-01 22:38:18.306404695 +0100
@@ -1,7 +1,7 @@
#
# spec file for package dumpvdl2
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017, Martin Hauke <mardnh(a)gmx.de>
#
# All modifications and additions to the file contributed by third parties
@@ -18,18 +18,17 @@
Name: dumpvdl2
-Version: 1.1.0
+Version: 1.2.0
Release: 0
Summary: A VDL Mode 2 message decoder and protocol analyzer
License: GPL-3.0
Group: Productivity/Hamradio/Other
-#Git-Clone: https://github.com/szpajder/dumpvdl2.git
Url: https://github.com/szpajder/dumpvdl2
+#Git-Clone: https://github.com/szpajder/dumpvdl2.git
Source: https://github.com/szpajder/%{name}/archive/v%{version}.tar.gz#/%{name}-%{v…
-Patch0: dumpvdl2-obey-cflags.diff
BuildRequires: pkgconfig
-BuildRequires: pkgconfig(librtlsdr)
BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(librtlsdr)
%description
A VDL Mode 2 message decoder and protocol analyzer.
@@ -48,7 +47,6 @@
%prep
%setup -q
-%patch0 -p1
%build
export CFLAGS='%{optflags}'
@@ -58,7 +56,6 @@
install -D -p -m 0755 dumpvdl2 %{buildroot}/%{_bindir}/dumpvdl2
%files
-%defattr(-,root,root)
%doc FILTERING_EXAMPLES.md README.md LICENSE
%{_bindir}/dumpvdl2
++++++ dumpvdl2-1.1.0.tar.xz -> dumpvdl2-1.2.0.tar.xz ++++++
1
0
Hello community,
here is the log from the commit of package adapta-gtk-theme for openSUSE:Factory checked in at 2018-01-01 22:36:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/adapta-gtk-theme (Old)
and /work/SRC/openSUSE:Factory/.adapta-gtk-theme.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "adapta-gtk-theme"
Mon Jan 1 22:36:28 2018 rev:8 rq:560987 version:3.92.2.63
Changes:
--------
--- /work/SRC/openSUSE:Factory/adapta-gtk-theme/adapta-gtk-theme.changes 2017-11-20 17:06:36.831139174 +0100
+++ /work/SRC/openSUSE:Factory/.adapta-gtk-theme.new/adapta-gtk-theme.changes 2018-01-01 22:38:12.796244392 +0100
@@ -1,0 +2,7 @@
+Sat Dec 30 20:49:51 UTC 2017 - matthias.eliasson(a)gmail.com
+
+- Update to 3.92.2.63
+ * Toned up sub-menuitem backgrounds (Gnome-Shell 3.24/3.26)
+ * Rewrote GtkHeaderBar corner rounding in GtkPaned container cases (Gtk+ 3.2x/4.0)
+
+-------------------------------------------------------------------
Old:
----
adapta-gtk-theme-3.92.1.108.tar.gz
New:
----
adapta-gtk-theme-3.92.2.63.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ adapta-gtk-theme.spec ++++++
--- /var/tmp/diff_new_pack.aTN76k/_old 2018-01-01 22:38:13.935863904 +0100
+++ /var/tmp/diff_new_pack.aTN76k/_new 2018-01-01 22:38:13.935863904 +0100
@@ -21,7 +21,7 @@
%define gtk3_min_version 3.18
%define gtk2_min_version 2.24
Name: adapta-gtk-theme
-Version: 3.92.1.108
+Version: 3.92.2.63
Release: 0
Summary: An adaptive Gtk+ theme based on Material Design Guidelines
License: GPL-2.0 AND CC-BY-SA-4.0
++++++ adapta-gtk-theme-3.92.1.108.tar.gz -> adapta-gtk-theme-3.92.2.63.tar.gz ++++++
++++ 10640 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package qgroundcontrol for openSUSE:Factory checked in at 2018-01-01 22:36:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qgroundcontrol (Old)
and /work/SRC/openSUSE:Factory/.qgroundcontrol.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qgroundcontrol"
Mon Jan 1 22:36:22 2018 rev:2 rq:560981 version:3.2.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/qgroundcontrol/qgroundcontrol.changes 2017-12-12 21:22:15.384493229 +0100
+++ /work/SRC/openSUSE:Factory/.qgroundcontrol.new/qgroundcontrol.changes 2018-01-01 22:37:58.505015856 +0100
@@ -1,0 +2,14 @@
+Mon Jan 1 09:55:15 UTC 2018 - adrian(a)suse.de
+
+- update to version 3.2.7
+ * Bring fixes from master to Stable
+ * Remove debuggable to hopefully get back auto-stable build update
+- fixing build with Qt 5.10 with patch based on upstream pull request
+ (5923.patch)
+
+-------------------------------------------------------------------
+Mon Nov 6 13:52:53 UTC 2017 - adrian(a)suse.de
+
+- update to version 3.2.5
+
+-------------------------------------------------------------------
Old:
----
qgroundcontrol-3.2.4.tar.xz
New:
----
5923.patch
qgroundcontrol-3.2.7.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qgroundcontrol.spec ++++++
--- /var/tmp/diff_new_pack.rN1fZ7/_old 2018-01-01 22:38:02.811578009 +0100
+++ /var/tmp/diff_new_pack.rN1fZ7/_new 2018-01-01 22:38:02.819575338 +0100
@@ -1,7 +1,7 @@
#
# spec file for package qgroundcontrol
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,53 +19,55 @@
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name: qgroundcontrol
-Version: 3.2.4
+Version: 3.2.7
Release: 0
Summary: An operator control unit / ground control software for micro air vehicles
License: GPL-3.0
Group: Other
Url: http://www.qgroundcontrol.org/
Source0: qgroundcontrol-%{version}.tar.xz
+# modified patch from upstream pull request to fix qt 5.10 builds
+Patch0: 5923.patch
Patch2: fix-install.patch
# ModemManager has the broken design to grab any serial port first
# as background daemon. this breaks any other app which needs to access the device
# on boot up (for firmware update here)
Conflicts: ModemManager
%if 0%{?fedora_version}
+BuildRequires: SDL-devel
+BuildRequires: SDL2-devel
+BuildRequires: alsa-lib-devel
BuildRequires: qt5-qtbase-devel >= 5.7
-BuildRequires: qt5-qtsvg-devel
-BuildRequires: qt5-qtscript-devel
-BuildRequires: qt5-qtmultimedia-devel
BuildRequires: qt5-qtlocation-devel
+BuildRequires: qt5-qtmultimedia-devel
+BuildRequires: qt5-qtscript-devel
+BuildRequires: qt5-qtserialport-devel
+BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qttools-devel
BuildRequires: qt5-qtwebkit-devel
-BuildRequires: qt5-qtserialport-devel
-BuildRequires: SDL-devel
-BuildRequires: SDL2-devel
-BuildRequires: alsa-lib-devel
%else
-BuildRequires: libqt5-qtbase-devel >= 5.7
+BuildRequires: alsa-devel
+BuildRequires: libQt5QuickControls2-devel
+BuildRequires: libQt5WebKitWidgets-devel
+BuildRequires: libQt5Widgets-devel
+BuildRequires: libSDL-devel
+BuildRequires: libSDL2-devel
BuildRequires: libqt5-qtbase-common-devel
-BuildRequires: libqt5-qtsvg-devel
-BuildRequires: libqt5-qtscript-devel
+BuildRequires: libqt5-qtbase-devel >= 5.7
BuildRequires: libqt5-qtlocation-devel
BuildRequires: libqt5-qtlocation-private-headers-devel
BuildRequires: libqt5-qtmultimedia-devel
-BuildRequires: libqt5-qttools-devel
-BuildRequires: libQt5Widgets-devel
-BuildRequires: libQt5WebKitWidgets-devel
-BuildRequires: libQt5QuickControls2-devel
+BuildRequires: libqt5-qtscript-devel
BuildRequires: libqt5-qtserialport-devel
-BuildRequires: libSDL-devel
-BuildRequires: libSDL2-devel
-BuildRequires: alsa-devel
+BuildRequires: libqt5-qtsvg-devel
+BuildRequires: libqt5-qttools-devel
%endif
+BuildRequires: espeak-devel
BuildRequires: libicu-devel
BuildRequires: libsndfile-devel
BuildRequires: libudev-devel
BuildRequires: openssl-devel
-BuildRequires: espeak-devel
# is not building atm
#BuildRequires: libxbee3-devel
BuildRequires: fdupes
@@ -83,6 +85,7 @@
%prep
%setup -q
+%patch0 -p1
%patch2 -p1
mkdir build
++++++ 5923.patch ++++++
diff --git a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
index f856dec93..088d97ffa 100644
--- a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
+++ b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
@@ -96,6 +96,16 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
* Google and Bing don't seem kosher at all. This was based on original code from OpenPilot and heavily modified to be used in QGC.
*/
+// In Qt 5.10 QGeoMapType need QGeoCameraCapabilities as argument
+// E.g: https://github.com/qt/qtlocation/blob/2b230b0a10d898979e9d5193f4da2e408b397…
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f,QByteArray("QGroundControl"), cameraCaps)
+#elif QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
+#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f,QByteArray("QGroundControl"))
+#else
+#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f)
+#endif
+
//-- IMPORTANT
// Changes here must reflect those in QGCMapEngine.cpp
++++++ _service ++++++
--- /var/tmp/diff_new_pack.rN1fZ7/_old 2018-01-01 22:38:02.855563323 +0100
+++ /var/tmp/diff_new_pack.rN1fZ7/_new 2018-01-01 22:38:02.883553978 +0100
@@ -2,8 +2,8 @@
<service name="tar_scm" mode="disabled">
<param name="url">git://github.com/mavlink/qgroundcontrol.git</param>
<param name="scm">git</param>
- <param name="revision">v3.2.4</param>
- <param name="version">3.2.4</param>
+ <param name="revision">v3.2.7</param>
+ <param name="version">3.2.7</param>
<param name="exclude">lib</param>
<!-- not working atm
<param name="exclude">mavlink</param>
++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.rN1fZ7/_old 2018-01-01 22:38:02.899548637 +0100
+++ /var/tmp/diff_new_pack.rN1fZ7/_new 2018-01-01 22:38:02.899548637 +0100
@@ -1,4 +1,4 @@
-qgroundcontrol (3.2.4-0) trusty; urgency=low
+qgroundcontrol (3.2.7-0) trusty; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
++++++ qgroundcontrol-3.2.4.tar.xz -> qgroundcontrol-3.2.7.tar.xz ++++++
/work/SRC/openSUSE:Factory/qgroundcontrol/qgroundcontrol-3.2.4.tar.xz /work/SRC/openSUSE:Factory/.qgroundcontrol.new/qgroundcontrol-3.2.7.tar.xz differ: char 27, line 1
++++++ qgroundcontrol.dsc ++++++
--- /var/tmp/diff_new_pack.rN1fZ7/_old 2018-01-01 22:38:02.975523271 +0100
+++ /var/tmp/diff_new_pack.rN1fZ7/_new 2018-01-01 22:38:02.975523271 +0100
@@ -1,6 +1,6 @@
Format: 1.0
Source: qgroundcontrol
-Version: 3.2.4-0
+Version: 3.2.7-0
Binary: qgroundcontrol
Maintainer: Adrian Schroeter <adrian(a)suse.de>
Architecture: all
1
0
Hello community,
here is the log from the commit of package stress-ng for openSUSE:Factory checked in at 2018-01-01 22:36:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/stress-ng (Old)
and /work/SRC/openSUSE:Factory/.stress-ng.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "stress-ng"
Mon Jan 1 22:36:06 2018 rev:25 rq:560979 version:0.09.08
Changes:
--------
--- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes 2017-12-19 10:58:14.594057817 +0100
+++ /work/SRC/openSUSE:Factory/.stress-ng.new/stress-ng.changes 2018-01-01 22:36:23.196836697 +0100
@@ -1,0 +2,22 @@
+Mon Jan 1 10:41:32 UTC 2018 - mardnh(a)gmx.de
+
+- Update to version 0.09.08
+ * Makefile: bump version
+ * Makefile.config: remove need for LIBBSD for wchar.h path detection
+ * stress-rawdev: fix linking failure on non linux systems
+ * Add wchar.h and bsd/wchar.h path detection, makes stress-ng.h cleaner
+ * Add rawdev raw device read stressor
+ * stress-vecmath: use uint128_put for 128 bit integer
+ * Move ALIGNED and SECTION macros to stress-ng.h
+ * Add OPTIMIZE0 level zero optimization hint macro
+ * stress-socket-diag: remove some consts, cleans up clang warnings
+ * Use the FORMAT macro for some printf style functions
+ * stress-vm: fix warning when building with PEDANTIC=1
+ * stress-tlb-shootdown: fix unterminated comment
+ * stress-timer: fix warning when building with PEDANTIC=1
+ * stress-itimer: fix warning when building with PEDANTIC=1
+ * stress-funccall: clean up warnings when building with PEDANTIC=1
+ * stress-physpage: only close an opened fd_pc file descriptor
+ * stress-tlb: fix incorrect affinity on cores
+
+-------------------------------------------------------------------
Old:
----
stress-ng-0.09.07.tar.xz
New:
----
stress-ng-0.09.08.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ stress-ng.spec ++++++
--- /var/tmp/diff_new_pack.pekXTd/_old 2018-01-01 22:36:24.620361421 +0100
+++ /var/tmp/diff_new_pack.pekXTd/_new 2018-01-01 22:36:24.624360086 +0100
@@ -1,7 +1,7 @@
#
# spec file for package stress-ng
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015, Martin Hauke <mardnh(a)gmx.de>
#
# All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
Name: stress-ng
-Version: 0.09.07
+Version: 0.09.08
Release: 0
Summary: Tool to load and stress a computer
License: GPL-2.0
++++++ stress-ng-0.09.07.tar.xz -> stress-ng-0.09.08.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/Makefile new/stress-ng-0.09.08/Makefile
--- old/stress-ng-0.09.07/Makefile 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/Makefile 2017-12-31 18:18:59.000000000 +0100
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-VERSION=0.09.07
+VERSION=0.09.08
#
# Codename "portable pressure producer"
#
@@ -168,6 +168,7 @@
stress-quota.c \
stress-qsort.c \
stress-radixsort.c \
+ stress-rawdev.c \
stress-rdrand.c \
stress-readahead.c \
stress-remap-file-pages.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/Makefile.config new/stress-ng-0.09.08/Makefile.config
--- old/stress-ng-0.09.07/Makefile.config 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/Makefile.config 2017-12-31 18:18:59.000000000 +0100
@@ -75,6 +75,22 @@
endif
endif
+ifndef $(HAVE_BSD_WCHAR)
+HAVE_BSD_WCHAR = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) have_bsd_wchar)
+ifeq ($(HAVE_BSD_WCHAR),1)
+ CONFIG_CFLAGS += -DHAVE_BSD_WCHAR
+$(info autoconfig: using bsd/wchar.h)
+endif
+endif
+
+ifndef $(HAVE_WCHAR)
+HAVE_WCHAR = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) have_wchar)
+ifeq ($(HAVE_WCHAR),1)
+ CONFIG_CFLAGS += -DHAVE_WCHAR
+$(info autoconfig: using wchar.h)
+endif
+endif
+
ifndef $(HAVE_LIB_Z)
HAVE_LIB_Z = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) have_lib_z)
ifeq ($(HAVE_LIB_Z),1)
@@ -792,6 +808,32 @@
@rm -f $(DIR)/test-libbsd
#
+# check if we can include bsd/wchar.h
+#
+.PHONY: have_bsd_wchar
+have_bsd_wchar: $(DIR)/test-bsd-wchar.c
+ @$(CC) $(CFLAGS) $(CPPFLAGS) $(DIR)/test-bsd-wchar.c -o $(DIR)/test-bsd-wchar 2> /dev/null || true
+ @if [ -f $(DIR)/test-bsd-wchar ]; then \
+ echo 1 ;\
+ else \
+ echo 0 ;\
+ fi
+ @rm -f $(DIR)/test-bsd-wchar
+
+#
+# check if we can include wchar.h
+#
+.PHONY: have_wchar
+have_wchar: $(DIR)/test-wchar.c
+ @$(CC) $(CFLAGS) $(CPPFLAGS) $(DIR)/test-wchar.c -o $(DIR)/test-wchar 2> /dev/null || true
+ @if [ -f $(DIR)/test-wchar ]; then \
+ echo 1 ;\
+ else \
+ echo 0 ;\
+ fi
+ @rm -f $(DIR)/test-wchar
+
+#
# check if we can build against libz
#
.PHONY: have_lib_z
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/log.c new/stress-ng-0.09.08/log.c
--- old/stress-ng-0.09.07/log.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/log.c 2017-12-31 18:18:59.000000000 +0100
@@ -144,6 +144,8 @@
* __pr_msg_fail()
* wrapper helper for pr_msg_fail
*/
+static inline void __pr_msg_fail(const uint64_t flag, char *fmt, ...) FORMAT(printf, 2, 0);
+
static inline void __pr_msg_fail(const uint64_t flag, char *fmt, ...)
{
va_list ap;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-cpu.c new/stress-ng-0.09.08/stress-cpu.c
--- old/stress-ng-0.09.07/stress-cpu.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-cpu.c 2017-12-31 18:18:59.000000000 +0100
@@ -154,17 +154,10 @@
}
/*
- * We need to stop gcc optimising out the loop additions.. sigh
- */
-#if __GNUC__ && NEED_GNUC(4, 4, 0) && !defined(__clang__)
-static void stress_cpu_loop(const char *) __attribute__((optimize("-O0")));
-#endif
-
-/*
* stress_cpu_loop()
* simple CPU busy loop
*/
-static void stress_cpu_loop(const char *name)
+static void OPTIMIZE0 stress_cpu_loop(const char *name)
{
uint32_t i, i_sum = 0;
const uint32_t sum = 134209536UL;
@@ -1283,13 +1276,6 @@
}
/*
- * Undocumented gcc-ism, force -O0 optimisation
- */
-#if __GNUC__ && NEED_GNUC(4, 4, 0) && !defined(__clang__)
-static void stress_cpu_jmp(const char *name) __attribute__((optimize("-O0")));
-#endif
-
-/*
* This could be a ternary operator, v = (v op val) ? a : b
* but it may be optimised down, so force a compare and jmp
* with -O0 and a if/else construct
@@ -1305,7 +1291,7 @@
* stress_cpu_jmp
* jmp conditionals
*/
-static void HOT stress_cpu_jmp(const char *name)
+static void HOT OPTIMIZE0 stress_cpu_jmp(const char *name)
{
register int i, next = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-funccall.c new/stress-ng-0.09.08/stress-funccall.c
--- old/stress-ng-0.09.07/stress-funccall.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-funccall.c 2017-12-31 18:19:00.000000000 +0100
@@ -43,14 +43,21 @@
typedef long double long_double_t;
#define stress_funccall_1(type) \
-extern void stress_funccall_ ## type ## _1( \
+void NOINLINE stress_funccall_ ## type ## _1( \
+ const type a); \
+ \
+void NOINLINE stress_funccall_ ## type ## _1( \
const type a) \
{ \
type ## _put(a); \
} \
#define stress_funccall_2(type) \
-extern void stress_funccall_ ## type ## _2( \
+void NOINLINE stress_funccall_ ## type ## _2( \
+ const type a, \
+ const type b); \
+ \
+void NOINLINE stress_funccall_ ## type ## _2( \
const type a, \
const type b) \
{ \
@@ -59,7 +66,12 @@
} \
#define stress_funccall_3(type) \
-extern void stress_funccall_ ## type ## _3( \
+void NOINLINE stress_funccall_ ## type ## _3( \
+ const type a, \
+ const type b, \
+ const type c); \
+ \
+void NOINLINE stress_funccall_ ## type ## _3( \
const type a, \
const type b, \
const type c) \
@@ -70,7 +82,13 @@
} \
#define stress_funccall_4(type) \
-extern void stress_funccall_ ## type ## _4( \
+void NOINLINE stress_funccall_ ## type ## _4( \
+ const type a, \
+ const type b, \
+ const type c, \
+ const type d); \
+ \
+void NOINLINE stress_funccall_ ## type ## _4( \
const type a, \
const type b, \
const type c, \
@@ -83,7 +101,14 @@
} \
#define stress_funccall_5(type) \
-extern void stress_funccall_ ## type ## _5( \
+void NOINLINE stress_funccall_ ## type ## _5( \
+ const type a, \
+ const type b, \
+ const type c, \
+ const type d, \
+ const type e); \
+ \
+void NOINLINE stress_funccall_ ## type ## _5( \
const type a, \
const type b, \
const type c, \
@@ -98,7 +123,15 @@
} \
#define stress_funccall_6(type) \
-extern void stress_funccall_ ## type ## _6( \
+void NOINLINE stress_funccall_ ## type ## _6( \
+ const type a, \
+ const type b, \
+ const type c, \
+ const type d, \
+ const type e, \
+ const type f); \
+ \
+void NOINLINE stress_funccall_ ## type ## _6( \
const type a, \
const type b, \
const type c, \
@@ -115,7 +148,16 @@
} \
#define stress_funccall_7(type) \
-extern void stress_funccall_ ## type ## _7( \
+void NOINLINE stress_funccall_ ## type ## _7( \
+ const type a, \
+ const type b, \
+ const type c, \
+ const type d, \
+ const type e, \
+ const type f, \
+ const type g); \
+ \
+void NOINLINE stress_funccall_ ## type ## _7( \
const type a, \
const type b, \
const type c, \
@@ -134,7 +176,17 @@
} \
#define stress_funccall_8(type) \
-extern void stress_funccall_ ## type ## _8( \
+void NOINLINE stress_funccall_ ## type ## _8( \
+ const type a, \
+ const type b, \
+ const type c, \
+ const type d, \
+ const type e, \
+ const type f, \
+ const type g, \
+ const type h); \
+ \
+void NOINLINE stress_funccall_ ## type ## _8( \
const type a, \
const type b, \
const type c, \
@@ -155,7 +207,18 @@
} \
#define stress_funccall_9(type) \
-extern void stress_funccall_ ## type ## _9( \
+void NOINLINE stress_funccall_ ## type ## _9( \
+ const type a, \
+ const type b, \
+ const type c, \
+ const type d, \
+ const type e, \
+ const type f, \
+ const type g, \
+ const type h, \
+ const type i); \
+ \
+void NOINLINE stress_funccall_ ## type ## _9( \
const type a, \
const type b, \
const type c, \
@@ -260,7 +323,7 @@
stress_funccall_9(long_double_t)
#define stress_funcall_type(type, rndfunc) \
-static void stress_funccall_ ## type(const args_t *args) \
+static void NOINLINE stress_funccall_ ## type(const args_t *args)\
{ \
register int ii; \
type a, b, c, d, e, f, g, h, i; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-icache.c new/stress-ng-0.09.08/stress-icache.c
--- old/stress-ng-0.09.07/stress-icache.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-icache.c 2017-12-31 18:19:00.000000000 +0100
@@ -34,11 +34,6 @@
#define SIZE_16K (16 * SIZE_1K)
#define SIZE_64K (64 * SIZE_1K)
-#if defined(__GNUC__) && NEED_GNUC(4,6,0)
-#define SECTION(s) __attribute__((__section__(# s)))
-#define ALIGNED(a) __attribute__((aligned(a)))
-#endif
-
/*
* STRESS_ICACHE_FUNC()
* generates a simple function that is page aligned in its own
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-itimer.c new/stress-ng-0.09.08/stress-itimer.c
--- old/stress-ng-0.09.07/stress-itimer.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-itimer.c 2017-12-31 18:19:00.000000000 +0100
@@ -73,7 +73,7 @@
* stress_itimer_keep_stressing()
* returns true if we can keep on running a stressor
*/
-bool HOT OPTIMIZE3 stress_itimer_keep_stressing(void)
+static bool HOT OPTIMIZE3 stress_itimer_keep_stressing(void)
{
return (LIKELY(g_keep_stressing_flag) &&
LIKELY(!max_ops || (itimer_counter < max_ops)));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-ng.1 new/stress-ng-0.09.08/stress-ng.1
--- old/stress-ng-0.09.07/stress-ng.1 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-ng.1 2017-12-31 18:19:00.000000000 +0100
@@ -2284,6 +2284,47 @@
.B \-\-radixsort\-size N
specify number of strings to sort, default is 262144 (256 \(mu 1024).
.TP
+.B \-\-rawdev N
+start N workers that read the underlying raw drive device using direct
+IO reads. The device (with minor number 0) that stores the current working
+directory is the raw device to be read by the stressor. The read size is
+exactly the size of the underlying device block size. By default, this
+stressor will exercise all the of the rawdev methods (see the
+\-\-rawdev\-method option). This is a Linux only stressor and requires
+root privilege to be able to read the raw device.
+.TP
+.B \-\-rawdev\-ops N
+stop the rawdev stress workers after N raw device read bogo operations.
+.TP
+.B \-\-rawdev\-method M
+Available rawdev stress methods are described as follows:
+.TS
+expand;
+lBw(10n)2 lBw(\n[SZ]n)
+l l.
+Method Description
+all T{
+iterate over all the rawdev stress methods as listed below:
+T}
+sweep T{
+repeatedy read across the raw device from the 0th block to the end block in steps
+of the number of blocks on the device / 128 and back to the start again.
+T}
+wiggle T{
+repeatedy read across the raw device in 128 evenly steps with each step reading
+1024 blocks backwards from each step.
+ends T{
+repeatedy read the first and last 128 start and end blocks of the raw device
+alternating from start of the device to the end of the device.
+T}
+random T{
+repeatedy read 256 random blocks
+T}
+burst T{
+repeatedly read 256 sequential blocks starting from a random block on the raw device.
+T}
+.TE
+.TP
.B \-\-rdrand N
start N workers that read the Intel hardware random number generator (Intel
Ivybridge processors upwards).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-ng.c new/stress-ng-0.09.08/stress-ng.c
--- old/stress-ng-0.09.07/stress-ng.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-ng.c 2017-12-31 18:19:00.000000000 +0100
@@ -97,6 +97,7 @@
{ STRESS_IOPORT, stress_ioport_supported },
{ STRESS_NETLINK_PROC, stress_netlink_proc_supported },
{ STRESS_PHYSPAGE, stress_physpage_supported },
+ { STRESS_RAWDEV, stress_rawdev_supported },
{ STRESS_RDRAND, stress_rdrand_supported },
{ STRESS_SOFTLOCKUP, stress_softlockup_supported },
{ STRESS_SWAP, stress_swap_supported },
@@ -326,6 +327,7 @@
STRESSOR(qsort, QSORT, CLASS_CPU_CACHE | CLASS_CPU | CLASS_MEMORY),
STRESSOR(quota, QUOTA, CLASS_OS),
STRESSOR(radixsort, RADIXSORT, CLASS_CPU_CACHE | CLASS_CPU | CLASS_MEMORY),
+ STRESSOR(rawdev, RAWDEV, CLASS_IO),
STRESSOR(rdrand, RDRAND, CLASS_CPU),
STRESSOR(readahead, READAHEAD, CLASS_IO | CLASS_OS),
STRESSOR(remap, REMAP_FILE_PAGES, CLASS_MEMORY | CLASS_OS),
@@ -765,6 +767,9 @@
{ "radixsort", 1, 0, OPT_RADIXSORT },
{ "radixsort-ops",1, 0, OPT_RADIXSORT_OPS },
{ "radixsort-size",1, 0, OPT_RADIXSORT_SIZE },
+ { "rawdev", 1, 0, OPT_RAWDEV },
+ { "rawdev-ops",1, 0, OPT_RAWDEV_OPS },
+ { "rawdev-method",1, 0, OPT_RAWDEV_METHOD },
{ "random", 1, 0, OPT_RANDOM },
{ "rdrand", 1, 0, OPT_RDRAND },
{ "rdrand-ops", 1, 0, OPT_RDRAND_OPS },
@@ -1346,6 +1351,9 @@
{ NULL, "radixsort N", "start N workers radix sorting random strings" },
{ NULL, "radixsort-ops N", "stop after N radixsort bogo operations" },
{ NULL, "radixsort-size N", "number of strings to sort" },
+ { NULL, "rawdev N", "start N workers that read a raw device" },
+ { NULL, "rawdev-ops N", "stop after N rawdev read operations" },
+ { NULL, "rawdev-method M", "specify the rawdev reead method to use" },
{ NULL, "rdrand N", "start N workers exercising rdrand (x86 only)" },
{ NULL, "rdrand-ops N", "stop after N rdrand bogo operations" },
{ NULL, "readahead N", "start N workers exercising file readahead" },
@@ -3260,6 +3268,10 @@
stress_get_processors(&i32);
set_setting("random", TYPE_ID_INT32, &i32);
break;
+ case OPT_RAWDEV_METHOD:
+ if (stress_set_rawdev_method(optarg) < 0)
+ return EXIT_FAILURE;
+ break;
case OPT_READAHEAD_BYTES:
stress_set_readahead_bytes(optarg);
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-ng.h new/stress-ng-0.09.08/stress-ng.h
--- old/stress-ng-0.09.07/stress-ng.h 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-ng.h 2017-12-31 18:19:00.000000000 +0100
@@ -59,13 +59,19 @@
#include <pthread.h>
#endif
+#if defined(HAVE_BSD_WCHAR)
+#include <bsd/wchar.h>
+#endif
+#if defined(HAVE_WCHAR)
+#include <wchar.h>
+#endif
+
#if defined(HAVE_LIB_BSD)
#if defined(__APPLE__) || \
defined(__DragonFly__) || \
defined(__FreeBSD__) || \
defined(__NetBSD__) || \
defined(__OpenBSD__)
-#include <wchar.h>
#if !defined(__APPLE__)
#include <sys/tree.h>
#endif
@@ -73,10 +79,6 @@
#include <bsd/stdlib.h>
#include <bsd/string.h>
#include <bsd/sys/tree.h>
-#if !defined(__FreeBSD_kernel__)
-/* GNU/kFreeBSD does not support this */
-#include <bsd/wchar.h>
-#endif
#endif
#endif
@@ -455,6 +457,13 @@
#define OPTIMIZE1
#endif
+/* -O0 attribute support */
+#if defined(__GNUC__) && !defined(__clang__) && NEED_GNUC(4,6,0)
+#define OPTIMIZE0 __attribute__((optimize("-O0")))
+#else
+#define OPTIMIZE0
+#endif
+
/* warn unused attribute */
#if defined(__GNUC__) && NEED_GNUC(4,2,0)
#define WARN_UNUSED __attribute__((warn_unused_result))
@@ -462,20 +471,28 @@
#define WARN_UNUSED
#endif
+#if defined(__GNUC__) && NEED_GNUC(3,3,0)
+#define ALIGNED(a) __attribute__((aligned(a)))
+#endif
+
/* Force aligment to nearest 128 bytes */
#if defined(__GNUC__) && NEED_GNUC(3,3,0) && defined(HAVE_ALIGNED_128)
-#define ALIGN128 __attribute__ ((aligned(128)))
+#define ALIGN128 ALIGNED(128)
#else
#define ALIGN128
#endif
/* Force aligment to nearest 64 bytes */
#if defined(__GNUC__) && NEED_GNUC(3,3,0) && defined(HAVE_ALIGNED_64)
-#define ALIGN64 __attribute__ ((aligned(64)))
+#define ALIGN64 ALIGNED(64)
#else
#define ALIGN64
#endif
+#if defined(__GNUC__) && NEED_GNUC(4,6,0)
+#define SECTION(s) __attribute__((__section__(# s)))
+#endif
+
/* Choose cacheline alignment */
#if defined(ALIGN128)
#define ALIGN_CACHELINE ALIGN128
@@ -534,9 +551,9 @@
/* Logging helpers */
extern int pr_msg(FILE *fp, const uint64_t flag,
- const char *const fmt, va_list va);
+ const char *const fmt, va_list va) FORMAT(printf, 3, 0);
extern void pr_msg_fail(const uint64_t flag, const char *name, const char *what, const int err);
-extern int pr_yaml(FILE *fp, const char *const fmt, ...) __attribute__((format(printf, 2, 3)));
+extern int pr_yaml(FILE *fp, const char *const fmt, ...) FORMAT(printf, 2, 3);
extern void pr_yaml_runinfo(FILE *fp);
extern void pr_openlog(const char *filename);
extern void pr_closelog(void);
@@ -1294,6 +1311,7 @@
STRESS_QSORT,
STRESS_QUOTA,
STRESS_RADIXSORT,
+ STRESS_RAWDEV,
STRESS_RDRAND,
STRESS_READAHEAD,
STRESS_REMAP_FILE_PAGES,
@@ -1863,6 +1881,10 @@
OPT_RADIXSORT_OPS,
OPT_RADIXSORT_SIZE,
+ OPT_RAWDEV,
+ OPT_RAWDEV_METHOD,
+ OPT_RAWDEV_OPS,
+
OPT_RDRAND,
OPT_RDRAND_OPS,
@@ -2563,6 +2585,7 @@
extern int stress_ioport_supported(void);
extern int stress_netlink_proc_supported(void);
extern int stress_physpage_supported(void);
+extern int stress_rawdev_supported(void);
extern int stress_rdrand_supported(void);
extern int stress_softlockup_supported(void);
extern int stress_swap_supported(void);
@@ -2637,6 +2660,7 @@
extern void stress_set_pty_max(const char *opt);
extern void stress_set_qsort_size(const char *opt);
extern void stress_set_radixsort_size(const char *opt);
+extern int stress_set_rawdev_method(const char *name);
extern void stress_set_readahead_bytes(const char *opt);
extern int stress_set_sctp_domain(const char *opt);
extern void stress_set_sctp_port(const char *opt);
@@ -2949,6 +2973,7 @@
STRESS(stress_qsort);
STRESS(stress_quota);
STRESS(stress_radixsort);
+STRESS(stress_rawdev);
STRESS(stress_rdrand);
STRESS(stress_readahead);
STRESS(stress_remap);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-physpage.c new/stress-ng-0.09.08/stress-physpage.c
--- old/stress-ng-0.09.07/stress-physpage.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-physpage.c 2017-12-31 18:19:00.000000000 +0100
@@ -148,8 +148,9 @@
inc_counter(args);
} while (keep_stressing());
+ if (fd_pc > 0)
+ (void)close(fd_pc);
(void)close(fd_pm);
- (void)close(fd_pc);
return EXIT_SUCCESS;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-rawdev.c new/stress-ng-0.09.08/stress-rawdev.c
--- old/stress-ng-0.09.07/stress-rawdev.c 1970-01-01 01:00:00.000000000 +0100
+++ new/stress-ng-0.09.08/stress-rawdev.c 2017-12-31 18:19:00.000000000 +0100
@@ -0,0 +1,383 @@
+/*
+ * Copyright (C) 2013-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.king(a)canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <apw(a)rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+#include "stress-ng.h"
+
+#if defined(__linux__)
+#include <sys/types.h>
+#include <sys/sysmacros.h>
+#include <dirent.h>
+#endif
+
+typedef void (*rawdev_func)(const args_t *args, const int fd,
+ unsigned long blks, unsigned long blksz);
+
+typedef struct {
+ const char *name;
+ const rawdev_func func;
+} stress_rawdev_method_info_t;
+
+/*
+ * stress_rawdev_supported()
+ * check if we can run this as root
+ */
+int stress_rawdev_supported(void)
+{
+ if (geteuid() != 0) {
+ pr_inf("rawdev flood stressor will be skipped, "
+ "need to be running as root for this stressor\n");
+ return -1;
+ }
+ return 0;
+}
+
+#if defined(__linux__)
+char *stress_rawdev_path(const dev_t dev)
+{
+ static char path[PATH_MAX];
+ DIR *dir;
+ struct dirent *d;
+ const dev_t majdev = makedev(major(dev), 0);
+
+ dir = opendir("/dev");
+ if (!dir)
+ return NULL;
+
+ while ((d = readdir(dir)) != NULL) {
+ int ret;
+ struct stat stat_buf;
+
+ snprintf(path, sizeof(path), "/dev/%s", d->d_name);
+ ret = stat(path, &stat_buf);
+ if ((ret == 0) &&
+ (S_ISBLK(stat_buf.st_mode)) &&
+ (stat_buf.st_rdev == majdev)) {
+ (void)closedir(dir);
+ return path;
+ }
+ }
+ (void)closedir(dir);
+
+ return NULL;
+}
+
+void stress_rawdev_sweep(
+ const args_t *args,
+ const int fd,
+ unsigned long blks,
+ unsigned long blksz)
+{
+ unsigned long i;
+ int ret;
+ char buf[blksz << 1];
+ char *aligned = align_address(buf, blksz);
+ off_t offset;
+
+ for (i = 0; i < blks && keep_stressing(); i += blks >> 8) {
+ offset = (off_t)i * (off_t)blksz;
+ ret = pread(fd, aligned, (size_t)blksz, offset);
+ if (ret < 0) {
+ pr_err("%s: pread at %ju failed, errno=%d (%s)\n",
+ args->name, (intmax_t)offset, errno, strerror(errno));
+ }
+ inc_counter(args);
+ }
+ for (; i > 0 && keep_stressing(); i -= blks >> 8) {
+ offset = (off_t)i * (off_t)blksz;
+ ret = pread(fd, aligned, (size_t)blksz, offset);
+ if (ret < 0) {
+ pr_err("%s: pread at %ju failed, errno=%d (%s)\n",
+ args->name, (intmax_t)offset, errno, strerror(errno));
+ }
+ inc_counter(args);
+ }
+}
+
+void stress_rawdev_wiggle(
+ const args_t *args,
+ const int fd,
+ unsigned long blks,
+ unsigned long blksz)
+{
+ unsigned long i;
+ int ret;
+ char buf[blksz << 1];
+ char *aligned = align_address(buf, blksz);
+ off_t offset;
+
+ for (i = blks >> 8; i < blks && keep_stressing(); i += blks >> 8) {
+ unsigned long j;
+
+ for (j = 0; j < blks >> 8; j += blks >> 10) {
+ offset = (off_t)(i - j) * (off_t)blksz;
+ ret = pread(fd, aligned, (size_t)blksz, offset);
+ if (ret < 0) {
+ pr_err("%s: pread at %ju failed, errno=%d (%s)\n",
+ args->name, (intmax_t)offset, errno, strerror(errno));
+ }
+ inc_counter(args);
+ }
+ }
+}
+
+void stress_rawdev_ends(
+ const args_t *args,
+ const int fd,
+ unsigned long blks,
+ unsigned long blksz)
+{
+ unsigned long i;
+ int ret;
+ char buf[blksz << 1];
+ char *aligned = align_address(buf, blksz);
+ off_t offset;
+
+ for (i = 0; i < 128; i++) {
+ offset = (off_t)i * (off_t)blksz;
+ ret = pread(fd, aligned, (size_t)blksz, offset);
+ if (ret < 0) {
+ pr_err("%s: pread at %ju failed, errno=%d (%s)\n",
+ args->name, (intmax_t)offset, errno, strerror(errno));
+ }
+ inc_counter(args);
+
+ offset = (off_t)(blks - (i + 1)) * (off_t)blksz;
+ ret = pread(fd, aligned, (size_t)blksz, offset);
+ if (ret < 0) {
+ pr_err("%s: pread at %ju failed, errno=%d (%s)\n",
+ args->name, (intmax_t)offset, errno, strerror(errno));
+ }
+ inc_counter(args);
+ }
+}
+
+void stress_rawdev_random(
+ const args_t *args,
+ const int fd,
+ unsigned long blks,
+ unsigned long blksz)
+{
+ int i;
+ char buf[blksz << 1];
+ char *aligned = align_address(buf, blksz);
+
+ for (i = 0; i < 256 && keep_stressing(); i++) {
+ int ret;
+ off_t offset = (off_t)blksz * (mwc64() % blks);
+
+ ret = pread(fd, aligned, (size_t)blksz, offset);
+ if (ret < 0) {
+ pr_err("%s: pread at %ju failed, errno=%d (%s)\n",
+ args->name, (intmax_t)offset, errno, strerror(errno));
+ }
+ inc_counter(args);
+ }
+}
+
+void stress_rawdev_burst(
+ const args_t *args,
+ const int fd,
+ unsigned long blks,
+ unsigned long blksz)
+{
+ int i;
+ char buf[blksz << 1];
+ char *aligned = align_address(buf, blksz);
+ off_t blk = (mwc64() % blks);
+
+ for (i = 0; i < 256 && keep_stressing(); i++) {
+ int ret;
+ off_t offset = blk * blksz;
+
+ ret = pread(fd, aligned, (size_t)blksz, offset);
+ if (ret < 0) {
+ pr_err("%s: pread at %ju failed, errno=%d (%s)\n",
+ args->name, (intmax_t)offset, errno, strerror(errno));
+ }
+ blk++;
+ blk %= blks;
+ inc_counter(args);
+ }
+}
+
+static const stress_rawdev_method_info_t rawdev_methods[];
+
+/*
+ * stress_rawdev_all()
+ * iterate over all rawdev methods
+ */
+static void stress_rawdev_all(
+ const args_t *args,
+ const int fd,
+ unsigned long blks,
+ unsigned long blksz)
+{
+ static int i = 1; /* Skip over stress_rawdev_all */
+
+ rawdev_methods[i++].func(args, fd, blks, blksz);
+ if (!rawdev_methods[i].func)
+ i = 1;
+}
+
+
+/*
+ * rawdev methods
+ */
+static const stress_rawdev_method_info_t rawdev_methods[] = {
+ { "all", stress_rawdev_all },
+ { "sweep", stress_rawdev_sweep },
+ { "wiggle", stress_rawdev_wiggle },
+ { "ends", stress_rawdev_ends },
+ { "random", stress_rawdev_random },
+ { "burst", stress_rawdev_burst },
+ { NULL, NULL }
+};
+
+#endif
+
+#if defined(__linux__)
+/*
+ * stress_set_rawdev_method()
+ * set the default rawdev method
+ */
+int stress_set_rawdev_method(const char *name)
+{
+ stress_rawdev_method_info_t const *info;
+
+ for (info = rawdev_methods; info->func; info++) {
+ if (!strcmp(info->name, name)) {
+ set_setting("rawdev-method", TYPE_ID_UINTPTR_T, &info);
+ return 0;
+ }
+ }
+
+ (void)fprintf(stderr, "rawdev-method must be one of:");
+ for (info = rawdev_methods; info->func; info++) {
+ (void)fprintf(stderr, " %s", info->name);
+ }
+ (void)fprintf(stderr, "\n");
+
+ return -1;
+}
+#else
+/*
+ * stress_set_rawdev_method()
+ * set the default rawdev method
+ */
+int stress_set_rawdev_method(const char *name)
+{
+ fprintf(stderr, "option --rawdev-method not supported\n");
+ return -1;
+}
+#endif
+
+#if defined(__linux__)
+
+int stress_rawdev(const args_t *args)
+{
+ int ret;
+ char path[PATH_MAX], *devpath;
+ struct stat stat_buf;
+ int fd;
+ unsigned long blks = 0, blksz = 0;
+ const stress_rawdev_method_info_t *rawdev_method = &rawdev_methods[0];
+ rawdev_func func;
+
+ stress_temp_dir_args(args, path, sizeof(path));
+
+ (void)get_setting("rawdev-method", &rawdev_method);
+ func = rawdev_method->func;
+
+ fd = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+ if (fd < 0) {
+ ret = exit_status(errno);
+ pr_err("%s: open failed: %d (%s)\n",
+ args->name, errno, strerror(errno));
+ return ret;
+ }
+
+ ret = fstat(fd, &stat_buf);
+ if (ret < 0) {
+ pr_err("%s: cannot stat %s: errno=%d (%s)\n",
+ args->name, path, errno, strerror(errno));
+ (void)unlink(path);
+ (void)close(fd);
+ return EXIT_FAILURE;
+ }
+ (void)unlink(path);
+ (void)close(fd);
+
+ devpath = stress_rawdev_path(stat_buf.st_dev);
+ if (!devpath) {
+ pr_inf("%s: cannot determine raw block device\n",
+ args->name);
+ return EXIT_NO_RESOURCE;
+ }
+
+ fd = open(devpath, O_RDONLY | O_NONBLOCK);
+ if (fd < 0) {
+ pr_inf("%s: cannot open raw block device: errno=%d (%s)\n",
+ args->name, errno, strerror(errno));
+ return EXIT_NO_RESOURCE;
+ }
+ ret = ioctl(fd, BLKGETSIZE, &blks);
+ if (ret < 0) {
+ pr_inf("%s: cannot get block size: errno=%d (%s)\n",
+ args->name, errno, strerror(errno));
+ (void)close(fd);
+ return EXIT_NO_RESOURCE;
+ }
+ ret = ioctl(fd, BLKSSZGET, &blksz);
+ if (ret < 0) {
+ pr_inf("%s: cannot get block size: errno=%d (%s)\n",
+ args->name, errno, strerror(errno));
+ (void)close(fd);
+ return EXIT_NO_RESOURCE;
+ }
+ (void)close(fd);
+ fd = open(devpath, O_RDONLY | O_DIRECT);
+ if (fd < 0) {
+ pr_inf("%s: cannot open raw block device: errno=%d (%s)\n",
+ args->name, errno, strerror(errno));
+ return EXIT_NO_RESOURCE;
+ }
+
+ if (args->instance == 0)
+ pr_dbg("%s: exercising %s (%lu blocks of size %lu bytes)\n",
+ args->name, devpath, blks, blksz);
+
+ do {
+ func(args, fd, blks, blksz);
+ } while (keep_stressing());
+
+ (void)close(fd);
+
+ return EXIT_SUCCESS;
+}
+#else
+int stress_rawdev(const args_t *args)
+{
+ return stress_not_implemented(args);
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-socket-diag.c new/stress-ng-0.09.08/stress-socket-diag.c
--- old/stress-ng-0.09.07/stress-socket-diag.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-socket-diag.c 2017-12-31 18:19:00.000000000 +0100
@@ -94,10 +94,10 @@
static int stress_sockdiag_parse(
const args_t *args,
- const struct unix_diag_msg *diag,
+ struct unix_diag_msg *diag,
unsigned int len)
{
- const struct rtattr *attr;
+ struct rtattr *attr;
unsigned int rta_len;
if (len < NLMSG_LENGTH(sizeof(*diag))) {
@@ -111,7 +111,7 @@
}
rta_len = len - NLMSG_LENGTH(sizeof(*diag));
- for (attr = (const struct rtattr *) (diag + 1);
+ for (attr = (struct rtattr *) (diag + 1);
RTA_OK(attr, rta_len) && keep_stressing();
attr = RTA_NEXT(attr, rta_len)) {
switch (attr->rta_type) {
@@ -151,7 +151,7 @@
.msg_iov = &iov,
.msg_iovlen = 1
};
- const struct nlmsghdr *h = (struct nlmsghdr *)buf;
+ struct nlmsghdr *h = (struct nlmsghdr *)buf;
ret = recvmsg(fd, &msg, flags);
if (ret == 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-timer.c new/stress-ng-0.09.08/stress-timer.c
--- old/stress-ng-0.09.07/stress-timer.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-timer.c 2017-12-31 18:19:00.000000000 +0100
@@ -79,7 +79,7 @@
* stress_timer_keep_stressing()
* returns true if we can keep on running a stressor
*/
-bool HOT OPTIMIZE3 stress_timer_keep_stressing(void)
+static bool HOT OPTIMIZE3 stress_timer_keep_stressing(void)
{
return (LIKELY(g_keep_stressing_flag) &&
LIKELY(!max_ops || (timer_counter < max_ops)));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-tlb-shootdown.c new/stress-ng-0.09.08/stress-tlb-shootdown.c
--- old/stress-ng-0.09.07/stress-tlb-shootdown.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-tlb-shootdown.c 2017-12-31 18:19:00.000000000 +0100
@@ -39,6 +39,12 @@
const size_t page_size = args->page_size;
const size_t mmap_size = page_size * MMAP_PAGES;
pid_t pids[MAX_TLB_PROCS];
+ cpu_set_t proc_mask_initial;
+
+ if (sched_getaffinity(0, sizeof(proc_mask_initial), &proc_mask_initial) < 0) {
+ pr_fail_err("could not get CPU affinity");
+ return EXIT_FAILURE;
+ }
do {
uint8_t *mem, *ptr;
@@ -47,10 +53,7 @@
int32_t tlb_procs, i;
const int32_t max_cpus = stress_get_processors_configured();
- if (sched_getaffinity(0, sizeof(proc_mask), &proc_mask) < 0) {
- pr_fail_err("could not get CPU affinity");
- return EXIT_FAILURE;
- }
+ CPU_OR(&proc_mask, &proc_mask_initial, &proc_mask);
tlb_procs = max_cpus;
if (tlb_procs > MAX_TLB_PROCS)
@@ -113,13 +116,29 @@
for (i = 0; i < tlb_procs; i++) {
if (pids[i] != -1) {
- int status;
+ int status, ret;
+
+ ret = waitpid(pids[i], &status, 0);
+ if ((ret < 0) && (errno == EINTR)) {
+ int j;
+
+ /*
+ * We got interrupted, so assume
+ * it was the alarm (timedout) or
+ * SIGINT so force terminate
+ */
+ for (j = i; j < tlb_procs; j++)
+ (void)kill(pids[j], SIGKILL);
- (void)kill(pids[i], SIGKILL);
- (void)waitpid(pids[i], &status, 0);
+ /* re-wait on the failed wait */
+ (void)waitpid(pids[i], &status, 0);
+
+ /* and continue waitpid on the pids */
+ }
}
}
(void)munmap(mem, mmap_size);
+ (void)sched_setaffinity(0, sizeof(proc_mask_initial), &proc_mask_initial);
inc_counter(args);
} while (keep_stressing());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-vecmath.c new/stress-ng-0.09.08/stress-vecmath.c
--- old/stress-ng-0.09.07/stress-vecmath.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-vecmath.c 2017-12-31 18:19:00.000000000 +0100
@@ -174,7 +174,7 @@
uint64_put(a64[0] + a64[1]);
#if defined(STRESS_INT128)
- uint64_put((a128[0] >> 64) || (a128[0] & 0xffffffffffffULL));
+ uint128_put(a128[0]);
#endif
return EXIT_SUCCESS;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-vm.c new/stress-ng-0.09.08/stress-vm.c
--- old/stress-ng-0.09.07/stress-vm.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-vm.c 2017-12-31 18:19:00.000000000 +0100
@@ -92,7 +92,7 @@
* keep_stressing()
* returns true if we can keep on running a stressor
*/
-bool HOT OPTIMIZE3 keep_stressing_vm(const args_t *args)
+static bool HOT OPTIMIZE3 keep_stressing_vm(const args_t *args)
{
return (LIKELY(g_keep_stressing_flag) &&
LIKELY(!args->max_ops || ((*args->counter >> VM_BOGO_SHIFT) < args->max_ops)));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/stress-wcstr.c new/stress-ng-0.09.08/stress-wcstr.c
--- old/stress-ng-0.09.07/stress-wcstr.c 2017-12-14 19:17:52.000000000 +0100
+++ new/stress-ng-0.09.08/stress-wcstr.c 2017-12-31 18:19:00.000000000 +0100
@@ -25,8 +25,6 @@
*/
#include "stress-ng.h"
-#include <wchar.h>
-
#define STR1LEN 256
#define STR2LEN 128
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/test/test-bsd-wchar.c new/stress-ng-0.09.08/test/test-bsd-wchar.c
--- old/stress-ng-0.09.07/test/test-bsd-wchar.c 1970-01-01 01:00:00.000000000 +0100
+++ new/stress-ng-0.09.08/test/test-bsd-wchar.c 2017-12-31 18:19:00.000000000 +0100
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2016-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.king(a)canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <apw(a)rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+#include <bsd/wchar.h>
+
+int main(void)
+{
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.07/test/test-wchar.c new/stress-ng-0.09.08/test/test-wchar.c
--- old/stress-ng-0.09.07/test/test-wchar.c 1970-01-01 01:00:00.000000000 +0100
+++ new/stress-ng-0.09.08/test/test-wchar.c 2017-12-31 18:19:00.000000000 +0100
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2016-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.king(a)canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <apw(a)rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+#include <wchar.h>
+
+int main(void)
+{
+ return 0;
+}
1
0
Hello community,
here is the log from the commit of package galculator for openSUSE:Factory checked in at 2018-01-01 22:36:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/galculator (Old)
and /work/SRC/openSUSE:Factory/.galculator.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "galculator"
Mon Jan 1 22:36:00 2018 rev:23 rq:560956 version:2.1.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/galculator/galculator.changes 2014-05-13 20:45:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.galculator.new/galculator.changes 2018-01-01 22:36:05.478752283 +0100
@@ -1,0 +2,32 @@
+Mon Jan 1 07:36:08 UTC 2018 - avindra(a)opensuse.org
+
+- use new upstream urls
+- cleanup with spec-cleaner
+- link against gtk 3 (instead of 2)
+
+-------------------------------------------------------------------
+Fri Oct 16 21:22:35 UTC 2015 - trcs(a)gmx.com
+
+- new upstream version 2.1.4
+ * adding a fresh "tx pull" of translations
+ * adding an appdata file
+ * in ui.c::set_all_dispctrl_buttons_property check for
+ table_children != NULL (fixes sf.net bug #107)
+ * *.c: all dynamic memory allocation and free'ing is done via
+ glib now.
+ * Changed default background color for the display to white.
+ * In callbacks.c and general_functions.c, team up every
+ gtk_check_menu_item_set_active with a gtk_check_menu_item_toggled.
+ See also 2014-01-08 and sf.net bug #99. (fixes sf.net bug #105)
+ * translations are now served through transifex
+ * set_basic_object_data/set_scientific_object_data make structs
+ static (fixes sf.net bug #104)
+- updated description
+
+-------------------------------------------------------------------
+Sun Jun 28 11:23:02 UTC 2015 - p.drouand(a)gmail.com
+
+- Provide and obsolete mate-calc; galculator has replaced
+ mate-calc in Mate 1.10
+
+-------------------------------------------------------------------
Old:
----
galculator-2.1.3.tar.bz2
New:
----
galculator-2.1.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ galculator.spec ++++++
--- /var/tmp/diff_new_pack.9jVogP/_old 2018-01-01 22:36:06.562390485 +0100
+++ /var/tmp/diff_new_pack.9jVogP/_new 2018-01-01 22:36:06.562390485 +0100
@@ -1,7 +1,7 @@
#
# spec file for package galculator
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,27 +17,28 @@
Name: galculator
-Version: 2.1.3
+Version: 2.1.4
Release: 0
-Summary: A GTK 2/3 based calculator
+Summary: A GTK 3 based calculator
License: GPL-2.0+
Group: System/GUI/GNOME
-Url: http://galculator.sourceforge.net/index.html
-Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+Url: http://galculator.mnim.org/
+Source0: http://galculator.mnim.org/downloads/%{name}-%{version}.tar.bz2
BuildRequires: flex
BuildRequires: intltool
BuildRequires: libtool
-BuildRequires: pkg-config
+BuildRequires: pkgconfig
BuildRequires: update-desktop-files
-BuildRequires: pkgconfig(gtk+-2.0)
+BuildRequires: pkgconfig(gtk+-3.0)
Recommends: %{name}-lang
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Provides: mate-calc = %{version}
+Obsoletes: mate-calc < %{version}
%description
-Galculator is a GTK 2 based calculator with ordinary notation/reverse
-polish notation, a formula entry mode, different number bases
-(DEC, HEX, OCT, BIN) and different units of angular measure
-(DEG, RAD, GRAD).
+galculator is a GTK 3 based calculator with ordinary notation/reverse
+polish notation (RPN), a formula entry mode, different number bases
+(DEC, HEX, OCT, BIN) and different units of angular measure (DEG, RAD, GRAD).
+It supports quad-precision floating point and 112-bit binary arithmetic.
%lang_package
@@ -45,11 +46,14 @@
%setup -q
%build
-%configure --enable-gtk3=no
+%configure
make %{?_smp_mflags}
%install
%make_install
+%if 0%{?suse_version} == 1310
+rm %{buildroot}/%{_datadir}/appdata/galculator.appdata.xml
+%endif
%suse_update_desktop_file -r %{name} GTK Utility Calculator
%find_lang %{name}
@@ -62,14 +66,17 @@
%icon_theme_cache_postun
%files
-%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README THANKS doc/shortcuts
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/*
+%if 0%{?suse_version} > 1310
+%dir %{_datadir}/appdata
+%{_datadir}/appdata/galculator.appdata.xml
+%endif
%{_datadir}/icons/hicolor/*/*/%{name}.*
%{_datadir}/pixmaps/%{name}.*
-%{_mandir}/man1/%{name}.1.gz
+%{_mandir}/man1/%{name}.1%{ext_man}
%files lang -f %{name}.lang
++++++ galculator-2.1.3.tar.bz2 -> galculator-2.1.4.tar.bz2 ++++++
++++ 31730 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-distro for openSUSE:Factory checked in at 2018-01-01 22:35:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-distro (Old)
and /work/SRC/openSUSE:Factory/.python-distro.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-distro"
Mon Jan 1 22:35:36 2018 rev:3 rq:560908 version:1.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-distro/python-distro.changes 2017-12-11 18:56:26.238749318 +0100
+++ /work/SRC/openSUSE:Factory/.python-distro.new/python-distro.changes 2018-01-01 22:35:42.618384733 +0100
@@ -1,0 +2,6 @@
+Sun Dec 24 19:11:15 UTC 2017 - sebix+novell.com(a)sebix.at
+
+- update to version 1.2.0:
+ * Explicitly set Python versions for flake8 tests.
+
+-------------------------------------------------------------------
Old:
----
distro-1.1.0.tar.gz
New:
----
distro-1.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-distro.spec ++++++
--- /var/tmp/diff_new_pack.A8p7Wt/_old 2018-01-01 22:35:43.678030946 +0100
+++ /var/tmp/diff_new_pack.A8p7Wt/_new 2018-01-01 22:35:43.682029611 +0100
@@ -13,22 +13,23 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{!?license: %global license %doc}
%bcond_without test
Name: python-distro
-Version: 1.1.0
+Version: 1.2.0
Release: 0
-License: Apache-2.0
Summary: Linux Distribution - a Linux OS platform information API
-Url: https://github.com/nir0s/distro
+License: Apache-2.0
Group: Development/Languages/Python
+Url: https://github.com/nir0s/distro
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.t…
-BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
+BuildRequires: python-rpm-macros
# SECTION test
%if %{with test}
BuildRequires: %{python_module pytest}
++++++ distro-1.1.0.tar.gz -> distro-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/CHANGES new/distro-1.2.0/CHANGES
--- old/distro-1.1.0/CHANGES 2017-10-11 19:51:17.000000000 +0200
+++ new/distro-1.2.0/CHANGES 2017-12-24 19:07:50.000000000 +0100
@@ -1,6 +1,20 @@
-**1.0.5 (unreleased)**
+**1.2.0 (2017.12.24)**
+
+* Lazily load parsers to speed up import time.
+* Don't raise import error on non-linux os.
+* Decode stdout of shell sys.getfilesystemencoding().
+* Explicitly set Python versions for flake8 tests.
+
+
+**1.1.0 (2017.11.28)**
+
+Note: This version removes official support for Python 2.6. If you need a version that is tested on Python 2.6, please use `distro<=1.0.4`.
+
+In addition:
+
+* Add tests for MandrivaLinux, CloudLinux 5,6,7
+* Modify MANIFEST to include resources for tests and docs in source tarballs (https://github.com/nir0s/distro/pull/189/files#diff-97c91a104c431d0c365565d…)
-* Include resources needed for tests and docs in source tarballs
**1.0.4 (2017.04.01)**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/PKG-INFO new/distro-1.2.0/PKG-INFO
--- old/distro-1.1.0/PKG-INFO 2017-11-28 10:07:43.000000000 +0100
+++ new/distro-1.2.0/PKG-INFO 2017-12-24 19:08:15.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: distro
-Version: 1.1.0
+Version: 1.2.0
Summary: Linux Distribution - a Linux OS platform information API
Home-page: https://github.com/nir0s/distro
Author: Nir Cohen
Author-email: nir36g(a)gmail.com
License: Apache License, Version 2.0
-Description-Content-Type: UNKNOWN
Description: Distro - a Linux OS platform information API
============================================
@@ -21,7 +20,6 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/README.md new/distro-1.2.0/README.md
--- old/distro-1.1.0/README.md 2017-11-28 09:58:45.000000000 +0100
+++ new/distro-1.2.0/README.md 2017-12-04 08:00:09.000000000 +0100
@@ -91,7 +91,7 @@
## Python and Distribution Support
-`distro` is supported and tested on Python 2.7, 3.3+ and PyPy and on
+`distro` is supported and tested on Python 2.7, 3.4+ and PyPy and on
any Linux distribution that provides one or more of the data sources
covered.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/distro.egg-info/PKG-INFO new/distro-1.2.0/distro.egg-info/PKG-INFO
--- old/distro-1.1.0/distro.egg-info/PKG-INFO 2017-11-28 10:07:43.000000000 +0100
+++ new/distro-1.2.0/distro.egg-info/PKG-INFO 2017-12-24 19:08:15.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: distro
-Version: 1.1.0
+Version: 1.2.0
Summary: Linux Distribution - a Linux OS platform information API
Home-page: https://github.com/nir0s/distro
Author: Nir Cohen
Author-email: nir36g(a)gmail.com
License: Apache License, Version 2.0
-Description-Content-Type: UNKNOWN
Description: Distro - a Linux OS platform information API
============================================
@@ -21,7 +20,6 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/distro.py new/distro-1.2.0/distro.py
--- old/distro-1.1.0/distro.py 2017-10-11 19:28:18.000000000 +0200
+++ new/distro-1.2.0/distro.py 2017-12-24 17:29:31.000000000 +0100
@@ -38,9 +38,6 @@
import subprocess
-if not sys.platform.startswith('linux'):
- raise ImportError('Unsupported platform: {0}'.format(sys.platform))
-
_UNIXCONFDIR = os.environ.get('UNIXCONFDIR', '/etc')
_OS_RELEASE_BASENAME = 'os-release'
@@ -511,6 +508,21 @@
return _distro.distro_release_attr(attribute)
+class cached_property(object):
+ """A version of @property which caches the value. On access, it calls the
+ underlying function and sets the value in `__dict__` so future accesses
+ will not re-call the property.
+ """
+ def __init__(self, f):
+ self._fname = f.__name__
+ self._f = f
+
+ def __get__(self, obj, owner):
+ assert obj is not None, 'call {} on an instance'.format(self._fname)
+ ret = obj.__dict__[self._fname] = self._f(obj)
+ return ret
+
+
class LinuxDistribution(object):
"""
Provides information about a Linux distribution.
@@ -576,6 +588,9 @@
`distro release file`_ that is actually used as a data source. The
empty string if no distro release file is used as a data source.
+ * ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
+ This controls whether the lsb information will be loaded.
+
Raises:
* :py:exc:`IOError`: Some I/O issue with an os-release file or distro
@@ -591,26 +606,20 @@
self.os_release_file = os_release_file or \
os.path.join(_UNIXCONFDIR, _OS_RELEASE_BASENAME)
self.distro_release_file = distro_release_file or '' # updated later
- self._os_release_info = self._get_os_release_info()
- self._lsb_release_info = self._get_lsb_release_info() \
- if include_lsb else {}
- self._distro_release_info = self._get_distro_release_info()
+ self.include_lsb = include_lsb
def __repr__(self):
"""Return repr of all info
"""
return \
"LinuxDistribution(" \
- "os_release_file={0!r}, " \
- "distro_release_file={1!r}, " \
- "_os_release_info={2!r}, " \
- "_lsb_release_info={3!r}, " \
- "_distro_release_info={4!r})".format(
- self.os_release_file,
- self.distro_release_file,
- self._os_release_info,
- self._lsb_release_info,
- self._distro_release_info)
+ "os_release_file={self.os_release_file!r}, " \
+ "distro_release_file={self.distro_release_file!r}, " \
+ "include_lsb={self.include_lsb!r}, " \
+ "_os_release_info={self._os_release_info!r}, " \
+ "_lsb_release_info={self._lsb_release_info!r}, " \
+ "_distro_release_info={self._distro_release_info!r})".format(
+ self=self)
def linux_distribution(self, full_distribution_name=True):
"""
@@ -835,7 +844,8 @@
"""
return self._distro_release_info.get(attribute, '')
- def _get_os_release_info(self):
+ @cached_property
+ def _os_release_info(self):
"""
Get the information items from the specified os-release file.
@@ -907,34 +917,24 @@
pass
return props
- def _get_lsb_release_info(self):
+ @cached_property
+ def _lsb_release_info(self):
"""
Get the information items from the lsb_release command output.
Returns:
A dictionary containing all information items.
"""
- cmd = 'lsb_release -a'
- process = subprocess.Popen(
- cmd,
- shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- stdout, stderr = process.communicate()
- stdout, stderr = stdout.decode('utf-8'), stderr.decode('utf-8')
- code = process.returncode
- if code == 0:
- content = stdout.splitlines()
- return self._parse_lsb_release_content(content)
- elif code == 127: # Command not found
+ if not self.include_lsb:
return {}
- else:
- if sys.version_info[:2] >= (3, 5):
- raise subprocess.CalledProcessError(code, cmd, stdout, stderr)
- elif sys.version_info[:2] >= (2, 7):
- raise subprocess.CalledProcessError(code, cmd, stdout)
- elif sys.version_info[:2] == (2, 6):
- raise subprocess.CalledProcessError(code, cmd)
+ with open(os.devnull, 'w') as devnull:
+ try:
+ cmd = ('lsb_release', '-a')
+ stdout = subprocess.check_output(cmd, stderr=devnull)
+ except OSError: # Command not found
+ return {}
+ content = stdout.decode(sys.getfilesystemencoding()).splitlines()
+ return self._parse_lsb_release_content(content)
@staticmethod
def _parse_lsb_release_content(lines):
@@ -952,7 +952,6 @@
"""
props = {}
for line in lines:
- line = line.decode('utf-8') if isinstance(line, bytes) else line
kv = line.strip('\n').split(':', 1)
if len(kv) != 2:
# Ignore lines without colon.
@@ -961,7 +960,8 @@
props.update({k.replace(' ', '_').lower(): v.strip()})
return props
- def _get_distro_release_info(self):
+ @cached_property
+ def _distro_release_info(self):
"""
Get the information items from the specified distro release file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/docs/index.rst new/distro-1.2.0/docs/index.rst
--- old/distro-1.1.0/docs/index.rst 2017-11-28 09:58:45.000000000 +0100
+++ new/distro-1.2.0/docs/index.rst 2017-12-24 17:26:22.000000000 +0100
@@ -20,11 +20,11 @@
Compatibility
=============
-The ``distro`` package is supported on Python 2.7, 3.3+ and PyPy, and on
+The ``distro`` package is supported on Python 2.7, 3.4+ and PyPy, and on
any Linux distribution that provides one or more of the `data sources`_
used by this package.
-This package is tested on Python 2.7, 3.3+ and PyPy, with test data that
+This package is tested on Python 2.7, 3.4+ and PyPy, with test data that
mimics the exact behavior of the data sources of
`a number of Linux distributions <https://github.com/nir0s/distro/tree/master/tests/resources/distros>`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/setup.py new/distro-1.2.0/setup.py
--- old/distro-1.1.0/setup.py 2017-11-28 10:04:03.000000000 +0100
+++ new/distro-1.2.0/setup.py 2017-12-24 17:29:50.000000000 +0100
@@ -18,7 +18,7 @@
# The following version is parsed by other parts of this package.
# Don't change the format of the line, or the variable name.
-package_version = "1.1.0"
+package_version = "1.2.0"
here = os.path.abspath(os.path.dirname(__file__))
@@ -53,7 +53,6 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distro-1.1.0/tests/test_distro.py new/distro-1.2.0/tests/test_distro.py
--- old/distro-1.1.0/tests/test_distro.py 2017-10-11 19:28:18.000000000 +0200
+++ new/distro-1.2.0/tests/test_distro.py 2017-12-24 17:26:25.000000000 +0100
@@ -397,7 +397,6 @@
def setup_method(self, test_method):
super(TestLSBRelease, self).setup_method(test_method)
- self.test_method_name = test_method.__name__
dist = test_method.__name__.split('_')[1]
self._setup_for_distro(os.path.join(DISTROS_DIR, dist))
self.distro = distro.LinuxDistribution(True, 'non', 'non')
@@ -502,38 +501,13 @@
}
self._test_outcome(desired_outcome)
- def _test_lsb_release_error_level(self, errnum):
-
+ @pytest.mark.parametrize('errnum', ('001', '002', '126', '130', '255'))
+ def test_lsb_release_error_level(self, errnum):
self._setup_for_distro(os.path.join(
TESTDISTROS, 'lsb', 'lsb_rc{0}'.format(errnum)))
- try:
- distro.LinuxDistribution(True, 'non', 'non') # NOQA
- except Exception as _exc:
- exc = _exc
- else:
- exc = None
- assert isinstance(exc, subprocess.CalledProcessError)
- assert exc.returncode == int(errnum)
-
- def test_lsb_release_rc001(self):
- errnum = self.test_method_name[-3:]
- self._test_lsb_release_error_level(errnum)
-
- def test_lsb_release_rc002(self):
- errnum = self.test_method_name[-3:]
- self._test_lsb_release_error_level(errnum)
-
- def test_lsb_release_rc126(self):
- errnum = self.test_method_name[-3:]
- self._test_lsb_release_error_level(errnum)
-
- def test_lsb_release_rc130(self):
- errnum = self.test_method_name[-3:]
- self._test_lsb_release_error_level(errnum)
-
- def test_lsb_release_rc255(self):
- errnum = self.test_method_name[-3:]
- self._test_lsb_release_error_level(errnum)
+ with pytest.raises(subprocess.CalledProcessError) as excinfo:
+ distro.LinuxDistribution(True, 'non', 'non')._lsb_release_info
+ assert excinfo.value.returncode == int(errnum)
@pytest.mark.skipif(not IS_LINUX, reason='Irrelevant on non-linux')
1
0