Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#15551 closed update (fixed)

Patch updating dnsmasq to 2.42

Reported by: dgilman (David Gilman) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: dnsmasq Cc: jmroot (Joshua Root), simon@…
Port:

Description

Attached are patches against the port for dnsmasq to bump to version 2.42. I've also added a startupitem to the Portfile.

There is no maintainer for this port.

One question though: the package by default installs an example config file. I think it would be appropriate to remind the user to set this up before loading the package into launchd. What would be the best way to do this?

(macports is really cool, i had no idea about this startupitem option until just a bit ago.)

Attachments (6)

patch-Portfile.diff (1.2 KB) - added by dgilman (David Gilman) 16 years ago.
diff of the portfile
patch-Makefile.diff (580 bytes) - added by dgilman (David Gilman) 16 years ago.
patch for the makefile
patch-config.h.diff (859 bytes) - added by dgilman (David Gilman) 16 years ago.
patch for an include file
patch-Portfile.2.diff (1.1 KB) - added by davidgilman1+macports@… 16 years ago.
v2 Portfile with post-activate
patch-Portfile.3.diff (1.1 KB) - added by davidgilman1+macports@… 16 years ago.
3rd revision of proposed portfile
patch-config.h.3.diff (1.5 KB) - added by davidgilman1+macports@… 16 years ago.
3rd revision of proposed config.h patch

Download all attachments as: .zip

Change History (13)

Changed 16 years ago by dgilman (David Gilman)

Attachment: patch-Portfile.diff added

diff of the portfile

Changed 16 years ago by dgilman (David Gilman)

Attachment: patch-Makefile.diff added

patch for the makefile

Changed 16 years ago by dgilman (David Gilman)

Attachment: patch-config.h.diff added

patch for an include file

comment:1 Changed 16 years ago by dgilman (David Gilman)

Cc: davidgilman1@… added

Cc Me!

comment:2 Changed 16 years ago by jmroot (Joshua Root)

Cc: davidgilman1@… removed
Milestone: Port SubmissionsPort Updates

See the squid port for an example of how to handle generating a real config file from a sample one only when the former doesn't exist. Also, please remove the trailing whitespace from the long_description (port lint should warn about that).

Changed 16 years ago by davidgilman1+macports@…

Attachment: patch-Portfile.2.diff added

v2 Portfile with post-activate

comment:3 Changed 16 years ago by davidgilman1+macports@…

Ok, updated the portfile with the post-activate stuff for the config file. The default configuration for dnsmasq is to read and poll /etc/resolv.conf for nameservers. MacOS X updates this file by itself.

comment:4 Changed 16 years ago by jmroot (Joshua Root)

Cc: jmr@… added

The config.h patch will need to be changed. MacPorts also works on platforms where __APPLE__ is not defined, and files should still be installed into $prefix on them.

In the portfile, you don't need a foreach loop for one file. This will do:

post-activate {
    # Make sure initial conf file is present and setup correctly
    set f dnsmasq.conf
    if {![file exists ${prefix}/etc/${f}]} {
        file copy ${prefix}/etc/${f}.example \
            ${prefix}/etc/${f}
    }
}

I also notice you're installing it as dnsmasq.conf.sample in the makefile patch but referring to dnsmasq.conf.example in the portfile, so one will need to be changed.

Changed 16 years ago by davidgilman1+macports@…

Attachment: patch-Portfile.3.diff added

3rd revision of proposed portfile

Changed 16 years ago by davidgilman1+macports@…

Attachment: patch-config.h.3.diff added

3rd revision of proposed config.h patch

comment:5 Changed 16 years ago by simon@…

Cc: simon@… added
Resolution: fixed
Status: newclosed

Committed in r37899. Thanks for your help,

Simon

comment:6 Changed 16 years ago by jmroot (Joshua Root)

Type: enhancementupdate

comment:7 Changed 16 years ago by (none)

Milestone: Port Updates

Milestone Port Updates deleted

Note: See TracTickets for help on using tickets.