Re: [arch-general] Source control on /etc

2012-06-20 Thread Squall Lionheart
>
> It'd be nice if you added it to the AUR.
>
> M
>

After I roll out this update, that's on my list of stuff to figure out :).
I have never created an AUR package, doesn't sound to difficult.

Squall

-- 
Yesterday is history.
Tomorrow is a mystery.
Today is a gift.
That's why its called the present.

Headmaster Squall :: The Wired/Section-9
Close the world  txen eht nepo
$3R14L 3XP3R1M3NT$ #L41N
http://twitter.com/headmastersqual


Re: [arch-general] Source control on /etc

2012-06-20 Thread Manolo Martínez
On 06/20/12 at 09:28am, Squall Lionheart wrote:
> Your welcome.  I will post a message to everyone when I roll out my next
> version since it's a huge improvement over the current one with a lot of
> very powerful and user friendly features, as well as efficiency
> improvements.
> 

It'd be nice if you added it to the AUR.

M


Re: [arch-general] Source control on /etc

2012-06-20 Thread Squall Lionheart
Squall, very nice work going to give this a shot later today on a test box.
Thanks for pointing this out. I tried a few things in suggestions to my OP
but this seems to be the best so far. Thanks for bringing this back up

>
>
>
Your welcome.  I will post a message to everyone when I roll out my next
version since it's a huge improvement over the current one with a lot of
very powerful and user friendly features, as well as efficiency
improvements.

Enjoy

-- 
Yesterday is history.
Tomorrow is a mystery.
Today is a gift.
That's why its called the present.

Headmaster Squall :: The Wired/Section-9
Close the world  txen eht nepo
$3R14L 3XP3R1M3NT$ #L41N
http://twitter.com/headmastersqual


Re: [arch-general] Source control on /etc

2012-06-20 Thread Don deJuan

On 06/20/2012 07:46 AM, Squall Lionheart wrote:

I wrote a system backup program called "mime" that works similar to Apple's
Time Machine on the back end.  Basically each time you backup your system,
another copy of your file system is available.  Another program is
installed with it called "lsmime" which is used to list, restore and view
information about files that are backed up.  The new version I am about to
release even has the ability to view a diff on a particular file against
any version that is in your backups.  The features available give the feel
of having your entire file system under version control.

The version on the site is functional and we have been using it on our
servers and work stations for years.  I will have a new version available
in a few weeks.  The current version can be downloaded here from the link
below.  If you end up using it, I greatly appreciate any feedback you can
provide.

In regards to your original question, I don't know what is considered the
"Arch" way of doing this, however I run Arch at work and at home and is
backed up using mime on a daily or weekly frequency (this has saved my butt
more than once).

http://code.google.com/p/mime-backup/

Thank you
Squall



Squall, very nice work going to give this a shot later today on a test 
box. Thanks for pointing this out. I tried a few things in suggestions 
to my OP but this seems to be the best so far. Thanks for bringing this 
back up





Re: [arch-general] Source control on /etc

2012-06-20 Thread Squall Lionheart
I wrote a system backup program called "mime" that works similar to Apple's
Time Machine on the back end.  Basically each time you backup your system,
another copy of your file system is available.  Another program is
installed with it called "lsmime" which is used to list, restore and view
information about files that are backed up.  The new version I am about to
release even has the ability to view a diff on a particular file against
any version that is in your backups.  The features available give the feel
of having your entire file system under version control.

The version on the site is functional and we have been using it on our
servers and work stations for years.  I will have a new version available
in a few weeks.  The current version can be downloaded here from the link
below.  If you end up using it, I greatly appreciate any feedback you can
provide.

In regards to your original question, I don't know what is considered the
"Arch" way of doing this, however I run Arch at work and at home and is
backed up using mime on a daily or weekly frequency (this has saved my butt
more than once).

http://code.google.com/p/mime-backup/

Thank you
Squall


Re: [arch-general] Source control on /etc

2012-06-20 Thread Gour
On Thu, 23 Feb 2012 17:43:58 +0100
Dennis Börm  wrote:

> we're using
> 
> http://joey.kitenet.net/code/etckeeper/
> 
> for that purpose

I see it's available via AUR, but, afaik, it does not support Arch's
pacman due to lack of hook support in Pacman.

Can you share some light how do you use etckeeper on Arch?

I'd probably use it with bzr (treeless repo + lightweight checkout).


Sincerely,
Gour


-- 
As a blazing fire turns firewood to ashes, O Arjuna, so does the 
fire of knowledge burn to ashes all reactions to material activities.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


signature.asc
Description: PGP signature


Re: [arch-general] Source control on /etc

2012-02-23 Thread Don deJuan

On 02/23/2012 08:43 AM, Dennis Börm wrote:

On 02/23/2012 05:36 PM, Taylor Hedberg wrote:

Alfredo Palhares, Thu 2012-02-23 @ 17:24:01+0100:

Excerpts from Matthew Monaco's message of Thu Feb 23 17:08:46 +0100
2012:

What about permissions and ownership? These are pretty important for
/etc.

What about those ? Git doesn't care about permissions, the only
permissions that git stores is the executable bit.


But that's problematic for files in /etc, many of which require specific
ownership or mode bits set/unset. You don't want your VCS to elide the
fact that /etc/shadow should only be readable by root, for instance.

I don't think Git will change permissions on existing files in your
working directory, but if you ever cloned your /etc repo onto another
machine, the permissions would be screwed up.



Hi

we're using

http://joey.kitenet.net/code/etckeeper/

for that purpose

greets,
Dennis

Have you had any issues?
The AUR packages for that are way out of date and probably abandoned by 
the owners. From what I read it starting giving people issues when 
pacman 3 came out and now that we are on 4 with even more features I 
would think a bunch of work would have to be done to make work properly 
for Arch.


Re: [arch-general] Source control on /etc

2012-02-23 Thread Don deJuan

On 02/23/2012 08:56 AM, Alfredo Palhares wrote:

Excerpts from Taylor Hedberg's message of Thu Feb 23 17:36:00 +0100 2012:

But that's problematic for files in /etc, many of which require specific
ownership or mode bits set/unset. You don't want your VCS to elide the
fact that /etc/shadow should only be readable by root, for instance.

I don't think Git will change permissions on existing files in your
working directory, but if you ever cloned your /etc repo onto another
machine, the permissions would be screwed up.

Yeah i agree, you should have carefull with that. I never transplant a the /etc 
of a machine
i only use it as detailed backup. Whenever i have another machine i create a 
new /etc repository
for it, copying manually the files i need because i dont even want the history 
back. You could
do it with git using root and those files would be owned by root, you just need 
to adjust the
ownerwhip like you set when you copy a file manually.
In my home repo i do that and keep a branch for each computer, but on /etc 
repos not just because
they often have very diferent distros and objectives.
Hey thanks again everyone I am going to start trying out both methods 
and see which I feel works best for me and will post which way I go.


Re: [arch-general] Source control on /etc

2012-02-23 Thread Alfredo Palhares
Excerpts from Taylor Hedberg's message of Thu Feb 23 17:36:00 +0100 2012:
> But that's problematic for files in /etc, many of which require specific
> ownership or mode bits set/unset. You don't want your VCS to elide the
> fact that /etc/shadow should only be readable by root, for instance.
> 
> I don't think Git will change permissions on existing files in your
> working directory, but if you ever cloned your /etc repo onto another
> machine, the permissions would be screwed up.
Yeah i agree, you should have carefull with that. I never transplant a the /etc 
of a machine
i only use it as detailed backup. Whenever i have another machine i create a 
new /etc repository 
for it, copying manually the files i need because i dont even want the history 
back. You could 
do it with git using root and those files would be owned by root, you just need 
to adjust the
ownerwhip like you set when you copy a file manually.
In my home repo i do that and keep a branch for each computer, but on /etc 
repos not just because
they often have very diferent distros and objectives.


Re: [arch-general] Source control on /etc

2012-02-23 Thread Dennis Börm
On 02/23/2012 05:36 PM, Taylor Hedberg wrote:
> Alfredo Palhares, Thu 2012-02-23 @ 17:24:01+0100:
>> Excerpts from Matthew Monaco's message of Thu Feb 23 17:08:46 +0100
>> 2012:
>>> What about permissions and ownership? These are pretty important for
>>> /etc.
>> What about those ? Git doesn't care about permissions, the only
>> permissions that git stores is the executable bit.
> 
> But that's problematic for files in /etc, many of which require specific
> ownership or mode bits set/unset. You don't want your VCS to elide the
> fact that /etc/shadow should only be readable by root, for instance.
> 
> I don't think Git will change permissions on existing files in your
> working directory, but if you ever cloned your /etc repo onto another
> machine, the permissions would be screwed up.


Hi

we're using

http://joey.kitenet.net/code/etckeeper/

for that purpose

greets,
Dennis


Re: [arch-general] Source control on /etc

2012-02-23 Thread Taylor Hedberg
Alfredo Palhares, Thu 2012-02-23 @ 17:24:01+0100:
> Excerpts from Matthew Monaco's message of Thu Feb 23 17:08:46 +0100
> 2012:
> > What about permissions and ownership? These are pretty important for
> > /etc.
> What about those ? Git doesn't care about permissions, the only
> permissions that git stores is the executable bit.

But that's problematic for files in /etc, many of which require specific
ownership or mode bits set/unset. You don't want your VCS to elide the
fact that /etc/shadow should only be readable by root, for instance.

I don't think Git will change permissions on existing files in your
working directory, but if you ever cloned your /etc repo onto another
machine, the permissions would be screwed up.


signature.asc
Description: Digital signature


Re: [arch-general] Source control on /etc

2012-02-23 Thread Alfredo Palhares
Excerpts from Matthew Monaco's message of Thu Feb 23 17:08:46 +0100 2012:
> What about permissions and ownership? These are pretty important for /etc.
What about those ? Git doesn't care about permissions, the only permissions 
that git 
stores is the executable bit.

--
Regards, 
Alfredo Palhares


Re: [arch-general] Source control on /etc

2012-02-23 Thread Matthew Monaco
On 02/23/2012 12:48 AM, Alfredo Palhares wrote:
> Hello Don, 
> 
> Excerpts from Don deJuan's message of Thu Feb 23 07:35:52 +0100 2012:
>> What is considered the Arch way to have version control over the configs 
>> in /etc? I would like to be able to see at least a few changes back in 
>> my config history at the minimum.
> 
> I too keep my /etc directory under version control. I have a a detached 
> worktree. 
> Wich enables me to have the .git directory outside of /etc. The process is 
> simple: 
> 
> You create a bare repo:
> $ mkdir etc.git
> $ git init --bare
> Now lets congigure it to chek the files elsewhere:
> $ git config core.worktree /etc
> And export these vars to you current session 
> $ export GIT_DIR=/path/to/etc.git
> $ export GIT_WORK_TREE=/etc
> 
> Tip here a script[1] easy to work it. Just rember to run it with "." or 
> "source" 
> *not* with "sh" since it open another bash session and kills it when script 
> is done.
> 
> Now you would be able to git add and git commit in your etc while keeping it 
> clean. :)
> 
>> I have seen the package etckeeper and it does not seem to really fully 
>> be setup to work with pacman. Both AUR packages are very outdated.
> etckeeper doesn't really fit pacman cause pacman doesn't merge files 
> automatically, only
> apt does that (if you silly enough to configure it to do that :p ). Also 
> etckeeper commits 
> all the files in /etc wich makes quite dummy commits. They not really 
> resetable... 
> I use use it on debian server only as the last resource.
> 
> The Arch way is quite simpler, every time you merge a pacnew or add a feature 
> to a config file
> you commit it and keep the same workflow as a normal code repo. Much simpler. 
> 
>> Would I just be best off just copying the ones I change and then push 
>> the changes to a separate dir that is under control of say git? What 
>> methods do you employ?
> Well this is kinda hard to do (believe me i tried) Also having the .git on 
> /etc and other dirs like
> $HOME is quite anoying since i get the (branch) in red on my bash prompt[2].
> 
> I hope this can help you. 
> 
> [1] https://github.com/masterkorp/Home-files/blob/master/scripts/export_git.sh
> [2] https://github.com/masterkorp/Home-files/blob/master/.bashrc
> 

What about permissions and ownership? These are pretty important for /etc.


Re: [arch-general] Source control on /etc

2012-02-23 Thread Alfredo Palhares
Excerpts from solsTiCe d'Hiver's message of Thu Feb 23 11:55:11 +0100 2012:
> "git config core.worktree /etc" is not really needed in your setup
True.

> I would like to suggest to use alias instead of env var. This way you
> can work easily on multiple git repo in the same shell
>
> for example
> alias etc-git='git --git-dir=/path/to/etc.git --work-dir=/etc'
> alias home-git='git --git-dir=/path/to/home.git --work-dir=$HOME' #just
> check that $HOME is defined
This is nice, i used this for a while, but i got used to my git aliases[1]  (eg 
gc="git commit")
that i always failed the commands :P
So i just use this little scrpit[2] 

Either way is very cool indeed.

[1] https://github.com/masterkorp/Home-files/blob/master/.bash.d/aliases.bash
[2] https://github.com/masterkorp/Home-files/blob/master/scripts/export_git.sh


Re: [arch-general] Source control on /etc

2012-02-23 Thread solsTiCe d'Hiver
Le jeudi 23 février 2012 à 08:48 +0100, Alfredo Palhares a écrit :
> Hello Don, 

> You create a bare repo:
> $ mkdir etc.git
> $ git init --bare
> Now lets congigure it to chek the files elsewhere:
> $ git config core.worktree /etc
> And export these vars to you current session 
> $ export GIT_DIR=/path/to/etc.git
> $ export GIT_WORK_TREE=/etc

hi all,

"git config core.worktree /etc" is not really needed in your setup

I would like to suggest to use alias instead of env var. This way you
can work easily on multiple git repo in the same shell

for example
alias etc-git='git --git-dir=/path/to/etc.git --work-dir=/etc'
alias home-git='git --git-dir=/path/to/home.git --work-dir=$HOME' #just
check that $HOME is defined

and run
etc-git add /etc/pacman.conf
etc-git rc.conf
home-git add anyfileinhome
home-git commit -a
etc-git commit -a

place the aliases in your .bashrc or aliases file



Re: [arch-general] Source control on /etc

2012-02-23 Thread Don deJuan

On 02/22/2012 11:48 PM, Alfredo Palhares wrote:

Hello Don,

Excerpts from Don deJuan's message of Thu Feb 23 07:35:52 +0100 2012:

What is considered the Arch way to have version control over the configs
in /etc? I would like to be able to see at least a few changes back in
my config history at the minimum.


I too keep my /etc directory under version control. I have a a detached 
worktree.
Wich enables me to have the .git directory outside of /etc. The process is 
simple:

You create a bare repo:
$ mkdir etc.git
$ git init --bare
Now lets congigure it to chek the files elsewhere:
$ git config core.worktree /etc
And export these vars to you current session
$ export GIT_DIR=/path/to/etc.git
$ export GIT_WORK_TREE=/etc

Tip here a script[1] easy to work it. Just rember to run it with "." or "source"
*not* with "sh" since it open another bash session and kills it when script is 
done.

Now you would be able to git add and git commit in your etc while keeping it 
clean. :)


I have seen the package etckeeper and it does not seem to really fully
be setup to work with pacman. Both AUR packages are very outdated.

etckeeper doesn't really fit pacman cause pacman doesn't merge files 
automatically, only
apt does that (if you silly enough to configure it to do that :p ). Also 
etckeeper commits
all the files in /etc wich makes quite dummy commits. They not really 
resetable...
I use use it on debian server only as the last resource.

The Arch way is quite simpler, every time you merge a pacnew or add a feature 
to a config file
you commit it and keep the same workflow as a normal code repo. Much simpler.


Would I just be best off just copying the ones I change and then push
the changes to a separate dir that is under control of say git? What
methods do you employ?

Well this is kinda hard to do (believe me i tried) Also having the .git on /etc 
and other dirs like
$HOME is quite anoying since i get the (branch) in red on my bash prompt[2].

I hope this can help you.

[1] https://github.com/masterkorp/Home-files/blob/master/scripts/export_git.sh
[2] https://github.com/masterkorp/Home-files/blob/master/.bashrc

Awesome!! Thanks for that, I will have to read this throughly and give 
it a shot in the morning. I have read a few snips on detached worktree 
and was unsure if that was ideal for my want.


I will post back if I have more questions and again thanks for the in 
depth answer :D


Re: [arch-general] Source control on /etc

2012-02-22 Thread Alfredo Palhares
Hello Don, 

Excerpts from Don deJuan's message of Thu Feb 23 07:35:52 +0100 2012:
> What is considered the Arch way to have version control over the configs 
> in /etc? I would like to be able to see at least a few changes back in 
> my config history at the minimum.

I too keep my /etc directory under version control. I have a a detached 
worktree. 
Wich enables me to have the .git directory outside of /etc. The process is 
simple: 

You create a bare repo:
$ mkdir etc.git
$ git init --bare
Now lets congigure it to chek the files elsewhere:
$ git config core.worktree /etc
And export these vars to you current session 
$ export GIT_DIR=/path/to/etc.git
$ export GIT_WORK_TREE=/etc

Tip here a script[1] easy to work it. Just rember to run it with "." or 
"source" 
*not* with "sh" since it open another bash session and kills it when script is 
done.

Now you would be able to git add and git commit in your etc while keeping it 
clean. :)

> I have seen the package etckeeper and it does not seem to really fully 
> be setup to work with pacman. Both AUR packages are very outdated.
etckeeper doesn't really fit pacman cause pacman doesn't merge files 
automatically, only
apt does that (if you silly enough to configure it to do that :p ). Also 
etckeeper commits 
all the files in /etc wich makes quite dummy commits. They not really 
resetable... 
I use use it on debian server only as the last resource.

The Arch way is quite simpler, every time you merge a pacnew or add a feature 
to a config file
you commit it and keep the same workflow as a normal code repo. Much simpler. 

> Would I just be best off just copying the ones I change and then push 
> the changes to a separate dir that is under control of say git? What 
> methods do you employ?
Well this is kinda hard to do (believe me i tried) Also having the .git on /etc 
and other dirs like
$HOME is quite anoying since i get the (branch) in red on my bash prompt[2].

I hope this can help you. 

[1] https://github.com/masterkorp/Home-files/blob/master/scripts/export_git.sh
[2] https://github.com/masterkorp/Home-files/blob/master/.bashrc

-- 
Regards, 
Alfredo Palhares


[arch-general] Source control on /etc

2012-02-22 Thread Don deJuan
What is considered the Arch way to have version control over the configs 
in /etc? I would like to be able to see at least a few changes back in 
my config history at the minimum.


I have seen the package etckeeper and it does not seem to really fully 
be setup to work with pacman. Both AUR packages are very outdated.


Would I just be best off just copying the ones I change and then push 
the changes to a separate dir that is under control of say git? What 
methods do you employ?


Thanks for any info or tips on this. :)