svn commit: r563403 - in head/sysutils/lsof: . files
Dimitry Andric
dim at FreeBSD.org
Sat Jan 30 13:12:17 UTC 2021
Author: dim (src committer)
Date: Sat Jan 30 13:12:16 2021
New Revision: 563403
URL: https://svnweb.freebsd.org/changeset/ports/563403
Log:
sysutils/lsof: Update to 4.94
* Update to 4.94.
* Update or remove patches that are included in upstream.
* Fix build with Clang 11 without setting 'CFLAGS+=-fcommon' in Makefile.
* Use new pwddesc structure if applicable.
Change Log: https://github.com/lsof-org/lsof/releases/tag/4.94.0
Submitted by: Yasuhiro Kimura <yasu at utahime.org>
PR: 251096
MFH: 2021Q1
Deleted:
head/sysutils/lsof/files/patch-dialects_freebsd_dnode.c
head/sysutils/lsof/files/patch-dialects_freebsd_dnode2.c
head/sysutils/lsof/files/patch-dialects_freebsd_dsock.c
Modified:
head/sysutils/lsof/Makefile
head/sysutils/lsof/distinfo
head/sysutils/lsof/files/patch-Configure
head/sysutils/lsof/files/patch-dialects-freebsd-dlsof.h
head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c
Modified: head/sysutils/lsof/Makefile
==============================================================================
--- head/sysutils/lsof/Makefile Sat Jan 30 13:11:45 2021 (r563402)
+++ head/sysutils/lsof/Makefile Sat Jan 30 13:12:16 2021 (r563403)
@@ -5,8 +5,7 @@
# to commit it. I (ler) don't have access to all the ARCH's
PORTNAME= lsof
-DISTVERSION= 4.93.2
-PORTREVISION= 14
+DISTVERSION= 4.94.0
PORTEPOCH= 8
CATEGORIES= sysutils
@@ -33,7 +32,6 @@ AIM_CFLAGS= -DAIM
BOOKE_DESC= Set for BOOKE hardware
BOOKE_CFLAGS= -DBOOKE
-CFLAGS+= -fcommon
CFLAGS_powerpc= -DAIM
CFLAGS_powerpcspe= -DBOOKE
Modified: head/sysutils/lsof/distinfo
==============================================================================
--- head/sysutils/lsof/distinfo Sat Jan 30 13:11:45 2021 (r563402)
+++ head/sysutils/lsof/distinfo Sat Jan 30 13:12:16 2021 (r563403)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1557404723
-SHA256 (lsof-org-lsof-4.93.2_GH0.tar.gz) = 3df912bd966fc24dc73ddea3e36a61d79270b21b085936a4caabca56e5b486a2
-SIZE (lsof-org-lsof-4.93.2_GH0.tar.gz) = 1319222
+TIMESTAMP = 1605257406
+SHA256 (lsof-org-lsof-4.94.0_GH0.tar.gz) = a9865eeb581c3abaac7426962ddb112ecfd86a5ae93086eb4581ce100f8fa8f4
+SIZE (lsof-org-lsof-4.94.0_GH0.tar.gz) = 1340224
Modified: head/sysutils/lsof/files/patch-Configure
==============================================================================
--- head/sysutils/lsof/files/patch-Configure Sat Jan 30 13:11:45 2021 (r563402)
+++ head/sysutils/lsof/files/patch-Configure Sat Jan 30 13:12:16 2021 (r563403)
@@ -1,11 +1,22 @@
---- Configure.orig 2019-05-22 14:43:59 UTC
-+++ Configure
-@@ -1639,7 +1639,7 @@ kernel generation process.
+--- Configure.orig 2020-11-10 11:00:21.000000000 -0800
++++ Configure 2021-01-29 19:04:42.100811000 -0800
+@@ -1628,6 +1628,10 @@
+ LSOF_TSTBIGF=" "
+ LSOF_VERS=13000
+ ;;
++ 14*)
++ LSOF_TSTBIGF=" "
++ LSOF_VERS=14000
++ ;;
+ *)
+ echo Unknown FreeBSD release: `uname -r`
+ rm -f $LSOF_HLP
+@@ -1639,7 +1643,7 @@
# Clear LSOF_UNSUP message for supported versions of FreeBSD.
case $LSOF_VERS in # {
-- 4090|8020|8030|8040|9000|10000|11000|12000)
-+ 4090|8020|8030|8040|9000|10000|11000|12000|13000)
+- 4090|8020|8030|8040|9000|10000|11000|12000|13000)
++ 4090|8020|8030|8040|9000|10000|11000|12000|13000|14000)
LSOF_UNSUP=""
;;
esac # }
Modified: head/sysutils/lsof/files/patch-dialects-freebsd-dlsof.h
==============================================================================
--- head/sysutils/lsof/files/patch-dialects-freebsd-dlsof.h Sat Jan 30 13:11:45 2021 (r563402)
+++ head/sysutils/lsof/files/patch-dialects-freebsd-dlsof.h Sat Jan 30 13:12:16 2021 (r563403)
@@ -1,40 +1,15 @@
---- dialects/freebsd/dlsof.h.orig 2019-05-08 07:32:25 UTC
+--- dialects/freebsd/dlsof.h.orig 2020-11-10 19:00:21 UTC
+++ dialects/freebsd/dlsof.h
-@@ -38,6 +38,7 @@
- #if !defined(FREEBSD_LSOF_H)
- #define FREEBSD_LSOF_H 1
+@@ -559,7 +559,7 @@ typedef u_long KA_T;
+ * Global storage definitions (including their structure definitions)
+ */
-+#include <stddef.h>
- #include <stdlib.h>
- #include <dirent.h>
- #include <nlist.h>
-@@ -45,6 +46,12 @@
- #include <signal.h>
- #include <unistd.h>
+-struct file * Cfp;
++extern struct file * Cfp;
-+#if FREEBSDV>=13000
-+/* This header is a huge mess. Please don't support EOL FreeBSD releases. */
-+#define _KERNEL 1
-+#include <sys/_lock.h>
-+#undef _KERNEL
-+#endif /* FREEBSDV>=13000 */
- # if FREEBSDV>=4000
- # if FREEBSDV>=5000
- # if FREEBSDV<6020
-@@ -105,6 +112,12 @@ typedef struct device *device_t;
-
- #include <sys/conf.h>
-
-+/*
-+ * include <stdbool.h> for refcount(9)
-+ */
-+#include <stdbool.h>
-+
-+
- # if defined(HAS_VM_MEMATTR_T)
- #undef vm_memattr_t
- # endif /* defined(HAS_VM_MEMATTR_T) */
-@@ -652,9 +665,15 @@ struct sfile {
+ # if FREEBSDV>=2000
+ extern kvm_t *Kd;
+@@ -663,9 +663,15 @@ struct sfile {
*/
struct namecache {
Modified: head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c
==============================================================================
--- head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c Sat Jan 30 13:11:45 2021 (r563402)
+++ head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c Sat Jan 30 13:12:16 2021 (r563403)
@@ -1,157 +1,24 @@
---- dialects/freebsd/dproc.c.orig 2019-05-08 07:32:25 UTC
+--- dialects/freebsd/dproc.c.orig 2020-11-10 19:00:21 UTC
+++ dialects/freebsd/dproc.c
-@@ -37,6 +37,14 @@ static char *rcsid = "$Id: dproc.c,v 1.20 2018/02/14 1
+@@ -125,6 +125,9 @@ gather_proc_info()
+ * streams with eXPORT data,
+ * where supported */
+ struct filedesc fd;
++#if defined(PWDDESC_KVM_LOAD_PWD)
++ struct pwddesc pd;
++#endif /* defined(PWDDESC_KVM_LOAD_PWD) */
+ int i, nf;
+ MALLOC_S nb;
- #include "lsof.h"
+@@ -330,7 +333,11 @@ gather_proc_info()
-+/*
-+ * This is not an exact version but it should not matter. At worst there
-+ * is a small version window where this lsof does not compile on older
-+ * -CURRENT.
-+ */
-+#if __FreeBSD_version >= 1300081
-+#define HAS_PWD
-+#endif
-
- _PROTOTYPE(static void enter_vn_text,(KA_T va, int *n));
- _PROTOTYPE(static void get_kernel_access,(void));
-@@ -132,6 +140,15 @@ gather_proc_info()
- KA_T fa;
- #endif /* defined(HAS_FDESCENTTBL) */
-
-+#if defined(HAS_PWD)
-+ struct pwd pwd;
-+ KA_T pwd_addr;
-+#endif /* defined(HAS_FDESCENTTBL) */
-+
-+ struct vnode *cdir;
-+ struct vnode *rdir;
-+ struct vnode *jdir;
-+
- static ofb_t *ofb = NULL;
- static int ofbb = 0;
- int pgid, pid;
-@@ -305,13 +322,29 @@ gather_proc_info()
- if (!fd.fd_files
- || kread((KA_T)fd.fd_files, (char *)&fdt, sizeof(fdt)))
- continue;
-- if (!fd.fd_refcnt || fd.fd_lastfile > fdt.fdt_nfiles)
-+ if (!fd.fd_refcnt)
- continue;
- #else /* !defined(HAS_FDESCENTTBL) */
- if (!fd.fd_refcnt || fd.fd_lastfile > fd.fd_nfiles)
- continue;
- #endif /* defined(HAS_FDESCENTTBL) */
-
-+#if defined(HAS_PWD)
-+ cdir = rdir = jdir = NULL;
-+ pwd_addr = (KA_T)FILEDESC_KVM_LOAD_PWD(&fd);
-+ if (pwd_addr != 0) {
-+ if (!kread(pwd_addr, (char *)&pwd, sizeof(pwd))) {
-+ cdir = pwd.pwd_cdir;
-+ rdir = pwd.pwd_rdir;
-+ jdir = pwd.pwd_jdir;
-+ }
-+ }
-+#else
-+ cdir = fd.fd_cdir;
-+ rdir = fd.fd_rdir;
-+ jdir = fd.fd_jdir;
-+#endif
-+
- /*
- * Allocate a local process structure.
- */
-@@ -347,20 +380,20 @@ gather_proc_info()
- /*
- * Save current working directory information.
- */
-- if (!ckscko && fd.fd_cdir) {
-+ if (!ckscko && cdir) {
- alloc_lfile(CWD, -1);
- Cfp = (struct file *)NULL;
-- process_node((KA_T)fd.fd_cdir);
-+ process_node((KA_T)cdir);
- if (Lf->sf)
- link_lfile();
- }
- /*
- * Save root directory information.
- */
-- if (!ckscko && fd.fd_rdir) {
-+ if (!ckscko && rdir) {
- alloc_lfile(RTD, -1);
- Cfp = (struct file *)NULL;
-- process_node((KA_T)fd.fd_rdir);
-+ process_node((KA_T)rdir);
- if (Lf->sf)
- link_lfile();
- }
-@@ -369,10 +402,10 @@ gather_proc_info()
- /*
- * Save jail directory information.
- */
-- if (!ckscko && fd.fd_jdir) {
-+ if (!ckscko && jdir) {
- alloc_lfile("jld", -1);
- Cfp = (struct file *)NULL;
-- process_node((KA_T)fd.fd_jdir);
-+ process_node((KA_T)jdir);
- if (Lf->sf)
- link_lfile();
- }
-@@ -655,7 +688,29 @@ kread(addr, buf, len)
- return((br == len) ? 0 : 1);
- }
-
-+static int
-+vm_map_reader(void *token, vm_map_entry_t addr, vm_map_entry_t dest)
-+{
-+ return (kread((KA_T)addr, (char *)dest, sizeof(*dest)));
-+}
-
-+#if __FreeBSD_version < 1300060
-+typedef int vm_map_entry_reader(void *token, vm_map_entry_t addr,
-+ vm_map_entry_t dest);
-+
-+static inline vm_map_entry_t
-+vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone,
-+ vm_map_entry_reader reader)
-+{
-+ vm_map_entry_t next;
-+
-+ next = clone->next;
-+ if (!reader(token, next, clone))
-+ return (NULL);
-+ return (next);
-+}
-+#endif /* __FreeBSD_version < 1300060 */
-+
- /*
- * process_text() - process text information
- */
-@@ -682,20 +737,15 @@ process_text(vm)
- /*
- * Read the vm_map structure. Search its vm_map_entry structure list.
- */
-+ vmme = vmsp.vm_map.header;
-+ e = &vmme;
- for (i = 0; i < vmsp.vm_map.nentries; i++) {
-
- /*
- * Read the next vm_map_entry.
- */
-- if (i == 0)
-- e = &vmsp.vm_map.header;
-- else {
-- if (!(ka = (KA_T)e->next))
-- return;
-- e = &vmme;
-- if (kread(ka, (char *)e, sizeof(vmme)))
-- return;
-- }
-+ if (!vm_map_entry_read_succ(NULL, e, vm_map_reader))
-+ return;
-
- #if defined(MAP_ENTRY_IS_A_MAP)
- if (e->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP))
+ #if defined(HAS_PWD)
+ cdir = rdir = jdir = NULL;
++#if defined(PWDDESC_KVM_LOAD_PWD)
++ pwd_addr = (KA_T)PWDDESC_KVM_LOAD_PWD(&pd);
++#else /* defined(PWDDESC_KVM_LOAD_PWD) */
+ pwd_addr = (KA_T)FILEDESC_KVM_LOAD_PWD(&fd);
++#endif /* defened(PWDDESC_KVM_LOAD_PWD) */
+ if (pwd_addr != 0) {
+ if (!kread(pwd_addr, (char *)&pwd, sizeof(pwd))) {
+ cdir = pwd.pwd_cdir;
More information about the svn-ports-all
mailing list