lsof: update to 4.95.0, fix man page, adopt

Development has moved to a GitHub repo, so download release tarballs
from there.
This commit is contained in:
Subhaditya Nath 2022-04-28 22:04:43 +05:30 committed by Érico Nogueira Rolim
parent f259f63f16
commit b3b2cdb723
3 changed files with 60 additions and 22 deletions

View File

@ -0,0 +1,16 @@
This patch eliminates the need to modify /etc/hosts
--- a/tests/LTsock.c
+++ b/tests/LTsock.c
@@ -255,10 +255,7 @@ main(argc, argv)
* Get the host name and its IP address. Convert the IP address to dotted
* ASCII form.
*/
- if (gethostname(hnm, sizeof(hnm) - 1)) {
- cem = "ERROR!!! can't get this host's name";
- goto print_errno;
- }
+ strncpy(hnm, "localhost", sizeof(hnm) - 1);
hnm[sizeof(hnm) - 1] = '\0';
if (!(hp = gethostbyname(hnm))) {
(void) snprintf(buf, bufl - 1, "ERROR!!! can't get IP address for %s",

View File

@ -0,0 +1,23 @@
--- a/lsof.8
+++ b/lsof.8
@@ -1,7 +1,7 @@
.so ./version
.TH LSOF 8 Revision-\*(VN
-\" Register )P is used neither by this file nor any groff macro. However,
-\" some versions of nroff require it.
+.\" Register )P is used neither by this file nor any groff macro. However,
+.\" some versions of nroff require it.
.if !\n(.g \{\
. if !\n()P .nr )P 1v
.\}
@@ -967,8 +967,8 @@ where:
.br
applies to all IP versions.
.br
- \fIprotocol\fP is a protocol name \- \fBTCP\fP, \fBUDP\fP
-.br or \fBUDPLITE\fP.
+ \fIprotocol\fP is a protocol name \- \fBTCP\fP, \fBUDP\fP or \fBUDPLITE\fP.
+.br
.br
\fIhostname\fP is an Internet host name. Unless a
.br

View File

@ -1,46 +1,45 @@
# Template file for 'lsof'
pkgname=lsof
version=4.94.0
version=4.95.0
revision=1
wrksrc="${pkgname}_${version}.linux"
build_style=configure
configure_script="./Configure"
configure_args="-n linux"
hostmakedepends="perl which"
make_check_target="all"
make_check_args="-C tests"
hostmakedepends="perl"
short_desc="LiSt Open Files"
maintainer="Orphaned <orphan@voidlinux.org>"
maintainer="Subhaditya Nath <sn03.general@gmail.com>"
license="custom:lsof"
homepage="https://people.freebsd.org/~abe/"
distfiles="https://fossies.org/linux/misc/lsof-${version}.tar.gz"
checksum=a9865eeb581c3abaac7426962ddb112ecfd86a5ae93086eb4581ce100f8fa8f4
homepage="https://github.com/lsof-org/lsof"
changelog="https://raw.githubusercontent.com/lsof-org/lsof/master/00DIST"
distfiles="https://github.com/lsof-org/lsof/releases/download/${version}/lsof_${version}.linux.tar.bz2"
checksum=e9faa0fbcc48638c1d1f143e93573ac43b65e76646150f83e24bd8c18786303c
post_extract() {
# See: https://github.com/lsof-org/lsof/issues/61
# The TestDB was meant for storing known-good configurations, and
# skipping tests if the current system configuration exists in the
# TestDB. But we don't want that.
rm tests/CkTestDB
ln -s /bin/true tests/CkTestDB
}
pre_configure() {
export LSOF_CC="$CC"
export LSOF_CFGF="$CFLAGS"
export LSOF_CFGL="$LDFLAGS"
export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include"
export LSOF_MAKE="$(command -v make)"
vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \
-i dialects/linux/machine.h
}
pre_check() {
# test resolves hostname
cp /etc/hosts ./hosts
printf '# +++ xbps-src +++ required for lsof tests\n127.0.0.100 %s\n' "$(hostname)" >> /etc/hosts
# write current config to test db
cd tests && ./Add2TestDB
}
do_check() {
make -C tests
}
post_check() {
# cleanup polluted hosts file
mv ./hosts /etc/hosts
}
do_install() {
vbin lsof
vman Lsof.8 lsof.8
vman lsof.8
# extract license from readme
sed -n 00README -e '/^License/,/\*\/$/p' > License