Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Allow busybox to provide ip/tc
@ 2019-10-27 20:13 voidlinux-github
  2021-03-17 20:16 ` heliocat
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: voidlinux-github @ 2019-10-27 20:13 UTC (permalink / raw)
  To: ml

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

There is a new pull request by CameronNemo against master on the void-packages repository

https://github.com/CameronNemo/void-packages bb-ip
https://github.com/void-linux/void-packages/pull/15836

Allow busybox to provide ip/tc
None

A patch file from https://github.com/void-linux/void-packages/pull/15836.patch is attached

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

From ecfd039607384ffbd36152babf54fb73bbc56861 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Sun, 27 Oct 2019 13:12:51 -0700
Subject: [PATCH 1/2] iproute2: switch to alternatives for ip/tc

---
 srcpkgs/iproute2/template | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/iproute2/template b/srcpkgs/iproute2/template
index 1e918d98abf..4b30861ddc6 100644
--- a/srcpkgs/iproute2/template
+++ b/srcpkgs/iproute2/template
@@ -1,7 +1,7 @@
 # Template file for 'iproute2'
 pkgname=iproute2
 version=5.3.0
-revision=1
+revision=2
 build_style=configure
 make_install_args="SBINDIR=/usr/bin"
 hostmakedepends="pkg-config perl flex"
@@ -13,6 +13,10 @@ homepage="https://wiki.linuxfoundation.org/networking/iproute2"
 distfiles="${KERNEL_SITE}/utils/net/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=cb1c1e45993a3bd2438543fd4332d70f1726a6e6ff97dc613a8258c993117b3f
 
+alternatives="
+ ip:ip:/usr/bin/iproute2-ip
+ tc:tc:/usr/bin/iproute2-tc"
+
 conf_files="
  /etc/iproute2/ematch_map
  /etc/iproute2/rt_dsfield
@@ -26,6 +30,9 @@ do_check() {
 }
 
 post_install() {
+	for bin in ip tc; do
+		mv "${DESTDIR}/usr/bin/${bin}" "${DESTDIR}/usr/bin/iproute2-${bin}"
+	done
 	rm -r ${DESTDIR}/usr/share/doc
 	rm -r ${DESTDIR}/usr/share/man/man3
 }

From a7889d77d9c51ca45cf49792f580e85156fc2a89 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Sun, 27 Oct 2019 12:39:47 -0700
Subject: [PATCH 2/2] busybox: add ip and tc alternatives

---
 srcpkgs/busybox/template | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/busybox/template b/srcpkgs/busybox/template
index bc80b3c24d2..ced5c7243b3 100644
--- a/srcpkgs/busybox/template
+++ b/srcpkgs/busybox/template
@@ -1,11 +1,11 @@
 # Template file for 'busybox'
 pkgname=busybox
 version=1.30.1
-revision=4
+revision=5
 hostmakedepends="perl"
 checkdepends="zip"
 short_desc="Swiss Army Knife of Embedded Linux"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="GPL-2.0-only"
 homepage="http://www.busybox.net"
 distfiles="${homepage}/downloads/busybox-${version}.tar.bz2"
@@ -17,7 +17,9 @@ _alternatives_core="
  hostname:hostname:/usr/bin/busybox
  sh:sh:/usr/bin/busybox
  vi:vi:/usr/bin/busybox
- logger:logger:/usr/bin/busybox"
+ logger:logger:/usr/bin/busybox
+ ip:ip:/usr/bin/busybox
+ tc:tc:/usr/bin/busybox"
 
 _alternatives="
  ${_alternatives_core}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Allow busybox to provide ip/tc
  2019-10-27 20:13 [PR PATCH] Allow busybox to provide ip/tc voidlinux-github
@ 2021-03-17 20:16 ` heliocat
  2021-03-17 20:17 ` heliocat
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: heliocat @ 2021-03-17 20:16 UTC (permalink / raw)
  To: ml

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

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/15836#issuecomment-801414117

Comment:
I wasn't able to replicate this failure using the above patches:

```
carbon:~/src/void-linux/void-packages/hostdir/binpkgs/testing$ sudo xbps-install -R . iproute2 busybox
Password: 

Name     Action    Version           New version            Download size
iproute2 update    5.11.0_1          5.11.0_2               - 
busybox  update    1.32.1_1          1.32.1_2               - 

Size required on disk:        3975KB
Space available on disk:        14GB

Do you want to continue? [Y/n] 

[*] Verifying package integrity
iproute2-5.11.0_2: verifying SHA256 hash...
busybox-1.32.1_2: verifying SHA256 hash...

[*] Collecting package files
iproute2-5.11.0_2: collecting files...
iproute2-5.11.0_1: collecting files...
busybox-1.32.1_2: collecting files...
busybox-1.32.1_1: collecting files...

[*] Unpacking packages
iproute2-5.11.0_1: updating to 5.11.0_2 ...
iproute2-5.11.0_2: unpacking ...
iproute2-5.11.0_2: registered 'ip' alternatives group
Creating 'ip' alternatives group symlink: ip -> /usr/bin/iproute2-ip
iproute2-5.11.0_2: registered 'tc' alternatives group
Creating 'tc' alternatives group symlink: tc -> /usr/bin/iproute2-tc
busybox-1.32.1_1: updating to 1.32.1_2 ...
Removing 'ash' alternatives group symlink: ash
busybox-1.32.1_2: unpacking ...
Creating 'ash' alternatives group symlink: ash -> /usr/bin/busybox
busybox-1.32.1_2: registered 'ip' alternatives group
busybox-1.32.1_2: registered 'tc' alternatives group

[*] Configuring unpacked packages
iproute2-5.11.0_2: configuring ...
iproute2-5.11.0_2: updated successfully.
busybox-1.32.1_2: configuring ...
busybox-1.32.1_2: updated successfully.

0 downloaded, 0 installed, 2 updated, 2 configured, 0 removed.
carbon:~/src/void-linux/void-packages/hostdir/binpkgs/testing$ readlink -f /usr/bin/ip
/usr/bin/iproute2-ip
```
```

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Allow busybox to provide ip/tc
  2019-10-27 20:13 [PR PATCH] Allow busybox to provide ip/tc voidlinux-github
  2021-03-17 20:16 ` heliocat
@ 2021-03-17 20:17 ` heliocat
  2021-03-18  3:58 ` CameronNemo
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: heliocat @ 2021-03-17 20:17 UTC (permalink / raw)
  To: ml

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

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/15836#issuecomment-801414117

Comment:
I wasn't able to replicate this failure using the above patches:

```
carbon:~/src/void-linux/void-packages/hostdir/binpkgs/testing$ sudo xbps-install -R . iproute2 busybox
Password: 

Name     Action    Version           New version            Download size
iproute2 update    5.11.0_1          5.11.0_2               - 
busybox  update    1.32.1_1          1.32.1_2               - 

Size required on disk:        3975KB
Space available on disk:        14GB

Do you want to continue? [Y/n] 

[*] Verifying package integrity
iproute2-5.11.0_2: verifying SHA256 hash...
busybox-1.32.1_2: verifying SHA256 hash...

[*] Collecting package files
iproute2-5.11.0_2: collecting files...
iproute2-5.11.0_1: collecting files...
busybox-1.32.1_2: collecting files...
busybox-1.32.1_1: collecting files...

[*] Unpacking packages
iproute2-5.11.0_1: updating to 5.11.0_2 ...
iproute2-5.11.0_2: unpacking ...
iproute2-5.11.0_2: registered 'ip' alternatives group
Creating 'ip' alternatives group symlink: ip -> /usr/bin/iproute2-ip
iproute2-5.11.0_2: registered 'tc' alternatives group
Creating 'tc' alternatives group symlink: tc -> /usr/bin/iproute2-tc
busybox-1.32.1_1: updating to 1.32.1_2 ...
Removing 'ash' alternatives group symlink: ash
busybox-1.32.1_2: unpacking ...
Creating 'ash' alternatives group symlink: ash -> /usr/bin/busybox
busybox-1.32.1_2: registered 'ip' alternatives group
busybox-1.32.1_2: registered 'tc' alternatives group

[*] Configuring unpacked packages
iproute2-5.11.0_2: configuring ...
iproute2-5.11.0_2: updated successfully.
busybox-1.32.1_2: configuring ...
busybox-1.32.1_2: updated successfully.

0 downloaded, 0 installed, 2 updated, 2 configured, 0 removed.
carbon:~/src/void-linux/void-packages/hostdir/binpkgs/testing$ readlink -f /usr/bin/ip
/usr/bin/iproute2-ip
```

Also:
```
ip
 - iproute2 (current)
  - ip:/usr/bin/iproute2-ip
 - busybox
  - ip:/usr/bin/busybox
```

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Allow busybox to provide ip/tc
  2019-10-27 20:13 [PR PATCH] Allow busybox to provide ip/tc voidlinux-github
  2021-03-17 20:16 ` heliocat
  2021-03-17 20:17 ` heliocat
@ 2021-03-18  3:58 ` CameronNemo
  2021-03-18  3:59 ` CameronNemo
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: CameronNemo @ 2021-03-18  3:58 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/15836#issuecomment-801602290

Comment:
@heliocat you need to make this test case pass: https://github.com/void-linux/xbps/blob/4a5eb8dc87cf08ad919ec6602ef5a70e8514710c/tests/xbps/xbps-alternatives/main_test.sh#L849

Currently it is set to expect failure.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Allow busybox to provide ip/tc
  2019-10-27 20:13 [PR PATCH] Allow busybox to provide ip/tc voidlinux-github
                   ` (2 preceding siblings ...)
  2021-03-18  3:58 ` CameronNemo
@ 2021-03-18  3:59 ` CameronNemo
  2021-03-18  6:52 ` heliocat
  2021-03-19  7:28 ` heliocat
  5 siblings, 0 replies; 7+ messages in thread
From: CameronNemo @ 2021-03-18  3:59 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/15836#issuecomment-801602290

Comment:
@heliocat you need to make this test case pass: https://github.com/void-linux/xbps/blob/4a5eb8dc87cf08ad919ec6602ef5a70e8514710c/tests/xbps/xbps-alternatives/main_test.sh#L849

Currently it is set to expect failure.

edit: see also https://github.com/void-linux/xbps/pull/253#issuecomment-603438860

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Allow busybox to provide ip/tc
  2019-10-27 20:13 [PR PATCH] Allow busybox to provide ip/tc voidlinux-github
                   ` (3 preceding siblings ...)
  2021-03-18  3:59 ` CameronNemo
@ 2021-03-18  6:52 ` heliocat
  2021-03-19  7:28 ` heliocat
  5 siblings, 0 replies; 7+ messages in thread
From: heliocat @ 2021-03-18  6:52 UTC (permalink / raw)
  To: ml

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

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/15836#issuecomment-801678384

Comment:
Shouldn't `test "$(readlink -f root/usr/bin/file)" = "pkg-b-file"` be `test "$(readlink root/usr/bin/file)" = "pkg-b-file"`? `realpath`/`readlink -f` will fully canonicalize the path and return an absolute which won't then pass the string equality test. I'll give the test a better pass when I've got some more time but I think there are a few logic issues in there.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Allow busybox to provide ip/tc
  2019-10-27 20:13 [PR PATCH] Allow busybox to provide ip/tc voidlinux-github
                   ` (4 preceding siblings ...)
  2021-03-18  6:52 ` heliocat
@ 2021-03-19  7:28 ` heliocat
  5 siblings, 0 replies; 7+ messages in thread
From: heliocat @ 2021-03-19  7:28 UTC (permalink / raw)
  To: ml

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

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/15836#issuecomment-802616576

Comment:
OK, I found two problems with the test and one with my own testing methodology. The two test problems are: it shouldn't call readlink -f (noted above), and the casing on pkg-b-file is inconsistent My own testing (the one that successfully upgraded busybox and iproute2 to alternatives-providing versions) was flawed because I did iproute2 in the transaction first which replaced the owned file before installing a new alternative provider. Had I let ordered things alphabetically (or let xbps-install do it automatically) I would have seen the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-19  7:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27 20:13 [PR PATCH] Allow busybox to provide ip/tc voidlinux-github
2021-03-17 20:16 ` heliocat
2021-03-17 20:17 ` heliocat
2021-03-18  3:58 ` CameronNemo
2021-03-18  3:59 ` CameronNemo
2021-03-18  6:52 ` heliocat
2021-03-19  7:28 ` heliocat

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).