Ignored exit errors should no longer lead to non zero exit codes
Resolves: RHEL-155123
This commit is contained in:
parent
d1f8620f29
commit
304afa47aa
55
ncompress-4.2.4.4-exit-code-ignored.patch
Normal file
55
ncompress-4.2.4.4-exit-code-ignored.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 14d486afed1a1c5ef5ad14f92e52537e6aa68aad Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Dubaj <odubaj@redhat.com>
|
||||
Date: Wed, 6 May 2020 13:23:42 +0200
|
||||
Subject: [PATCH] Do not set exit_code when an error is ignored
|
||||
|
||||
---
|
||||
compress42.c | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/compress42.c b/compress42.c
|
||||
index 834c2f2..3dd3d19 100644
|
||||
--- a/compress42.c
|
||||
+++ b/compress42.c
|
||||
@@ -1193,7 +1193,6 @@ comprexx(fileptr)
|
||||
{
|
||||
fprintf(stderr, "\nunlink error (ignored) ");
|
||||
perror(ofname);
|
||||
- exit_code = 1;
|
||||
}
|
||||
|
||||
remove_ofname = 0;
|
||||
@@ -1241,7 +1240,6 @@ comprexx(fileptr)
|
||||
{
|
||||
fprintf(stderr, "\nutime error (ignored) ");
|
||||
perror(ofname);
|
||||
- exit_code = 1;
|
||||
}
|
||||
|
||||
#ifndef AMIGA
|
||||
@@ -1249,14 +1247,12 @@ comprexx(fileptr)
|
||||
{
|
||||
fprintf(stderr, "\nchmod error (ignored) ");
|
||||
perror(ofname);
|
||||
- exit_code = 1;
|
||||
}
|
||||
#ifndef DOS
|
||||
if (chown(ofname, infstat.st_uid, infstat.st_gid)) /* Copy ownership */
|
||||
{
|
||||
fprintf(stderr, "\nchown error (ignored) ");
|
||||
perror(ofname);
|
||||
- exit_code = 1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -1266,7 +1262,6 @@ comprexx(fileptr)
|
||||
{
|
||||
fprintf(stderr, "\nunlink error (ignored) ");
|
||||
perror(ifname);
|
||||
- exit_code = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: Fast compression and decompression utilities
|
||||
Name: ncompress
|
||||
Version: 4.2.4.4
|
||||
Release: 21%{?dist}
|
||||
Release: 22%{?dist}
|
||||
License: Public Domain
|
||||
URL: http://ncompress.sourceforge.net/
|
||||
Source: http://prdownloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
|
||||
@ -37,6 +37,10 @@ Patch5: ncompress-4.2.4.4-memmove.patch
|
||||
# ~> downstream
|
||||
Patch6: ncompress-4.2.4.4-silence-gcc.patch
|
||||
|
||||
#Ignored errors should not lead to non zero exit code
|
||||
# changelog: 4.2.4.4-22
|
||||
Patch7: ncompress-4.2.4.4-exit-code-ignored.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: glibc-devel
|
||||
@ -75,6 +79,7 @@ sed "s/\$(ARCH_FLAGS)/$ARCH_FLAGS/" Makefile.def > Makefile
|
||||
%patch4 -p1 -b .endians
|
||||
%patch5 -p1 -b .memmove
|
||||
%patch6 -p1 -b .silence-gcc
|
||||
%patch7 -p1 -b .exit-code
|
||||
|
||||
|
||||
%build
|
||||
@ -98,6 +103,11 @@ ln -sf compress.1 $RPM_BUILD_ROOT%{_mandir}/man1/uncompress.1
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Mar 19 2026 Jakub Martisko <jamartis@redhat.com> - 4.2.4.4-22
|
||||
- Fix an issue where intentionaly ignored errors led to non zero exit code
|
||||
- https://github.com/vapier/ncompress/issues/22
|
||||
Resolves: RHEL-155123
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.2.4.4-21
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
Loading…
Reference in New Issue
Block a user