Github messages for voidlinux
 help / color / mirror / Atom feed
From: 0x5c <0x5c@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] net-tools: update to 2.10, adopt.
Date: Thu, 05 May 2022 19:14:12 +0200	[thread overview]
Message-ID: <20220505171412.B2gKogvrelm55t0KT9ifEJjkxhLOvfDTg1C-3Vb7xac@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36881@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

There is an updated pull request by 0x5c against master on the void-packages repository

https://github.com/0x5c/void-packages nettools
https://github.com/void-linux/void-packages/pull/36881

net-tools: update to 2.10, adopt.
Also cleaned up the template and made the build system behave slightly better.

<!-- 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, (ARCH-LIBC)
- 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/36881.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nettools-36881.patch --]
[-- Type: text/x-diff, Size: 2561 bytes --]

From 68f1058415bac1c71001f5815e0194e887678061 Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Wed, 27 Apr 2022 04:15:09 -0400
Subject: [PATCH] net-tools: update to 2.10, adopt.

Also cleaned up the template and made the build system behave slightly better.
---
 srcpkgs/net-tools/template | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/srcpkgs/net-tools/template b/srcpkgs/net-tools/template
index 384feba77fb9..b320c3183b32 100644
--- a/srcpkgs/net-tools/template
+++ b/srcpkgs/net-tools/template
@@ -1,15 +1,15 @@
 # Template file for 'net-tools'
 pkgname=net-tools
-version=1.60.20181103git
+version=2.10
 revision=1
-_githash=0eebece8c964e3cfa8a018f42b2e7e751a7009a0
-wrksrc="${pkgname}-${_githash}"
+build_style="gnu-makefile"
+make_use_env=yes
 short_desc="Basic networking tools"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="0x5c <dev@0x5c.io>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ecki/net-tools"
-distfiles="https://github.com/ecki/net-tools/archive/${_githash}.tar.gz"
-checksum=795cb4dd2618ed7ff9a48b9cb63b33780b47dfd7464c8e52ba734e6796cbab17
+distfiles="https://github.com/ecki/net-tools/archive/refs/tags/v${version}.tar.gz"
+checksum=8e186f65f0ff304989b3dc8b0067c3a07d36ae777da60667bdd6ccb2730908d2
 
 alternatives="
  ifconfig:ifconfig:/usr/bin/${pkgname}-ifconfig
@@ -17,9 +17,10 @@ alternatives="
  hostname:hostname:/usr/bin/${pkgname}-hostname
  hostname:/usr/share/man/man1/hostname.1:/usr/share/man/man8/${pkgname}-hostname.1"
 
-pre_build() {
-	vsed -i "s#/sbin#/bin#" Makefile
-	vsed -i "s#/usr##" man/Makefile
+post_patch() {
+	# Hacky and flaky, but upstream does not support $PREFIX !
+	vsed -e "s|/sbin|/bin|" -i Makefile
+	vsed -e "s|/bin|/usr/bin|" -i Makefile
 	case "$XBPS_TARGET_MACHINE" in
 		*-musl)
 			# HZ is defined in <asm/param.h>
@@ -27,20 +28,18 @@ pre_build() {
 				-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
 			vsed -i ${wrksrc}/netstat.c \
 				-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
-
 			# Need <termios.h> for tty constants and structure
 			vsed -i ${wrksrc}/slattach.c \
 				-e "/#include <limits.h>/a #include <termios.h>"
 	esac
 }
 
-do_build() {
+do_configure() {
 	replace_interpreter bash configure.sh
-	yes "" | make
+	yes "" | make config
 }
 
-do_install() {
-	make DESTDIR=${DESTDIR}/usr update
+post_install() {
 	# Rename ifconfig for alternatives.
 	mv ${DESTDIR}/usr/bin/{ifconfig,${pkgname}-ifconfig}
 	mv ${DESTDIR}/usr/share/man/man8/{ifconfig,${pkgname}-ifconfig}.8

  parent reply	other threads:[~2022-05-05 17:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27  8:27 [PR PATCH] " 0x5c
2022-04-27 12:09 ` [PR REVIEW] " leahneukirchen
2022-04-27 17:07 ` 0x5c
2022-04-28  1:34 ` [PR PATCH] [Updated] " 0x5c
2022-04-30 22:27 ` 0x5c
2022-05-05 17:14 ` 0x5c [this message]
2022-05-07  7:38 ` 0x5c
2022-05-09 10:54 ` [PR PATCH] [Merged]: " leahneukirchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220505171412.B2gKogvrelm55t0KT9ifEJjkxhLOvfDTg1C-3Vb7xac@z \
    --to=0x5c@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).