forked from pool/rpmlint
Accepting request 540419 from devel:openSUSE:Factory:rpmlint
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/540419 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=284
This commit is contained in:
39
0001-Avoid-calling-close-on-undefined-fd-variable.patch
Normal file
39
0001-Avoid-calling-close-on-undefined-fd-variable.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From 49611f900047d5397ebbbdb0ed5299580337ea34 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Mueller <dirk@dmllr.de>
|
||||
Date: Wed, 1 Nov 2017 13:59:01 +0100
|
||||
Subject: [PATCH] Avoid calling close on undefined fd variable
|
||||
|
||||
It can happen that open did through an OSError but then the
|
||||
corresponding close UnknownVariableError wasn't caught. we
|
||||
can fix that by putting both in the same try/exception block,
|
||||
which also cleans up the code a bit.
|
||||
---
|
||||
Pkg.py | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Pkg.py b/Pkg.py
|
||||
index 47197c9..2622f9a 100644
|
||||
--- a/Pkg.py
|
||||
+++ b/Pkg.py
|
||||
@@ -719,16 +719,11 @@ class Pkg(AbstractPkg):
|
||||
# use descriptor() method instead
|
||||
try:
|
||||
fd = os.open(pkgfile.path, os.O_RDONLY)
|
||||
- except OSError:
|
||||
- if not pkgfile.is_ghost:
|
||||
- raise
|
||||
- else:
|
||||
pkgfile.magic = b2s(_magic.descriptor(fd))
|
||||
- # libmagic up to 5.18 already closes the descriptor
|
||||
- try:
|
||||
os.close(fd)
|
||||
except OSError:
|
||||
- pass
|
||||
+ if not pkgfile.is_ghost:
|
||||
+ raise
|
||||
if pkgfile.magic is None:
|
||||
pkgfile.magic = ''
|
||||
elif Pkg._magic_from_compressed_re.search(pkgfile.magic):
|
||||
--
|
||||
2.14.2
|
||||
|
@@ -3,4 +3,4 @@
|
||||
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
|
||||
<param name="changesrevision">8b163ac0aaf41e8424edbc4074a60f18e9cb9438</param></service><service name="tar_scm">
|
||||
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
|
||||
<param name="changesrevision">c90062ef30ec343a060331f1b867e9f30d2951bf</param></service></servicedata>
|
||||
<param name="changesrevision">9fe029d320afd18bba51bad18cc79324a912c756</param></service></servicedata>
|
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1b0ea1ad20da5002cffa4b3df129d776b5a7db361379e0060f3178003b137f37
|
||||
size 23072
|
||||
oid sha256:b3e65386ee2a52276b8fb443ee2f8cb71101c08759e4006d2ce94c44c626f78e
|
||||
size 23268
|
||||
|
@@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 03 08:10:16 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update rpmlint-tests to version master:
|
||||
* Add Flake8 travis check
|
||||
* Fix scriptprog invocation
|
||||
* Print the duplicated filenames sorted to be stable accross multiple calls
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 1 13:01:32 UTC 2017 - dmueller@suse.com
|
||||
|
||||
- add 0001-Avoid-calling-close-on-undefined-fd-variable.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 12:54:47 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Description updates. Use the %make_install macro.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 12:49:34 UTC 2017 - dmueller@suse.com
|
||||
|
||||
- update suse-whitelist-opensuse.diff to avoid a false positive
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 08:00:11 UTC 2017 - krahmer@suse.com
|
||||
|
||||
|
@@ -19,7 +19,7 @@
|
||||
Name: rpmlint
|
||||
Version: 1.10
|
||||
Release: 0
|
||||
Summary: Rpm correctness checker
|
||||
Summary: RPM file correctness checker
|
||||
License: GPL-2.0+
|
||||
Group: System/Packages
|
||||
Url: https://github.com/rpm-software-management/rpmlint
|
||||
@@ -87,6 +87,7 @@ Patch67: omit_BUILDROOT_from_pyo_files.patch
|
||||
Patch68: 0001-Avoid-false-positives-on-is_elf-check.patch
|
||||
Patch69: 0007-Validate-Appdata-also-when-appstream-util-is-unavail.patch
|
||||
Patch70: rpmlint-all-pie.patch
|
||||
Patch71: 0001-Avoid-calling-close-on-undefined-fd-variable.patch
|
||||
BuildRequires: obs-service-format_spec_file
|
||||
BuildRequires: python3-flake8
|
||||
BuildRequires: python3-pytest
|
||||
@@ -108,7 +109,7 @@ Requires: python3-xml
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Rpmlint is a tool to check common errors on rpm packages. Binary and
|
||||
rpmlint is a tool to check common errors on RPM packages. Binary and
|
||||
source packages can be checked.
|
||||
|
||||
%prep
|
||||
@@ -123,7 +124,7 @@ mv rpmlint-checks-master/*.py .
|
||||
make %{?_smp_mflags} PYTHON=%{_bindir}/python3
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot} PYTHON=%{_bindir}/python3
|
||||
%make_install PYTHON=%{_bindir}/python3
|
||||
# the provided bash-completion does not work and only prints bash errors
|
||||
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d
|
||||
mv %{buildroot}%{_sysconfdir}/rpmlint/config %{buildroot}%{_datadir}/rpmlint/config
|
||||
|
@@ -28,7 +28,7 @@ index ea131e3..d3da24c 100644
|
||||
if '\n' in summary:
|
||||
printError(pkg, 'summary-on-multiple-lines', lang)
|
||||
- if summary[0] != summary[0].upper():
|
||||
+ if (not summary[0].isupper() and
|
||||
+ if (summary[0] != summary[0].upper() and
|
||||
+ summary.partition(' ')[0] not in CAPITALIZED_IGNORE_LIST):
|
||||
printWarning(pkg, 'summary-not-capitalized', lang, summary)
|
||||
if summary[-1] == '.':
|
||||
|
Reference in New Issue
Block a user