git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: /etc in git?

From
RARyan Anderson <ryan@michonline.com>
Date
Jan 20, 2006, 13:50 UTC
Message-ID
<43D0EAA2.8090308@michonline.com>
In-Reply-To
<7vvewgirlt.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 33 quoted lines
>Ryan Anderson <ryan@michonline.com> writes:
>  
>
>>Junio C Hamano wrote:
>>    
>>
>>>You are much better off to keep /usr/src/rootstuff/.git (and
>>>working tree files are /usr/src/rootstuff/etc/hosts and
>>>friends), have a build procedure (read: Makefile) there, and
>>>version control that source directory.  I usually have 'install'
>>>and 'diff' target in that Makefile, so that I can do this:
>>>... 
>>>      
>>>
>>If you're doing this, especially if you're doing this on multiple
>>machines, creating a package is probably a worthwhile thing to
>>contemplate as well.
>>    
>>
>
>In my workplace environment, the equivalent of the above
>/usr/src/rootstuff is accessible throughout the networked
>machines (mostly NFS mounted); for things that needs per-host
>customization, we do not have /usr/src/rootstuff/etc/hosts but
>keep /usr/src/rootstuff/etc/hosts.in as the source, and Makefile
>customizes that into a form suitable for installation for each
>machine.  Especially useful is vfstab.in --- a single source
>builds fstab for local mounting and nfs exports, while other
>machines have mountpoints and project symlinks pointing into
>location automounted from that machine with disk, generated
>automatically.  This does not match typical "package" use.
>  
>

To provide an off-topic, but perhaps useful, counter-example, where I work, I've made a package that does something similar.

I use a Makefile to generate a few template files, such as /etc/resolv.conf, /etc/apt/preferences, /etc/sudoers, /etc/ntp.conf It Pre-Depends on, ntp, sudo, (etc).

A postinstallation script does a little bit of tweaking of these files based upon the answers to one or two questions asked during installation.

It's simply another way of looking at the problem.
-- 
Ryan Anderson
  sometimes Pug Majere
Previous: Peter BaumannNext: Junio C Hamano
Message 13 of 16 in “/etc in git?”
  1. Adam HuntJan 19, 2006
  2. Junio C HamanoJan 19, 2006
  3. Adam HuntJan 19, 2006
  4. H. Peter AnvinJan 19, 2006
  5. Junio C HamanoJan 19, 2006
  6. Ryan AndersonJan 19, 2006
  7. Junio C HamanoJan 19, 2006
  8. Support precise tracking of file modesPetr Baudis, Jan 19, 2006
  9. Junio C HamanoJan 19, 2006
  10. Petr BaudisJan 19, 2006
  11. Alex RiesenJan 20, 2006
  12. Peter BaumannJan 20, 2006
  13. Ryan AndersonJan 20, 2006
  14. Junio C HamanoJan 20, 2006
  15. Joel BeckerJan 19, 2006
  16. Daniel BarkalowJan 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.