Hi Martin, I think fixing the bug of fossil having trouble running in / should be a very low priority. It just seems like a bad idea to me in general to try to run a scm out of / and spending time fixing bugs with respect to that ability is not time well spent. But that is just my $0.02.
In case you are open to ideas on how other folks solve the problem of
keeping track of machine configurations attached is the script I now use for
that task. It is more complicated than your approach but I think more
flexible (Note that the script has only ever been used on Ubuntu, you should
not use the -rdel switch, and use at your own risk etc). To see what the
script does just do -dry. All very primitive but it works great for me. I
don't make any attempt to store permissions but it wouldn't be too hard to
add that feature if really needed. By using meld original permissions are
preserved.
I use a branch "incoming" to capture the changes from /etc and thus can
safely make changes in the files stored in fossil without them getting
clobbered. This seems to work well.
I keep the data from each machine in separate directories by the host name
and use meld to move changes from one machine to another. For example the
hermes and zeus directories are from machines hermes and zeus
├── hermes
│ └── etc
│ ├── postgresql
...
└── zeus
└── etc
├── postgresql
To add postgress settings from hermes to zeus I would do something like:
ssh zeus
cd machinesync;fossil update
sudo meld hermes/etc/postgresql/8.4/main/pg_hba.conf
/etc/postgresql/8.4/main/pg_hba.conf
The control file looks like this:
# files can include glob patterns
files /etc/*.conf
# only one dir per line, no patterns
dir /etc/postgresql
dir /etc/postgresql-common
I've tried quite a few different things over the years and settled on this
script, it has saved me a heck of a lot of hassle since I started using it
but I'm sure there are other scripts out there as good or better. I do think
that trying to achieve versioning of /etc/ directly will not work well. I've
tried to do that with subversion and monotone with not much *long term*
success. I.e. it seemed to work for a while then I would run into various
problems and end up with an unsustainable mess :)
Cheers,
Matt
-=-
On Sun, Aug 21, 2011 at 9:27 AM, Martin Gagnon <[email protected]> wrote:
> Hi,
>
> I try to use fossil on my root (/) file system to track changes on some
> system files (e.g.: firewall rules, passwd and group files, openssh
> config files etc...
>
> I know fossil lack of file attribute and permission saving, but I don't
> really care, I use it more to have history on files changes. Like, the
> firewall is broken, since when and what change was done on it..
>
> So I start to use it and I notice that few fossil command are broken
> when the checkout is on the root of the file system. I tried on OpenBSD
> x86_64, Linux x86_64 And OpenBSD macppc.
>
> here's a transcript of few commands from scratch which show the problem:
>
> ------------%<--------------------------------------------------------
> root@macparrot(/)
> # fossil ver
> This is fossil version 1.19 [b968f023a8] 2011-08-10 15:54:38 UTC
>
> root@macparrot(/)
> # fossil init /tmp/test.fossil
> project-id: f3434d3abe25797fdc8291e4688f9c0980a3004b
> server-id: 00ebda7378b0da8debc0aebdb281d14a0d991feb
> admin-user: root (initial password is "662f80")
>
> root@macparrot(/)
> # fossil open /tmp/test.fossil
>
> root@macparrot(/)
> # fossil add etc/fstab
> ADDED etc/fstab
>
> root@macparrot(/)
> # fossil commit -m "add fstab file"
> New_Version: efaa6446c960dfc2493ff77b788261b9624b893c
>
> root@macparrot(/)
> # fossil status
> repository: /tmp/test.fossil
> local-root: ./
> server-code: 00ebda7378b0da8debc0aebdb281d14a0d991feb
> checkout: efaa6446c960dfc2493ff77b788261b9624b893c 2011-08-21
> 16:14:49 UTC
> parent: 9af1ab0ee2e22c451d608a632dbcef55e4681caf 2011-08-21
> 16:13:35 UTC
> tags: trunk
> comment: add fstab file (user: root)
>
> root@macparrot(/)
> # cd etc
>
> #
> # XXX: From inside a subdir, no command works, saying I'm not within an
> # open checkout...
> #
> root@macparrot(/etc)
> # fossil status
> fossil: not within an open checkout
> root@macparrot(/etc)
> # fossil timeline
> fossil: use --repository or -R to specify the repository database
> root@macparrot(/etc)
> # cd /
> root@macparrot(/)
> # echo " " >> etc/fstab
> root@macparrot(/)
> # fossil status
> repository: /tmp/test.fossil
> local-root: ./
> server-code: 00ebda7378b0da8debc0aebdb281d14a0d991feb
> checkout: efaa6446c960dfc2493ff77b788261b9624b893c 2011-08-21
> 16:14:49 UTC
> parent: 9af1ab0ee2e22c451d608a632dbcef55e4681caf 2011-08-21
> 16:13:35 UTC
> tags: trunk
> comment: add fstab file (user: root)
> EDITED etc/fstab
>
> #
> # XXX: From (/), general command work, but command which take file as
> # argument (file which are in a subdir at least) fail, it think the
> # file is outside the checkout tree.
> #
> root@macparrot(/)
> # fossil diff etc/fstab
> fossil: file outside of checkout tree: etc/fstab
> ------------%<--------------------------------------------------------
>
> In my case, my /etc directory is part of "/" partition. (it's not a
> separate moutpoint)
>
> I guess that's a bug... or there's something I do which I'm not supposed
> to..
>
> Regards..
>
> --
> Martin
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
manage.rb
Description: application/ruby
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

