[MacPorts] #39602: New port: dibbler a DHCPv6 client/server/relay

MacPorts noreply at macports.org
Thu Jul 25 09:40:53 PDT 2013


#39602: New port: dibbler a DHCPv6 client/server/relay
-------------------------+--------------------------------
  Reporter:  fclaire@…   |      Owner:  macports-tickets@…
      Type:  submission  |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.1.3
Resolution:              |   Keywords:
      Port:  dibbler     |
-------------------------+--------------------------------

Comment (by mojca@…):

 Just curious: why are you patching the {{{tex}}} files?

 I get these warnings:
 {{{
 --->  Applying patch-Port-bsd-lowlevel-bsd.c.diff
 patching file Port-bsd/lowlevel-bsd.c
 Hunk #2 succeeded at 329 (offset 1 line).
 Hunk #3 succeeded at 492 (offset 1 line).
 Hunk #4 succeeded at 510 (offset 1 line).
 --->  Applying patch-Misc-Portable.h.diff
 patching file Misc/Portable.h
 Hunk #1 succeeded at 161 (offset 3 lines).
 --->  Applying patch-Misc-Portable.h.in.diff
 patching file Misc/Portable.h.in
 Hunk #1 succeeded at 161 (offset 3 lines).
 --->  Applying patch-doc-dibbler-user-config-client.tex.diff
 patching file doc/dibbler-user-config-client.tex
 --->  Applying patch-doc-dibbler-user-features.tex.diff
 patching file doc/dibbler-user-features.tex
 Hunk #1 succeeded at 1282 (offset 68 lines).
 Hunk #2 succeeded at 1337 (offset 68 lines).
 Hunk #3 succeeded at 1886 (offset 68 lines).
 }}}
 which probably need a fix, but apart from a gazzilion of compiler
 warnings, the port compiles and installs fine, I didn't test the
 functionality. The Portfile and patches looks ok to me as well.

 I'm more of a novice MacPorts user, but I can commit this if no other
 experienced developer is willing to step in.

 To answer your question about merging patchfiles into one. You are
 basically patching more or less just the prefix other than two patches,
 one in {{{Port-bsd/lowlevel-bsd.c}}} and the other
 {{{
 -iface "eth0" {
 +iface "en0" {
 }}}
 It's up to you how you organise the patches (the way you do it now is not
 wrong), but you could create a single file, say {{{patch-prefix.diff}}}
 with more or less all the contents combined. The following could be a
 single file for example (plus all the other patches):
 {{{
 --- doc/examples/client.conf.orig
 +++ doc/examples/client.conf
 @@ -21,7 +21,7 @@
  log-level 7

  # Uncomment this line to run script every time response is received
 -# script "/var/lib/dibbler/client-notify.sh"
 +# script "@@PREFIX@@/var/lib/dibbler/client-notify.sh"


  # Current Dibbler release adds obtained addresses with /64 prefix.
 Although
 --- doc/man/dibbler-client.8.orig
 +++ doc/man/dibbler-client.8
 @@ -76,8 +76,8 @@
  More examples can be found in the User's Guide.

  .SH FILES
 -All files are created in the /var/lib/dibbler directory. Dibbler
 -client reads /var/lib/dibbler/client.conf file. During operation,
 +All files are created in the @@PREFIX@@/var/lib/dibbler directory.
 Dibbler
 +client reads @@PREFIX@@/var/lib/dibbler/client.conf file. During
 operation,
  Dibbler saves various file in that directory. After reception of the
  DNS servers or domain informations, they are added to the
  /etc/resolv.conf file. After shutdown, that information is removed
 --- doc/man/dibbler-relay.8.orig
 +++ doc/man/dibbler-relay.8
 @@ -93,9 +93,9 @@
  .fi

  .SH FILES
 -All files are created in the /var/lib/dibbler directory. During
 operation,
 +All files are created in the @@PREFIX@@/var/lib/dibbler directory. During
 operation,
  Dibbler saves various file in that directory. Dibbler relay reads
 -/etc/dibbler/relay.conf file. Log file is named client.log.
 +@@PREFIX@@/etc/dibbler/relay.conf file. Log file is named client.log.

  .SH STANDARDS
  This implementation aims at conformance to the following standards:
 }}}
 and then you could add two other patch files, one for {{{en0}}} and the
 other one with the first two patches in {{{Port-bsd/lowlevel-bsd.c}}}.

 Unrelated to what I mentioned above you could do the following to simplify
 downloads of a large number of single files:
 {{{
 svn co --depth=empty
 https://svn.macports.org/repository/macports/trunk/dports/net
 cd net
 mkdir dibbler
 # put your files there
 # and add them to svn
 svn add dibbler
 # create a single file with the patch
 svn diff > dibbler.patch
 }}}
 but that's just to assist committers so that they don't need to press the
 download link twenty times. It doesn't change anything with respect to
 what gets committed at the end and it is not a requirement.

 Anyway, in the long run I would suggest you to request some changes
 upstream to avoid the need for all these patches. The lack of support for
 changing the prefix is something that a decent piece of software should
 support. It would also make sense to report all the compiler warning.
 Neither of this is necessary to include the port to MacPorts, but it makes
 a lot of sense in the long run and significantly decreases the burden of
 the maintainer. (I usually use git to re-apply the patches for the next
 release to avoid those offsets in patch files, but it really helps if the
 software is written well enough to avoid the need for any patching
 altogether.)

-- 
Ticket URL: <https://trac.macports.org/ticket/39602#comment:5>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list