Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 889922 - net-misc/netifrc: adapt macchanger.sh to look in /usr/bin (was: net-analyzer/macchanger-1.7.0_p5_p4 -> p5_p4-r1 moves /sbin/macchanger and/or link needed for netifrc script)
Summary: net-misc/netifrc: adapt macchanger.sh to look in /usr/bin (was: net-analyzer/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: netifrc Team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 906089
Blocks:
  Show dependency tree
 
Reported: 2023-01-06 07:06 UTC by 7e3
Modified: 2024-02-20 05:06 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
possible patch (file_889922.txt,780 bytes, patch)
2023-01-06 07:41 UTC, 7e3
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 7e3 2023-01-06 07:06:53 UTC
Seemingly from net-analyzer/macchanger-1.7.0_p5_p4 to net-analyzer/macchanger-1.7.0_p5_p4-r1 relocated binary from /sbin/macchanger to /usr/bin/macchanger (previously a softlink back to sbin) which stops the netifrc /lib/netifrc/net/macchanger.sh script from working which stops netifrc starting/restarting interface

Reproducible: Always

Steps to Reproduce:
1.Restart/start network interface using netifrc script (net-misc/netifrc 0.7.3)
2.macchanger syntax in /etc/conf.d/net e.g:mac_wlpXsX="random-ending"
3.Using latest macchanger version 1.7.0_p5_p4-r1
Actual Results:  
Rather than macchanger being executed via requisite config in /etc/conf.d/net it gives an error suggesting install macchanger and fails to start/restart interface

Error 1:
"Jan  6 12:00:00 localhost /etc/init.d/net.wlpXsX[10001]: For changing MAC addresses, emerge net-analyzer/macchanger"

and
Error 2:
"Jan  6 12:00:01 localhost /etc/init.d/net.wlpXsX[10003]: ERROR: net.wlpXsX failed to start"

Expected Results:  
netifrc script to restart network interface while using macchanger functionality requested in config of /etc/conf.d/net

netifrc macchanger.sh script either needs to point to /usr/bin/macchanger rather than /sbin/macchanger (twice in script, one producing error above) or a link has to be made from /sbin/macchanger to /usr/bin/macchanger (probably not likely as it was moved out of 'sbin' for a reason?) or install location change
Comment 1 7e3 2023-01-06 07:41:22 UTC
Created attachment 847622 [details, diff]
possible patch

Possible patch to /lib/netifrc/net/macchanger.sh
Comment 2 Larry the Git Cow gentoo-dev 2023-01-06 08:00:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=492cbcf30217641a3625cbf8c53e00c27ae0c369

commit 492cbcf30217641a3625cbf8c53e00c27ae0c369
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-06 07:59:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-06 08:00:01 +0000

    net-analyzer/macchanger: add USE=split-usr for netifrc
    
    Fixes: 955b84bad9b4a6003e132afd18b557215534eb73
    Bug: https://bugs.gentoo.org/889922
    Bug: https://bugs.gentoo.org/886121
    Signed-off-by: Sam James <sam@gentoo.org>

 ...7.0_p5_p4-r1.ebuild => macchanger-1.7.0_p5_p4-r2.ebuild} | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
Comment 3 Francesco Riosa 2023-01-07 11:03:47 UTC
Additionally the package fail to emerge in merged usr with the following error message:

* Package 'net-analyzer/macchanger-1.7.0_p5_p4-r2' has internal
* collisions between non-identical files (located in separate
* directories in the installation image (${D}) corresponding to merged
* directories in the target filesystem (${ROOT})):
*
*         /usr/bin/macchanger
*                 /sbin/macchanger
*                 /usr/bin/macchanger
*                         Differences: type, mode
*
* Package 'net-analyzer/macchanger-1.7.0_p5_p4-r2' NOT merged due to
* internal collisions between non-identical files. If necessary, refer
* to your elog messages for the whole content of the above message.
*
* The following package has failed to build, install, or execute postinst:
*
*  (net-analyzer/macchanger-1.7.0_p5_p4-r2:0/0::gentoo, ebuild scheduled for merge), Log file:
*   '/var/log/portage/build/net-analyzer/macchanger-1.7.0_p5_p4-r2:20230107-092712.log.gz'
*
* After world updates, it is important to remove obsolete packages with
* emerge --depclean. Refer to `man emerge` for more information.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-07 11:06:21 UTC
Sorry, right, I'll fix that bit again.
Comment 5 Larry the Git Cow gentoo-dev 2023-01-15 01:53:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=bd50c2ce076f2a6a5b0f884287a7940cd29cc6db

commit bd50c2ce076f2a6a5b0f884287a7940cd29cc6db
Author:     7e3f <122086774+7e3f@users.noreply.github.com>
AuthorDate: 2023-01-06 10:20:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-15 01:52:46 +0000

    net/macchanger.sh: Update path to macchanger to /usr
    
    Proposing changes in diff from bug #889922, net-analyzer/macchanger-1.7.0_p5_p4
    to net-analyzer/macchanger-1.7.0_p5_p4-r1 changed softlink and binary location due
    to #886121.
    
    There was a temporary tidy up in net-analyzer/macchanger-1.7.0_p5_p4-r2, but
    proposing macchanger.sh change to allow netifrc to work with macchanger
    binary location.
    
    Bug: https://bugs.gentoo.org/886121
    Bug: https://bugs.gentoo.org/889922
    Closes: https://github.com/gentoo/netifrc/pull/42
    Signed-off-by: Sam James <sam@gentoo.org>

 net/macchanger.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-15 01:57:25 UTC
(In reply to Francesco Riosa from comment #3)
> Additionally the package fail to emerge in merged usr with the following
> error message:
>

I can't reproduce this. Please include the full build.log. If you're on a merged-usr system, please make sure that split-usr is off and masked (the profiles do this).
Comment 7 Larry the Git Cow gentoo-dev 2023-04-17 04:41:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04e95bd55dcb4d638c5b8814c994904308926598

commit 04e95bd55dcb4d638c5b8814c994904308926598
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-17 04:39:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-17 04:41:25 +0000

    net-misc/netifrc: add 0.7.4
    
    Closes: https://bugs.gentoo.org/904422
    Closes: https://bugs.gentoo.org/893290
    Closes: https://bugs.gentoo.org/890238
    Closes: https://bugs.gentoo.org/889922
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/netifrc/Manifest             |  1 +
 net-misc/netifrc/netifrc-0.7.4.ebuild | 74 +++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)
Comment 8 Larry the Git Cow gentoo-dev 2023-09-10 15:15:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=75b7229ffa861c8472abe64733a657409b5d929d

commit 75b7229ffa861c8472abe64733a657409b5d929d
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-05-30 20:12:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-10 15:14:49 +0000

    Remove absolute paths from commands
    
    Bug: https://bugs.gentoo.org/889922
    Bug: https://bugs.gentoo.org/893290
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 net/adsl.sh              |  8 ++++----
 net/apipa.sh             |  2 +-
 net/arping.sh            |  4 ++--
 net/bonding.sh           |  4 ++--
 net/clip.sh              |  6 +++---
 net/dhclient.sh          |  8 ++++----
 net/dhclientv6.sh        |  8 ++++----
 net/ifconfig.sh.BSD.in   |  2 +-
 net/ifconfig.sh.Linux.in |  2 +-
 net/ifplugd.sh           |  6 +++---
 net/ifwatchd.sh.BSD.in   |  8 ++++----
 net/ipppd.sh             |  6 +++---
 net/iw.sh                |  2 +-
 net/iwconfig.sh.BSD.in   |  2 +-
 net/iwconfig.sh.Linux.in |  2 +-
 net/macchanger.sh        |  4 ++--
 net/netplugd.sh          |  6 +++---
 net/pppd.sh              | 12 ++++++------
 net/pump.sh              |  4 ++--
 net/system.sh            |  2 +-
 net/udhcpc.sh.Linux.in   | 10 +++++-----
 net/wireguard.sh         |  6 +++---
 net/wpa_supplicant.sh    | 13 ++-----------
 sh/udhcpc-hook.sh.in     |  4 ++--
 24 files changed, 61 insertions(+), 70 deletions(-)
Comment 9 Larry the Git Cow gentoo-dev 2023-09-10 15:21:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=878d23322e0a0d119242da7dd193cf34a92e9985

commit 878d23322e0a0d119242da7dd193cf34a92e9985
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-10 15:20:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-10 15:20:59 +0000

    net-misc/netifrc: add 0.7.6
    
    Bug: https://bugs.gentoo.org/889922
    Bug: https://bugs.gentoo.org/893290
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/netifrc/Manifest             |  1 +
 net-misc/netifrc/netifrc-0.7.6.ebuild | 78 +++++++++++++++++++++++++++++++++++
 net-misc/netifrc/netifrc-9999.ebuild  | 18 ++++----
 3 files changed, 90 insertions(+), 7 deletions(-)
Comment 10 Larry the Git Cow gentoo-dev 2024-02-20 05:06:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69bfc9dbf66cf5b21f0c1a9d0b5de9b24cda5d87

commit 69bfc9dbf66cf5b21f0c1a9d0b5de9b24cda5d87
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-20 04:58:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-20 04:58:57 +0000

    net-analyzer/macchanger: drop USE=split-usr
    
    Fixed netifrc has been stable for a while.
    
    Bug: https://bugs.gentoo.org/889922
    Signed-off-by: Sam James <sam@gentoo.org>

 .../macchanger/macchanger-1.7.0_p5_p4-r3.ebuild    | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)