<div dir="ltr"><div><div>Josh-<br><br></div>Thank you for your reply. I think I may not have been clear in what I'm doing, so let me try to clarify in case it changes the answer. The config files I'm dealing with arenot a configuration file for a port, it's configuration files *provided by* a port, for use by the system. Specifically, SSH and Kerberos config files for use in an institutional deployment. It does not scale to make every user in the organization have to manually move the config files to the correct place. What would you suggest here? Any assistance would be most appreciated.<br><br></div>-Teddy<br class="gmail_msg"><div>
<br><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---------- Forwarded message ----------<br class="gmail_msg">From: Joshua Root <<a href="mailto:jmr@macports.org" class="gmail_msg" target="_blank">jmr@macports.org</a>><br class="gmail_msg">To: Teddy Thomas <<a href="mailto:tthoma24@mit.edu" class="gmail_msg" target="_blank">tthoma24@mit.edu</a>>, MacPorts Development <<a href="mailto:macports-dev@lists.macports.org" class="gmail_msg" target="_blank">macports-dev@lists.macports.org</a>><br class="gmail_msg">Cc: <br class="gmail_msg">Date: Wed, 18 Jan 2017 16:49:42 +1100<br class="gmail_msg">Subject: Re: Don't Overwrite Config files<br class="gmail_msg">On 2017-1-18 15:25 , Teddy Thomas wrote:<br class="gmail_msg">
> I’m trying to write a Macport that will install some config files in<br class="gmail_msg">
> /etc, and I’m wondering what the best way is to prevent overwriting user<br class="gmail_msg">
> customized files is, and to put the system config files back the way<br class="gmail_msg">
> they were when uninstalling the port. I looked in the Portfile best<br class="gmail_msg">
> practices (<a href="https://guide.macports.org/chunked/development.practices.html" rel="noreferrer" class="gmail_msg" target="_blank">https://guide.macports.org/chunked/development.practices.html</a><br class="gmail_msg">
> <<a href="https://guide.macports.org/chunked/development.practices.html" rel="noreferrer" class="gmail_msg" target="_blank">https://guide.macports.org/chunked/development.practices.html</a>>) and<br class="gmail_msg">
> found section 4.7.2, but it’s listed as a TODO. Any insight anyone can<br class="gmail_msg">
> provide would be most appreciated. I’d be happy to contribute<br class="gmail_msg">
> documentation with a way forward. Thanks in advance.<br class="gmail_msg">
<br class="gmail_msg">
<<a href="https://trac.macports.org/wiki/PortfileRecipes#configfiles" rel="noreferrer" class="gmail_msg" target="_blank">https://trac.macports.org/wiki/PortfileRecipes#configfiles</a>><br class="gmail_msg">
<br class="gmail_msg">
Ports should in general keep their configuration files in ${prefix}/etc,<br class="gmail_msg">
not /etc. Modifying system config files tends to be a bad idea, not<br class="gmail_msg">
least because they may be modified by users and OS updates, so putting<br class="gmail_msg">
them back the way they were is not necessarily correct. Not changing<br class="gmail_msg">
existing files and letting the user deal with updating them is about the<br class="gmail_msg">
only tractable approach.<br class="gmail_msg">
<br class="gmail_msg">
- Josh<br class="gmail_msg">
_________________________<br class="gmail_msg">
macports-dev mailing list<br class="gmail_msg">
<a href="mailto:macports-dev@lists.macports.org" class="gmail_msg" target="_blank">macports-dev@lists.macports.org</a><br class="gmail_msg">
<a href="https://lists.macports.org/mailman/listinfo/macports-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.macports.org/mailman/listinfo/macports-dev</a></blockquote></div></div></div></div></div>