Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504458 - net-misc/netifrc-0.1 - net/macchanger.sh is incompatible with net-misc/macchanger-1.6.0
Summary: net-misc/netifrc-0.1 - net/macchanger.sh is incompatible with net-misc/maccha...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-03-13 07:27 UTC by Gino McCarty
Modified: 2015-04-27 17:04 UTC (History)
6 users (show)

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


Attachments
/lib/netifrc/macchanger.sh (macchanger.sh,2.03 KB, text/plain)
2014-03-13 07:28 UTC, Gino McCarty
Details
Support macchanger-1.6 without breaking 1.5 (support-macchanger-1.6.patch,670 bytes, patch)
2014-03-24 03:33 UTC, dwfreed
Details | Diff
Support macchanger-1.6 without breaking 1.5 (support-macchanger-1.6.patch,681 bytes, patch)
2014-03-24 03:35 UTC, dwfreed
Details | Diff
correct patch (504458.patch,683 bytes, patch)
2014-04-15 18:07 UTC, Rick Farina (Zero_Chaos)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gino McCarty 2014-03-13 07:27:19 UTC
Hey all the syntax for macchanger's output is different now, I wrote a new file needs to get merged into netifrc in order to fix failed interface issues.

If you try to use netifrc-0.1 with macchanger-1.6.0 you will get failure errors.

Reproducible: Always
Comment 1 Gino McCarty 2014-03-13 07:28:32 UTC
Created attachment 372542 [details]
/lib/netifrc/macchanger.sh

New version of macchanger.sh to fix parsing errors (sorry didn't make a patch)
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-13 16:40:03 UTC
Comment on attachment 372542 [details]
/lib/netifrc/macchanger.sh

--- ./net/macchanger.sh 2014-03-13 17:37:48.482111010 +0100
+++ -   2014-03-13 17:39:50.381092521 +0100
@@ -69,13 +69,13 @@
        fi
 
        mac=$(/sbin/macchanger ${opts} "${IFACE}" \
-               | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' )
+               | sed -n -e 's/^New MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' )
        _up
 
        # Sometimes the interface needs to be up ....
        if [ -z "${mac}" ]; then
                mac=$(/sbin/macchanger ${opts} "${IFACE}" \
-               | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' )
+               | sed -n -e 's/^New MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' )
        fi
 
        if [ -z "${mac}" ]; then
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2014-03-24 03:23:40 UTC
bug exists, patch works, BUT it would break compatibility with older macchanger (if anyone cares).

"macchanger -V | head -n1" will spit out the version, if we really care to support older versions.... personally, i think RDEPEND=!<macchanger-1.6 would be fine
Comment 4 dwfreed 2014-03-24 03:33:28 UTC
Created attachment 373394 [details, diff]
Support macchanger-1.6 without breaking 1.5

Modified patch to support both 1.5 and 1.6 at the same time.  Zero_Chaos, could you test this, please?
Comment 5 dwfreed 2014-03-24 03:35:51 UTC
Created attachment 373396 [details, diff]
Support macchanger-1.6 without breaking 1.5

Fixed patch format (hopefully).
Comment 6 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-15 16:59:16 UTC
This notation doesn't appear to be valid:
\(Faked|New\)

Tested the patch, doesn't work.
Comment 7 Gino McCarty 2014-04-15 17:00:40 UTC
(In reply to Rick Farina (Zero_Chaos) from comment #6)
> This notation doesn't appear to be valid:
> \(Faked|New\)
> 
> Tested the patch, doesn't work.

Been using this for a few months now, what version of macchanger are you using?
Comment 8 Gino McCarty 2014-04-15 17:02:13 UTC
(In reply to Bombino from comment #7)
> (In reply to Rick Farina (Zero_Chaos) from comment #6)
> > This notation doesn't appear to be valid:
> > \(Faked|New\)
> > 
> > Tested the patch, doesn't work.
> 
> Been using this for a few months now, what version of macchanger are you
> using?

Actually I've been using my origonal version... 
I still have NO idea why we would even want to support both version 1.5 and 1.6? Does anyone have any idea?
why not use bump to 1.6? 

all default gentoo users already have this bump..
Comment 9 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-15 17:03:50 UTC
\(Faked\|New\) is the correct notation.
Comment 10 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-15 18:07:49 UTC
Created attachment 375024 [details, diff]
correct patch

patch to support 1.5 and 1.6 versions of macchanger
Comment 11 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-15 18:11:20 UTC
Mostly because I'm learning to git:

http://git.overlays.gentoo.org/gitweb/?p=proj/netifrc.git;a=shortlog;h=refs/heads/bug504458

Please pull this tested change.
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-04-15 18:22:40 UTC
InVCS and released as 0.2.3.

ryao: the code is fine. can you please read & try to follow the coding style next time re the comment formatting?
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-04-15 18:22:57 UTC
s/ryao/zero_chaos/ sorry.
Comment 14 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-15 21:00:37 UTC
(In reply to Robin Johnson from comment #13)
> s/ryao/zero_chaos/ sorry.

Owww, my pride....
Comment 15 Kerin Millar 2015-02-20 07:36:06 UTC
Can we get this fixed in stable netifrc, please? Also, I've proposed a patch in bug 540728 which checks the exit status of macchanger as opposed to relying on the potentially volatile results of parsing the output.
Comment 16 Toralf Förster gentoo-dev 2015-04-27 14:30:25 UTC
net-misc/netifrc-0.1