diff --git a/SOURCES/lsof-4.87-LTsock-test-fail-on-ppc64le.patch b/SOURCES/lsof-4.87-LTsock-test-fail-on-ppc64le.patch new file mode 100644 index 0000000..a3bae78 --- /dev/null +++ b/SOURCES/lsof-4.87-LTsock-test-fail-on-ppc64le.patch @@ -0,0 +1,45 @@ +diff -up ./dialects/linux/dproc.c.ori ./dialects/linux/dproc.c +--- ./dialects/linux/dproc.c.ori 2017-09-05 09:39:00.602482719 +0200 ++++ ./dialects/linux/dproc.c 2017-09-05 09:49:43.079902156 +0200 +@@ -829,10 +829,10 @@ process_id(idp, idpl, cmd, uid, pid, ppi + /* + * Process the ID's current working directory info. + */ ++ efs = 0; + if (!Ckscko) { + (void) make_proc_path(idp, idpl, &path, &pathl, "cwd"); + alloc_lfile(CWD, -1); +- efs = 0; + if (getlinksrc(path, pbuf, sizeof(pbuf), (char **)NULL) < 1) { + if (!Fwarn) { + (void) memset((void *)&sb, 0, sizeof(sb)); +@@ -878,13 +878,13 @@ process_id(idp, idpl, cmd, uid, pid, ppi + /* + * Process the ID's root directory info. + */ ++ lnk = ss = 0; + if (!Ckscko) { + (void) make_proc_path(idp, idpl, &path, &pathl, "root"); + alloc_lfile(RTD, -1); + if (getlinksrc(path, pbuf, sizeof(pbuf), (char **)NULL) < 1) { + if (!Fwarn) { + (void) memset((void *)&sb, 0, sizeof(sb)); +- lnk = ss = 0; + (void) snpf(nmabuf, sizeof(nmabuf), "(readlink: %s)", + strerror(errno)); + nmabuf[sizeof(nmabuf) - 1] = '\0'; +@@ -925,13 +925,12 @@ process_id(idp, idpl, cmd, uid, pid, ppi + /* + * Process the ID's execution info. + */ ++ lnk = ss = txts = 0; + if (!Ckscko) { +- txts = 0; + (void) make_proc_path(idp, idpl, &path, &pathl, "exe"); + alloc_lfile("txt", -1); + if (getlinksrc(path, pbuf, sizeof(pbuf), (char **)NULL) < 1) { + (void) memset((void *)&sb, 0, sizeof(sb)); +- lnk = ss = 0; + if (!Fwarn) { + if ((errno != ENOENT) || uid) { + (void) snpf(nmabuf, sizeof(nmabuf), "(readlink: %s)", diff --git a/SPECS/lsof.spec b/SPECS/lsof.spec index 4b29157..be910d9 100644 --- a/SPECS/lsof.spec +++ b/SPECS/lsof.spec @@ -1,7 +1,7 @@ Summary: A utility which lists open files on a Linux/UNIX system Name: lsof Version: 4.87 -Release: 4%{?dist} +Release: 5%{?dist} # Sendmail .. lib/snpf.c # LGPLv2+ .. lib/regex.c, regex.h License: zlib and Sendmail and LGPLv2+ @@ -18,6 +18,8 @@ URL: http://people.freebsd.org/~abe/ Source0: %{lsofrh}.tar.xz Source1: upstream2downstream.sh +Patch0: lsof-4.87-LTsock-test-fail-on-ppc64le.patch + BuildRequires: libselinux-devel %description @@ -28,6 +30,8 @@ UNIX system. %prep %setup -q -n %{lsofrh} +%patch0 -p1 + %build ./Configure -n linux make DEBUG="$RPM_OPT_FLAGS" %{?_smp_mflags} @@ -44,6 +48,10 @@ install -p -m 0644 lsof.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 %{_mandir}/man*/* %changelog +* Tue Sep 05 2017 Jan Rybar - 4.87-5 +- LTsock test failure on ppc64le +- Resolves: rhbz#1459256 + * Fri Jan 24 2014 Daniel Mach - 4.87-4 - Mass rebuild 2014-01-24