Skip to content

Commit

Permalink
Merge branch 'main' into opensuse
Browse files Browse the repository at this point in the history
  • Loading branch information
danigm committed Apr 9, 2024
2 parents 75d7356 + 4d2651b commit f8fe494
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
4 changes: 4 additions & 0 deletions configs/openSUSE/users-groups.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ StandardGroups = [
'firejail',
'floppy',
'fonehome',
'forgejo',
'ftp',
'games',
'gdm',
Expand Down Expand Up @@ -114,6 +115,7 @@ StandardGroups = [
'nagios',
'named',
'nats',
'netdata',
'neutron',
'news',
'nginx',
Expand Down Expand Up @@ -284,6 +286,7 @@ StandardUsers = [
'ffums',
'firebird',
'fonehome',
'forgejo',
'ftp',
'games',
'gdm',
Expand Down Expand Up @@ -348,6 +351,7 @@ StandardUsers = [
'nagios',
'named',
'nats',
'netdata',
'neutron',
'news',
'nginx',
Expand Down
9 changes: 5 additions & 4 deletions rpmlint/descriptions/SpecCheck.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ configuration to provide additional 'under the hood' functionality. Add the
section, even if empty.
"""
"no-%check-section"="""
The spec file does not contain an %check section. Even if some packages don't
directly need it, section markers may be overridden in rpm's configuration to
provide additional 'under the hood' functionality. Add the section, even if
empty.
The spec file does not contain an %check section.
Please check if the package has a testsuite and what it takes to enable the
testsuite as part of the package build. If it is not possible to run it in the
build environment (OBS/koji) or no testsuite exists, then please ignore this
warning. You should not insert an empty %check section.
"""
"more-than-one-%changelog-section"="""
The spec file unnecessarily contains more than one %changelog section.
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
test=pytest

[flake8]
# FIXME: enable once https://github.com/MartinThoma/flake8-simplify/issues/148
# is resolved
ignore = E122,E501,W504
import-order-style = google
application-import-names = Testing
Expand Down
Binary file removed test/binary/needxinetd-0-0.x86_64.rpm
Binary file not shown.
14 changes: 14 additions & 0 deletions test/mockdata/mock_xinetd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from Testing import get_tested_mock_package


RequireXinetd = get_tested_mock_package(
header={
'requires': [
'rpmlib(CompressedFileNames) <= 3.0.4-1',
'rpmlib(FileDigests) <= 4.6.0-1',
'rpmlib(PayloadFilesHavePrefix) <= 4.0-1',
'rpmlib(PayloadIsXz) <= 5.2-1',
'xinetd'
]
},
)
9 changes: 5 additions & 4 deletions test/test_xinetd.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from mockdata.mock_xinetd import RequireXinetd
import pytest
from rpmlint.checks.XinetdDepCheck import XinetdDepCheck
from rpmlint.filter import Filter

from Testing import CONFIG, get_tested_package
from Testing import CONFIG


@pytest.fixture(scope='function', autouse=True)
Expand All @@ -13,9 +14,9 @@ def xinetdcheck():
return output, test


@pytest.mark.parametrize('package', ['binary/needxinetd'])
def test_xinetd(tmp_path, package, xinetdcheck):
@pytest.mark.parametrize('package', [RequireXinetd])
def test_xinetd(package, xinetdcheck):
output, test = xinetdcheck
test.check(get_tested_package(package, tmp_path))
test.check(package)
out = output.print_results(output.results)
assert 'E: obsolete-xinetd-requirement' in out

0 comments on commit f8fe494

Please sign in to comment.