Mercurial > pkg
changeset 25:d956ace7380e
creating pkg-examine.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 10 Jan 2013 15:12:34 +0000 |
parents | eab9ad213a69 |
children | 5caff062fd36 |
files | src/pkg-examine.pl src/pkg.pl src/system-init.pl |
diffstat | 3 files changed, 33 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/pkg-examine.pl Thu Jan 10 15:12:34 2013 +0000 1.3 @@ -0,0 +1,28 @@ 1.4 +#!/usr/bin/perl 1.5 + 1.6 + 1.7 +if ($ARGV[0] eq "--help"){ 1.8 + print <<"HERE"; 1.9 + 1.10 +pkg-examine -- print package contents. 1.11 + 1.12 +Written by Robert McIntyre. This software is free 1.13 +software and is released to the public domain. 1.14 + 1.15 +HERE 1.16 +exit 0; 1.17 +} 1.18 + 1.19 + 1.20 + 1.21 +$" = " "; 1.22 +$pkg_name = $ARGV[0]; 1.23 + 1.24 +`id -g $pkg_name 2>/dev/null`; 1.25 +if ($?){ 1.26 + print "No group named $pkg_name."; 1.27 + exit 0;} 1.28 + 1.29 +@files = split(/\0/, `find /usr /opt /etc -group $pkg_name -print0`); 1.30 + 1.31 +print "@files\n";
2.1 --- a/src/pkg.pl Thu Jan 10 12:49:52 2013 +0000 2.2 +++ b/src/pkg.pl Thu Jan 10 15:12:34 2013 +0000 2.3 @@ -84,7 +84,7 @@ 2.4 "/pkg/hg-committer/.profile", "$pkg_home/.profile"); 2.5 2.6 @pkg_copy_hg_wrapper_cmd = 2.7 - ("install", "-g", "hg-wheel", "-o", "hg-committer", 2.8 + ("install", "-g", "root", "-o", "root", 2.9 "-m", "6111", "/pkg/hg-committer/hg-wrapper", "$pkg_home/.hg-wrapper"); 2.10 2.11 @pkg_copy_save_acls_cmd =
3.1 --- a/src/system-init.pl Thu Jan 10 12:49:52 2013 +0000 3.2 +++ b/src/system-init.pl Thu Jan 10 15:12:34 2013 +0000 3.3 @@ -121,18 +121,19 @@ 3.4 execute("useradd -c hg-committer -d /pkg/hg-committer -g hg-committer -s /bin/bash hg-committer"); 3.5 } 3.6 3.7 -execute("chown -Rv hg-committer:hg-wheel /.hg"); 3.8 +execute("chown -Rv root:root /.hg"); 3.9 3.10 $pwd = getcwd; 3.11 execute("gpasswd --add hg-committer hg-wheel"); 3.12 execute("gpasswd --add hg-committer users"); 3.13 +execute("gpasswd --add hg-committer install"); 3.14 execute("ln -sf $pwd/profile /pkg/hg-committer/.profile"); 3.15 execute("ln -sf $pwd/hg-wrapper /pkg/hg-committer/"); 3.16 execute("ln -sf $pwd/save-acls /pkg/hg-committer/"); 3.17 execute("ln -sf `which hg` /pkg/hg-committer/"); 3.18 3.19 -execute("install -o hg-committer -g hg-wheel -m 660 $pwd/hgignore /.hgignore"); 3.20 -execute("install -o hg-committer -g hg-wheel -m 660 $pwd/hgrc /.hg/"); 3.21 +execute("install -o root -g root -m 660 $pwd/hgignore /.hgignore"); 3.22 +execute("install -o root -g root -m 660 $pwd/hgrc /.hg/"); 3.23 3.24 3.25