Mercurial > pkg
changeset 21:d46aeb3166d0
going to work on file permissions/ownership since mercurial doesn't track them.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 10 Jan 2013 07:02:49 +0000 |
parents | c75924bd38e3 |
children | 43cfd1a2c523 |
files | src/hgignore src/hgrc src/pkg.pl src/system-init.pl |
diffstat | 4 files changed, 43 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/hgignore Thu Jan 10 07:02:49 2013 +0000 1.3 @@ -0,0 +1,23 @@ 1.4 +syntax:glob 1.5 +lost+found 1.6 +root 1.7 +lib 1.8 +lib64 1.9 +tools 1.10 +lost+found 1.11 +bin 1.12 +boot 1.13 +dev 1.14 +etc 1.15 +home 1.16 +media 1.17 +mnt 1.18 +pkg 1.19 +proc 1.20 +run 1.21 +sbin 1.22 +srv 1.23 +sys 1.24 +tmp 1.25 +usr 1.26 +var
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/src/hgrc Thu Jan 10 07:02:49 2013 +0000 2.3 @@ -0,0 +1,2 @@ 2.4 +[extensions] 2.5 +hgext.purge =
3.1 --- a/src/pkg.pl Thu Jan 10 04:25:17 2013 +0000 3.2 +++ b/src/pkg.pl Thu Jan 10 07:02:49 2013 +0000 3.3 @@ -73,12 +73,18 @@ 3.4 @pkg_add_install_cmd = 3.5 ("gpasswd", "--add", $pkg_name, "install"); 3.6 3.7 +sub copy_default_file { 3.8 + execute(("install", "-g", $pkg_name, "-o", $pkg_name, 3.9 + "/pkg/hg-committer/$_[0]", "$pkg_home")); 3.10 +} 3.11 + 3.12 + 3.13 @pkg_link_bashrc_cmd = 3.14 - ("install", "-g", $pkg_name, "-o", $pkg_name, 3.15 +("install", "-g", $pkg_name, "-o", $pkg_name, 3.16 "/pkg/hg-committer/.profile", "$pkg_home/.profile"); 3.17 3.18 @pkg_copy_hg_wrapper_cmd = 3.19 - (install, "-g", "hg-wheel", "-o", "hg-committer", 3.20 + ("install", "-g", "hg-wheel", "-o", "hg-committer", 3.21 "-m", "6111", "/pkg/hg-committer/hg-wrapper", "$pkg_home/.hg-wrapper"); 3.22 3.23 sub execute{print "\t@_\n"; system(@_) and die $!;} 3.24 @@ -102,8 +108,13 @@ 3.25 execute(@pkg_add_install_cmd); 3.26 3.27 print "Copy Default Files.\n"; 3.28 -execute(@pkg_link_bashrc_cmd); 3.29 + 3.30 execute(@pkg_copy_hg_wrapper_cmd); 3.31 +copy_default_file(".hgrc"); 3.32 +copy_default_file(".profile"); 3.33 + 3.34 +#execute(@pkg_link_bashrc_cmd); 3.35 +#execute(@pkg_copy_hgrc_cmd); 3.36 3.37 print "Change user.\n"; 3.38 execute(@pkg_switch_cmd);
4.1 --- a/src/system-init.pl Thu Jan 10 04:25:17 2013 +0000 4.2 +++ b/src/system-init.pl Thu Jan 10 07:02:49 2013 +0000 4.3 @@ -111,10 +111,9 @@ 4.4 create_install_dir($install_dir);} 4.5 4.6 4.7 -execute("find /.hg -type d -print0 | xargs -0 -L 1 -t chmod 770"); 4.8 +execute("find /.hg -type d -print0 | xargs -0 -L 1 -t chmod 2770"); 4.9 execute("find /.hg -type f -print0 | xargs -0 -L 1 -t chmod 660"); 4.10 4.11 - 4.12 execute("groupadd --force hg-committer"); 4.13 execute("groupadd --force hg-wheel"); 4.14 4.15 @@ -126,10 +125,12 @@ 4.16 4.17 $pwd = getcwd; 4.18 execute("gpasswd --add hg-committer hg-wheel"); 4.19 +execute("gpasswd --add hg-committer users"); 4.20 execute("ln -sf $pwd/profile /pkg/hg-committer/.profile"); 4.21 +execute("ln -sf $pwd/hgrc /pkg/hg-committer/.hgrc"); 4.22 execute("ln -sf $pwd/hg-wrapper /pkg/hg-committer/"); 4.23 execute("ln -sf `which hg` /pkg/hg-committer/"); 4.24 +execute("install -o hg-committer -g hg-wheel -m 660 $pwd/hgignore /.hgignore"); 4.25 4.26 4.27 4.28 -