openSUSE Commits
Threads by month
- ----- 2024 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
September 2015
- 1 participants
- 1128 discussions
Hello community,
here is the log from the commit of package python3-fixtures for openSUSE:Factory checked in at 2015-09-30 05:49:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-fixtures (Old)
and /work/SRC/openSUSE:Factory/.python3-fixtures.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-fixtures"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-fixtures/python3-fixtures.changes 2015-05-11 19:49:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-fixtures.new/python3-fixtures.changes 2015-09-30 05:49:27.000000000 +0200
@@ -1,0 +2,16 @@
+Tue Jun 30 23:06:13 UTC 2015 - arun(a)gmx.de
+
+- update to version 1.3.1:
+ * Clarify the intent around _setUp
+ * Handle BaseException resource leaks as well
+
+- changes from version 1.3.0:
+ * Remove trailing whitespace
+ * Deal with resource leaks during setUp
+ * Missed NEWS entry
+ * Fine tune the mock patch
+ * Add a new mockpatch fixture
+ * Document where the project home and source are
+ * Ignore built things
+
+-------------------------------------------------------------------
Old:
----
fixtures-1.2.0.tar.gz
New:
----
fixtures-1.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-fixtures.spec ++++++
--- /var/tmp/diff_new_pack.Mf9tpT/_old 2015-09-30 05:49:28.000000000 +0200
+++ /var/tmp/diff_new_pack.Mf9tpT/_new 2015-09-30 05:49:28.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-fixtures
-Version: 1.2.0
+Version: 1.3.1
Release: 0
Summary: Fixtrues, reusable state for writing clean tests and more
License: Apache-2.0 or BSD-3-Clause
++++++ fixtures-1.2.0.tar.gz -> fixtures-1.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/AUTHORS new/fixtures-1.3.1/AUTHORS
--- old/fixtures-1.2.0/AUTHORS 2015-05-05 00:14:19.000000000 +0200
+++ new/fixtures-1.3.1/AUTHORS 2015-06-30 04:22:04.000000000 +0200
@@ -9,6 +9,7 @@
Jonathan Lange <jml(a)canonical.com>
Jonathan Lange <jml(a)mumak.net>
Joshua Harlow <harlowja(a)yahoo-inc.com>
+Julien Danjou <julien(a)danjou.info>
Martin Pool <mbp(a)canonical.com>
Robert Collins <robertc(a)robertcollins.net>
Sean Dague <sean(a)dague.net>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/ChangeLog new/fixtures-1.3.1/ChangeLog
--- old/fixtures-1.2.0/ChangeLog 2015-05-05 00:14:19.000000000 +0200
+++ new/fixtures-1.3.1/ChangeLog 2015-06-30 04:22:04.000000000 +0200
@@ -1,6 +1,25 @@
CHANGES
=======
+1.3.1
+-----
+
+* Release 1.3.1
+* Clarify the intent around _setUp
+* Handle BaseException resource leaks as well
+
+1.3.0
+-----
+
+* Release 1.3.0
+* Remove trailing whitespace
+* Deal with resource leaks during setUp
+* Missed NEWS entry
+* Fine tune the mock patch
+* Add a new mockpatch fixture
+* Document where the project home and source are
+* Ignore built things
+
1.2.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/NEWS new/fixtures-1.3.1/NEWS
--- old/fixtures-1.2.0/NEWS 2015-05-04 23:50:18.000000000 +0200
+++ new/fixtures-1.3.1/NEWS 2015-06-30 04:21:13.000000000 +0200
@@ -6,6 +6,27 @@
NEXT
~~~~
+1.3.1
+~~~~~
+
+* ``Fixture.setUp`` now uses a bare except: and will thus catch BaseException.
+ Any non-Exception-subclass errors are raised verbatim after calling
+ ``cleanUp``, to avoid inappropriate masking in callers. (Robert Collins)
+
+1.3.0
+~~~~~
+
+* Add MockPatch, MockPatchMultiple, MockPatchObject - adapters to mock.
+ (Julien Danjou, Robert Collins)
+
+* Fixture.setUp should no longer be overridden in subclasses. Instead
+ override _setUp. This permits the Fixture base class to detect failures
+ during _setUp and trigger any registered cleanups, attach any details
+ to the failure exception and propogate that to callers. Overriding of
+ setUp is still supported: this adds a new interface for simpler
+ implementation of the contract of a fixture.
+ (Robert Collins, #1456361, #1456353)
+
1.2.0
~~~~~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/PKG-INFO new/fixtures-1.3.1/PKG-INFO
--- old/fixtures-1.2.0/PKG-INFO 2015-05-05 00:14:19.000000000 +0200
+++ new/fixtures-1.3.1/PKG-INFO 2015-06-30 04:22:04.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: fixtures
-Version: 1.2.0
+Version: 1.3.1
Summary: Fixtures, reusable state for writing clean tests and more.
Home-page: https://launchpad.net/python-fixtures
Author: Robert Collins
@@ -87,19 +87,20 @@
Creating Fixtures
=================
- Minimally, subclass Fixture, define setUp to initialize your state and schedule
+ Minimally, subclass Fixture, define _setUp to initialize your state and schedule
a cleanup for when cleanUp is called and you're done::
>>> import unittest
>>> import fixtures
>>> class NoddyFixture(fixtures.Fixture):
- ... def setUp(self):
- ... super(NoddyFixture, self).setUp()
+ ... def _setUp(self):
... self.frobnozzle = 42
... self.addCleanup(delattr, self, 'frobnozzle')
- This will initialize frobnozzle when setUp is called, and when cleanUp is
- called get rid of the frobnozzle attribute.
+ This will initialize frobnozzle when ``setUp`` is called, and when ``cleanUp``
+ is called get rid of the frobnozzle attribute. Prior to version 1.3.0 fixtures
+ recommended overriding ``setUp``. This is still supported, but since it is
+ harder to write leak-free fixtures in this fashion, it is not recommended.
If your fixture has diagnostic data - for instance the log file of an
application server, or log messages, it can expose that by creating a content
@@ -107,8 +108,7 @@
>>> from testtools.content import text_content
>>> class WithLog(fixtures.Fixture):
- ... def setUp(self):
- ... super(WithLog, self).setUp()
+ ... def _setUp(self):
... self.addDetail('message', text_content('foo bar baz'))
The method ``useFixture`` will use another fixture, call ``setUp`` on it, call
@@ -116,8 +116,7 @@
the fixture. This allows simple composition of different fixtures.
>>> class ReusingFixture(fixtures.Fixture):
- ... def setUp(self):
- ... super(ReusingFixture, self).setUp()
+ ... def _setUp(self):
... self.noddy = self.useFixture(NoddyFixture())
There is a helper for adapting a function or function pair into Fixtures. it
@@ -162,9 +161,9 @@
clean up after a fixture has been used, all fixtures define a ``cleanUp``
method which should be called when a fixture is finished with.
- Because its nice to be able to build a particular set of related fixtures in
- advance of using them, fixtures also have define a ``setUp`` method which
- should be called before trying to use them.
+ Because it's nice to be able to build a particular set of related fixtures in
+ advance of using them, fixtures also have a ``setUp`` method which should be
+ called before trying to use them.
One common desire with fixtures that are expensive to create is to reuse them
in many test cases; to support this the base Fixture also defines a ``reset``
@@ -211,8 +210,7 @@
>>> import sys
>>> from fixtures.fixture import MultipleExceptions
>>> class BrokenFixture(fixtures.Fixture):
- ... def setUp(self):
- ... fixtures.Fixture.setUp(self)
+ ... def _setUp(self):
... self.addCleanup(lambda:1/0)
... self.addCleanup(lambda:1/0)
>>> fixture = BrokenFixture()
@@ -226,12 +224,32 @@
Fixtures often expose diagnostic details that can be useful for tracking down
issues. The ``getDetails`` method will return a dict of all the attached
- details. Each detail object is an instance of ``testtools.content.Content``.
+ details, but can only be called before ``cleanUp`` is called. Each detail
+ object is an instance of ``testtools.content.Content``.
>>> with WithLog() as l:
... print(l.getDetails()['message'].as_text())
foo bar baz
+ Errors in setUp
+ +++++++++++++++
+
+ The examples above used ``_setUp`` rather than ``setUp`` because the base
+ class implementation of ``setUp`` acts to reduce the chance of leaking
+ external resources if an error is raised from ``_setUp``. Specifically,
+ ``setUp`` contains a try:/except: block which catches all exceptions, captures
+ any registered detail objects, and calls ``self.cleanUp`` before propogating
+ the error. As long as you take care to register any cleanups before calling
+ the code that may fail, this will cause them to be cleaned up. The captured
+ detail objects are provided to the args of the raised exception.
+
+ If the error that occured was a subclass of ``Exception`` then ``setUp`` will
+ raise ``MultipleExceptions`` with the last element being a ``SetupError`` that
+ contains the detail objects. Otherwise, to prevent causing normally
+ uncatchable errors like KeyboardInterrupt being caught inappropriately in the
+ calling layer, the original exception will be raised as-is and no diagnostic
+ data other than that from the original exception will be available.
+
Shared Dependencies
+++++++++++++++++++
@@ -308,7 +326,8 @@
In addition to the Fixture, FunctionFixture and MethodFixture classes fixtures
includes a number of precanned fixtures. The API docs for fixtures will list
- the complete set of these, should the dcs be out of date or not to hand.
+ the complete set of these, should the dcs be out of date or not to hand. For
+ the complete feature set of each fixture please see the API docs.
ByteStream
++++++++++
@@ -348,6 +367,34 @@
>>> from testtools.compat import BytesIO
>>> fixture = fixtures.FakePopen(lambda _:{'stdout': BytesIO('foobar')})
+ MockPatchObject
+ +++++++++++++++
+
+ Adapts ``mock.patch.object`` to be used as a Fixture.
+
+ >>> class Fred:
+ ... value = 1
+ >>> fixture = fixtures.MockPatchObject(Fred, 'value', 2)
+ >>> with fixture:
+ ... Fred().value
+ 2
+ >>> Fred().value
+ 1
+
+ MockPatch
+ +++++++++
+
+ Adapts ``mock.patch`` to be used as a Fixture.
+
+ >>> fixture = fixtures.MockPatch('subprocess.Popen.returncode', 3)
+
+ MockPatchMultiple
+ +++++++++++++++++
+
+ Adapts ``mock.patch.multiple`` to be used as a Fixture.
+
+ >>> fixture = fixtures.MockPatch('subprocess.Popen', returncode=3)
+
MonkeyPatch
+++++++++++
@@ -447,6 +494,13 @@
*Note:* Currently supported only on Unix because it relies on the ``alarm``
system call.
+ Contributing
+ ============
+
+ Fixtures has its project homepage on Launchpad
+ <https://launchpad.net/python-fixtures>. Source code is hosted on GitHub
+ <https://github.com/testing-cabal/fixtures>.
+
Platform: UNKNOWN
Classifier: Development Status :: 6 - Mature
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/README new/fixtures-1.3.1/README
--- old/fixtures-1.2.0/README 2014-09-25 04:37:13.000000000 +0200
+++ new/fixtures-1.3.1/README 2015-06-30 02:56:38.000000000 +0200
@@ -79,19 +79,20 @@
Creating Fixtures
=================
-Minimally, subclass Fixture, define setUp to initialize your state and schedule
+Minimally, subclass Fixture, define _setUp to initialize your state and schedule
a cleanup for when cleanUp is called and you're done::
>>> import unittest
>>> import fixtures
>>> class NoddyFixture(fixtures.Fixture):
- ... def setUp(self):
- ... super(NoddyFixture, self).setUp()
+ ... def _setUp(self):
... self.frobnozzle = 42
... self.addCleanup(delattr, self, 'frobnozzle')
-This will initialize frobnozzle when setUp is called, and when cleanUp is
-called get rid of the frobnozzle attribute.
+This will initialize frobnozzle when ``setUp`` is called, and when ``cleanUp``
+is called get rid of the frobnozzle attribute. Prior to version 1.3.0 fixtures
+recommended overriding ``setUp``. This is still supported, but since it is
+harder to write leak-free fixtures in this fashion, it is not recommended.
If your fixture has diagnostic data - for instance the log file of an
application server, or log messages, it can expose that by creating a content
@@ -99,8 +100,7 @@
>>> from testtools.content import text_content
>>> class WithLog(fixtures.Fixture):
- ... def setUp(self):
- ... super(WithLog, self).setUp()
+ ... def _setUp(self):
... self.addDetail('message', text_content('foo bar baz'))
The method ``useFixture`` will use another fixture, call ``setUp`` on it, call
@@ -108,8 +108,7 @@
the fixture. This allows simple composition of different fixtures.
>>> class ReusingFixture(fixtures.Fixture):
- ... def setUp(self):
- ... super(ReusingFixture, self).setUp()
+ ... def _setUp(self):
... self.noddy = self.useFixture(NoddyFixture())
There is a helper for adapting a function or function pair into Fixtures. it
@@ -154,9 +153,9 @@
clean up after a fixture has been used, all fixtures define a ``cleanUp``
method which should be called when a fixture is finished with.
-Because its nice to be able to build a particular set of related fixtures in
-advance of using them, fixtures also have define a ``setUp`` method which
-should be called before trying to use them.
+Because it's nice to be able to build a particular set of related fixtures in
+advance of using them, fixtures also have a ``setUp`` method which should be
+called before trying to use them.
One common desire with fixtures that are expensive to create is to reuse them
in many test cases; to support this the base Fixture also defines a ``reset``
@@ -203,8 +202,7 @@
>>> import sys
>>> from fixtures.fixture import MultipleExceptions
>>> class BrokenFixture(fixtures.Fixture):
- ... def setUp(self):
- ... fixtures.Fixture.setUp(self)
+ ... def _setUp(self):
... self.addCleanup(lambda:1/0)
... self.addCleanup(lambda:1/0)
>>> fixture = BrokenFixture()
@@ -218,12 +216,32 @@
Fixtures often expose diagnostic details that can be useful for tracking down
issues. The ``getDetails`` method will return a dict of all the attached
-details. Each detail object is an instance of ``testtools.content.Content``.
+details, but can only be called before ``cleanUp`` is called. Each detail
+object is an instance of ``testtools.content.Content``.
>>> with WithLog() as l:
... print(l.getDetails()['message'].as_text())
foo bar baz
+Errors in setUp
++++++++++++++++
+
+The examples above used ``_setUp`` rather than ``setUp`` because the base
+class implementation of ``setUp`` acts to reduce the chance of leaking
+external resources if an error is raised from ``_setUp``. Specifically,
+``setUp`` contains a try:/except: block which catches all exceptions, captures
+any registered detail objects, and calls ``self.cleanUp`` before propogating
+the error. As long as you take care to register any cleanups before calling
+the code that may fail, this will cause them to be cleaned up. The captured
+detail objects are provided to the args of the raised exception.
+
+If the error that occured was a subclass of ``Exception`` then ``setUp`` will
+raise ``MultipleExceptions`` with the last element being a ``SetupError`` that
+contains the detail objects. Otherwise, to prevent causing normally
+uncatchable errors like KeyboardInterrupt being caught inappropriately in the
+calling layer, the original exception will be raised as-is and no diagnostic
+data other than that from the original exception will be available.
+
Shared Dependencies
+++++++++++++++++++
@@ -300,7 +318,8 @@
In addition to the Fixture, FunctionFixture and MethodFixture classes fixtures
includes a number of precanned fixtures. The API docs for fixtures will list
-the complete set of these, should the dcs be out of date or not to hand.
+the complete set of these, should the dcs be out of date or not to hand. For
+the complete feature set of each fixture please see the API docs.
ByteStream
++++++++++
@@ -340,6 +359,34 @@
>>> from testtools.compat import BytesIO
>>> fixture = fixtures.FakePopen(lambda _:{'stdout': BytesIO('foobar')})
+MockPatchObject
++++++++++++++++
+
+Adapts ``mock.patch.object`` to be used as a Fixture.
+
+ >>> class Fred:
+ ... value = 1
+ >>> fixture = fixtures.MockPatchObject(Fred, 'value', 2)
+ >>> with fixture:
+ ... Fred().value
+ 2
+ >>> Fred().value
+ 1
+
+MockPatch
++++++++++
+
+Adapts ``mock.patch`` to be used as a Fixture.
+
+ >>> fixture = fixtures.MockPatch('subprocess.Popen.returncode', 3)
+
+MockPatchMultiple
++++++++++++++++++
+
+Adapts ``mock.patch.multiple`` to be used as a Fixture.
+
+ >>> fixture = fixtures.MockPatch('subprocess.Popen', returncode=3)
+
MonkeyPatch
+++++++++++
@@ -438,3 +485,10 @@
*Note:* Currently supported only on Unix because it relies on the ``alarm``
system call.
+
+Contributing
+============
+
+Fixtures has its project homepage on Launchpad
+<https://launchpad.net/python-fixtures>. Source code is hosted on GitHub
+<https://github.com/testing-cabal/fixtures>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/__init__.py new/fixtures-1.3.1/fixtures/__init__.py
--- old/fixtures-1.2.0/fixtures/__init__.py 2015-05-04 23:49:57.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/__init__.py 2015-06-22 08:56:00.000000000 +0200
@@ -54,12 +54,17 @@
'LogHandler',
'LoggerFixture',
'MethodFixture',
+ 'MockPatch',
+ 'MockPatchMultiple',
+ 'MockPatchObject',
'MonkeyPatch',
+ 'MultipleExceptions',
'NestedTempfile',
'PackagePathEntry',
'PopenFixture',
'PythonPackage',
'PythonPathEntry',
+ 'SetupError',
'StringStream',
'TempDir',
'TempHomeDir',
@@ -76,6 +81,8 @@
Fixture,
FunctionFixture,
MethodFixture,
+ MultipleExceptions,
+ SetupError,
)
from fixtures._fixtures import (
ByteStream,
@@ -86,6 +93,9 @@
FakePopen,
LoggerFixture,
LogHandler,
+ MockPatch,
+ MockPatchMultiple,
+ MockPatchObject,
MonkeyPatch,
NestedTempfile,
PackagePathEntry,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/__init__.py new/fixtures-1.3.1/fixtures/_fixtures/__init__.py
--- old/fixtures-1.2.0/fixtures/_fixtures/__init__.py 2015-05-04 23:49:57.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/__init__.py 2015-06-22 02:24:03.000000000 +0200
@@ -25,6 +25,9 @@
'FakePopen',
'LoggerFixture',
'LogHandler',
+ 'MockPatch',
+ 'MockPatchMultiple',
+ 'MockPatchObject',
'MonkeyPatch',
'NestedTempfile',
'PackagePathEntry',
@@ -49,6 +52,11 @@
LoggerFixture,
LogHandler,
)
+from fixtures._fixtures.mockpatch import (
+ MockPatch,
+ MockPatchMultiple,
+ MockPatchObject,
+ )
from fixtures._fixtures.monkeypatch import MonkeyPatch
from fixtures._fixtures.popen import (
FakePopen,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/environ.py new/fixtures-1.3.1/fixtures/_fixtures/environ.py
--- old/fixtures-1.2.0/fixtures/_fixtures/environ.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/environ.py 2015-06-22 08:56:00.000000000 +0200
@@ -40,8 +40,7 @@
self.varname = varname
self.newvalue = newvalue
- def setUp(self):
- super(EnvironmentVariable, self).setUp()
+ def _setUp(self):
varname = self.varname
orig_value = os.environ.get(varname)
if orig_value is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/logger.py new/fixtures-1.3.1/fixtures/_fixtures/logger.py
--- old/fixtures-1.2.0/fixtures/_fixtures/logger.py 2015-03-26 21:33:59.000000000 +0100
+++ new/fixtures-1.3.1/fixtures/_fixtures/logger.py 2015-06-22 08:56:00.000000000 +0200
@@ -46,8 +46,7 @@
self._level = level
self._nuke_handlers = nuke_handlers
- def setUp(self):
- super(LogHandler, self).setUp()
+ def _setUp(self):
logger = getLogger(self._name)
if self._level:
self.addCleanup(logger.setLevel, logger.level)
@@ -95,8 +94,7 @@
self._nuke_handlers = nuke_handlers
self._formatter = formatter
- def setUp(self):
- super(FakeLogger, self).setUp()
+ def _setUp(self):
name = _u("pythonlogging:'%s'") % self._name
output = self.useFixture(StringStream(name)).stream
self._output = output
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/mockpatch.py new/fixtures-1.3.1/fixtures/_fixtures/mockpatch.py
--- old/fixtures-1.2.0/fixtures/_fixtures/mockpatch.py 1970-01-01 01:00:00.000000000 +0100
+++ new/fixtures-1.3.1/fixtures/_fixtures/mockpatch.py 2015-06-22 08:56:00.000000000 +0200
@@ -0,0 +1,71 @@
+# Copyright 2010 United States Government as represented by the
+# Administrator of the National Aeronautics and Space Administration.
+# Copyright 2013 Hewlett-Packard Development Company, L.P.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import extras
+
+import fixtures
+
+mock = extras.try_imports(['unittest.mock', 'mock'], None)
+mock_default = extras.try_imports(
+ ['unittest.mock.DEFAULT', 'mock.DEFAULT'], None)
+
+
+class _Base(fixtures.Fixture):
+ def _setUp(self):
+ _p = self._get_p()
+ self.addCleanup(_p.stop)
+ self.mock = _p.start()
+
+
+class MockPatchObject(_Base):
+ """Deal with code around mock."""
+
+ def __init__(self, obj, attr, new=mock_default, **kwargs):
+ super(MockPatchObject, self).__init__()
+ self._get_p = lambda: mock.patch.object(obj, attr, new, **kwargs)
+
+
+class MockPatch(_Base):
+ """Deal with code around mock.patch."""
+
+ def __init__(self, obj, new=mock_default, **kwargs):
+ super(MockPatch, self).__init__()
+ self._get_p = lambda: mock.patch(obj, new, **kwargs)
+
+
+class MockPatchMultiple(_Base):
+ """Deal with code around mock.patch.multiple."""
+
+ # Default value to trigger a MagicMock to be created for a named
+ # attribute.
+ DEFAULT = mock_default
+
+ def __init__(self, obj, **kwargs):
+ """Initialize the mocks
+
+ Pass name=value to replace obj.name with value.
+
+ Pass name=Multiple.DEFAULT to replace obj.name with a
+ MagicMock instance.
+
+ :param obj: Object or name containing values being mocked.
+ :type obj: str or object
+ :param kwargs: names and values of attributes of obj to be mocked.
+
+ """
+ super(MockPatchMultiple, self).__init__()
+ self._get_p = lambda: mock.patch.multiple(obj, **kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/monkeypatch.py new/fixtures-1.3.1/fixtures/_fixtures/monkeypatch.py
--- old/fixtures-1.2.0/fixtures/_fixtures/monkeypatch.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/monkeypatch.py 2015-06-22 08:56:00.000000000 +0200
@@ -42,8 +42,7 @@
self.name = name
self.new_value = new_value
- def setUp(self):
- Fixture.setUp(self)
+ def _setUp(self):
location, attribute = self.name.rsplit('.', 1)
# Import, swallowing all errors as any element of location may be
# a class or some such thing.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/packagepath.py new/fixtures-1.3.1/fixtures/_fixtures/packagepath.py
--- old/fixtures-1.2.0/fixtures/_fixtures/packagepath.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/packagepath.py 2015-06-22 08:56:00.000000000 +0200
@@ -39,8 +39,7 @@
self.packagename = packagename
self.directory = directory
- def setUp(self):
- Fixture.setUp(self)
+ def _setUp(self):
path = sys.modules[self.packagename].__path__
if self.directory in path:
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/popen.py new/fixtures-1.3.1/fixtures/_fixtures/popen.py
--- old/fixtures-1.2.0/fixtures/_fixtures/popen.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/popen.py 2015-06-22 08:56:00.000000000 +0200
@@ -95,8 +95,7 @@
super(FakePopen, self).__init__()
self.get_info = get_info
- def setUp(self):
- super(FakePopen, self).setUp()
+ def _setUp(self):
self.addCleanup(setattr, subprocess, 'Popen', subprocess.Popen)
subprocess.Popen = self
self.procs = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/pythonpackage.py new/fixtures-1.3.1/fixtures/_fixtures/pythonpackage.py
--- old/fixtures-1.2.0/fixtures/_fixtures/pythonpackage.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/pythonpackage.py 2015-06-22 08:56:00.000000000 +0200
@@ -47,8 +47,7 @@
self.modulelist = modulelist
self.init = init
- def setUp(self):
- Fixture.setUp(self)
+ def _setUp(self):
self.base = self.useFixture(TempDir()).path
base = self.base
root = os.path.join(base, self.packagename)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/pythonpath.py new/fixtures-1.3.1/fixtures/_fixtures/pythonpath.py
--- old/fixtures-1.2.0/fixtures/_fixtures/pythonpath.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/pythonpath.py 2015-06-22 08:56:00.000000000 +0200
@@ -35,8 +35,7 @@
"""
self.directory = directory
- def setUp(self):
- Fixture.setUp(self)
+ def _setUp(self):
if self.directory in sys.path:
return
self.addCleanup(sys.path.remove, self.directory)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/streams.py new/fixtures-1.3.1/fixtures/_fixtures/streams.py
--- old/fixtures-1.2.0/fixtures/_fixtures/streams.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/streams.py 2015-06-22 08:56:00.000000000 +0200
@@ -42,8 +42,7 @@
self._detail_name = detail_name
self._stream_factory = stream_factory
- def setUp(self):
- super(Stream, self).setUp()
+ def _setUp(self):
write_stream, read_stream = self._stream_factory()
self.stream = write_stream
self.addDetail(self._detail_name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/tempdir.py new/fixtures-1.3.1/fixtures/_fixtures/tempdir.py
--- old/fixtures-1.2.0/fixtures/_fixtures/tempdir.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/tempdir.py 2015-06-22 08:56:00.000000000 +0200
@@ -39,8 +39,7 @@
"""
self.rootdir = rootdir
- def setUp(self):
- super(TempDir, self).setUp()
+ def _setUp(self):
self.path = tempfile.mkdtemp(dir=self.rootdir)
self.addCleanup(shutil.rmtree, self.path, ignore_errors=True)
@@ -63,8 +62,7 @@
down.
"""
- def setUp(self):
- super(NestedTempfile, self).setUp()
+ def _setUp(self):
tempdir = self.useFixture(TempDir()).path
patch = fixtures.MonkeyPatch("tempfile.tempdir", tempdir)
self.useFixture(patch)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/temphomedir.py new/fixtures-1.3.1/fixtures/_fixtures/temphomedir.py
--- old/fixtures-1.2.0/fixtures/_fixtures/temphomedir.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/temphomedir.py 2015-06-22 08:56:00.000000000 +0200
@@ -27,6 +27,6 @@
:ivar path: the path of the temporary directory.
"""
- def setUp(self):
- super(TempHomeDir, self).setUp()
+ def _setUp(self):
+ super(TempHomeDir, self)._setUp()
self.useFixture(fixtures.EnvironmentVariable("HOME", self.path))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/timeout.py new/fixtures-1.3.1/fixtures/_fixtures/timeout.py
--- old/fixtures-1.2.0/fixtures/_fixtures/timeout.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/timeout.py 2015-06-22 08:56:00.000000000 +0200
@@ -51,8 +51,7 @@
def signal_handler(self, signum, frame):
raise TimeoutException()
- def setUp(self):
- super(Timeout, self).setUp()
+ def _setUp(self):
if self.alarm_fn is None:
return # Can't run on Windows
if self.gentle:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/_fixtures/warnings.py new/fixtures-1.3.1/fixtures/_fixtures/warnings.py
--- old/fixtures-1.2.0/fixtures/_fixtures/warnings.py 2015-05-04 23:49:57.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/_fixtures/warnings.py 2015-06-22 08:56:00.000000000 +0200
@@ -34,8 +34,7 @@
def _showwarning(self, *args, **kwargs):
self.captures.append(warnings.WarningMessage(*args, **kwargs))
- def setUp(self):
- super(WarningsCapture, self).setUp()
+ def _setUp(self):
patch = fixtures.MonkeyPatch("warnings.showwarning", self._showwarning)
self.useFixture(patch)
self.captures = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/fixture.py new/fixtures-1.3.1/fixtures/fixture.py
--- old/fixtures-1.2.0/fixtures/fixture.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/fixture.py 2015-06-30 03:01:38.000000000 +0200
@@ -18,11 +18,13 @@
'FunctionFixture',
'MethodFixture',
'MultipleExceptions',
+ 'SetupError',
]
import itertools
import sys
+import six
from testtools.compat import (
advance_iterator,
reraise,
@@ -49,6 +51,13 @@
target_details[name] = content_object
+class SetupError(Exception):
+ """Setup failed.
+
+ args[0] will be a details dict.
+ """
+
+
class Fixture(object):
"""A Fixture representing some state or resource.
@@ -97,6 +106,10 @@
This should not typically be overridden, see addCleanup instead.
+ cleanUp may be called once and only once after setUp() has been called.
+ The base implementation of setUp will automatically call cleanUp if
+ an exception occurs within setUp itself.
+
:param raise_first: Deprecated parameter from before testtools gained
MultipleExceptions. raise_first defaults to True. When True
if a single exception is raised, it is reraised after all the
@@ -111,7 +124,7 @@
try:
return self._cleanups(raise_errors=raise_first)
finally:
- self._clear_cleanups()
+ self._remove_state()
def _clear_cleanups(self):
"""Clean the cleanup queue without running them.
@@ -126,6 +139,15 @@
self._details = {}
self._detail_sources = []
+ def _remove_state(self):
+ """Remove the internal state.
+
+ Called from cleanUp to put the fixture back into a not-ready state.
+ """
+ self._cleanups = None
+ self._details = None
+ self._detail_sources = None
+
def __enter__(self):
self.setUp()
return self
@@ -134,7 +156,7 @@
try:
self._cleanups()
finally:
- self._clear_cleanups()
+ self._remove_state()
return False # propogate exceptions from the with body.
def getDetails(self):
@@ -153,16 +175,56 @@
def setUp(self):
"""Prepare the Fixture for use.
- This should be overridden by most concrete fixtures. When overriding
- be sure to include self.addCleanup calls to restore the fixture to
- an un-setUp state, so that a single Fixture instance can be reused.
+ This should not be overridden. Concrete fixtures should implement
+ _setUp. Overriding of setUp is still supported, just not recommended.
- After setUp is called, the fixture will have one or more attributes
+ After setUp has completed, the fixture will have one or more attributes
which can be used (these depend totally on the concrete subclass).
+ :raises: MultipleExceptions if _setUp fails. The last exception
+ captured within the MultipleExceptions will be a SetupError
+ exception.
:return: None.
+
+ :changed in 1.3: The recommendation to override setUp has been
+ reversed - before 1.3, setUp() should be overridden, now it should
+ not be.
+ :changed in 1.3.1: BaseException is now caught, and only subclasses of
+ Exception are wrapped in MultipleExceptions.
"""
self._clear_cleanups()
+ try:
+ self._setUp()
+ except:
+ err = sys.exc_info()
+ details = {}
+ if gather_details is not None:
+ # Materialise all details since we're about to cleanup.
+ gather_details(self.getDetails(), details)
+ else:
+ details = self.getDetails()
+ errors = [err] + self.cleanUp(raise_first=False)
+ try:
+ raise SetupError(details)
+ except SetupError as e:
+ errors.append(sys.exc_info())
+ if issubclass(err[0], Exception):
+ raise MultipleExceptions(*errors)
+ else:
+ six.reraise(*err)
+
+ def _setUp(self):
+ """Template method for subclasses to override.
+
+ Override this to customise the fixture. When overriding
+ be sure to include self.addCleanup calls to restore the fixture to
+ an un-setUp state, so that a single Fixture instance can be reused.
+
+ Fixtures will never have a body in _setUp - calling super() is
+ entirely at the discretion of subclasses.
+
+ :return: None.
+ """
def reset(self):
"""Reset a setUp Fixture to the 'just setUp' state again.
@@ -183,15 +245,23 @@
"""Use another fixture.
The fixture will be setUp, and self.addCleanup(fixture.cleanUp) called.
+ If the fixture fails to set up, useFixture will attempt to gather its
+ details into this fixture's details to aid in debugging.
:param fixture: The fixture to use.
:return: The fixture, after setting it up and scheduling a cleanup for
it.
+ :raises: Any errors raised by the fixture's setUp method.
"""
try:
fixture.setUp()
+ except MultipleExceptions as e:
+ if e.args[-1][0] is SetupError:
+ combine_details(e.args[-1][1].args[0], self._details)
+ raise
except:
- # The child failed to come up, capture any details it has (copying
+ # The child failed to come up and didn't raise MultipleExceptions
+ # which we can understand... capture any details it has (copying
# the content, it may go away anytime).
if gather_details is not None:
gather_details(fixture.getDetails(), self._details)
@@ -249,8 +319,7 @@
self.cleanup_fn = cleanup_fn
self.reset_fn = reset_fn
- def setUp(self):
- super(FunctionFixture, self).setUp()
+ def _setUp(self):
fn_result = self.setup_fn()
self._maybe_cleanup(fn_result)
@@ -323,8 +392,7 @@
reset = getattr(obj, 'reset', None)
self._reset = reset
- def setUp(self):
- super(MethodFixture, self).setUp()
+ def _setUp(self):
self._setup()
def cleanUp(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/tests/_fixtures/__init__.py new/fixtures-1.3.1/fixtures/tests/_fixtures/__init__.py
--- old/fixtures-1.2.0/fixtures/tests/_fixtures/__init__.py 2015-03-26 03:46:21.000000000 +0100
+++ new/fixtures-1.3.1/fixtures/tests/_fixtures/__init__.py 2015-06-22 02:24:03.000000000 +0200
@@ -17,6 +17,7 @@
test_modules = [
'environ',
'logger',
+ 'mockpatch',
'monkeypatch',
'packagepath',
'popen',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/tests/_fixtures/test_mockpatch.py new/fixtures-1.3.1/fixtures/tests/_fixtures/test_mockpatch.py
--- old/fixtures-1.2.0/fixtures/tests/_fixtures/test_mockpatch.py 1970-01-01 01:00:00.000000000 +0100
+++ new/fixtures-1.3.1/fixtures/tests/_fixtures/test_mockpatch.py 2015-06-22 02:24:03.000000000 +0200
@@ -0,0 +1,72 @@
+# Copyright 2014 IBM Corp.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+
+import extras
+mock = extras.try_imports(['unittest.mock', 'mock'], None)
+import testtools
+
+from fixtures import (
+ MockPatch,
+ MockPatchMultiple,
+ MockPatchObject,
+)
+
+
+class Foo(object):
+ def bar(self):
+ return self
+
+
+def mocking_bar(self):
+ return 'mocked!'
+
+
+class TestMockPatch(testtools.TestCase):
+ def test_mock_patch_with_replacement(self):
+ self.useFixture(MockPatch('%s.Foo.bar' % (__name__), mocking_bar))
+ instance = Foo()
+ self.assertEqual(instance.bar(), 'mocked!')
+
+ def test_mock_patch_without_replacement(self):
+ self.useFixture(MockPatch('%s.Foo.bar' % (__name__)))
+ instance = Foo()
+ self.assertIsInstance(instance.bar(), mock.MagicMock)
+
+
+class TestMockMultiple(testtools.TestCase):
+ def test_mock_multiple_with_replacement(self):
+ self.useFixture(MockPatchMultiple('%s.Foo' % (__name__),
+ bar=mocking_bar))
+ instance = Foo()
+ self.assertEqual(instance.bar(), 'mocked!')
+
+ def test_mock_patch_without_replacement(self):
+ self.useFixture(MockPatchMultiple(
+ '%s.Foo' % (__name__),
+ bar=MockPatchMultiple.DEFAULT))
+ instance = Foo()
+ self.assertIsInstance(instance.bar(), mock.MagicMock)
+
+
+class TestMockPatchObject(testtools.TestCase):
+ def test_mock_patch_object_with_replacement(self):
+ self.useFixture(MockPatchObject(Foo, 'bar', mocking_bar))
+ instance = Foo()
+ self.assertEqual(instance.bar(), 'mocked!')
+
+ def test_mock_patch_object_without_replacement(self):
+ self.useFixture(MockPatchObject(Foo, 'bar'))
+ instance = Foo()
+ self.assertIsInstance(instance.bar(), mock.MagicMock)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures/tests/test_fixture.py new/fixtures-1.3.1/fixtures/tests/test_fixture.py
--- old/fixtures-1.2.0/fixtures/tests/test_fixture.py 2014-09-25 04:31:06.000000000 +0200
+++ new/fixtures-1.3.1/fixtures/tests/test_fixture.py 2015-06-30 02:51:08.000000000 +0200
@@ -122,7 +122,7 @@
@require_gather_details
def test_useFixture_details_captured_from_setUp(self):
# Details added during fixture set-up are gathered even if setUp()
- # fails with an exception.
+ # fails with an unknown exception.
class SomethingBroke(Exception): pass
class BrokenFixture(fixtures.Fixture):
def setUp(self):
@@ -143,6 +143,24 @@
{"content": text_content("foobar")},
simple_fixture.getDetails())
+ @require_gather_details
+ def test_useFixture_details_captured_from_setUp_MultipleExceptions(self):
+ # Details added during fixture set-up are gathered even if setUp()
+ # fails with (cleanly - with MultipleExceptions / SetupError).
+ class SomethingBroke(Exception): pass
+ class BrokenFixture(fixtures.Fixture):
+ def _setUp(self):
+ self.addDetail('content', text_content("foobar"))
+ raise SomethingBroke()
+ class SimpleFixture(fixtures.Fixture):
+ def _setUp(self):
+ self.useFixture(BrokenFixture())
+ simple = SimpleFixture()
+ e = self.assertRaises(fixtures.MultipleExceptions, simple.setUp)
+ self.assertEqual(
+ {"content": text_content("foobar")},
+ e.args[-1][1].args[0])
+
def test_getDetails(self):
fixture = fixtures.Fixture()
with fixture:
@@ -162,7 +180,7 @@
self.assertEqual({}, parent.getDetails())
# After cleanup the child details are still gone.
child.addDetail('foo', 'content')
- self.assertEqual({}, parent.getDetails())
+ self.assertRaises(TypeError, parent.getDetails)
def test_duplicate_details_are_disambiguated(self):
parent = fixtures.Fixture()
@@ -185,7 +203,74 @@
self.assertEqual({}, fixture.getDetails())
fixture.addDetail('foo', 'content')
# Cleanup clears the details too.
- self.assertEqual({}, fixture.getDetails())
+ self.assertRaises(TypeError, fixture.getDetails)
+
+ def test_setUp_subclassed(self):
+ # Even though its no longer recommended, we need to be sure that
+ # overriding setUp and calling super().setUp still works.
+ class Subclass(fixtures.Fixture):
+ def setUp(self):
+ super(Subclass, self).setUp()
+ self.fred = 1
+ self.addCleanup(setattr, self, 'fred', 2)
+ with Subclass() as f:
+ self.assertEqual(1, f.fred)
+ self.assertEqual(2, f.fred)
+
+ def test__setUp(self):
+ # _setUp is called, and cleanups can be registered by it.
+ class Subclass(fixtures.Fixture):
+ def _setUp(self):
+ self.fred = 1
+ self.addCleanup(setattr, self, 'fred', 2)
+ with Subclass() as f:
+ self.assertEqual(1, f.fred)
+ self.assertEqual(2, f.fred)
+
+ def test__setUp_fails(self):
+ # when _setUp fails, the fixture is left ready-to-setUp, and any
+ # details added during _setUp are captured.
+ class Subclass(fixtures.Fixture):
+ def _setUp(self):
+ self.addDetail('log', text_content('stuff'))
+ 1/0
+ f = Subclass()
+ e = self.assertRaises(fixtures.MultipleExceptions, f.setUp)
+ self.assertRaises(TypeError, f.cleanUp)
+ self.assertIsInstance(e.args[0][1], ZeroDivisionError)
+ self.assertIsInstance(e.args[1][1], fixtures.SetupError)
+ self.assertEqual('stuff', e.args[1][1].args[0]['log'].as_text())
+
+ def test__setUp_fails_cleanUp_fails(self):
+ # when _setUp fails, cleanups are called, and their failure is captured
+ # into the MultipleExceptions instance.
+ class Subclass(fixtures.Fixture):
+ def _setUp(self):
+ self.addDetail('log', text_content('stuff'))
+ self.addCleanup(lambda: 1/0)
+ raise Exception('fred')
+ f = Subclass()
+ e = self.assertRaises(fixtures.MultipleExceptions, f.setUp)
+ self.assertRaises(TypeError, f.cleanUp)
+ self.assertEqual(Exception, e.args[0][0])
+ self.assertEqual(ZeroDivisionError, e.args[1][0])
+ self.assertEqual(fixtures.SetupError, e.args[2][0])
+ self.assertEqual('stuff', e.args[2][1].args[0]['log'].as_text())
+
+ def test_setup_failures_with_base_exception(self):
+ # when _setUp fails with a BaseException (or subclass thereof) that
+ # exception is propogated as is, but we still call cleanups etc.
+ class MyBase(BaseException):pass
+ log = []
+ class Subclass(fixtures.Fixture):
+ def _setUp(self):
+ self.addDetail('log', text_content('stuff'))
+ self.addCleanup(log.append, 'cleaned')
+ raise MyBase('fred')
+ f = Subclass()
+ e = self.assertRaises(MyBase, f.setUp)
+ self.assertRaises(TypeError, f.cleanUp)
+ self.assertEqual(['cleaned'], log)
class TestFunctionFixture(testtools.TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures.egg-info/PKG-INFO new/fixtures-1.3.1/fixtures.egg-info/PKG-INFO
--- old/fixtures-1.2.0/fixtures.egg-info/PKG-INFO 2015-05-05 00:14:19.000000000 +0200
+++ new/fixtures-1.3.1/fixtures.egg-info/PKG-INFO 2015-06-30 04:22:04.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: fixtures
-Version: 1.2.0
+Version: 1.3.1
Summary: Fixtures, reusable state for writing clean tests and more.
Home-page: https://launchpad.net/python-fixtures
Author: Robert Collins
@@ -87,19 +87,20 @@
Creating Fixtures
=================
- Minimally, subclass Fixture, define setUp to initialize your state and schedule
+ Minimally, subclass Fixture, define _setUp to initialize your state and schedule
a cleanup for when cleanUp is called and you're done::
>>> import unittest
>>> import fixtures
>>> class NoddyFixture(fixtures.Fixture):
- ... def setUp(self):
- ... super(NoddyFixture, self).setUp()
+ ... def _setUp(self):
... self.frobnozzle = 42
... self.addCleanup(delattr, self, 'frobnozzle')
- This will initialize frobnozzle when setUp is called, and when cleanUp is
- called get rid of the frobnozzle attribute.
+ This will initialize frobnozzle when ``setUp`` is called, and when ``cleanUp``
+ is called get rid of the frobnozzle attribute. Prior to version 1.3.0 fixtures
+ recommended overriding ``setUp``. This is still supported, but since it is
+ harder to write leak-free fixtures in this fashion, it is not recommended.
If your fixture has diagnostic data - for instance the log file of an
application server, or log messages, it can expose that by creating a content
@@ -107,8 +108,7 @@
>>> from testtools.content import text_content
>>> class WithLog(fixtures.Fixture):
- ... def setUp(self):
- ... super(WithLog, self).setUp()
+ ... def _setUp(self):
... self.addDetail('message', text_content('foo bar baz'))
The method ``useFixture`` will use another fixture, call ``setUp`` on it, call
@@ -116,8 +116,7 @@
the fixture. This allows simple composition of different fixtures.
>>> class ReusingFixture(fixtures.Fixture):
- ... def setUp(self):
- ... super(ReusingFixture, self).setUp()
+ ... def _setUp(self):
... self.noddy = self.useFixture(NoddyFixture())
There is a helper for adapting a function or function pair into Fixtures. it
@@ -162,9 +161,9 @@
clean up after a fixture has been used, all fixtures define a ``cleanUp``
method which should be called when a fixture is finished with.
- Because its nice to be able to build a particular set of related fixtures in
- advance of using them, fixtures also have define a ``setUp`` method which
- should be called before trying to use them.
+ Because it's nice to be able to build a particular set of related fixtures in
+ advance of using them, fixtures also have a ``setUp`` method which should be
+ called before trying to use them.
One common desire with fixtures that are expensive to create is to reuse them
in many test cases; to support this the base Fixture also defines a ``reset``
@@ -211,8 +210,7 @@
>>> import sys
>>> from fixtures.fixture import MultipleExceptions
>>> class BrokenFixture(fixtures.Fixture):
- ... def setUp(self):
- ... fixtures.Fixture.setUp(self)
+ ... def _setUp(self):
... self.addCleanup(lambda:1/0)
... self.addCleanup(lambda:1/0)
>>> fixture = BrokenFixture()
@@ -226,12 +224,32 @@
Fixtures often expose diagnostic details that can be useful for tracking down
issues. The ``getDetails`` method will return a dict of all the attached
- details. Each detail object is an instance of ``testtools.content.Content``.
+ details, but can only be called before ``cleanUp`` is called. Each detail
+ object is an instance of ``testtools.content.Content``.
>>> with WithLog() as l:
... print(l.getDetails()['message'].as_text())
foo bar baz
+ Errors in setUp
+ +++++++++++++++
+
+ The examples above used ``_setUp`` rather than ``setUp`` because the base
+ class implementation of ``setUp`` acts to reduce the chance of leaking
+ external resources if an error is raised from ``_setUp``. Specifically,
+ ``setUp`` contains a try:/except: block which catches all exceptions, captures
+ any registered detail objects, and calls ``self.cleanUp`` before propogating
+ the error. As long as you take care to register any cleanups before calling
+ the code that may fail, this will cause them to be cleaned up. The captured
+ detail objects are provided to the args of the raised exception.
+
+ If the error that occured was a subclass of ``Exception`` then ``setUp`` will
+ raise ``MultipleExceptions`` with the last element being a ``SetupError`` that
+ contains the detail objects. Otherwise, to prevent causing normally
+ uncatchable errors like KeyboardInterrupt being caught inappropriately in the
+ calling layer, the original exception will be raised as-is and no diagnostic
+ data other than that from the original exception will be available.
+
Shared Dependencies
+++++++++++++++++++
@@ -308,7 +326,8 @@
In addition to the Fixture, FunctionFixture and MethodFixture classes fixtures
includes a number of precanned fixtures. The API docs for fixtures will list
- the complete set of these, should the dcs be out of date or not to hand.
+ the complete set of these, should the dcs be out of date or not to hand. For
+ the complete feature set of each fixture please see the API docs.
ByteStream
++++++++++
@@ -348,6 +367,34 @@
>>> from testtools.compat import BytesIO
>>> fixture = fixtures.FakePopen(lambda _:{'stdout': BytesIO('foobar')})
+ MockPatchObject
+ +++++++++++++++
+
+ Adapts ``mock.patch.object`` to be used as a Fixture.
+
+ >>> class Fred:
+ ... value = 1
+ >>> fixture = fixtures.MockPatchObject(Fred, 'value', 2)
+ >>> with fixture:
+ ... Fred().value
+ 2
+ >>> Fred().value
+ 1
+
+ MockPatch
+ +++++++++
+
+ Adapts ``mock.patch`` to be used as a Fixture.
+
+ >>> fixture = fixtures.MockPatch('subprocess.Popen.returncode', 3)
+
+ MockPatchMultiple
+ +++++++++++++++++
+
+ Adapts ``mock.patch.multiple`` to be used as a Fixture.
+
+ >>> fixture = fixtures.MockPatch('subprocess.Popen', returncode=3)
+
MonkeyPatch
+++++++++++
@@ -447,6 +494,13 @@
*Note:* Currently supported only on Unix because it relies on the ``alarm``
system call.
+ Contributing
+ ============
+
+ Fixtures has its project homepage on Launchpad
+ <https://launchpad.net/python-fixtures>. Source code is hosted on GitHub
+ <https://github.com/testing-cabal/fixtures>.
+
Platform: UNKNOWN
Classifier: Development Status :: 6 - Mature
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures.egg-info/SOURCES.txt new/fixtures-1.3.1/fixtures.egg-info/SOURCES.txt
--- old/fixtures-1.2.0/fixtures.egg-info/SOURCES.txt 2015-05-05 00:14:19.000000000 +0200
+++ new/fixtures-1.3.1/fixtures.egg-info/SOURCES.txt 2015-06-30 04:22:04.000000000 +0200
@@ -13,6 +13,7 @@
requirements.txt
setup.cfg
setup.py
+test-requirements.txt
tox.ini
fixtures/__init__.py
fixtures/callmany.py
@@ -28,6 +29,7 @@
fixtures/_fixtures/__init__.py
fixtures/_fixtures/environ.py
fixtures/_fixtures/logger.py
+fixtures/_fixtures/mockpatch.py
fixtures/_fixtures/monkeypatch.py
fixtures/_fixtures/packagepath.py
fixtures/_fixtures/popen.py
@@ -46,6 +48,7 @@
fixtures/tests/_fixtures/__init__.py
fixtures/tests/_fixtures/test_environ.py
fixtures/tests/_fixtures/test_logger.py
+fixtures/tests/_fixtures/test_mockpatch.py
fixtures/tests/_fixtures/test_monkeypatch.py
fixtures/tests/_fixtures/test_packagepath.py
fixtures/tests/_fixtures/test_popen.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures.egg-info/pbr.json new/fixtures-1.3.1/fixtures.egg-info/pbr.json
--- old/fixtures-1.2.0/fixtures.egg-info/pbr.json 2015-05-05 00:14:19.000000000 +0200
+++ new/fixtures-1.3.1/fixtures.egg-info/pbr.json 2015-06-30 04:22:04.000000000 +0200
@@ -1 +1 @@
-{"is_release": true, "git_version": "f7502e8"}
\ No newline at end of file
+{"is_release": true, "git_version": "09afde5"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/fixtures.egg-info/requires.txt new/fixtures-1.3.1/fixtures.egg-info/requires.txt
--- old/fixtures-1.2.0/fixtures.egg-info/requires.txt 2015-05-05 00:14:19.000000000 +0200
+++ new/fixtures-1.3.1/fixtures.egg-info/requires.txt 2015-06-30 04:22:04.000000000 +0200
@@ -1,2 +1,3 @@
pbr>=0.11
+six
testtools>=0.9.22
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/requirements.txt new/fixtures-1.3.1/requirements.txt
--- old/fixtures-1.2.0/requirements.txt 2015-05-04 06:04:12.000000000 +0200
+++ new/fixtures-1.3.1/requirements.txt 2015-06-30 02:52:47.000000000 +0200
@@ -1,2 +1,3 @@
pbr>=0.11
+six
testtools>=0.9.22
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-1.2.0/test-requirements.txt new/fixtures-1.3.1/test-requirements.txt
--- old/fixtures-1.2.0/test-requirements.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/fixtures-1.3.1/test-requirements.txt 2015-06-22 02:24:03.000000000 +0200
@@ -0,0 +1 @@
+mock;python_version<'3.3'
1
0
Hello community,
here is the log from the commit of package python-jsonschema for openSUSE:Factory checked in at 2015-09-30 05:49:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jsonschema (Old)
and /work/SRC/openSUSE:Factory/.python-jsonschema.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jsonschema"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jsonschema/python-jsonschema.changes 2014-11-13 09:17:34.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-jsonschema.new/python-jsonschema.changes 2015-09-30 05:49:10.000000000 +0200
@@ -1,0 +2,13 @@
+Mon Jun 15 02:16:17 UTC 2015 - arun(a)gmx.de
+
+- update to version 2.5.1:
+ (no changelog available)
+- update to version 2.5.0:
+ * Improved performance on CPython by adding caching around ref
+ resolution (#203)
+- specfile:
+ * add python-vcversioner
+- drop test requirements and %check section, which is broken
+- Fix update-alternatives usage
+
+-------------------------------------------------------------------
Old:
----
jsonschema-2.4.0.tar.gz
New:
----
jsonschema-2.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jsonschema.spec ++++++
--- /var/tmp/diff_new_pack.yoQcXK/_old 2015-09-30 05:49:11.000000000 +0200
+++ /var/tmp/diff_new_pack.yoQcXK/_new 2015-09-30 05:49:11.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-jsonschema
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python-jsonschema
-Version: 2.4.0
+Version: 2.5.1
Release: 0
Summary: An implementation of JSON-Schema validation for Python
License: MIT
@@ -26,8 +26,11 @@
Source: http://pypi.python.org/packages/source/j/jsonschema/jsonschema-%{version}.t…
BuildRequires: python-devel
BuildRequires: python-setuptools
+BuildRequires: python-functools32
+BuildRequires: python-vcversioner
# Test build requirements
BuildRequires: python-mock
+Requires: python-functools32
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -50,31 +53,34 @@
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+
+# Prepare for update-alternatives usage
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-%{py_ver}
-ln -s %{_bindir}/jsonschema-%{py_ver} %{buildroot}%{_bindir}/jsonschema
+ln -s -f %{_sysconfdir}/alternatives/jsonschema %{buildroot}%{_bindir}/jsonschema
+# create a dummy target for /etc/alternatives/jsonschema
+touch %{buildroot}%{_sysconfdir}/alternatives/jsonschema
%if 0%{?suse_version} > 1110
%check
python -m unittest jsonschema.tests.test_jsonschema_test_suite
%endif
-%pre
-[ -h %{_bindir}/jsonschema ] || rm -f %{_bindir}/jsonschema
-
%post
-update-alternatives --install \
- %{_bindir}/jsonschema jsonschema %{_bindir}/jsonschema-%{py_ver} 20
+%_sbindir/update-alternatives \
+ --install %{_bindir}/jsonschema jsonschema %{_bindir}/jsonschema-%{py_ver} 30
%preun
if [ $1 -eq 0 ] ; then
- update-alternatives --remove jsonschema %{_bindir}/jsonschema-%{py_ver}
+ %_sbindir/update-alternatives --remove jsonschema %{_bindir}/jsonschema-%{py_ver}
fi
%files
%defattr(-,root,root,-)
%doc COPYING README.rst
-%ghost %{_bindir}/jsonschema
+%{_bindir}/jsonschema
%{_bindir}/jsonschema-%{py_ver}
+%ghost %{_sysconfdir}/alternatives/jsonschema
%{python_sitelib}/*
%changelog
++++++ jsonschema-2.4.0.tar.gz -> jsonschema-2.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/CHANGELOG.rst new/jsonschema-2.5.1/CHANGELOG.rst
--- old/jsonschema-2.4.0/CHANGELOG.rst 2014-08-19 02:53:22.000000000 +0200
+++ new/jsonschema-2.5.1/CHANGELOG.rst 2015-06-05 16:26:18.000000000 +0200
@@ -1,3 +1,9 @@
+v2.5.0
+------
+
+* Improved performance on CPython by adding caching around ref resolution
+ (#203)
+
v2.4.0
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/MANIFEST.in new/jsonschema-2.5.1/MANIFEST.in
--- old/jsonschema-2.4.0/MANIFEST.in 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/MANIFEST.in 2015-04-13 17:23:46.000000000 +0200
@@ -1,4 +1,5 @@
include *.rst
include COPYING
include tox.ini
+include version.txt
recursive-include json *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/PKG-INFO new/jsonschema-2.5.1/PKG-INFO
--- old/jsonschema-2.4.0/PKG-INFO 2014-08-19 02:55:48.000000000 +0200
+++ new/jsonschema-2.5.1/PKG-INFO 2015-06-08 21:37:24.000000000 +0200
@@ -1,12 +1,19 @@
Metadata-Version: 1.1
Name: jsonschema
-Version: 2.4.0
+Version: 2.5.1
Summary: An implementation of JSON Schema validation for Python
Home-page: http://github.com/Julian/jsonschema
Author: Julian Berman
Author-email: Julian(a)GrayVines.com
License: MIT
-Description: ==========
+Description: .. image:: https://img.shields.io/pypi/v/jsonschema.svg
+ :target: https://pypi.python.org/pypi/jsonschema
+ .. image:: https://travis-ci.org/Julian/jsonschema.svg?branch=master
+ :target: https://travis-ci.org/Julian/jsonschema
+ .. image:: https://img.shields.io/pypi/l/jsonschema.svg
+ :target: https://pypi.python.org/pypi/jsonschema
+
+ ==========
jsonschema
==========
@@ -57,25 +64,18 @@
Release Notes
-------------
- * A simple CLI was added for validation
- * Validation errors now keep full absolute paths and absolute schema paths in
- their ``absolute_path`` and ``absolute_schema_path`` attributes. The ``path``
- and ``schema_path`` attributes are deprecated in favor of ``relative_path``
- and ``relative_schema_path``\ .
+ Version 2.5.0 is mainly a performance release. The interface for `RefResolver`
+ was extended to add methods that improve performance on CPython.
- *Note:* Support for Python 3.2 was dropped in this release, and installation
- now uses setuptools.
+ Support for custom `RefResolver` objects with the legacy interface should *not*
+ be affected. If you notice something amiss please file an issue ticket.
Running the Test Suite
----------------------
- ``jsonschema`` uses the wonderful `Tox <http://tox.readthedocs.org>`_ for its
- test suite. (It really is wonderful, if for some reason you haven't heard of
- it, you really should use it for your projects).
-
- Assuming you have ``tox`` installed (perhaps via ``pip install tox`` or your
- package manager), just run ``tox`` in the directory of your source checkout to
+ If you have ``tox`` installed (perhaps via ``pip install tox`` or your
+ package manager), running``tox`` in the directory of your source checkout will
run ``jsonschema``'s test suite on all of the versions of Python ``jsonschema``
supports. Note that you'll need to have all of those versions installed in
order to run the tests on each of them, otherwise ``tox`` will skip (and fail)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/README.rst new/jsonschema-2.5.1/README.rst
--- old/jsonschema-2.4.0/README.rst 2014-08-19 02:53:32.000000000 +0200
+++ new/jsonschema-2.5.1/README.rst 2015-06-08 18:03:55.000000000 +0200
@@ -1,3 +1,10 @@
+.. image:: https://img.shields.io/pypi/v/jsonschema.svg
+ :target: https://pypi.python.org/pypi/jsonschema
+.. image:: https://travis-ci.org/Julian/jsonschema.svg?branch=master
+ :target: https://travis-ci.org/Julian/jsonschema
+.. image:: https://img.shields.io/pypi/l/jsonschema.svg
+ :target: https://pypi.python.org/pypi/jsonschema
+
==========
jsonschema
==========
@@ -49,25 +56,18 @@
Release Notes
-------------
-* A simple CLI was added for validation
-* Validation errors now keep full absolute paths and absolute schema paths in
- their ``absolute_path`` and ``absolute_schema_path`` attributes. The ``path``
- and ``schema_path`` attributes are deprecated in favor of ``relative_path``
- and ``relative_schema_path``\ .
+Version 2.5.0 is mainly a performance release. The interface for `RefResolver`
+was extended to add methods that improve performance on CPython.
-*Note:* Support for Python 3.2 was dropped in this release, and installation
-now uses setuptools.
+Support for custom `RefResolver` objects with the legacy interface should *not*
+be affected. If you notice something amiss please file an issue ticket.
Running the Test Suite
----------------------
-``jsonschema`` uses the wonderful `Tox <http://tox.readthedocs.org>`_ for its
-test suite. (It really is wonderful, if for some reason you haven't heard of
-it, you really should use it for your projects).
-
-Assuming you have ``tox`` installed (perhaps via ``pip install tox`` or your
-package manager), just run ``tox`` in the directory of your source checkout to
+If you have ``tox`` installed (perhaps via ``pip install tox`` or your
+package manager), running``tox`` in the directory of your source checkout will
run ``jsonschema``'s test suite on all of the versions of Python ``jsonschema``
supports. Note that you'll need to have all of those versions installed in
order to run the tests on each of them, otherwise ``tox`` will skip (and fail)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/README.md new/jsonschema-2.5.1/json/README.md
--- old/jsonschema-2.4.0/json/README.md 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/README.md 2015-06-05 16:26:18.000000000 +0200
@@ -60,21 +60,70 @@
This suite is being used by:
- * [json-schema-validator (Java)](https://github.com/fge/json-schema-validator)
- * [jsonschema (python)](https://github.com/Julian/jsonschema)
- * [aeson-schema (haskell)](https://github.com/timjb/aeson-schema)
- * [direct-schema (javascript)](https://github.com/IreneKnapp/direct-schema)
- * [jsonschema (javascript)](https://github.com/tdegrunt/jsonschema)
- * [JaySchema (javascript)](https://github.com/natesilva/jayschema)
- * [z-schema (javascript)](https://github.com/zaggino/z-schema)
- * [jassi (javascript)](https://github.com/iclanzan/jassi)
- * [json-schema-valid (javascript)](https://github.com/ericgj/json-schema-valid)
- * [jesse (Erlang)](https://github.com/klarna/jesse)
- * [json-schema (PHP)](https://github.com/justinrainbow/json-schema)
- * [gojsonschema (Go)](https://github.com/sigu-399/gojsonschema)
- * [json_schema (Dart)](https://github.com/patefacio/json_schema)
- * [tv4 (JavaScript)](https://github.com/geraintluff/tv4)
- * [Jsonary (JavaScript)](https://github.com/jsonary-js/jsonary)
+### Coffeescript ###
+
+* [jsck](https://github.com/pandastrike/jsck)
+
+### Dart ###
+
+* [json_schema](https://github.com/patefacio/json_schema)
+
+### Erlang ###
+
+* [jesse](https://github.com/klarna/jesse)
+
+### Go ###
+
+* [gojsonschema](https://github.com/sigu-399/gojsonschema)
+
+### Haskell ###
+
+* [aeson-schema](https://github.com/timjb/aeson-schema)
+* [hjsonschema](https://github.com/seagreen/hjsonschema)
+
+### Java ###
+
+* [json-schema-validator](https://github.com/fge/json-schema-validator)
+
+### Javascript ###
+
+* [json-schema-benchmark](https://github.com/Muscula/json-schema-benchmark)
+* [direct-schema](https://github.com/IreneKnapp/direct-schema)
+* [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid)
+* [jassi](https://github.com/iclanzan/jassi)
+* [JaySchema](https://github.com/natesilva/jayschema)
+* [json-schema-valid](https://github.com/ericgj/json-schema-valid)
+* [Jsonary](https://github.com/jsonary-js/jsonary)
+* [jsonschema](https://github.com/tdegrunt/jsonschema)
+* [request-validator](https://github.com/bugventure/request-validator)
+* [skeemas](https://github.com/Prestaul/skeemas)
+* [tv4](https://github.com/geraintluff/tv4)
+* [z-schema](https://github.com/zaggino/z-schema)
+* [jsen](https://github.com/bugventure/jsen)
+
+### .NET ###
+
+* [Newtonsoft.Json.Schema](https://github.com/JamesNK/Newtonsoft.Json.Schema)
+
+### PHP ###
+
+* [json-schema](https://github.com/justinrainbow/json-schema)
+
+### Python ###
+
+* [jsonschema](https://github.com/Julian/jsonschema)
+
+### Ruby ###
+
+* [json-schema](https://github.com/hoxworth/json-schema)
+
+### Rust ###
+
+* [valico](https://github.com/rustless/valico)
+
+### Swift ###
+
+* [JSONSchema](https://github.com/kylef/JSONSchema.swift)
If you use it as well, please fork and send a pull request adding yourself to
the list :).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft3/additionalProperties.json new/jsonschema-2.5.1/json/tests/draft3/additionalProperties.json
--- old/jsonschema-2.4.0/json/tests/draft3/additionalProperties.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft3/additionalProperties.json 2015-04-13 17:23:46.000000000 +0200
@@ -56,6 +56,25 @@
]
},
{
+ "description":
+ "additionalProperties can exist by itself",
+ "schema": {
+ "additionalProperties": {"type": "boolean"}
+ },
+ "tests": [
+ {
+ "description": "an additional valid property is valid",
+ "data": {"foo" : true},
+ "valid": true
+ },
+ {
+ "description": "an additional invalid property is invalid",
+ "data": {"foo" : 1},
+ "valid": false
+ }
+ ]
+ },
+ {
"description": "additionalProperties are allowed by default",
"schema": {"properties": {"foo": {}, "bar": {}}},
"tests": [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft3/default.json new/jsonschema-2.5.1/json/tests/draft3/default.json
--- old/jsonschema-2.4.0/json/tests/draft3/default.json 1970-01-01 01:00:00.000000000 +0100
+++ new/jsonschema-2.5.1/json/tests/draft3/default.json 2015-04-13 17:23:46.000000000 +0200
@@ -0,0 +1,49 @@
+[
+ {
+ "description": "invalid type for default",
+ "schema": {
+ "properties": {
+ "foo": {
+ "type": "integer",
+ "default": []
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "valid when property is specified",
+ "data": {"foo": 13},
+ "valid": true
+ },
+ {
+ "description": "still valid when the invalid default is used",
+ "data": {},
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "invalid string value for default",
+ "schema": {
+ "properties": {
+ "bar": {
+ "type": "string",
+ "minLength": 4,
+ "default": "bad"
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "valid when property is specified",
+ "data": {"bar": "good"},
+ "valid": true
+ },
+ {
+ "description": "still valid when the invalid default is used",
+ "data": {},
+ "valid": true
+ }
+ ]
+ }
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft3/optional/bignum.json new/jsonschema-2.5.1/json/tests/draft3/optional/bignum.json
--- old/jsonschema-2.4.0/json/tests/draft3/optional/bignum.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft3/optional/bignum.json 2014-10-27 23:20:13.000000000 +0100
@@ -22,6 +22,28 @@
]
},
{
+ "description": "integer",
+ "schema": {"type": "integer"},
+ "tests": [
+ {
+ "description": "a negative bignum is an integer",
+ "data": -12345678910111213141516171819202122232425262728293031,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "number",
+ "schema": {"type": "number"},
+ "tests": [
+ {
+ "description": "a negative bignum is a number",
+ "data": -98249283749234923498293171823948729348710298301928331,
+ "valid": true
+ }
+ ]
+ },
+ {
"description": "string",
"schema": {"type": "string"},
"tests": [
@@ -56,5 +78,30 @@
"valid": false
}
]
+ },
+ {
+ "description": "integer comparison",
+ "schema": {"minimum": -18446744073709551615},
+ "tests": [
+ {
+ "description": "comparison works for very negative numbers",
+ "data": -18446744073709551600,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "float comparison with high precision on negative numbers",
+ "schema": {
+ "minimum": -972783798187987123879878123.18878137,
+ "exclusiveMinimum": true
+ },
+ "tests": [
+ {
+ "description": "comparison works for very negative numbers",
+ "data": -972783798187987123879878123.188781371,
+ "valid": false
+ }
+ ]
}
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft3/pattern.json new/jsonschema-2.5.1/json/tests/draft3/pattern.json
--- old/jsonschema-2.4.0/json/tests/draft3/pattern.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft3/pattern.json 2015-06-05 16:26:18.000000000 +0200
@@ -19,5 +19,16 @@
"valid": true
}
]
+ },
+ {
+ "description": "pattern is not anchored",
+ "schema": {"pattern": "a+"},
+ "tests": [
+ {
+ "description": "matches a substring",
+ "data": "xxaayy",
+ "valid": true
+ }
+ ]
}
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft3/ref.json new/jsonschema-2.5.1/json/tests/draft3/ref.json
--- old/jsonschema-2.4.0/json/tests/draft3/ref.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft3/ref.json 2015-06-05 16:26:18.000000000 +0200
@@ -86,19 +86,34 @@
},
"tests": [
{
- "description": "slash",
+ "description": "slash invalid",
"data": {"slash": "aoeu"},
"valid": false
},
{
- "description": "tilda",
+ "description": "tilda invalid",
"data": {"tilda": "aoeu"},
"valid": false
},
{
- "description": "percent",
+ "description": "percent invalid",
"data": {"percent": "aoeu"},
"valid": false
+ },
+ {
+ "description": "slash valid",
+ "data": {"slash": 123},
+ "valid": true
+ },
+ {
+ "description": "tilda valid",
+ "data": {"tilda": 123},
+ "valid": true
+ },
+ {
+ "description": "percent valid",
+ "data": {"percent": 123},
+ "valid": true
}
]
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft4/additionalProperties.json new/jsonschema-2.5.1/json/tests/draft4/additionalProperties.json
--- old/jsonschema-2.4.0/json/tests/draft4/additionalProperties.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft4/additionalProperties.json 2015-04-13 17:23:46.000000000 +0200
@@ -56,6 +56,25 @@
]
},
{
+ "description":
+ "additionalProperties can exist by itself",
+ "schema": {
+ "additionalProperties": {"type": "boolean"}
+ },
+ "tests": [
+ {
+ "description": "an additional valid property is valid",
+ "data": {"foo" : true},
+ "valid": true
+ },
+ {
+ "description": "an additional invalid property is invalid",
+ "data": {"foo" : 1},
+ "valid": false
+ }
+ ]
+ },
+ {
"description": "additionalProperties are allowed by default",
"schema": {"properties": {"foo": {}, "bar": {}}},
"tests": [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft4/default.json new/jsonschema-2.5.1/json/tests/draft4/default.json
--- old/jsonschema-2.4.0/json/tests/draft4/default.json 1970-01-01 01:00:00.000000000 +0100
+++ new/jsonschema-2.5.1/json/tests/draft4/default.json 2015-04-13 17:23:46.000000000 +0200
@@ -0,0 +1,49 @@
+[
+ {
+ "description": "invalid type for default",
+ "schema": {
+ "properties": {
+ "foo": {
+ "type": "integer",
+ "default": []
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "valid when property is specified",
+ "data": {"foo": 13},
+ "valid": true
+ },
+ {
+ "description": "still valid when the invalid default is used",
+ "data": {},
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "invalid string value for default",
+ "schema": {
+ "properties": {
+ "bar": {
+ "type": "string",
+ "minLength": 4,
+ "default": "bad"
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "valid when property is specified",
+ "data": {"bar": "good"},
+ "valid": true
+ },
+ {
+ "description": "still valid when the invalid default is used",
+ "data": {},
+ "valid": true
+ }
+ ]
+ }
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft4/maxLength.json new/jsonschema-2.5.1/json/tests/draft4/maxLength.json
--- old/jsonschema-2.4.0/json/tests/draft4/maxLength.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft4/maxLength.json 2014-10-27 23:20:13.000000000 +0100
@@ -20,7 +20,7 @@
},
{
"description": "ignores non-strings",
- "data": 10,
+ "data": 100,
"valid": true
},
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft4/optional/bignum.json new/jsonschema-2.5.1/json/tests/draft4/optional/bignum.json
--- old/jsonschema-2.4.0/json/tests/draft4/optional/bignum.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft4/optional/bignum.json 2014-10-27 23:20:13.000000000 +0100
@@ -22,6 +22,28 @@
]
},
{
+ "description": "integer",
+ "schema": {"type": "integer"},
+ "tests": [
+ {
+ "description": "a negative bignum is an integer",
+ "data": -12345678910111213141516171819202122232425262728293031,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "number",
+ "schema": {"type": "number"},
+ "tests": [
+ {
+ "description": "a negative bignum is a number",
+ "data": -98249283749234923498293171823948729348710298301928331,
+ "valid": true
+ }
+ ]
+ },
+ {
"description": "string",
"schema": {"type": "string"},
"tests": [
@@ -56,5 +78,30 @@
"valid": false
}
]
+ },
+ {
+ "description": "integer comparison",
+ "schema": {"minimum": -18446744073709551615},
+ "tests": [
+ {
+ "description": "comparison works for very negative numbers",
+ "data": -18446744073709551600,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "float comparison with high precision on negative numbers",
+ "schema": {
+ "minimum": -972783798187987123879878123.18878137,
+ "exclusiveMinimum": true
+ },
+ "tests": [
+ {
+ "description": "comparison works for very negative numbers",
+ "data": -972783798187987123879878123.188781371,
+ "valid": false
+ }
+ ]
}
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft4/pattern.json new/jsonschema-2.5.1/json/tests/draft4/pattern.json
--- old/jsonschema-2.4.0/json/tests/draft4/pattern.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft4/pattern.json 2015-06-05 16:26:18.000000000 +0200
@@ -19,5 +19,16 @@
"valid": true
}
]
+ },
+ {
+ "description": "pattern is not anchored",
+ "schema": {"pattern": "a+"},
+ "tests": [
+ {
+ "description": "matches a substring",
+ "data": "xxaayy",
+ "valid": true
+ }
+ ]
}
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/json/tests/draft4/ref.json new/jsonschema-2.5.1/json/tests/draft4/ref.json
--- old/jsonschema-2.4.0/json/tests/draft4/ref.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/json/tests/draft4/ref.json 2015-06-05 16:26:18.000000000 +0200
@@ -86,19 +86,34 @@
},
"tests": [
{
- "description": "slash",
+ "description": "slash invalid",
"data": {"slash": "aoeu"},
"valid": false
},
{
- "description": "tilda",
+ "description": "tilda invalid",
"data": {"tilda": "aoeu"},
"valid": false
},
{
- "description": "percent",
+ "description": "percent invalid",
"data": {"percent": "aoeu"},
"valid": false
+ },
+ {
+ "description": "slash valid",
+ "data": {"slash": 123},
+ "valid": true
+ },
+ {
+ "description": "tilda valid",
+ "data": {"tilda": 123},
+ "valid": true
+ },
+ {
+ "description": "percent valid",
+ "data": {"percent": 123},
+ "valid": true
}
]
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/__init__.py new/jsonschema-2.5.1/jsonschema/__init__.py
--- old/jsonschema-2.4.0/jsonschema/__init__.py 2014-08-19 02:54:09.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/__init__.py 2015-04-13 17:23:46.000000000 +0200
@@ -19,8 +19,6 @@
Draft3Validator, Draft4Validator, RefResolver, validate
)
-
-__version__ = "2.4.0"
-
+from jsonschema._version import __version__
# flake8: noqa
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/_utils.py new/jsonschema-2.5.1/jsonschema/_utils.py
--- old/jsonschema-2.4.0/jsonschema/_utils.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/_utils.py 2015-04-13 17:23:46.000000000 +0200
@@ -54,7 +54,7 @@
"""
- data = pkgutil.get_data(__package__, "schemas/{0}.json".format(name))
+ data = pkgutil.get_data('jsonschema', "schemas/{0}.json".format(name))
return json.loads(data.decode("utf-8"))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/_validators.py new/jsonschema-2.5.1/jsonschema/_validators.py
--- old/jsonschema-2.4.0/jsonschema/_validators.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/_validators.py 2015-04-13 17:23:46.000000000 +0200
@@ -5,9 +5,6 @@
from jsonschema.compat import iteritems
-FLOAT_TOLERANCE = 10 ** -15
-
-
def patternProperties(validator, patternProperties, instance, schema):
if not validator.is_type(instance, "object"):
return
@@ -77,10 +74,10 @@
return
if schema.get("exclusiveMinimum", False):
- failed = float(instance) <= minimum
+ failed = instance <= minimum
cmp = "less than or equal to"
else:
- failed = float(instance) < minimum
+ failed = instance < minimum
cmp = "less than"
if failed:
@@ -111,8 +108,8 @@
return
if isinstance(dB, float):
- mod = instance % dB
- failed = (mod > FLOAT_TOLERANCE) and (dB - mod) > FLOAT_TOLERANCE
+ quotient = instance / dB
+ failed = int(quotient) != quotient
else:
failed = instance % dB
@@ -193,9 +190,20 @@
def ref(validator, ref, instance, schema):
- with validator.resolver.resolving(ref) as resolved:
- for error in validator.descend(instance, resolved):
- yield error
+ resolve = getattr(validator.resolver, "resolve", None)
+ if resolve is None:
+ with validator.resolver.resolving(ref) as resolved:
+ for error in validator.descend(instance, resolved):
+ yield error
+ else:
+ scope, resolved = validator.resolver.resolve(ref)
+ validator.resolver.push_scope(scope)
+
+ try:
+ for error in validator.descend(instance, resolved):
+ yield error
+ finally:
+ validator.resolver.pop_scope()
def type_draft3(validator, types, instance, schema):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/_version.py new/jsonschema-2.5.1/jsonschema/_version.py
--- old/jsonschema-2.4.0/jsonschema/_version.py 1970-01-01 01:00:00.000000000 +0100
+++ new/jsonschema-2.5.1/jsonschema/_version.py 2015-06-08 21:37:21.000000000 +0200
@@ -0,0 +1,5 @@
+
+# This file is automatically generated by setup.py.
+__version__ = '2.5.1'
+__sha__ = 'g3f459b7'
+__revision__ = 'g3f459b7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/compat.py new/jsonschema-2.5.1/jsonschema/compat.py
--- old/jsonschema-2.4.0/jsonschema/compat.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/compat.py 2015-04-13 17:23:46.000000000 +0200
@@ -1,6 +1,6 @@
-from __future__ import unicode_literals
-import sys
import operator
+import sys
+
try:
from collections import MutableMapping, Sequence # noqa
@@ -8,9 +8,11 @@
from collections.abc import MutableMapping, Sequence # noqa
PY3 = sys.version_info[0] >= 3
+PY26 = sys.version_info[:2] == (2, 6)
if PY3:
zip = zip
+ from functools import lru_cache
from io import StringIO
from urllib.parse import (
unquote, urljoin, urlunsplit, SplitResult, urlsplit as _urlsplit
@@ -31,6 +33,11 @@
int_types = int, long
iteritems = operator.methodcaller("iteritems")
+ if PY26:
+ from repoze.lru import lru_cache
+ else:
+ from functools32 import lru_cache
+
# On python < 3.3 fragments are not handled properly with unknown schemes
def urlsplit(url):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/exceptions.py new/jsonschema-2.5.1/jsonschema/exceptions.py
--- old/jsonschema-2.4.0/jsonschema/exceptions.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/exceptions.py 2014-10-27 23:20:13.000000000 +0100
@@ -27,6 +27,18 @@
schema_path=(),
parent=None,
):
+ super(_Error, self).__init__(
+ message,
+ validator,
+ path,
+ cause,
+ context,
+ validator_value,
+ instance,
+ schema,
+ schema_path,
+ parent,
+ )
self.message = message
self.path = self.relative_path = deque(path)
self.schema_path = self.relative_schema_path = deque(schema_path)
@@ -86,7 +98,7 @@
return self.relative_path
path = deque(self.relative_path)
- path.extendleft(parent.absolute_path)
+ path.extendleft(reversed(parent.absolute_path))
return path
@property
@@ -96,7 +108,7 @@
return self.relative_schema_path
path = deque(self.relative_schema_path)
- path.extendleft(parent.absolute_schema_path)
+ path.extendleft(reversed(parent.absolute_schema_path))
return path
def _set(self, **kwargs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/schemas/draft4.json new/jsonschema-2.5.1/jsonschema/schemas/draft4.json
--- old/jsonschema-2.4.0/jsonschema/schemas/draft4.json 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/schemas/draft4.json 2014-09-12 20:06:51.000000000 +0200
@@ -123,6 +123,9 @@
"default": false,
"type": "boolean"
},
+ "format": {
+ "type": "string"
+ },
"id": {
"format": "uri",
"type": "string"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/tests/test_exceptions.py new/jsonschema-2.5.1/jsonschema/tests/test_exceptions.py
--- old/jsonschema-2.4.0/jsonschema/tests/test_exceptions.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/tests/test_exceptions.py 2014-10-27 23:20:13.000000000 +0100
@@ -273,7 +273,7 @@
self.assertIsInstance(tree["foo"], exceptions.ErrorTree)
-class TestErrorReprStr(unittest.TestCase):
+class TestErrorInitReprStr(unittest.TestCase):
def make_error(self, **kwargs):
defaults = dict(
message=u"hello",
@@ -295,6 +295,10 @@
self.assertEqual(message_line, error.message)
self.assertEqual(rest, expected)
+ def test_it_calls_super_and_sets_args(self):
+ error = self.make_error()
+ self.assertGreater(len(error.args), 1)
+
def test_repr(self):
self.assertEqual(
repr(exceptions.ValidationError(message="Hello!")),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/tests/test_validators.py new/jsonschema-2.5.1/jsonschema/tests/test_validators.py
--- old/jsonschema-2.4.0/jsonschema/tests/test_validators.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/tests/test_validators.py 2015-04-13 17:23:46.000000000 +0200
@@ -425,6 +425,106 @@
self.assertEqual(e5.validator, "minItems")
self.assertEqual(e6.validator, "enum")
+ def test_recursive(self):
+ schema = {
+ "definitions": {
+ "node": {
+ "anyOf": [{
+ "type": "object",
+ "required": ["name", "children"],
+ "properties": {
+ "name": {
+ "type": "string",
+ },
+ "children": {
+ "type": "object",
+ "patternProperties": {
+ "^.*$": {
+ "$ref": "#/definitions/node",
+ },
+ },
+ },
+ },
+ }],
+ },
+ },
+ "type": "object",
+ "required": ["root"],
+ "properties": {
+ "root": {"$ref": "#/definitions/node"},
+ }
+ }
+
+ instance = {
+ "root": {
+ "name": "root",
+ "children": {
+ "a": {
+ "name": "a",
+ "children": {
+ "ab": {
+ "name": "ab",
+ # missing "children"
+ }
+ }
+ },
+ },
+ },
+ }
+ validator = Draft4Validator(schema)
+
+ e, = validator.iter_errors(instance)
+ self.assertEqual(e.absolute_path, deque(["root"]))
+ self.assertEqual(
+ e.absolute_schema_path, deque(["properties", "root", "anyOf"]),
+ )
+
+ e1, = e.context
+ self.assertEqual(e1.absolute_path, deque(["root", "children", "a"]))
+ self.assertEqual(
+ e1.absolute_schema_path, deque(
+ [
+ "properties",
+ "root",
+ "anyOf",
+ 0,
+ "properties",
+ "children",
+ "patternProperties",
+ "^.*$",
+ "anyOf",
+ ],
+ ),
+ )
+
+ e2, = e1.context
+ self.assertEqual(
+ e2.absolute_path, deque(
+ ["root", "children", "a", "children", "ab"],
+ ),
+ )
+ self.assertEqual(
+ e2.absolute_schema_path, deque(
+ [
+ "properties",
+ "root",
+ "anyOf",
+ 0,
+ "properties",
+ "children",
+ "patternProperties",
+ "^.*$",
+ "anyOf",
+ 0,
+ "properties",
+ "children",
+ "patternProperties",
+ "^.*$",
+ "anyOf"
+ ],
+ ),
+ )
+
def test_additionalProperties(self):
instance = {"bar": "bar", "foo": 2}
schema = {
@@ -533,17 +633,32 @@
resolver = RefResolver("", {})
schema = {"$ref" : mock.Mock()}
- @contextmanager
- def resolving():
- yield {"type": "integer"}
-
- with mock.patch.object(resolver, "resolving") as resolve:
- resolve.return_value = resolving()
+ with mock.patch.object(resolver, "resolve") as resolve:
+ resolve.return_value = "url", {"type": "integer"}
with self.assertRaises(ValidationError):
self.validator_class(schema, resolver=resolver).validate(None)
resolve.assert_called_once_with(schema["$ref"])
+ def test_it_delegates_to_a_legacy_ref_resolver(self):
+ """
+ Legacy RefResolvers support only the context manager form of
+ resolution.
+
+ """
+
+ class LegacyRefResolver(object):
+ @contextmanager
+ def resolving(this, ref):
+ self.assertEqual(ref, "the ref")
+ yield {"type" : "integer"}
+
+ resolver = LegacyRefResolver()
+ schema = {"$ref" : "the ref"}
+
+ with self.assertRaises(ValidationError):
+ self.validator_class(schema, resolver=resolver).validate(None)
+
def test_is_type_is_true_for_valid_type(self):
self.assertTrue(self.validator.is_type("foo", "string"))
@@ -675,11 +790,11 @@
self.assertEqual(resolved, self.referrer["properties"]["foo"])
def test_it_resolves_local_refs_with_id(self):
- schema = {"id": "foo://bar/schema#", "a": {"foo": "bar"}}
+ schema = {"id": "http://bar/schema#", "a": {"foo": "bar"}}
resolver = RefResolver.from_schema(schema)
with resolver.resolving("#/a") as resolved:
self.assertEqual(resolved, schema["a"])
- with resolver.resolving("foo://bar/schema#/a") as resolved:
+ with resolver.resolving("http://bar/schema#/a") as resolved:
self.assertEqual(resolved, schema["a"])
def test_it_retrieves_stored_refs(self):
@@ -716,6 +831,7 @@
schema = {"id" : "foo"}
resolver = RefResolver.from_schema(schema)
self.assertEqual(resolver.base_uri, "foo")
+ self.assertEqual(resolver.resolution_scope, "foo")
with resolver.resolving("") as resolved:
self.assertEqual(resolved, schema)
with resolver.resolving("#") as resolved:
@@ -729,6 +845,7 @@
schema = {}
resolver = RefResolver.from_schema(schema)
self.assertEqual(resolver.base_uri, "")
+ self.assertEqual(resolver.resolution_scope, "")
with resolver.resolving("") as resolved:
self.assertEqual(resolved, schema)
with resolver.resolving("#") as resolved:
@@ -763,9 +880,7 @@
)
with resolver.resolving(ref):
pass
- with resolver.resolving(ref):
- pass
- self.assertEqual(foo_handler.call_count, 2)
+ self.assertEqual(foo_handler.call_count, 1)
def test_if_you_give_it_junk_you_get_a_resolution_error(self):
ref = "foo://bar"
@@ -776,6 +891,13 @@
pass
self.assertEqual(str(err.exception), "Oh no! What's this?")
+ def test_helpful_error_message_on_failed_pop_scope(self):
+ resolver = RefResolver("", {})
+ resolver.pop_scope()
+ with self.assertRaises(RefResolutionError) as exc:
+ resolver.pop_scope()
+ self.assertIn("Failed to pop the scope", str(exc.exception))
+
def sorted_errors(errors):
def key(error):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema/validators.py new/jsonschema-2.5.1/jsonschema/validators.py
--- old/jsonschema-2.4.0/jsonschema/validators.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema/validators.py 2015-04-13 17:23:46.000000000 +0200
@@ -12,7 +12,7 @@
from jsonschema import _utils, _validators
from jsonschema.compat import (
Sequence, urljoin, urlsplit, urldefrag, unquote, urlopen,
- str_types, int_types, iteritems,
+ str_types, int_types, iteritems, lru_cache,
)
from jsonschema.exceptions import ErrorTree # Backwards compatibility # noqa
from jsonschema.exceptions import RefResolutionError, SchemaError, UnknownType
@@ -79,7 +79,10 @@
if _schema is None:
_schema = self.schema
- with self.resolver.in_scope(_schema.get(u"id", u"")):
+ scope = _schema.get(u"id")
+ if scope:
+ self.resolver.push_scope(scope)
+ try:
ref = _schema.get(u"$ref")
if ref is not None:
validators = [(u"$ref", ref)]
@@ -103,6 +106,9 @@
if k != u"$ref":
error.schema_path.appendleft(k)
yield error
+ finally:
+ if scope:
+ self.resolver.pop_scope()
def descend(self, instance, schema, path=None, schema_path=None):
for error in self.iter_errors(instance, schema):
@@ -227,19 +233,33 @@
first resolution
:argument dict handlers: a mapping from URI schemes to functions that
should be used to retrieve them
+ :arguments functools.lru_cache urljoin_cache: a cache that will be used for
+ caching the results of joining the resolution scope to subscopes.
+ :arguments functools.lru_cache remote_cache: a cache that will be used for
+ caching the results of resolved remote URLs.
"""
def __init__(
- self, base_uri, referrer, store=(), cache_remote=True, handlers=(),
+ self,
+ base_uri,
+ referrer,
+ store=(),
+ cache_remote=True,
+ handlers=(),
+ urljoin_cache=None,
+ remote_cache=None,
):
- self.base_uri = base_uri
- self.resolution_scope = base_uri
- # This attribute is not used, it is for backwards compatibility
+ if urljoin_cache is None:
+ urljoin_cache = lru_cache(1024)(urljoin)
+ if remote_cache is None:
+ remote_cache = lru_cache(1024)(self.resolve_from_url)
+
self.referrer = referrer
self.cache_remote = cache_remote
self.handlers = dict(handlers)
+ self._scopes_stack = [base_uri]
self.store = _utils.URIDict(
(id, validator.META_SCHEMA)
for id, validator in iteritems(meta_schemas)
@@ -247,26 +267,52 @@
self.store.update(store)
self.store[base_uri] = referrer
+ self._urljoin_cache = urljoin_cache
+ self._remote_cache = remote_cache
+
@classmethod
def from_schema(cls, schema, *args, **kwargs):
"""
Construct a resolver from a JSON schema object.
- :argument schema schema: the referring schema
+ :argument schema: the referring schema
:rtype: :class:`RefResolver`
"""
return cls(schema.get(u"id", u""), schema, *args, **kwargs)
+ def push_scope(self, scope):
+ self._scopes_stack.append(
+ self._urljoin_cache(self.resolution_scope, scope),
+ )
+
+ def pop_scope(self):
+ try:
+ self._scopes_stack.pop()
+ except IndexError:
+ raise RefResolutionError(
+ "Failed to pop the scope from an empty stack. "
+ "`pop_scope()` should only be called once for every "
+ "`push_scope()`",
+ )
+
+ @property
+ def resolution_scope(self):
+ return self._scopes_stack[-1]
+
+ @property
+ def base_uri(self):
+ uri, _ = urldefrag(self.resolution_scope)
+ return uri
+
@contextlib.contextmanager
def in_scope(self, scope):
- old_scope = self.resolution_scope
- self.resolution_scope = urljoin(old_scope, scope)
+ self.push_scope(scope)
try:
yield
finally:
- self.resolution_scope = old_scope
+ self.pop_scope()
@contextlib.contextmanager
def resolving(self, ref):
@@ -278,25 +324,28 @@
"""
- full_uri = urljoin(self.resolution_scope, ref)
- uri, fragment = urldefrag(full_uri)
- if not uri:
- uri = self.base_uri
-
- if uri in self.store:
- document = self.store[uri]
- else:
+ url, resolved = self.resolve(ref)
+ self.push_scope(url)
+ try:
+ yield resolved
+ finally:
+ self.pop_scope()
+
+ def resolve(self, ref):
+ url = self._urljoin_cache(self.resolution_scope, ref)
+ return url, self._remote_cache(url)
+
+ def resolve_from_url(self, url):
+ url, fragment = urldefrag(url)
+ try:
+ document = self.store[url]
+ except KeyError:
try:
- document = self.resolve_remote(uri)
+ document = self.resolve_remote(url)
except Exception as exc:
raise RefResolutionError(exc)
- old_base_uri, self.base_uri = self.base_uri, uri
- try:
- with self.in_scope(uri):
- yield self.resolve_fragment(document, fragment)
- finally:
- self.base_uri = old_base_uri
+ return self.resolve_fragment(document, fragment)
def resolve_fragment(self, document, fragment):
"""
@@ -332,8 +381,9 @@
"""
Resolve a remote ``uri``.
- Does not check the store first, but stores the retrieved document in
- the store if :attr:`RefResolver.cache_remote` is True.
+ If called directly, does not check the store first, but after
+ retrieving the document at the specified URI it will be saved in
+ the store if :attr:`cache_remote` is True.
.. note::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema.egg-info/PKG-INFO new/jsonschema-2.5.1/jsonschema.egg-info/PKG-INFO
--- old/jsonschema-2.4.0/jsonschema.egg-info/PKG-INFO 2014-08-19 02:55:46.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema.egg-info/PKG-INFO 2015-06-08 21:37:21.000000000 +0200
@@ -1,12 +1,19 @@
Metadata-Version: 1.1
Name: jsonschema
-Version: 2.4.0
+Version: 2.5.1
Summary: An implementation of JSON Schema validation for Python
Home-page: http://github.com/Julian/jsonschema
Author: Julian Berman
Author-email: Julian(a)GrayVines.com
License: MIT
-Description: ==========
+Description: .. image:: https://img.shields.io/pypi/v/jsonschema.svg
+ :target: https://pypi.python.org/pypi/jsonschema
+ .. image:: https://travis-ci.org/Julian/jsonschema.svg?branch=master
+ :target: https://travis-ci.org/Julian/jsonschema
+ .. image:: https://img.shields.io/pypi/l/jsonschema.svg
+ :target: https://pypi.python.org/pypi/jsonschema
+
+ ==========
jsonschema
==========
@@ -57,25 +64,18 @@
Release Notes
-------------
- * A simple CLI was added for validation
- * Validation errors now keep full absolute paths and absolute schema paths in
- their ``absolute_path`` and ``absolute_schema_path`` attributes. The ``path``
- and ``schema_path`` attributes are deprecated in favor of ``relative_path``
- and ``relative_schema_path``\ .
+ Version 2.5.0 is mainly a performance release. The interface for `RefResolver`
+ was extended to add methods that improve performance on CPython.
- *Note:* Support for Python 3.2 was dropped in this release, and installation
- now uses setuptools.
+ Support for custom `RefResolver` objects with the legacy interface should *not*
+ be affected. If you notice something amiss please file an issue ticket.
Running the Test Suite
----------------------
- ``jsonschema`` uses the wonderful `Tox <http://tox.readthedocs.org>`_ for its
- test suite. (It really is wonderful, if for some reason you haven't heard of
- it, you really should use it for your projects).
-
- Assuming you have ``tox`` installed (perhaps via ``pip install tox`` or your
- package manager), just run ``tox`` in the directory of your source checkout to
+ If you have ``tox`` installed (perhaps via ``pip install tox`` or your
+ package manager), running``tox`` in the directory of your source checkout will
run ``jsonschema``'s test suite on all of the versions of Python ``jsonschema``
supports. Note that you'll need to have all of those versions installed in
order to run the tests on each of them, otherwise ``tox`` will skip (and fail)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema.egg-info/SOURCES.txt new/jsonschema-2.5.1/jsonschema.egg-info/SOURCES.txt
--- old/jsonschema-2.4.0/jsonschema.egg-info/SOURCES.txt 2014-08-19 02:55:47.000000000 +0200
+++ new/jsonschema-2.5.1/jsonschema.egg-info/SOURCES.txt 2015-06-08 21:37:24.000000000 +0200
@@ -5,6 +5,7 @@
setup.cfg
setup.py
tox.ini
+version.txt
json/.gitignore
json/.travis.yml
json/LICENSE
@@ -15,6 +16,7 @@
json/remotes/folder/folderInteger.json
json/tests/draft3/additionalItems.json
json/tests/draft3/additionalProperties.json
+json/tests/draft3/default.json
json/tests/draft3/dependencies.json
json/tests/draft3/disallow.json
json/tests/draft3/divisibleBy.json
@@ -43,6 +45,7 @@
json/tests/draft4/additionalProperties.json
json/tests/draft4/allOf.json
json/tests/draft4/anyOf.json
+json/tests/draft4/default.json
json/tests/draft4/definitions.json
json/tests/draft4/dependencies.json
json/tests/draft4/enum.json
@@ -75,6 +78,7 @@
jsonschema/_reflect.py
jsonschema/_utils.py
jsonschema/_validators.py
+jsonschema/_version.py
jsonschema/cli.py
jsonschema/compat.py
jsonschema/exceptions.py
@@ -83,6 +87,8 @@
jsonschema.egg-info/SOURCES.txt
jsonschema.egg-info/dependency_links.txt
jsonschema.egg-info/entry_points.txt
+jsonschema.egg-info/pbr.json
+jsonschema.egg-info/requires.txt
jsonschema.egg-info/top_level.txt
jsonschema/schemas/draft3.json
jsonschema/schemas/draft4.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema.egg-info/pbr.json new/jsonschema-2.5.1/jsonschema.egg-info/pbr.json
--- old/jsonschema-2.4.0/jsonschema.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100
+++ new/jsonschema-2.5.1/jsonschema.egg-info/pbr.json 2015-06-08 21:37:21.000000000 +0200
@@ -0,0 +1 @@
+{"is_release": true, "git_version": "3f459b7"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/jsonschema.egg-info/requires.txt new/jsonschema-2.5.1/jsonschema.egg-info/requires.txt
--- old/jsonschema-2.4.0/jsonschema.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/jsonschema-2.5.1/jsonschema.egg-info/requires.txt 2015-06-08 21:37:21.000000000 +0200
@@ -0,0 +1,12 @@
+
+[:python_version=='2.6']
+argparse
+repoze.lru
+
+[:python_version=='2.7']
+functools32
+
+[format]
+rfc3987
+strict-rfc3339
+webcolors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/setup.py new/jsonschema-2.5.1/setup.py
--- old/jsonschema-2.4.0/setup.py 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/setup.py 2015-06-08 18:04:36.000000000 +0200
@@ -1,9 +1,9 @@
-from setuptools import setup
+import os
-from jsonschema import __version__
+from setuptools import setup
-with open("README.rst") as readme:
+with open(os.path.join(os.path.dirname(__file__), "README.rst")) as readme:
long_description = readme.read()
classifiers = [
@@ -21,11 +21,18 @@
"Programming Language :: Python :: Implementation :: PyPy",
]
+extras_require = {
+ "format" : ["rfc3987", "strict-rfc3339", "webcolors"],
+ ":python_version=='2.6'": ["argparse", "repoze.lru"],
+ ":python_version=='2.7'": ["functools32"],
+}
+
setup(
name="jsonschema",
- version=__version__,
packages=["jsonschema", "jsonschema.tests"],
package_data={"jsonschema": ["schemas/*.json"]},
+ setup_requires=["vcversioner"],
+ extras_require=extras_require,
author="Julian Berman",
author_email="Julian(a)GrayVines.com",
classifiers=classifiers,
@@ -34,4 +41,5 @@
long_description=long_description,
url="http://github.com/Julian/jsonschema",
entry_points={"console_scripts": ["jsonschema = jsonschema.cli:main"]},
+ vcversioner={"version_module_paths" : ["jsonschema/_version.py"]},
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/tox.ini new/jsonschema-2.5.1/tox.ini
--- old/jsonschema-2.4.0/tox.ini 2014-07-06 04:55:07.000000000 +0200
+++ new/jsonschema-2.5.1/tox.ini 2015-04-13 17:23:46.000000000 +0200
@@ -1,56 +1,39 @@
[tox]
-envlist = py26, py27, pypy, py34, docs, style
+envlist = py{26,27,34,py,py3}, docs, style
+
[testenv]
+changedir = {envtmpdir}
+setenv =
+ JSON_SCHEMA_TEST_SUITE = {toxinidir}/json
commands =
- py.test [] jsonschema
- {envpython} -m doctest README.rst
-deps =
- {[testenv:notpy34]deps}
- {[testenv:py34]deps}
+ py26: trial [] jsonschema
+ py{27,34,py,py3}: green [] jsonschema
-[testenv:py26]
+ {envpython} -m doctest {toxinidir}/README.rst
+ py{26,27,34}: sphinx-build -b doctest {toxinidir}/docs {envtmpdir}/html
deps =
- {[testenv:notpy34]deps}
- {[testenv:all]deps}
- argparse
- unittest2
+ -e{toxinidir}[format]
-[testenv:py34]
-commands =
- py.test [] jsonschema
- {envpython} -m doctest README.rst
- sphinx-build -b doctest docs {envtmpdir}/html
-deps =
- {[testenv:all]deps}
- {[testenv:notpy26]deps}
+ py26: twisted
+ py{27,34,py,py3}: green
-[testenv:notpy34]
-deps =
- mock
+ py26: unittest2
+ py{26,27,py,py3}: mock
-[testenv:notpy26]
-deps =
- rfc3987
+ py{26,27,34}: lxml
+ py{26,27,34,py}: sphinx
-[testenv:all]
-deps =
- lxml
- pytest
- sphinx
- strict-rfc3339
- webcolors
[testenv:coverage]
commands =
- coverage run --branch --source jsonschema [] {envbindir}/py.test jsonschema
+ coverage run --branch --source {toxinidir}/jsonschema [] {envbindir}/green jsonschema
coverage report --show-missing
coverage html
deps =
- {[testenv:notpy34]deps}
- {[testenv:py34]deps}
coverage
+
[testenv:docs]
basepython = python
changedir = docs
@@ -59,13 +42,12 @@
commands =
sphinx-build [] -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
+
[testenv:style]
deps = flake8
commands =
- flake8 [] --max-complexity 10 jsonschema
+ flake8 [] --max-complexity 10 {toxinidir}/jsonschema
+
[flake8]
ignore = E203,E302,E303,E701,F811
-
-[pytest]
-addopts = -r s -s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-2.4.0/version.txt new/jsonschema-2.5.1/version.txt
--- old/jsonschema-2.4.0/version.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/jsonschema-2.5.1/version.txt 2015-06-08 21:37:21.000000000 +0200
@@ -0,0 +1 @@
+v2.5.1-0-g3f459b7
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package python3-jsonschema for openSUSE:Factory checked in at 2015-09-30 05:49:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-jsonschema (Old)
and /work/SRC/openSUSE:Factory/.python3-jsonschema.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-jsonschema"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-jsonschema/python3-jsonschema.changes 2014-05-02 14:02:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-jsonschema.new/python3-jsonschema.changes 2015-09-30 05:49:06.000000000 +0200
@@ -1,0 +2,41 @@
+Thu Aug 13 12:21:32 UTC 2015 - toddrme2178(a)gmail.com
+
+- Implement update-alternatives
+
+-------------------------------------------------------------------
+Mon Jun 15 02:16:17 UTC 2015 - arun(a)gmx.de
+
+- update to version 2.5.1:
+ (no changelog available)
+
+-------------------------------------------------------------------
+Fri Jun 5 15:46:36 UTC 2015 - arun(a)gmx.de
+
+- specfile:
+ * add python3-vcversioner
+
+- update to version 2.5.0:
+ * Improved performance on CPython by adding caching around ref
+ resolution (#203)
+
+-------------------------------------------------------------------
+Wed Jan 7 17:03:12 UTC 2015 - jmatejek(a)suse.com
+
+- drop test requirements and %check section, which is broken
+- make a symlink out of /usr/bin/jsonschema
+
+-------------------------------------------------------------------
+Mon Jan 5 20:30:08 UTC 2015 - arun(a)gmx.de
+
+- specfile:
+ * update copyright year
+ * added setuptools as a requirement
+ * add /usr/bin/jsonschema (should this be done using update-alternatives?)
+
+- update to version 2.4.0:
+ * Added a CLI (#134)
+ * Added absolute path and absolute schema path to errors (#120)
+ * Added relevance
+ * Meta-schemas are now loaded via pkgutil
+
+-------------------------------------------------------------------
Old:
----
jsonschema-2.3.0.tar.gz
New:
----
jsonschema-2.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-jsonschema.spec ++++++
--- /var/tmp/diff_new_pack.dNoL1a/_old 2015-09-30 05:49:07.000000000 +0200
+++ /var/tmp/diff_new_pack.dNoL1a/_new 2015-09-30 05:49:07.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-jsonschema
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python3-jsonschema
-Version: 2.3.0
+Version: 2.5.1
Release: 0
Summary: An implementation of JSON-Schema validation for Python
License: MIT
@@ -26,16 +26,15 @@
Source: http://pypi.python.org/packages/source/j/jsonschema/jsonschema-%{version}.t…
BuildRequires: python3
BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-vcversioner
# Test build requirements
BuildRequires: python3-mock
-BuildRequires: python3-unittest2
Requires: python3
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python3_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
%description
jsonschema is an implementation of JSON Schema (currently in Draft 3)
@@ -50,14 +49,32 @@
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
-%if 0%{?suse_version} > 1110
-%check
-#python3 tests.py
-%endif
+# Prepare for update-alternatives usage
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-%{py3_ver}
+ln -s -f %{_sysconfdir}/alternatives/jsonschema %{buildroot}%{_bindir}/jsonschema
+# create a dummy target for /etc/alternatives/jsonschema
+touch %{buildroot}%{_sysconfdir}/alternatives/jsonschema
+
+# Currently fails on Python 3.x
+# %check
+# python3 -m unittest jsonschema.tests.test_jsonschema_test_suite
+
+%post
+%_sbindir/update-alternatives \
+ --install %{_bindir}/jsonschema jsonschema %{_bindir}/jsonschema-%{py3_ver} 30
+
+%preun
+if [ $1 -eq 0 ] ; then
+ %_sbindir/update-alternatives --remove jsonschema %{_bindir}/jsonschema-%{py3_ver}
+fi
%files
%defattr(-,root,root,-)
%doc COPYING README.rst
+%{_bindir}/jsonschema
+%{_bindir}/jsonschema-%{py3_ver}
+%ghost %{_sysconfdir}/alternatives/jsonschema
%{python3_sitelib}/*
%changelog
++++++ jsonschema-2.3.0.tar.gz -> jsonschema-2.5.1.tar.gz ++++++
++++ 3512 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package rubygem-eventmachine for openSUSE:Factory checked in at 2015-09-30 05:48:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-eventmachine (Old)
and /work/SRC/openSUSE:Factory/.rubygem-eventmachine.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-eventmachine"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-eventmachine/rubygem-eventmachine.changes 2015-06-23 11:55:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-eventmachine.new/rubygem-eventmachine.changes 2015-09-30 05:48:58.000000000 +0200
@@ -1,0 +2,18 @@
+Fri Aug 7 04:29:43 UTC 2015 - coolo(a)suse.com
+
+- updated to version 1.0.8
+ see installed CHANGELOG.md
+
+ ## 1.0.8 (August 6, 2015)
+ * fix kqueue assertion failed, postpone ArmKqueueWriter until all events are processed [#51, #176, #372, #401, #619]
+ * fix Rubinius GC, crank the machine from Ruby space when running Rubinius [#201, #202, #617]
+ * test to show that LineText2 preserves whitespace and newlines [#32, #622]
+ * bump up compiler warnings and resolve them [#616]
+ * fix Windows x64 use uintptr_t instead of unsigned long for binding pointers [#612, #615]
+ * fix linetext2 unroll tail recursion to avoid stack level too deep [#609]
+ * fix for compilation with SSL on windows [#601]
+ * open file descriptors and sockets with O_CLOEXEC where possible [#298, #488, #591]
+ * fix SmtpClient: send second EHLO after STARTTLS. [#589]
+ * fix nul-terminated strings in C, use StringValueCStr instead of StringValuePtr
+
+-------------------------------------------------------------------
Old:
----
eventmachine-1.0.7.gem
New:
----
eventmachine-1.0.8.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-eventmachine.spec ++++++
--- /var/tmp/diff_new_pack.QgoVt3/_old 2015-09-30 05:48:59.000000000 +0200
+++ /var/tmp/diff_new_pack.QgoVt3/_new 2015-09-30 05:48:59.000000000 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-eventmachine
-Version: 1.0.7
+Version: 1.0.8
Release: 0
%define mod_name eventmachine
%define mod_full_name %{mod_name}-%{version}
@@ -34,10 +34,10 @@
BuildRequires: pkg-config
# /MANUAL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 5
BuildRequires: %{rubydevel}
BuildRequires: %{rubygem gem2rpm}
BuildRequires: %{rubygem rdoc > 3.10}
+BuildRequires: ruby-macros >= 5
Url: http://rubyeventmachine.com
Source: http://rubygems.org/gems/%{mod_full_name}.gem
Source1: rubygem-eventmachine-rpmlintrc
++++++ eventmachine-1.0.7.gem -> eventmachine-1.0.8.gem ++++++
++++ 4029 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package rubygem-ruby_parser for openSUSE:Factory checked in at 2015-09-30 05:48:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-ruby_parser (Old)
and /work/SRC/openSUSE:Factory/.rubygem-ruby_parser.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-ruby_parser"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-ruby_parser/rubygem-ruby_parser.changes 2015-06-12 20:30:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-ruby_parser.new/rubygem-ruby_parser.changes 2015-09-30 05:48:56.000000000 +0200
@@ -1,0 +2,17 @@
+Fri Aug 7 04:31:24 UTC 2015 - coolo(a)suse.com
+
+- updated to version 3.7.1
+ see installed History.txt
+
+ === 3.7.1 / 2015-08-06
+
+ * 1 minor enhancement:
+
+ * Improved understandability of lexing postfix symbols.
+
+ * 2 bug fixes:
+
+ * Fixed timeout caused by regexp backtracking bug w/ long strings in 2.2 parser. (presidentbeef)
+ * Rename DEBUG env toggle to RB_LINENO_DEBUG. (tenderlove)
+
+-------------------------------------------------------------------
Old:
----
ruby_parser-3.7.0.gem
New:
----
ruby_parser-3.7.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-ruby_parser.spec ++++++
--- /var/tmp/diff_new_pack.4jefyr/_old 2015-09-30 05:48:57.000000000 +0200
+++ /var/tmp/diff_new_pack.4jefyr/_new 2015-09-30 05:48:57.000000000 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-ruby_parser
-Version: 3.7.0
+Version: 3.7.1
Release: 0
%define mod_name ruby_parser
%define mod_full_name %{mod_name}-%{version}
++++++ ruby_parser-3.7.0.gem -> ruby_parser-3.7.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.txt new/History.txt
--- old/History.txt 2015-05-29 00:04:32.000000000 +0200
+++ new/History.txt 2015-08-06 23:31:41.000000000 +0200
@@ -1,3 +1,14 @@
+=== 3.7.1 / 2015-08-06
+
+* 1 minor enhancement:
+
+ * Improved understandability of lexing postfix symbols.
+
+* 2 bug fixes:
+
+ * Fixed timeout caused by regexp backtracking bug w/ long strings in 2.2 parser. (presidentbeef)
+ * Rename DEBUG env toggle to RB_LINENO_DEBUG. (tenderlove)
+
=== 3.7.0 / 2015-05-28
* 2 major enhancements:
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
Files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_lexer.rb new/lib/ruby_lexer.rb
--- old/lib/ruby_lexer.rb 2015-05-29 00:04:33.000000000 +0200
+++ new/lib/ruby_lexer.rb 2015-08-06 23:31:42.000000000 +0200
@@ -662,6 +662,23 @@
return result(:expr_end, :tSYMBOL, symbol)
end
+ def was_label?
+ @was_label = ruby22_label?
+ true
+ end
+
+ def process_label_or_string text
+ if @was_label && text =~ /:$/ then
+ @was_label = nil
+ return process_label text
+ elsif text =~ /:$/ then
+ ss.pos -= 1 # put back ":"
+ text = text[0..-2]
+ end
+
+ result :expr_end, :tSTRING, text[1..-2].gsub(/\\\\/, "\\").gsub(/\\'/, "'")
+ end
+
def process_label text
result = process_symbol text
result[0] = :tLABEL
@@ -1202,7 +1219,7 @@
require "ruby_lexer.rex"
-if ENV["DEBUG"] then
+if ENV["RP_LINENO_DEBUG"] then
class RubyLexer
alias :old_lineno= :lineno=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_lexer.rex new/lib/ruby_lexer.rex
--- old/lib/ruby_lexer.rex 2015-05-29 00:04:33.000000000 +0200
+++ new/lib/ruby_lexer.rex 2015-08-06 23:31:42.000000000 +0200
@@ -93,9 +93,7 @@
/\[/ process_square_bracket
-# TODO: make this conditional on ruby 2.2
-ruby22_label? /\'#{SSTRING}\':/o process_label
- /\'#{SSTRING}\'/o { result :expr_end, :tSTRING, matched[1..-2].gsub(/\\\\/, "\\").gsub(/\\'/, "'") } # " stupid emacs
+was_label? /\'#{SSTRING}\':?/o process_label_or_string
: /\|/
| /\|\|\=/ { result :expr_beg, :tOP_ASGN, "||" }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_lexer.rex.rb new/lib/ruby_lexer.rex.rb
--- old/lib/ruby_lexer.rex.rb 2015-05-29 00:04:33.000000000 +0200
+++ new/lib/ruby_lexer.rex.rb 2015-08-06 23:31:42.000000000 +0200
@@ -163,10 +163,8 @@
end # group /[+\d]/
when text = ss.scan(/\[/) then
process_square_bracket text
- when ruby22_label? && (text = ss.scan(/\'#{SSTRING}\':/o)) then
- process_label text
- when text = ss.scan(/\'#{SSTRING}\'/o) then
- action { result :expr_end, :tSTRING, matched[1..-2].gsub(/\\\\/, "\\").gsub(/\\'/, "'") } # " stupid emacs
+ when was_label? && (text = ss.scan(/\'#{SSTRING}\':?/o)) then
+ process_label_or_string text
when ss.check(/\|/) then
case
when text = ss.scan(/\|\|\=/) then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_parser_extras.rb new/lib/ruby_parser_extras.rb
--- old/lib/ruby_parser_extras.rb 2015-05-29 00:04:33.000000000 +0200
+++ new/lib/ruby_parser_extras.rb 2015-08-06 23:31:42.000000000 +0200
@@ -91,7 +91,7 @@
end
module RubyParserStuff
- VERSION = "3.7.0" unless constants.include? "VERSION" # SIGH
+ VERSION = "3.7.1" unless constants.include? "VERSION" # SIGH
attr_accessor :lexer, :in_def, :in_single, :file
attr_reader :env, :comments
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-05-29 00:04:32.000000000 +0200
+++ new/metadata 2015-08-06 23:31:41.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: ruby_parser
version: !ruby/object:Gem::Version
- version: 3.7.0
+ version: 3.7.1
platform: ruby
authors:
- Ryan Davis
@@ -29,7 +29,7 @@
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
VpzF30vNaJK6ZT7xlIsIlwmH
-----END CERTIFICATE-----
-date: 2015-05-28 00:00:00.000000000 Z
+date: 2015-08-06 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: sexp_processor
@@ -46,6 +46,20 @@
- !ruby/object:Gem::Version
version: '4.1'
- !ruby/object:Gem::Dependency
+ name: minitest
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - ~>
+ - !ruby/object:Gem::Version
+ version: '5.7'
+ type: :development
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - ~>
+ - !ruby/object:Gem::Version
+ version: '5.7'
+- !ruby/object:Gem::Dependency
name: rdoc
requirement: !ruby/object:Gem::Requirement
requirements:
Files old/metadata.gz.sig and new/metadata.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_ruby_parser.rb new/test/test_ruby_parser.rb
--- old/test/test_ruby_parser.rb 2015-05-29 00:04:33.000000000 +0200
+++ new/test/test_ruby_parser.rb 2015-08-06 23:31:42.000000000 +0200
@@ -575,6 +575,14 @@
# TODO: add more including interpolation etc
end
+ def test_str_backslashes
+ long_string = '\n' * 100
+ rb = "x '#{long_string}'"
+ pt = s(:call, nil, :x, s(:str, long_string))
+
+ assert_parse rb, pt
+ end
+
def test_str_pct_Q_nested
rb = "%Q[before [#\{nest}] after]"
pt = s(:dstr, "before [", s(:evstr, s(:call, nil, :nest)), s(:str, "] after"))
1
0
Hello community,
here is the log from the commit of package virtualbox for openSUSE:13.1:Update checked in at 2015-09-29 10:13:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/virtualbox (Old)
and /work/SRC/openSUSE:13.1:Update/.virtualbox.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virtualbox"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _link ++++++
--- /var/tmp/diff_new_pack.liTCqM/_old 2015-09-29 10:14:01.000000000 +0200
+++ /var/tmp/diff_new_pack.liTCqM/_new 2015-09-29 10:14:01.000000000 +0200
@@ -1 +1 @@
-<link package='virtualbox.4012' cicount='copy' />
+<link package='virtualbox.4030' cicount='copy' />
1
0
Hello community,
here is the log from the commit of package perl-Net-IP.4033 for openSUSE:13.1:Update checked in at 2015-09-29 10:13:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/perl-Net-IP.4033 (Old)
and /work/SRC/openSUSE:13.1:Update/.perl-Net-IP.4033.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Net-IP.4033"
Changes:
--------
New Changes file:
--- /dev/null 2015-09-24 09:51:01.260026505 +0200
+++ /work/SRC/openSUSE:13.1:Update/.perl-Net-IP.4033.new/perl-Net-IP.changes 2015-09-29 10:13:53.000000000 +0200
@@ -0,0 +1,100 @@
+-------------------------------------------------------------------
+Wed Sep 16 15:13:49 UTC 2015 - vcizek(a)suse.com
+
+- ipcount: fix the use of + in the address range (boo#942108)
+ * added ipcount-invalid_chars_in_IP.patch
+
+-------------------------------------------------------------------
+Sat Jun 8 07:11:10 UTC 2013 - coolo(a)suse.com
+
+- updated to 1.26
+ - 81138 ip types
+ - 80164 hexip does not change when ip changes (fix: hexformat needs to be cleared by set)
+ - 4898 double compression
+ - 73232 invalid ipv6 1:2:3:4:5:6:7
+ - 73105 invalid ip 1:2
+ - 73104 expand 1::2::3
+ - 71042 ip_reverse 2001:4f8:3:36:0:0:0:235
+ - 45165 ip_range_to_prefix updated documentation
+ - 32232 excepts 61-217-102-8.hinet-ip.hinet.net as range
+
+-------------------------------------------------------------------
+Fri Nov 18 11:07:40 UTC 2011 - coolo(a)suse.com
+
+- use original .tar.gz
+
+-------------------------------------------------------------------
+Tue Nov 30 19:20:35 UTC 2010 - coolo(a)novell.com
+
+- switch to perl_requires macro
+
+-------------------------------------------------------------------
+Mon Nov 29 18:30:45 UTC 2010 - coolo(a)novell.com
+
+- remove /var/adm/perl-modules
+
+-------------------------------------------------------------------
+Tue Oct 19 08:38:50 UTC 2010 - coolo(a)novell.com
+
+- add perl as explicit buildrequire
+
+-------------------------------------------------------------------
+Sun Jan 10 15:43:32 CET 2010 - jengelh(a)medozas.de
+
+- enable parallel build
+
+-------------------------------------------------------------------
+Thu Aug 21 16:31:55 CEST 2008 - anicka(a)suse.cz
+
+- fix undefined value (bnc#418946)
+
+-------------------------------------------------------------------
+Fri Dec 14 16:03:57 CET 2007 - anicka(a)suse.cz
+
+- update to 1.25
+ * Math::BigInt is now mandatory
+ * Several bugfixes done
+ * Bugfix in overlaps function
+ * Updated Makefile
+ * ran perltidy on the code
+
+-------------------------------------------------------------------
+Wed Jan 25 21:39:51 CET 2006 - mls(a)suse.de
+
+- converted neededforbuild to BuildRequires
+
+-------------------------------------------------------------------
+Wed Sep 28 22:13:51 CEST 2005 - dmueller(a)suse.de
+
+ - add norootforbuild
+
+-------------------------------------------------------------------
+Sun Jul 31 16:24:13 CEST 2005 - cthiel(a)suse.de
+
+- update to version 1.23
+
+-------------------------------------------------------------------
+Fri Aug 22 15:23:28 CEST 2003 - mjancar(a)suse.cz
+
+- require the perl version we build with
+
+-------------------------------------------------------------------
+Fri Aug 1 01:49:18 CEST 2003 - ro(a)suse.de
+
+- update to 1.20 / package binaries
+
+-------------------------------------------------------------------
+Mon Jul 28 11:32:22 CEST 2003 - ro(a)suse.de
+
+- install to vendor locations
+
+-------------------------------------------------------------------
+Sun Jun 22 22:25:07 CEST 2003 - coolo(a)suse.de
+
+- package directories
+
+-------------------------------------------------------------------
+Tue Apr 22 14:57:17 CEST 2003 - schubi(a)suse.de
+
+- initial
+
New:
----
Net-IP-1.26.tar.gz
ipcount-invalid_chars_in_IP.patch
perl-Net-IP-1.25-zero_address.diff
perl-Net-IP.changes
perl-Net-IP.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Net-IP.spec ++++++
#
# spec file for package perl-Net-IP
#
# Copyright (c) 2015 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Net-IP
Url: http://cpan.org/modules/by-module/Net/
Provides: perl_Net-IP
Obsoletes: perl_Net-IP
Summary: allow easy manipulation of IPv4 and IPv6 addresses
License: Artistic-1.0
Group: Development/Libraries/Perl
Version: 1.26
Release: 0
Source: Net-IP-%{version}.tar.gz
Patch: %{name}-1.25-zero_address.diff
Patch1: ipcount-invalid_chars_in_IP.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
%description
This is the Net::IP module, designed to allow easy manipulation of IPv4
and IPv6 addresses.
Authors:
--------
Manuel Valente
%prep
%setup -n Net-IP-%{version} -q
%patch
%patch1 -p1
%build
perl Makefile.PL
make %{?_smp_mflags}
%check
make test
%install
make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_process_packlist
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc Changes MANIFEST README
/usr/bin/*
%{_mandir}/man3/*
%dir %perl_vendorlib/Net
%perl_vendorlib/Net/IP.pm
%dir %perl_vendorarch/auto/Net
%perl_vendorarch/auto/Net/IP
%changelog
++++++ ipcount-invalid_chars_in_IP.patch ++++++
Index: Net-IP-1.26/ipcount
===================================================================
--- Net-IP-1.26.orig/ipcount 2005-10-18 11:59:52.000000000 +0200
+++ Net-IP-1.26/ipcount 2015-09-16 13:50:21.639082216 +0200
@@ -51,6 +51,7 @@ getopts ('rd:',\%opts);
scalar (@ARGV) < 1 and usage();
my $arg = join '',@ARGV;
$arg =~ s/\s+//g;
+$arg =~ s/\+/ \+ /g;
my $ip = new Net::IP($arg) or die ("Cannot create IP object $arg: ".Error());
@@ -77,7 +78,7 @@ if ($opts{d})
while ($current->bincomp ('lt', $last))
{
- $new_ip->set($current->last_ip.'+'.$size) or die (Error());
+ $new_ip->set($current->last_ip.' + '.$size) or die (Error());
print $new_ip->print,"\n";
if ($opts{r})
@@ -85,7 +86,7 @@ if ($opts{d})
print $new_ip->reverse_ip,"\n";
}
- $current->set($new_ip->last_ip .'+ 1') or die (Error());
+ $current->set($new_ip->last_ip .' + 1') or die (Error());
$count++;
}
++++++ perl-Net-IP-1.25-zero_address.diff ++++++
--- IP.pm
+++ IP.pm
@@ -410,7 +410,7 @@
my $int = ip_bintoint($self->binip());
- if (!$int) {
+ if (ref($int) ne "Math::BigInt") {
$self->{error} = $ERROR;
$self->{errno} = $ERRNO;
return;
1
0
Hello community,
here is the log from the commit of package patchinfo.4032 for openSUSE:13.1:Update checked in at 2015-09-29 10:13:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/patchinfo.4032 (Old)
and /work/SRC/openSUSE:13.1:Update/.patchinfo.4032.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "patchinfo.4032"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
New:
----
_patchinfo
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _patchinfo ++++++
<patchinfo>
<category>recommended</category>
<rating>moderate</rating>
<packager>vitezslav_cizek</packager>
<summary>Recommended update for tftp</summary>
<description>This recommended update for tftp fixes the following issues:
- respond from the destination address taken from the first udp
message's ancillary data (bnc#928283)
* added tftp-multi-addresses.patch
- tftp-hpa-0.48-macros-crash.patch:
prevent buffer overflow in handling of \x macro (bnc#793883)
- tftp-hpa-0.48-macros-v6mapped.patch:
for \i and \x, expand v6-mapped addresses as native IPv4
(bnc#793883)
- patches come from Michal Kubecek
</description>
<issue id="928283" tracker="bnc">tftp fails to send file over secondary IP on an interface</issue>
<issue id="793883" tracker="bnc">tftpd remapping broken with IPv6 enabled</issue>
</patchinfo>
1
0
Hello community,
here is the log from the commit of package tftp.4032 for openSUSE:13.2:Update checked in at 2015-09-29 10:13:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.2:Update/tftp.4032 (Old)
and /work/SRC/openSUSE:13.2:Update/.tftp.4032.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tftp.4032"
Changes:
--------
New Changes file:
--- /dev/null 2015-09-24 09:51:01.260026505 +0200
+++ /work/SRC/openSUSE:13.2:Update/.tftp.4032.new/tftp.changes 2015-09-29 10:13:47.000000000 +0200
@@ -0,0 +1,428 @@
+-------------------------------------------------------------------
+Fri Sep 18 13:23:21 UTC 2015 - vcizek(a)suse.com
+
+- respond from the destination address taken from the first udp
+ message's ancillary data (bnc#928283)
+ * added tftp-multi-addresses.patch
+
+-------------------------------------------------------------------
+Fri Sep 18 13:22:12 UTC 2015 - vcizek(a)suse.com
+
+- tftp-hpa-0.48-macros-crash.patch:
+ prevent buffer overflow in handling of \x macro (bnc#793883)
+- tftp-hpa-0.48-macros-v6mapped.patch:
+ for \i and \x, expand v6-mapped addresses as native IPv4
+ (bnc#793883)
+- patches come from Michal Kubecek
+
+-------------------------------------------------------------------
+Tue Mar 25 23:35:16 UTC 2014 - crrodriguez(a)opensuse.org
+
+- drop tftp-hpa-0.43_old-autoconf.diff not needed for any
+ product still in active maintenance.
+- Use correct systemd macros in %pre, %post..
+- config.h must be included *everywhere* (tftp-config_h.patch)
+- tftp.service:
+ * This service needs to be started after network.target
+ * Use PrivateDevices=yes
+
+-------------------------------------------------------------------
+Thu Apr 18 09:57:36 UTC 2013 - vcizek(a)suse.com
+
+- change ownership of /srv/tftpboot to tftp:tftp, otherwise tftp
+ daemon can't write there (bnc#813226)
+
+-------------------------------------------------------------------
+Thu Feb 7 13:07:03 UTC 2013 - vcizek(a)suse.com
+
+- create capabilites provided by both tftp and atftp
+ (bnc#801481 or bnc#725378)
+
+-------------------------------------------------------------------
+Wed Dec 5 19:54:20 UTC 2012 - dimstar(a)opensuse.org
+
+- Add systemd socket activation units.
+- Change inet-daemon to be recommended only, as we can now also
+ activate by means of systemd sockets.
+
+-------------------------------------------------------------------
+Tue Sep 4 13:09:09 UTC 2012 - vcizek(a)suse.com
+
+- update to 5.2
+ - fixes a breakage with recent Linux kernel versions when a
+ single interface has multiple IP addresses (bnc#774861)
+
+-------------------------------------------------------------------
+Tue Dec 20 20:30:25 UTC 2011 - coolo(a)suse.com
+
+- add autoconf as buildrequire to avoid implicit dependency
+
+-------------------------------------------------------------------
+Fri Nov 11 14:51:55 UTC 2011 - vcizek(a)suse.com
+
+- added rules for SuSEfirewall2 (bnc#729793)
+ thanks to Lukas Ocilka
+
+-------------------------------------------------------------------
+Tue Sep 6 13:01:31 UTC 2011 - vcizek(a)suse.com
+
+- added missing PreReq: pwdutils
+
+-------------------------------------------------------------------
+Fri Jun 24 07:09:50 UTC 2011 - puzel(a)novell.com
+
+- unbreak tftp by changing to user to run as in tftpd itself,
+ not via xinetd (bnc#682340)
+
+-------------------------------------------------------------------
+Thu Jun 23 12:17:37 UTC 2011 - puzel(a)novell.com
+
+- update to version-5.1
+ - Add -P option to write a PID file. Patch by Ferenc Wagner.
+ - Bounce the syslog socket in standalone mode, in case the
+ syslog daemon has been restarted. Patch by Ferenc Wagner.
+ - Build fixes.
+ - Fix handling of block number wraparound after a successful
+ options negotiation.
+ - Fix a buffer overflow in option parsing.
+- fixes bnc#699714, CVE-2011-2199
+
+-------------------------------------------------------------------
+Sat Dec 11 00:00:00 UTC 2010 - chris(a)computersalat.de
+
+- fix spec
+ o added missing path /srv/tftpboot in files section
+
+-------------------------------------------------------------------
+Fri Dec 3 13:51:50 UTC 2010 - puzel(a)novell.com
+
+- update to version 5.0
+ * Try to on platforms with getaddrinfo() without AI_ADDRCONFIG or
+ AI_CANONNAME.
+ * Implement the "rollover" option, for clients which want block
+ number to rollover to anything other than zero.
+ * Correctly disable PMTU in standalone mode.
+ * Add IPv6 support. Patch by Karsten Keil.
+ * Support systems with editline instead of readline.
+ * Support long options in the server.
+- drop tftp-hpa-0.43_readline.diff (not needed)
+- drop tftp-hpa-0.46_libedit.patch (solved in upstream)
+- build with readline support
+- clean up specfile
+
+-------------------------------------------------------------------
+Fri Oct 29 23:33:18 UTC 2010 - chris(a)computersalat.de
+
+- fix pre
+ o no check before addding group/user (darix)
+- fix files
+ o provide /srv/tftpboot
+
+-------------------------------------------------------------------
+Wed Oct 13 21:05:23 UTC 2010 - chris(a)computersalat.de
+
+- add group/user tftp (bnc#472283)
+- set TFTP default DIR to /srv/tftpboot (bnc#248008,507011)
+- added Conflicts atftp, cause of overlapping binaries
+
+-------------------------------------------------------------------
+Fri Oct 1 12:07:50 UTC 2010 - puzel(a)novell.com
+
+- add tftp-hpa-0.48-tzfix.patch (bnc#630297)
+
+-------------------------------------------------------------------
+Tue Jun 29 08:57:01 UTC 2010 - puzel(a)novell.com
+
+- add tftp-hpa-0.49-fortify-strcpy-crash.patch (bnc#617675)
+
+-------------------------------------------------------------------
+Mon Sep 1 14:45:15 CEST 2008 - mrueckert(a)suse.de
+
+- drop lineedit support again
+- fix build to include %{optflags} with using configure
+
+-------------------------------------------------------------------
+Wed Aug 27 16:20:32 CEST 2008 - olh(a)suse.de
+
+- do not require autoconf 2.61
+ binutils-devel is not available in 11.0 or earlier
+
+-------------------------------------------------------------------
+Wed Aug 6 16:04:07 CEST 2008 - kkeil(a)suse.de
+
+- Update to current git version with enhanced IPv6 support included
+
+-------------------------------------------------------------------
+Fri Jul 18 17:56:28 CEST 2008 - kkeil(a)suse.de
+
+- Update to git version 0.48 for mainline compatibility; code is
+ still the same but formatting was cleaned up
+- Implement IPv6 (fate #304343)
+
+-------------------------------------------------------------------
+Thu Feb 1 21:05:23 CET 2007 - mrueckert(a)suse.de
+
+- update to version 0.48:
+ - Unbreak -l -s in the server, which was broken in 0.47.
+- additional changes from 0.47:
+ - Add -L option to the server to run standalone without
+ detaching from the shell.
+ - Parallel make fix.
+
+-------------------------------------------------------------------
+Tue Jan 9 11:37:58 CET 2007 - mrueckert(a)suse.de
+
+- update to version 0.46:
+ - Minor portability improvements.
+- additional change from 0.45:
+ Add -l (literal) option to the client, to override the special
+ treatment of the colon (:) character as a hostname separator.
+- replaced tftp-hpa-0.43_syntax.diff with tftp-hpa-0.46_colon_check.patch:
+ restore a behavior which was broken with 0.35
+- merged tftp-hpa-0.43_signdness.patch with
+ tftp-hpa-0.43_bcopy_secfix.patch. new patch:
+ tftp-hpa-0.46_bcopy_secfix.patch.
+- added tftp-hpa-0.46_libedit.patch:
+ Build against libedit to enable lineediting support.
+
+-------------------------------------------------------------------
+Thu Dec 7 04:09:55 CET 2006 - mrueckert(a)suse.de
+
+- update to version 0.44:
+ - Allow the client to specify a range of local port numbers, just
+ like the server can.
+ - Fix sending SIGHUP to update the regular expression table.
+
+-------------------------------------------------------------------
+Fri Oct 20 19:04:32 CEST 2006 - mrueckert(a)suse.de
++++ 231 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.2:Update/.tftp.4032.new/tftp.changes
New:
----
tftp-config_h.patch
tftp-hpa-0.43_include_sys_params.patch
tftp-hpa-0.46_colon_check.patch
tftp-hpa-0.48-macros-crash.patch
tftp-hpa-0.48-macros-v6mapped.patch
tftp-hpa-0.48-tzfix.patch
tftp-hpa-0.49-fortify-strcpy-crash.patch
tftp-hpa-5.2.tar.bz2
tftp-multi-addresses.patch
tftp.changes
tftp.fw
tftp.service
tftp.socket
tftp.spec
tftp.xinetd
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tftp.spec ++++++
#
# spec file for package tftp
#
# Copyright (c) 2015 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
Name: tftp
Version: 5.2
Release: 0
Summary: Trivial File Transfer Protocol (TFTP)
License: BSD-3-Clause
Group: Productivity/Networking/Ftp/Clients
Url: http://www.kernel.org/pub/software/network/tftp/
Source: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2
Source1: tftp.xinetd
Source2: tftp.fw
Source3: tftp.service
Source4: tftp.socket
Patch0: tftp-hpa-0.43_include_sys_params.patch
Patch1: tftp-hpa-0.46_colon_check.patch
Patch4: tftp-hpa-0.49-fortify-strcpy-crash.patch
Patch5: tftp-hpa-0.48-tzfix.patch
Patch43: tftp-config_h.patch
Patch6: tftp-multi-addresses.patch
Patch7: tftp-hpa-0.48-macros-crash.patch
Patch8: tftp-hpa-0.48-macros-v6mapped.patch
Provides: tftp(client)
Provides: tftp(server)
PreReq: pwdutils
BuildRequires: autoconf
BuildRequires: pwdutils
BuildRequires: tcpd-devel
BuildRequires: pkgconfig(systemd)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
BuildRequires: binutils-devel
%endif
Recommends: inet-daemon
Requires: netcfg
Conflicts: atftp
%{?systemd_requires}
%description
The Trivial File Transfer Protocol (TFTP) is normally used only for
booting diskless workstations and for getting or saving network
component configuration files.
%prep
%setup -n %{name}-hpa-%{version}
%patch0
%patch1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7
%patch8
%if 0%{?suse_version} < 1030
%patch42
%endif
%patch43 -p1
%build
autoreconf -fi
%configure \
--enable-largefile \
--with-tcpwrappers \
--with-remap \
--with-ipv6
make
%install
%makeinstall INSTALLROOT=%{buildroot} MANDIR="%{_mandir}"
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/xinetd.d/tftp
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/%{_fwdefdir}/tftp
install -d -m 0750 %{buildroot}/srv/tftpboot
# Install systemd unit / socket (As an alternativ to xinetd activation)
install -d %{buildroot}%{_unitdir}
install -m 0644 %{S:3} %{S:4} %{buildroot}%{_unitdir}
%pre
# This group/user is shared with atftp, so please
# keep this in sync with atftp.spec
# add group
%{_sbindir}/groupadd -r tftp 2>/dev/null || :
# add user
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
-r -s /bin/false tftp 2>/dev/null || :
%service_add_pre %{name}.service %{name}.socket
%post
%service_add_post %{name}.service %{name}.socket
%preun
%service_del_preun %{name}.service %{name}.socket
%postun
%service_del_postun %{name}.service %{name}.socket
%clean
rm -rf %{buildroot};
%files
%defattr(-,root,root)
%doc README README.security tftpd/sample.rules
%{_bindir}/tftp
%{_sbindir}/in.tftpd
%{_mandir}/man1/tftp.1.gz
%{_mandir}/man8/in.tftpd.8.gz
%{_mandir}/man8/tftpd.8.gz
%{_unitdir}/tftp.service
%{_unitdir}/tftp.socket
%config(noreplace) %{_sysconfdir}/xinetd.d/tftp
%config %{_fwdefdir}/tftp
%dir %attr(0750,tftp,tftp) /srv/tftpboot
%changelog
++++++ tftp-config_h.patch ++++++
--- tftp-hpa-5.2.orig/MCONFIG.in
+++ tftp-hpa-5.2/MCONFIG.in
@@ -51,7 +51,7 @@ INSTALL_DATA = @INSTALL_DATA@
# Compiler and compiler flags
CC = @CC@
-CFLAGS = @CFLAGS@ -I$(SRCROOT)
+CFLAGS = @CFLAGS@ -I$(SRCROOT) -include config.h
# Link flags
LDFLAGS = @LDFLAGS@
--- tftp-hpa-5.2.orig/tftp/Makefile
+++ tftp-hpa-5.2/tftp/Makefile
@@ -9,7 +9,7 @@ OBJS = tftp.$(O) main.$(O)
all: tftp$(X) tftp.1
tftp$(X): $(OBJS)
- $(CC) $(LDFLAGS) $^ $(TFTP_LIBS) -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(TFTP_LIBS) -o $@
$(OBJS): ../common/tftpsubs.h
--- tftp-hpa-5.2.orig/tftpd/Makefile
+++ tftp-hpa-5.2/tftpd/Makefile
@@ -9,7 +9,7 @@ OBJS = tftpd.$(O) recvfrom.$(O) misc.$(O
all: tftpd$(X) tftpd.8
tftpd$(X): $(OBJS)
- $(CC) $(LDFLAGS) $^ $(TFTPD_LIBS) -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(TFTPD_LIBS) -o $@
$(OBJS): ../common/tftpsubs.h
++++++ tftp-hpa-0.43_include_sys_params.patch ++++++
Index: tftp/main.c
===================================================================
--- tftp/main.c.orig
+++ tftp/main.c
@@ -39,6 +39,7 @@
* TFTP User Program -- Command Interface.
*/
#include <sys/file.h>
+#include <sys/param.h>
#include <ctype.h>
#ifdef WITH_READLINE
#include <readline/readline.h>
++++++ tftp-hpa-0.46_colon_check.patch ++++++
Index: tftp/main.c
===================================================================
--- tftp/main.c.orig
+++ tftp/main.c
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
bsd_signal(SIGINT, intr);
- if (peerargc) {
+ if (peerargc > 1) {
/* Set peer */
if (sigsetjmp(toplevel, 1) != 0)
exit(EX_NOHOST);
@@ -634,11 +634,14 @@ void get(int argc, char *argv[])
return;
}
if (!connected) {
- for (n = 1; n < argc; n++)
+ for (n = 1; n < argc; n++) {
if (literal || strchr(argv[n], ':') == 0) {
getusage(argv[0]);
return;
}
+ if (argc == 3)
+ break;
+ }
}
for (n = 1; n < argc; n++) {
src = strchr(argv[n], ':');
++++++ tftp-hpa-0.48-macros-crash.patch ++++++
diff -up tftpd/tftpd.c.orig-len tftpd/tftpd.c
--- tftpd/tftpd.c.orig-len 2012-12-11 16:31:29.658043427 +0100
+++ tftpd/tftpd.c 2012-12-11 16:32:22.234018253 +0100
@@ -1287,24 +1287,24 @@ static int rewrite_macros(char macro, ch
return strlen(p);
case 'x':
- if (output) {
- if (from.sa.sa_family == AF_INET) {
+ if (from.sa.sa_family == AF_INET) {
+ if (output)
sprintf(output, "%08lX",
(unsigned long)ntohl(from.si.sin_addr.s_addr));
- l = 8;
+ l = 8;
#ifdef HAVE_IPV6
- } else {
- unsigned char *c = (unsigned char *)SOCKADDR_P(&from);
- p = tb;
- for (l = 0; l < 16; l++) {
- sprintf(p, "%02X", *c);
- c++;
- p += 2;
- }
+ } else {
+ unsigned char *c = (unsigned char *)SOCKADDR_P(&from);
+ p = tb;
+ for (l = 0; l < 16; l++) {
+ sprintf(p, "%02X", *c);
+ c++;
+ p += 2;
+ }
+ if (output)
strcpy(output, tb);
- l = strlen(tb);
+ l = strlen(tb);
#endif
- }
}
return l;
++++++ tftp-hpa-0.48-macros-v6mapped.patch ++++++
diff -up tftpd/tftpd.c.orig-v6map tftpd/tftpd.c
--- tftpd/tftpd.c.orig-v6map 2012-12-11 17:06:53.156624476 +0100
+++ tftpd/tftpd.c 2012-12-11 17:13:08.705298341 +0100
@@ -1263,6 +1263,21 @@ static void do_opt(const char *opt, cons
#ifdef WITH_REGEX
+#ifdef HAVE_IPV6
+static inline int is_v6_mapped(const union sock_addr* pa)
+{
+ const char v6_mapped[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xFF, 0xFF };
+
+ if (from.sa.sa_family != AF_INET6)
+ return 0;
+ if (memcmp(&pa->s6.sin6_addr.s6_addr, v6_mapped, sizeof(v6_mapped)))
+ return 0;
+
+ return 1;
+}
+#endif
+
/*
* This is called by the remap engine when it encounters macros such
* as \i. It should write the output in "output" if non-NULL, and
@@ -1274,10 +1289,20 @@ static int rewrite_macros(char macro, ch
{
char *p, tb[INET6_ADDRSTRLEN];
int l=0;
+ const union sock_addr *pfrom = &from;
+
+#ifdef HAVE_IPV6
+ union sock_addr ipv4_from;
+ if (is_v6_mapped(&from)) {
+ ipv4_from.si.sin_family = AF_INET;
+ memcpy(&ipv4_from.si.sin_addr, from.s6.sin6_addr.s6_addr + 12, 4);
+ pfrom = &ipv4_from;
+ }
+#endif
switch (macro) {
case 'i':
- p = (char *)inet_ntop(from.sa.sa_family, SOCKADDR_P(&from),
+ p = (char *)inet_ntop(pfrom->sa.sa_family, SOCKADDR_P(pfrom),
tb, INET6_ADDRSTRLEN);
if (output && p)
strcpy(output, p);
@@ -1287,14 +1312,14 @@ static int rewrite_macros(char macro, ch
return strlen(p);
case 'x':
- if (from.sa.sa_family == AF_INET) {
+ if (pfrom->sa.sa_family == AF_INET) {
if (output)
sprintf(output, "%08lX",
- (unsigned long)ntohl(from.si.sin_addr.s_addr));
+ (unsigned long)ntohl(pfrom->si.sin_addr.s_addr));
l = 8;
#ifdef HAVE_IPV6
} else {
- unsigned char *c = (unsigned char *)SOCKADDR_P(&from);
+ unsigned char *c = (unsigned char *)SOCKADDR_P(pfrom);
p = tb;
for (l = 0; l < 16; l++) {
sprintf(p, "%02X", *c);
++++++ tftp-hpa-0.48-tzfix.patch ++++++
Index: tftp-hpa-5.1/tftpd/tftpd.c
===================================================================
--- tftp-hpa-5.1.orig/tftpd/tftpd.c
+++ tftp-hpa-5.1/tftpd/tftpd.c
@@ -384,6 +384,14 @@ int main(int argc, char **argv)
const char *pidfile = NULL;
u_short tp_opcode;
+ time_t my_time = 0;
+ struct tm* p_tm;
+ char envtz[10];
+ my_time = time(NULL);
+ p_tm = localtime(&my_time);
+ snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600);
+ setenv("TZ", envtz, 0);
+
/* basename() is way too much of a pain from a portability standpoint */
p = strrchr(argv[0], '/');
++++++ tftp-hpa-0.49-fortify-strcpy-crash.patch ++++++
Index: tftp-hpa-git-0.48/tftp/tftp.c
===================================================================
--- tftp-hpa-git-0.48.orig/tftp/tftp.c 2008-07-31 12:46:57.000000000 +0200
+++ tftp-hpa-git-0.48/tftp/tftp.c 2010-06-29 12:14:48.000000000 +0200
@@ -279,15 +279,16 @@ makerequest(int request, const char *nam
struct tftphdr *tp, const char *mode)
{
char *cp;
+ size_t len;
tp->th_opcode = htons((u_short) request);
cp = (char *)&(tp->th_stuff);
- strcpy(cp, name);
- cp += strlen(name);
- *cp++ = '\0';
- strcpy(cp, mode);
- cp += strlen(mode);
- *cp++ = '\0';
+ len = strlen(name) + 1;
+ memcpy(cp, name, len);
+ cp += len;
+ len = strlen(mode) + 1;
+ memcpy(cp, mode, len);
+ cp += len;
return (cp - (char *)tp);
}
++++++ tftp-multi-addresses.patch ++++++
Index: tftp-hpa-5.2/tftpd/recvfrom.c
===================================================================
--- tftp-hpa-5.2.orig/tftpd/recvfrom.c 2015-04-30 11:04:45.994568260 +0200
+++ tftp-hpa-5.2/tftpd/recvfrom.c 2015-05-14 16:02:28.104576816 +0200
@@ -148,17 +148,17 @@ myrecvfrom(int s, void *buf, int len, un
#endif
/* Try to enable getting the return address */
+ /* Before the first packet we don't know the address family of the
+ * connection, so we set both ipv4 and ipv6 socket options
+ */
#ifdef IP_RECVDSTADDR
- if (from->sa_family == AF_INET)
setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on));
#endif
#ifdef IP_PKTINFO
- if (from->sa_family == AF_INET)
setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
#endif
#ifdef HAVE_IPV6
#ifdef IPV6_RECVPKTINFO
- if (from->sa_family == AF_INET6)
setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on));
#endif
#endif
@@ -190,7 +190,7 @@ myrecvfrom(int s, void *buf, int len, un
for (cmptr = CMSG_FIRSTHDR(&msg); cmptr != NULL;
cmptr = CMSG_NXTHDR(&msg, cmptr)) {
- if (from->sa_family == AF_INET) {
+ if (cmptr->cmsg_level == IPPROTO_IP) {
myaddr->sa.sa_family = AF_INET;
#ifdef IP_RECVDSTADDR
if (cmptr->cmsg_level == IPPROTO_IP &&
@@ -209,15 +209,26 @@ myrecvfrom(int s, void *buf, int len, un
sizeof(struct in_addr));
}
#endif
+ if (from->sa_family == AF_INET6) {
+ from->sa_family = AF_INET;
+ /* Unmap the ipv4 address from ipv6.
+ * The ipv6 mapped address is in format:
+ * 10 0x0 bytes, 2 0xff bytes, 4 bytes of the ipv4 address
+ * so we cut out the first 12 bytes of the ipv6 and
+ * interpret the rest as the ipv4
+ */
+ ((struct sockaddr_in *)from)->sin_addr = *((struct in_addr *)(((struct sockaddr_in6 *)from)->sin6_addr.s6_addr+12));
+ }
}
#ifdef HAVE_IPV6
- else if (from->sa_family == AF_INET6) {
+ else if (cmptr->cmsg_level == IPPROTO_IPV6) {
myaddr->sa.sa_family = AF_INET6;
#ifdef IP6_RECVDSTADDR
if (cmptr->cmsg_level == IPPROTO_IPV6 &&
- cmptr->cmsg_type == IPV6_RECVDSTADDR )
+ cmptr->cmsg_type == IPV6_RECVDSTADDR ) {
memcpy(&myaddr->s6.sin6_addr, CMSG_DATA(cmptr),
sizeof(struct in6_addr));
+ }
#endif
#ifdef HAVE_STRUCT_IN6_PKTINFO
++++++ tftp.fw ++++++
## Name: TFTP Server
## Description: Opens ports for tftp service.
# space separated list of allowed UDP ports
UDP="tftp"
++++++ tftp.service ++++++
[Unit]
Description=Tftp Server
Wants=network.target
After=network.target
[Service]
ExecStart=/usr/sbin/in.tftpd -u tftp -s /srv/tftpboot
StandardInput=socket
PrivateDevices=yes
++++++ tftp.socket ++++++
[Unit]
Description=Tftp Server Activation Socket
[Socket]
ListenDatagram=69
[Install]
WantedBy=sockets.target
++++++ tftp.xinetd ++++++
# default: off
# description: tftp service is provided primarily for booting or when a \
# router need an upgrade. Most sites run this only on machines acting as \
# "boot servers".
# The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
flags = IPv6 IPv4
user = root
server = /usr/sbin/in.tftpd
server_args = -u tftp -s /srv/tftpboot
# per_source = 11
# cps = 100 2
disable = yes
}
1
0
Hello community,
here is the log from the commit of package tftp.4032 for openSUSE:13.1:Update checked in at 2015-09-29 10:13:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/tftp.4032 (Old)
and /work/SRC/openSUSE:13.1:Update/.tftp.4032.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tftp.4032"
Changes:
--------
New Changes file:
--- /dev/null 2015-09-24 09:51:01.260026505 +0200
+++ /work/SRC/openSUSE:13.1:Update/.tftp.4032.new/tftp.changes 2015-09-29 10:13:40.000000000 +0200
@@ -0,0 +1,417 @@
+-------------------------------------------------------------------
+Fri Sep 18 13:23:21 UTC 2015 - vcizek(a)suse.com
+
+- respond from the destination address taken from the first udp
+ message's ancillary data (bnc#928283)
+ * added tftp-multi-addresses.patch
+
+-------------------------------------------------------------------
+Fri Sep 18 13:22:12 UTC 2015 - vcizek(a)suse.com
+
+- tftp-hpa-0.48-macros-crash.patch:
+ prevent buffer overflow in handling of \x macro (bnc#793883)
+- tftp-hpa-0.48-macros-v6mapped.patch:
+ for \i and \x, expand v6-mapped addresses as native IPv4
+ (bnc#793883)
+- patches come from Michal Kubecek
+
+-------------------------------------------------------------------
+Thu Apr 18 09:57:36 UTC 2013 - vcizek(a)suse.com
+
+- change ownership of /srv/tftpboot to tftp:tftp, otherwise tftp
+ daemon can't write there (bnc#813226)
+
+-------------------------------------------------------------------
+Thu Feb 7 13:07:03 UTC 2013 - vcizek(a)suse.com
+
+- create capabilites provided by both tftp and atftp
+ (bnc#801481 or bnc#725378)
+
+-------------------------------------------------------------------
+Wed Dec 5 19:54:20 UTC 2012 - dimstar(a)opensuse.org
+
+- Add systemd socket activation units.
+- Change inet-daemon to be recommended only, as we can now also
+ activate by means of systemd sockets.
+
+-------------------------------------------------------------------
+Tue Sep 4 13:09:09 UTC 2012 - vcizek(a)suse.com
+
+- update to 5.2
+ - fixes a breakage with recent Linux kernel versions when a
+ single interface has multiple IP addresses (bnc#774861)
+
+-------------------------------------------------------------------
+Tue Dec 20 20:30:25 UTC 2011 - coolo(a)suse.com
+
+- add autoconf as buildrequire to avoid implicit dependency
+
+-------------------------------------------------------------------
+Fri Nov 11 14:51:55 UTC 2011 - vcizek(a)suse.com
+
+- added rules for SuSEfirewall2 (bnc#729793)
+ thanks to Lukas Ocilka
+
+-------------------------------------------------------------------
+Tue Sep 6 13:01:31 UTC 2011 - vcizek(a)suse.com
+
+- added missing PreReq: pwdutils
+
+-------------------------------------------------------------------
+Fri Jun 24 07:09:50 UTC 2011 - puzel(a)novell.com
+
+- unbreak tftp by changing to user to run as in tftpd itself,
+ not via xinetd (bnc#682340)
+
+-------------------------------------------------------------------
+Thu Jun 23 12:17:37 UTC 2011 - puzel(a)novell.com
+
+- update to version-5.1
+ - Add -P option to write a PID file. Patch by Ferenc Wagner.
+ - Bounce the syslog socket in standalone mode, in case the
+ syslog daemon has been restarted. Patch by Ferenc Wagner.
+ - Build fixes.
+ - Fix handling of block number wraparound after a successful
+ options negotiation.
+ - Fix a buffer overflow in option parsing.
+- fixes bnc#699714, CVE-2011-2199
+
+-------------------------------------------------------------------
+Sat Dec 11 00:00:00 UTC 2010 - chris(a)computersalat.de
+
+- fix spec
+ o added missing path /srv/tftpboot in files section
+
+-------------------------------------------------------------------
+Fri Dec 3 13:51:50 UTC 2010 - puzel(a)novell.com
+
+- update to version 5.0
+ * Try to on platforms with getaddrinfo() without AI_ADDRCONFIG or
+ AI_CANONNAME.
+ * Implement the "rollover" option, for clients which want block
+ number to rollover to anything other than zero.
+ * Correctly disable PMTU in standalone mode.
+ * Add IPv6 support. Patch by Karsten Keil.
+ * Support systems with editline instead of readline.
+ * Support long options in the server.
+- drop tftp-hpa-0.43_readline.diff (not needed)
+- drop tftp-hpa-0.46_libedit.patch (solved in upstream)
+- build with readline support
+- clean up specfile
+
+-------------------------------------------------------------------
+Fri Oct 29 23:33:18 UTC 2010 - chris(a)computersalat.de
+
+- fix pre
+ o no check before addding group/user (darix)
+- fix files
+ o provide /srv/tftpboot
+
+-------------------------------------------------------------------
+Wed Oct 13 21:05:23 UTC 2010 - chris(a)computersalat.de
+
+- add group/user tftp (bnc#472283)
+- set TFTP default DIR to /srv/tftpboot (bnc#248008,507011)
+- added Conflicts atftp, cause of overlapping binaries
+
+-------------------------------------------------------------------
+Fri Oct 1 12:07:50 UTC 2010 - puzel(a)novell.com
+
+- add tftp-hpa-0.48-tzfix.patch (bnc#630297)
+
+-------------------------------------------------------------------
+Tue Jun 29 08:57:01 UTC 2010 - puzel(a)novell.com
+
+- add tftp-hpa-0.49-fortify-strcpy-crash.patch (bnc#617675)
+
+-------------------------------------------------------------------
+Mon Sep 1 14:45:15 CEST 2008 - mrueckert(a)suse.de
+
+- drop lineedit support again
+- fix build to include %{optflags} with using configure
+
+-------------------------------------------------------------------
+Wed Aug 27 16:20:32 CEST 2008 - olh(a)suse.de
+
+- do not require autoconf 2.61
+ binutils-devel is not available in 11.0 or earlier
+
+-------------------------------------------------------------------
+Wed Aug 6 16:04:07 CEST 2008 - kkeil(a)suse.de
+
+- Update to current git version with enhanced IPv6 support included
+
+-------------------------------------------------------------------
+Fri Jul 18 17:56:28 CEST 2008 - kkeil(a)suse.de
+
+- Update to git version 0.48 for mainline compatibility; code is
+ still the same but formatting was cleaned up
+- Implement IPv6 (fate #304343)
+
+-------------------------------------------------------------------
+Thu Feb 1 21:05:23 CET 2007 - mrueckert(a)suse.de
+
+- update to version 0.48:
+ - Unbreak -l -s in the server, which was broken in 0.47.
+- additional changes from 0.47:
+ - Add -L option to the server to run standalone without
+ detaching from the shell.
+ - Parallel make fix.
+
+-------------------------------------------------------------------
+Tue Jan 9 11:37:58 CET 2007 - mrueckert(a)suse.de
+
+- update to version 0.46:
+ - Minor portability improvements.
+- additional change from 0.45:
+ Add -l (literal) option to the client, to override the special
+ treatment of the colon (:) character as a hostname separator.
+- replaced tftp-hpa-0.43_syntax.diff with tftp-hpa-0.46_colon_check.patch:
+ restore a behavior which was broken with 0.35
+- merged tftp-hpa-0.43_signdness.patch with
+ tftp-hpa-0.43_bcopy_secfix.patch. new patch:
+ tftp-hpa-0.46_bcopy_secfix.patch.
+- added tftp-hpa-0.46_libedit.patch:
+ Build against libedit to enable lineediting support.
+
+-------------------------------------------------------------------
+Thu Dec 7 04:09:55 CET 2006 - mrueckert(a)suse.de
+
+- update to version 0.44:
+ - Allow the client to specify a range of local port numbers, just
+ like the server can.
+ - Fix sending SIGHUP to update the regular expression table.
+
+-------------------------------------------------------------------
+Fri Oct 20 19:04:32 CEST 2006 - mrueckert(a)suse.de
+
+- update to version 0.43:
+ - Fix double-free error on ^c in client.
+ - Try to deal with clients that send TFTP requests to broadcasts
+ (apparently some recent Sun boxes do this instead of using the
+ address told by DHCP. Bad Sun! Bad Sun!)
+ - Portability fixes.
+- removed first chunk from tftp-hpa-0.40.diff and renamed it to
+ tftp-hpa-0.43_include_sys_params.patch. the first chunk was
+ fixed upstream.
+- patches rediffed and renamed:
++++ 220 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.1:Update/.tftp.4032.new/tftp.changes
New:
----
tftp-hpa-0.43_include_sys_params.patch
tftp-hpa-0.43_old-autoconf.diff
tftp-hpa-0.46_colon_check.patch
tftp-hpa-0.48-macros-crash.patch
tftp-hpa-0.48-macros-v6mapped.patch
tftp-hpa-0.48-tzfix.patch
tftp-hpa-0.49-fortify-strcpy-crash.patch
tftp-hpa-5.2.tar.bz2
tftp-multi-addresses.patch
tftp.changes
tftp.fw
tftp.service
tftp.socket
tftp.spec
tftp.xinetd
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tftp.spec ++++++
#
# spec file for package tftp
#
# Copyright (c) 2015 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
%if 0%{?suse_version} >= 1230
%define _systemddir /usr/lib/systemd/
%else
%define _systemddir /lib/systemd/
%endif
%define _unitdir %{_systemddir}/system
Name: tftp
Version: 5.2
Release: 0
Summary: Trivial File Transfer Protocol (TFTP)
License: BSD-3-Clause
Group: Productivity/Networking/Ftp/Clients
Url: http://www.kernel.org/pub/software/network/tftp/
Source: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2
Source1: tftp.xinetd
Source2: tftp.fw
Source3: tftp.service
Source4: tftp.socket
Patch0: tftp-hpa-0.43_include_sys_params.patch
Patch1: tftp-hpa-0.46_colon_check.patch
Patch4: tftp-hpa-0.49-fortify-strcpy-crash.patch
Patch5: tftp-hpa-0.48-tzfix.patch
Patch42: tftp-hpa-0.43_old-autoconf.diff
Patch6: tftp-multi-addresses.patch
Patch7: tftp-hpa-0.48-macros-crash.patch
Patch8: tftp-hpa-0.48-macros-v6mapped.patch
Provides: tftp(client)
Provides: tftp(server)
PreReq: pwdutils
BuildRequires: autoconf
BuildRequires: pwdutils
BuildRequires: tcpd-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
BuildRequires: binutils-devel
%endif
Recommends: inet-daemon
Requires: netcfg
Conflicts: atftp
%description
The Trivial File Transfer Protocol (TFTP) is normally used only for
booting diskless workstations and for getting or saving network
component configuration files.
%prep
%setup -n %{name}-hpa-%{version}
%patch0
%patch1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7
%patch8
%if 0%{?suse_version} < 1030
%patch42
%endif
%build
autoreconf -fi
%configure \
--enable-largefile \
--with-tcpwrappers \
--with-remap \
--without-editline \
--with-ipv6
make
%install
%makeinstall INSTALLROOT=%{buildroot} MANDIR="%{_mandir}"
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/xinetd.d/tftp
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/%{_fwdefdir}/tftp
install -d -m 0750 %{buildroot}/srv/tftpboot
# Install systemd unit / socket (As an alternativ to xinetd activation)
install -d %{buildroot}%{_unitdir}
install -m 0644 %{S:3} %{S:4} %{buildroot}%{_unitdir}
%pre
# This group/user is shared with atftp, so please
# keep this in sync with atftp.spec
# add group
%{_sbindir}/groupadd -r tftp 2>/dev/null || :
# add user
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
-r -s /bin/false tftp 2>/dev/null || :
%clean
rm -rf %{buildroot};
%files
%defattr(-,root,root)
%doc README README.security tftpd/sample.rules
%{_bindir}/tftp
%{_sbindir}/in.tftpd
%{_mandir}/man1/tftp.1.gz
%{_mandir}/man8/in.tftpd.8.gz
%{_mandir}/man8/tftpd.8.gz
%dir %{_systemddir}
%dir %{_unitdir}
%{_unitdir}/tftp.service
%{_unitdir}/tftp.socket
%config(noreplace) %{_sysconfdir}/xinetd.d/tftp
%config %{_fwdefdir}/tftp
%dir %attr(0750,tftp,tftp) /srv/tftpboot
%changelog
++++++ tftp-hpa-0.43_include_sys_params.patch ++++++
Index: tftp/main.c
===================================================================
--- tftp/main.c.orig
+++ tftp/main.c
@@ -39,6 +39,7 @@
* TFTP User Program -- Command Interface.
*/
#include <sys/file.h>
+#include <sys/param.h>
#include <ctype.h>
#ifdef WITH_READLINE
#include <readline/readline.h>
++++++ tftp-hpa-0.43_old-autoconf.diff ++++++
openSuSE 10.3 shipped with autoconf 2.61
openSuSE 10.1 shipped with autoconf 2.60
openSuSE 9.1 shipped with autoconf 2.59
---
configure.in | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- configure.in.orig
+++ configure.in
@@ -2,11 +2,10 @@ dnl
dnl autoconf input file to generate MCONFIG
dnl
-AC_PREREQ(2.61)
+AC_PREREQ(2.42)
AC_INIT(MCONFIG.in)
AC_PREFIX_DEFAULT(/usr)
-AC_USE_SYSTEM_EXTENSIONS
AC_ISC_POSIX
AC_PROG_CC
++++++ tftp-hpa-0.46_colon_check.patch ++++++
Index: tftp/main.c
===================================================================
--- tftp/main.c.orig
+++ tftp/main.c
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
bsd_signal(SIGINT, intr);
- if (peerargc) {
+ if (peerargc > 1) {
/* Set peer */
if (sigsetjmp(toplevel, 1) != 0)
exit(EX_NOHOST);
@@ -634,11 +634,14 @@ void get(int argc, char *argv[])
return;
}
if (!connected) {
- for (n = 1; n < argc; n++)
+ for (n = 1; n < argc; n++) {
if (literal || strchr(argv[n], ':') == 0) {
getusage(argv[0]);
return;
}
+ if (argc == 3)
+ break;
+ }
}
for (n = 1; n < argc; n++) {
src = strchr(argv[n], ':');
++++++ tftp-hpa-0.48-macros-crash.patch ++++++
diff -up tftpd/tftpd.c.orig-len tftpd/tftpd.c
--- tftpd/tftpd.c.orig-len 2012-12-11 16:31:29.658043427 +0100
+++ tftpd/tftpd.c 2012-12-11 16:32:22.234018253 +0100
@@ -1287,24 +1287,24 @@ static int rewrite_macros(char macro, ch
return strlen(p);
case 'x':
- if (output) {
- if (from.sa.sa_family == AF_INET) {
+ if (from.sa.sa_family == AF_INET) {
+ if (output)
sprintf(output, "%08lX",
(unsigned long)ntohl(from.si.sin_addr.s_addr));
- l = 8;
+ l = 8;
#ifdef HAVE_IPV6
- } else {
- unsigned char *c = (unsigned char *)SOCKADDR_P(&from);
- p = tb;
- for (l = 0; l < 16; l++) {
- sprintf(p, "%02X", *c);
- c++;
- p += 2;
- }
+ } else {
+ unsigned char *c = (unsigned char *)SOCKADDR_P(&from);
+ p = tb;
+ for (l = 0; l < 16; l++) {
+ sprintf(p, "%02X", *c);
+ c++;
+ p += 2;
+ }
+ if (output)
strcpy(output, tb);
- l = strlen(tb);
+ l = strlen(tb);
#endif
- }
}
return l;
++++++ tftp-hpa-0.48-macros-v6mapped.patch ++++++
diff -up tftpd/tftpd.c.orig-v6map tftpd/tftpd.c
--- tftpd/tftpd.c.orig-v6map 2012-12-11 17:06:53.156624476 +0100
+++ tftpd/tftpd.c 2012-12-11 17:13:08.705298341 +0100
@@ -1263,6 +1263,21 @@ static void do_opt(const char *opt, cons
#ifdef WITH_REGEX
+#ifdef HAVE_IPV6
+static inline int is_v6_mapped(const union sock_addr* pa)
+{
+ const char v6_mapped[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xFF, 0xFF };
+
+ if (from.sa.sa_family != AF_INET6)
+ return 0;
+ if (memcmp(&pa->s6.sin6_addr.s6_addr, v6_mapped, sizeof(v6_mapped)))
+ return 0;
+
+ return 1;
+}
+#endif
+
/*
* This is called by the remap engine when it encounters macros such
* as \i. It should write the output in "output" if non-NULL, and
@@ -1274,10 +1289,20 @@ static int rewrite_macros(char macro, ch
{
char *p, tb[INET6_ADDRSTRLEN];
int l=0;
+ const union sock_addr *pfrom = &from;
+
+#ifdef HAVE_IPV6
+ union sock_addr ipv4_from;
+ if (is_v6_mapped(&from)) {
+ ipv4_from.si.sin_family = AF_INET;
+ memcpy(&ipv4_from.si.sin_addr, from.s6.sin6_addr.s6_addr + 12, 4);
+ pfrom = &ipv4_from;
+ }
+#endif
switch (macro) {
case 'i':
- p = (char *)inet_ntop(from.sa.sa_family, SOCKADDR_P(&from),
+ p = (char *)inet_ntop(pfrom->sa.sa_family, SOCKADDR_P(pfrom),
tb, INET6_ADDRSTRLEN);
if (output && p)
strcpy(output, p);
@@ -1287,14 +1312,14 @@ static int rewrite_macros(char macro, ch
return strlen(p);
case 'x':
- if (from.sa.sa_family == AF_INET) {
+ if (pfrom->sa.sa_family == AF_INET) {
if (output)
sprintf(output, "%08lX",
- (unsigned long)ntohl(from.si.sin_addr.s_addr));
+ (unsigned long)ntohl(pfrom->si.sin_addr.s_addr));
l = 8;
#ifdef HAVE_IPV6
} else {
- unsigned char *c = (unsigned char *)SOCKADDR_P(&from);
+ unsigned char *c = (unsigned char *)SOCKADDR_P(pfrom);
p = tb;
for (l = 0; l < 16; l++) {
sprintf(p, "%02X", *c);
++++++ tftp-hpa-0.48-tzfix.patch ++++++
Index: tftp-hpa-5.1/tftpd/tftpd.c
===================================================================
--- tftp-hpa-5.1.orig/tftpd/tftpd.c
+++ tftp-hpa-5.1/tftpd/tftpd.c
@@ -384,6 +384,14 @@ int main(int argc, char **argv)
const char *pidfile = NULL;
u_short tp_opcode;
+ time_t my_time = 0;
+ struct tm* p_tm;
+ char envtz[10];
+ my_time = time(NULL);
+ p_tm = localtime(&my_time);
+ snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600);
+ setenv("TZ", envtz, 0);
+
/* basename() is way too much of a pain from a portability standpoint */
p = strrchr(argv[0], '/');
++++++ tftp-hpa-0.49-fortify-strcpy-crash.patch ++++++
Index: tftp-hpa-git-0.48/tftp/tftp.c
===================================================================
--- tftp-hpa-git-0.48.orig/tftp/tftp.c 2008-07-31 12:46:57.000000000 +0200
+++ tftp-hpa-git-0.48/tftp/tftp.c 2010-06-29 12:14:48.000000000 +0200
@@ -279,15 +279,16 @@ makerequest(int request, const char *nam
struct tftphdr *tp, const char *mode)
{
char *cp;
+ size_t len;
tp->th_opcode = htons((u_short) request);
cp = (char *)&(tp->th_stuff);
- strcpy(cp, name);
- cp += strlen(name);
- *cp++ = '\0';
- strcpy(cp, mode);
- cp += strlen(mode);
- *cp++ = '\0';
+ len = strlen(name) + 1;
+ memcpy(cp, name, len);
+ cp += len;
+ len = strlen(mode) + 1;
+ memcpy(cp, mode, len);
+ cp += len;
return (cp - (char *)tp);
}
++++++ tftp-multi-addresses.patch ++++++
Index: tftp-hpa-5.2/tftpd/recvfrom.c
===================================================================
--- tftp-hpa-5.2.orig/tftpd/recvfrom.c 2015-04-30 11:04:45.994568260 +0200
+++ tftp-hpa-5.2/tftpd/recvfrom.c 2015-05-14 16:02:28.104576816 +0200
@@ -148,17 +148,17 @@ myrecvfrom(int s, void *buf, int len, un
#endif
/* Try to enable getting the return address */
+ /* Before the first packet we don't know the address family of the
+ * connection, so we set both ipv4 and ipv6 socket options
+ */
#ifdef IP_RECVDSTADDR
- if (from->sa_family == AF_INET)
setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on));
#endif
#ifdef IP_PKTINFO
- if (from->sa_family == AF_INET)
setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
#endif
#ifdef HAVE_IPV6
#ifdef IPV6_RECVPKTINFO
- if (from->sa_family == AF_INET6)
setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on));
#endif
#endif
@@ -190,7 +190,7 @@ myrecvfrom(int s, void *buf, int len, un
for (cmptr = CMSG_FIRSTHDR(&msg); cmptr != NULL;
cmptr = CMSG_NXTHDR(&msg, cmptr)) {
- if (from->sa_family == AF_INET) {
+ if (cmptr->cmsg_level == IPPROTO_IP) {
myaddr->sa.sa_family = AF_INET;
#ifdef IP_RECVDSTADDR
if (cmptr->cmsg_level == IPPROTO_IP &&
@@ -209,15 +209,26 @@ myrecvfrom(int s, void *buf, int len, un
sizeof(struct in_addr));
}
#endif
+ if (from->sa_family == AF_INET6) {
+ from->sa_family = AF_INET;
+ /* Unmap the ipv4 address from ipv6.
+ * The ipv6 mapped address is in format:
+ * 10 0x0 bytes, 2 0xff bytes, 4 bytes of the ipv4 address
+ * so we cut out the first 12 bytes of the ipv6 and
+ * interpret the rest as the ipv4
+ */
+ ((struct sockaddr_in *)from)->sin_addr = *((struct in_addr *)(((struct sockaddr_in6 *)from)->sin6_addr.s6_addr+12));
+ }
}
#ifdef HAVE_IPV6
- else if (from->sa_family == AF_INET6) {
+ else if (cmptr->cmsg_level == IPPROTO_IPV6) {
myaddr->sa.sa_family = AF_INET6;
#ifdef IP6_RECVDSTADDR
if (cmptr->cmsg_level == IPPROTO_IPV6 &&
- cmptr->cmsg_type == IPV6_RECVDSTADDR )
+ cmptr->cmsg_type == IPV6_RECVDSTADDR ) {
memcpy(&myaddr->s6.sin6_addr, CMSG_DATA(cmptr),
sizeof(struct in6_addr));
+ }
#endif
#ifdef HAVE_STRUCT_IN6_PKTINFO
++++++ tftp.fw ++++++
## Name: TFTP Server
## Description: Opens ports for tftp service.
# space separated list of allowed UDP ports
UDP="tftp"
++++++ tftp.service ++++++
[Unit]
Description=Tftp Server
[Service]
ExecStart=/usr/sbin/in.tftpd -u tftp -s /srv/tftpboot
StandardInput=socket
++++++ tftp.socket ++++++
[Unit]
Description=Tftp Server Activation Socket
[Socket]
ListenDatagram=69
[Install]
WantedBy=sockets.target
++++++ tftp.xinetd ++++++
# default: off
# description: tftp service is provided primarily for booting or when a \
# router need an upgrade. Most sites run this only on machines acting as \
# "boot servers".
# The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
flags = IPv6 IPv4
user = root
server = /usr/sbin/in.tftpd
server_args = -u tftp -s /srv/tftpboot
# per_source = 11
# cps = 100 2
disable = yes
}
1
0
Hello community,
here is the log from the commit of package xvkbd for openSUSE:Factory checked in at 2015-09-27 14:32:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xvkbd (Old)
and /work/SRC/openSUSE:Factory/.xvkbd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xvkbd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xvkbd/xvkbd.changes 2013-07-29 17:51:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xvkbd.new/xvkbd.changes 2015-09-27 14:31:56.000000000 +0200
@@ -1,0 +2,15 @@
+Sat Sep 26 20:34:14 UTC 2015 - asterios.dramis(a)gmail.com
+
+- Update to version 3.7:
+ * Right click capability was broken in the recent releases. This
+ bug is now fixed.
+ From version 3.6:
+ * New -utf16 option - when used with -file option, make xvkbd to
+ accept UTF16 characters in the file.
+ * Keyboard layout selected with "Change Keyboard Layout..." will
+ be kept when xvkbd is used next time.
+ * Caps Lock now works better for some of the keyboard layouts
+ containing non-ASCII keys.
+ * Improved Hebrew keyboard layout (Thanks Genghis Khan).
+
+-------------------------------------------------------------------
Old:
----
xvkbd-3.5.tar.gz
New:
----
xvkbd-3.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xvkbd.spec ++++++
--- /var/tmp/diff_new_pack.bykfXx/_old 2015-09-27 14:31:57.000000000 +0200
+++ /var/tmp/diff_new_pack.bykfXx/_new 2015-09-27 14:31:57.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package xvkbd
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: xvkbd
-Version: 3.5
+Version: 3.7
Release: 0
Summary: Virtual Keyboard for the X Window System
License: GPL-2.0+
++++++ xvkbd-3.5.tar.gz -> xvkbd-3.7.tar.gz ++++++
++++ 4588 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package systemd for openSUSE:Factory checked in at 2015-09-27 14:32:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/systemd (Old)
and /work/SRC/openSUSE:Factory/.systemd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "systemd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/systemd/systemd-mini.changes 2015-09-25 08:51:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes 2015-09-27 14:31:51.000000000 +0200
@@ -2 +2 @@
-Thu Sep 24 12:47:29 UTC 2015 - dimstar(a)opensuse.org
+Fri Sep 25 14:20:41 UTC 2015 - werner(a)suse.de
@@ -4 +4,264 @@
-- Add systemd-bfo88401.patch: do not restart services on coldplug.
+- Fix patch tty-ask-password-agent-on-console.patch not to crash
+ away but enable it to ask on all devices of /dev/console
+
+-------------------------------------------------------------------
+Wed Sep 23 14:19:32 UTC 2015 - jengelh(a)inai.de
+
+- Avoid "file not found /etc/udev/rules.d/70-persistent-net.rules"
+ waring occurring in %post
+
+-------------------------------------------------------------------
+Wed Sep 23 12:41:19 UTC 2015 - werner(a)suse.de
+
+- Add patch let-vconsole-setup-get-properties-only-once-to-copy-them.patch
+ to avoid broken virtual console mapping due stressed ioctl API
+ for the virtual consoles (boo#904214)
+
+-------------------------------------------------------------------
+Mon Sep 7 12:21:06 UTC 2015 - werner(a)suse.de
+
+- Fix last change that is use the new name for udev packages in %pretrans.
+
+-------------------------------------------------------------------
+Mon Sep 7 11:50:21 UTC 2015 - fbui(a)suse.com
+
+- restore usage of LUA in %pretrans.
+
+-------------------------------------------------------------------
+Mon Sep 7 08:09:05 UTC 2015 - werner(a)suse.de
+
+- Try to generate the systemd users and groups always in same order
+ to avoid republish other packages (boo#944660)
+
+-------------------------------------------------------------------
+Fri Aug 21 07:49:33 UTC 2015 - fbui(a)suse.com
+
+- cleanup specfile by removing commands that were dealing with systemd
+ pre-generated files: we're now using systemd tarball generated directly
+ from the git repo which doesn't contain any of these files.
+- there's no point in using LUA in %pretrans
+
+-------------------------------------------------------------------
+Wed Aug 19 09:34:41 UTC 2015 - fbui(a)suse.com
+
+- Drop 0009-make-xsltproc-use-correct-ROFF-links.patch
+
+This patch was initialy added to workaround bsc#842844. But it
+appears that man(1) was fixed (included since 13.2 at least) to
+handle manual pages that consist only of a .so directive such as
+'.so <page>'.
+
+-------------------------------------------------------------------
+Thu Aug 13 11:46:12 UTC 2015 - werner(a)suse.de
+
+- Change use-rndaddentropy-ioctl-to-load-random-seed.patch to
+ make it work on big endian
+
+-------------------------------------------------------------------
+Tue Aug 11 09:48:26 UTC 2015 - jengelh(a)inai.de
+
+- Use Obsolete/Provides strategy from
+ windows:mingw:mingw64/mingw64-cross-gcc to do the bootstrap
+ cycle and kick out -mini afterwards.
+
+-------------------------------------------------------------------
+Tue Aug 11 05:15:09 UTC 2015 - jengelh(a)inai.de
+
+- Update to new upstream release 224
+* systemd-networkd gained a number of new configuration options
+ for DHCP, tunnels and bridges
+* systemd-efi-boot-generator functionality was merged into
+ systemd-gpt-auto-generator.
+
+-------------------------------------------------------------------
+Mon Aug 10 13:16:54 UTC 2015 - sndirsch(a)suse.com
+
+- /usr/share/systemd/kbd-model-map: added entries for
+ xkeyboard-config converted keymaps; mappings, which already
+ exist in original systemd mapping table are being ignored
+ though, i.e. not overwritten; needs kbd in buildrequires
+ (FATE#318426)
+
+-------------------------------------------------------------------
+Wed Jul 29 18:10:53 UTC 2015 - meissner(a)suse.com
+
+- hostname-NULL.patch: Work around a crash on XEN hosts
+ in OBS. /etc/hostname is not present and systemd then does
+ strchr(hostname,soemthing) with hostname NULL.
+
+-------------------------------------------------------------------
+Wed Jul 29 09:02:21 UTC 2015 - werner(a)suse.de
+
+- Add Correct_assert_on_unexpected_error_code.patch to work around
+ a problem of an assert on ENODEV for closing fd on an input
+ event device (boo#939571)
+
+-------------------------------------------------------------------
+Mon Jul 13 15:31:46 UTC 2015 - jengelh(a)inai.de
+
+- Remove udev-generate-rules.sh, apparently not used by anything in
+ the systemd nor udev-persistent-ifnames package.
+
+-------------------------------------------------------------------
+Wed Jul 8 20:44:57 UTC 2015 - crrodriguez(a)opensuse.org
+
+- Systemd v222, bugfix release.
+- Drop upstream patches
+0006-pam_systemd-Properly-check-kdbus-availability.patch
+0023-core-fix-reversed-dependency-check-in-unit_check_unn.patch
+0031-install-fix-bad-memory-access.patch
+1032-ata_id-unbotch-format-specifier.patch
+- Drop SUSE patch 1013-no-runtime-PM-for-IBM-consoles.patch
+ udev does no longer enable USB HID power management at all.
+- The udev accelerometer helper was removed, obsoleted by
+ iio-sensor-proxy package.
+- networkd gained a new configuration option IPv6PrivacyExtensions.
+- udev does not longer support the WAIT_FOR_SYSFS= key in udev
+ rules. There are no known issues with current sysfs,
+ and udev does not need or should be used to work around such bugs.
+
+-------------------------------------------------------------------
+Tue Jul 7 08:54:38 UTC 2015 - jengelh(a)inai.de
+
+- Avoid restarting logind [bnc#934901]
+- Do not suppress errors in any case, even if they are ignored
+
+-------------------------------------------------------------------
+Sun Jul 5 15:52:33 UTC 2015 - hrvoje.senjan(a)gmail.com
+
+- Fix devel package requires (both mini and real required real libsystemd0)
+
+-------------------------------------------------------------------
+Fri Jul 3 11:17:01 UTC 2015 - werner(a)suse.de
+
+- Rework patch tty-ask-password-agent-on-console.patch to fit the
+ requisition of https://bugs.freedesktop.org/show_bug.cgi?id=82004
+
+-------------------------------------------------------------------
+Wed Jul 1 09:42:44 UTC 2015 - jengelh(a)inai.de
+
+- Rework "-mini" package logic to not conflict with itself and
+ then add libsystemd0 to mini.
+
+-------------------------------------------------------------------
+Wed Jul 1 03:43:51 UTC 2015 - crrodriguez(a)opensuse.org
+
+- remove SysVStartPriority= from after-local.service,
+ unsupported since v218.
+ Note that this option was only parsed and that's it. the logic
+ to give "start priority" was never implemented.
+
+-------------------------------------------------------------------
+Wed Jul 1 03:20:20 UTC 2015 - crrodriguez(a)opensuse.org
+
+- change the default fallback ntp servers to the opensuse
+ pool.ntp.org vendor zone.
+- We still need to run systemd-sysctl.service after local-fs.target
+ otherwise it works only when /boot is in the root filesystem but
+ not when it is a separate partition.
+
+-------------------------------------------------------------------
+Fri Jun 26 17:14:46 CEST 2015 - sbrabec(a)suse.com
+
+- Obsolete pm-utils and suspend (boo#925873).
+- Remove pm-utils support
+ (remove Forward-suspend-hibernate-calls-to-pm-utils.patch).
+
+-------------------------------------------------------------------
+Thu Jun 25 17:27:06 UTC 2015 - crrodriguez(a)opensuse.org
+
+- remove patch sysctl-handle-boot-sysctl.conf-kernel_release.patch
+ from the filelist.
+
+-------------------------------------------------------------------
+Thu Jun 25 05:56:55 UTC 2015 - crrodriguez(a)opensuse.org
+
+- libpcre, glib2 and libusb are not used by systemd, remove
+ from buildrequires.
+
+-------------------------------------------------------------------
+Thu Jun 25 05:19:54 UTC 2015 - crrodriguez(a)opensuse.org
+
+- 1032-ata_id-unbotch-format-specifier.patch: fix udev ata_id
+ output.
+- 0023-core-fix-reversed-dependency-check-in-unit_check_unn.patch
+ fix StopWhenUnneeded=true in combination with a Requisite=
+ dependency.
+- 0031-install-fix-bad-memory-access.patch: Fix Bad memory access
+- 0006-pam_systemd-Properly-check-kdbus-availability.patch: if
+ kdbus is enabled (i.e boot with kdbus=1) DBUS_SESSION_BUS_ADDRESS
+ must not be exported.
+- spec: add a min_kernel_version macro to ensure the package
+ conflicts with kernel versions in which systemd cannot run.
+
++++ 71 more lines (skipped)
++++ between /work/SRC/openSUSE:Factory/systemd/systemd-mini.changes
++++ and /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes
systemd.changes: same change
Old:
----
0001-Let-some-boolean-survive-a-daemon-reload.patch
0001-core-rework-device-state-logic.patch
0009-make-xsltproc-use-correct-ROFF-links.patch
1013-no-runtime-PM-for-IBM-consoles.patch
Forward-suspend-hibernate-calls-to-pm-utils.patch
sysctl-handle-boot-sysctl.conf-kernel_release.patch
systemd-219.tar.xz
systemd-bfo88401.patch
systemd-powerd-initctl-support.patch
udev-generate-persistent-rule.sh
New:
----
Correct_assert_on_unexpected_error_code.patch
hostname-NULL.patch
let-vconsole-setup-get-properties-only-once-to-copy-them.patch
v224.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ systemd-mini.spec ++++++
++++ 1015 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/systemd/systemd-mini.spec
++++ and /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.spec
systemd.spec: same change
++++++ 0001-On_s390_con3270_disable_ANSI_colour_esc.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,99 +1,29 @@
---
rules/99-systemd.rules.in | 2
+ src/basic/terminal-util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--
+ src/basic/terminal-util.h | 1
src/core/manager.c | 24 ++++++++---
- src/shared/util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--
- src/shared/util.h | 1
4 files changed, 116 insertions(+), 10 deletions(-)
-Index: systemd/rules/99-systemd.rules.in
+Index: systemd-221/rules/99-systemd.rules.in
===================================================================
---- systemd.orig/rules/99-systemd.rules.in
-+++ systemd/rules/99-systemd.rules.in
+--- systemd-221.orig/rules/99-systemd.rules.in
++++ systemd-221/rules/99-systemd.rules.in
@@ -7,7 +7,7 @@
ACTION=="remove", GOTO="systemd_end"
-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd"
+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd"
-
KERNEL=="vport*", TAG+="systemd"
-Index: systemd/src/core/manager.c
+ SUBSYSTEM=="block", TAG+="systemd"
+Index: systemd-221/src/basic/terminal-util.c
===================================================================
---- systemd.orig/src/core/manager.c
-+++ systemd/src/core/manager.c
-@@ -113,7 +113,7 @@ static int manager_watch_jobs_in_progres
-
- #define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1))
-
--static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos) {
-+static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos, bool ansi_console) {
- char *p = buffer;
-
- assert(buflen >= CYLON_BUFFER_EXTRA + width + 1);
-@@ -122,12 +122,14 @@ static void draw_cylon(char buffer[], si
- if (pos > 1) {
- if (pos > 2)
- p = mempset(p, ' ', pos-2);
-- p = stpcpy(p, ANSI_RED_ON);
-+ if (ansi_console)
-+ p = stpcpy(p, ANSI_RED_ON);
- *p++ = '*';
- }
-
- if (pos > 0 && pos <= width) {
-- p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
-+ if (ansi_console)
-+ p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
- *p++ = '*';
- }
-
-@@ -138,7 +140,8 @@ static void draw_cylon(char buffer[], si
- *p++ = '*';
- if (pos < width-1)
- p = mempset(p, ' ', width-1-pos);
-- strcpy(p, ANSI_HIGHLIGHT_OFF);
-+ if (ansi_console)
-+ strcpy(p, ANSI_HIGHLIGHT_OFF);
- }
- }
-
-@@ -155,6 +158,7 @@ void manager_flip_auto_status(Manager *m
- }
-
- static void manager_print_jobs_in_progress(Manager *m) {
-+ static int is_ansi_console = -1;
- _cleanup_free_ char *job_of_n = NULL;
- Iterator i;
- Job *j;
-@@ -180,10 +184,20 @@ static void manager_print_jobs_in_progre
- assert(counter == print_nr + 1);
- assert(j);
-
-+ if (_unlikely_(is_ansi_console < 0)) {
-+ int fd = open_terminal("/dev/console", O_RDONLY|O_NOCTTY|O_CLOEXEC);
-+ if (fd < 0)
-+ is_ansi_console = 0;
-+ else {
-+ is_ansi_console = (int)ansi_console(fd);
-+ close(fd);
-+ }
-+ }
-+
- cylon_pos = m->jobs_in_progress_iteration % 14;
- if (cylon_pos >= 8)
- cylon_pos = 14 - cylon_pos;
-- draw_cylon(cylon, sizeof(cylon), 6, cylon_pos);
-+ draw_cylon(cylon, sizeof(cylon), 6, cylon_pos, (bool)is_ansi_console);
-
- m->jobs_in_progress_iteration++;
-
-Index: systemd/src/shared/util.c
-===================================================================
---- systemd.orig/src/shared/util.c
-+++ systemd/src/shared/util.c
-@@ -3212,6 +3212,7 @@ int status_vprintf(const char *status, b
+--- systemd-221.orig/src/basic/terminal-util.c
++++ systemd-221/src/basic/terminal-util.c
+@@ -647,6 +647,7 @@ int status_vprintf(const char *status, b
struct iovec iovec[6] = {};
int n = 0;
static bool prev_ephemeral;
@@ -101,7 +31,7 @@
assert(format);
-@@ -3225,6 +3226,41 @@ int status_vprintf(const char *status, b
+@@ -660,6 +661,41 @@ int status_vprintf(const char *status, b
if (fd < 0)
return fd;
@@ -143,7 +73,7 @@
if (ellipse) {
char *e;
size_t emax, sl;
-@@ -3247,8 +3283,12 @@ int status_vprintf(const char *status, b
+@@ -682,8 +718,12 @@ int status_vprintf(const char *status, b
}
}
@@ -158,88 +88,84 @@
prev_ephemeral = ephemeral;
if (status) {
-@@ -3504,8 +3544,22 @@ void columns_lines_cache_reset(int signu
- bool on_tty(void) {
- static int cached_on_tty = -1;
-
-- if (_unlikely_(cached_on_tty < 0))
-+ if (_unlikely_(cached_on_tty < 0)) {
- cached_on_tty = isatty(STDOUT_FILENO) > 0;
-+#if defined (__s390__) || defined (__s390x__)
-+ if (cached_on_tty) {
-+ const char *e = getenv("TERM");
-+ if (!e)
-+ return cached_on_tty;
-+ if (streq(e, "dumb") || strneq(e, "ibm3", 4)) {
-+ char *mode = NULL;
-+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
-+ if (r < 0 || !mode || !streq(mode, "3270"))
-+ cached_on_tty = 0;
-+ }
-+ }
-+#endif
-+ }
-
- return cached_on_tty;
- }
-@@ -3523,6 +3577,27 @@ int files_same(const char *filea, const
- a.st_ino == b.st_ino;
+@@ -807,10 +847,47 @@ bool tty_is_vc_resolve(const char *tty)
+ return tty_is_vc(tty);
}
+bool ansi_console(int fd) {
+ static int cached_ansi_console = -1;
+
-+ if (_unlikely_(cached_ansi_console < 0)) {
-+ cached_ansi_console = isatty(fd) > 0;
-+#if defined (__s390__) || defined (__s390x__)
-+ if (cached_ansi_console) {
-+ const char *e = getenv("TERM");
-+ if (e && (streq(e, "dumb") || strneq(e, "ibm3", 4))) {
-+ char *mode = NULL;
-+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
-+ if (r < 0 || !mode || !streq(mode, "3270"))
-+ cached_ansi_console = 0;
-+ }
-+ }
-+#endif
-+ }
++ if (_likely_(cached_ansi_console >= 0))
++ return cached_ansi_console;
+
++ cached_ansi_console = isatty(fd) > 0;
++#if defined(__s390__) || defined(__s390x__)
++ if (cached_ansi_console) {
++ const char *e = getenv("TERM");
++ if (e != NULL && (streq(e, "dumb") || strneq(e, "ibm3", 4))) {
++ _cleanup_free_ char *mode = NULL;
++ int r = parse_env_file("/proc/cmdline", WHITESPACE,
++ "conmode", &mode, NULL);
++ if (r < 0 || mode == NULL || !streq(mode, "3270"))
++ cached_ansi_console = 0;
++ }
++ }
++#endif
+ return cached_ansi_console;
+}
+
- int running_in_chroot(void) {
- int ret;
-
-@@ -4006,7 +4081,23 @@ bool tty_is_vc_resolve(const char *tty)
const char *default_term_for_tty(const char *tty) {
assert(tty);
- return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220";
+ if (tty_is_vc_resolve(tty))
+ return "TERM=linux";
-+
+ if (startswith(tty, "/dev/"))
+ tty += 5;
-+
+#if defined (__s390__) || defined (__s390x__)
-+ if (streq(tty, "ttyS0")) {
-+ char *mode = NULL;
-+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
-+ if (r < 0 || !mode || !streq(mode, "3270"))
++ if (streq(tty, "ttyS0")) {
++ _cleanup_free_ char *mode = NULL;
++ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode",
++ &mode, NULL);
++ if (r < 0 || mode == NULL || !streq(mode, "3270"))
+ return "TERM=dumb";
+ if (streq(mode, "3270"))
+ return "TERM=ibm327x";
-+ }
++ }
+#endif
+ return "TERM=vt220";
}
- bool dirent_is_file(const struct dirent *de) {
-Index: systemd/src/shared/util.h
+ int fd_columns(int fd) {
+@@ -890,8 +967,22 @@ void columns_lines_cache_reset(int signu
+ bool on_tty(void) {
+ static int cached_on_tty = -1;
+
+- if (_unlikely_(cached_on_tty < 0))
++ if (_unlikely_(cached_on_tty < 0)) {
+ cached_on_tty = isatty(STDOUT_FILENO) > 0;
++#if defined (__s390__) || defined (__s390x__)
++ if (cached_on_tty) {
++ const char *e = getenv("TERM");
++ if (!e)
++ return cached_on_tty;
++ if (streq(e, "dumb") || strneq(e, "ibm3", 4)) {
++ char *mode = NULL;
++ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
++ if (r < 0 || !mode || !streq(mode, "3270"))
++ cached_on_tty = 0;
++ }
++ }
++#endif
++ }
+
+ return cached_on_tty;
+ }
+Index: systemd-221/src/basic/terminal-util.h
===================================================================
---- systemd.orig/src/shared/util.h
-+++ systemd/src/shared/util.h
-@@ -475,6 +475,7 @@ unsigned lines(void);
+--- systemd-221.orig/src/basic/terminal-util.h
++++ systemd-221/src/basic/terminal-util.h
+@@ -77,6 +77,7 @@ unsigned lines(void);
void columns_lines_cache_reset(int _unused_ signum);
bool on_tty(void);
@@ -247,3 +173,73 @@
static inline const char *ansi_highlight(void) {
return on_tty() ? ANSI_HIGHLIGHT_ON : "";
+Index: systemd-221/src/core/manager.c
+===================================================================
+--- systemd-221.orig/src/core/manager.c
++++ systemd-221/src/core/manager.c
+@@ -113,7 +113,7 @@ static void manager_watch_jobs_in_progre
+
+ #define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1))
+
+-static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos) {
++static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos, bool ansi_console) {
+ char *p = buffer;
+
+ assert(buflen >= CYLON_BUFFER_EXTRA + width + 1);
+@@ -122,12 +122,14 @@ static void draw_cylon(char buffer[], si
+ if (pos > 1) {
+ if (pos > 2)
+ p = mempset(p, ' ', pos-2);
+- p = stpcpy(p, ANSI_RED_ON);
++ if (ansi_console)
++ p = stpcpy(p, ANSI_RED_ON);
+ *p++ = '*';
+ }
+
+ if (pos > 0 && pos <= width) {
+- p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
++ if (ansi_console)
++ p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
+ *p++ = '*';
+ }
+
+@@ -138,7 +140,8 @@ static void draw_cylon(char buffer[], si
+ *p++ = '*';
+ if (pos < width-1)
+ p = mempset(p, ' ', width-1-pos);
+- strcpy(p, ANSI_HIGHLIGHT_OFF);
++ if (ansi_console)
++ strcpy(p, ANSI_HIGHLIGHT_OFF);
+ }
+ }
+
+@@ -155,6 +158,7 @@ void manager_flip_auto_status(Manager *m
+ }
+
+ static void manager_print_jobs_in_progress(Manager *m) {
++ static int is_ansi_console = -1;
+ _cleanup_free_ char *job_of_n = NULL;
+ Iterator i;
+ Job *j;
+@@ -180,10 +184,20 @@ static void manager_print_jobs_in_progre
+ assert(counter == print_nr + 1);
+ assert(j);
+
++ if (_unlikely_(is_ansi_console < 0)) {
++ int fd = open_terminal("/dev/console", O_RDONLY|O_NOCTTY|O_CLOEXEC);
++ if (fd < 0)
++ is_ansi_console = 0;
++ else {
++ is_ansi_console = (int)ansi_console(fd);
++ close(fd);
++ }
++ }
++
+ cylon_pos = m->jobs_in_progress_iteration % 14;
+ if (cylon_pos >= 8)
+ cylon_pos = 14 - cylon_pos;
+- draw_cylon(cylon, sizeof(cylon), 6, cylon_pos);
++ draw_cylon(cylon, sizeof(cylon), 6, cylon_pos, (bool)is_ansi_console);
+
+ m->jobs_in_progress_iteration++;
+
++++++ 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -3,11 +3,11 @@
src/systemctl/systemctl.c | 18 ++++++++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
-Index: systemd-218/src/core/shutdown.c
+Index: systemd-221/src/core/shutdown.c
===================================================================
---- systemd-218.orig/src/core/shutdown.c
-+++ systemd-218/src/core/shutdown.c
-@@ -400,6 +400,10 @@ int main(int argc, char *argv[]) {
+--- systemd-221.orig/src/core/shutdown.c
++++ systemd-221/src/core/shutdown.c
+@@ -396,6 +396,10 @@ int main(int argc, char *argv[]) {
}
reboot(cmd);
@@ -18,11 +18,11 @@
if (errno == EPERM && in_container) {
/* If we are in a container, and we lacked
* CAP_SYS_BOOT just exit, this will kill our
-Index: systemd-218/src/systemctl/systemctl.c
+Index: systemd-221/src/systemctl/systemctl.c
===================================================================
---- systemd-218.orig/src/systemctl/systemctl.c
-+++ systemd-218/src/systemctl/systemctl.c
-@@ -94,6 +94,7 @@ static bool arg_no_pager = false;
+--- systemd-221.orig/src/systemctl/systemctl.c
++++ systemd-221/src/systemctl/systemctl.c
+@@ -93,6 +93,7 @@ static bool arg_no_pager = false;
static bool arg_no_wtmp = false;
static bool arg_no_wall = false;
static bool arg_no_reload = false;
@@ -30,7 +30,7 @@
static bool arg_show_types = false;
static bool arg_ignore_inhibitors = false;
static bool arg_dry = false;
-@@ -6813,6 +6814,7 @@ static int halt_parse_argv(int argc, cha
+@@ -6636,6 +6637,7 @@ static int halt_parse_argv(int argc, cha
{ "reboot", no_argument, NULL, ARG_REBOOT },
{ "force", no_argument, NULL, 'f' },
{ "wtmp-only", no_argument, NULL, 'w' },
@@ -38,7 +38,7 @@
{ "no-wtmp", no_argument, NULL, 'd' },
{ "no-wall", no_argument, NULL, ARG_NO_WALL },
{}
-@@ -6865,10 +6867,13 @@ static int halt_parse_argv(int argc, cha
+@@ -6688,10 +6690,13 @@ static int halt_parse_argv(int argc, cha
case 'i':
case 'h':
@@ -53,7 +53,7 @@
case '?':
return -EINVAL;
-@@ -7511,7 +7516,8 @@ static int halt_now(enum action a) {
+@@ -7291,7 +7296,8 @@ static int halt_now(enum action a) {
/* The kernel will automaticall flush ATA disks and suchlike
* on reboot(), but the file systems need to be synce'd
* explicitly in advance. */
@@ -63,7 +63,7 @@
/* Make sure C-A-D is handled by the kernel from this point
* on... */
-@@ -7519,14 +7525,14 @@ static int halt_now(enum action a) {
+@@ -7299,14 +7305,14 @@ static int halt_now(enum action a) {
switch (a) {
++++++ 0001-add-network-device-after-NFS-mount-units.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -5,17 +5,17 @@
---
Makefile.am | 2
+ src/basic/util.c | 1
src/core/mount-iface.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++
src/core/mount-iface.h | 25 +++++++
src/core/mount.c | 35 +++++++++
- src/shared/util.c | 1
5 files changed, 234 insertions(+), 2 deletions(-)
-Index: systemd-218/Makefile.am
+Index: systemd-221/Makefile.am
===================================================================
---- systemd-218.orig/Makefile.am
-+++ systemd-218/Makefile.am
-@@ -1134,6 +1134,8 @@ libsystemd_core_la_SOURCES = \
+--- systemd-221.orig/Makefile.am
++++ systemd-221/Makefile.am
+@@ -1164,6 +1164,8 @@ libcore_la_SOURCES = \
src/core/machine-id-setup.h \
src/core/mount-setup.c \
src/core/mount-setup.h \
@@ -24,10 +24,22 @@
src/core/kmod-setup.c \
src/core/kmod-setup.h \
src/core/loopback-setup.h \
-Index: systemd-218/src/core/mount-iface.c
+Index: systemd-221/src/basic/util.c
+===================================================================
+--- systemd-221.orig/src/basic/util.c
++++ systemd-221/src/basic/util.c
+@@ -1478,6 +1478,7 @@ bool fstype_is_network(const char *fstyp
+ "ncp\0"
+ "nfs\0"
+ "nfs4\0"
++ "afs\0"
+ "gfs\0"
+ "gfs2\0"
+ "glusterfs\0";
+Index: systemd-221/src/core/mount-iface.c
===================================================================
--- /dev/null
-+++ systemd-218/src/core/mount-iface.c
++++ systemd-221/src/core/mount-iface.c
@@ -0,0 +1,173 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
@@ -202,10 +214,10 @@
+ freeifaddrs(ifa_list);
+ ifa_list = NULL;
+}
-Index: systemd-218/src/core/mount-iface.h
+Index: systemd-221/src/core/mount-iface.h
===================================================================
--- /dev/null
-+++ systemd-218/src/core/mount-iface.h
++++ systemd-221/src/core/mount-iface.h
@@ -0,0 +1,25 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
@@ -232,11 +244,11 @@
+
+char *host2iface(const char *ip);
+void freeroutes(void);
-Index: systemd-218/src/core/mount.c
+Index: systemd-221/src/core/mount.c
===================================================================
---- systemd-218.orig/src/core/mount.c
-+++ systemd-218/src/core/mount.c
-@@ -38,6 +38,7 @@
+--- systemd-221.orig/src/core/mount.c
++++ systemd-221/src/core/mount.c
+@@ -35,6 +35,7 @@
#include "mkdir.h"
#include "path-util.h"
#include "mount-setup.h"
@@ -244,7 +256,7 @@
#include "unit-name.h"
#include "dbus-mount.h"
#include "special.h"
-@@ -1365,8 +1366,9 @@ static int mount_add_one(
+@@ -1332,8 +1333,9 @@ static int mount_setup_unit(
_cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL;
bool load_extras = false;
MountParameters *p;
@@ -255,17 +267,17 @@
int r;
assert(m);
-@@ -1391,6 +1393,8 @@ static int mount_add_one(
- if (!e)
- return -ENOMEM;
+@@ -1358,6 +1360,8 @@ static int mount_setup_unit(
+ if (r < 0)
+ return r;
+ isnetwork = fstype_is_network(fstype);
+
u = manager_get_unit(m, e);
if (!u) {
delete = true;
-@@ -1419,7 +1423,7 @@ static int mount_add_one(
- if (m->running_as == SYSTEMD_SYSTEM) {
+@@ -1385,7 +1389,7 @@ static int mount_setup_unit(
+ if (m->running_as == MANAGER_SYSTEM) {
const char* target;
- target = mount_needs_network(options, fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
@@ -273,7 +285,7 @@
r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
if (r < 0)
goto fail;
-@@ -1505,6 +1509,32 @@ static int mount_add_one(
+@@ -1471,6 +1475,32 @@ static int mount_setup_unit(
goto fail;
}
@@ -296,7 +308,7 @@
+ else {
+ r = unit_add_dependency_by_name(u, UNIT_AFTER, target, NULL, true);
+ if (r < 0)
-+ log_unit_error(u->id, "Failed to add dependency on %s, ignoring: %s",
++ log_unit_error(u, "Failed to add dependency on %s, ignoring: %s",
+ target, strerror(-r));
+ }
+ }
@@ -306,7 +318,7 @@
if (changed)
unit_add_to_dbus_queue(u);
-@@ -1560,6 +1590,7 @@ static int mount_load_proc_self_mountinf
+@@ -1537,6 +1567,7 @@ static int mount_load_proc_self_mountinf
if (r == 0 && k < 0)
r = k;
}
@@ -314,15 +326,3 @@
return r;
}
-Index: systemd-218/src/shared/util.c
-===================================================================
---- systemd-218.orig/src/shared/util.c
-+++ systemd-218/src/shared/util.c
-@@ -1667,6 +1667,7 @@ bool fstype_is_network(const char *fstyp
- "ncp\0"
- "nfs\0"
- "nfs4\0"
-+ "afs\0"
- "gfs\0"
- "gfs2\0"
- "glusterfs\0";
++++++ 0001-avoid-abort-due-timeout-at-user-service.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,6 +1,12 @@
---- systemd-209/src/login/logind-session.c
-+++ systemd-209/src/login/logind-session.c 2014-02-28 12:12:14.762736079 +0000
-@@ -525,6 +525,12 @@ int session_start(Session *s) {
+---
+ src/login/logind-session.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+Index: systemd-221/src/login/logind-session.c
+===================================================================
+--- systemd-221.orig/src/login/logind-session.c
++++ systemd-221/src/login/logind-session.c
+@@ -548,6 +548,12 @@ int session_start(Session *s) {
if (r < 0)
return r;
++++++ 0001-bnc888612-logind-polkit-acpi.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,13 +1,13 @@
---
src/login/logind-action.c | 5 +++++
- src/login/logind-dbus.c | 20 ++++++++++++++++----
- 2 files changed, 21 insertions(+), 4 deletions(-)
+ src/login/logind-dbus.c | 31 +++++++++++++++++++++++--------
+ 2 files changed, 28 insertions(+), 8 deletions(-)
-Index: systemd-218/src/login/logind-action.c
+Index: systemd-221/src/login/logind-action.c
===================================================================
---- systemd-218.orig/src/login/logind-action.c
-+++ systemd-218/src/login/logind-action.c
-@@ -83,6 +83,11 @@ int manager_handle_action(
+--- systemd-221.orig/src/login/logind-action.c
++++ systemd-221/src/login/logind-action.c
+@@ -85,6 +85,11 @@ int manager_handle_action(
/* If the key handling is inhibited, don't do anything */
if (inhibit_key > 0) {
@@ -19,57 +19,83 @@
if (manager_is_inhibited(m, inhibit_key, INHIBIT_BLOCK, NULL, true, false, 0, NULL)) {
log_debug("Refusing operation, %s is inhibited.", inhibit_what_to_string(inhibit_key));
return 0;
-Index: systemd-218/src/login/logind-dbus.c
+Index: systemd-221/src/login/logind-dbus.c
===================================================================
---- systemd-218.orig/src/login/logind-dbus.c
-+++ systemd-218/src/login/logind-dbus.c
-@@ -1487,9 +1487,11 @@ static int method_do_shutdown_or_sleep(
- sd_bus_error *error) {
+--- systemd-221.orig/src/login/logind-dbus.c
++++ systemd-221/src/login/logind-dbus.c
+@@ -1625,12 +1625,13 @@ static int verify_shutdown_creds(
+ const char *action,
+ const char *action_multiple_sessions,
+ const char *action_ignore_inhibit,
+- sd_bus_error *error) {
++ sd_bus_error *error, const char *sleep_verb) {
_cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
- bool multiple_sessions, blocked;
+ bool multiple_sessions, blocked, shutdown_through_acpi;
- int interactive, r;
uid_t uid;
-+ int fd;
+- int r;
++ int r, fd;
+ struct stat buf;
assert(m);
assert(message);
-@@ -1533,7 +1535,17 @@ static int method_do_shutdown_or_sleep(
+@@ -1652,7 +1653,19 @@ static int verify_shutdown_creds(
multiple_sessions = r > 0;
blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL);
-- if (multiple_sessions) {
+- if (multiple_sessions && action_multiple_sessions) {
+ fd = open ("/run/systemd/acpi-shutdown", O_NOFOLLOW|O_PATH|O_CLOEXEC);
+ if (fd >= 0) {
-+ shutdown_through_acpi = ((fstat(fd,&buf) == 0) && (time(NULL) - buf.st_mtime <= 65) && !sleep_verb);
++ shutdown_through_acpi = fstat(fd, &buf) == 0 &&
++ time(NULL) - buf.st_mtime <= 65 &&
++ sleep_verb == NULL;
+ close(fd);
+ unlink ("/run/systemd/acpi-shutdown");
+ }
+ else
+ shutdown_through_acpi = false;
+
-+
-+ if (multiple_sessions && !shutdown_through_acpi) {
- r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, &m->polkit_registry, error);
++ if (multiple_sessions && action_multiple_sessions &&
++ !shutdown_through_acpi) {
+ r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0)
return r;
-@@ -1541,7 +1553,7 @@ static int method_do_shutdown_or_sleep(
+@@ -1660,7 +1673,7 @@ static int verify_shutdown_creds(
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
}
-- if (blocked) {
-+ if (blocked && !shutdown_through_acpi) {
- r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, &m->polkit_registry, error);
+- if (blocked && action_ignore_inhibit) {
++ if (blocked && action_ignore_inhibit && !shutdown_through_acpi) {
+ r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0)
return r;
-@@ -1549,7 +1561,7 @@ static int method_do_shutdown_or_sleep(
+@@ -1668,7 +1681,8 @@ static int verify_shutdown_creds(
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
}
-- if (!multiple_sessions && !blocked) {
-+ if (!multiple_sessions && !blocked && !shutdown_through_acpi) {
- r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, &m->polkit_registry, error);
+- if (!multiple_sessions && !blocked && action) {
++ if (!multiple_sessions && !blocked && action &&
++ !shutdown_through_acpi) {
+ r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0)
return r;
+@@ -1716,7 +1730,7 @@ static int method_do_shutdown_or_sleep(
+ }
+
+ r = verify_shutdown_creds(m, message, w, interactive, action, action_multiple_sessions,
+- action_ignore_inhibit, error);
++ action_ignore_inhibit, error, sleep_verb);
+ if (r != 0)
+ return r;
+
+@@ -1896,7 +1910,8 @@ static int method_schedule_shutdown(sd_b
+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unsupported shutdown type");
+
+ r = verify_shutdown_creds(m, message, INHIBIT_SHUTDOWN, false,
+- action, action_multiple_sessions, action_ignore_inhibit, error);
++ action, action_multiple_sessions,
++ action_ignore_inhibit, error, "UNUSED");
+ if (r != 0)
+ return r;
+
++++++ 0001-let-systemctl-completion-ignore-at-names.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,5 +1,11 @@
---- systemd-210/shell-completion/bash/systemctl.in
-+++ systemd-210/shell-completion/bash/systemctl.in 2014-08-20 15:01:04.502736981 +0000
+---
+ shell-completion/bash/systemctl.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: systemd-221/shell-completion/bash/systemctl.in
+===================================================================
+--- systemd-221.orig/shell-completion/bash/systemctl.in
++++ systemd-221/shell-completion/bash/systemctl.in
@@ -43,7 +43,7 @@ __filter_units_by_property () {
local units=("$@")
local props
++++++ 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -8,12 +8,14 @@
This belongs to BNC#852015 and also to BNC#855160
---
- pam_systemd.c | 19 +++++++++++++++++++
+ src/login/pam_systemd.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
---- systemd-209/src/login/pam_systemd.c
-+++ systemd-209/src/login/pam_systemd.c 2014-02-26 14:31:30.158235525 +0000
-@@ -447,6 +447,25 @@ _public_ PAM_EXTERN int pam_sm_open_sess
+Index: systemd-221/src/login/pam_systemd.c
+===================================================================
+--- systemd-221.orig/src/login/pam_systemd.c
++++ systemd-221/src/login/pam_systemd.c
+@@ -445,6 +445,25 @@ _public_ PAM_EXTERN int pam_sm_open_sess
r = export_legacy_dbus_address(handle, pw->pw_uid, runtime_path);
if (r != PAM_SUCCESS)
return r;
++++++ 0010-do-not-install-sulogin-unit-with-poweroff.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -2,9 +2,15 @@
| Belongs to bnc#849071 that is do not install console-shell.service
| in any system target as this will cause automatic poweroff at boot.
|
---- systemd-208/units/console-shell.service.m4.in
-+++ systemd-208/units/console-shell.service.m4.in 2013-11-06 09:35:37.958693570 +0000
-@@ -26,6 +26,3 @@ StandardError=inherit
+---
+ units/console-shell.service.m4.in | 3 ---
+ 1 file changed, 3 deletions(-)
+
+Index: systemd-221/units/console-shell.service.m4.in
+===================================================================
+--- systemd-221.orig/units/console-shell.service.m4.in
++++ systemd-221/units/console-shell.service.m4.in
+@@ -28,6 +28,3 @@ StandardError=inherit
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
++++++ 0014-journald-with-journaling-FS.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -13,10 +13,10 @@
src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
-Index: systemd/src/journal/journald-server.c
+Index: systemd-221/src/journal/journald-server.c
===================================================================
---- systemd.orig/src/journal/journald-server.c
-+++ systemd/src/journal/journald-server.c
+--- systemd-221.orig/src/journal/journald-server.c
++++ systemd-221/src/journal/journald-server.c
@@ -21,6 +21,7 @@
#include <sys/signalfd.h>
@@ -25,7 +25,7 @@
#include <linux/sockios.h>
#include <sys/statvfs.h>
#include <sys/mman.h>
-@@ -917,6 +918,38 @@ finish:
+@@ -918,6 +919,38 @@ finish:
dispatch_message_real(s, iovec, n, m, ucred, tv, label, label_len, unit_id, priority, object_pid);
}
@@ -64,7 +64,7 @@
static int system_journal_open(Server *s, bool flush_requested) {
int r;
-@@ -946,6 +979,7 @@ static int system_journal_open(Server *s
+@@ -947,6 +980,7 @@ static int system_journal_open(Server *s
fn = strjoina("/var/log/journal/", ids);
(void) mkdir(fn, 0755);
++++++ 0019-make-completion-smart-to-be-able-to-redirect.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -12,10 +12,10 @@
shell-completion/bash/udevadm | 6 +++++-
11 files changed, 70 insertions(+), 11 deletions(-)
-Index: systemd/shell-completion/bash/coredumpctl
+Index: systemd-221/shell-completion/bash/coredumpctl
===================================================================
---- systemd.orig/shell-completion/bash/coredumpctl
-+++ systemd/shell-completion/bash/coredumpctl
+--- systemd-221.orig/shell-completion/bash/coredumpctl
++++ systemd-221/shell-completion/bash/coredumpctl
@@ -44,6 +44,10 @@ _coredumpctl() {
[DUMP]='dump gdb'
)
@@ -33,10 +33,10 @@
-complete -F _coredumpctl coredumpctl
+complete -o default -o bashdefault -F _coredumpctl coredumpctl
-Index: systemd/shell-completion/bash/hostnamectl
+Index: systemd-221/shell-completion/bash/hostnamectl
===================================================================
---- systemd.orig/shell-completion/bash/hostnamectl
-+++ systemd/shell-completion/bash/hostnamectl
+--- systemd-221.orig/shell-completion/bash/hostnamectl
++++ systemd-221/shell-completion/bash/hostnamectl
@@ -30,6 +30,10 @@ _hostnamectl() {
local OPTS='-h --help --version --transient --static --pretty
--no-ask-password -H --host --machine'
@@ -54,10 +54,10 @@
-complete -F _hostnamectl hostnamectl
+complete -o default -o bashdefault -F _hostnamectl hostnamectl
-Index: systemd/shell-completion/bash/journalctl
+Index: systemd-221/shell-completion/bash/journalctl
===================================================================
---- systemd.orig/shell-completion/bash/journalctl
-+++ systemd/shell-completion/bash/journalctl
+--- systemd-221.orig/shell-completion/bash/journalctl
++++ systemd-221/shell-completion/bash/journalctl
@@ -55,6 +55,10 @@ _journalctl() {
--root --machine'
)
@@ -75,10 +75,10 @@
-complete -F _journalctl journalctl
+complete -o default -o bashdefault -F _journalctl journalctl
-Index: systemd/shell-completion/bash/kernel-install
+Index: systemd-221/shell-completion/bash/kernel-install
===================================================================
---- systemd.orig/shell-completion/bash/kernel-install
-+++ systemd/shell-completion/bash/kernel-install
+--- systemd-221.orig/shell-completion/bash/kernel-install
++++ systemd-221/shell-completion/bash/kernel-install
@@ -18,11 +18,22 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
@@ -108,10 +108,10 @@
-complete -F _kernel_install kernel-install
+complete -o default -o bashdefault -F _kernel_install kernel-install
-Index: systemd/shell-completion/bash/localectl
+Index: systemd-221/shell-completion/bash/localectl
===================================================================
---- systemd.orig/shell-completion/bash/localectl
-+++ systemd/shell-completion/bash/localectl
+--- systemd-221.orig/shell-completion/bash/localectl
++++ systemd-221/shell-completion/bash/localectl
@@ -36,6 +36,10 @@ _localectl() {
local OPTS='-h --help --version --no-convert --no-pager --no-ask-password
-H --host --machine'
@@ -129,10 +129,10 @@
-complete -F _localectl localectl
+complete -o default -o bashdefault -F _localectl localectl
-Index: systemd/shell-completion/bash/loginctl
+Index: systemd-221/shell-completion/bash/loginctl
===================================================================
---- systemd.orig/shell-completion/bash/loginctl
-+++ systemd/shell-completion/bash/loginctl
+--- systemd-221.orig/shell-completion/bash/loginctl
++++ systemd-221/shell-completion/bash/loginctl
@@ -38,6 +38,10 @@ _loginctl () {
[ARG]='--host -H --kill-who --property -p --signal -s --machine'
)
@@ -150,12 +150,12 @@
-complete -F _loginctl loginctl
+complete -o default -o bashdefault -F _loginctl loginctl
-Index: systemd/shell-completion/bash/systemctl.in
+Index: systemd-221/shell-completion/bash/systemctl.in
===================================================================
---- systemd.orig/shell-completion/bash/systemctl.in
-+++ systemd/shell-completion/bash/systemctl.in
+--- systemd-221.orig/shell-completion/bash/systemctl.in
++++ systemd-221/shell-completion/bash/systemctl.in
@@ -96,6 +96,10 @@ _systemctl () {
- [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --root'
+ [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root'
)
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
@@ -165,16 +165,16 @@
if __contains_word "--user" ${COMP_WORDS[*]}; then
mode=--user
else
-@@ -264,4 +268,4 @@ _systemctl () {
+@@ -268,4 +272,4 @@ _systemctl () {
return 0
}
-complete -F _systemctl systemctl
+complete -o default -o bashdefault -F _systemctl systemctl
-Index: systemd/shell-completion/bash/systemd-analyze
+Index: systemd-221/shell-completion/bash/systemd-analyze
===================================================================
---- systemd.orig/shell-completion/bash/systemd-analyze
-+++ systemd/shell-completion/bash/systemd-analyze
+--- systemd-221.orig/shell-completion/bash/systemd-analyze
++++ systemd-221/shell-completion/bash/systemd-analyze
@@ -47,6 +47,10 @@ _systemd_analyze() {
[VERIFY]='verify'
)
@@ -192,10 +192,10 @@
-complete -F _systemd_analyze systemd-analyze
+complete -o default -o bashdefault -F _systemd_analyze systemd-analyze
-Index: systemd/shell-completion/bash/systemd-run
+Index: systemd-221/shell-completion/bash/systemd-run
===================================================================
---- systemd.orig/shell-completion/bash/systemd-run
-+++ systemd/shell-completion/bash/systemd-run
+--- systemd-221.orig/shell-completion/bash/systemd-run
++++ systemd-221/shell-completion/bash/systemd-run
@@ -17,6 +17,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
@@ -228,10 +228,10 @@
-complete -F _systemd_run systemd-run
+complete -o default -o bashdefault -F _systemd_run systemd-run
-Index: systemd/shell-completion/bash/timedatectl
+Index: systemd-221/shell-completion/bash/timedatectl
===================================================================
---- systemd.orig/shell-completion/bash/timedatectl
-+++ systemd/shell-completion/bash/timedatectl
+--- systemd-221.orig/shell-completion/bash/timedatectl
++++ systemd-221/shell-completion/bash/timedatectl
@@ -30,6 +30,10 @@ _timedatectl() {
local OPTS='-h --help --version --adjust-system-clock --no-pager
--no-ask-password -H --host --machine'
@@ -249,10 +249,10 @@
-complete -F _timedatectl timedatectl
+complete -o default -o bashdefault -F _timedatectl timedatectl
-Index: systemd/shell-completion/bash/udevadm
+Index: systemd-221/shell-completion/bash/udevadm
===================================================================
---- systemd.orig/shell-completion/bash/udevadm
-+++ systemd/shell-completion/bash/udevadm
+--- systemd-221.orig/shell-completion/bash/udevadm
++++ systemd-221/shell-completion/bash/udevadm
@@ -36,6 +36,10 @@ _udevadm() {
local verbs=(info trigger settle control monitor hwdb test-builtin test)
++++++ 1001-re-enable-by_path-links-for-ata-devices.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -25,11 +25,11 @@
src/udev/udev-builtin-path_id.c | 53 ++++++++++++++++++++++++++++++----------
1 file changed, 41 insertions(+), 12 deletions(-)
-Index: systemd-218/src/udev/udev-builtin-path_id.c
+Index: systemd-221/src/udev/udev-builtin-path_id.c
===================================================================
---- systemd-218.orig/src/udev/udev-builtin-path_id.c
-+++ systemd-218/src/udev/udev-builtin-path_id.c
-@@ -426,6 +426,46 @@ static struct udev_device *handle_scsi_h
+--- systemd-221.orig/src/udev/udev-builtin-path_id.c
++++ systemd-221/src/udev/udev-builtin-path_id.c
+@@ -447,6 +447,46 @@ static struct udev_device *handle_scsi_h
return parent;
}
@@ -76,7 +76,7 @@
static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) {
const char *devtype;
const char *name;
-@@ -465,19 +505,8 @@ static struct udev_device *handle_scsi(s
+@@ -486,19 +526,8 @@ static struct udev_device *handle_scsi(s
goto out;
}
++++++ 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -4,12 +4,14 @@
Re-enable creation of by-id scsi links for ATA devices. (bnc#769002)
---
- rules/60-persistent-storage.rules | 4 ++++
+ rules/60-persistent-storage.rules | 4 ++++
1 file changed, 4 insertions(+)
---- systemd-206.orig/rules/60-persistent-storage.rules
-+++ systemd-206/rules/60-persistent-storage.rules
-@@ -42,6 +42,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk",
+Index: systemd-221/rules/60-persistent-storage.rules
+===================================================================
+--- systemd-221.orig/rules/60-persistent-storage.rules
++++ systemd-221/rules/60-persistent-storage.rules
+@@ -36,6 +36,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk",
KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
@@ -17,6 +19,6 @@
+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n"
+
- # firewire
+ # FireWire
KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}"
KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n"
++++++ 1003-udev-netlink-null-rules.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -7,16 +7,16 @@
src/udev/udevd.c | 2 ++
1 file changed, 2 insertions(+)
-Index: systemd-218/src/udev/udevd.c
+Index: systemd-221/src/udev/udevd.c
===================================================================
---- systemd-218.orig/src/udev/udevd.c
-+++ systemd-218/src/udev/udevd.c
-@@ -1468,6 +1468,8 @@ int main(int argc, char *argv[]) {
- dev = udev_monitor_receive_device(monitor);
- if (dev != NULL) {
- udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC));
-+ if (rules == NULL)
-+ rules = udev_rules_new(udev, arg_resolve_names);
- if (event_queue_insert(dev) < 0)
- udev_device_unref(dev);
- }
+--- systemd-221.orig/src/udev/udevd.c
++++ systemd-221/src/udev/udevd.c
+@@ -917,6 +917,8 @@ static int on_uevent(sd_event_source *s,
+ dev = udev_monitor_receive_device(manager->monitor);
+ if (dev) {
+ udev_device_ensure_usec_initialized(dev, NULL);
++ if (manager->rules == NULL)
++ manager->rules = udev_rules_new(manager->udev, arg_resolve_names);
+ r = event_queue_insert(manager, dev);
+ if (r < 0)
+ udev_device_unref(dev);
++++++ 1005-create-default-links-for-primary-cd_dvd-drive.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -7,10 +7,10 @@
rules/60-cdrom_id.rules | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
-Index: systemd/rules/60-cdrom_id.rules
+Index: systemd-221/rules/60-cdrom_id.rules
===================================================================
---- systemd.orig/rules/60-cdrom_id.rules
-+++ systemd/rules/60-cdrom_id.rules
+--- systemd-221.orig/rules/60-cdrom_id.rules
++++ systemd-221/rules/60-cdrom_id.rules
@@ -20,6 +20,9 @@ IMPORT{program}="cdrom_id --lock-media $
# stale mounts after ejecting
ENV{DISK_MEDIA_CHANGE}=="?*", ENV{ID_CDROM_MEDIA}!="?*", ENV{SYSTEMD_READY}="0"
++++++ 1006-udev-always-rename-network.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -13,11 +13,11 @@
1 file changed, 37 insertions(+), 4 deletions(-)
-Index: systemd-218/src/udev/udev-event.c
+Index: systemd-221/src/udev/udev-event.c
===================================================================
---- systemd-218.orig/src/udev/udev-event.c
-+++ systemd-218/src/udev/udev-event.c
-@@ -767,20 +767,53 @@ out:
+--- systemd-221.orig/src/udev/udev-event.c
++++ systemd-221/src/udev/udev-event.c
+@@ -796,20 +796,53 @@ out:
static int rename_netif(struct udev_event *event) {
struct udev_device *dev = event->dev;
char name[IFNAMSIZ];
@@ -50,7 +50,7 @@
+ oldname, interim, strerror(-r));
+ return r;
+ }
-+
++
+ /* log temporary name */
+ log_info("renamed network interface %s to %s\n", oldname, interim);
+
++++++ 1007-physical-hotplug-cpu-and-memory.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,5 +1,27 @@
---- systemd-210/rules/80-hotplug-cpu-mem.rules
-+++ systemd-210/rules/80-hotplug-cpu-mem.rules 2014-05-21 15:47:01.885605543 +0000
+---
+ Makefile.am | 4 ++++
+ rules/80-hotplug-cpu-mem.rules | 12 ++++++++++++
+ 2 files changed, 16 insertions(+)
+
+Index: systemd-221/Makefile.am
+===================================================================
+--- systemd-221.orig/Makefile.am
++++ systemd-221/Makefile.am
+@@ -3841,6 +3841,10 @@ dist_udevrules_DATA += \
+ rules/73-seat-numlock.rules
+
+ # ------------------------------------------------------------------------------
++dist_udevrules_DATA += \
++ rules/80-hotplug-cpu-mem.rules
++
++# ------------------------------------------------------------------------------
+ mtd_probe_SOURCES = \
+ src/udev/mtd_probe/mtd_probe.c \
+ src/udev/mtd_probe/mtd_probe.h \
+Index: systemd-221/rules/80-hotplug-cpu-mem.rules
+===================================================================
+--- /dev/null
++++ systemd-221/rules/80-hotplug-cpu-mem.rules
@@ -0,0 +1,12 @@
+# do not edit this file, it will be overwritten on update
+
@@ -13,16 +35,3 @@
+
+#
+TAG=="tmpfs", RUN+="/usr/lib/udev/remount-tmpfs"
---- systemd-210/Makefile.am
-+++ systemd-210/Makefile.am
-@@ -2480,6 +2480,10 @@ dist_udevrules_DATA += \
- rules/73-seat-numlock.rules
-
- # ------------------------------------------------------------------------------
-+dist_udevrules_DATA += \
-+ rules/80-hotplug-cpu-mem.rules
-+
-+# ------------------------------------------------------------------------------
- if ENABLE_GUDEV
- if ENABLE_GTK_DOC
- SUBDIRS += \
++++++ 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -7,13 +7,13 @@
we shouldn't run any btrfs check on them.
---
- rules/64-btrfs.rules | 1 +
+ rules/64-btrfs.rules | 1 +
1 file changed, 1 insertion(+)
-diff --git a/rules/64-btrfs.rules b/rules/64-btrfs.rules
-index fe01001..57631bc 100644
---- a/rules/64-btrfs.rules
-+++ b/rules/64-btrfs.rules
+Index: systemd-221/rules/64-btrfs.rules
+===================================================================
+--- systemd-221.orig/rules/64-btrfs.rules
++++ systemd-221/rules/64-btrfs.rules
@@ -3,6 +3,7 @@
SUBSYSTEM!="block", GOTO="btrfs_end"
ACTION=="remove", GOTO="btrfs_end"
@@ -22,6 +22,3 @@
# let the kernel know about this btrfs filesystem, and check if it is complete
IMPORT{builtin}="btrfs ready $devnode"
---
-1.8.1.4
-
++++++ 1012-Skip-persistent-device-link-creation-on-multipath-de.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -10,15 +10,15 @@
Otherwise systemd will get confused about which device to use.
---
- rules/60-persistent-storage.rules | 7 +++++--
+ rules/60-persistent-storage.rules | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
-diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
-index 1208bd3..fd5bedd 100644
---- a/rules/60-persistent-storage.rules
-+++ b/rules/60-persistent-storage.rules
-@@ -39,8 +39,8 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin
- # scsi devices
+Index: systemd-221/rules/60-persistent-storage.rules
+===================================================================
+--- systemd-221.orig/rules/60-persistent-storage.rules
++++ systemd-221/rules/60-persistent-storage.rules
+@@ -33,8 +33,8 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!
+ # SCSI devices
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="scsi"
KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="cciss"
-KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
@@ -28,7 +28,7 @@
# scsi compat links for ATA devices
KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
-@@ -70,6 +70,9 @@ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DAT
+@@ -66,6 +66,9 @@ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!=
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
IMPORT{builtin}="blkid --noraid"
@@ -38,6 +38,3 @@
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{builtin}="blkid"
---
-1.8.1.4
-
++++++ 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -12,21 +12,18 @@
Signed-off-by: Hannes Reinecke <hare(a)suse.de>
---
- rules/99-systemd.rules.in | 1 +
+ rules/99-systemd.rules.in | 1 +
1 file changed, 1 insertion(+)
-diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
-index db72373..11ee262 100644
---- a/rules/99-systemd.rules.in
-+++ b/rules/99-systemd.rules.in
-@@ -11,6 +11,7 @@ SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270
-
+Index: systemd-221/rules/99-systemd.rules.in
+===================================================================
+--- systemd-221.orig/rules/99-systemd.rules.in
++++ systemd-221/rules/99-systemd.rules.in
+@@ -10,6 +10,7 @@ ACTION=="remove", GOTO="systemd_end"
+ SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd"
KERNEL=="vport*", TAG+="systemd"
-+SUBSYSTEM=="block", KERNEL!="ram*", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end"
- SUBSYSTEM=="block", KERNEL!="ram*", TAG+="systemd"
- SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
++SUBSYSTEM=="block", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end"
+ SUBSYSTEM=="block", TAG+="systemd"
+ SUBSYSTEM=="block", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
---
-1.8.4.5
-
++++++ 1037-udev-exclude-cd-dvd-from-block-device.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,8 +1,14 @@
Exclude cd/dvd as well (bnc#882714)
---- systemd-210/src/udev/udevd.c
-+++ systemd-210/src/udev/udevd.c 2014-06-18 12:53:34.454235577 +0000
-@@ -744,7 +744,8 @@ static int synthesize_change(struct udev
+---
+ src/udev/udevd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: systemd-221/src/udev/udevd.c
+===================================================================
+--- systemd-221.orig/src/udev/udevd.c
++++ systemd-221/src/udev/udevd.c
+@@ -1022,7 +1022,8 @@ static int synthesize_change(struct udev
if (streq_ptr("block", udev_device_get_subsystem(dev)) &&
streq_ptr("disk", udev_device_get_devtype(dev)) &&
++++++ 1060-udev-use-device-mapper-target-name-for-btrfs-device-ready.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -29,8 +29,10 @@
rules/64-btrfs.rules | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---- a/rules/64-btrfs.rules
-+++ b/rules/64-btrfs.rules
+Index: systemd-221/rules/64-btrfs.rules
+===================================================================
+--- systemd-221.orig/rules/64-btrfs.rules
++++ systemd-221/rules/64-btrfs.rules
@@ -6,7 +6,8 @@ ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_en
ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end"
++++++ 1062-rules-set-default-permissions-for-GenWQE-devices.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,11 +1,15 @@
-Index: systemd-210/rules/50-udev-default.rules
+---
+ rules/50-udev-default.rules | 2 ++
+ 1 file changed, 2 insertions(+)
+
+Index: systemd-221/rules/50-udev-default.rules
===================================================================
---- systemd-210.orig/rules/50-udev-default.rules
-+++ systemd-210/rules/50-udev-default.rules
-@@ -66,4 +66,6 @@ KERNEL=="tun", MODE="0666", OPTIONS+="st
+--- systemd-221.orig/rules/50-udev-default.rules
++++ systemd-221/rules/50-udev-default.rules
+@@ -74,4 +74,6 @@ KERNEL=="tun", MODE="0666", OPTIONS+="st
KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
+KERNEL=="genwqe*", MODE="0666"
+
- LABEL="default_permissions_end"
+ LABEL="default_end"
++++++ 1066-udev-add-compatibility-links-for-truncated-by-id-links.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -18,11 +18,11 @@
src/udev/scsi_id/scsi_serial.c | 19 +++++++++++++------
4 files changed, 32 insertions(+), 7 deletions(-)
-Index: systemd/rules/60-persistent-storage.rules
+Index: systemd-221/rules/60-persistent-storage.rules
===================================================================
---- systemd.orig/rules/60-persistent-storage.rules
-+++ systemd/rules/60-persistent-storage.rules
-@@ -46,6 +46,10 @@ KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="par
+--- systemd-221.orig/rules/60-persistent-storage.rules
++++ systemd-221/rules/60-persistent-storage.rules
+@@ -40,6 +40,10 @@ KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="par
KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n"
@@ -30,13 +30,13 @@
+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --truncated-serial --whitelisted --replace-whitespace -p0x80 -d$tempnode", RESULT=="?*", ENV{ID_SCSI_COMPAT_TRUNCATED}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}"
+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT_TRUNCATED}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}-part%n"
+
- # firewire
+ # FireWire
KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}"
KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n"
-Index: systemd/src/udev/scsi_id/scsi_id.c
+Index: systemd-221/src/udev/scsi_id/scsi_id.c
===================================================================
---- systemd.orig/src/udev/scsi_id/scsi_id.c
-+++ systemd/src/udev/scsi_id/scsi_id.c
+--- systemd-221.orig/src/udev/scsi_id/scsi_id.c
++++ systemd-221/src/udev/scsi_id/scsi_id.c
@@ -43,6 +43,7 @@ static const struct option options[] = {
{ "replace-whitespace", no_argument, NULL, 'u' },
{ "sg-version", required_argument, NULL, 's' },
@@ -94,11 +94,11 @@
util_replace_chars(serial_str, NULL);
printf("%s\n", serial_str);
goto out;
-Index: systemd/src/udev/scsi_id/scsi_id.h
+Index: systemd-221/src/udev/scsi_id/scsi_id.h
===================================================================
---- systemd.orig/src/udev/scsi_id/scsi_id.h
-+++ systemd/src/udev/scsi_id/scsi_id.h
-@@ -43,6 +43,7 @@ struct scsi_id_device {
+--- systemd-221.orig/src/udev/scsi_id/scsi_id.h
++++ systemd-221/src/udev/scsi_id/scsi_id.h
+@@ -45,6 +45,7 @@ struct scsi_id_device {
char kernel[64];
char serial[MAX_SERIAL_LEN];
char serial_short[MAX_SERIAL_LEN];
@@ -106,11 +106,11 @@
int use_sg;
/* Always from page 0x80 e.g. 'B3G1P8500RWT' - may not be unique */
-Index: systemd/src/udev/scsi_id/scsi_serial.c
+Index: systemd-221/src/udev/scsi_id/scsi_serial.c
===================================================================
---- systemd.orig/src/udev/scsi_id/scsi_serial.c
-+++ systemd/src/udev/scsi_id/scsi_serial.c
-@@ -96,7 +96,8 @@ static const char hex_str[]="0123456789a
+--- systemd-221.orig/src/udev/scsi_id/scsi_serial.c
++++ systemd-221/src/udev/scsi_id/scsi_serial.c
+@@ -97,7 +97,8 @@ static const char hex_str[]="0123456789a
static int do_scsi_page80_inquiry(struct udev *udev,
struct scsi_id_device *dev_scsi, int fd,
@@ -120,7 +120,7 @@
static int sg_err_category_new(struct udev *udev,
int scsi_status, int msg_status, int
-@@ -619,7 +620,7 @@ static int do_scsi_page83_inquiry(struct
+@@ -620,7 +621,7 @@ static int do_scsi_page83_inquiry(struct
unsigned char page_83[SCSI_INQ_BUFF_LEN];
/* also pick up the page 80 serial number */
@@ -129,7 +129,7 @@
memzero(page_83, SCSI_INQ_BUFF_LEN);
retval = scsi_inquiry(udev, dev_scsi, fd, 1, PAGE_83, page_83,
-@@ -764,7 +765,8 @@ static int do_scsi_page83_prespc3_inquir
+@@ -765,7 +766,8 @@ static int do_scsi_page83_prespc3_inquir
/* Get unit serial number VPD page */
static int do_scsi_page80_inquiry(struct udev *udev,
struct scsi_id_device *dev_scsi, int fd,
@@ -139,7 +139,7 @@
{
int retval;
int ser_ind;
-@@ -798,9 +800,14 @@ static int do_scsi_page80_inquiry(struct
+@@ -799,9 +801,14 @@ static int do_scsi_page80_inquiry(struct
ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]);
if (ser_ind < 0)
return 1;
@@ -155,7 +155,7 @@
}
if (serial_short != NULL) {
memcpy(serial_short, &buf[4], len);
-@@ -876,7 +883,7 @@ int scsi_get_serial(struct udev *udev,
+@@ -877,7 +884,7 @@ int scsi_get_serial(struct udev *udev,
return 1;
if (page_code == PAGE_80) {
@@ -164,7 +164,7 @@
retval = 1;
goto completed;
} else {
-@@ -950,7 +957,7 @@ int scsi_get_serial(struct udev *udev,
+@@ -951,7 +958,7 @@ int scsi_get_serial(struct udev *udev,
for (ind = 4; ind <= page0[3] + 3; ind++)
if (page0[ind] == PAGE_80)
if (!do_scsi_page80_inquiry(udev, dev_scsi, fd,
++++++ 1095-set-ssd-disk-to-use-deadline-scheduler.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -3,22 +3,22 @@
rules/60-ssd-scheduler.rules | 11 +++++++++++
2 files changed, 12 insertions(+)
-Index: systemd/Makefile.am
+Index: systemd-221/Makefile.am
===================================================================
---- systemd.orig/Makefile.am
-+++ systemd/Makefile.am
-@@ -3576,6 +3576,7 @@ dist_udevrules_DATA += \
+--- systemd-221.orig/Makefile.am
++++ systemd-221/Makefile.am
+@@ -3501,6 +3501,7 @@ dist_udevrules_DATA += \
rules/60-persistent-input.rules \
rules/60-persistent-alsa.rules \
rules/60-persistent-storage.rules \
+ rules/60-ssd-scheduler.rules \
+ rules/60-serial.rules \
rules/64-btrfs.rules \
rules/70-mouse.rules \
- rules/70-touchpad.rules \
-Index: systemd/rules/60-ssd-scheduler.rules
+Index: systemd-221/rules/60-ssd-scheduler.rules
===================================================================
--- /dev/null
-+++ systemd/rules/60-ssd-scheduler.rules
++++ systemd-221/rules/60-ssd-scheduler.rules
@@ -0,0 +1,11 @@
+# do not edit this file, it will be overwritten on update
+
++++++ 1096-new-udev-root-symlink-generator.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -5,12 +5,10 @@
units/systemd-udev-root-symlink.service.in | 10 ++
4 files changed, 96 insertions(+)
-Index: systemd/Makefile.am
-===================================================================
---- systemd.orig/Makefile.am
-+++ systemd/Makefile.am
-@@ -3862,6 +3862,25 @@ EXTRA_DIST += \
-
+--- systemd-222.orig/Makefile.am
++++ systemd-222/Makefile.am
+@@ -3759,6 +3759,25 @@ EXTRA_DIST += \
+ test/mocks/fsck
# ------------------------------------------------------------------------------
+rootsymlink_generator_SOURCES = \
@@ -35,10 +33,8 @@
ata_id_SOURCES = \
src/udev/ata_id/ata_id.c
-Index: systemd/src/udev/rootsymlink_generator/rootsymlink_generator.c
-===================================================================
--- /dev/null
-+++ systemd/src/udev/rootsymlink_generator/rootsymlink_generator.c
++++ systemd-222/src/udev/rootsymlink_generator/rootsymlink_generator.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2014-2015 Robert Milasan <rmilasan(a)suse.com>
@@ -97,10 +93,8 @@
+ return errno;
+ return 0;
+}
-Index: systemd/units/systemd-udev-root-symlink.service
-===================================================================
--- /dev/null
-+++ systemd/units/systemd-udev-root-symlink.service
++++ systemd-222/units/systemd-udev-root-symlink.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Rule generator for /dev/root symlink
@@ -112,10 +106,8 @@
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/udev/rootsymlink-generator
-Index: systemd/units/systemd-udev-root-symlink.service.in
-===================================================================
--- /dev/null
-+++ systemd/units/systemd-udev-root-symlink.service.in
++++ systemd-222/units/systemd-udev-root-symlink.service.in
@@ -0,0 +1,10 @@
+[Unit]
+Description=Rule generator for /dev/root symlink
++++++ 1097-udevd-increase-maximum-number-of-children.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -2,25 +2,25 @@
src/udev/udevd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-Index: systemd-218/src/udev/udevd.c
+Index: systemd-221/src/udev/udevd.c
===================================================================
---- systemd-218.orig/src/udev/udevd.c
-+++ systemd-218/src/udev/udevd.c
-@@ -446,7 +446,7 @@ static void event_run(struct event *even
+--- systemd-221.orig/src/udev/udevd.c
++++ systemd-221/src/udev/udevd.c
+@@ -569,7 +569,7 @@ static void event_run(Manager *manager,
- if (children >= arg_children_max) {
+ if (hashmap_size(manager->workers) >= arg_children_max) {
if (arg_children_max > 1)
-- log_debug("maximum number (%i) of children reached", children);
-+ log_error("maximum number (%i) of children reached", children);
+- log_debug("maximum number (%i) of children reached", hashmap_size(manager->workers));
++ log_error("maximum number (%i) of children reached", hashmap_size(manager->workers));
return;
}
-@@ -1265,7 +1265,7 @@ int main(int argc, char *argv[]) {
+@@ -1641,7 +1641,7 @@ int main(int argc, char *argv[]) {
arg_children_max = 8;
if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
-- arg_children_max += CPU_COUNT(&cpu_set) * 2;
+- arg_children_max += CPU_COUNT(&cpu_set) * 2;
+ arg_children_max += CPU_COUNT(&cpu_set) * 64;
}
- }
- log_debug("set children_max to %u", arg_children_max);
+
+ log_debug("set children_max to %u", arg_children_max);
++++++ 1098-systemd-networkd-alias-network-service.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,8 +1,12 @@
-Index: systemd-219/units/systemd-networkd.service.in
+---
+ units/systemd-networkd.service.m4.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: systemd-221/units/systemd-networkd.service.m4.in
===================================================================
---- systemd-219.orig/units/systemd-networkd.service.in
-+++ systemd-219/units/systemd-networkd.service.in
-@@ -29,4 +29,5 @@ WatchdogSec=1min
+--- systemd-221.orig/units/systemd-networkd.service.m4.in
++++ systemd-221/units/systemd-networkd.service.m4.in
+@@ -34,4 +34,5 @@ WatchdogSec=1min
[Install]
WantedBy=multi-user.target
++++++ Correct_assert_on_unexpected_error_code.patch ++++++
---
src/login/pam_systemd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- src/login/pam_systemd.c
+++ src/login/pam_systemd.c 2015-07-29 08:52:20.762018565 +0000
@@ -507,7 +507,11 @@ _public_ PAM_EXTERN int pam_sm_open_sess
r = pam_set_data(handle, "systemd.session-fd", INT_TO_PTR(session_fd+1), NULL);
if (r != PAM_SUCCESS) {
pam_syslog(handle, LOG_ERR, "Failed to install session fd.");
- safe_close(session_fd);
+ if (session_fd >= 0) {
+ PROTECT_ERRNO;
+ if (_unlikely_(!(close_nointr(session_fd) != -EBADF)))
+ pam_syslog(handle, LOG_ERR, "Unexpected error code on closing session fd: %m");
+ }
return r;
}
}
++++++ Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -8,10 +8,10 @@
tmpfiles.d/legacy.conf | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
-Index: systemd-218/tmpfiles.d/legacy.conf
+Index: systemd-221/tmpfiles.d/legacy.conf
===================================================================
---- systemd-218.orig/tmpfiles.d/legacy.conf
-+++ systemd-218/tmpfiles.d/legacy.conf
+--- systemd-221.orig/tmpfiles.d/legacy.conf
++++ systemd-221/tmpfiles.d/legacy.conf
@@ -10,13 +10,14 @@
# These files are considered legacy and are unnecessary on legacy-free
# systems.
@@ -36,5 +36,5 @@
-d /run/lock/lockdev 0775 root lock -
+#d /run/lock/lockdev 0775 root lock -
- # /forcefsck, /fastboot and /forcequotecheck are deprecated in favor of the
+ # /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the
# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and
++++++ after-local.service ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -15,4 +15,3 @@
ExecStart=/etc/init.d/after.local
TimeoutSec=0
RemainAfterExit=yes
-SysVStartPriority=99
++++++ allow-multiple-sulogin-to-be-started.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -4,13 +4,15 @@
allows multiple sulogin instance (bnc#793182).
---
- units/getty@.service.m4 | 1 +
- units/rescue.target | 1 +
- units/serial-getty@.service.m4 | 1 +
+ units/getty@.service.m4 | 1 +
+ units/rescue.target | 1 +
+ units/serial-getty@.service.m4 | 1 +
3 files changed, 3 insertions(+)
---- systemd-206.orig/units/getty@.service.m4
-+++ systemd-206/units/getty@.service.m4
+Index: systemd-221/units/getty@.service.m4
+===================================================================
+--- systemd-221.orig/units/getty@.service.m4
++++ systemd-221/units/getty@.service.m4
@@ -9,6 +9,7 @@
Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
@@ -19,8 +21,10 @@
After=systemd-user-sessions.service plymouth-quit-wait.service
m4_ifdef(`HAVE_SYSV_COMPAT',
After=rc-local.service
---- systemd-206.orig/units/rescue.target
-+++ systemd-206/units/rescue.target
+Index: systemd-221/units/rescue.target
+===================================================================
+--- systemd-221.orig/units/rescue.target
++++ systemd-221/units/rescue.target
@@ -10,6 +10,7 @@ Description=Rescue Mode
Documentation=man:systemd.special(7)
Requires=sysinit.target rescue.service
@@ -29,8 +33,10 @@
AllowIsolate=yes
[Install]
---- systemd-206.orig/units/serial-getty@.service.m4
-+++ systemd-206/units/serial-getty@.service.m4
+Index: systemd-221/units/serial-getty@.service.m4
+===================================================================
+--- systemd-221.orig/units/serial-getty@.service.m4
++++ systemd-221/units/serial-getty@.service.m4
@@ -10,6 +10,7 @@ Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
++++++ apply-ACL-for-nvidia-device-nodes.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -4,14 +4,14 @@
set ACL on nvidia devices (bnc#808319).
---
- logind-acl.c | 12 ++++++++++++
+ src/login/logind-acl.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
-Index: systemd-210/src/login/logind-acl.c
+Index: systemd-221/src/login/logind-acl.c
===================================================================
---- systemd-210.orig/src/login/logind-acl.c
-+++ systemd-210/src/login/logind-acl.c
-@@ -283,5 +283,17 @@ int devnode_acl_all(struct udev *udev,
+--- systemd-221.orig/src/login/logind-acl.c
++++ systemd-221/src/login/logind-acl.c
+@@ -285,5 +285,17 @@ int devnode_acl_all(struct udev *udev,
r = k;
}
++++++ apply-ACL-for-nvidia-uvm-device-node.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -5,13 +5,13 @@
set ACL on nvidia-uvm device (bnc#879767).
---
- src/login/logind-acl.c | 2 ++
+ src/login/logind-acl.c | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c
-index 54bc16b..a40af21 100644
---- a/src/login/logind-acl.c
-+++ b/src/login/logind-acl.c
+Index: systemd-221/src/login/logind-acl.c
+===================================================================
+--- systemd-221.orig/src/login/logind-acl.c
++++ systemd-221/src/login/logind-acl.c
@@ -295,6 +295,8 @@ int devnode_acl_all(struct udev *udev,
if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0)
break;
@@ -21,6 +21,3 @@
}
return r;
---
-1.8.4.5
-
++++++ avoid-divide-by-zero-sigtrap.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,8 +1,28 @@
Nasty bug reported on bnc#867663
---- systemd-210/src/core/manager.c
-+++ systemd-210/src/core/manager.c 2014-04-17 13:29:07.366236714 +0000
-@@ -1780,7 +1780,8 @@ static int manager_dispatch_jobs_in_prog
+---
+ src/basic/def.h | 2 +-
+ src/core/manager.c | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+Index: systemd-221/src/basic/def.h
+===================================================================
+--- systemd-221.orig/src/basic/def.h
++++ systemd-221/src/basic/def.h
+@@ -37,7 +37,7 @@
+
+ #define SYSTEMD_CGROUP_CONTROLLER "systemd"
+
+-#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
++#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT,SIGTRAP,SIGSYS
+ #define SIGNALS_IGNORE SIGPIPE
+
+ #define DIGITS "0123456789"
+Index: systemd-221/src/core/manager.c
+===================================================================
+--- systemd-221.orig/src/core/manager.c
++++ systemd-221/src/core/manager.c
+@@ -1991,7 +1991,8 @@ static int manager_dispatch_jobs_in_prog
assert(m);
assert(source);
@@ -12,14 +32,3 @@
next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_PERIOD_USEC;
r = sd_event_source_set_time(source, next);
---- systemd-210/src/shared/def.h
-+++ systemd-210/src/shared/def.h 2014-04-17 13:47:10.946234983 +0000
-@@ -37,7 +37,7 @@
-
- #define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
-
--#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
-+#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT,SIGTRAP,SIGSYS
- #define SIGNALS_IGNORE SIGPIPE
-
- #define DIGITS "0123456789"
++++++ avoid-random-hangs-on-timeouts-due-lost-cwd.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -7,8 +7,14 @@
which then caused the subsequent fault that umounting the users
home directories done by automount are busy.
---- systemd-210/units/user/systemd-exit.service.in
-+++ systemd-210/units/user/systemd-exit.service.in 2014-03-25 16:59:20.406235916 +0000
+---
+ units/user/systemd-exit.service.in | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+Index: systemd-221/units/user/systemd-exit.service.in
+===================================================================
+--- systemd-221.orig/units/user/systemd-exit.service.in
++++ systemd-221/units/user/systemd-exit.service.in
@@ -10,8 +10,9 @@ Description=Exit the Session
Documentation=man:systemd.special(7)
DefaultDependencies=no
++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -2,9 +2,7 @@
supplements "packageand(systemd:pam-<targettype>)"
-/lib/systemd/system/
post "<prefix>%{_sbindir}/pam-config -a --systemd || :"
-# postun "if [ "$1" == "0" ]; then"
-# postun "<prefix>%{_sbindir}/pam-config -d --systemd || :"
-# postun "fi"
-libgudev-1_0-0
+libsystemd0
libudev1
nss-myhostname
+nss-mymachines
++++++ boot-local-start.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,6 +1,11 @@
-diff -Naur systemd-210/units/rc-local.service.in systemd-210-mod/units/rc-local.service.in
---- systemd-210/units/rc-local.service.in 2013-08-13 22:02:52.788756123 +0200
-+++ systemd-210-mod/units/rc-local.service.in 2014-03-25 08:34:40.317587764 +0100
+---
+ units/rc-local.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: systemd-221/units/rc-local.service.in
+===================================================================
+--- systemd-221.orig/units/rc-local.service.in
++++ systemd-221/units/rc-local.service.in
@@ -10,7 +10,7 @@
[Unit]
Description=@RC_LOCAL_SCRIPT_PATH_START@ Compatibility
++++++ ensure-ask-password-wall-starts-after-getty-tty1.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -9,8 +9,10 @@
units/systemd-ask-password-wall.service.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---- systemd-206_git201308300826.orig/units/systemd-ask-password-wall.service.in
-+++ systemd-206_git201308300826/units/systemd-ask-password-wall.service.in
+Index: systemd-221/units/systemd-ask-password-wall.service.in
+===================================================================
+--- systemd-221.orig/units/systemd-ask-password-wall.service.in
++++ systemd-221/units/systemd-ask-password-wall.service.in
@@ -8,7 +8,8 @@
[Unit]
Description=Forward Password Requests to Wall
++++++ ensure-shortname-is-set-as-hostname-bnc-820213.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -4,30 +4,28 @@
strip hostname so the domain part isn't set as part of the hostname
---
- src/core/hostname-setup.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
+ src/core/hostname-setup.c | 4 ++++
+ 1 file changed, 4 insertions(+)
-Index: systemd-218/src/core/hostname-setup.c
+Index: systemd-221/src/core/hostname-setup.c
===================================================================
---- systemd-218.orig/src/core/hostname-setup.c
-+++ systemd-218/src/core/hostname-setup.c
-@@ -32,7 +32,7 @@
- #include "fileio.h"
-
- static int read_and_strip_hostname(const char *path, char **hn) {
-- char *s;
-+ char *s, *domain;
+--- systemd-221.orig/src/core/hostname-setup.c
++++ systemd-221/src/core/hostname-setup.c
+@@ -34,6 +34,7 @@ int hostname_setup(void) {
int r;
+ _cleanup_free_ char *b = NULL;
+ const char *hn;
++ char *domain;
+ bool enoent = false;
- assert(path);
-@@ -49,6 +49,10 @@ static int read_and_strip_hostname(const
- return -ENOENT;
- }
-
+ r = read_hostname_config("/etc/hostname", &b);
+@@ -46,6 +47,9 @@ int hostname_setup(void) {
+ hn = NULL;
+ } else
+ hn = b;
+ /* strip any leftover of a domain name */
-+ if ((domain = strchr(s, '.')) != NULL)
++ if ((domain = strchr(hn, '.')) != NULL)
+ *domain = '\0';
-+
- *hn = s;
- return 0;
- }
+
+ if (isempty(hn)) {
+ /* Don't override the hostname if it is already set
++++++ fix-support-for-boot-prefixed-initscript-bnc-746506.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -3,14 +3,14 @@
Subject: fix support for boot prefixed initscript (bnc#746506)
---
- src/systemctl/systemctl.c | 20 +++++++++++++++++++-
- 1 file changed, 19 insertions(+), 1 deletion(-)
+ src/systemctl/systemctl.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
-Index: systemd-218/src/systemctl/systemctl.c
+Index: systemd-221/src/systemctl/systemctl.c
===================================================================
---- systemd-218.orig/src/systemctl/systemctl.c
-+++ systemd-218/src/systemctl/systemctl.c
-@@ -5202,8 +5202,26 @@ static int enable_sysv_units(const char
+--- systemd-221.orig/src/systemctl/systemctl.c
++++ systemd-221/src/systemctl/systemctl.c
+@@ -5165,8 +5165,24 @@ static int enable_sysv_units(const char
p[strlen(p) - strlen(".service")] = 0;
found_sysv = access(p, F_OK) >= 0;
@@ -27,14 +27,12 @@
+ return -ENOMEM;
+ p[strlen(p) - sizeof(".service") + 1] = 0;
+ found_sysv = access(p, F_OK) >= 0;
-+
-+ if (!found_sysv) {
++ if (!found_sysv)
+ continue;
-+ }
+#else
continue;
+#endif
+ }
- log_info("%s is not a native service, redirecting to /sbin/chkconfig.", name);
-
+ if (found_native)
+ log_info("Synchronizing state of %s with SysV init with %s...", name, argv[0]);
++++++ handle-disable_caplock-and-compose_table-and-kbd_rate.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:54.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:54.000000000 +0200
@@ -1,36 +1,41 @@
-From: Frederic Crozat <fcrozat(a)suse.com>
-Date: Fri, 19 Aug 2011 15:29:49 +0000
+Original-From: Frederic Crozat <fcrozat(a)suse.com>
+Original-Date: Fri, 19 Aug 2011 15:29:49 +0000
Subject: handle disable_caplock and compose_table and kbd_rate
+References: https://bugzilla.opensuse.org/746595
+Last-Editor: Jan Engelhardt <jengelh(a)inai.de>
+Date: Fri Jun 19 21:36:27 CEST 2015
-(bnc#746595)
---
- src/vconsole/vconsole-setup.c | 151 +++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 148 insertions(+), 3 deletions(-)
+ src/vconsole/vconsole-setup.c | 151 ++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 147 insertions(+), 4 deletions(-)
-Index: systemd-218/src/vconsole/vconsole-setup.c
+Index: systemd-221/src/vconsole/vconsole-setup.c
===================================================================
---- systemd-218.orig/src/vconsole/vconsole-setup.c
-+++ systemd-218/src/vconsole/vconsole-setup.c
-@@ -40,6 +40,7 @@
- #include "macro.h"
+--- systemd-221.orig/src/vconsole/vconsole-setup.c
++++ systemd-221/src/vconsole/vconsole-setup.c
+@@ -35,6 +35,8 @@
+ #include "log.h"
#include "virt.h"
#include "fileio.h"
++#include "macro.h"
+#include "strv.h"
-
- static bool is_vconsole(int fd) {
- unsigned char data[1];
-@@ -101,8 +102,8 @@ static int enable_utf8(int fd) {
+ #include "process-util.h"
+ #include "terminal-util.h"
+ #include "signal-util.h"
+@@ -99,8 +101,10 @@ static int enable_utf8(int fd) {
return r;
}
--static int keymap_load(const char *vc, const char *map, const char *map_toggle, bool utf8, pid_t *_pid) {
+-static int keyboard_load_and_wait(const char *vc, const char *map, const char *map_toggle, bool utf8) {
- const char *args[8];
-+static int keymap_load(const char *vc, const char *map, const char *map_toggle, bool utf8, bool disable_capslock, pid_t *_pid) {
++static int keyboard_load_and_wait(const char *vc, const char *map,
++ const char *map_toggle, bool utf8, bool disable_capslock)
++{
+ const char *args[9];
- int i = 0;
+ int i = 0, r;
pid_t pid;
-@@ -121,6 +122,8 @@ static int keymap_load(const char *vc, c
+@@ -117,6 +121,8 @@ static int keyboard_load_and_wait(const
args[i++] = map;
if (map_toggle)
args[i++] = map_toggle;
@@ -39,23 +44,23 @@
args[i++] = NULL;
pid = fork();
-@@ -236,11 +239,113 @@ static void font_copy_to_all_vcs(int fd)
+@@ -246,11 +252,117 @@ static void font_copy_to_all_vcs(int fd)
}
}
+#ifdef HAVE_SYSV_COMPAT
-+static int load_compose_table(const char *vc, const char *compose_table, pid_t *_pid) {
++static int compose_load_and_wait(const char *vc, const char *compose_table)
++{
+ const char *args[1024];
-+ int i = 0, j = 0;
++ unsigned int i = 0, j = 0;
++ int ret;
+ pid_t pid;
+ char **strv_compose_table = NULL;
+ char *to_free[1024];
+
-+ if (isempty(compose_table)) {
-+ /* An empty map means no compose table*/
-+ *_pid = 0;
-+ return 0;
-+ }
++ if (isempty(compose_table))
++ /* An empty map means no compose table */
++ return 1;
+
+ args[i++] = KBD_LOADKEYS;
+ args[i++] = "-q";
@@ -69,50 +74,51 @@
+ char **name;
+ char *arg;
+
-+ STRV_FOREACH (name, strv_compose_table) {
-+ if (streq(*name,"-c") || streq(*name,"clear")) {
++ STRV_FOREACH(name, strv_compose_table) {
++ if (streq(*name, "-c") || streq(*name, "clear")) {
+ compose_clear = true;
+ continue;
+ }
-+ if (!compose_loaded) {
-+ if (compose_clear)
-+ args[i++] = "-c";
-+ }
-+ asprintf(&arg, "compose.%s",*name);
++ if (!compose_loaded && compose_clear)
++ args[i++] = "-c";
++ asprintf(&arg, "compose.%s", *name);
+ compose_loaded = true;
+ args[i++] = to_free[j++] = arg;
-+
++ if (i >= ELEMENTSOF(args) - 1)
++ break;
+ }
+ strv_free(strv_compose_table);
+ }
+ args[i++] = NULL;
+
-+ if ((pid = fork()) < 0) {
-+ log_error("Failed to fork: %m");
-+ return -errno;
-+ } else if (pid == 0) {
++ pid = fork();
++ if (pid < 0)
++ return log_error_errno(errno, "Failed to fork: %m");
++ if (pid == 0) {
++ reset_all_signal_handlers();
++ reset_signal_mask();
+ execv(args[0], (char **) args);
+ _exit(EXIT_FAILURE);
+ }
+
-+ *_pid = pid;
-+
-+ for (i=0 ; i < j ; i++)
-+ free (to_free[i]);
-+
-+ return 0;
++ ret = wait_for_terminate_and_warn(args[0], pid, true);
++ for (i = 0; i < j; ++i)
++ free(to_free[i]);
++ if (ret < 0)
++ return ret;
++ return ret == 0;
+}
+#endif
+
-+static int set_kbd_rate(const char *vc, const char *kbd_rate, const char *kbd_delay, pid_t *_pid) {
++static int kbdrate_set_and_wait(const char *vc, const char *kbd_rate,
++ const char *kbd_delay)
++{
+ const char *args[7];
-+ int i = 0;
++ int i = 0, ret;
+ pid_t pid;
+
-+ if (isempty(kbd_rate) && isempty(kbd_delay)) {
-+ *_pid = 0;
-+ return 0;
-+ }
++ if (isempty(kbd_rate) && isempty(kbd_delay))
++ return 1;
+
+ args[i++] = "/bin/kbdrate";
+ if (!isempty(kbd_rate)) {
@@ -126,16 +132,19 @@
+ args[i++] = "-s";
+ args[i++] = NULL;
+
-+ if ((pid = fork()) < 0) {
-+ log_error("Failed to fork: %m");
-+ return -errno;
-+ } else if (pid == 0) {
++ pid = fork();
++ if (pid < 0)
++ return log_error_errno(errno, "Failed to fork: %m");
++ if (pid == 0) {
++ reset_all_signal_handlers();
++ reset_signal_mask();
+ execv(args[0], (char **) args);
+ _exit(EXIT_FAILURE);
+ }
-+
-+ *_pid = pid;
-+ return 0;
++ ret = wait_for_terminate_and_warn(args[0], pid, true);
++ if (ret < 0)
++ return ret;
++ return ret == 0;
+}
+
int main(int argc, char **argv) {
@@ -147,13 +156,13 @@
+ _cleanup_free_ char
+ *vc_kbd_delay = NULL, *vc_kbd_rate = NULL,
+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL;
-+ pid_t kbd_rate_pid = 0, compose_table_pid = 0;
+#endif
+ bool disable_capslock = false;
++ bool comp_ok, rate_ok;
_cleanup_close_ int fd = -1;
- bool utf8;
- pid_t font_pid = 0, keymap_pid = 0;
-@@ -273,6 +378,28 @@ int main(int argc, char **argv) {
+ bool utf8, font_copy = false, font_ok, keyboard_ok;
+ int r = EXIT_FAILURE;
+@@ -281,6 +393,31 @@ int main(int argc, char **argv) {
utf8 = is_locale_utf8();
@@ -166,7 +175,8 @@
+ "COMPOSETABLE", &vc_compose_table,
+ NULL);
+ if (r < 0 && r != -ENOENT)
-+ log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r));
++ log_warning("Failed to read /etc/sysconfig/keyboard: %s",
++ strerror(-r));
+
+ r = parse_env_file("/etc/sysconfig/console", NEWLINE,
+ "CONSOLE_FONT", &vc_font,
@@ -174,45 +184,33 @@
+ "CONSOLE_UNICODEMAP", &vc_font_unimap,
+ NULL);
+ if (r < 0 && r != -ENOENT)
-+ log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));
++ log_warning("Failed to read /etc/sysconfig/console: %s",
++ strerror(-r));
+
-+ disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
-+#endif
++ disable_capslock = vc_kbd_disable_caps_lock &&
++ strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
++#endif /* HAVE_SYSV_COMPAT */
+
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
"KEYMAP", &vc_keymap,
"KEYMAP_TOGGLE", &vc_keymap_toggle,
-@@ -312,14 +439,32 @@ int main(int argc, char **argv) {
- if (font_pid > 0)
- wait_for_terminate_and_warn(KBD_SETFONT, font_pid, true);
-
-- r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
-+ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock, &keymap_pid);
- if (r < 0) {
- log_error_errno(r, "Failed to start " KBD_LOADKEYS ": %m");
- return EXIT_FAILURE;
- }
-+#ifdef HAVE_SYSV_COMPAT
-+ r = load_compose_table(vc, vc_compose_table, &compose_table_pid);
-+ if (r < 0) {
-+ log_error_errno(r, "Failed to start " KBD_LOADKEYS " loading the compose table: %m");
-+ return EXIT_FAILURE;
-+ }
-+ r = set_kbd_rate(vc, vc_kbd_rate, vc_kbd_delay, &kbd_rate_pid);
-+ if (r < 0) {
-+ log_error_errno(r, "Failed to start kbdrate: %m");
-+ return EXIT_FAILURE;
-+ }
-+#endif
+@@ -312,11 +449,17 @@ int main(int argc, char **argv) {
+ (void) disable_utf8(fd);
- if (keymap_pid > 0)
- wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid, true);
+ font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
+- keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8) > 0;
++ keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle,
++ utf8, disable_capslock) > 0;
+#ifdef HAVE_SYSV_COMPAT
-+ if (compose_table_pid > 0)
-+ wait_for_terminate_and_warn(KBD_LOADKEYS, compose_table_pid, true);
-+ if (kbd_rate_pid > 0)
-+ wait_for_terminate_and_warn("/usr/bin/kbdrate", kbd_rate_pid, true);
++ comp_ok = compose_load_and_wait(vc, vc_compose_table);
++ rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay);
+#endif
- /* Only copy the font when we started setfont successfully */
- if (font_copy && font_pid > 0)
+ /* Only copy the font when we executed setfont successfully */
+ if (font_copy && font_ok)
+ (void) font_copy_to_all_vcs(fd);
+
+- return font_ok && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;
++ return font_ok && keyboard_ok && comp_ok && rate_ok ?
++ EXIT_SUCCESS : EXIT_FAILURE;
+ }
++++++ handle-numlock-value-in-etc-sysconfig-keyboard.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -14,12 +14,10 @@
units/systemd-vconsole-setup.service.in | 2 -
5 files changed, 94 insertions(+), 3 deletions(-)
-Index: systemd-218/Makefile.am
-===================================================================
---- systemd-218.orig/Makefile.am
-+++ systemd-218/Makefile.am
-@@ -3715,6 +3715,19 @@ dist_udevrules_DATA += \
- rules/61-accelerometer.rules
+--- systemd-222.orig/Makefile.am
++++ systemd-222/Makefile.am
+@@ -3805,6 +3805,19 @@ dist_udevrules_DATA += \
+ rules/60-persistent-v4l.rules
# ------------------------------------------------------------------------------
+numlock_on_SOURCES = \
@@ -35,13 +33,11 @@
+ rules/73-seat-numlock.rules
+
+# ------------------------------------------------------------------------------
- if ENABLE_GUDEV
- if ENABLE_GTK_DOC
- SUBDIRS += \
-Index: systemd-218/rules/73-seat-numlock.rules
-===================================================================
+ mtd_probe_SOURCES = \
+ src/udev/mtd_probe/mtd_probe.c \
+ src/udev/mtd_probe/mtd_probe.h \
--- /dev/null
-+++ systemd-218/rules/73-seat-numlock.rules
++++ systemd-222/rules/73-seat-numlock.rules
@@ -0,0 +1,8 @@
+# This file is part of SUSE customization of systemd.
+#
@@ -51,10 +47,8 @@
+# (at your option) any later version.
+
+SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}"
-Index: systemd-218/src/login/numlock-on.c
-===================================================================
--- /dev/null
-+++ systemd-218/src/login/numlock-on.c
++++ systemd-222/src/login/numlock-on.c
@@ -0,0 +1,34 @@
+/*
+ * numlock-on.c: Turn numlock-on
@@ -90,13 +84,11 @@
+
+ exit(0);
+}
-Index: systemd-218/src/vconsole/vconsole-setup.c
-===================================================================
---- systemd-218.orig/src/vconsole/vconsole-setup.c
-+++ systemd-218/src/vconsole/vconsole-setup.c
-@@ -42,6 +42,10 @@
- #include "fileio.h"
- #include "strv.h"
+--- systemd-222.orig/src/vconsole/vconsole-setup.c
++++ systemd-222/src/vconsole/vconsole-setup.c
+@@ -41,6 +41,10 @@
+ #include "terminal-util.h"
+ #include "signal-util.h"
+#define BIOS_DATA_AREA 0x400
+#define BDA_KEYBOARD_STATUS_FLAGS_4 0x97
@@ -105,21 +97,20 @@
static bool is_vconsole(int fd) {
unsigned char data[1];
-@@ -342,10 +346,11 @@ int main(int argc, char **argv) {
+@@ -359,9 +363,10 @@ int main(int argc, char **argv) {
#ifdef HAVE_SYSV_COMPAT
_cleanup_free_ char
*vc_kbd_delay = NULL, *vc_kbd_rate = NULL,
- *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL;
+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL,
+ *vc_kbd_numlock = NULL;
- pid_t kbd_rate_pid = 0, compose_table_pid = 0;
#endif
- bool disable_capslock = false;
+ bool disable_capslock = false, numlock = false;
+ bool comp_ok, rate_ok;
_cleanup_close_ int fd = -1;
- bool utf8;
- pid_t font_pid = 0, keymap_pid = 0;
-@@ -384,6 +389,7 @@ int main(int argc, char **argv) {
+ bool utf8, font_copy = false, font_ok, keyboard_ok;
+@@ -399,6 +404,7 @@ int main(int argc, char **argv) {
"KBD_DELAY", &vc_kbd_delay,
"KBD_RATE", &vc_kbd_rate,
"KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock,
@@ -127,54 +118,52 @@
"COMPOSETABLE", &vc_compose_table,
NULL);
if (r < 0 && r != -ENOENT)
-@@ -398,6 +404,32 @@ int main(int argc, char **argv) {
- log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));
+@@ -416,6 +422,32 @@ int main(int argc, char **argv) {
- disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
+ disable_capslock = vc_kbd_disable_caps_lock &&
+ strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
++ numlock = vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "yes");
+#if defined(__i386__) || defined(__x86_64__)
-+ if (vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "bios")) {
-+ int _cleanup_close_ fdmem;
-+ char c;
-+
-+ fdmem = open ("/dev/mem", O_RDONLY);
-+ if (fdmem < 0) {
-+ log_error("Failed to open /dev/mem: %m");
-+ return EXIT_FAILURE;
-+ }
-+
-+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) {
-+ log_error("Failed to seek /dev/mem: %m");
-+ return EXIT_FAILURE;
-+ }
-+
-+ if (read (fdmem, &c, sizeof(char)) == -1) {
-+ log_error("Failed to read /dev/mem: %m");
-+ return EXIT_FAILURE;
-+ }
-+
-+ if (c & BDA_KSF4_NUMLOCK_MASK)
-+ numlock = true;
-+ } else
-+#endif
-+ numlock = vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "yes");
- #endif
++ if (vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "bios")) {
++ int _cleanup_close_ fdmem;
++ char c;
++
++ fdmem = open ("/dev/mem", O_RDONLY);
++ if (fdmem < 0) {
++ log_error("Failed to open /dev/mem: %m");
++ return EXIT_FAILURE;
++ }
++
++ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) {
++ log_error("Failed to seek /dev/mem: %m");
++ return EXIT_FAILURE;
++ }
++
++ if (read(fdmem, &c, sizeof(char)) == -1) {
++ log_error("Failed to read /dev/mem: %m");
++ return EXIT_FAILURE;
++ }
++
++ if (c & BDA_KSF4_NUMLOCK_MASK)
++ numlock = true;
++ }
++#endif /* x86 */
+ #endif /* HAVE_SYSV_COMPAT */
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
-@@ -444,6 +476,10 @@ int main(int argc, char **argv) {
- log_error_errno(r, "Failed to start " KBD_LOADKEYS ": %m");
- return EXIT_FAILURE;
- }
+@@ -451,6 +483,10 @@ int main(int argc, char **argv) {
+ font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
+ keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle,
+ utf8, disable_capslock) > 0;
+ if (numlock)
+ touch("/run/numlock-on");
+ else
+ unlink("/run/numlock-on");
#ifdef HAVE_SYSV_COMPAT
- r = load_compose_table(vc, vc_compose_table, &compose_table_pid);
- if (r < 0) {
-Index: systemd-218/units/systemd-vconsole-setup.service.in
-===================================================================
---- systemd-218.orig/units/systemd-vconsole-setup.service.in
-+++ systemd-218/units/systemd-vconsole-setup.service.in
+ comp_ok = compose_load_and_wait(vc, vc_compose_table);
+ rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay);
+--- systemd-222.orig/units/systemd-vconsole-setup.service.in
++++ systemd-222/units/systemd-vconsole-setup.service.in
@@ -10,7 +10,7 @@ Description=Setup Virtual Console
Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
DefaultDependencies=no
++++++ handle-root_uses_lang-value-in-etc-sysconfig-language.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -7,11 +7,11 @@
src/core/locale-setup.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
-Index: systemd-218/src/core/locale-setup.c
+Index: systemd-221/src/core/locale-setup.c
===================================================================
---- systemd-218.orig/src/core/locale-setup.c
-+++ systemd-218/src/core/locale-setup.c
-@@ -36,6 +36,11 @@ int locale_setup(char ***environment) {
+--- systemd-221.orig/src/core/locale-setup.c
++++ systemd-221/src/core/locale-setup.c
+@@ -34,6 +34,11 @@ int locale_setup(char ***environment) {
char **add;
char *variables[_VARIABLE_LC_MAX] = {};
int r = 0, i;
@@ -23,7 +23,7 @@
if (detect_container(NULL) <= 0) {
r = parse_env_file("/proc/cmdline", WHITESPACE,
-@@ -82,6 +87,27 @@ int locale_setup(char ***environment) {
+@@ -80,6 +85,27 @@ int locale_setup(char ***environment) {
if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Failed to read /etc/locale.conf: %m");
}
++++++ hostname-NULL.patch ++++++
Index: systemd-222/src/core/hostname-setup.c
===================================================================
--- systemd-222.orig/src/core/hostname-setup.c
+++ systemd-222/src/core/hostname-setup.c
@@ -44,7 +44,7 @@ int hostname_setup(void) {
else
log_warning_errno(r, "Failed to read configured hostname: %m");
- hn = NULL;
+ hn = strdup("nohostname.set.site");
} else
hn = b;
/* strip any leftover of a domain name */
++++++ insserv-generator.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -8,14 +8,16 @@
---
Makefile.am | 9
src/insserv-generator/Makefile | 28 ++
- src/insserv-generator/insserv-generator.c | 312 ++++++++++++++++++++++++++++++
- 3 files changed, 349 insertions(+)
+ src/insserv-generator/insserv-generator.c | 316 ++++++++++++++++++++++++++++++
+ 3 files changed, 352 insertions(+), 1 deletion(-)
create mode 100644 src/insserv-generator/Makefile
create mode 100644 src/insserv-generator/insserv-generator.c
---- systemd-219.orig/Makefile.am
-+++ systemd-219/Makefile.am
-@@ -621,7 +621,8 @@ nodist_systemunit_DATA += \
+Index: systemd-224/Makefile.am
+===================================================================
+--- systemd-224.orig/Makefile.am
++++ systemd-224/Makefile.am
+@@ -617,7 +617,8 @@ nodist_systemunit_DATA += \
systemgenerator_PROGRAMS += \
systemd-sysv-generator \
@@ -25,23 +27,23 @@
endif
EXTRA_DIST += \
-@@ -2565,6 +2566,14 @@ systemd_rc_local_generator_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
+@@ -2556,6 +2557,12 @@ $(systemd_boot): $(systemd_boot_solib)
+ endif
+ endif
+#-------------------------------------------------------------------------------
+systemd_insserv_generator_SOURCES = \
+ src/insserv-generator/insserv-generator.c
+
-+systemd_insserv_generator_LDADD = \
-+ libsystemd-label.la \
-+ libsystemd-shared.la
++systemd_insserv_generator_LDADD = libbasic.la
+
# ------------------------------------------------------------------------------
- systemd_remount_fs_SOURCES = \
- src/remount-fs/remount-fs.c \
+ stub_headers = \
+ src/boot/efi/util.h \
+Index: systemd-224/src/insserv-generator/Makefile
+===================================================================
--- /dev/null
-+++ systemd-219/src/insserv-generator/Makefile
++++ systemd-224/src/insserv-generator/Makefile
@@ -0,0 +1,28 @@
+# This file is part of systemd.
+#
@@ -71,9 +73,11 @@
+ $(MAKE) -C .. clean
+
+.PHONY: all clean
+Index: systemd-224/src/insserv-generator/insserv-generator.c
+===================================================================
--- /dev/null
-+++ systemd-219/src/insserv-generator/insserv-generator.c
-@@ -0,0 +1,312 @@
++++ systemd-224/src/insserv-generator/insserv-generator.c
+@@ -0,0 +1,316 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
@@ -153,6 +157,7 @@
+ unsigned i;
+ char *r;
+ const char *n;
++ int ret;
+
+ assert(name);
+ assert(_r);
@@ -182,7 +187,9 @@
+ return -EINVAL;
+
+ /* Facilities starting with $ are most likely targets */
-+ r = unit_name_build(n, NULL, ".target");
++ ret = unit_name_build(n, NULL, ".target", &r);
++ if (ret < 0)
++ return ret;
+ } else if (filename && streq(name, filename))
+ /* Names equaling the file name of the services are redundant */
+ return 0;
@@ -246,7 +253,8 @@
+ r = write_string_file(unit,
+ "# Automatically generated by systemd-insserv-generator\n\n"
+ "[Unit]\n"
-+ "Wants=remote-fs-pre.target\n");
++ "Wants=remote-fs-pre.target\n",
++ WRITE_STRING_FILE_CREATE);
+ if (r)
+ return r;
+ free (facility);
++++++ journald-advice-about-use-of-memory.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -16,11 +16,11 @@
src/journal/mmap-cache.c | 16 +++++++++++++++-
4 files changed, 33 insertions(+), 5 deletions(-)
-Index: systemd/src/journal/catalog.c
+Index: systemd-221/src/journal/catalog.c
===================================================================
---- systemd.orig/src/journal/catalog.c
-+++ systemd/src/journal/catalog.c
-@@ -470,6 +470,10 @@ finish:
+--- systemd-221.orig/src/journal/catalog.c
++++ systemd-221/src/journal/catalog.c
+@@ -469,6 +469,10 @@ finish:
static int open_mmap(const char *database, int *_fd, struct stat *_st, void **_p) {
const CatalogHeader *h;
@@ -31,7 +31,7 @@
int fd;
void *p;
struct stat st;
-@@ -492,12 +496,18 @@ static int open_mmap(const char *databas
+@@ -491,12 +495,18 @@ static int open_mmap(const char *databas
return -EINVAL;
}
@@ -51,10 +51,10 @@
h = p;
if (memcmp(h->signature, CATALOG_SIGNATURE, sizeof(h->signature)) != 0 ||
le64toh(h->header_size) < sizeof(CatalogHeader) ||
-Index: systemd/src/journal/journal-authenticate.c
+Index: systemd-221/src/journal/journal-authenticate.c
===================================================================
---- systemd.orig/src/journal/journal-authenticate.c
-+++ systemd/src/journal/journal-authenticate.c
+--- systemd-221.orig/src/journal/journal-authenticate.c
++++ systemd-221/src/journal/journal-authenticate.c
@@ -355,7 +355,8 @@ int journal_file_fss_load(JournalFile *f
goto finish;
}
@@ -76,10 +76,10 @@
if (f->fss_file == MAP_FAILED) {
f->fss_file = NULL;
r = -errno;
-Index: systemd/src/journal/journald-kmsg.c
+Index: systemd-221/src/journal/journald-kmsg.c
===================================================================
---- systemd.orig/src/journal/journald-kmsg.c
-+++ systemd/src/journal/journald-kmsg.c
+--- systemd-221.orig/src/journal/journald-kmsg.c
++++ systemd-221/src/journal/journald-kmsg.c
@@ -454,7 +454,8 @@ int server_open_kernel_seqnum(Server *s)
return 0;
}
@@ -90,11 +90,11 @@
if (p == MAP_FAILED) {
log_error_errno(errno, "Failed to map sequential number file, ignoring: %m");
return 0;
-Index: systemd/src/journal/mmap-cache.c
+Index: systemd-221/src/journal/mmap-cache.c
===================================================================
---- systemd.orig/src/journal/mmap-cache.c
-+++ systemd/src/journal/mmap-cache.c
-@@ -467,11 +467,14 @@ static int add_mmap(
+--- systemd-221.orig/src/journal/mmap-cache.c
++++ systemd-221/src/journal/mmap-cache.c
+@@ -466,11 +466,14 @@ static int add_mmap(
struct stat *st,
void **ret) {
@@ -109,7 +109,7 @@
int r;
assert(m);
-@@ -510,7 +513,8 @@ static int add_mmap(
+@@ -509,7 +512,8 @@ static int add_mmap(
}
for (;;) {
@@ -119,7 +119,7 @@
if (d != MAP_FAILED)
break;
if (errno != ENOMEM)
-@@ -523,6 +527,16 @@ static int add_mmap(
+@@ -522,6 +526,16 @@ static int add_mmap(
return -ENOMEM;
}
++++++ kbd-model-map.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -5,10 +5,10 @@
src/locale/kbd-model-map | 13 +++++++++++++
1 file changed, 13 insertions(+)
-Index: systemd/src/locale/kbd-model-map
+Index: systemd-221/src/locale/kbd-model-map
===================================================================
---- systemd.orig/src/locale/kbd-model-map
-+++ systemd/src/locale/kbd-model-map
+--- systemd-221.orig/src/locale/kbd-model-map
++++ systemd-221/src/locale/kbd-model-map
@@ -66,3 +66,16 @@ lt.baltic lt pc105 - terminate:ctrl_a
lt.l4 lt pc105 - terminate:ctrl_alt_bksp
lt lt pc105 - terminate:ctrl_alt_bksp
++++++ let-linker-find-libudev-for-libdevmapper.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,35 +1,19 @@
---
- Makefile.am | 4 ++++
configure.ac | 4 ----
- 2 files changed, 4 insertions(+), 4 deletions(-)
+ 1 file changed, 4 deletions(-)
-Index: systemd/Makefile.am
+Index: systemd-224/configure.ac
===================================================================
---- systemd.orig/Makefile.am
-+++ systemd/Makefile.am
-@@ -4789,6 +4789,10 @@ systemd_cryptsetup_CFLAGS = \
- $(AM_CFLAGS) \
- $(LIBCRYPTSETUP_CFLAGS)
-
-+systemd_cryptsetup_LDFLAGS = \
-+ $(AM_LDFLAGS) \
-+ -Wl,-rpath-link=$(top_srcdir)/.libs
-+
- systemd_cryptsetup_LDADD = \
- libsystemd-label.la \
- libudev-internal.la \
-Index: systemd/configure.ac
-===================================================================
---- systemd.orig/configure.ac
-+++ systemd/configure.ac
-@@ -206,10 +206,6 @@ AS_CASE([$CC], [*clang*],
+--- systemd-224.orig/configure.ac
++++ systemd-224/configure.ac
+@@ -199,10 +199,6 @@ AS_CASE([$CC], [*clang*],
-Wno-gnu-variable-sized-type-not-at-end \
])])
--AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
+-AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
- [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-- -flto -ffat-lto-objects])],
+- -flto])],
- [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
- AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
+ AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
++++++ let-vconsole-setup-get-properties-only-once-to-copy-them.patch ++++++
From: Werner Fink <werner(a)suse.de>
Date: Wed Sep 23 12:37:23 UTC 2015
Subject: Do not bother vistual console to much with GIO/PIO
This avoids broken virtual console mapping due stressed ioctl API
for the virtual consoles (boo#904214)
---
src/vconsole/vconsole-setup.c | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
--- src/vconsole/vconsole-setup.c
+++ src/vconsole/vconsole-setup.c 2015-09-23 12:34:33.854018750 +0000
@@ -202,8 +202,13 @@ static void font_copy_to_all_vcs(int fd)
unsigned short map16[E_TABSZ];
struct unimapdesc unimapd;
struct unipair unipairs[USHRT_MAX];
+ struct console_font_op cfo = {};
int i, r;
+ bool hasmap8;
+ bool hasmap16;
+ bool hasunimap;
+
/* get active, and 16 bit mask of used VT numbers */
r = ioctl(fd, VT_GETSTATE, &vcs);
if (r < 0) {
@@ -211,10 +216,22 @@ static void font_copy_to_all_vcs(int fd)
return;
}
+ /* copy font from active VT, where the font was uploaded to */
+ cfo.op = KD_FONT_OP_COPY;
+ cfo.height = vcs.v_active-1; /* tty1 == index 0 */
+
+ hasmap8 = (ioctl(fd, GIO_SCRNMAP, map8) >= 0);
+ hasmap16 = (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0);
+
+ /* unimapd is a ushort count and a pointer to an
+ * array of struct unipair { ushort, ushort } */
+ unimapd.entries = unipairs;
+ unimapd.entry_ct = USHRT_MAX;
+ hasunimap = (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0);
+
for (i = 1; i <= 15; i++) {
char vcname[strlen("/dev/vcs") + DECIMAL_STR_MAX(int)];
_cleanup_close_ int vcfd = -1;
- struct console_font_op cfo = {};
if (i == vcs.v_active)
continue;
@@ -229,25 +246,19 @@ static void font_copy_to_all_vcs(int fd)
if (vcfd < 0)
continue;
- /* copy font from active VT, where the font was uploaded to */
- cfo.op = KD_FONT_OP_COPY;
- cfo.height = vcs.v_active-1; /* tty1 == index 0 */
+ /* copy font from active VT to vcs */
(void) ioctl(vcfd, KDFONTOP, &cfo);
- /* copy map of 8bit chars */
- if (ioctl(fd, GIO_SCRNMAP, map8) >= 0)
+ /* copy map of 8bit chars to vcs */
+ if (hasmap8)
(void) ioctl(vcfd, PIO_SCRNMAP, map8);
- /* copy map of 8bit chars -> 16bit Unicode values */
- if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0)
+ /* copy map of 8bit chars -> 16bit Unicode values to vcs */
+ if (hasmap16)
(void) ioctl(vcfd, PIO_UNISCRNMAP, map16);
- /* copy unicode translation table */
- /* unimapd is a ushort count and a pointer to an
- array of struct unipair { ushort, ushort } */
- unimapd.entries = unipairs;
- unimapd.entry_ct = USHRT_MAX;
- if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) {
+ /* copy unicode translation table to vcs */
+ if (hasunimap) {
struct unimapinit adv = { 0, 0, 0 };
(void) ioctl(vcfd, PIO_UNIMAPCLR, &adv);
++++++ make-emergency.service-conflict-with-syslog.socket.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -11,10 +11,10 @@
units/emergency.service.in | 1 +
1 file changed, 1 insertion(+)
-Index: systemd-218/units/emergency.service.in
+Index: systemd-221/units/emergency.service.in
===================================================================
---- systemd-218.orig/units/emergency.service.in
-+++ systemd-218/units/emergency.service.in
+--- systemd-221.orig/units/emergency.service.in
++++ systemd-221/units/emergency.service.in
@@ -11,6 +11,7 @@ Documentation=man:sulogin(8)
DefaultDependencies=no
Conflicts=shutdown.target
++++++ parse-crypttab-for-noauto-option.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -2,11 +2,11 @@
src/fstab-generator/fstab-generator.c | 45 +++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
-Index: systemd/src/fstab-generator/fstab-generator.c
+Index: systemd-221/src/fstab-generator/fstab-generator.c
===================================================================
---- systemd.orig/src/fstab-generator/fstab-generator.c
-+++ systemd/src/fstab-generator/fstab-generator.c
-@@ -48,6 +48,49 @@ static char *arg_usr_what = NULL;
+--- systemd-221.orig/src/fstab-generator/fstab-generator.c
++++ systemd-221/src/fstab-generator/fstab-generator.c
+@@ -47,6 +47,49 @@ static char *arg_usr_what = NULL;
static char *arg_usr_fstype = NULL;
static char *arg_usr_options = NULL;
@@ -56,7 +56,7 @@
static int add_swap(
const char *what,
struct mntent *me,
-@@ -118,7 +161,7 @@ static int add_swap(
+@@ -108,7 +151,7 @@ static int add_swap(
if (r < 0)
return r;
++++++ plymouth-quit-and-wait-for-emergency-service.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,13 +1,13 @@
---
units/console-shell.service.m4.in | 2 ++
- units/emergency.service.in | 3 ++-
+ units/emergency.service.in | 2 +-
units/rescue.service.in | 3 ++-
- 3 files changed, 6 insertions(+), 2 deletions(-)
+ 3 files changed, 5 insertions(+), 2 deletions(-)
-Index: systemd/units/console-shell.service.m4.in
+Index: systemd-224/units/console-shell.service.m4.in
===================================================================
---- systemd.orig/units/console-shell.service.m4.in
-+++ systemd/units/console-shell.service.m4.in
+--- systemd-224.orig/units/console-shell.service.m4.in
++++ systemd-224/units/console-shell.service.m4.in
@@ -17,6 +17,8 @@ Before=getty.target
[Service]
Environment=HOME=/root
@@ -17,24 +17,23 @@
ExecStart=-@SULOGIN@
ExecStopPost=-@SYSTEMCTL@ poweroff
Type=idle
-Index: systemd/units/emergency.service.in
+Index: systemd-224/units/emergency.service.in
===================================================================
---- systemd.orig/units/emergency.service.in
-+++ systemd/units/emergency.service.in
-@@ -17,7 +17,8 @@ Before=shutdown.target
+--- systemd-224.orig/units/emergency.service.in
++++ systemd-224/units/emergency.service.in
+@@ -17,7 +17,7 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
WorkingDirectory=/root
--ExecStartPre=-/bin/plymouth quit
-+ExecStartPre=-/usr/bin/plymouth quit
-+ExecStartPre=-/usr/bin/plymouth --wait
+-ExecStartPre=-/bin/plymouth --wait quit
++ExecStartPre=-/usr/bin/plymouth --wait quit
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
+ ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
Type=idle
-Index: systemd/units/rescue.service.in
+Index: systemd-224/units/rescue.service.in
===================================================================
---- systemd.orig/units/rescue.service.in
-+++ systemd/units/rescue.service.in
+--- systemd-224.orig/units/rescue.service.in
++++ systemd-224/units/rescue.service.in
@@ -16,7 +16,8 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
@@ -43,5 +42,5 @@
+ExecStartPre=-/usr/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth --wait
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
+ ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
Type=idle
++++++ portmap-wants-rpcbind-socket.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,5 +1,11 @@
---- systemd-210/units/rpcbind.target
-+++ systemd-210/units/rpcbind.target 2014-04-08 07:21:55.438235838 +0000
+---
+ units/rpcbind.target | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: systemd-221/units/rpcbind.target
+===================================================================
+--- systemd-221.orig/units/rpcbind.target
++++ systemd-221/units/rpcbind.target
@@ -12,3 +12,4 @@
Description=RPC Port Mapper
Documentation=man:systemd.special(7)
++++++ pre_checkin.sh ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -5,8 +5,8 @@
ORIG_SPEC=systemd
EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${ORIG_SPEC}.spec! #####\n"
-sed "s/^%define bootstrap.*$/${EDIT_WARNING}%define bootstrap 1/;
- s/^%define udevpkgname.*$/${EDIT_WARNING}%define udevpkgname udev-mini/;
+sed "s/^%define bootstrap .*$/${EDIT_WARNING}%define bootstrap 1/;
+ s/^%define mini .*$/${EDIT_WARNING}%define mini -mini/;
s/^\(Name:.*\)$/\1-mini/;
s/^BuildRoot.*/&\n\nProvides: %{real} = %{version}-%{release}\n/
" < ${ORIG_SPEC}.spec > ${ORIG_SPEC}-mini.spec
++++++ rescue-emergency-target-conflicts.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,13 +1,22 @@
---- systemd-210/units/emergency.target
-+++ systemd-210/units/emergency.target 2014-04-15 11:11:18.618235831 +0000
+---
+ units/emergency.target | 1 +
+ units/rescue.target | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+Index: systemd-221/units/emergency.target
+===================================================================
+--- systemd-221.orig/units/emergency.target
++++ systemd-221/units/emergency.target
@@ -10,4 +10,5 @@ Description=Emergency Mode
Documentation=man:systemd.special(7)
Requires=emergency.service
After=emergency.service
+Conflicts=getty.target rescue.target
AllowIsolate=yes
---- systemd-210/units/rescue.target
-+++ systemd-210/units/rescue.target 2014-04-15 11:14:40.606808928 +0000
+Index: systemd-221/units/rescue.target
+===================================================================
+--- systemd-221.orig/units/rescue.target
++++ systemd-221/units/rescue.target
@@ -10,7 +10,8 @@ Description=Rescue Mode
Documentation=man:systemd.special(7)
Requires=sysinit.target rescue.service
++++++ respect-nfs-bg-option.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -2,11 +2,11 @@
src/fstab-generator/fstab-generator.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
-Index: systemd-218/src/fstab-generator/fstab-generator.c
+Index: systemd-221/src/fstab-generator/fstab-generator.c
===================================================================
---- systemd-218.orig/src/fstab-generator/fstab-generator.c
-+++ systemd-218/src/fstab-generator/fstab-generator.c
-@@ -238,8 +238,11 @@ static int add_mount(
+--- systemd-221.orig/src/fstab-generator/fstab-generator.c
++++ systemd-221/src/fstab-generator/fstab-generator.c
+@@ -289,8 +289,11 @@ static int add_mount(
"Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
source);
@@ -18,5 +18,5 @@
+ fprintf(f, "Before=%s\n", post);
+ }
- if (passno != 0) {
- r = generator_write_fsck_deps(f, arg_dest, what, where, fstype);
+ if (!automount && opts) {
+ r = write_requires_after(f, opts);
++++++ restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -10,11 +10,11 @@
create mode 100644 units/var-lock.mount
create mode 100644 units/var-run.mount
-Index: systemd-218/Makefile.am
+Index: systemd-221/Makefile.am
===================================================================
---- systemd-218.orig/Makefile.am
-+++ systemd-218/Makefile.am
-@@ -516,6 +516,12 @@ endif
+--- systemd-221.orig/Makefile.am
++++ systemd-221/Makefile.am
+@@ -526,6 +526,12 @@ dist_systemunit_DATA += \
dist_systemunit_DATA_busnames += \
units/busnames.target
@@ -27,9 +27,9 @@
nodist_systemunit_DATA = \
units/getty@.service \
units/serial-getty@.service \
-@@ -6086,6 +6092,9 @@ RUNLEVEL4_TARGET_WANTS += \
+@@ -6123,6 +6129,9 @@ GRAPHICAL_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
- RUNLEVEL5_TARGET_WANTS += \
+ RESCUE_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
+LOCAL_FS_TARGET_WANTS += \
+ var-run.mount \
@@ -37,10 +37,10 @@
endif
SYSINIT_TARGET_WANTS += \
-Index: systemd-218/units/var-lock.mount
+Index: systemd-221/units/var-lock.mount
===================================================================
--- /dev/null
-+++ systemd-218/units/var-lock.mount
++++ systemd-221/units/var-lock.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
@@ -61,10 +61,10 @@
+Where=/var/lock
+Type=bind
+Options=bind
-Index: systemd-218/units/var-run.mount
+Index: systemd-221/units/var-run.mount
===================================================================
--- /dev/null
-+++ systemd-218/units/var-run.mount
++++ systemd-221/units/var-run.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
++++++ set-and-use-default-logconsole.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,16 +1,18 @@
Use and set default logging console for both journald and kernel messages
---
- src/journal/journald-console.c | 96 +++++++++++++++++++++++++++++++++++++++++
- src/journal/journald-console.h | 4 +
- src/journal/journald-server.c | 5 ++
- 3 files changed, 105 insertions(+)
+ src/journal/journald-console.c | 100 +++++++++++++++++++++++++++++++++++++++++
+ src/journal/journald-console.h | 3 +
+ src/journal/journald-server.c | 6 ++
+ 3 files changed, 109 insertions(+)
---- systemd-219.orig/src/journal/journald-console.c
-+++ systemd-219/src/journal/journald-console.c
-@@ -23,6 +23,14 @@
+Index: systemd-221/src/journal/journald-console.c
+===================================================================
+--- systemd-221.orig/src/journal/journald-console.c
++++ systemd-221/src/journal/journald-console.c
+@@ -22,6 +22,14 @@
+ #include <time.h>
#include <fcntl.h>
- #include <unistd.h>
#include <sys/socket.h>
+#ifdef HAVE_SYSV_COMPAT
+# include <linux/tiocl.h>
@@ -23,11 +25,11 @@
#include "fileio.h"
#include "journald-server.h"
-@@ -43,6 +51,76 @@ static bool prefix_timestamp(void) {
+@@ -45,6 +53,76 @@ static bool prefix_timestamp(void) {
return cached_printk_time;
}
-+void defaul_tty_path(Server *s)
++void default_tty_path(Server *s)
+{
+#ifdef HAVE_SYSV_COMPAT
+ static const char list[] = "/dev/tty10\0" "/dev/console\0";
@@ -100,7 +102,7 @@
void server_forward_console(
Server *s,
int priority,
-@@ -64,6 +142,12 @@ void server_forward_console(
+@@ -66,6 +144,12 @@ void server_forward_console(
if (LOG_PRI(priority) > s->max_level_console)
return;
@@ -113,7 +115,7 @@
/* First: timestamp */
if (prefix_timestamp()) {
assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0);
-@@ -100,7 +184,23 @@ void server_forward_console(
+@@ -102,7 +186,23 @@ void server_forward_console(
fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC);
if (fd < 0) {
log_debug_errno(errno, "Failed to open %s for logging: %m", tty);
@@ -137,22 +139,34 @@
}
if (writev(fd, iovec, n) < 0)
---- systemd-219.orig/src/journal/journald-console.h
-+++ systemd-219/src/journal/journald-console.h
+Index: systemd-221/src/journal/journald-console.h
+===================================================================
+--- systemd-221.orig/src/journal/journald-console.h
++++ systemd-221/src/journal/journald-console.h
@@ -24,3 +24,6 @@
#include "journald-server.h"
void server_forward_console(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
+
+void klogconsole(Server *s);
-+void defaul_tty_path(Server *s);
---- systemd-219.orig/src/journal/journald-server.c
-+++ systemd-219/src/journal/journald-server.c
-@@ -1520,6 +1520,11 @@ int server_init(Server *s) {
++void default_tty_path(Server *s);
+Index: systemd-221/src/journal/journald-server.c
+===================================================================
+--- systemd-221.orig/src/journal/journald-server.c
++++ systemd-221/src/journal/journald-server.c
+@@ -52,6 +52,7 @@
+ #include "journal-internal.h"
+ #include "journal-vacuum.h"
+ #include "journal-authenticate.h"
++#include "journald-console.h"
+ #include "journald-rate-limit.h"
+ #include "journald-kmsg.h"
+ #include "journald-syslog.h"
+@@ -1514,6 +1515,11 @@ int server_init(Server *s) {
server_parse_config_file(s);
server_parse_proc_cmdline(s);
-+ defaul_tty_path(s);
++ default_tty_path(s);
+
+ if (s->tty_path)
+ klogconsole(s);
++++++ shut-up-rpmlint-on-var-log-journal.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -2,12 +2,12 @@
Makefile.am | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
-Index: systemd-218/Makefile.am
+Index: systemd-221/Makefile.am
===================================================================
---- systemd-218.orig/Makefile.am
-+++ systemd-218/Makefile.am
-@@ -4209,11 +4209,11 @@ noinst_LTLIBRARIES += \
- libsystemd-journal-core.la
+--- systemd-221.orig/Makefile.am
++++ systemd-221/Makefile.am
+@@ -4129,11 +4129,11 @@ noinst_LTLIBRARIES += \
+ libjournal-core.la
journal-install-hook:
- -$(MKDIR_P) $(DESTDIR)/var/log/journal
++++++ suse-sysv-bootd-support.diff ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -7,12 +7,12 @@
[Implementation note: currently, the unit is generated, but not
activated even if symlinks exist in boot.d. Hmmm... -jengelh(a)inai.de]
---
- src/sysv-generator/sysv-generator.c | 26 +++++++++++++++++++++-----
- 1 file changed, 21 insertions(+), 5 deletions(-)
+ src/sysv-generator/sysv-generator.c | 21 +++++++++++++++------
+ 1 file changed, 15 insertions(+), 6 deletions(-)
---- systemd-219.orig/src/sysv-generator/sysv-generator.c
-+++ systemd-219/src/sysv-generator/sysv-generator.c
-@@ -42,7 +42,8 @@
+--- systemd-222.orig/src/sysv-generator/sysv-generator.c
++++ systemd-222/src/sysv-generator/sysv-generator.c
+@@ -39,7 +39,8 @@
typedef enum RunlevelType {
RUNLEVEL_UP,
@@ -22,7 +22,7 @@
} RunlevelType;
static const struct {
-@@ -50,6 +51,9 @@ static const struct {
+@@ -47,6 +48,9 @@ static const struct {
const char *target;
const RunlevelType type;
} rcnd_table[] = {
@@ -30,9 +30,9 @@
+ { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT },
+
/* Standard SysV runlevels for start-up */
- { "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
- { "rc2.d", SPECIAL_RUNLEVEL2_TARGET, RUNLEVEL_UP },
-@@ -65,7 +69,7 @@ static const struct {
+ { "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
+ { "rc2.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
+@@ -62,10 +66,10 @@ static const struct {
directories in this order, and we want to make sure that
sysv_start_priority is known when we first load the
unit. And that value we only know from S links. Hence
@@ -40,28 +40,23 @@
+ UP/SYSINIT must be read before DOWN */
};
- typedef struct SysvStub {
-@@ -83,7 +87,7 @@ typedef struct SysvStub {
- bool reload;
- } SysvStub;
-
-const char *arg_dest = "/tmp";
+static const char *arg_dest = "/tmp";
- static int add_symlink(const char *service, const char *where) {
- _cleanup_free_ char *from = NULL, *to = NULL;
-@@ -235,6 +239,10 @@ static bool usage_contains_reload(const
- static char *sysv_translate_name(const char *name) {
- char *r;
+ typedef struct SysvStub {
+ char *name;
+@@ -243,6 +247,10 @@ static char *sysv_translate_name(const c
+ _cleanup_free_ char *c = NULL;
+ char *res;
+ if (startswith(name, "boot."))
+ /* Drop SuSE-style boot. prefix */
+ name += 5;
+
- r = new(char, strlen(name) + strlen(".service") + 1);
- if (!r)
+ c = strdup(name);
+ if (!c)
return NULL;
-@@ -864,10 +872,10 @@ static int set_dependencies_from_rcnd(Lo
+@@ -859,10 +867,10 @@ static int set_dependencies_from_rcnd(co
if (de->d_name[0] == 'S') {
@@ -74,7 +69,7 @@
r = set_ensure_allocated(&runlevel_services[i], NULL);
if (r < 0)
-@@ -878,7 +886,8 @@ static int set_dependencies_from_rcnd(Lo
+@@ -873,7 +881,8 @@ static int set_dependencies_from_rcnd(co
goto finish;
} else if (de->d_name[0] == 'K' &&
++++++ systemctl-set-default-target.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -6,11 +6,11 @@
man/systemctl.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
-Index: systemd/man/systemctl.xml
+Index: systemd-221/man/systemctl.xml
===================================================================
---- systemd.orig/man/systemctl.xml
-+++ systemd/man/systemctl.xml
-@@ -445,7 +445,7 @@ along with systemd; If not, see <http://
+--- systemd-221.orig/man/systemctl.xml
++++ systemd-221/man/systemctl.xml
+@@ -439,7 +439,7 @@
<term><option>--force</option></term>
<listitem>
@@ -19,7 +19,7 @@
any existing conflicting symlinks.</para>
<para>When used with <command>halt</command>,
-@@ -1215,6 +1215,8 @@ kobject-uevent 1 systemd-udevd-kernel.so
+@@ -1237,6 +1237,8 @@ kobject-uevent 1 systemd-udevd-kernel.so
<para>Return the default target to boot into. This returns
the target unit name <filename>default.target</filename>
is aliased (symlinked) to.</para>
++++++ systemd-add-user-keep.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,13 +1,13 @@
---
man/tmpfiles.d.xml | 3 +++
- src/tmpfiles/tmpfiles.c | 48 ++++++++++++++++++++++++++++++++++++++++--------
- 2 files changed, 43 insertions(+), 8 deletions(-)
+ src/tmpfiles/tmpfiles.c | 47 ++++++++++++++++++++++++++++++++++++++++-------
+ 2 files changed, 43 insertions(+), 7 deletions(-)
-Index: systemd/man/tmpfiles.d.xml
+Index: systemd-221/man/tmpfiles.d.xml
===================================================================
---- systemd.orig/man/tmpfiles.d.xml
-+++ systemd/man/tmpfiles.d.xml
-@@ -489,6 +489,9 @@
+--- systemd-221.orig/man/tmpfiles.d.xml
++++ systemd-221/man/tmpfiles.d.xml
+@@ -528,6 +528,9 @@
<varname>f</varname>, <varname>F</varname>, and
<varname>w</varname> may be used to specify a short string that
is written to the file, suffixed by a newline. For
@@ -15,13 +15,21 @@
+ usernames. If given, only paths belonging to these users will be excluded
+ during directory cleanup. Ignored for all other lines. For
<varname>C</varname>, specifies the source file or
- directory. For <varname>t</varname> determines extended
- attributes to be set. For <varname>a</varname> determines
-Index: systemd/src/tmpfiles/tmpfiles.c
+ directory. For <varname>t</varname>, <varname>T</varname>
+ determines extended attributes to be set. For
+Index: systemd-221/src/tmpfiles/tmpfiles.c
===================================================================
---- systemd.orig/src/tmpfiles/tmpfiles.c
-+++ systemd/src/tmpfiles/tmpfiles.c
-@@ -345,6 +345,7 @@ static int dir_cleanup(
+--- systemd-221.orig/src/tmpfiles/tmpfiles.c
++++ systemd-221/src/tmpfiles/tmpfiles.c
+@@ -37,6 +37,7 @@
+ #include <sys/stat.h>
+ #include <sys/xattr.h>
+ #include <linux/fs.h>
++#include <pwd.h>
+
+ #include "log.h"
+ #include "util.h"
+@@ -358,6 +359,7 @@ static int dir_cleanup(
struct timespec times[2];
bool deleted = false;
int r = 0;
@@ -29,24 +37,23 @@
while ((dent = readdir(d))) {
struct stat s;
-@@ -395,14 +396,45 @@ static int dir_cleanup(
+@@ -408,14 +410,45 @@ static int dir_cleanup(
}
/* Is there an item configured for this path? */
-- if (hashmap_get(items, sub_path)) {
+- if (ordered_hashmap_get(items, sub_path)) {
- log_debug("Ignoring \"%s\": a separate entry exists.", sub_path);
- continue;
-- }
--
-- if (find_glob(globs, sub_path)) {
-- log_debug("Ignoring \"%s\": a separate glob exists.", sub_path);
-- continue;
+ bool found_glob = false;
-+ found = hashmap_get(items, sub_path);
++ found = ordered_hashmap_get(items, sub_path);
+ if (!found) {
+ found_glob = true;
+ found = find_glob(globs, sub_path);
-+ }
+ }
+-
+- if (find_glob(globs, sub_path)) {
+- log_debug("Ignoring \"%s\": a separate glob exists.", sub_path);
+- continue;
+ if (found) {
+ struct passwd *pw;
+ char *userfound = NULL, *args;
++++++ systemd-dbus-system-bus-address.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,13 +1,26 @@
---
+ src/basic/def.h | 2 +-
src/libsystemd/sd-bus/sd-bus.c | 4 ++--
- src/shared/def.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
-Index: systemd/src/libsystemd/sd-bus/sd-bus.c
+Index: systemd-221/src/basic/def.h
===================================================================
---- systemd.orig/src/libsystemd/sd-bus/sd-bus.c
-+++ systemd/src/libsystemd/sd-bus/sd-bus.c
-@@ -809,8 +809,8 @@ static int parse_container_unix_address(
+--- systemd-221.orig/src/basic/def.h
++++ systemd-221/src/basic/def.h
+@@ -61,7 +61,7 @@
+ "/usr/lib/kbd/keymaps/\0"
+ #endif
+
+-#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
++#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
+ #define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus"
+ #define DEFAULT_SYSTEM_BUS_ADDRESS KERNEL_SYSTEM_BUS_ADDRESS ";" UNIX_SYSTEM_BUS_ADDRESS
+ #define UNIX_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
+Index: systemd-221/src/libsystemd/sd-bus/sd-bus.c
+===================================================================
+--- systemd-221.orig/src/libsystemd/sd-bus/sd-bus.c
++++ systemd-221/src/libsystemd/sd-bus/sd-bus.c
+@@ -837,8 +837,8 @@ static int parse_container_unix_address(
b->nspid = 0;
b->sockaddr.un.sun_family = AF_UNIX;
@@ -18,16 +31,3 @@
return 0;
}
-Index: systemd/src/shared/def.h
-===================================================================
---- systemd.orig/src/shared/def.h
-+++ systemd/src/shared/def.h
-@@ -61,7 +61,7 @@
- "/usr/lib/kbd/keymaps/\0"
- #endif
-
--#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
-+#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
- #define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus"
-
- #ifdef ENABLE_KDBUS
++++++ systemd-install-compat_pkgconfig-always.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,6 +1,12 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4560,12 +4560,6 @@ lib_LTLIBRARIES += \
+---
+ Makefile.am | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+Index: systemd-221/Makefile.am
+===================================================================
+--- systemd-221.orig/Makefile.am
++++ systemd-221/Makefile.am
+@@ -5876,12 +5876,6 @@ lib_LTLIBRARIES += \
libsystemd-id128.la \
libsystemd-daemon.la
@@ -13,7 +19,7 @@
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
compat-lib-install-hook:
libname=libsystemd-login.so && $(move-to-rootlibdir)
-@@ -4583,6 +4577,12 @@ INSTALL_EXEC_HOOKS += compat-lib-install
+@@ -5899,6 +5893,12 @@ INSTALL_EXEC_HOOKS += compat-lib-install
UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
endif
@@ -24,5 +30,5 @@
+ src/compat-libs/libsystemd-daemon.pc
+
EXTRA_DIST += \
+ src/compat-libs/linkwarning.h \
src/compat-libs/libsystemd-journal.pc.in \
- src/compat-libs/libsystemd-login.pc.in \
++++++ systemd-pam_config.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -2,10 +2,10 @@
src/login/systemd-user | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-Index: systemd-218/src/login/systemd-user
+Index: systemd-221/src/login/systemd-user
===================================================================
---- systemd-218.orig/src/login/systemd-user
-+++ systemd-218/src/login/systemd-user
+--- systemd-221.orig/src/login/systemd-user
++++ systemd-221/src/login/systemd-user
@@ -2,5 +2,5 @@
#
# Used by systemd --user instances.
++++++ systemd-tmp-safe-defaults.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -8,10 +8,10 @@
tmpfiles.d/tmp.conf | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-Index: systemd/tmpfiles.d/tmp.conf
+Index: systemd-221/tmpfiles.d/tmp.conf
===================================================================
---- systemd.orig/tmpfiles.d/tmp.conf
-+++ systemd/tmpfiles.d/tmp.conf
+--- systemd-221.orig/tmpfiles.d/tmp.conf
++++ systemd-221/tmpfiles.d/tmp.conf
@@ -8,8 +8,9 @@
# See tmpfiles.d(5) for details
++++++ tomcat6-var-lock-subsys-legacy.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -5,9 +5,11 @@
tmpfiles.d/legacy.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---- systemd-210/tmpfiles.d/legacy.conf
-+++ systemd-210/tmpfiles.d/legacy.conf 2014-07-30 12:36:36.862735670 +0000
-@@ -16,7 +16,7 @@ d /run/lock 0775 root lock -
+Index: systemd-221/tmpfiles.d/legacy.conf
+===================================================================
+--- systemd-221.orig/tmpfiles.d/legacy.conf
++++ systemd-221/tmpfiles.d/legacy.conf
+@@ -17,7 +17,7 @@ L /var/lock - - - - ../run/lock
# /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems.
++++++ tty-ask-password-agent-on-console.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -1,11 +1,22 @@
+From 633a5904c1c4e363a7147f47e2d9fdb1925f7b9f Mon Sep 17 00:00:00 2001
+From: Werner Fink <werner(a)suse.de>
+Date: Fri, 25 Sep 2015 14:28:58 +0200
+Subject: [PATCH] Ask for passphrases not only on the first console of
+ /dev/console
+
+but also on all other consoles. This does help on e.g. mainframes
+where often a serial console together with other consoles are
+used. Even rack based servers attachted to both a serial console
+as well as having a virtual console do sometimes miss a connected
+monitor.
---
- src/tty-ask-password-agent/tty-ask-password-agent.c | 171 +++++++++++++++++++-
- 1 file changed, 166 insertions(+), 5 deletions(-)
+ src/tty-ask-password-agent/tty-ask-password-agent.c | 191 ++++++++++++++++++++-
+ 1 file changed, 186 insertions(+), 5 deletions(-)
-Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
-===================================================================
---- systemd.orig/src/tty-ask-password-agent/tty-ask-password-agent.c
-+++ systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
+diff --git src/tty-ask-password-agent/tty-ask-password-agent.c src/tty-ask-password-agent/tty-ask-password-agent.c
+index 82cbf95..928a5e8 100644
+--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
++++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -31,6 +31,10 @@
#include <getopt.h>
#include <sys/signalfd.h>
@@ -17,26 +28,22 @@
#include "util.h"
#include "mkdir.h"
-@@ -42,6 +46,9 @@
- #include "strv.h"
- #include "build.h"
- #include "def.h"
+@@ -45,6 +49,8 @@
+ #include "process-util.h"
+ #include "terminal-util.h"
+ #include "signal-util.h"
+#include "fileio.h"
+#include "macro.h"
-+#include "list.h"
static enum {
ACTION_LIST,
-@@ -50,6 +57,22 @@ static enum {
+@@ -53,6 +59,19 @@ static enum {
ACTION_WALL
} arg_action = ACTION_QUERY;
+struct console {
-+ LIST_FIELDS(struct console, handle);
-+ const char *tty;
+ pid_t pid;
-+ int id;
-+ char dev[];
++ char *tty;
+};
+
+static volatile unsigned long *usemask;
@@ -50,22 +57,33 @@
static bool arg_plymouth = false;
static bool arg_console = false;
-@@ -208,6 +231,58 @@ static int ask_password_plymouth(
+@@ -210,6 +229,69 @@ static int ask_password_plymouth(
return 0;
}
++static void free_consoles(struct console *con, const unsigned int num) {
++ unsigned int n;
++ if (!con || !num)
++ return;
++ for (n = 0; n < num; n++)
++ free(con[n].tty);
++ free(con);
++}
++
+static const char *current_dev = "/dev/console";
-+static LIST_HEAD(struct console, consoles);
-+static int collect_consoles(void) {
++static struct console* collect_consoles(unsigned int * num) {
+ _cleanup_free_ char *active = NULL;
+ const char *word, *state;
-+ struct console *con;
-+ size_t len;
-+ int ret, id = 0;
++ struct console *con = NULL;
++ size_t con_len = 0, len;
++ int ret;
++
++ assert(num);
++ assert(*num == 0);
+
+ ret = read_one_line_file("/sys/class/tty/console/active", &active);
+ if (ret < 0)
-+ return ret;
++ return con;
+ FOREACH_WORD(word, len, active, state) {
+ _cleanup_free_ char *tty = NULL;
+
@@ -74,42 +92,42 @@
+ word = tty;
+ len = strlen(tty);
+ }
-+ con = malloc0(sizeof(*con) + strlen("/dev/") + len + 1);
++ con = greedy_realloc((void**)&con, &con_len, 1+(*num), sizeof(struct console));
+ if (con == NULL) {
+ log_oom();
-+ continue;
++ return NULL;
++ }
++ if (asprintf(&con[*num].tty, "/dev/%.*s", (int)len, word) < 0) {
++ free_consoles(con, *num);
++ log_oom();
++ *num = 0;
++ return NULL;
+ }
-+ sprintf(con->dev, "/dev/%.*s", (int)len, word);
-+ con->tty = con->dev;
-+ con->id = id++;
-+ LIST_PREPEND(handle, consoles, con);
++ con[*num].pid = 0;
++ (*num)++;
+ }
-+ if (consoles == NULL) {
-+ con = malloc0(sizeof(*con));
++ if (con == NULL) {
++ con = greedy_realloc((void**)&con, &con_len, 1, sizeof(struct console));
+ if (con == NULL) {
+ log_oom();
-+ return -ENOMEM;
++ return NULL;
+ }
-+ con->tty = current_dev;
-+ con->id = id++;
-+ LIST_PREPEND(handle, consoles, con);
-+ }
-+ return 0;
-+}
-+
-+static void free_consoles(void) {
-+ struct console *c;
-+ LIST_FOREACH(handle, c, consoles) {
-+ LIST_REMOVE(handle, consoles, c);
-+ free(c);
++ con[0].tty = strdup(current_dev);
++ if (con[0].tty == NULL) {
++ free_consoles(con, 1);
++ log_oom();
++ return NULL;
++ }
++ con[0].pid = 0;
++ (*num)++;
+ }
-+ LIST_HEAD_INIT(consoles);
++ return con;
+}
+
static int parse_password(const char *filename, char **wall) {
_cleanup_free_ char *socket_name = NULL, *message = NULL, *packet = NULL;
uint64_t not_after = 0;
-@@ -308,7 +383,7 @@ static int parse_password(const char *fi
+@@ -310,7 +392,7 @@ static int parse_password(const char *filename, char **wall) {
_cleanup_free_ char *password = NULL;
if (arg_console) {
@@ -118,28 +136,39 @@
if (tty_fd < 0)
return tty_fd;
}
-@@ -612,9 +687,85 @@ static int parse_argv(int argc, char *ar
+@@ -614,8 +696,90 @@ static int parse_argv(int argc, char *argv[]) {
return 1;
}
-+static int zzz(void)
++static unsigned int wfa_child(const struct console * con, const unsigned int id)
+{
-+ struct console *con;
++ setsid();
++ release_terminal();
++ *usemask |= 1 << id; /* shared memory area */
++ current_dev = con[id].tty;
++ return id;
++}
++
++static unsigned int wait_for_answer(void)
++{
++ struct console *consoles;
+ struct sigaction sig = {
+ .sa_handler = chld_handler,
+ .sa_flags = SA_NOCLDSTOP | SA_RESTART,
+ };
+ struct sigaction oldsig;
+ sigset_t set, oldset;
++ unsigned int num = 0, id;
+ int status = 0, ret;
+ pid_t job;
+
-+ collect_consoles();
-+ if (!consoles->handle_next) {
-+ consoles->pid = 0;
-+ con = consoles;
-+ goto nofork;
++ consoles = collect_consoles(&num);
++ if (!consoles) {
++ log_error("Failed to query password: %m");
++ exit(EXIT_FAILURE);
+ }
++ if (num < 2)
++ return wfa_child(consoles, 0);
+
+ assert_se(sigemptyset(&set) == 0);
+ assert_se(sigaddset(&set, SIGHUP) == 0);
@@ -150,25 +179,21 @@
+ sig.sa_handler = SIG_DFL;
+ assert_se(sigaction(SIGHUP, &sig, NULL) == 0);
+
-+ LIST_FOREACH(handle, con, consoles) {
-+ switch ((con->pid = fork())) {
-+ case 0:
++ for (id = 0; id < num; id++) {
++ consoles[id].pid = fork();
++
++ if (consoles[id].pid < 0) {
++ log_error("Failed to query password: %m");
++ exit(EXIT_FAILURE);
++ }
++
++ if (consoles[id].pid == 0) {
+ if (prctl(PR_SET_PDEATHSIG, SIGHUP) < 0)
+ _exit(EXIT_FAILURE);
+ zero(sig);
+ assert_se(sigprocmask(SIG_UNBLOCK, &oldset, NULL) == 0);
+ assert_se(sigaction(SIGCHLD, &oldsig, NULL) == 0);
-+ nofork:
-+ setsid();
-+ release_terminal();
-+ *usemask |= 1 << con->id;
-+ current_dev = con->tty;
-+ return con->id; /* child */
-+ case -1:
-+ log_error("Failed to query password: %s", strerror(errno));
-+ exit(EXIT_FAILURE);
-+ default:
-+ break;
++ return wfa_child(consoles, id);
+ }
+ }
+
@@ -179,21 +204,21 @@
+ break;
+ continue;
+ }
-+ LIST_FOREACH(handle, con, consoles) {
-+ if (con->pid == job || kill(con->pid, 0) < 0) {
-+ *usemask &= ~(1 << con->id);
++ for (id = 0; id < num; id++) {
++ if (consoles[id].pid == job || kill(consoles[id].pid, 0) < 0) {
++ *usemask &= ~(1 << id); /* shared memory area */
+ continue;
+ }
-+ if (*usemask & (1 << con->id))
++ if (*usemask & (1 << id)) /* shared memory area */
+ continue;
-+ kill(con->pid, SIGHUP);
++ kill(consoles[id].pid, SIGHUP);
+ usleep(50000);
-+ kill(con->pid, SIGKILL);
++ kill(consoles[id].pid, SIGKILL);
+ }
+ if (WIFEXITED(status) && ret == 0)
+ ret = WEXITSTATUS(status);
+ }
-+ free_consoles();
++ free_consoles(consoles, num);
+ exit(ret != 0 ? EXIT_FAILURE : EXIT_SUCCESS); /* parent */
+}
+
@@ -201,14 +226,20 @@
- int r;
+ int r, id = 0;
-+ LIST_HEAD_INIT(consoles);
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
- log_open();
-@@ -625,11 +776,19 @@ int main(int argc, char *argv[]) {
+@@ -627,11 +791,27 @@ int main(int argc, char *argv[]) {
if (r <= 0)
goto finish;
++ /*
++ * Use this shared memory area to be able to synchronize the
++ * workers asking for password with the main process.
++ * This allows to continue if one of the consoles had been
++ * used as afterwards the remaining asking processes will
++ * be terminated. The wait_for_terminate() does not help
++ * for this use case.
++ */
+ usemask = mmap(NULL, sizeof(*usemask), PROT_READ | PROT_WRITE,
+ MAP_ANONYMOUS | MAP_SHARED, -1, 0);
+ assert_se(usemask != NULL);
@@ -216,9 +247,9 @@
if (arg_console) {
- setsid();
- release_terminal();
-+ if (!arg_plymouth && arg_action != ACTION_WALL &&
-+ arg_action != ACTION_LIST) {
-+ id = zzz();
++ if (!arg_plymouth &&
++ !IN_SET(arg_action, ACTION_WALL, ACTION_LIST)) {
++ id = wait_for_answer();
+ } else {
+ setsid();
+ release_terminal();
@@ -228,12 +259,14 @@
if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL))
r = watch_passwords();
else
-@@ -638,6 +797,8 @@ int main(int argc, char *argv[]) {
+@@ -640,6 +820,7 @@ int main(int argc, char *argv[]) {
if (r < 0)
log_error_errno(r, "Error: %m");
-+ free_consoles();
-+ *usemask &= ~(1 << id);
++ *usemask &= ~(1 << id); /* shared memory area */
finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
+--
+2.2.0
+
++++++ use-rndaddentropy-ioctl-to-load-random-seed.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -5,11 +5,13 @@
Related to bnc#892096
---
- systemd-219/src/random-seed/random-seed.c | 71 +++++++++++++++++++++++++-----
+ src/random-seed/random-seed.c | 71 ++++++++++++++++++++++++++++++++++++------
1 file changed, 61 insertions(+), 10 deletions(-)
---- systemd-219/src/random-seed/random-seed.c
-+++ systemd-219/src/random-seed/random-seed.c 2015-04-21 09:39:03.057518051 +0000
+Index: systemd-221/src/random-seed/random-seed.c
+===================================================================
+--- systemd-221.orig/src/random-seed/random-seed.c
++++ systemd-221/src/random-seed/random-seed.c
@@ -22,7 +22,9 @@
#include <unistd.h>
#include <fcntl.h>
@@ -42,7 +44,7 @@
r = log_oom();
goto finish;
}
-+ entropy->buf_size = buf_size;
++ entropy->buf_size = (typeof(entropy->buf_size)) buf_size;
r = mkdir_parents_label(RANDOM_SEED, 0755);
if (r < 0) {
@@ -52,7 +54,7 @@
+ entropy_fd = open(RANDOM_SEED_DIR "entropy_count", O_RDONLY|O_CLOEXEC|O_NOCTTY, 0600);
+ if (entropy_fd < 0) {
-+ entropy->entropy_count = 0;
++ entropy->entropy_count = 0;
+ if (errno != ENOENT) {
+ log_error("Failed to open " RANDOM_SEED "/entropy_count: %m");
+ r = -errno;
@@ -70,23 +72,23 @@
seed_fd = open(RANDOM_SEED, O_RDWR|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
if (seed_fd < 0) {
seed_fd = open(RANDOM_SEED, O_RDONLY|O_CLOEXEC|O_NOCTTY);
-@@ -104,7 +124,7 @@ int main(int argc, char *argv[]) {
+@@ -103,7 +123,7 @@ int main(int argc, char *argv[]) {
}
}
- k = loop_read(seed_fd, buf, buf_size, false);
-+ k = loop_read(seed_fd, entropy->buf, entropy->buf_size, false);
- if (k <= 0) {
-
- if (r != 0)
-@@ -115,13 +135,29 @@ int main(int argc, char *argv[]) {
- } else {
- lseek(seed_fd, 0, SEEK_SET);
++ k = loop_read(seed_fd, entropy->buf, (size_t) entropy->buf_size, false);
+ if (k < 0)
+ r = log_error_errno(k, "Failed to read seed from " RANDOM_SEED ": %m");
+ else if (k == 0)
+@@ -111,13 +131,29 @@ int main(int argc, char *argv[]) {
+ else {
+ (void) lseek(seed_fd, 0, SEEK_SET);
- r = loop_write(random_fd, buf, (size_t) k, false);
- if (r < 0)
- log_error_errno(r, "Failed to write seed to /dev/urandom: %m");
-+ if (entropy->entropy_count && ((size_t)k) == entropy->buf_size) {
++ if (entropy->entropy_count && (size_t)k == (size_t)entropy->buf_size) {
+ r = ioctl(random_fd, RNDADDENTROPY, entropy);
+ if (r < 0) {
+ log_error_errno(errno, "Failed to write seed to /dev/urandom: %m");
@@ -111,8 +113,8 @@
+
seed_fd = open(RANDOM_SEED, O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
if (seed_fd < 0) {
- log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m");
-@@ -136,6 +172,21 @@ int main(int argc, char *argv[]) {
+ r = log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m");
+@@ -130,6 +166,21 @@ int main(int argc, char *argv[]) {
goto finish;
}
@@ -132,20 +134,23 @@
+ }
+
} else {
- log_error("Unknown verb %s.", argv[1]);
+ log_error("Unknown verb '%s'.", argv[1]);
r = -EINVAL;
-@@ -149,12 +200,12 @@ int main(int argc, char *argv[]) {
- fchmod(seed_fd, 0600);
- fchown(seed_fd, 0, 0);
+@@ -144,7 +195,7 @@ int main(int argc, char *argv[]) {
+ (void) fchmod(seed_fd, 0600);
+ (void) fchown(seed_fd, 0, 0);
- k = loop_read(random_fd, buf, buf_size, false);
-+ k = loop_read(random_fd, entropy->buf, entropy->buf_size, false);
- if (k <= 0) {
- log_error("Failed to read new seed from /dev/urandom: %s", r < 0 ? strerror(-r) : "EOF");
- r = k == 0 ? -EIO : (int) k;
- } else {
-- r = loop_write(seed_fd, buf, (size_t) k, false);
-+ r = loop_write(seed_fd, entropy->buf, (size_t) k, false);
- if (r < 0)
- log_error_errno(r, "Failed to write new random seed file: %m");
++ k = loop_read(random_fd, entropy->buf, (size_t) entropy->buf_size, false);
+ if (k < 0) {
+ r = log_error_errno(k, "Failed to read new seed from /dev/urandom: %m");
+ goto finish;
+@@ -155,7 +206,7 @@ int main(int argc, char *argv[]) {
+ goto finish;
}
+
+- r = loop_write(seed_fd, buf, (size_t) k, false);
++ r = loop_write(seed_fd, entropy->buf, (size_t) k, false);
+ if (r < 0)
+ log_error_errno(r, "Failed to write new random seed file: %m");
+ }
++++++ vhangup-on-all-consoles.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -14,10 +14,10 @@
units/getty@.service.m4 | 1 +
units/serial-getty@.service.m4 | 1 +
2 files changed, 2 insertions(+)
-Index: systemd-218/units/getty@.service.m4
+Index: systemd-221/units/getty@.service.m4
===================================================================
---- systemd-218.orig/units/getty@.service.m4
-+++ systemd-218/units/getty@.service.m4
+--- systemd-221.orig/units/getty@.service.m4
++++ systemd-221/units/getty@.service.m4
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
[Service]
# the VT is cleared by TTYVTDisallocate
@@ -26,10 +26,10 @@
Type=idle
Restart=always
RestartSec=0
-Index: systemd-218/units/serial-getty@.service.m4
+Index: systemd-221/units/serial-getty@.service.m4
===================================================================
---- systemd-218.orig/units/serial-getty@.service.m4
-+++ systemd-218/units/serial-getty@.service.m4
+--- systemd-221.orig/units/serial-getty@.service.m4
++++ systemd-221/units/serial-getty@.service.m4
@@ -24,6 +24,7 @@ IgnoreOnIsolate=yes
[Service]
++++++ watch_resolv.conf_for_become_changed.patch ++++++
--- /var/tmp/diff_new_pack.5Uoy99/_old 2015-09-27 14:31:55.000000000 +0200
+++ /var/tmp/diff_new_pack.5Uoy99/_new 2015-09-27 14:31:55.000000000 +0200
@@ -3,19 +3,19 @@
src/core/manager.h | 5 ++
2 files changed, 98 insertions(+)
-Index: systemd-218/src/core/manager.c
+Index: systemd-221/src/core/manager.c
===================================================================
---- systemd-218.orig/src/core/manager.c
-+++ systemd-218/src/core/manager.c
-@@ -37,6 +37,7 @@
- #include <sys/stat.h>
+--- systemd-221.orig/src/core/manager.c
++++ systemd-221/src/core/manager.c
+@@ -32,6 +32,7 @@
+ #include <fcntl.h>
#include <dirent.h>
#include <sys/timerfd.h>
+#include <resolv.h>
#ifdef HAVE_AUDIT
#include <libaudit.h>
-@@ -302,6 +303,91 @@ static int manager_check_ask_password(Ma
+@@ -308,6 +309,91 @@ static int manager_check_ask_password(Ma
return m->have_ask_password;
}
@@ -107,7 +107,7 @@
static int manager_watch_idle_pipe(Manager *m) {
int r;
-@@ -557,6 +643,7 @@ int manager_new(SystemdRunningAs running
+@@ -585,6 +671,7 @@ int manager_new(ManagerRunningAs running
m->pin_cgroupfs_fd = m->notify_fd = m->signal_fd = m->time_change_fd = m->dev_autofs_fd = m->private_listen_fd = m->kdbus_fd = m->utab_inotify_fd = -1;
m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */
@@ -115,7 +115,7 @@
m->ask_password_inotify_fd = -1;
m->have_ask_password = -EINVAL; /* we don't know */
-@@ -618,6 +705,10 @@ int manager_new(SystemdRunningAs running
+@@ -651,6 +738,10 @@ int manager_new(ManagerRunningAs running
if (r < 0)
goto fail;
@@ -126,7 +126,7 @@
m->udev = udev_new();
if (!m->udev) {
r = -ENOMEM;
-@@ -896,6 +987,8 @@ Manager* manager_free(Manager *m) {
+@@ -929,6 +1020,8 @@ Manager* manager_free(Manager *m) {
if (!m)
return NULL;
@@ -135,11 +135,11 @@
manager_clear_jobs_and_units(m);
for (c = 0; c < _UNIT_TYPE_MAX; c++)
-Index: systemd-218/src/core/manager.h
+Index: systemd-221/src/core/manager.h
===================================================================
---- systemd-218.orig/src/core/manager.h
-+++ systemd-218/src/core/manager.h
-@@ -185,6 +185,11 @@ struct Manager {
+--- systemd-221.orig/src/core/manager.h
++++ systemd-221/src/core/manager.h
+@@ -181,6 +181,11 @@ struct Manager {
int utab_inotify_fd;
sd_event_source *mount_utab_event_source;
1
0
Hello community,
here is the log from the commit of package libseccomp for openSUSE:Factory checked in at 2015-09-27 14:32:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libseccomp (Old)
and /work/SRC/openSUSE:Factory/.libseccomp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libseccomp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libseccomp/libseccomp.changes 2015-09-19 06:52:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libseccomp.new/libseccomp.changes 2015-09-27 14:31:43.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Sep 25 12:14:37 UTC 2015 - dimstar(a)opensuse.org
+
+- Add baselibs.conf: systemd-32bit-224+ links against
+ libseccomp.so.2.
+
+-------------------------------------------------------------------
New:
----
baselibs.conf
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libseccomp.spec ++++++
--- /var/tmp/diff_new_pack.kEuAmc/_old 2015-09-27 14:31:44.000000000 +0200
+++ /var/tmp/diff_new_pack.kEuAmc/_new 2015-09-27 14:31:44.000000000 +0200
@@ -28,6 +28,7 @@
#Git-Clone: git://github.com/seccomp/libseccomp
Source: https://github.com/seccomp/libseccomp/releases/download/v%version/%name-%ve…
Source2: https://github.com/seccomp/libseccomp/releases/download/v%version/%name-%ve…
+Source99: baselibs.conf
Patch1: no-static.diff
Patch3: libseccomp-s390x-support.patch
Patch5: libseccomp-ppc64le.patch
++++++ baselibs.conf ++++++
libseccomp2
1
0
Hello community,
here is the log from the commit of package libgudev for openSUSE:Factory checked in at 2015-09-27 14:32:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libgudev (Old)
and /work/SRC/openSUSE:Factory/.libgudev.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgudev"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libgudev/libgudev.changes 2015-08-21 07:40:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libgudev.new/libgudev.changes 2015-09-27 14:31:37.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Sep 25 08:38:43 UTC 2015 - dimstar(a)suse.com
+
+- Enable build (dummy change for repo_checker, as libgudev was
+ wrongly already checked in to openSUSE:Factory, but has since
+ been disabled). With this, we can activate the Staging properly.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libgudev.spec ++++++
--- /var/tmp/diff_new_pack.u8TIYI/_old 2015-09-27 14:31:37.000000000 +0200
+++ /var/tmp/diff_new_pack.u8TIYI/_new 2015-09-27 14:31:37.000000000 +0200
@@ -15,22 +15,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: libgudev
Version: 230
Release: 0
+Summary: Library that provides GObject bindings for libudev
License: LGPL-2.0+
Group: Development/Libraries/GNOME
-Summary: Library that provides GObject bindings for libudev
Url: https://wiki.gnome.org/Projects/libgudev
Source0: https://download.gnome.org/sources/libgudev/%{version}/%{name}-%{version}.t…
Source99: baselibs.conf
BuildRequires: pkgconfig
-BuildRequires: pkgconfig(libudev)
+BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.22.0
BuildRequires: pkgconfig(gobject-2.0) >= 2.22.0
-BuildRequires: pkgconfig(gio-2.0)
-BuildRequires: pkgconfig(gtk-doc) >= 1.18
BuildRequires: pkgconfig(gobject-introspection-1.0)
+BuildRequires: pkgconfig(gtk-doc) >= 1.18
+BuildRequires: pkgconfig(libudev)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
1
0
Hello community,
here is the log from the commit of package patterns-openSUSE for openSUSE:Factory checked in at 2015-09-27 14:32:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/patterns-openSUSE (Old)
and /work/SRC/openSUSE:Factory/.patterns-openSUSE.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "patterns-openSUSE"
Changes:
--------
--- /work/SRC/openSUSE:Factory/patterns-openSUSE/patterns-openSUSE.changes 2015-09-11 09:04:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.patterns-openSUSE.new/patterns-openSUSE.changes 2015-09-27 14:31:32.000000000 +0200
@@ -1,0 +2,31 @@
+Thu Sep 24 13:15:54 UTC 2015 - dimstar(a)opensuse.org
+
+- Recommend systemd-32bit in the rest_dvd_core pattern.
+
+-------------------------------------------------------------------
+Wed Sep 23 13:42:58 UTC 2015 - dimstar(a)opensuse.org
+
+- Also fix the KDE CD: sssd-32bit is recommended there too, so also
+ recommend systemd-32bit.
+
+-------------------------------------------------------------------
+Wed Sep 23 13:20:17 UTC 2015 - dimstar(a)opensuse.org
+
+- When recommending sssd-32bit, also recommend systemd-32bit: the
+ systemd-pam modules are needed in this case too (not strictly a
+ requirement, but pam-config -a --systemd fails on a 64bit system
+ when pam-32bit is installed but the 32bit pam modules are not).
+
+-------------------------------------------------------------------
+Tue Sep 22 11:43:40 UTC 2015 - mvetter(a)suse.com
+
+- Add basic lxqt pattern
+
+-------------------------------------------------------------------
+Fri Sep 18 10:31:45 UTC 2015 - p.drouand(a)gmail.com
+
+- create mate_internet and mate_office_opt patterns
+- Recommend newly created patterns instead of GNOME's ones; recommending
+ GNOME's intall plenty of packages unwanted by regular users
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ patterns-openSUSE.spec ++++++
--- /var/tmp/diff_new_pack.I8YgPR/_old 2015-09-27 14:31:33.000000000 +0200
+++ /var/tmp/diff_new_pack.I8YgPR/_new 2015-09-27 14:31:33.000000000 +0200
@@ -17,7 +17,7 @@
Name: patterns-openSUSE
-Version: 20150828
+Version: 20150918
Release: 0
Summary: Patterns for Installation (full ftp tree)
License: MIT
@@ -3854,6 +3854,72 @@
%dir /usr/share/doc/packages/patterns-openSUSE
/usr/share/doc/packages/patterns-openSUSE/lxde_office.txt
+%package lxqt
+%pattern_graphicalenvironments
+Summary: LXQt Desktop Environment
+Group: Metapackages
+Provides: pattern() = lxqt
+Provides: pattern-order() = 1460
+Provides: pattern-visible()
+Requires: pattern() = x11
+Recommends: pattern() = multimedia
+
+Recommends: pattern() = remote_desktop
+Recommends: lxqt-about
+Recommends: lxqt-common
+Recommends: lxqt-config
+Recommends: lxqt-globalkeys
+Recommends: lxqt-notificationd
+Recommends: lxqt-openssh-askpass
+Recommends: lxqt-panel
+Recommends: lxqt-policykit
+Recommends: lxqt-powermanagement
+Recommends: lxqt-runner
+Recommends: lxqt-session
+Recommends: lxqt-qtplugin
+
+Recommends: pcmanfm-qt
+Recommends: qupzilla
+#TODO qterminal needs to get moved from X11:QtDesktop
+#TODO juffed needs to get moved from X11:QtDesktop
+
+Recommends: openbox
+Recommends: obconf
+Recommends: obconf-qt
+Recommends: xdg-utils
+Recommends: xscreensaver
+Recommends: xorg-x11-essentials
+Recommends: xdm
+
+Recommends: gwenview
+Recommends: ark
+Recommends: claws-mail
+Recommends: xfce4-power-manager
+Recommends: xfce4-screenshooter
+
+Recommends: pk-update-icon
+Recommends: apper
+
+Recommends: avahi
+Recommends: kdesu
+Recommends: system-config-printer
+Recommends: simple-scan
+Recommends: libyui-qt-pkg
+Recommends: yast2-control-center-qt
+Recommends: NetworkManager
+Recommends: NetworkManager-gnome
+Recommends: droid-fonts
+Recommends: desktop-data-openSUSE
+Recommends: samba
+Suggests: hplip
+
+%description lxqt
+LXQt is a lightweight desktop environment based on Qt.
+
+%files lxqt
+%dir /usr/share/doc/packages/patterns-openSUSE
+/usr/share/doc/packages/patterns-openSUSE/lxqt.txt
+
%package mail_server
%pattern_serverfunctions
Summary: Mail and News Server
@@ -3902,7 +3968,7 @@
Recommends: pattern() = imaging
Recommends: pattern() = non_oss
Recommends: pattern() = mate_admin
-Recommends: pattern() = gnome_internet
+Recommends: pattern() = mate_internet
Recommends: pattern() = multimedia
Recommends: pattern() = office
Recommends: pattern() = mate_utilities
@@ -4079,6 +4145,44 @@
%dir /usr/share/doc/packages/patterns-openSUSE
/usr/share/doc/packages/patterns-openSUSE/mate_basis.txt
+%package mate_internet
+%pattern_matedesktop
+Summary: MATE Internet
+Group: Metapackages
+Provides: pattern() = mate_internet
+Provides: pattern-extends() = mate
+Provides: pattern-icon() = package_network
+Provides: pattern-order() = 2421
+Recommends: pidgin
+Recommends: MozillaThunderbird
+Recommends: mate-netspeed
+#
+# Packages that really make sense
+#
+Recommends: liferea
+# As NetworkManager works well on MATE, we should recommend the same packages
+Recommends: NetworkManager-openvpn-gnome
+Recommends: NetworkManager-pptp-gnome
+Recommends: NetworkManager-vpnc-gnome
+Recommends: NetworkManager-openconnect-gnome
+# bnc#530416
+Recommends: transmission-gtk
+Recommends: xchat
+Suggests: ekiga
+#
+# Packages that can make sense
+#
+Suggests: gftp
+Suggests: pan
+Suggests: smuxi
+
+%description mate_internet
+MATE Internet Applications
+
+%files mate_internet
+%dir /usr/share/doc/packages/patterns-openSUSE
+/usr/share/doc/packages/patterns-openSUSE/mate_internet.txt
+
%package mate_laptop
%pattern_matedesktop
Summary: MATE Laptop
@@ -4111,7 +4215,7 @@
Supplements: packageand(patterns-openSUSE-mate:patterns-openSUSE-office)
Requires: pattern() = mate_basis
# We provide the same base environment; recommend gnome' one
-Recommends: pattern() = gnome_office_opt
+Recommends: pattern() = mate_office_opt
Recommends: libreoffice-gnome
Recommends: libreoffice-icon-theme-tango
Suggests: abiword
@@ -4126,6 +4230,25 @@
%dir /usr/share/doc/packages/patterns-openSUSE
/usr/share/doc/packages/patterns-openSUSE/mate_office.txt
+%package mate_office_opt
+%pattern_matedesktop
+Summary: MATE Office
+Group: Metapackages
+Provides: pattern() = mate_office_opt
+Provides: pattern-extends() = office
+Provides: pattern-icon() = pattern-mate
+Provides: pattern-order() = 2261
+Supplements: packageand(patterns-openSUSE-mate:patterns-openSUSE-office)
+Requires: pattern() = mate_basis
+Suggests: grisbi
+
+%description mate_office_opt
+MATE Office
+
+%files mate_office_opt
+%dir /usr/share/doc/packages/patterns-openSUSE
+/usr/share/doc/packages/patterns-openSUSE/mate_office_opt.txt
+
%package mate_utilities
%pattern_matedesktop
Summary: MATE Utilities
@@ -4139,7 +4262,6 @@
# Official upstream
#
Recommends: mate-disk-usage-analyzer
-Recommends: mate-netspeed
Recommends: cheese
Recommends: engrampa
Recommends: pluma
@@ -4782,6 +4904,9 @@
Recommends: sssd
%ifarch x86_64
Recommends: sssd-32bit
+# sssd-32bit pulls in some pam-32bit, which results in the need to also have
+# systemd-32bit available (or pam-config -a --systemd will fail later on)
+Recommends: systemd-32bit
%endif
Recommends: gtk2-branding-openSUSE
@@ -5015,6 +5140,9 @@
Recommends: sssd
%ifarch x86_64
Recommends: sssd-32bit
+# sssd-32bit pulls in some pam-32bit, which results in the need to also have
+# systemd-32bit available (or pam-config -a --systemd will fail later on)
+Recommends: systemd-32bit
%endif
Recommends: gtk2-branding-openSUSE
@@ -5346,6 +5474,8 @@
Recommends: xf86-video-v4l
Recommends: xf86-video-vesa
Recommends: xf86-video-vmware
+# We need to ensure that systemd-32bit ends up on the DVD
+Recommends: systemd-32bit
%description rest_core_dvd
Packages that are on CD but not in other patterns.
@@ -7388,6 +7518,7 @@
echo 'This file marks the pattern leechcraft_office to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/leechcraft_office.txt
echo 'This file marks the pattern leechcraft_utilities to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/leechcraft_utilities.txt
echo 'This file marks the pattern lxde to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/lxde.txt
+echo 'This file marks the pattern lxqt to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/lxqt.txt
echo 'This file marks the pattern lxde_laptop to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/lxde_laptop.txt
echo 'This file marks the pattern lxde_office to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/lxde_office.txt
echo 'This file marks the pattern mail_server to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mail_server.txt
@@ -7395,7 +7526,9 @@
echo 'This file marks the pattern mate_admin to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mate_admin.txt
echo 'This file marks the pattern mate_basis to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mate_basis.txt
echo 'This file marks the pattern mate_laptop to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mate_laptop.txt
+echo 'This file marks the pattern mate_internet to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mate_internet.txt
echo 'This file marks the pattern mate_office to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mate_office.txt
+echo 'This file marks the pattern mate_office_opt to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mate_office_opt.txt
echo 'This file marks the pattern mate_utilities to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/mate_utilities.txt
echo 'This file marks the pattern minimal_base to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/minimal_base.txt
echo 'This file marks the pattern minimal_base-conflicts to be installed.' > $RPM_BUILD_ROOT/usr/share/doc/packages/patterns-openSUSE/minimal_base-conflicts.txt
1
0
Hello community,
here is the log from the commit of package sddm for openSUSE:Factory checked in at 2015-09-27 14:32:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sddm (Old)
and /work/SRC/openSUSE:Factory/.sddm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sddm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/sddm/sddm.changes 2015-09-11 09:01:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.sddm.new/sddm.changes 2015-09-27 14:31:26.000000000 +0200
@@ -1,0 +2,24 @@
+Thu Sep 24 17:41:08 UTC 2015 - hrvoje.senjan(a)gmail.com
+
+- Added shadow BuildRequires, it's needed to check UID_MIN & UID_MAX
+ from /etc/login.defs
+
+-------------------------------------------------------------------
+Sat Sep 12 17:28:12 UTC 2015 - wbauer(a)tmo.at
+
+- Change the theme to "maui" in the shipped sddm.conf,
+ sddm-branding-openSUSE sets it to "breeze" on installation.
+- Remove the superfluous requirement for "breeze". This is not
+ needed even with the "breeze" theme, as it is actually part of
+ plasma5-workspace which is required by sddm-branding-openSUSE
+ anyway.
+- sddm-branding-openSUSE should PreReq sddm, otherwise the config
+ might not exist.
+- Make the regexps for sed stricter to really only modify the theme
+ setting when installing/uninstalling sddm-branding-openSUSE.
+ Otherwise it would e.g. also replace CursorTheme=breeze_cursors
+ with CursorTheme=maui_cursors...
+ Also only modify the config on new installation, not during
+ updates.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sddm.spec ++++++
--- /var/tmp/diff_new_pack.DwSXNJ/_old 2015-09-27 14:31:27.000000000 +0200
+++ /var/tmp/diff_new_pack.DwSXNJ/_new 2015-09-27 14:31:27.000000000 +0200
@@ -49,6 +49,8 @@
BuildRequires: pam-devel
BuildRequires: pkg-config
BuildRequires: python-docutils
+# Autodetect UID_MIN and UID_MAX from /etc/login.defs
+BuildRequires: shadow
BuildRequires: systemd-devel
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
@@ -56,7 +58,6 @@
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(xcb-xkb)
-Requires: breeze
Requires: sddm-branding = %{version}
# Merged the -lang package back into the main package
Obsoletes: %{name}-lang <= %{version}
@@ -70,6 +71,7 @@
%package branding-openSUSE
Summary: Lightweight QML-based display manager. openSUSE branding
Group: System/GUI/KDE
+PreReq: sddm
Requires: plasma5-workspace
Supplements: packageand(plasma5-workspace:branding-openSUSE)
Provides: sddm-branding = %{version}
@@ -135,13 +137,13 @@
-d /var/lib/sddm sddm 2> /dev/null || :
%post branding-openSUSE
-if [ -f /etc/sddm.conf ]; then
- sed -i -e 's/maui/breeze/g' /etc/sddm.conf
+if [ $1 -eq 1 -a -f /etc/sddm.conf ]; then
+ sed -i -e 's/^Current=maui$/Current=breeze/g' /etc/sddm.conf
fi
%postun branding-openSUSE
if [ $1 -eq 0 -a -f /etc/sddm.conf ]; then
- sed -i -e 's/breeze/maui/g' /etc/sddm.conf
+ sed -i -e 's/^Current=breeze$/Current=maui/g' /etc/sddm.conf
fi
%files
++++++ sddm.conf ++++++
--- /var/tmp/diff_new_pack.DwSXNJ/_old 2015-09-27 14:31:27.000000000 +0200
+++ /var/tmp/diff_new_pack.DwSXNJ/_new 2015-09-27 14:31:27.000000000 +0200
@@ -1,5 +1,5 @@
[Theme]
-Current=breeze
+Current=maui
CursorTheme=breeze_cursors
[XDisplay]
1
0
Hello community,
here is the log from the commit of package dracut for openSUSE:Factory checked in at 2015-09-27 14:32:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dracut (Old)
and /work/SRC/openSUSE:Factory/.dracut.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dracut"
Changes:
--------
--- /work/SRC/openSUSE:Factory/dracut/dracut.changes 2015-09-03 18:06:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.dracut.new/dracut.changes 2015-09-27 14:31:21.000000000 +0200
@@ -1,0 +2,54 @@
+Wed Sep 23 11:26:05 UTC 2015 - fvogt(a)suse.com
+
+- Fix 0182-fix-include-parsing.patch
+- Didn't parse arguments with spaces correctly
+
+-------------------------------------------------------------------
+Wed Sep 23 10:16:47 UTC 2015 - fvogt(a)suse.com
+
+- Add patch 0183-fix_add_drivers_hang.patch:
+ - Fix possible hang in dracut
+ caused by add_drivers+=" " in dracut.conf (bsc#923116)
+
+-------------------------------------------------------------------
+Mon Sep 21 13:18:43 UTC 2015 - fvogt(a)suse.com
+
+- Add patch 0182-fix-include-parsing.patch:
+ - Fix parsing of "-i" and "--include"
+- Fixes boo#908452
+
+-------------------------------------------------------------------
+Mon Sep 21 10:45:14 UTC 2015 - fvogt(a)suse.com
+
+- Add patch 0181-no_systemd_cryptsetup.patch:
+ - rd.luks.key is not implemented (properly) if systemd is enabled,
+ so ignore systemd in 90crypt
+- Fixes boo#915849
+
+-------------------------------------------------------------------
+Wed Sep 16 12:12:12 UTC 2015 - fvogt(a)suse.com
+
+- Fix systemd-vconsole-error properly (bsc#943312 and bsc#932981)
+ Rewrite 0180-dracut-add-trivial-vconsole-fontmap.patch
+ as 0180-i18n_add_correct_fontmaps.patch
+
+-------------------------------------------------------------------
+Mon Sep 14 11:33:51 UTC 2015 - thomas.blume(a)suse.com
+
+- fix systemd-vconsole-error in initrd (bsc#943312)
+ Add 0180-dracut-add-trivial-vconsole-fontmap.patch
+
+-------------------------------------------------------------------
+Fri Sep 11 11:06:46 UTC 2015 - fvogt(a)suse.com
+
+- Add 0401-mount_option_mountpoint.patch:
+ Make it possible to use a mountpoint as --mount parameter
+
+-------------------------------------------------------------------
+Fri Sep 11 10:56:42 UTC 2015 - fvogt(a)suse.com
+
+- Add experimental 0400-use_fstab_systemd.patch:
+ Add entry for /sysroot in /etc/fstab instead of relying
+ on root= and rootflags=
+
+-------------------------------------------------------------------
New:
----
0180-i18n_add_correct_fontmaps.patch
0181-no_systemd_cryptsetup.patch
0182-fix-include-parsing.patch
0183-fix_add_drivers_hang.patch
0400-use_fstab_systemd.patch
0401-mount_option_mountpoint.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dracut.spec ++++++
--- /var/tmp/diff_new_pack.7erPKq/_old 2015-09-27 14:31:23.000000000 +0200
+++ /var/tmp/diff_new_pack.7erPKq/_new 2015-09-27 14:31:23.000000000 +0200
@@ -101,6 +101,10 @@
Patch164: 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch
Patch165: 0165-Order-root-fsck-after-pre-mount.patch
Patch168: 0168-remove_plymouth_logo_file.patch
+Patch180: 0180-i18n_add_correct_fontmaps.patch
+Patch181: 0181-no_systemd_cryptsetup.patch
+Patch182: 0182-fix-include-parsing.patch
+Patch183: 0183-fix_add_drivers_hang.patch
# Still needed
Patch133: 0133-Allow-multiple-configurations-per-network-interface-.patch
@@ -116,6 +120,9 @@
## fix for SUSE systems which have dpkg installed anyway
Patch300: dracut_dont_use_dpkg_defaults_on_SUSE.patch
+Patch400: 0400-use_fstab_systemd.patch
+Patch401: 0401-mount_option_mountpoint.patch
+
BuildRequires: asciidoc
BuildRequires: bash
BuildRequires: docbook-xsl-stylesheets
@@ -238,6 +245,10 @@
%patch164 -p1
%patch165 -p1
%patch168 -p1
+%patch180 -p1
+%patch181 -p1
+%patch182 -p1
+%patch183 -p1
%patch200 -p1
%patch201 -p1
@@ -245,6 +256,9 @@
%patch300 -p1
+%patch400 -p1
+%patch401 -p1
+
%build
%configure\
--systemdsystemunitdir=%{_unitdir}\
++++++ 0180-i18n_add_correct_fontmaps.patch ++++++
Index: dracut-043/modules.d/10i18n/module-setup.sh
===================================================================
--- dracut-043.orig/modules.d/10i18n/module-setup.sh
+++ dracut-043/modules.d/10i18n/module-setup.sh
@@ -196,7 +196,11 @@ install() {
if [[ ${FONT_MAP} ]]
then
FONT_MAP=${FONT_MAP%.trans}
- inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans
+ # There are three different formats that setfont supports
+ inst_simple ${kbddir}/consoletrans/${FONT_MAP} \
+ || inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans \
+ || inst_simple ${kbddir}/consoletrans/${FONT_MAP}_to_uni.trans \
+ || dwarn "Could not find FONT_MAP ${FONT_MAP}!"
fi
if [[ ${FONT_UNIMAP} ]]
++++++ 0181-no_systemd_cryptsetup.patch ++++++
>From 56f390967ff87515f7269f4793b9a651f0e3b87c Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt(a)suse.com>
Date: Mon, 21 Sep 2015 12:37:14 +0200
Subject: [PATCH] 90crypt: Don't use systemd for crypt
- rd.luks.key is not implemented (properly) if systemd is enabled,
so ignore systemd in 90crypt
- Source of this patch:
https://github.com/jsynacek/dracut/commit/058aa18e3ec2bd6b34e6afff0f2653d74…
- Fixes boo#915849
Signed-off-by: Fabian Vogt <fvogt(a)suse.com>
---
modules.d/90crypt/crypt-run-generator.sh | 31 -------------------------------
modules.d/90crypt/module-setup.sh | 9 ---------
modules.d/90crypt/parse-crypt.sh | 20 --------------------
3 files changed, 60 deletions(-)
delete mode 100755 modules.d/90crypt/crypt-run-generator.sh
diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh
deleted file mode 100755
index 3c5d7b1..0000000
--- a/modules.d/90crypt/crypt-run-generator.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-. /lib/dracut-lib.sh
-type crypttab_contains >/dev/null 2>&1 || . /lib/dracut-crypt-lib.sh
-
-dev=$1
-luks=$2
-
-crypttab_contains "$luks" && exit 0
-
-allowdiscards="-"
-
-# parse for allow-discards
-if strstr "$(cryptsetup --help)" "allow-discards"; then
- if discarduuids=$(getargs "rd.luks.allow-discards"); then
- discarduuids=$(str_replace "$discarduuids" 'luks-' '')
- if strstr " $discarduuids " " ${luks##luks-}"; then
- allowdiscards="allow-discards"
- fi
- elif getargbool 0 rd.luks.allow-discards; then
- allowdiscards="allow-discards"
- fi
-fi
-
-echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab
-
-if command -v systemctl >/dev/null; then
- systemctl daemon-reload
- systemctl start cryptsetup.target
-fi
-exit 0
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
index 721b447..a73e4ee 100755
--- a/modules.d/90crypt/module-setup.sh
+++ b/modules.d/90crypt/module-setup.sh
@@ -89,14 +89,5 @@ install() {
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
inst_simple "/tmp/dracut_block_uuid.map" "/usr/lib/dracut/modules.d/90crypt/block_uuid.map"
- inst_multiple -o \
- $systemdutildir/system-generators/systemd-cryptsetup-generator \
- $systemdutildir/systemd-cryptsetup \
- $systemdsystemunitdir/systemd-ask-password-console.path \
- $systemdsystemunitdir/systemd-ask-password-console.service \
- $systemdsystemunitdir/cryptsetup.target \
- $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
- systemd-ask-password systemd-tty-ask-password-agent
- inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
dracut_need_initqueue
}
diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh
index 5bda006..d84ff62 100755
--- a/modules.d/90crypt/parse-crypt.sh
+++ b/modules.d/90crypt/parse-crypt.sh
@@ -25,7 +25,6 @@ else
luksid=${luksid##luks-}
- if [ -z "$DRACUT_SYSTEMD" ]; then
{
printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid
@@ -33,17 +32,6 @@ else
printf -- '--name cryptroot-ask-%%k %s ' $(command -v cryptroot-ask)
printf -- '$env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $tout
} >> /etc/udev/rules.d/70-luks.rules.new
- else
- if ! crypttab_contains "$luksid"; then
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
- printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid
- printf -- 'RUN+="%s --settled --unique --onetime ' $(command -v initqueue)
- printf -- '--name systemd-cryptsetup-%%k %s start ' $(command -v systemctl)
- printf -- 'systemd-cryptsetup@luks$$(dev_unit_name -$env{ID_FS_UUID}).service"\n'
- } >> /etc/udev/rules.d/70-luks.rules.new
- fi
- fi
uuid=$luksid
while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done
@@ -56,19 +44,11 @@ else
} >> $hookdir/emergency/90-crypt.sh
done
elif getargbool 0 rd.auto; then
- if [ -z "$DRACUT_SYSTEMD" ]; then
{
printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue)
printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $(command -v cryptroot-ask) $tout
} >> /etc/udev/rules.d/70-luks.rules.new
- else
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue)
- printf -- '--unique --settled --onetime --name crypt-run-generator-%%k '
- printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' $(command -v crypt-run-generator)
- } >> /etc/udev/rules.d/70-luks.rules.new
- fi
fi
echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules.new
--
2.5.1
++++++ 0182-fix-include-parsing.patch ++++++
>From 11d6560d7bbd8a4c4610a39c0985e50d728920fb Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt(a)suse.com>
Date: Mon, 21 Sep 2015 15:15:07 +0200
Subject: [PATCH] Fix parsing of "-i" and "--include"
- dracut replaced every instance of "-i" in the cmdline,
even if it was part of a kernel image name, e.g. "vmlinuz-i"
- Fixes boo#908452
Signed-off-by: Fabian Vogt <fvogt(a)suse.com>
---
dracut.sh | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Index: dracut-043/dracut.sh
===================================================================
--- dracut-043.orig/dracut.sh
+++ dracut-043/dracut.sh
@@ -310,11 +310,17 @@ dropindirs_sort()
rearrange_params()
{
# Workaround -i, --include taking 2 arguments
- set -- "${@/--include/++include}"
-
- # This prevents any long argument ending with "-i"
- # -i, like --opt-i but I think we can just prevent that
- set -- "${@/%-i/++include}"
+ newat=()
+ for i in "$@"; do
+ if [[ $i =~ ^-i(.*) ]]; then
+ newat+=("++include" "${BASH_REMATCH[1]}") # Replace -i by ++include
+ elif [[ $i == "--include" ]]; then
+ newat+=("++include") # Replace --include by ++include
+ else
+ newat+=("$i")
+ fi
+ done
+ set -- "${newat[@]}" # Set new $@
TEMP=$(unset POSIXLY_CORRECT; getopt \
-o "a:m:o:d:I:k:c:L:fvqlHhMN" \
++++++ 0183-fix_add_drivers_hang.patch ++++++
>From d774a6f49771b9f55de2956c3c0038a7655b6e94 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt(a)suse.com>
Date: Wed, 23 Sep 2015 12:12:08 +0200
Subject: [PATCH] Fix possible hang in dracut
- Caused by add_drivers+=" " in dracut.conf (bsc#923116)
Signed-off-by: Fabian Vogt <fvogt(a)suse.com>
---
dracut.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.sh b/dracut.sh
index 44b8a3d..11a4a2e 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1501,7 +1501,7 @@ if [[ $no_kernel != yes ]]; then
hostonly='' instmods $drivers
fi
- if [[ $add_drivers ]]; then
+ if [[ -n "${add_drivers// }" ]]; then
hostonly='' instmods -c $add_drivers
fi
if [[ $force_drivers ]]; then
--
2.5.1
++++++ 0400-use_fstab_systemd.patch ++++++
From: Fabian Vogt <fvogt(a)suse.com>
Subject: Use /etc/fstab for /sysroot instead of custom sysroot.mount
systemd-fstab-generator is capable of mounting /sysroot itself,
looking at /proc/cmdline if root= is set.
Index: dracut-043/modules.d/00systemd/module-setup.sh
===================================================================
--- dracut-043.orig/modules.d/00systemd/module-setup.sh
+++ dracut-043/modules.d/00systemd/module-setup.sh
@@ -14,7 +14,7 @@ check() {
# called by dracut
depends() {
- return 0
+ echo fs-lib
}
installkernel() {
@@ -22,6 +22,23 @@ installkernel() {
instmods -s efivarfs
}
+fstab_sysroot() {
+ local _dev=/dev/block/$(find_root_block_device)
+ local _fstype _flags _subvol
+ if [ -e $_dev ]; then
+ _dev=$(shorten_persistent_dev "$(get_persistent_dev "$_dev")")
+ _fstype="$(find_mp_fstype /)"
+ _flags="$(find_mp_fsopts /)"
+
+ if [[ $use_fstab != yes ]] && [[ $_fstype = btrfs ]]; then
+ _subvol=$(findmnt -e -v -n -o FSROOT --target /) \
+ && _subvol=${_subvol#/}
+ _flags="$_flags,${_subvol:+subvol=$_subvol}"
+ fi
+ printf "%s /sysroot %s %s 1 1\n" "$_dev" "$_fstype" "${_flags#,}"
+ fi
+}
+
# called by dracut
install() {
local _mods
@@ -216,5 +233,8 @@ install() {
} >> "$initdir/etc/systemd/journald.conf"
ln_r "${systemdsystemunitdir}/multi-user.target" "${systemdsystemunitdir}/default.target"
+
+ # Add entry for /sysroot to /etc/fstab
+ fstab_sysroot >> "$initdir/etc/fstab"
}
Index: dracut-043/modules.d/95rootfs-block/module-setup.sh
===================================================================
--- dracut-043.orig/modules.d/95rootfs-block/module-setup.sh
+++ dracut-043/modules.d/95rootfs-block/module-setup.sh
@@ -48,22 +48,25 @@ cmdline_rootfs() {
# called by dracut
cmdline() {
- cmdline_rootfs
- cmdline_journal
+ # When using systemd, we're storing the root device in /etc/fstab instead.
+ if ! dracut_module_included "systemd"; then
+ cmdline_rootfs
+ cmdline_journal
+ fi
}
# called by dracut
install() {
- if [[ $hostonly_cmdline == "yes" ]]; then
- local _journaldev=$(cmdline_journal)
- [[ $_journaldev ]] && printf "%s\n" "$_journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
- local _rootdev=$(cmdline_rootfs)
- [[ $_rootdev ]] && printf "%s\n" "$_rootdev" >> "${initdir}/etc/cmdline.d/95root-dev.conf"
- fi
-
inst_multiple umount
inst_multiple tr
if ! dracut_module_included "systemd"; then
+ if [[ $hostonly_cmdline == "yes" ]]; then
+ local _journaldev=$(cmdline_journal)
+ [[ $_journaldev ]] && printf "%s\n" "$_journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
+ local _rootdev=$(cmdline_rootfs)
+ [[ $_rootdev ]] && printf "%s\n" "$_rootdev" >> "${initdir}/etc/cmdline.d/95root-dev.conf"
+ fi
+
inst_hook cmdline 95 "$moddir/parse-block.sh"
inst_hook pre-udev 30 "$moddir/block-genrules.sh"
inst_hook mount 99 "$moddir/mount-root.sh"
Index: dracut-043/modules.d/98dracut-systemd/dracut-cmdline.sh
===================================================================
--- dracut-043.orig/modules.d/98dracut-systemd/dracut-cmdline.sh
+++ dracut-043/modules.d/98dracut-systemd/dracut-cmdline.sh
@@ -68,8 +68,12 @@ case "$root" in
rootok=1 ;;
esac
-[ -z "$root" ] && die "No or empty root= argument"
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
+if [ -z "$root" ]; then
+ root=$(findmnt --fstab -n --output source --target /sysroot)
+ [ -z "$root" ] && die "No or empty root= argument and not in fstab"
+elif [ -z "$rootok" ]; then
+ die "Don't know how to handle 'root=$root'"
+fi
export root rflags fstype netroot NEWROOT
Index: dracut-043/modules.d/98dracut-systemd/rootfs-generator.sh
===================================================================
--- dracut-043.orig/modules.d/98dracut-systemd/rootfs-generator.sh
+++ dracut-043/modules.d/98dracut-systemd/rootfs-generator.sh
@@ -36,35 +36,6 @@ generator_wait_for_dev()
fi
}
-generator_mount_rootfs()
-{
- local _type=$2
- local _flags=$3
- local _name
-
- [ -z "$1" ] && return 0
-
- _name=$(dev_unit_name "$1")
- [ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
- if ! [ -f "$GENERATOR_DIR"/sysroot.mount ]; then
- {
- echo "[Unit]"
- echo "Before=initrd-root-fs.target"
- echo "RequiresOverridable=systemd-fsck(a)${_name}.service"
- echo "After=systemd-fsck(a)${_name}.service"
- echo "[Mount]"
- echo "Where=/sysroot"
- echo "What=$1"
- echo "Options=${_flags}"
- echo "Type=${_type}"
- } > "$GENERATOR_DIR"/sysroot.mount
- fi
- if ! [ -L "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount ]; then
- [ -d "$GENERATOR_DIR"/initrd-root-fs.target.requires ] || mkdir -p "$GENERATOR_DIR"/initrd-root-fs.target.requires
- ln -s ../sysroot.mount "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount
- fi
-}
-
generator_fsck_after_pre_mount()
{
local _name
@@ -111,9 +82,12 @@ esac
GENERATOR_DIR="$1"
if [ "${root%%:*}" = "block" ]; then
- generator_wait_for_dev "${root#block:}" "$RDRETRY"
- generator_fsck_after_pre_mount "${root#block:}"
- strstr "$(cat /proc/cmdline)" 'root=' || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
+ generator_wait_for_dev "${root#block:}" "$RDRETRY"
+ generator_fsck_after_pre_mount "${root#block:}"
+ if ! [ -L "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount ]; then
+ [ -d "$GENERATOR_DIR"/initrd-root-fs.target.requires ] || mkdir -p "$GENERATOR_DIR"/initrd-root-fs.target.requires
+ ln -s ../sysroot.mount "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount
+ fi
fi
exit 0
Index: dracut-043/modules.d/99base/init.sh
===================================================================
--- dracut-043.orig/modules.d/99base/init.sh
+++ dracut-043/modules.d/99base/init.sh
@@ -128,8 +128,12 @@ make_trace_mem "hook cmdline" '1+:mem' '
getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
source_hook cmdline
-[ -z "$root" ] && die "No or empty root= argument"
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
+if [ -z "$root" ]; then
+ root=$(findmnt --fstab -n --output source --target /sysroot)
+ [ -z "$root" ] && die "No or empty root= argument and not in fstab"
+elif [ -z "$rootok" ]; then
+ die "Don't know how to handle 'root=$root'"
+fi
export root rflags fstype netroot NEWROOT
++++++ 0401-mount_option_mountpoint.patch ++++++
From: Fabian Vogt <fvogt(a)suse.com>
Subject: dracut.sh: Support --mount with just mountpoint as parameter
Right now the --mount parameter of dracut expects a rather long fstab-like
line. This makes it possible to invoke dracut with e.g. --mount /boot.
Index: dracut-043/dracut.8.asc
===================================================================
--- dracut-043.orig/dracut.8.asc
+++ dracut-043/dracut.8.asc
@@ -338,6 +338,10 @@ provide a valid _/etc/fstab_.
The default _<dump frequency>_ is "0".
the default _<fsck order>_ is "2".
+**--mount** "_<mountpoint>_"::
+ Like above, but _<device>_, _<filesystem type>_ and _<filesystem options>_
+ are determined by looking at the current mounts.
+
**--add-device** _<device>_ ::
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
This can be useful in hostonly mode for resume support when your swap is on
Index: dracut-043/dracut.sh
===================================================================
--- dracut-043.orig/dracut.sh
+++ dracut-043/dracut.sh
@@ -152,6 +152,8 @@ Creates initial ramdisk images for prelo
--mount "[DEV] [MP] [FSTYPE] [FSOPTS]"
Mount device [DEV] on mountpoint [MP] with filesystem
[FSTYPE] and options [FSOPTS] in the initramfs
+ --mount "[MP]" Same as above, but [DEV], [FSTYPE] and [FSOPTS] are
+ determined by looking at the current mounts.
--add-device "[DEV]" Bring up [DEV] in initramfs
-i, --include [SOURCE] [TARGET]
Include the files in the SOURCE directory into the
@@ -1536,9 +1538,21 @@ if [[ $kernel_only != yes ]]; then
while pop fstab_lines line; do
line=($line)
- [ -z "${line[3]}" ] && line[3]="defaults"
+
+ if [ -z "${line[1]}" ]; then
+ # Determine device and mount options from current system
+ mountpoint -q "${line[0]}" || derror "${line[0]} is not a mount point!"
+ line=($(findmnt --raw -n --target "${line[0]}" --output=source,target,fstype,options))
+ dinfo "Line for ${line[1]}: ${line[@]}"
+ else
+ # Use default options
+ [ -z "${line[3]}" ] && line[3]="defaults"
+ fi
+
+ # Default options for freq and passno
[ -z "${line[4]}" ] && line[4]="0"
[ -z "${line[5]}" ] && line[5]="2"
+
strstr "${line[2]}" "nfs" && line[5]="0"
echo "${line[@]}" >> "${initdir}/etc/fstab"
done
1
0
Hello community,
here is the log from the commit of package plymouth for openSUSE:Factory checked in at 2015-09-27 14:31:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/plymouth (Old)
and /work/SRC/openSUSE:Factory/.plymouth.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "plymouth"
Changes:
--------
--- /work/SRC/openSUSE:Factory/plymouth/plymouth.changes 2014-11-13 09:16:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.plymouth.new/plymouth.changes 2015-09-27 14:31:15.000000000 +0200
@@ -1,0 +2,11 @@
+Mon Sep 21 12:15:11 UTC 2015 - idonmez(a)suse.com
+
+- Use is_opensuse to simplify if/else block
+
+-------------------------------------------------------------------
+Fri Sep 4 09:41:01 UTC 2015 - idonmez(a)suse.com
+
+- Add a direct dependency on systemd, since we need to know the
+ path to systemd-tty-ask-password-agent, fixes part of bsc#943312
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ plymouth.spec ++++++
--- /var/tmp/diff_new_pack.ZA0iJo/_old 2015-09-27 14:31:16.000000000 +0200
+++ /var/tmp/diff_new_pack.ZA0iJo/_new 2015-09-27 14:31:16.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package plymouth
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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
@@ -70,6 +70,7 @@
BuildRequires: libudev-devel
BuildRequires: libxslt
BuildRequires: module-init-tools
+BuildRequires: systemd >= 186
BuildRequires: update-desktop-files
BuildRequires: xz
BuildRequires: pkgconfig(libdrm)
@@ -366,10 +367,10 @@
# Change the default theme
-%if %{suse_version} == 1315
-sed -i -e 's/spinner/SLE/g' src/plymouthd.defaults
-%else
+%if 0%{?is_opensuse}
sed -i -e 's/spinner/openSUSE/g' src/plymouthd.defaults
+%else
+sed -i -e 's/spinner/SLE/g' src/plymouthd.defaults
%endif
%build
1
0
Hello community,
here is the log from the commit of package mdadm for openSUSE:Factory checked in at 2015-09-27 14:31:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mdadm (Old)
and /work/SRC/openSUSE:Factory/.mdadm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mdadm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mdadm/mdadm.changes 2015-09-16 10:36:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mdadm.new/mdadm.changes 2015-09-27 14:31:10.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Sep 14 13:21:33 UTC 2015 - dimstar(a)opensuse.org
+
+- Own %{_systemdshutdowndir} in case nothing else does. This
+ ensures build success even if systemd-mini does not own it
+ (happens in some versions of our package).
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mdadm.spec ++++++
--- /var/tmp/diff_new_pack.jI4z1P/_old 2015-09-27 14:31:11.000000000 +0200
+++ /var/tmp/diff_new_pack.jI4z1P/_new 2015-09-27 14:31:11.000000000 +0200
@@ -108,6 +108,10 @@
/etc/cron.daily/mdadm
%dir /etc/cron.d
%config /etc/cron.d/mdadm
+# %%{_systemdshutdowndir}/ is not owned by all versions of systemd-mini.
+# But we really do not want to pull in a full systemd, so we rather just own
+# that directory by ourselves too. After all, this is allowed.
+%dir %{_systemdshutdowndir}
%{_systemdshutdowndir}/mdadm.shutdown
%{_unitdir}/mdmon@.service
%{_unitdir}/mdmonitor.service
1
0
Hello community,
here is the log from the commit of package kbd for openSUSE:Factory checked in at 2015-09-27 14:31:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kbd (Old)
and /work/SRC/openSUSE:Factory/.kbd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kbd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kbd/kbd.changes 2015-04-10 09:49:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kbd.new/kbd.changes 2015-09-27 14:31:04.000000000 +0200
@@ -1,0 +2,40 @@
+Fri Aug 21 10:50:21 UTC 2015 - opensuse.lietuviu.kalba(a)gmail.com
+
+- Rename conflicting legacy keymaps:
+ * dvorak/no.map -> dvorak/no-dvorak.map
+ * fgGIod/trf.map -> fgGIod/trf-fgGIod.map
+ * olpc/pt.map -> olpc/pt-olpc.map
+ * qwerty/cz.map -> qwerty/cz-qwerty.map
+- i386/qwerty/sr-latin links to sr-cy
+- add compose rules to cz layout (rh#1181581)
+
+-------------------------------------------------------------------
+Mon Aug 10 11:53:48 UTC 2015 - sndirsch(a)suse.com
+
+- genmap4systemd.sh: use 'abnt2' model for 'br' layouts, 'jp106'
+ model for 'jp' layouts and 'microsoftpro' for anything else
+ (instead of 'pc105' before) (FATE#318426)
+
+-------------------------------------------------------------------
+Tue Jul 21 10:05:35 UTC 2015 - sndirsch(a)suse.com
+
+- added genmap4systemd.sh tool, which generates entries for
+ systemd's /usr/share/systemd/kbd-model-map table from
+ xkeyboard-config converted keymaps; entries are written to
+ /usr/share/systemd/kbd-model-map.xkb-generated, so these can
+ easily be added to /usr/share/systemd/kbd-model-map by systemd
+ package (FATE#318426)
+
+-------------------------------------------------------------------
+Fri Jul 17 12:54:27 UTC 2015 - sndirsch(a)suse.com
+
+- Include xkb layouts from xkeyboard-config converted to console
+ keymaps, (FATE#318426)
+ * Rename Finnish xkb converted layout
+ * Add xkb and legacy keymaps subdirs to loadkyes search path
+ (kbd-1.15.5-loadkeys-search-path.patch), remove symlinks,
+ Don't convert layouts that can't input ASCII,
+ * Original keymaps moved to legacy dir, created symlinks to xkb
+ keymaps
+
+-------------------------------------------------------------------
New:
----
cz-map.patch
genmap4systemd.sh
kbd-1.15.5-loadkeys-search-path.patch
xml2lst.pl
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kbd.spec ++++++
--- /var/tmp/diff_new_pack.zG0YNA/_old 2015-09-27 14:31:06.000000000 +0200
+++ /var/tmp/diff_new_pack.zG0YNA/_new 2015-09-27 14:31:06.000000000 +0200
@@ -40,8 +40,11 @@
Source12: fbtest.8
Source13: guess_encoding.pl
Source14: kbd.pl
+Source15: cz-map.patch
Source42: convert-kbd-mac.sed
Source43: repack_kbd.sh
+Source44: xml2lst.pl
+Source45: genmap4systemd.sh
Patch0: kbd-1.15.2-prtscr_no_sigquit.patch
Patch2: kbd-1.15.2-unicode_scripts.patch
Patch3: kbd-1.15.2-docu-X11R6-xorg.patch
@@ -53,6 +56,9 @@
Patch10: kbd-2.0.2-doshell-reference.patch
Patch11: kbd-2.0.2-euro-unicode.patch
Patch12: kbd-2.0.2-fix-bashisms.patch
+# Patch13: adds xkb and legacy keymaps subdirs to loadkyes search path
+# (openSUSE FATE#318355, sle FATE#318426)
+Patch13: kbd-1.15.5-loadkeys-search-path.patch
BuildRequires: automake
BuildRequires: bison
@@ -63,7 +69,13 @@
BuildRequires: pkg-config
BuildRequires: suse-module-tools
BuildRequires: xz
+
+BuildRequires: console-setup
+BuildRequires: xkeyboard-config
+
Requires(pre): %fillup_prereq
+# Temporarily require -legacy
+Requires: %{name}-legacy = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -82,10 +94,23 @@
Andries Brouwer <aeb(a)cwi.nl>
Alexey Gladkov <gladkov.alexey(a)gmail.com>
+%package legacy
+Summary: Legacy data for kbd package
+Group: System/Console
+BuildArch: noarch
+
+%description legacy
+The %{name}-legacy package contains original keymaps for kbd package.
+Please note that %{name}-legacy is not helpful without kbd.
+
+
+
%define kbd /usr/share/kbd
%prep
%setup -q -a 1 -a 2 -n kbd-%{version}
+cp -fp %{SOURCE44} .
+cp -fp %{SOURCE45} .
%patch0 -p1
%patch2
%patch3
@@ -97,6 +122,7 @@
%patch10
%patch11
%patch12 -p1
+%patch13 -p1
%build
for i in `find data/keymaps/mac -type f` ; do
@@ -108,6 +134,11 @@
test -f qwerty/se-latin1.map || cp qwerty/sv-latin1.map qwerty/se-latin1.map
# bnc#435121
test -f olpc/es-olpc.map || mv olpc/es.map olpc/es-olpc.map
+ # Rename conflicting keymaps, as Fedora do
+ test -f dvorak/no.map || mv dvorak/no.map dvorak/no-dvorak.map
+ test -f fgGIod/trf.map || mv fgGIod/trf.map fgGIod/trf-fgGIod.map
+ test -f olpc/pt.map || mv olpc/pt.map olpc/pt-olpc.map
+ test -f qwerty/cz.map || mv qwerty/cz.map qwerty/cz-qwerty.map
popd
%configure \
--datadir=%{kbd} \
@@ -163,6 +194,7 @@
ln -sf us.map.gz $K/keymaps/i386/qwerty/arabic.map.gz
ln -sf us.map.gz $K/keymaps/i386/qwerty/chinese.map.gz
ln -sf us.map.gz $K/keymaps/i386/qwerty/taiwanese.map.gz
+ln -sf sr-cy.map.gz $K/keymaps/i386/qwerty/sr-latin.map.gz
# Compatability links; don't know what the first three are good for.
# The others are for yast/langselection and should be removed as soon as
# yast knows about it.
@@ -286,6 +318,45 @@
ln -s %{_bindir}/resizecons %{buildroot}/bin
%endif
#EndUsrMerge
+
+# Move original keymaps to legacy directory
+mkdir -p $RPM_BUILD_ROOT/%{kbd}/keymaps/legacy
+mv $RPM_BUILD_ROOT/%{kbd}/keymaps/{amiga,atari,i386,include,mac,ppc,sun} $RPM_BUILD_ROOT/%{kbd}/keymaps/legacy
+
+# Convert X keyboard layouts to console keymaps
+mkdir -p $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb
+perl xml2lst.pl < /usr/share/X11/xkb/rules/base.xml > layouts-variants.lst
+while read line; do
+ XKBLAYOUT=`echo "$line" | cut -d " " -f 1`
+ echo "$XKBLAYOUT" >> layouts-list.lst
+ XKBVARIANT=`echo "$line" | cut -d " " -f 2`
+ ckbcomp "$XKBLAYOUT" "$XKBVARIANT" | gzip > $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/"$XKBLAYOUT"-"$XKBVARIANT".map.gz
+done < layouts-variants.lst
+
+# Convert X keyboard layouts (plain, no variant)
+cat layouts-list.lst | sort -u >> layouts-list-uniq.lst
+while read line; do
+ ckbcomp "$line" | gzip > $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/"$line".map.gz
+done < layouts-list-uniq.lst
+
+# wipe converted layouts which cannot input ASCII (rh#1031848)
+zgrep -L "U+0041" $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/* | xargs rm -f
+
+# Rename the converted default fi (kotoistus) layout (rh#1117891)
+gunzip $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/fi.map.gz
+mv $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/fi.map $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/fi-kotoistus.map
+gzip $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/fi-kotoistus.map
+
+# Fix converted cz layout - add compose rules (rh#1181581)
+gunzip $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/cz.map.gz
+patch $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/cz.map < %{SOURCE15}
+gzip $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb/cz.map
+
+# Generate entries for systemd's /usr/share/systemd/kbd-model-map
+mkdir -p $RPM_BUILD_ROOT/usr/share/systemd
+sh ./genmap4systemd.sh $RPM_BUILD_ROOT/%{kbd}/keymaps/xkb \
+ > $RPM_BUILD_ROOT/usr/share/systemd/kbd-model-map.xkb-generated
+
%find_lang %{name}
%post
@@ -307,6 +378,7 @@
%{_localstatedir}/adm/fillup-templates/sysconfig.console
%{_localstatedir}/adm/fillup-templates/sysconfig.keyboard
%{kbd}
+%exclude %{kbd}/keymaps/legacy
#UsrMerge
/sbin/fbtest
/bin/chvt
@@ -423,5 +495,10 @@
%doc %{_mandir}/man8/setvesablank.8.gz
%doc %{_mandir}/man8/setvtrgb.8.gz
%doc %{_mandir}/man8/vcstime.8.gz
+%dir /usr/share/systemd
+/usr/share/systemd/kbd-model-map.xkb-generated
+
+%files legacy
+%{kbd}/keymaps/legacy
%changelog
++++++ cz-map.patch ++++++
--- cz.map.orig 2015-08-06 13:54:28.823257906 +0200
+++ cz.map 2015-08-06 13:54:49.338038186 +0200
@@ -39,7 +39,7 @@
keycode 38 = +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l
keycode 39 = +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar
keycode 40 = U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe
-keycode 41 = U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum
+keycode 41 = U+003b dead_grave U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum
keycode 42 = Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift
keycode 43 = dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash
keycode 44 = +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y
@@ -108,3 +108,49 @@
keycode 127 = VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol
keycode 121 = KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period
strings as usual
+# dead_grave
+compose '`' 'u' to U+016F
+compose '`' 'U' to U+016E
+compose '`' 'z' to U+00B0
+compose '`' 'Z' to U+00B0
+# dead_acute
+compose '\'' 'a' to U+00E1
+compose '\'' 'A' to U+00C1
+compose '\'' 'e' to U+00E9
+compose '\'' 'E' to U+00C9
+compose '\'' 'i' to U+00ED
+compose '\'' 'I' to U+00CD
+compose '\'' 'o' to U+00F3
+compose '\'' 'O' to U+00D3
+compose '\'' 'u' to U+00FA
+compose '\'' 'U' to U+00DA
+compose '\'' 'y' to U+00FD
+compose '\'' 'Y' to U+00DD
+# dead_caron
+compose '^' 'u' to U+016F
+compose '^' 'U' to U+016E
+compose '^' 'c' to U+010D
+compose '^' 'C' to U+010C
+compose '^' 'd' to U+010F
+compose '^' 'D' to U+010E
+compose '^' 'e' to U+011B
+compose '^' 'E' to U+011A
+compose '^' 'n' to U+0148
+compose '^' 'N' to U+0147
+compose '^' 'r' to U+0159
+compose '^' 'R' to U+0158
+compose '^' 's' to U+0161
+compose '^' 'S' to U+0160
+compose '^' 't' to U+0165
+compose '^' 'T' to U+0164
+compose '^' 'z' to U+017E
+compose '^' 'Z' to U+017D
+# dead_diaeresis
+compose '"' 'a' to U+00E4
+compose '"' 'A' to U+00C4
+compose '"' 'e' to U+00EB
+compose '"' 'E' to U+00CB
+compose '"' 'o' to U+00F6
+compose '"' 'O' to U+00D6
+compose '"' 'u' to U+00FC
+compose '"' 'U' to U+00DC
++++++ genmap4systemd.sh ++++++
#!/bin/bash
# Generate entries for systemd's /usr/share/systemd/kbd-model-map
if [ $# -eq 0 ]; then
pushd /usr/share/kbd/keymaps/xkb > /dev/null || exit 1
else
pushd > /dev/null $1 || exit 1
fi
echo "# generated from xkb generated keymaps (basic layouts *without* variant)"
for i in $(ls *.map.gz|grep -v "-"); do
consolelayout=$(echo $i|sed 's/.map.gz//g')
layout=$consolelayout
variant="-"
printf '%s' "$consolelayout"
printf "\t\t\t"
printf '%s' "$layout"
printf '\t'
printf 'microsoftpro\t\t'
printf '%s' "$variant"
printf '\t\t'
printf 'terminate:ctrl_alt_bksp\n'
done | sort -u
echo "# generated from xkb generated keymaps (layouts *with* variant)"
for i in $(ls *-*.map.gz); do
consolelayout=$(echo $i|sed 's/.map.gz//g')
conlen=$(echo "$consolelayout" |wc -m)
conlen=$((conlen - 1))
layout=$(echo $i|cut -d "-" -f 1)
variant=$(echo $i|cut -d "-" -f 2,3,4,5,6,7,8,9,10|cut -d "." -f1)
varlen=$(echo $variant|wc -m)
varlen=$((varlen -1))
printf '%s' "$consolelayout"
if [ $conlen -lt 8 ]; then
printf "\t\t\t"
elif [ $conlen -lt 16 ]; then
printf "\t\t"
elif [ $conlen -lt 24 ]; then
printf "\t"
else
printf ' '
fi
printf '%s' "$layout"
printf '\t'
if [ "$layout" == "br" ]; then
printf 'abnt2\t\t'
elif [ "$layout" == "jp" ]; then
printf 'jp106\t\t'
else
printf 'microsoftpro\t\t'
fi
printf '%s' "$variant"
if [ $varlen -lt 8 ]; then
printf "\t\t"
elif [ $varlen -lt 16 ]; then
printf "\t"
else
printf ' '
fi
printf 'terminate:ctrl_alt_bksp\n'
done | sort -u
popd > /dev/null
++++++ kbd-1.15.5-loadkeys-search-path.patch ++++++
diff -up kbd-2.0.1/src/loadkeys.c.orig kbd-2.0.1/src/loadkeys.c
--- kbd-2.0.1/src/loadkeys.c.orig 2013-11-27 12:56:57.846069007 +0100
+++ kbd-2.0.1/src/loadkeys.c 2013-11-27 12:58:03.877302345 +0100
@@ -26,7 +26,7 @@
#include "keymap.h"
static const char *progname = NULL;
-static const char *const dirpath1[] = { "", DATADIR "/" KEYMAPDIR "/**", KERNDIR "/", 0 };
+static const char *const dirpath1[] = { "", DATADIR "/" KEYMAPDIR "/**", DATADIR "/" XKBKEYMAPDIR "/", DATADIR "/" LEGACYKEYMAPDIR "/**", KERNDIR "/", 0 };
static const char *const suffixes[] = { "", ".kmap", ".map", 0 };
static void __attribute__ ((noreturn))
diff -up kbd-2.0.1/src/paths.h.orig kbd-2.0.1/src/paths.h
--- kbd-2.0.1/src/paths.h.orig 2013-11-27 12:58:10.662326108 +0100
+++ kbd-2.0.1/src/paths.h 2013-11-27 12:58:32.566403015 +0100
@@ -5,6 +5,8 @@
* The following five subdirectories are defined:
*/
#define KEYMAPDIR "keymaps"
+#define XKBKEYMAPDIR "keymaps/xkb"
+#define LEGACYKEYMAPDIR "keymaps/legacy"
#define UNIMAPDIR "unimaps"
#define TRANSDIR "consoletrans"
#define VIDEOMODEDIR "videomodes"
++++++ xml2lst.pl ++++++
#!/usr/bin/perl
# converts the <rules>.xml file to the old format <rules>.lst file
#
# Usage:
#
# perl xml2lst.pl < filename.xml > filename.lst
#
# author Ivan Pascal
# modified by Vitezslav Crhonek
$doc = new_document( 0, '');
parse('', $doc);
($reg) = node_by_name($doc, '/xkbConfigRegistry');
@models = node_by_name($reg, 'modelList/model/configItem');
@layouts = node_by_name($reg, 'layoutList/layout/configItem');
@options = node_by_name($reg, 'optionList/group/configItem');
for $i (@layouts) {
($name) = node_by_name($i, 'name');
@variants = node_by_name($i, '../variantList/variant/configItem');
for $v (@variants) {
($variant) = node_by_name($v, 'name');
printf("%s %s\n", text_child($name), text_child($variant));
}
}
sub with_attribute {
local ($nodelist, $attrexpr) = @_;
local ($attr, $value) = split (/=/, $attrexpr);
local ($node, $attrvalue);
if (defined $value && $value ne '') {
$value =~ s/"//g;
foreach $node (@{$nodelist}) {
$attrvalue = node_attribute($node, $attr);
if (defined $attrvalue && $attrvalue eq $value) {
return $node;
}
}
} else {
foreach $node (@{$nodelist}) {
if (! defined node_attribute($node, $attr)) {
return $node;
}
}
}
undef;
}
# Subroutines
sub parse {
local $intag = 0;
my (@node_stack, $parent);
$parent = @_[1];
local ($tag, $text);
while (<>) {
chomp;
@str = split /([<>])/;
shift @str if ($str[0] eq '' || $str[0] =~ /^[ \t]*$/);
while (scalar @str) {
$token = shift @str;
if ($token eq '<') {
$intag = 1;
if (defined $text) {
add_text_node($parent, $text);
undef $text;
}
} elsif ($token eq '>') {
$intag = 0;
if ($tag =~ /^\/(.*)/) { # close tag
$parent = pop @node_stack;
} elsif ($tag =~ /^([^\/]*)\/$/) {
empty_tag($parent, $1);
} else {
if (defined ($node = open_tag($parent, $tag))) {
push @node_stack, $parent;
$parent = $node;
}
}
undef $tag;
} else {
if ($intag == 1) {
if (defined $tag) {
$tag .= ' '. $token;
} else {
$tag = $token;
}
} else {
if (defined $text) {
$text .= "\n" . $token;
} else {
$text = $token;
}
}
}
}
}
}
sub new_document {
$doc = new_node( 0, '', 'DOCUMENT');
$doc->{CHILDREN} = [];
return $doc;
}
sub new_node {
local ($parent_node, $tag, $type) = @_;
my %node;
$node{PARENT} = $parent_node;
$node{TYPE} = $type;
if ($type eq 'COMMENT' || $type eq 'TEXT') {
$node{TEXT} = $tag;
$node{NAME} = $type;
return \%node;
}
local ($tname, $attr) = split(' ', $tag, 2);
$node{NAME} = $tname;
if (defined $attr && $attr ne '') {
my %attr_table;
local @attr_list = split ( /"/, $attr);
local ($name, $value);
while (scalar @attr_list) {
$name = shift @attr_list;
$name =~ s/[ =]//g;
next if ($name eq '');
$value = shift @attr_list;
$attr_table{$name} =$value;
}
$node{ATTRIBUTES} = \%attr_table;
}
return \%node;
}
sub add_node {
local ($parent_node, $node) = @_;
push @{$parent_node->{CHILDREN}}, $node;
local $tname = $node->{NAME};
if (defined $parent_node->{$tname}) {
push @{$parent_node->{$tname}}, $node
} else {
$parent_node->{$tname} = [ $node ];
}
}
sub empty_tag {
local ($parent_node, $tag) = @_;
local $node = new_node($parent_node, $tag, 'EMPTY');
add_node($parent_node, $node);
}
sub open_tag {
local ($parent_node, $tag) = @_;
local $node;
if ($tag =~ /^\?.*/ || $tag =~ /^\!.*/) {
$node = new_node($parent_node, $tag, 'COMMENT');
add_node($parent_node, $node);
undef; return;
} else {
$node = new_node($parent_node, $tag, 'NODE');
$node->{CHILDREN} = [];
add_node($parent_node, $node);
return $node;
}
}
sub add_text_node {
local ($parent_node, $text) = @_;
local $node = new_node($parent_node, $text, 'TEXT');
add_node($parent_node, $node);
}
sub node_by_name {
local ($node, $name) = @_;
local ($tagname, $path) = split(/\//, $name, 2);
my @nodelist;
if ($tagname eq '') {
while ($node->{PARENT} != 0) {
$node = $node->{PARENT};
}
sublist_by_name($node, $path, \@nodelist);
} else {
sublist_by_name($node, $name, \@nodelist);
}
return @nodelist;
}
sub sublist_by_name {
local ($node, $name, $res) = @_;
local ($tagname, $path) = split(/\//, $name, 2);
if (! defined $path) {
push @{$res}, (@{$node->{$tagname}});
return;
}
if ($tagname eq '..' && $node->{PARENT} != 0) {
$node = $node->{PARENT};
sublist_by_name($node, $path, $res);
} else {
local $n;
for $n (@{$node->{$tagname}}) {
sublist_by_name($n, $path, $res);
}
}
}
sub node_attribute {
local $node = @_[0];
if (defined $node->{ATTRIBUTES}) {
return $node->{ATTRIBUTES}{@_[1]};
}
undef;
}
sub text_child {
local ($node) = @_;
local ($child) = node_by_name($node, 'TEXT');
return $child->{TEXT};
}
1
0
Hello community,
here is the log from the commit of package python3-tables for openSUSE:Factory checked in at 2015-09-27 08:40:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-tables (Old)
and /work/SRC/openSUSE:Factory/.python3-tables.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-tables"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-tables/python3-tables.changes 2015-08-11 08:26:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-tables.new/python3-tables.changes 2015-09-27 08:40:01.000000000 +0200
@@ -1,0 +2,16 @@
+Sun Sep 27 01:24:15 UTC 2015 - arun(a)gmx.de
+
+- update to version 3.2.2:
+ * Fix AssertionError in Row.__init_loop. See gh-477.
+ * Fix issues with Cython 0.23. See gh-481.
+ * Only run tables.tests.test_basics.UnicodeFilename if the
+ filesystem encoding is utf-8. Closes gh-485.
+ * Fix missing missing PyErr_Clear. See gh-#486.
+ * Fix the C type of some numpy attributes. See gh-494.
+ * Cast selection indices to integer. See gh-496.
+ * Fix indexesextension._keysort_string. Closes gh-497 and gh-498.
+
+- changes from version 3.2.1.1:
+ * Fix permission on distributed source distribution
+
+-------------------------------------------------------------------
Old:
----
tables-3.2.1.tar.gz
New:
----
tables-3.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-tables.spec ++++++
--- /var/tmp/diff_new_pack.R2YGmD/_old 2015-09-27 08:40:03.000000000 +0200
+++ /var/tmp/diff_new_pack.R2YGmD/_new 2015-09-27 08:40:03.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-tables
-Version: 3.2.1
+Version: 3.2.2
Release: 0
Summary: Hierarchical datasets for Python
License: BSD-3-Clause
++++++ tables-3.2.1.tar.gz -> tables-3.2.2.tar.gz ++++++
/work/SRC/openSUSE:Factory/python3-tables/tables-3.2.1.tar.gz /work/SRC/openSUSE:Factory/.python3-tables.new/tables-3.2.2.tar.gz differ: char 5, line 1
1
0
Hello community,
here is the log from the commit of package python3-numexpr for openSUSE:Factory checked in at 2015-09-27 08:40:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-numexpr (Old)
and /work/SRC/openSUSE:Factory/.python3-numexpr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-numexpr"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-numexpr/python3-numexpr.changes 2015-05-02 21:43:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-numexpr.new/python3-numexpr.changes 2015-09-27 08:40:00.000000000 +0200
@@ -1,0 +2,13 @@
+Sun Sep 27 01:01:19 UTC 2015 - arun(a)gmx.de
+
+- update to version 2.4.4:
+ * Honor OMP_NUM_THREADS as a fallback in case NUMEXPR_NUM_THREADS is
+ not set. Fixes #161. (PR #175, Stefan Erb).
+ * Added support for AppVeyor (PR #178 Andrea Bedini)
+ * Fix to allow numexpr to be imported after eventlet.monkey_patch(),
+ as suggested in #118 (PR #180 Ben Moran).
+ * Fix harmless data race that triggers false positives in
+ ThreadSanitizer. (PR #179, Clement Courbet).
+ * Fixed some string tests on Python 3 (PR #182, Antonio Valentino).
+
+-------------------------------------------------------------------
Old:
----
numexpr-2.4.3.tar.gz
New:
----
numexpr-2.4.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-numexpr.spec ++++++
--- /var/tmp/diff_new_pack.MrSWU1/_old 2015-09-27 08:40:01.000000000 +0200
+++ /var/tmp/diff_new_pack.MrSWU1/_new 2015-09-27 08:40:01.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-numexpr
-Version: 2.4.3
+Version: 2.4.4
Release: 0
Url: https://github.com/pydata/numexpr
Summary: Fast numerical expression evaluator for NumPy
++++++ numexpr-2.4.3.tar.gz -> numexpr-2.4.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/ANNOUNCE.rst new/numexpr-2.4.4/ANNOUNCE.rst
--- old/numexpr-2.4.3/ANNOUNCE.rst 2015-04-27 17:45:42.000000000 +0200
+++ new/numexpr-2.4.4/ANNOUNCE.rst 2015-09-14 17:54:37.000000000 +0200
@@ -1,5 +1,5 @@
=========================
- Announcing Numexpr 2.4.3
+ Announcing Numexpr 2.4.4
=========================
Numexpr is a fast numerical expression evaluator for NumPy. With it,
@@ -21,13 +21,15 @@
What's new
==========
-This is a maintenance release to cope with an old bug affecting
-comparisons with empty strings. Fixes #121 and PyTables #184.
+This is a maintenance release which contains several bug fixes, like
+better testing on Python3 platform and some harmless data race. Among
+the enhancements, AppVeyor support is here and OMP_NUM_THREADS is
+honored as a fallback in case NUMEXPR_NUM_THREADS is not set.
In case you want to know more in detail what has changed in this
version, see:
-https://github.com/pydata/numexpr/wiki/Release-Notes
+https://github.com/pydata/numexpr/blob/master/RELEASE_NOTES.rst
or have a look at RELEASE_NOTES.txt in the tarball.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/AUTHORS.txt new/numexpr-2.4.4/AUTHORS.txt
--- old/numexpr-2.4.3/AUTHORS.txt 2013-12-01 00:32:07.000000000 +0100
+++ new/numexpr-2.4.4/AUTHORS.txt 2015-09-14 17:18:15.000000000 +0200
@@ -18,3 +18,5 @@
enhancements.
Antonio Valentino contributed the port to Python 3.
+
+Google Inc. contributed bug fixes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/PKG-INFO new/numexpr-2.4.4/PKG-INFO
--- old/numexpr-2.4.3/PKG-INFO 2015-04-27 17:47:24.000000000 +0200
+++ new/numexpr-2.4.4/PKG-INFO 2015-09-14 18:06:33.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: numexpr
-Version: 2.4.3
+Version: 2.4.4
Summary: Fast numerical expression evaluator for NumPy
Home-page: https://github.com/pydata/numexpr
Author: David M. Cooke, Francesc Alted and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/README.rst new/numexpr-2.4.4/README.rst
--- old/numexpr-2.4.3/README.rst 2015-04-14 14:29:26.000000000 +0200
+++ new/numexpr-2.4.4/README.rst 2015-09-14 17:47:39.000000000 +0200
@@ -1,3 +1,24 @@
+=====================================================
+Numexpr: a fast Python evaluator of NumPy expressions
+=====================================================
+
+:Author: Francesc Alted
+:Contact: faltet(a)gmail.com
+:URL: https://github.com/pydata/numexpr
+:Travis CI: |travis|
+:Appveyor: |appveyor|
+:PyPi: |version| |pypi|
+
+.. |travis| image:: https://travis-ci.org/pydata/numexpr.png?branch=master
+ :target: https://travis-ci.org/pydata/numexpr
+.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/FrancescAlted/numexpr
+ :target: https://travis-ci.org/pydata/numexpr
+.. |pypi| image:: https://pypip.in/d/numexpr/badge.png
+ :target: https://pypi.python.org/pypi/numexpr
+.. |version| image:: https://pypip.in/v/numexpr/badge.png
+ :target: https://pypi.python.org/pypi/numexpr
+
+
What it is Numexpr?
===================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/RELEASE_NOTES.rst new/numexpr-2.4.4/RELEASE_NOTES.rst
--- old/numexpr-2.4.3/RELEASE_NOTES.rst 2015-04-27 17:44:51.000000000 +0200
+++ new/numexpr-2.4.4/RELEASE_NOTES.rst 2015-09-14 17:55:33.000000000 +0200
@@ -2,6 +2,23 @@
Release notes for Numexpr 2.4 series
======================================
+Changes from 2.4.3 to 2.4.4
+===========================
+
+* Honor OMP_NUM_THREADS as a fallback in case NUMEXPR_NUM_THREADS is not
+ set. Fixes #161. (PR #175, Stefan Erb).
+
+* Added support for AppVeyor (PR #178 Andrea Bedini)
+
+* Fix to allow numexpr to be imported after eventlet.monkey_patch(),
+ as suggested in #118 (PR #180 Ben Moran).
+
+* Fix harmless data race that triggers false positives in ThreadSanitizer.
+ (PR #179, Clement Courbet).
+
+* Fixed some string tests on Python 3 (PR #182, Antonio Valentino).
+
+
Changes from 2.4.2 to 2.4.3
===========================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/__init__.py new/numexpr-2.4.4/numexpr/__init__.py
--- old/numexpr-2.4.3/numexpr/__init__.py 2015-04-14 14:28:33.000000000 +0200
+++ new/numexpr-2.4.4/numexpr/__init__.py 2015-09-14 17:18:15.000000000 +0200
@@ -42,25 +42,13 @@
from numexpr.tests import test, print_versions
from numexpr.utils import (
get_vml_version, set_vml_accuracy_mode, set_vml_num_threads,
- set_num_threads, detect_number_of_cores)
+ set_num_threads, detect_number_of_cores, detect_number_of_threads)
# Detect the number of cores
ncores = detect_number_of_cores()
+nthreads = detect_number_of_threads()
# Initialize the number of threads to be used
-# If this is modified, please update the note in:
-# https://github.com/pydata/numexpr/wiki/Numexpr-Users-Guide
-try:
- nthreads = int(os.environ['NUMEXPR_NUM_THREADS'])
-except KeyError:
- nthreads = ncores
- # Check that we don't activate too many threads at the same time.
- # 8 seems a sensible value.
- if nthreads > 8:
- nthreads = 8
-# Check that we don't surpass the MAX_THREADS in interpreter.cpp
-if nthreads > 4096:
- nthreads = 4096
if 'sparc' in platform.machine():
import warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/expressions.py new/numexpr-2.4.4/numexpr/expressions.py
--- old/numexpr-2.4.3/numexpr/expressions.py 2015-04-14 14:28:33.000000000 +0200
+++ new/numexpr-2.4.4/numexpr/expressions.py 2015-09-14 17:18:15.000000000 +0200
@@ -60,13 +60,6 @@
class Context(threading.local):
- initialized = False
-
- def __init__(self, dict_):
- if self.initialized:
- raise SystemError('__init__ called too many times')
- self.initialized = True
- self.__dict__.update(dict_)
def get(self, value, default):
return self.__dict__.get(value, default)
@@ -78,7 +71,7 @@
self.__dict__.update(dict_)
# This will be called each time the local object is used in a separate thread
-_context = Context({})
+_context = Context()
def get_optimization():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/module.cpp new/numexpr-2.4.4/numexpr/module.cpp
--- old/numexpr-2.4.3/numexpr/module.cpp 2015-04-14 14:28:42.000000000 +0200
+++ new/numexpr-2.4.4/numexpr/module.cpp 2015-09-14 17:18:15.000000000 +0200
@@ -48,7 +48,10 @@
while (1) {
- gs.init_sentinels_done = 0; /* sentinels have to be initialised yet */
+ if (tid == 0) {
+ /* sentinels have to be initialised yet */
+ gs.init_sentinels_done = 0;
+ }
/* Meeting point for all threads (wait for initialization) */
pthread_mutex_lock(&gs.count_threads_mutex);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/str-two-way.hpp new/numexpr-2.4.4/numexpr/str-two-way.hpp
--- old/numexpr-2.4.3/numexpr/str-two-way.hpp 2014-03-03 08:38:37.000000000 +0100
+++ new/numexpr-2.4.4/numexpr/str-two-way.hpp 2015-09-14 17:18:15.000000000 +0200
@@ -30,7 +30,25 @@
*/
#include <limits.h>
+
+/*
+ Python 2.7 (the only Python 2.x version supported as of now and until 2020)
+ is built on windows with Visual Studio 2008 C compiler. That dictates that
+ the compiler which must be used by authors of third party Python modules.
+ See https://mail.python.org/pipermail/distutils-sig/2014-September/024885.html
+
+ Unfortunately this version of Visual Studio doesn't claim to be C99 compatible
+ and in particular it lacks the stdint.h header. So we have to replace it with
+ a public domain version.
+
+ Visual Studio 2010 and later have stdint.h.
+*/
+
+#ifdef _MSC_VER <= 1500
+#include "win32/stdint.h"
+#else
#include <stdint.h>
+#endif
/* We use the Two-Way string matching algorithm, which guarantees
linear complexity with constant space. Additionally, for long
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/tests/test_numexpr.py new/numexpr-2.4.4/numexpr/tests/test_numexpr.py
--- old/numexpr-2.4.3/numexpr/tests/test_numexpr.py 2015-04-27 17:38:07.000000000 +0200
+++ new/numexpr-2.4.4/numexpr/tests/test_numexpr.py 2015-09-14 17:18:15.000000000 +0200
@@ -13,6 +13,7 @@
import sys
import platform
import warnings
+from contextlib import contextmanager
import numpy as np
from numpy import (
@@ -720,19 +721,19 @@
self.assert_missing_op('add_sss', expr, locals())
def test_empty_string1(self):
- a = np.array(["", "pepe"])
- b = np.array(["pepe2", ""])
- res = evaluate("(a == '') & (b == 'pepe2')")
+ a = np.array([b"", b"pepe"])
+ b = np.array([b"pepe2", b""])
+ res = evaluate("(a == b'') & (b == b'pepe2')")
assert_array_equal(res, np.array([True, False]))
- res2 = evaluate("(a == 'pepe') & (b == '')")
+ res2 = evaluate("(a == b'pepe') & (b == b'')")
assert_array_equal(res2, np.array([False, True]))
def test_empty_string2(self):
- a = np.array(["p", "pepe"])
- b = np.array(["pepe2", ""])
- res = evaluate("(a == '') & (b == 'pepe2')")
+ a = np.array([b"p", b"pepe"])
+ b = np.array([b"pepe2", b""])
+ res = evaluate("(a == b'') & (b == b'pepe2')")
assert_array_equal(res, np.array([False, False]))
- res2 = evaluate("(a == 'pepe') & (b == '')")
+ res2 = evaluate("(a == b'pepe') & (b == b'')")
assert_array_equal(res, np.array([False, False]))
def test_add_numeric_array(self):
@@ -813,6 +814,31 @@
assert_array_equal(r1, a1)
+@contextmanager
+def _environment(key, value):
+ old = os.environ.get(key)
+ os.environ[key] = value
+ try:
+ yield
+ finally:
+ if old:
+ os.environ[key] = old
+ else:
+ del os.environ[key]
+
+
+# Test cases for the threading configuration
+class test_threading_config(TestCase):
+ def test_numexpr_num_threads(self):
+ with _environment('OMP_NUM_THREADS', '5'):
+ with _environment('NUMEXPR_NUM_THREADS', '3'):
+ self.assertEquals(3, numexpr.detect_number_of_threads())
+
+ def test_omp_num_threads(self):
+ with _environment('OMP_NUM_THREADS', '5'):
+ self.assertEquals(5, numexpr.detect_number_of_threads())
+
+
# Case test for threads
class test_threading(TestCase):
def test_thread(self):
@@ -924,6 +950,7 @@
theSuite.addTest(
unittest.makeSuite(test_irregular_stride))
theSuite.addTest(unittest.makeSuite(test_zerodim))
+ theSuite.addTest(unittest.makeSuite(test_threading_config))
# multiprocessing module is not supported on Hurd/kFreeBSD
if (pl.system().lower() not in ('gnu', 'gnu/kfreebsd')):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/utils.py new/numexpr-2.4.4/numexpr/utils.py
--- old/numexpr-2.4.3/numexpr/utils.py 2015-04-14 14:28:47.000000000 +0200
+++ new/numexpr-2.4.4/numexpr/utils.py 2015-09-14 17:18:15.000000000 +0200
@@ -115,6 +115,24 @@
return 1 # Default
+def detect_number_of_threads():
+ """
+ If this is modified, please update the note in: https://github.com/pydata/numexpr/wiki/Numexpr-Users-Guide
+ """
+ try:
+ nthreads = int(os.environ['NUMEXPR_NUM_THREADS'])
+ except KeyError:
+ nthreads = int(os.environ.get('OMP_NUM_THREADS', detect_number_of_cores()))
+ # Check that we don't activate too many threads at the same time.
+ # 8 seems a sensible value.
+ if nthreads > 8:
+ nthreads = 8
+ # Check that we don't surpass the MAX_THREADS in interpreter.cpp
+ if nthreads > 4096:
+ nthreads = 4096
+ return nthreads
+
+
class CacheDict(dict):
"""
A dictionary that prevents itself from growing too much.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/version.py new/numexpr-2.4.4/numexpr/version.py
--- old/numexpr-2.4.3/numexpr/version.py 2015-04-27 17:46:06.000000000 +0200
+++ new/numexpr-2.4.4/numexpr/version.py 2015-09-14 17:56:55.000000000 +0200
@@ -8,4 +8,4 @@
# rights to use.
####################################################################
-version = '2.4.3'
+version = '2.4.4'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr/win32/stdint.h new/numexpr-2.4.4/numexpr/win32/stdint.h
--- old/numexpr-2.4.3/numexpr/win32/stdint.h 1970-01-01 01:00:00.000000000 +0100
+++ new/numexpr-2.4.4/numexpr/win32/stdint.h 2015-09-14 17:18:15.000000000 +0200
@@ -0,0 +1,235 @@
+/* ISO C9x 7.18 Integer types <stdint.h>
+ * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * Contributor: Danny Smith <danny_r_smith_2001(a)yahoo.co.nz>
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Date: 2000-12-02
+ *
+ * mwb: This was modified in the following ways:
+ *
+ * - make it compatible with Visual C++ 6 (which uses
+ * non-standard keywords and suffixes for 64-bit types)
+ * - some environments need stddef.h included (for wchar stuff?)
+ * - handle the fact that Microsoft's limits.h header defines
+ * SIZE_MAX
+ * - make corrections for SIZE_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX,
+ * PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, and SIG_ATOMIC_MAX
+ * to be 64-bit aware.
+ */
+
+
+#ifndef _STDINT_H
+#define _STDINT_H
+#define __need_wint_t
+#define __need_wchar_t
+#include <wchar.h>
+#include <stddef.h>
+
+#if _MSC_VER && (_MSC_VER < 1300)
+/* using MSVC 6 or earlier - no "long long" type, but might have _int64 type */
+#define __STDINT_LONGLONG __int64
+#define __STDINT_LONGLONG_SUFFIX i64
+#else
+#define __STDINT_LONGLONG long long
+#define __STDINT_LONGLONG_SUFFIX LL
+#endif
+
+#if !defined( PASTE)
+#define PASTE2( x, y) x##y
+#define PASTE( x, y) PASTE2( x, y)
+#endif /* PASTE */
+
+
+/* 7.18.1.1 Exact-width integer types */
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef short int16_t;
+typedef unsigned short uint16_t;
+typedef int int32_t;
+typedef unsigned uint32_t;
+typedef __STDINT_LONGLONG int64_t;
+typedef unsigned __STDINT_LONGLONG uint64_t;
+
+/* 7.18.1.2 Minimum-width integer types */
+typedef signed char int_least8_t;
+typedef unsigned char uint_least8_t;
+typedef short int_least16_t;
+typedef unsigned short uint_least16_t;
+typedef int int_least32_t;
+typedef unsigned uint_least32_t;
+typedef __STDINT_LONGLONG int_least64_t;
+typedef unsigned __STDINT_LONGLONG uint_least64_t;
+
+/* 7.18.1.3 Fastest minimum-width integer types
+ * Not actually guaranteed to be fastest for all purposes
+ * Here we use the exact-width types for 8 and 16-bit ints.
+ */
+typedef char int_fast8_t;
+typedef unsigned char uint_fast8_t;
+typedef short int_fast16_t;
+typedef unsigned short uint_fast16_t;
+typedef int int_fast32_t;
+typedef unsigned int uint_fast32_t;
+typedef __STDINT_LONGLONG int_fast64_t;
+typedef unsigned __STDINT_LONGLONG uint_fast64_t;
+
+/* 7.18.1.4 Integer types capable of holding object pointers */
+#ifndef _INTPTR_T_DEFINED
+#define _INTPTR_T_DEFINED
+#ifdef _WIN64
+typedef __STDINT_LONGLONG intptr_t
+#else
+typedef int intptr_t;
+#endif /* _WIN64 */
+#endif /* _INTPTR_T_DEFINED */
+
+#ifndef _UINTPTR_T_DEFINED
+#define _UINTPTR_T_DEFINED
+#ifdef _WIN64
+typedef unsigned __STDINT_LONGLONG uintptr_t
+#else
+typedef unsigned int uintptr_t;
+#endif /* _WIN64 */
+#endif /* _UINTPTR_T_DEFINED */
+
+/* 7.18.1.5 Greatest-width integer types */
+typedef __STDINT_LONGLONG intmax_t;
+typedef unsigned __STDINT_LONGLONG uintmax_t;
+
+/* 7.18.2 Limits of specified-width integer types */
+#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
+
+/* 7.18.2.1 Limits of exact-width integer types */
+#define INT8_MIN (-128)
+#define INT16_MIN (-32768)
+#define INT32_MIN (-2147483647 - 1)
+#define INT64_MIN (PASTE( -9223372036854775807, __STDINT_LONGLONG_SUFFIX) - 1)
+
+#define INT8_MAX 127
+#define INT16_MAX 32767
+#define INT32_MAX 2147483647
+#define INT64_MAX (PASTE( 9223372036854775807, __STDINT_LONGLONG_SUFFIX))
+
+#define UINT8_MAX 0xff /* 255U */
+#define UINT16_MAX 0xffff /* 65535U */
+#define UINT32_MAX 0xffffffff /* 4294967295U */
+#define UINT64_MAX (PASTE( 0xffffffffffffffffU, __STDINT_LONGLONG_SUFFIX)) /* 18446744073709551615ULL */
+
+/* 7.18.2.2 Limits of minimum-width integer types */
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST64_MIN INT64_MIN
+
+#define INT_LEAST8_MAX INT8_MAX
+#define INT_LEAST16_MAX INT16_MAX
+#define INT_LEAST32_MAX INT32_MAX
+#define INT_LEAST64_MAX INT64_MAX
+
+#define UINT_LEAST8_MAX UINT8_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+#define UINT_LEAST64_MAX UINT64_MAX
+
+/* 7.18.2.3 Limits of fastest minimum-width integer types */
+#define INT_FAST8_MIN INT8_MIN
+#define INT_FAST16_MIN INT16_MIN
+#define INT_FAST32_MIN INT32_MIN
+#define INT_FAST64_MIN INT64_MIN
+
+#define INT_FAST8_MAX INT8_MAX
+#define INT_FAST16_MAX INT16_MAX
+#define INT_FAST32_MAX INT32_MAX
+#define INT_FAST64_MAX INT64_MAX
+
+#define UINT_FAST8_MAX UINT8_MAX
+#define UINT_FAST16_MAX UINT16_MAX
+#define UINT_FAST32_MAX UINT32_MAX
+#define UINT_FAST64_MAX UINT64_MAX
+
+/* 7.18.2.4 Limits of integer types capable of holding
+ object pointers */
+#ifdef _WIN64
+#define INTPTR_MIN INT64_MIN
+#define INTPTR_MAX INT64_MAX
+#define UINTPTR_MAX UINT64_MAX
+#else
+#define INTPTR_MIN INT32_MIN
+#define INTPTR_MAX INT32_MAX
+#define UINTPTR_MAX UINT32_MAX
+#endif /* _WIN64 */
+
+/* 7.18.2.5 Limits of greatest-width integer types */
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+
+/* 7.18.3 Limits of other integer types */
+#define PTRDIFF_MIN INTPTR_MIN
+#define PTRDIFF_MAX INTPTR_MAX
+
+#define SIG_ATOMIC_MIN INTPTR_MIN
+#define SIG_ATOMIC_MAX INTPTR_MAX
+
+/* we need to check for SIZE_MAX already defined because MS defines it in limits.h */
+#ifndef SIZE_MAX
+#define SIZE_MAX UINTPTR_MAX
+#endif
+
+#ifndef WCHAR_MIN /* also in wchar.h */
+#define WCHAR_MIN 0
+#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
+#endif
+
+/*
+ * wint_t is unsigned short for compatibility with MS runtime
+ */
+#define WINT_MIN 0
+#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
+
+#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
+
+
+/* 7.18.4 Macros for integer constants */
+#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
+
+/* 7.18.4.1 Macros for minimum-width integer constants
+
+ Accoding to Douglas Gwyn <gwyn(a)arl.mil>:
+ "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
+ 9899:1999 as initially published, the expansion was required
+ to be an integer constant of precisely matching type, which
+ is impossible to accomplish for the shorter types on most
+ platforms, because C99 provides no standard way to designate
+ an integer constant with width less than that of type int.
+ TC1 changed this to require just an integer constant
+ *expression* with *promoted* type."
+*/
+
+#define INT8_C(val) ((int8_t) + (val))
+#define UINT8_C(val) ((uint8_t) + (val##U))
+#define INT16_C(val) ((int16_t) + (val))
+#define UINT16_C(val) ((uint16_t) + (val##U))
+
+#define INT32_C(val) val##L
+#define UINT32_C(val) val##UL
+#define INT64_C(val) (PASTE( val, __STDINT_LONGLONG_SUFFIX))
+#define UINT64_C(val)(PASTE( PASTE( val, U), __STDINT_LONGLONG_SUFFIX))
+
+/* 7.18.4.2 Macros for greatest-width integer constants */
+#define INTMAX_C(val) INT64_C(val)
+#define UINTMAX_C(val) UINT64_C(val)
+
+#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr.egg-info/PKG-INFO new/numexpr-2.4.4/numexpr.egg-info/PKG-INFO
--- old/numexpr-2.4.3/numexpr.egg-info/PKG-INFO 2015-04-27 17:47:24.000000000 +0200
+++ new/numexpr-2.4.4/numexpr.egg-info/PKG-INFO 2015-09-14 18:06:33.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: numexpr
-Version: 2.4.3
+Version: 2.4.4
Summary: Fast numerical expression evaluator for NumPy
Home-page: https://github.com/pydata/numexpr
Author: David M. Cooke, Francesc Alted and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr.egg-info/SOURCES.txt new/numexpr-2.4.4/numexpr.egg-info/SOURCES.txt
--- old/numexpr-2.4.3/numexpr.egg-info/SOURCES.txt 2015-04-27 17:47:24.000000000 +0200
+++ new/numexpr-2.4.4/numexpr.egg-info/SOURCES.txt 2015-09-14 18:06:33.000000000 +0200
@@ -45,9 +45,11 @@
numexpr.egg-info/SOURCES.txt
numexpr.egg-info/dependency_links.txt
numexpr.egg-info/not-zip-safe
+numexpr.egg-info/pbr.json
numexpr.egg-info/requires.txt
numexpr.egg-info/top_level.txt
numexpr/tests/__init__.py
numexpr/tests/test_numexpr.py
numexpr/win32/pthread.c
-numexpr/win32/pthread.h
\ No newline at end of file
+numexpr/win32/pthread.h
+numexpr/win32/stdint.h
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numexpr-2.4.3/numexpr.egg-info/pbr.json new/numexpr-2.4.4/numexpr.egg-info/pbr.json
--- old/numexpr-2.4.3/numexpr.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100
+++ new/numexpr-2.4.4/numexpr.egg-info/pbr.json 2015-09-14 18:06:33.000000000 +0200
@@ -0,0 +1 @@
+{"is_release": true, "git_version": "a98e149"}
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package python3-wheel for openSUSE:Factory checked in at 2015-09-27 08:40:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-wheel (Old)
and /work/SRC/openSUSE:Factory/.python3-wheel.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-wheel"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-wheel/python3-wheel.changes 2014-12-05 21:05:08.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-wheel.new/python3-wheel.changes 2015-09-27 08:39:58.000000000 +0200
@@ -1,0 +2,18 @@
+Sun Sep 27 00:58:34 UTC 2015 - arun(a)gmx.de
+
+- specfile:
+ * update copyright year
+ * update url
+
+- update to version 0.26.0:
+ * Fix multiple entrypoint comparison failure on Python 3 (Issue #148)
+
+- changes from version 0.25.0:
+ * Add Python 3.5 to tox configuration
+ * Deterministic (sorted) metadata
+ * Fix tagging for Python 3.5 compatibility
+ * Support py2-none-'arch' and py3-none-'arch' tags
+ * Treat data-only wheels as pure
+ * Write to temporary file and rename when using wheel install --force
+
+-------------------------------------------------------------------
Old:
----
wheel-0.24.0.tar.gz
New:
----
wheel-0.26.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-wheel.spec ++++++
--- /var/tmp/diff_new_pack.KUZXZz/_old 2015-09-27 08:39:58.000000000 +0200
+++ /var/tmp/diff_new_pack.KUZXZz/_new 2015-09-27 08:39:58.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-wheel
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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,12 +17,12 @@
Name: python3-wheel
-Version: 0.24.0
+Version: 0.26.0
Release: 0
Summary: A built-package format for Python
License: MIT
Group: Development/Languages/Python
-Url: http://bitbucket.org/dholth/wheel/
+Url: https://bitbucket.org/pypa/wheel
Source: https://pypi.python.org/packages/source/w/wheel/wheel-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-setuptools
++++++ wheel-0.24.0.tar.gz -> wheel-0.26.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/CHANGES.txt new/wheel-0.26.0/CHANGES.txt
--- old/wheel-0.24.0/CHANGES.txt 2014-07-06 18:40:16.000000000 +0200
+++ new/wheel-0.26.0/CHANGES.txt 2015-09-18 20:02:17.000000000 +0200
@@ -1,3 +1,16 @@
+0.26.0
+======
+- Fix multiple entrypoint comparison failure on Python 3 (Issue #148)
+
+0.25.0
+======
+- Add Python 3.5 to tox configuration
+- Deterministic (sorted) metadata
+- Fix tagging for Python 3.5 compatibility
+- Support py2-none-'arch' and py3-none-'arch' tags
+- Treat data-only wheels as pure
+- Write to temporary file and rename when using wheel install --force
+
0.24.0
======
- The python tag used for pure-python packages is now .pyN (major version
@@ -14,7 +27,7 @@
0.23.0
======
-- Compatibiltiy tag flags added to the bdist_wheel command
+- Compatibility tag flags added to the bdist_wheel command
- sdist should include files necessary for tests
- 'wheel convert' can now also convert unpacked eggs to wheel
- Rename pydist.json to metadata.json to avoid stepping on the PEP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/PKG-INFO new/wheel-0.26.0/PKG-INFO
--- old/wheel-0.24.0/PKG-INFO 2014-07-06 18:56:22.000000000 +0200
+++ new/wheel-0.26.0/PKG-INFO 2015-09-18 20:03:13.000000000 +0200
@@ -1,8 +1,8 @@
Metadata-Version: 1.1
Name: wheel
-Version: 0.24.0
+Version: 0.26.0
Summary: A built-package format for Python.
-Home-page: http://bitbucket.org/pypa/wheel/
+Home-page: https://bitbucket.org/pypa/wheel/
Author: Daniel Holth
Author-email: dholth(a)fastmail.fm
License: MIT
@@ -49,6 +49,19 @@
+ 0.26.0
+ ======
+ - Fix multiple entrypoint comparison failure on Python 3 (Issue #148)
+
+ 0.25.0
+ ======
+ - Add Python 3.5 to tox configuration
+ - Deterministic (sorted) metadata
+ - Fix tagging for Python 3.5 compatibility
+ - Support py2-none-'arch' and py3-none-'arch' tags
+ - Treat data-only wheels as pure
+ - Write to temporary file and rename when using wheel install --force
+
0.24.0
======
- The python tag used for pure-python packages is now .pyN (major version
@@ -65,7 +78,7 @@
0.23.0
======
- - Compatibiltiy tag flags added to the bdist_wheel command
+ - Compatibility tag flags added to the bdist_wheel command
- sdist should include files necessary for tests
- 'wheel convert' can now also convert unpacked eggs to wheel
- Rename pydist.json to metadata.json to avoid stepping on the PEP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/entry_points.txt new/wheel-0.26.0/entry_points.txt
--- old/wheel-0.24.0/entry_points.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/wheel-0.26.0/entry_points.txt 2015-09-15 19:28:15.000000000 +0200
@@ -0,0 +1,5 @@
+[console_scripts]
+wheel = wheel.tool:main
+
+[distutils.commands]
+bdist_wheel = wheel.bdist_wheel:bdist_wheel
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/setup.py new/wheel-0.26.0/setup.py
--- old/wheel-0.24.0/setup.py 2014-07-06 18:48:58.000000000 +0200
+++ new/wheel-0.26.0/setup.py 2015-09-15 19:28:15.000000000 +0200
@@ -28,7 +28,7 @@
],
author='Daniel Holth',
author_email='dholth(a)fastmail.fm',
- url='http://bitbucket.org/pypa/wheel/',
+ url='https://bitbucket.org/pypa/wheel/',
keywords=['wheel', 'packaging'],
license='MIT',
packages=[
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel/__init__.py new/wheel-0.26.0/wheel/__init__.py
--- old/wheel-0.24.0/wheel/__init__.py 2014-07-06 18:40:16.000000000 +0200
+++ new/wheel-0.26.0/wheel/__init__.py 2015-09-18 20:03:01.000000000 +0200
@@ -1,2 +1,2 @@
# __variables__ with double-quoted values will be available in setup.py:
-__version__ = "0.24.0"
+__version__ = "0.26.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel/bdist_wheel.py new/wheel-0.26.0/wheel/bdist_wheel.py
--- old/wheel-0.24.0/wheel/bdist_wheel.py 2014-07-06 18:40:16.000000000 +0200
+++ new/wheel-0.26.0/wheel/bdist_wheel.py 2015-09-15 20:10:36.000000000 +0200
@@ -90,7 +90,7 @@
self.dist_dir = None
self.distinfo_dir = None
self.egginfo_dir = None
- self.root_is_purelib = None
+ self.root_is_pure = None
self.skip_build = None
self.relative = False
self.owner = None
@@ -110,7 +110,8 @@
self.set_undefined_options('bdist',
*zip(need_options, need_options))
- self.root_is_purelib = self.distribution.is_pure()
+ self.root_is_pure = not (self.distribution.has_ext_modules()
+ or self.distribution.has_c_libraries())
# Support legacy [wheel] section for setting universal
wheel = self.distribution.get_option_dict('wheel')
@@ -129,7 +130,7 @@
def get_tag(self):
supported_tags = pep425tags.get_supported()
- if self.distribution.is_pure():
+ if self.root_is_pure:
if self.universal:
impl = 'py2.py3'
else:
@@ -148,7 +149,7 @@
# sys.pypy_version_info.minor)
abi_tag = sysconfig.get_config_vars().get('SOABI', 'none')
if abi_tag.startswith('cpython-'):
- abi_tag = 'cp' + abi_tag.rsplit('-', 1)[-1]
+ abi_tag = 'cp' + abi_tag.split('-')[1]
tag = (impl_name + impl_ver, abi_tag, plat_name)
# XXX switch to this alternate implementation for non-pure:
@@ -203,7 +204,7 @@
self.install_libbase = self.install_lib = basedir_observed
setattr(install,
- 'install_purelib' if self.root_is_purelib else 'install_platlib',
+ 'install_purelib' if self.root_is_pure else 'install_platlib',
basedir_observed)
logger.info("installing to %s", self.bdist_dir)
@@ -255,7 +256,7 @@
msg = Message()
msg['Wheel-Version'] = '1.0' # of the spec
msg['Generator'] = generator
- msg['Root-Is-Purelib'] = str(self.root_is_purelib).lower()
+ msg['Root-Is-Purelib'] = str(self.root_is_pure).lower()
# Doesn't work for bdist_wininst
impl_tag, abi_tag, plat_tag = self.get_tag()
@@ -421,7 +422,8 @@
def walk():
for dir, dirs, files in os.walk(bdist_dir):
- for f in files:
+ dirs.sort()
+ for f in sorted(files):
yield os.path.join(dir, f)
def skip(path):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel/metadata.py new/wheel-0.26.0/wheel/metadata.py
--- old/wheel-0.24.0/wheel/metadata.py 2014-07-06 18:40:16.000000000 +0200
+++ new/wheel-0.26.0/wheel/metadata.py 2015-09-18 19:56:57.000000000 +0200
@@ -2,8 +2,13 @@
Tools for converting old- to new-style metadata.
"""
-from collections import defaultdict, namedtuple
+from collections import namedtuple
from .pkginfo import read_pkg_info
+from .util import OrderedDefaultDict
+try:
+ from collections import OrderedDict
+except ImportError:
+ OrderedDict = dict
import re
import os.path
@@ -51,8 +56,8 @@
"""
Place the runtime requirements from pkg_info into metadata.
"""
- may_requires = defaultdict(list)
- for value in pkg_info.get_all(key):
+ may_requires = OrderedDefaultDict(list)
+ for value in sorted(pkg_info.get_all(key)):
extra_match = EXTRA_RE.search(value)
if extra_match:
groupdict = extra_match.groupdict()
@@ -70,7 +75,7 @@
if may_requires:
metadata['run_requires'] = []
for key, value in may_requires.items():
- may_requirement = {'requires':value}
+ may_requirement = OrderedDict((('requires', value),))
if key.extra:
may_requirement['extra'] = key.extra
if key.condition:
@@ -93,7 +98,7 @@
distribution: optional distutils Distribution()
"""
- metadata = defaultdict(lambda: defaultdict(lambda: defaultdict(dict)))
+ metadata = OrderedDefaultDict(lambda: OrderedDefaultDict(lambda: OrderedDefaultDict(OrderedDict)))
metadata["generator"] = "bdist_wheel (" + wheel.__version__ + ")"
try:
unicode
@@ -121,7 +126,7 @@
if description:
pkg_info['description'] = description
- for key in unique(k.lower() for k in pkg_info.keys()):
+ for key in sorted(unique(k.lower() for k in pkg_info.keys())):
low_key = key.replace('-', '_')
if low_key in SKIP_FIELDS:
@@ -130,7 +135,7 @@
if low_key in UNKNOWN_FIELDS and pkg_info.get(key) == 'UNKNOWN':
continue
- if low_key in PLURAL_FIELDS:
+ if low_key in sorted(PLURAL_FIELDS):
metadata[PLURAL_FIELDS[low_key]] = pkg_info.get_all(key)
elif low_key == "requires_dist":
@@ -161,7 +166,7 @@
try:
requirements = getattr(distribution, attr)
if isinstance(requirements, list):
- new_requirements = list(convert_requirements(requirements))
+ new_requirements = sorted(convert_requirements(requirements))
metadata[requires] = [{'requires':new_requirements}]
except AttributeError:
pass
@@ -169,8 +174,8 @@
# handle contacts
contacts = []
for contact_type, role in CONTACT_FIELDS:
- contact = {}
- for key in contact_type:
+ contact = OrderedDict()
+ for key in sorted(contact_type):
if contact_type[key] in metadata:
contact[key] = metadata.pop(contact_type[key])
if contact:
@@ -183,11 +188,11 @@
try:
with open(os.path.join(os.path.dirname(path), "entry_points.txt"), "r") as ep_file:
ep_map = pkg_resources.EntryPoint.parse_map(ep_file.read())
- exports = {}
- for group, items in ep_map.items():
- exports[group] = {}
- for item in items.values():
- name, export = str(item).split(' = ', 1)
+ exports = OrderedDict()
+ for group, items in sorted(ep_map.items()):
+ exports[group] = OrderedDict()
+ for item in sorted(map(str, items.values())):
+ name, export = item.split(' = ', 1)
exports[group][name] = export
if exports:
metadata['extensions']['python.exports'] = exports
@@ -233,7 +238,8 @@
requires_path = os.path.join(egg_info_path, 'requires.txt')
if os.path.exists(requires_path):
requires = open(requires_path).read()
- for extra, reqs in pkg_resources.split_sections(requires):
+ for extra, reqs in sorted(pkg_resources.split_sections(requires),
+ key=lambda x: x[0] or ''):
condition = ''
if extra and ':' in extra: # setuptools extra:condition syntax
extra, condition = extra.split(':', 1)
@@ -244,7 +250,7 @@
condition += 'extra == %s' % repr(extra)
if condition:
condition = '; ' + condition
- for new_req in convert_requirements(reqs):
+ for new_req in sorted(convert_requirements(reqs)):
pkg_info['Requires-Dist'] = new_req + condition
description = pkg_info['Description']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel/pep425tags.py new/wheel-0.26.0/wheel/pep425tags.py
--- old/wheel-0.24.0/wheel/pep425tags.py 2014-07-06 18:40:16.000000000 +0200
+++ new/wheel-0.26.0/wheel/pep425tags.py 2015-09-15 20:10:36.000000000 +0200
@@ -60,7 +60,7 @@
soabi = sysconfig.get_config_var('SOABI')
if soabi and soabi.startswith('cpython-'):
- abis[0:0] = ['cp' + soabi.split('-', 1)[-1]]
+ abis[0:0] = ['cp' + soabi.split('-')[1]]
abi3s = set()
import imp
@@ -85,7 +85,10 @@
# Tagged specifically as being cross-version compatible
# (with just the major version specified)
supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))
-
+
+ # Major Python version + platform; e.g. binaries not using the Python API
+ supported.append(('py%s' % (versions[0][0]), 'none', arch))
+
# No abi / arch, generic Python
for i, version in enumerate(versions):
supported.append(('py%s' % (version,), 'none', 'any'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel/test/complex-dist/setup.py new/wheel-0.26.0/wheel/test/complex-dist/setup.py
--- old/wheel-0.24.0/wheel/test/complex-dist/setup.py 2014-07-06 18:40:16.000000000 +0200
+++ new/wheel-0.26.0/wheel/test/complex-dist/setup.py 2015-09-18 19:56:57.000000000 +0200
@@ -20,6 +20,11 @@
install_requires=["quux", "splort"],
extras_require={'simple':['simple.dist']},
tests_require=["foo", "bar>=10.0.0"],
- entry_points={'console_scripts':['complex-dist=complexdist:main']}
+ entry_points={
+ 'console_scripts': [
+ 'complex-dist=complexdist:main',
+ 'complex-dist2=complexdist:main',
+ ],
+ },
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel/util.py new/wheel-0.26.0/wheel/util.py
--- old/wheel-0.24.0/wheel/util.py 2014-07-06 18:40:16.000000000 +0200
+++ new/wheel-0.26.0/wheel/util.py 2015-09-15 19:28:15.000000000 +0200
@@ -5,6 +5,10 @@
import base64
import json
import hashlib
+try:
+ from collections import OrderedDict
+except ImportError:
+ OrderedDict = dict
__all__ = ['urlsafe_b64encode', 'urlsafe_b64decode', 'utf8',
'to_json', 'from_json', 'matches_requirement']
@@ -91,6 +95,23 @@
digest = self.hash.digest()
return self.hashtype + '=' + native(urlsafe_b64encode(digest))
+class OrderedDefaultDict(OrderedDict):
+ def __init__(self, *args, **kwargs):
+ if not args:
+ self.default_factory = None
+ else:
+ if not (args[0] is None or callable(args[0])):
+ raise TypeError('first argument must be callable or None')
+ self.default_factory = args[0]
+ args = args[1:]
+ super(OrderedDefaultDict, self).__init__(*args, **kwargs)
+
+ def __missing__ (self, key):
+ if self.default_factory is None:
+ raise KeyError(key)
+ self[key] = default = self.default_factory()
+ return default
+
if sys.platform == 'win32':
import ctypes.wintypes
# CSIDL_APPDATA for reference - not used here for compatibility with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel.egg-info/PKG-INFO new/wheel-0.26.0/wheel.egg-info/PKG-INFO
--- old/wheel-0.24.0/wheel.egg-info/PKG-INFO 2014-07-06 18:56:21.000000000 +0200
+++ new/wheel-0.26.0/wheel.egg-info/PKG-INFO 2015-09-18 20:03:12.000000000 +0200
@@ -1,8 +1,8 @@
Metadata-Version: 1.1
Name: wheel
-Version: 0.24.0
+Version: 0.26.0
Summary: A built-package format for Python.
-Home-page: http://bitbucket.org/pypa/wheel/
+Home-page: https://bitbucket.org/pypa/wheel/
Author: Daniel Holth
Author-email: dholth(a)fastmail.fm
License: MIT
@@ -49,6 +49,19 @@
+ 0.26.0
+ ======
+ - Fix multiple entrypoint comparison failure on Python 3 (Issue #148)
+
+ 0.25.0
+ ======
+ - Add Python 3.5 to tox configuration
+ - Deterministic (sorted) metadata
+ - Fix tagging for Python 3.5 compatibility
+ - Support py2-none-'arch' and py3-none-'arch' tags
+ - Treat data-only wheels as pure
+ - Write to temporary file and rename when using wheel install --force
+
0.24.0
======
- The python tag used for pure-python packages is now .pyN (major version
@@ -65,7 +78,7 @@
0.23.0
======
- - Compatibiltiy tag flags added to the bdist_wheel command
+ - Compatibility tag flags added to the bdist_wheel command
- sdist should include files necessary for tests
- 'wheel convert' can now also convert unpacked eggs to wheel
- Rename pydist.json to metadata.json to avoid stepping on the PEP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel.egg-info/SOURCES.txt new/wheel-0.26.0/wheel.egg-info/SOURCES.txt
--- old/wheel-0.24.0/wheel.egg-info/SOURCES.txt 2014-07-06 18:56:22.000000000 +0200
+++ new/wheel-0.26.0/wheel.egg-info/SOURCES.txt 2015-09-18 20:03:13.000000000 +0200
@@ -2,6 +2,7 @@
LICENSE.txt
MANIFEST.in
README.txt
+entry_points.txt
setup.cfg
setup.py
vendorize.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.24.0/wheel.egg-info/requires.txt new/wheel-0.26.0/wheel.egg-info/requires.txt
--- old/wheel-0.24.0/wheel.egg-info/requires.txt 2014-07-06 18:56:21.000000000 +0200
+++ new/wheel-0.26.0/wheel.egg-info/requires.txt 2015-09-18 20:03:12.000000000 +0200
@@ -1,16 +1,14 @@
-
-[tool]
-
-
-[signatures]
-keyring
+[:python_version=="2.6"]
+argparse
[faster-signatures]
ed25519ll
-[:python_version=="2.6"]
-argparse
+[signatures]
+keyring
[signatures:sys_platform!="win32"]
-pyxdg
\ No newline at end of file
+pyxdg
+
+[tool]
1
0
Hello community,
here is the log from the commit of package postfixadmin for openSUSE:Factory checked in at 2015-09-27 08:40:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/postfixadmin (Old)
and /work/SRC/openSUSE:Factory/.postfixadmin.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "postfixadmin"
Changes:
--------
--- /work/SRC/openSUSE:Factory/postfixadmin/postfixadmin.changes 2015-03-16 07:00:50.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.postfixadmin.new/postfixadmin.changes 2015-09-27 08:39:55.000000000 +0200
@@ -1,0 +2,10 @@
+Sat Sep 26 18:10:31 UTC 2015 - opensuse(a)cboltz.de
+
+- update to PostfixAdmin 2.93 aka 3.0 beta3
+ - add list.php for list view (replaces list-*.php and fixes some
+ bugs they included)
+ - add FetchmailHandler (replaces fetchmail.php)
+ - several bugfixes and small improvements
+ - see CHANGELOG.TXT for all details
+
+-------------------------------------------------------------------
Old:
----
postfixadmin-2.92.tar.gz
New:
----
postfixadmin-2.93.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ postfixadmin.spec ++++++
--- /var/tmp/diff_new_pack.LzOcH8/_old 2015-09-27 08:39:56.000000000 +0200
+++ /var/tmp/diff_new_pack.LzOcH8/_new 2015-09-27 08:39:56.000000000 +0200
@@ -17,7 +17,7 @@
Name: postfixadmin
-Version: 2.92
+Version: 2.93
Release: 0
Url: http://postfixadmin.sourceforge.net/
Source0: http://sourceforge.net/projects/postfixadmin/files/postfixadmin/%{name}-%{v…
++++++ postfixadmin-2.92.tar.gz -> postfixadmin-2.93.tar.gz ++++++
++++ 64714 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package wcd for openSUSE:Factory checked in at 2015-09-27 08:40:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wcd (Old)
and /work/SRC/openSUSE:Factory/.wcd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wcd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/wcd/wcd.changes 2015-04-21 10:52:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.wcd.new/wcd.changes 2015-09-27 08:39:54.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Sep 26 12:12:29 UTC 2015 - waterlan(a)xs4all.nl
+
+- Update to 5.3.0:
+ - Faster loading of the graphical tree, in about one third less time.
+ - Fix reading UTF-16 treedata files.
+ - Fix: Check for file I/O errors while reading files. These can happen
+ after a file was opened without problems.
+
+-------------------------------------------------------------------
Old:
----
wcd-5.2.7.tar.gz
New:
----
wcd-5.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ wcd.spec ++++++
--- /var/tmp/diff_new_pack.OzkW1b/_old 2015-09-27 08:39:55.000000000 +0200
+++ /var/tmp/diff_new_pack.OzkW1b/_new 2015-09-27 08:39:55.000000000 +0200
@@ -18,7 +18,7 @@
%define wcd_docdir %{_defaultdocdir}/%{name}
Name: wcd
-Version: 5.2.7
+Version: 5.3.0
Release: 0
Summary: Chdir for DOS and Unix
License: GPL-2.0
++++++ wcd-5.2.7.tar.gz -> wcd-5.3.0.tar.gz ++++++
++++ 11299 lines of diff (skipped)
1
0