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 Sep 18, 2024
2 parents 9e0efea + 525b9c5 commit d07999c
Show file tree
Hide file tree
Showing 102 changed files with 3,711 additions and 261 deletions.
4 changes: 2 additions & 2 deletions configs/Fedora/users-groups.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# generated by tools/generate-fedora-users-groups.py on 2022-09-07

StandardUsers = ['abrt', 'activemq', 'adm', 'aeolus', 'amandabackup', 'apache', 'arpwatch', 'ats', 'avahi', 'avahi-autoipd', 'bacula', 'beagleindex', 'bin', 'cassandra', 'ceilometer', 'ceph', 'cimsrvr', 'cinder', 'clamav', 'condor', 'cyrus', 'daemon', 'dbus', 'desktop', 'dhcpd', 'distcache', 'dovecot', 'elasticsearch', 'exim', 'fax', 'frontpage', 'ftp', 'games', 'gdm', 'glance', 'gopher', 'hacluster', 'haldaemon', 'halt', 'haproxy', 'heat', 'hsqldb', 'ident', 'jbosson-agent', 'jetty', 'jonas', 'keystone', 'ldap', 'lp', 'luci', 'mail', 'mailman', 'mailnull', 'majordomo', 'mongodb', 'myproxy', 'mysql', 'named', 'netdump', 'news', 'nobody', 'nocpulse', 'nova', 'nscd', 'nslcd', 'ntp', 'nut', 'operator', 'oprofile', 'ovirt', 'ovirtagent', 'pegasus', 'piranha', 'pkiuser', 'polkituser', 'postfix', 'postgres', 'prelude-manager', 'privoxy', 'pulse', 'puppet', 'pvm', 'qemu', 'quagga', 'quantum', 'radiusd', 'radvd', 'retrace', 'rhevm', 'ricci', 'root', 'rpc', 'rpcuser', 'rpm', 'rtkit', 'sabayon', 'saned', 'sanlock', 'shutdown', 'smmsp', 'snortd', 'squid', 'sshd', 'stap-server', 'swift', 'sync', 'systemd-network', 'systemd-resolve', 'tcpdump', 'tomcat', 'tss', 'usbmuxd', 'uucp', 'vcsa', 'vdsm', 'vhostmd', 'wallaby', 'webalizer', 'wildfly', 'wnn', 'xfs']
StandardUsers = ['abrt', 'activemq', 'adm', 'aeolus', 'amandabackup', 'apache', 'arpwatch', 'ats', 'avahi', 'avahi-autoipd', 'bacula', 'beagleindex', 'bin', 'cassandra', 'ceilometer', 'ceph', 'cimsrvr', 'cinder', 'clamav', 'condor', 'cyrus', 'daemon', 'dbus', 'desktop', 'dhcpd', 'distcache', 'dovecot', 'elasticsearch', 'exim', 'fax', 'frontpage', 'ftp', 'games', 'gdm', 'glance', 'gopher', 'hacluster', 'haldaemon', 'halt', 'haproxy', 'heat', 'hsqldb', 'ident', 'jbosson-agent', 'jetty', 'jonas', 'keystone', 'ldap', 'lp', 'luci', 'mail', 'mailman', 'mailnull', 'majordomo', 'mongodb', 'myproxy', 'mysql', 'named', 'netdump', 'news', 'nobody', 'nocpulse', 'nova', 'nscd', 'nslcd', 'ntp', 'nut', 'operator', 'oprofile', 'ovirt', 'ovirtagent', 'pegasus', 'piranha', 'pkiuser', 'polkituser', 'postfix', 'postgres', 'prelude-manager', 'privoxy', 'pulse', 'puppet', 'pvm', 'qemu', 'quagga', 'quantum', 'radiusd', 'radvd', 'retrace', 'rhevm', 'ricci', 'root', 'rpc', 'rpcuser', 'rpm', 'rtkit', 'sabayon', 'saned', 'sanlock', 'shutdown', 'smmsp', 'snortd', 'squid', 'sshd', 'sssd', 'stap-server', 'swift', 'sync', 'systemd-network', 'systemd-resolve', 'tcpdump', 'tomcat', 'tss', 'usbmuxd', 'uucp', 'vcsa', 'vdsm', 'vhostmd', 'wallaby', 'webalizer', 'wildfly', 'wnn', 'xfs']

StandardGroups = ['abrt', 'activemq', 'adm', 'aeolus', 'apache', 'arpwatch', 'ats', 'audio', 'avahi', 'avahi-autoipd', 'bacula', 'beagleindex', 'bin', 'cassandra', 'cdrom', 'ceilometer', 'ceph', 'cimsrvr', 'cinder', 'clamav', 'condor', 'console', 'daemon', 'dbus', 'desktop', 'dhcpd', 'dialout', 'dip', 'disk', 'distcache', 'dovecot', 'elasticsearch', 'exim', 'fax', 'floppy', 'frontpage', 'ftp', 'games', 'gdm', 'glance', 'gopher', 'haclient', 'haldaemon', 'haproxy', 'heat', 'hsqldb', 'ident', 'input', 'jbosson', 'jetty', 'jonas', 'keystone', 'kmem', 'kvm', 'ldap', 'lock', 'lp', 'luci', 'mail', 'mailman', 'mailnull', 'majordomo', 'man', 'mem', 'mock', 'mongodb', 'myproxy', 'mysql', 'named', 'netdump', 'news', 'nobody', 'nocpulse', 'nova', 'nscd', 'ntp', 'nut', 'oprofile', 'ovirt', 'ovirtagent', 'pegasus', 'piranha', 'pkiuser', 'polkituser', 'popusers', 'postdrop', 'postfix', 'postgres', 'pppusers', 'prelude-manager', 'privoxy', 'pulse', 'puppet', 'pvm', 'qemu', 'quagga', 'quaggavt', 'quantum', 'radiusd', 'radvd', 'realtime', 'render', 'retrace', 'rhevm', 'ricci', 'root', 'rpc', 'rpcuser', 'rpm', 'rtkit', 'sabayon', 'saned', 'sanlock', 'saslauth', 'screen', 'sgx', 'slipusers', 'slocate', 'smmsp', 'snortd', 'squid', 'sshd', 'stap-server', 'stapdev', 'stapsys', 'stapusr', 'swift', 'sys', 'systemd-journal', 'systemd-network', 'systemd-resolve', 'tape', 'tcpdump', 'tomcat', 'tss', 'tty', 'usbmuxd', 'users', 'utempter', 'utmp', 'uucp', 'vcsa', 'vhostmd', 'video', 'wallaby', 'wbpriv', 'webalizer', 'wheel', 'wildfly', 'wine', 'wnn', 'xfs']
StandardGroups = ['abrt', 'activemq', 'adm', 'aeolus', 'apache', 'arpwatch', 'ats', 'audio', 'avahi', 'avahi-autoipd', 'bacula', 'beagleindex', 'bin', 'cassandra', 'cdrom', 'ceilometer', 'ceph', 'cimsrvr', 'cinder', 'clamav', 'condor', 'console', 'daemon', 'dbus', 'desktop', 'dhcpd', 'dialout', 'dip', 'disk', 'distcache', 'dovecot', 'elasticsearch', 'exim', 'fax', 'floppy', 'frontpage', 'ftp', 'games', 'gdm', 'glance', 'gopher', 'haclient', 'haldaemon', 'haproxy', 'heat', 'hsqldb', 'ident', 'input', 'jbosson', 'jetty', 'jonas', 'keystone', 'kmem', 'kvm', 'ldap', 'lock', 'lp', 'luci', 'mail', 'mailman', 'mailnull', 'majordomo', 'man', 'mem', 'mock', 'mongodb', 'myproxy', 'mysql', 'named', 'netdump', 'news', 'nobody', 'nocpulse', 'nova', 'nscd', 'ntp', 'nut', 'oprofile', 'ovirt', 'ovirtagent', 'pegasus', 'piranha', 'pkiuser', 'polkituser', 'popusers', 'postdrop', 'postfix', 'postgres', 'pppusers', 'prelude-manager', 'privoxy', 'pulse', 'puppet', 'pvm', 'qemu', 'quagga', 'quaggavt', 'quantum', 'radiusd', 'radvd', 'realtime', 'render', 'retrace', 'rhevm', 'ricci', 'root', 'rpc', 'rpcuser', 'rpm', 'rtkit', 'sabayon', 'saned', 'sanlock', 'saslauth', 'screen', 'sgx', 'slipusers', 'slocate', 'smmsp', 'snortd', 'squid', 'sshd', 'sssd', 'stap-server', 'stapdev', 'stapsys', 'stapusr', 'swift', 'sys', 'systemd-journal', 'systemd-network', 'systemd-resolve', 'tape', 'tcpdump', 'tomcat', 'tss', 'tty', 'usbmuxd', 'users', 'utempter', 'utmp', 'uucp', 'vcsa', 'vhostmd', 'video', 'wallaby', 'wbpriv', 'webalizer', 'wheel', 'wildfly', 'wine', 'wnn', 'xfs']
1 change: 1 addition & 0 deletions configs/openSUSE/scoring.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ missing-hash-section = 10000
zypperplugin-file-digest-mismatch = 10
zypperplugin-file-ghost = 10
zypperplugin-file-unauthorized = 10
patch-macro-old-format = 10000
7 changes: 7 additions & 0 deletions configs/openSUSE/users-groups.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ StandardGroups = [
'privoxy',
'prometheus',
'prosody',
'proxy',
'ptokax',
'public',
'pulse',
Expand Down Expand Up @@ -184,6 +185,7 @@ StandardGroups = [
'sogo',
'squid',
'sshd',
'sssd',
'suse-ncc',
'svn',
'swift',
Expand All @@ -197,6 +199,7 @@ StandardGroups = [
'tomcat4',
'tor',
'tox',
'traefik',
'transmission',
'trove',
'trusted',
Expand Down Expand Up @@ -224,6 +227,7 @@ StandardGroups = [
'woodpecker',
'www',
'xok',
'xpra',
'xrootd',
'xymon',
'zabbix',
Expand Down Expand Up @@ -399,6 +403,7 @@ StandardUsers = [
'privoxy',
'prometheus',
'prosody',
'proxy',
'ptokax',
'pulse',
'puppet',
Expand Down Expand Up @@ -427,6 +432,7 @@ StandardUsers = [
'sogo',
'squid',
'sshd',
'sssd',
'statd',
'suse-ncc',
'svn',
Expand All @@ -438,6 +444,7 @@ StandardUsers = [
'tomcat4',
'tor',
'toxcmd',
'traefik',
'transmission',
'trove',
'tryton',
Expand Down
45 changes: 23 additions & 22 deletions rpmlint/pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,25 @@ def __enter__(self):
def __exit__(self, exc_type, exc_val, exc_tb):
self.cleanup()

def check_versioned_dep(self, name, version):
# try to match name%_isa as well (e.g. 'foo(x86-64)', 'foo(x86-32)')
name_re = re.compile(r'^%s(\(\w+-\d+\))?$' % re.escape(name))
for d in self.requires + self.prereq:
if name_re.match(d[0]):
if d[1] & rpm.RPMSENSE_EQUAL != rpm.RPMSENSE_EQUAL \
or d[2][1] != version:
return False
return True
return False

def read_with_mmap(self, filename):
"""Mmap a file, return it's content decoded."""
try:
with open(Path(self.dir_name() or '/', filename.lstrip('/'))) as in_file:
return mmap.mmap(in_file.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ).read().decode()
except Exception:
return ''


class Pkg(AbstractPkg):
_magic_from_compressed_re = re.compile(r'\([^)]+\s+compressed\s+data\b')
Expand Down Expand Up @@ -604,7 +623,7 @@ def _extract_rpm(self, dirname, verbose):
subprocess.check_output('rpm2archive - | tar -xz && chmod -R +rX .', shell=True, env=ENGLISH_ENVIRONMENT,
stderr=stderr, stdin=rpm_data)
else:
command_str = f'rpm2cpio {quote(str(filename))} | cpio -id ; chmod -R +rX .'
command_str = f'rpm2cpio {quote(str(filename))} | cpio -id && chmod -R +rX .'
subprocess.check_output(command_str, shell=True, env=ENGLISH_ENVIRONMENT, stderr=stderr)
self.extracted = True
return dirname
Expand Down Expand Up @@ -632,14 +651,6 @@ def grep(self, regex, filename):
else:
return None

def read_with_mmap(self, filename):
"""Mmap a file, return it's content decoded."""
try:
with open(Path(self.dir_name() or '/', filename.lstrip('/'))) as in_file:
return mmap.mmap(in_file.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ).read().decode()
except Exception:
return ''

def langtag(self, tag, lang):
"""Get value of tag in the given language."""
# LANGUAGE trumps other env vars per GNU gettext docs, see also #166
Expand Down Expand Up @@ -717,17 +728,6 @@ def readlink(self, pkgfile):
result = self.files.get(linkpath)
return result

def check_versioned_dep(self, name, version):
# try to match name%_isa as well (e.g. 'foo(x86-64)', 'foo(x86-32)')
name_re = re.compile(r'^%s(\(\w+-\d+\))?$' % re.escape(name))
for d in self.requires + self.prereq:
if name_re.match(d[0]):
if d[1] & rpm.RPMSENSE_EQUAL != rpm.RPMSENSE_EQUAL \
or d[2][1] != version:
return False
return True
return False


def get_installed_pkgs(name):
"""Get list of installed package objects by name."""
Expand Down Expand Up @@ -879,14 +879,15 @@ def create_files(self, files):
self._mock_file(path, file)

def add_dir(self, path, metadata=None):
pkgdir = PkgFile(path)
name = path
pkgdir = PkgFile(name)
pkgdir.magic = 'directory'

path = os.path.join(self.dir_name(), path.lstrip('/'))
os.makedirs(Path(path), exist_ok=True)

pkgdir.path = path
self.files[path] = pkgdir
self.files[name] = pkgdir

if metadata:
for k, v in metadata.items():
Expand Down
Binary file removed test/binary/Nonutfpostcheck-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/appdata-1.91-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/bashisms-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/builddate-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/buildroot-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/dbusrule-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/desktopfile-bad-binary-0-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/desktopfile-bad-duplicate-0-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/desktopfile-bad-section-0-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/desktopfile-bad-unicode-0-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/desktopfile-good-0-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/development-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/erlang-test-0-2.1.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/file-zero-length-1.1-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/filechecks-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/freeradius-server-3.2.3-3.1.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/init-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/libslp-missing-suffix-1.0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/libslp1234-1.0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/makefile-junk-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/manual-pages-0-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/menuxdg1-0-0.noarch.rpm
Binary file not shown.
Binary file removed test/binary/mixed-ownership-1.0-0.x86_64.rpm
Binary file not shown.
Binary file not shown.
Binary file removed test/binary/non-utf8-1.0-1.el5.centos.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/pam-module-1.0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/pc-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/python3-greenlet-0.4.15-1.5.x86_64.rpm
Binary file not shown.
Binary file not shown.
Binary file removed test/binary/rc-links-1.0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/rust-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/shlib1-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/shlib2-devel-0-0.x86_64.rpm
Binary file not shown.
Binary file not shown.
Binary file removed test/binary/systemd-tmpfiles-1.0-0.x86_64.rpm
Binary file not shown.
Binary file not shown.
Binary file removed test/binary/tasque-0.1.12-12.7.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/tclpackage-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/testdocumentation-0-0.x86_64.rpm
Binary file not shown.
Binary file removed test/binary/unexpanded-macro-files-0.1-1.noarch.rpm
Binary file not shown.
Binary file added test/files/README1.gz
Binary file not shown.
Binary file added test/files/README2.bz2
Binary file not shown.
Binary file added test/files/README3.xz
Binary file not shown.
Loading

0 comments on commit d07999c

Please sign in to comment.