#39602 closed submission (fixed)
New port: dibbler a DHCPv6 client/server/relay
Reported by: | fclaire@… | Owned by: | larryv (Lawrence Velázquez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | mojca (Mojca Miklavec) | |
Port: | dibbler |
Description
Please find attached a Portfile of dibbler version 0.8.4 with its associated patch files.
Thanks for reviewing and committing.
Attachments (15)
Change History (25)
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-dibbler-user-config-client.tex.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-dibbler-user-features.tex.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-dibbler-user-usage.tex.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-man-dibbler-client.8.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-man-dibbler-relay.8.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-man-dibbler-server.8.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-Misc-Portable.h.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-Misc-Portable.h.in.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-scripts-notify-scripts-client-notify-bsd.sh.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-scripts-notify-scripts-server-notify.sh.diff added |
---|
comment:1 Changed 11 years ago by mf2k (Frank Schima)
comment:2 Changed 11 years ago by fclaire@…
Sorry for opening a new ticket for nothing.
How shall I merge the patchfiles into one ? Could you please point me an example of port doing this ? I didn't find any hint in the macports guide.
comment:3 follow-up: 4 Changed 11 years ago by fclaire@…
This port is working. Is the merging of patchfiles mandatory to have it committed ?
comment:4 Changed 11 years ago by larryv (Lawrence Velázquez)
Replying to fclaire@…:
This port is working. Is the merging of patchfiles mandatory to have it committed ?
No, it isn’t. Post to macports-dev to see if any committers can review and commit this.
comment:5 Changed 11 years ago by mojca (Mojca Miklavec)
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.)
Changed 11 years ago by fclaire@…
Changed 11 years ago by fclaire@…
Attachment: | patch-Port-bsd-lowlevel-bsd.c.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-examples-client.conf.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-doc-examples-server.conf.diff added |
---|
Changed 11 years ago by fclaire@…
Attachment: | patch-prefix.diff added |
---|
comment:7 Changed 11 years ago by fclaire@…
Thanks for your detailed explanation. I consolidated all the prefix-related patches into a single patch file.
So I uploaded a new Portfile and 4 patch files:
- patch-Port-bsd-lowlevel-bsd.c.diff
- patch-doc-examples-client.conf.diff
- patch-doc-examples-server.conf.diff
- patch-prefix.diff
I dont't know how to remove old patch files attached to this ticket.
Thanks for checking and committing.
comment:8 Changed 11 years ago by larryv (Lawrence Velázquez)
Owner: | changed from macports-tickets@… to larryv@… |
---|---|
Status: | new → assigned |
Version: | 2.1.3 |
I’ll commit this sometime this week.
comment:9 follow-up: 10 Changed 11 years ago by larryv (Lawrence Velázquez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed in r110826:110828. A few things:
- I used the 1.0.0 release candidate instead of 0.8.4.
- I created the StartupItem using
startupitem.executable
instead ofstartupitem.start
and friends to take better advantage of launchd. - I used notes instead of the configuration file recipe because the example configuration files are useless as defaults.
- The build succeeds on Snow Leopard and Mountain Lion but not on Lion. I take it that this attachment was supposed to “fix” that, but merely commenting out the check seems like a very haphazard workaround. Do you have a Lion machine? I’d like to inspect some of the system headers.
comment:10 Changed 11 years ago by fclaire@…
Replying to larryv@…:
Committed in r110826:110828.
Thanks a lot for that.
A few things:
- I used the 1.0.0 release candidate instead of 0.8.4.
Cool
- I created the StartupItem using
startupitem.executable
instead ofstartupitem.start
and friends to take better advantage of launchd.
I didn't know startupitem.executable
exist, thanks for the trick.
- I used notes instead of the configuration file recipe because the example configuration files are useless as defaults.
OK
- The build succeeds on Snow Leopard and Mountain Lion but not on Lion. I take it that this attachment was supposed to “fix” that, but merely commenting out the check seems like a very haphazard workaround. Do you have a Lion machine? I’d like to inspect some of the system headers.
I only have Mountain Lion machines. Indeed it would be nice to have dibbler running on Lion but I propose to just wait for a user to ask for it before investing more time into this port.
There was no reason to open a new ticket, you should have just attached this to the old ticket. Also, you can patch more than one file with a single patchfile.