[-- Attachment #1: Type: text/plain, Size: 1240 bytes --] There is a new pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 3247 bytes --] From eabf8eac18058dfb362f24b562a3a031ab12b506 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage --- srcpkgs/lsof/patches/Lsof.8.patch | 25 +++++++++++++++++++++++++ srcpkgs/lsof/template | 28 ++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..463f21168947 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- a/Lsof.8.orig ++++ 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 diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..5ba8662c56d5 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,6 +1,6 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" @@ -9,9 +9,9 @@ hostmakedepends="perl which" short_desc="LiSt Open Files" maintainer="Orphaned <orphan@voidlinux.org>" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 pre_configure() { export LSOF_CC="$CC" @@ -19,7 +19,7 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -i dialects/linux/machine.h } @@ -38,9 +38,25 @@ post_check() { mv ./hosts /etc/hosts } +post_build() { + { # .so only works if the file being included exists in the + # current directory or a subdirectory of it. So, we should + # include the files directly into the manpage instead of + # referencing them using .so + while read -r LINE; do + if [ "$LINE" != ".so${LINE#.so}" ]; then + printf '%s\n' "$LINE" # echo causes problems + continue + fi + LINE="${LINE#.so}" + cat "${LINE## }" + done + } <Lsof.8 >lsof.8 +} + do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 3955 bytes --] From 4c879ad274f3de8ee836b91ac04d6fa233df822d Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage --- srcpkgs/lsof/patches/Lsof.8.patch | 25 ++++++++++++++++ srcpkgs/lsof/template | 49 ++++++++++++++++++++++++------- 2 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..463f21168947 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- a/Lsof.8.orig ++++ 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 diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..42445ce74c77 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,6 +1,6 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" @@ -9,9 +9,9 @@ hostmakedepends="perl which" short_desc="LiSt Open Files" maintainer="Orphaned <orphan@voidlinux.org>" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 pre_configure() { export LSOF_CC="$CC" @@ -19,28 +19,57 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -i dialects/linux/machine.h } pre_check() { # test resolves hostname - cp /etc/hosts ./hosts + cp /etc/hosts ./hosts.bak 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 + cd tests + make + if [ "$XBPS_CHECK_PKGS" = full ]; then + make opt # optional tests + fi } + post_check() { - # cleanup polluted hosts file - mv ./hosts /etc/hosts + if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then + # Don't do anything, as trying to mv hosts.bak to /etc/hosts + # results in EBUSY return code on GitHub Actions, making the + # tests seem like they're failing. + : + else + # cleanup polluted hosts file + mv ./hosts.bak /etc/hosts + fi +} + +post_build() { + { # .so only works if the file being included exists in the + # current directory or a subdirectory of it. So, we should + # include the files directly into the manpage instead of + # referencing them using .so + while read -r LINE; do + if [ "$LINE" != ".so${LINE#.so}" ]; then + printf '%s\n' "$LINE" # echo causes problems + continue + fi + LINE="${LINE#.so}" + cat "${LINE## }" + done + } <Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 3950 bytes --] From 702477051b396cf72e810a918b70d6550c4c14f9 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage --- srcpkgs/lsof/patches/Lsof.8.patch | 25 ++++++++++++++++ srcpkgs/lsof/template | 49 ++++++++++++++++++++++++------- 2 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..42445ce74c77 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,6 +1,6 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" @@ -9,9 +9,9 @@ hostmakedepends="perl which" short_desc="LiSt Open Files" maintainer="Orphaned <orphan@voidlinux.org>" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 pre_configure() { export LSOF_CC="$CC" @@ -19,28 +19,57 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -i dialects/linux/machine.h } pre_check() { # test resolves hostname - cp /etc/hosts ./hosts + cp /etc/hosts ./hosts.bak 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 + cd tests + make + if [ "$XBPS_CHECK_PKGS" = full ]; then + make opt # optional tests + fi } + post_check() { - # cleanup polluted hosts file - mv ./hosts /etc/hosts + if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then + # Don't do anything, as trying to mv hosts.bak to /etc/hosts + # results in EBUSY return code on GitHub Actions, making the + # tests seem like they're failing. + : + else + # cleanup polluted hosts file + mv ./hosts.bak /etc/hosts + fi +} + +post_build() { + { # .so only works if the file being included exists in the + # current directory or a subdirectory of it. So, we should + # include the files directly into the manpage instead of + # referencing them using .so + while read -r LINE; do + if [ "$LINE" != ".so${LINE#.so}" ]; then + printf '%s\n' "$LINE" # echo causes problems + continue + fi + LINE="${LINE#.so}" + cat "${LINE## }" + done + } <Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 266 bytes --] New review comment by sgn on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r865493743 Comment: ```suggestion distfiles="https://github.com/lsof-org/lsof/releases/download/${version}/lsof_${version}.linux.tar.bz2" ```
[-- Attachment #1: Type: text/plain, Size: 150 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r865508688 Comment: Why?
[-- Attachment #1: Type: text/plain, Size: 196 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r867507012 Comment: ` if ! [ ... ]; then` would be a bit cleaner
[-- Attachment #1: Type: text/plain, Size: 253 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r867508501 Comment: I did it like this so that I could explain why we didn't restore `/etc/hosts` in case of `void-packages-ci`
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 3301 bytes --] From 88b312bccdd327341b475d8ad1847990e672ec8c Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage and tests --- srcpkgs/lsof/patches/Lsof.8.patch | 25 +++++++++++++++++++++ srcpkgs/lsof/template | 36 ++++++++++++++----------------- 2 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..23b7c1e1dd01 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" short_desc="LiSt Open Files" maintainer="Orphaned <orphan@voidlinux.org>" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 3301 bytes --] From 1d0885634b343d2e6a08f541055519f7ae2f3e2c Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage and tests --- srcpkgs/lsof/patches/Lsof.8.patch | 25 +++++++++++++++++++++ srcpkgs/lsof/template | 36 ++++++++++++++----------------- 2 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..23b7c1e1dd01 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" short_desc="LiSt Open Files" maintainer="Orphaned <orphan@voidlinux.org>" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 3360 bytes --] From aa30e3225bd99bff64eb12318091c02e68bf7f5f Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage & tests, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 25 ++++++++++++++++++++ srcpkgs/lsof/template | 38 ++++++++++++++----------------- 2 files changed, 42 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..2956678d5e46 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 186 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r867512134 Comment: _removed that part in the latest commit_
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4282 bytes --] From 555239f1965d25a9b0bb3389385434b9f5bc7eda Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage & tests, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 25 ++++++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 ++++++++++++ srcpkgs/lsof/template | 38 +++++++++++++--------------- 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..b09ae456ae90 --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,16 @@ +diff --git a/LTsock.c.orig b/LTsock.c +index bc0750f3..d8d9af6e 100644 +--- a/LTsock.c.orig ++++ b/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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..2956678d5e46 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4289 bytes --] From 32d45e5251b928e92261d36d05bb90d2b9bf7561 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage & tests, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 25 ++++++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 ++++++++++++ srcpkgs/lsof/template | 38 +++++++++++++--------------- 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..8670c7361f92 --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,16 @@ +diff --git a/LTsock.c.orig b/LTsock.c +index bc0750f3..d8d9af6e 100644 +--- 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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..2956678d5e46 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4277 bytes --] From c9194e27d8628afdf8ac7f6aa7cd8d8f9b33651b Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix manpage & tests, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 25 ++++++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 ++++++++++++ srcpkgs/lsof/template | 38 +++++++++++++--------------- 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..a167cfd5140a --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,16 @@ +diff --git a/LTsock.c.orig b/LTsock.c +index bc0750f3..d8d9af6e 100644 +--- 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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..2956678d5e46 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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" +distfiles="https://github.com/lsof-org/lsof/archive/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4280 bytes --] From 20d55f7700091d926e8d4ca6f01c4899e2bec803 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 25 ++++++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 ++++++++++++ srcpkgs/lsof/template | 38 +++++++++++++--------------- 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..fdac059a9751 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -0,0 +1,25 @@ +diff --git a/Lsof.8.orig b/Lsof.8 +index 76bf0fa3..e82e837b 100644 +--- 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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..a167cfd5140a --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,16 @@ +diff --git a/LTsock.c.orig b/LTsock.c +index bc0750f3..d8d9af6e 100644 +--- 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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..4c1218685463 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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" +distfiles="https://github.com/lsof-org/lsof/archive/refs/tags/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4137 bytes --] From 8453ab0cbf2e89cb842629ce27ee049177242e93 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 23 +++++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 14 ++++++++++ srcpkgs/lsof/template | 38 +++++++++++++--------------- 3 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..f9e595cb5463 --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,14 @@ +--- 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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..4c1218685463 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,24 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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" +distfiles="https://github.com/lsof-org/lsof/archive/refs/tags/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +26,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4211 bytes --] From 65fe7e0f5f8637285a0cf66e839019d98d4a1098 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 23 ++++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 14 ++++++++++ srcpkgs/lsof/template | 39 +++++++++++++--------------- 3 files changed, 55 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..f9e595cb5463 --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,14 @@ +--- 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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..c278bd18e1b6 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,25 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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/archive/refs/tags/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +27,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4211 bytes --] From 9f726242131087f7534cd7befb42e2745c816f2c Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 23 ++++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 14 ++++++++++ srcpkgs/lsof/template | 39 +++++++++++++--------------- 3 files changed, 55 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..f9e595cb5463 --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,14 @@ +--- 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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..c278bd18e1b6 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,25 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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/archive/refs/tags/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +post_extract() { + rm tests/CkTestDB + ln -s /bin/true tests/CkTestDB +} pre_configure() { export LSOF_CC="$CC" @@ -19,28 +27,17 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ + vsed -e "s|/\* \(#define\tHASSECURITY\t1\) \*/|\1|" \ -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 +post_build() { + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 215 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878702374 Comment: We tend to prefer upstream generated tarballs, if they are provided.
[-- Attachment #1: Type: text/plain, Size: 215 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878702989 Comment: This is IMO harder to understand, is there a specific reason for it?
[-- Attachment #1: Type: text/plain, Size: 242 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878703085 Comment: Add a simple comment on top of the patch saying this is done so a `hosts` file isn't necessary.
[-- Attachment #1: Type: text/plain, Size: 192 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878702519 Comment: Would you mind adding a comment for this one?
[-- Attachment #1: Type: text/plain, Size: 256 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878702606 Comment: So their makefile doesn't do this? :/ Maybe link https://github.com/lsof-org/lsof/pull/67 for reference here
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4695 bytes --] From 4a7d79f010cef5c7bcaad816f833a0d21030d50c Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 23 ++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 17 ++++++++++ srcpkgs/lsof/template | 46 +++++++++++++++------------- 3 files changed, 64 insertions(+), 22 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..22dc3bbd16b5 --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -0,0 +1,17 @@ +/etc/hosts has localhost entry as loopback, but it generally doesn't have the +hostname configured as a loopback, causing tests to fail. + +--- 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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..a88f6e411da3 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,29 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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/archive/refs/tags/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +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" @@ -19,28 +31,18 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ - -i dialects/linux/machine.h + vsed -i dialects/linux/machine.h \ + -e "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" } -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 +post_build() { + # Remove when https://github.com/lsof-org/lsof/pull/67 is merged + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 151 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878709242 Comment: done.
[-- Attachment #1: Type: text/plain, Size: 151 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878709258 Comment: done.
[-- Attachment #1: Type: text/plain, Size: 224 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878709313 Comment: nope. I just thought this looked cleaner and more understandable. reverted.
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4610 bytes --] From cecda8975ce58f982b46086e382c02016c3961e3 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 23 ++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 ++++++++++ srcpkgs/lsof/template | 46 +++++++++++++++------------- 3 files changed, 63 insertions(+), 22 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..bd9fa284d19a --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..a88f6e411da3 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,29 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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/archive/refs/tags/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +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" @@ -19,28 +31,18 @@ pre_configure() { export LSOF_CFGL="$LDFLAGS" export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include" - vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \ - -i dialects/linux/machine.h + vsed -i dialects/linux/machine.h \ + -e "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" } -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 +post_build() { + # Remove when https://github.com/lsof-org/lsof/pull/67 is merged + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 151 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878709442 Comment: done.
[-- Attachment #1: Type: text/plain, Size: 230 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878709583 Comment: @ericonr Why so? Why are upstream-generated tarballs preferred over the source code?
[-- Attachment #1: Type: text/plain, Size: 302 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878709752 Comment: Was the order switching intentional? (for reference, we prefer to keep diffs small, since they make it simpler to git blame a given file and to review PRs)
[-- Attachment #1: Type: text/plain, Size: 304 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878710061 Comment: Usually because they provide pre-generated files. For example, the PR I linked for `soelim` would also allow us to avoid `groff` in `hostmakedepends` at all.
[-- Attachment #1: Type: text/plain, Size: 195 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878710164 Comment: In some cases they are also the signed tarballs.
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4347 bytes --] From 8d6de0387d676ebb8560d011d0c6123b6661452e Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt --- srcpkgs/lsof/patches/Lsof.8.patch | 23 +++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 +++++++++++ srcpkgs/lsof/template | 42 +++++++++++++++------------- 3 files changed, 61 insertions(+), 20 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..bd9fa284d19a --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..20726ff36edf 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,29 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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/archive/refs/tags/${version}.tar.gz" +checksum=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +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" @@ -23,24 +35,14 @@ pre_configure() { -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 +post_build() { + # Remove when https://github.com/lsof-org/lsof/pull/67 is merged + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 185 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878710227 Comment: Ah, sorry. It was unintentional. Fixed.
[-- Attachment #1: Type: text/plain, Size: 611 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878711793 Comment: I see you thumbs-upped it but can I interest you in using the upstream tarball? It's simpler to make the change now instead of leaving it for a future version. An added advantage is that if a project moves from github, we can update distfile links without changing checksums. Alternatively, could you explain why you prefer the github snapshot? I realize I'm really sticking on this point, but I'm just trying to keep the repository under certain guidelines.
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4451 bytes --] From 72547eafbf0ed4c663bb080cdab5fc5a59421882 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt Development has moved to a GitHub repo, so download release tarballs from there. --- srcpkgs/lsof/patches/Lsof.8.patch | 23 +++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 +++++++++++ srcpkgs/lsof/template | 42 +++++++++++++++------------- 3 files changed, 61 insertions(+), 20 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..bd9fa284d19a --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..d53f0538be53 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,29 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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=8ff4c77736cc7d9556da9e2c7614cc4292a12f1979f20bd520d3c6f64b66a4d7 + +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" @@ -23,24 +35,14 @@ pre_configure() { -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 +post_build() { + # Remove when https://github.com/lsof-org/lsof/pull/67 is merged + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 450 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878712700 Comment: Ah, sorry. I just read your previous comments in an explanatory tone rather than a suggestive tone. :sweat_smile: I was like, _"Oh, okay. That's why they prefer upstream tarballs"_, instead of _"Ah, that's why I should change `distfiles` to the upstream tarball URL. Lemme change it."_ Changed.
[-- Attachment #1: Type: text/plain, Size: 450 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878712700 Comment: Ah, sorry. I just read your previous comments in an explanatory tone rather than a persuasive tone. :sweat_smile: I was like, _"Oh, okay. That's why they prefer upstream tarballs"_, instead of _"Ah, that's why I should change `distfiles` to the upstream tarball URL. Lemme change it."_ Changed.
[-- Attachment #1: Type: text/plain, Size: 185 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878712896 Comment: Oops, forgot to update the sha256sums.
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4451 bytes --] From 4241da03f30d733c9ce2e89be34919b91a181e17 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt Development has moved to a GitHub repo, so download release tarballs from there. --- srcpkgs/lsof/patches/Lsof.8.patch | 23 +++++++++++++++ srcpkgs/lsof/patches/fix-tests.patch | 16 +++++++++++ srcpkgs/lsof/template | 42 +++++++++++++++------------- 3 files changed, 61 insertions(+), 20 deletions(-) create mode 100644 srcpkgs/lsof/patches/Lsof.8.patch create mode 100644 srcpkgs/lsof/patches/fix-tests.patch diff --git a/srcpkgs/lsof/patches/Lsof.8.patch b/srcpkgs/lsof/patches/Lsof.8.patch new file mode 100644 index 000000000000..c5af8c718763 --- /dev/null +++ b/srcpkgs/lsof/patches/Lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..bd9fa284d19a --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -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", diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..f0e7c6230723 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -1,17 +1,29 @@ # Template file for 'lsof' pkgname=lsof -version=4.94.0 +version=4.95.0 revision=1 build_style=configure configure_script="./Configure" configure_args="-n linux" -hostmakedepends="perl which" +make_check_target="all" +make_check_args="-C tests" +hostmakedepends="perl which groff" 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" @@ -23,24 +35,14 @@ pre_configure() { -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 +post_build() { + # Remove when https://github.com/lsof-org/lsof/pull/67 is merged + soelim Lsof.8 >lsof.8 } do_install() { vbin lsof - vman Lsof.8 lsof.8 + vman lsof.8 # extract license from readme sed -n 00README -e '/^License/,/\*\/$/p' > License
[-- Attachment #1: Type: text/plain, Size: 151 bytes --] New review comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878712964 Comment: Done.
[-- Attachment #1: Type: text/plain, Size: 159 bytes --] New comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#issuecomment-1133662380 Comment: @ericonr All done.
[-- Attachment #1: Type: text/plain, Size: 159 bytes --] New comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#issuecomment-1133662380 Comment: @ericonr All done.
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --] There is an updated pull request by subnut against master on the void-packages repository https://github.com/subnut/void-packages lsof https://github.com/void-linux/void-packages/pull/36901 lsof: update to 4.95.0, fix manpage and tests, adopt <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl --> A patch file from https://github.com/void-linux/void-packages/pull/36901.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-lsof-36901.patch --] [-- Type: text/x-diff, Size: 4558 bytes --] From c72a256a1dc8519750b990711cdcd0eb223b826d Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <sn03.general@gmail.com> Date: Thu, 28 Apr 2022 22:04:43 +0530 Subject: [PATCH] lsof: update to 4.95.0, fix man page, adopt Development has moved to a GitHub repo, so download release tarballs from there. --- srcpkgs/lsof/patches/fix-tests.patch | 16 +++++++++++ srcpkgs/lsof/patches/lsof.8.patch | 23 +++++++++++++++ srcpkgs/lsof/template | 43 ++++++++++++++-------------- 3 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 srcpkgs/lsof/patches/fix-tests.patch create mode 100644 srcpkgs/lsof/patches/lsof.8.patch diff --git a/srcpkgs/lsof/patches/fix-tests.patch b/srcpkgs/lsof/patches/fix-tests.patch new file mode 100644 index 000000000000..bd9fa284d19a --- /dev/null +++ b/srcpkgs/lsof/patches/fix-tests.patch @@ -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", diff --git a/srcpkgs/lsof/patches/lsof.8.patch b/srcpkgs/lsof/patches/lsof.8.patch new file mode 100644 index 000000000000..ecb21013512d --- /dev/null +++ b/srcpkgs/lsof/patches/lsof.8.patch @@ -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 diff --git a/srcpkgs/lsof/template b/srcpkgs/lsof/template index 2c13c23beed4..0151fb4a9e84 100644 --- a/srcpkgs/lsof/template +++ b/srcpkgs/lsof/template @@ -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
[-- Attachment #1: Type: text/plain, Size: 159 bytes --] New comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#issuecomment-1133664579 Comment: @ericonr All done!
[-- Attachment #1: Type: text/plain, Size: 174 bytes --] New comment by subnut on void-packages repository https://github.com/void-linux/void-packages/pull/36901#issuecomment-1133664579 Comment: @ericonr All done! Please review.
[-- Attachment #1: Type: text/plain, Size: 1111 bytes --] There's a merged pull request on the void-packages repository lsof: update to 4.95.0, fix manpage and tests, adopt https://github.com/void-linux/void-packages/pull/36901 Description: <!-- Uncomment relevant sections and delete options which are not applicable --> #### Testing the changes - I tested the changes in this PR: **YES** <!-- #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO** --> <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) <!-- - I built this PR locally for these architectures (if supported. mark crossbuilds): - aarch64-musl - armv7l - armv6l-musl -->
[-- Attachment #1: Type: text/plain, Size: 169 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/36901#discussion_r878760907 Comment: No problem, thank you!