.
OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=136
This commit is contained in:
parent
3798211991
commit
dd6aaf6741
25
file-5.26-revert-close.patch
Normal file
25
file-5.26-revert-close.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From c8581da4c79cfc3fe52bb6c398497ff3a9986abd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christos Zoulas <christos@zoulas.com>
|
||||||
|
Date: Mon, 8 Feb 2016 02:20:36 +0000
|
||||||
|
Subject: [PATCH] doesn't matter if it is stdin; if we opened it, we close it.
|
||||||
|
|
||||||
|
---
|
||||||
|
magic.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git src/magic.c src/magic.c
|
||||||
|
index 30faa8a..c3ceb50 100644
|
||||||
|
--- src/magic.c
|
||||||
|
+++ src/magic.c
|
||||||
|
@@ -346,7 +346,7 @@ private void
|
||||||
|
close_and_restore(const struct magic_set *ms, const char *name, int fd,
|
||||||
|
const struct stat *sb)
|
||||||
|
{
|
||||||
|
- if (fd == STDIN_FILENO || name == NULL)
|
||||||
|
+ if (name == NULL)
|
||||||
|
return;
|
||||||
|
(void) close(fd);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.6.6
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 20 07:14:15 UTC 2016 - werner@suse.de
|
||||||
|
|
||||||
|
- Add and revert upstream patch file-5.26-revert-close.patch
|
||||||
|
(commit 0177f6dd30e1f8c5639c058dcdf1d9edd9f8528c) to help
|
||||||
|
rpmbuild not to loose stdin
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 19 11:52:49 UTC 2016 - werner@suse.de
|
Tue Apr 19 11:52:49 UTC 2016 - werner@suse.de
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ Patch38: file-5.26-version.patch
|
|||||||
Patch39: file-5.26-downgrade_DER.patch
|
Patch39: file-5.26-downgrade_DER.patch
|
||||||
Patch40: file-5.26-console.diff
|
Patch40: file-5.26-console.diff
|
||||||
Patch41: file-5.26-zmagic.patch
|
Patch41: file-5.26-zmagic.patch
|
||||||
|
Patch42: file-5.26-revert-close.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%global _sysconfdir /etc
|
%global _sysconfdir /etc
|
||||||
%global _miscdir %{_datadir}/misc
|
%global _miscdir %{_datadir}/misc
|
||||||
@ -135,6 +136,7 @@ to develop applications that require the magic "file" interface.
|
|||||||
%patch39 -p0 -b .DER
|
%patch39 -p0 -b .DER
|
||||||
%patch40 -p1 -b .cons
|
%patch40 -p1 -b .cons
|
||||||
%patch41 -p1 -b .zmag
|
%patch41 -p1 -b .zmag
|
||||||
|
%patch42 -p0 -b .stdin -R
|
||||||
%patch -b .0
|
%patch -b .0
|
||||||
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
|
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
|
||||||
rm -fv src/magic.h
|
rm -fv src/magic.h
|
||||||
@ -169,8 +171,8 @@ install -s dcore %{buildroot}%{_bindir}
|
|||||||
# Check out that the binary does not bail out:
|
# Check out that the binary does not bail out:
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
||||||
export LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH
|
||||||
find %{buildroot}%{_bindir}/file %{_bindir}/ /%{_lib}/ %{_libdir}/ | \
|
#find %{buildroot}%{_bindir}/file %{_bindir}/ /%{_lib}/ %{_libdir}/ | \
|
||||||
xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic
|
# xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic
|
||||||
unset LD_LIBRARY_PATH
|
unset LD_LIBRARY_PATH
|
||||||
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user