4

As a new user of Fossil, I'm curious if there are any negative implications with using Fossil to store things like /etc/, /usr/local/etc files from Unix like systems like FreeBSD & OpenBSD. If I'm doing this for multiple systems, I think I'd create a branch with each hostname to track those files.

  • Q1: Have you done this? Do you prefer a different VCS to handle the system files?

  • Q2: Lots of changes have happened in Fossil over the years and I'm curious if it's possible to restrict who can merge branches with trunk. From reading earlier threads it wasn't possible but there are two workarounds:

    a) tell people not to merge to trunk

    b) have people clone and trunk maintainer pick up changes from their repo

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Registered User
  • 255
  • 4
  • 12

1 Answers1

4

System configuration files stored in /etc, /var or /usr/local/etc can generally only edited by the root user. But since root has complete access to the whole system, a mistaken command there can have dire consequences.

For that reason I generally use another location to keep edited configuration files, a directory in my home-directory that I call setup, which is under control of git. Since I have multiple machines running FreeBSD, each machine gets its own subdirectory. There is a special subdirectory of setup called shared for those configuration files that are used on multiple machines. Maintaining multiple copies of identical files in separate repositories or even branches can be a lot of extra work.

My workflow is the following;

  1. Edit a configuration file in my repository.
  2. Copy it to its proper location.
  3. Test the changes. If problems occur, go back to step 1.
  4. Commit the changes to the revision control system. Copy the committed files to their proper location.

Initially I had a shell script (basically a list of install commands) to install the files for me. But I also wanted to see the differences between the working tree and the installed files.

So for my convenience, I wrote a script called deploy to help me with this. It can tell me which files in the repo are different from the installed files and can show me the differences. It can also install files to their proper locations.

Roland Smith
  • 42,427
  • 3
  • 64
  • 94
  • 1
    My gut feel is that separate directories for separate machines (as suggested in this answer) is likely to be better than separate branches for separate machines (as suggested in the question). – Jonathan Leffler Apr 03 '15 at 22:05
  • Hi @Roland Smith, Now that I think about it, I don't think individual repos would make sense so I like your approach and I'll checkout your script. Have you considered using Fossil for version control of file systems or only git? Thanks for posting to my question. – Registered User Apr 04 '15 at 00:10
  • 1
    @RegisteredUser In the past I used `rcs`, and later switched to `git` because it is more capable. I've never considered Fossil because I don't really have a need for the extra capabilities it has. – Roland Smith Apr 04 '15 at 16:26