Bug 187363 - [new port] net/macchanger: GNU macchanger port for the FreeBSD system
Summary: [new port] net/macchanger: GNU macchanger port for the FreeBSD system
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-08 08:30 UTC by clutton
Modified: 2014-10-26 18:21 UTC (History)
3 users (show)

See Also:


Attachments
file.shar (11.04 KB, text/plain)
2014-03-08 08:30 UTC, clutton
no flags Details
build log (9.96 KB, text/plain)
2014-08-29 18:14 UTC, clutton
no flags Details
build log (11.28 KB, text/plain)
2014-08-30 17:51 UTC, clutton
no flags Details
new shar (10.91 KB, text/plain)
2014-08-30 17:51 UTC, clutton
no flags Details
1.7.0 version (10.77 KB, text/plain)
2014-10-19 02:36 UTC, clutton
no flags Details
8.x fix (10.79 KB, text/plain)
2014-10-22 03:05 UTC, clutton
no flags Details
info patch (425 bytes, patch)
2014-10-25 23:42 UTC, clutton
no flags Details | Diff
man patch (367 bytes, patch)
2014-10-25 23:42 UTC, clutton
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description clutton 2014-03-08 08:30:00 UTC
GNU macchanger is a good tool because of it's mac's addresses database.

The pool request https://github.com/alobbs/macchanger/pull/9

I hope patches will be accepted in new versions, for now I'd like to start by providing a working version.

One feature was commented, because I don't know how to implement it now...

Fix: Patch attached with submission follows:
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-07 14:39:22 UTC
Hi, if you are still interested in having this port in FreeBSD, it may (or may not) need to be reworked to support stage, and it may need updating to other newer conventions such as "USES" which is expanding all time.
For staging, see http://lists.freebsd.org/pipermail/freebsd-ports-announce/2014-May/000080.html


Additionally, you need to provide some sort of quality assurance.    
In order of preference, we are looking for:

1) "poudriere testport" or "poudriere bulk -t" logs
2) Redports or tinderbox logs

Please provide an updated shar file and attach a test log.  Alternatively, please indicate if you are no longer interested in having this software in the Ports Collection and that we can close the PR.

Thanks!
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-24 19:02:14 UTC
port is staged, doesn't seem to have any bitrot.  I does use pkg-plist for just a couple of files so that's an issue.  A small fix and a test log would fast-track this.
Comment 3 clutton 2014-08-29 18:14:05 UTC
(In reply to John Marino from comment #2)
> port is staged, doesn't seem to have any bitrot.  I does use pkg-plist for
> just a couple of files so that's an issue.  A small fix and a test log would
> fast-track this.

Sorry I didn't understand, why using pkg-plist for just a couple of files an issue? And what I have to do?
Comment 4 clutton 2014-08-29 18:14:45 UTC
Created attachment 146493 [details]
build log
Comment 5 clutton 2014-08-29 18:19:44 UTC
(In reply to John Marino from comment #2)
> port is staged, doesn't seem to have any bitrot.  I does use pkg-plist for
> just a couple of files so that's an issue.  A small fix and a test log would
> fast-track this.


I removed one feature from the original macchanger during porting.
I just don't know how to implement it on freebsd. And author doesn't want to accept my patches without complete features support.
Comment 6 John Marino freebsd_committer freebsd_triage 2014-08-29 20:03:41 UTC
(In reply to clutton from comment #3)
> (In reply to John Marino from comment #2)
> > port is staged, doesn't seem to have any bitrot.  I does use pkg-plist for
> > just a couple of files so that's an issue.  A small fix and a test log would
> > fast-track this.
> 
> Sorry I didn't understand, why using pkg-plist for just a couple of files an
> issue? And what I have to do?


There is a policy that pkg-plist with 5 files or less needs to be embedded in Makefile using PLIST_FILES mechanism.  Grep for PLIST_FILES for example.  I don't have a reference in porter's handbook but it' probably there too.
Comment 7 John Marino freebsd_committer freebsd_triage 2014-08-29 20:04:58 UTC
regarding poudriere log, same comment as your other PR.  You didn't use the "-t" option I don't believe.
Comment 8 clutton 2014-08-29 22:34:02 UTC
(In reply to John Marino from comment #6)
> (In reply to clutton from comment #3)
> > (In reply to John Marino from comment #2)
> > > port is staged, doesn't seem to have any bitrot.  I does use pkg-plist for
> > > just a couple of files so that's an issue.  A small fix and a test log would
> > > fast-track this.
> > 
> > Sorry I didn't understand, why using pkg-plist for just a couple of files an
> > issue? And what I have to do?
> 
> 
> There is a policy that pkg-plist with 5 files or less needs to be embedded
> in Makefile using PLIST_FILES mechanism.  Grep for PLIST_FILES for example. 
> I don't have a reference in porter's handbook but it' probably there too.

I know how to use plist from Makefile. Just didn't know about the policy...
We'll do shortly.
Comment 9 clutton 2014-08-30 17:51:37 UTC
Created attachment 146544 [details]
build log
Comment 10 clutton 2014-08-30 17:51:59 UTC
Created attachment 146545 [details]
new shar
Comment 11 John Marino freebsd_committer freebsd_triage 2014-08-30 18:36:34 UTC
looks good, lets promote this.
Comment 12 Kurt Jaeger freebsd_committer freebsd_triage 2014-09-19 18:53:56 UTC
(In reply to clutton from comment #9)
> Created attachment 146544 [details]
> build log

poudriere build on 8.4 i386 fails, see

http://people.freebsd.org/~pi/logs/net__macchanger-84i.txt

Any ideas ?
Comment 13 John Marino freebsd_committer freebsd_triage 2014-09-20 14:44:12 UTC
if it works on all other platforms including 8.4 amd64, I'd just mark it IGNORE on 8.4-i386.  It looks like the platform itself can't support it.
Comment 14 Kurt Jaeger freebsd_committer freebsd_triage 2014-09-20 15:38:56 UTC
(In reply to John Marino from comment #13)
> if it works on all other platforms including 8.4 amd64, I'd just mark it
> IGNORE on 8.4-i386.  It looks like the platform itself can't support it.

It does not build on 8.4-amd64, either:

http://people.freebsd.org/~pi/logs/84a-macchanger.txt
Comment 15 clutton 2014-09-20 16:15:49 UTC
(In reply to Kurt Jaeger from comment #14)
> (In reply to John Marino from comment #13)
> > if it works on all other platforms including 8.4 amd64, I'd just mark it
> > IGNORE on 8.4-i386.  It looks like the platform itself can't support it.
> 
> It does not build on 8.4-amd64, either:
> 
> http://people.freebsd.org/~pi/logs/84a-macchanger.txt

Since I ported this I can make it work on 8-x platform too.

What I need more is implementing last feature, reverting to the original MAC address. And I don't know how to do this on FreeBSD...

How can I read the factory MAC address when it was already changed?
Comment 16 Kurt Jaeger freebsd_committer freebsd_triage 2014-09-21 06:49:11 UTC
> What I need more is implementing last feature, reverting to the original MAC
> address. And I don't know how to do this on FreeBSD...
> How can I read the factory MAC address when it was already changed?

It's probably best to ask this on

https://lists.freebsd.org/pipermail/freebsd-net/

I'll check how to IGNORE on 8.x in the meantime.
Comment 17 clutton 2014-09-21 12:07:20 UTC
(In reply to Kurt Jaeger from comment #16)
> > What I need more is implementing last feature, reverting to the original MAC
> > address. And I don't know how to do this on FreeBSD...
> > How can I read the factory MAC address when it was already changed?
> 
> It's probably best to ask this on
> 
> https://lists.freebsd.org/pipermail/freebsd-net/
> 
> I'll check how to IGNORE on 8.x in the meantime.

Wait, may be it's better to deliver the whole thing...
Comment 18 John Ten 2014-10-03 12:55:54 UTC
Hi,

Finding out the original MAC (ethtool style) can be done using:

sysctl dev.XX.Y.nvm=1  (e.g sysctl dev.em.0.nvm=1)
sysctl dev.XX.Y.debug=1 (older FreeBSD releases)

Output in dmesg, or syslog contains the original MAC, at offset 0x0000.


(In reply to clutton from comment #17)
> (In reply to Kurt Jaeger from comment #16)
> > > What I need more is implementing last feature, reverting to the original MAC
> > > address. And I don't know how to do this on FreeBSD...
> > > How can I read the factory MAC address when it was already changed?
> > 
> > It's probably best to ask this on
> > 
> > https://lists.freebsd.org/pipermail/freebsd-net/
> > 
> > I'll check how to IGNORE on 8.x in the meantime.
> 
> Wait, may be it's better to deliver the whole thing...
Comment 19 clutton 2014-10-03 20:55:43 UTC
(In reply to John Ten from comment #18)
> Hi,
> 
> Finding out the original MAC (ethtool style) can be done using:
> 
> sysctl dev.XX.Y.nvm=1  (e.g sysctl dev.em.0.nvm=1)
> sysctl dev.XX.Y.debug=1 (older FreeBSD releases)
> 
> Output in dmesg, or syslog contains the original MAC, at offset 0x0000.
> 
> 
> (In reply to clutton from comment #17)
> > (In reply to Kurt Jaeger from comment #16)
> > > > What I need more is implementing last feature, reverting to the original MAC
> > > > address. And I don't know how to do this on FreeBSD...
> > > > How can I read the factory MAC address when it was already changed?
> > > 
> > > It's probably best to ask this on
> > > 
> > > https://lists.freebsd.org/pipermail/freebsd-net/
> > > 
> > > I'll check how to IGNORE on 8.x in the meantime.
> > 
> > Wait, may be it's better to deliver the whole thing...

I see, thank you very much! I'll find some time soon to finish it.
Comment 20 clutton 2014-10-10 10:39:58 UTC
(In reply to John Ten from comment #18)
> Hi,
> 
> Finding out the original MAC (ethtool style) can be done using:
> 
> sysctl dev.XX.Y.nvm=1  (e.g sysctl dev.em.0.nvm=1)
> sysctl dev.XX.Y.debug=1 (older FreeBSD releases)
> 
> Output in dmesg, or syslog contains the original MAC, at offset 0x0000.
> 
> 
> (In reply to clutton from comment #17)
> > (In reply to Kurt Jaeger from comment #16)
> > > > What I need more is implementing last feature, reverting to the original MAC
> > > > address. And I don't know how to do this on FreeBSD...
> > > > How can I read the factory MAC address when it was already changed?
> > > 
> > > It's probably best to ask this on
> > > 
> > > https://lists.freebsd.org/pipermail/freebsd-net/
> > > 
> > > I'll check how to IGNORE on 8.x in the meantime.
> > 
> > Wait, may be it's better to deliver the whole thing...

Apparently it works only for 3 drivers, em, and two others. Nevertheless thank you for your response.
Comment 21 clutton 2014-10-19 02:36:14 UTC
(In reply to Kurt Jaeger from comment #12)
> (In reply to clutton from comment #9)
> > Created attachment 146544 [details]
> > build log
> 
> poudriere build on 8.4 i386 fails, see
> 
> http://people.freebsd.org/~pi/logs/net__macchanger-84i.txt
> 
> Any ideas ?

It seems 8.4 platform can't see the #include <config> from poudriere...
Somehow it can't see the AF_PACKET declaration from config.h, which was successfully declared.

Before I'll dig further, could you please try not to use poudriere? Just 8x. Unfortunately I don't have 8, only CURRENT and 10...

New version attached...
Comment 22 clutton 2014-10-19 02:36:55 UTC
Created attachment 148455 [details]
1.7.0 version
Comment 23 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-19 10:40:59 UTC
> It seems 8.4 platform can't see the #include <config> from poudriere...
> Somehow it can't see the AF_PACKET declaration from config.h, which was
> successfully declared.
> 
> Before I'll dig further, could you please try not to use poudriere? Just 8x.
> Unfortunately I don't have 8, only CURRENT and 10...

I've tried it on some 8.4p7-amd64 host, see

http://people.freebsd.org/logs/macchanger-84amd.txt

It has issues...
Comment 24 Rodrigo Osorio freebsd_committer freebsd_triage 2014-10-19 11:00:52 UTC
You probably means :
https://people.freebsd.org/~pi/logs/macchanger-84amd.txt
Comment 25 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-19 11:11:29 UTC
(In reply to Rodrigo Osorio from comment #24)
> You probably means :
> https://people.freebsd.org/~pi/logs/macchanger-84amd.txt

Yes 8-) sorry, typo...
Comment 26 clutton 2014-10-20 01:09:16 UTC
(In reply to Kurt Jaeger from comment #25)
> (In reply to Rodrigo Osorio from comment #24)
> > You probably means :
> > https://people.freebsd.org/~pi/logs/macchanger-84amd.txt
> 
> Yes 8-) sorry, typo...

Don't use autogen.sh, at least run «make configure» from ports, at most don't do anything you are not supposed to do as a port user :). It seems you've missed «make patch» step.
Comment 27 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-20 16:36:18 UTC
Hi!

> Don't use autogen.sh, at least run «make configure» from ports, at most
> don't do anything you are not supposed to do as a port user :). It seems
> you've missed «make patch» step.

The host I tested it is a production host, I'm not going to update the ports
infrastructure on that for the sake of tests 8-}
Comment 28 clutton 2014-10-20 19:26:39 UTC
(In reply to Kurt Jaeger from comment #27)
> Hi!
> 
> > Don't use autogen.sh, at least run «make configure» from ports, at most
> > don't do anything you are not supposed to do as a port user :). It seems
> > you've missed «make patch» step.
> 
> The host I tested it is a production host, I'm not going to update the ports
> infrastructure on that for the sake of tests 8-}

You don't have to update your ports.
Looking at your log https://people.freebsd.org/~pi/logs/macchanger-84amd.txt I can see that the make patch and/or make configure steps were missing.

Just go to the port directory and type make. It will do the make patch step, and then the building step. Do not go to workdir, do  not run any scripts from workdir.

Having any difficulties contact me by email.
Comment 29 clutton 2014-10-22 03:05:21 UTC
Created attachment 148556 [details]
8.x fix

I wouldn't attach logs for every single jail build, because there are a plenty of them head, 10, 9, 8, 386/64. If you need them I will.
Comment 30 commit-hook freebsd_committer freebsd_triage 2014-10-22 05:35:29 UTC
A commit references this bug:

Author: pi
Date: Wed Oct 22 05:34:36 UTC 2014
New revision: 371342
URL: https://svnweb.freebsd.org/changeset/ports/371342

Log:
  New port: net/macchanger

  GNU MAC Changer is an utility that makes the maniputation of MAC addresses of
  network interfaces easier.

  WWW: http://www.gnu.org/software/macchanger

  PR:		187363
  Submitted by:	clutton@zoho.com

Changes:
  head/net/macchanger/
  head/net/macchanger/Makefile
  head/net/macchanger/distinfo
  head/net/macchanger/files/
  head/net/macchanger/files/patch-configure.ac
  head/net/macchanger/files/patch-src_main.c
  head/net/macchanger/files/patch-src_netinfo.c
  head/net/macchanger/pkg-descr
Comment 31 commit-hook freebsd_committer freebsd_triage 2014-10-22 05:35:30 UTC
A commit references this bug:

Author: pi
Date: Wed Oct 22 05:35:18 UTC 2014
New revision: 371343
URL: https://svnweb.freebsd.org/changeset/ports/371343

Log:
  net/macchanger: Add to the build

  PR:		187363
  Pointy hat to:	myself

Changes:
  head/net/Makefile
Comment 32 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-22 05:38:03 UTC
Committed, thanks. rodrigo: sorry, I missed that the PR was assigned to you 8-(

To the submitter: Can you try to push your patches upstream ? And maybe
provide a man page ? Thanks!
Comment 33 clutton 2014-10-22 06:45:52 UTC
(In reply to Kurt Jaeger from comment #32)
> Committed, thanks. rodrigo: sorry, I missed that the PR was assigned to you
> 8-(
> 
> To the submitter: Can you try to push your patches upstream ? And maybe
> provide a man page ? Thanks!

manpage is here. man 1 macchanger, but unfortunately the section about permanent address doesn't work in FreeBSD case, should I remove that section from man and info pages? I've just realized this inconsistency, the code is cleaned well, I mean --help and etc. But docs still has this feature.

About pushing upstream, it's not complete porting, one feature was removed, and author didn't like that.
Comment 34 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-25 07:06:43 UTC
> > To the submitter: Can you try to push your patches upstream ? And maybe
> > provide a man page ? Thanks!

> manpage is here. man 1 macchanger, but unfortunately the section about
> permanent address doesn't work in FreeBSD case, should I remove that section
> from man and info pages?

If you mark it as "does not work on fbsd", that would be appropriate, yes.

> I've just realized this inconsistency, the code is
> cleaned well, I mean --help and etc. But docs still has this feature.
> 
> About pushing upstream, it's not complete porting, one feature was removed,
> and author didn't like that.

Which feature was removed and why didn't he like it ?
Comment 35 clutton 2014-10-25 23:42:19 UTC
Created attachment 148653 [details]
info patch
Comment 36 clutton 2014-10-25 23:42:45 UTC
Created attachment 148654 [details]
man patch
Comment 37 clutton 2014-10-25 23:46:54 UTC
(In reply to Kurt Jaeger from comment #34)
> > > To the submitter: Can you try to push your patches upstream ? And maybe
> > > provide a man page ? Thanks!
> 
> > manpage is here. man 1 macchanger, but unfortunately the section about
> > permanent address doesn't work in FreeBSD case, should I remove that section
> > from man and info pages?
> 
> If you mark it as "does not work on fbsd", that would be appropriate, yes.
> 
> > I've just realized this inconsistency, the code is
> > cleaned well, I mean --help and etc. But docs still has this feature.
> > 
> > About pushing upstream, it's not complete porting, one feature was removed,
> > and author didn't like that.
> 
> Which feature was removed and why didn't he like it ?

Two patches submitted, put them into net/macchanger/files directory.

Removed feature was reset to permanent mac address. Why he didn't like it? He wanted full port, and then stop responding.
Comment 38 commit-hook freebsd_committer freebsd_triage 2014-10-26 18:21:05 UTC
A commit references this bug:

Author: pi
Date: Sun Oct 26 18:20:08 UTC 2014
New revision: 371520
URL: https://svnweb.freebsd.org/changeset/ports/371520

Log:
  net/macchanger: fix man page, info file to reflect change to program

  PR:		187363
  Submitted by:	clutton@zoho.com (maintainer)

Changes:
  head/net/macchanger/Makefile
  head/net/macchanger/files/patch-doc-macchanger.texi
  head/net/macchanger/files/patch-macchanger.1
Comment 39 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-26 18:21:51 UTC
Committed, thanks!