install
changeset 92 647c3e61bc95
parent 91 69dd70e1d844
child 93 fc66737db3f0
equal deleted inserted replaced
91:69dd70e1d844 92:647c3e61bc95
    33     d = options.root + d
    33     d = options.root + d
    34     os.makedirs(d)
    34     os.makedirs(d)
    35     for f in sources:
    35     for f in sources:
    36         shutil.copy(f, d)
    36         shutil.copy(f, d)
    37 
    37 
    38 installFiles(options.prefix + '/lib/mercurial-server',
    38 installFiles(options.prefix + '/share/mercurial-server',
    39     'src/hg-ssh',
    39     'src/hg-ssh',
    40     'src/refresh-auth')
    40     'src/refresh-auth')
    41 installFiles(options.prefix + '/lib/mercurial-server',
    41 installFiles(options.prefix + '/share/mercurial-server',
    42     'src/hg-ssh',
    42     'src/hg-ssh',
    43     'src/refresh-auth')
    43     'src/refresh-auth')
    44 installFiles(options.prefix + '/lib/mercurial-server/mercurialserver',
    44 installFiles(options.prefix + '/share/mercurial-server/mercurialserver',
    45     'src/mercurialserver/__init__.py',
    45     'src/mercurialserver/__init__.py',
    46     'src/mercurialserver/paths.py',
    46     'src/mercurialserver/paths.py',
    47     'src/mercurialserver/changes.py',
    47     'src/mercurialserver/changes.py',
    48     'src/mercurialserver/access.py',
    48     'src/mercurialserver/access.py',
    49     'src/mercurialserver/servelog.py',
    49     'src/mercurialserver/servelog.py',
    50     'src/mercurialserver/refreshauth.py',
    50     'src/mercurialserver/refreshauth.py',
    51     'src/mercurialserver/ruleset.py')
    51     'src/mercurialserver/ruleset.py')
    52 installFiles(options.prefix + '/lib/mercurial-server/init',
    52 installFiles(options.prefix + '/share/mercurial-server/init',
    53     'src/init/hginit',
    53     'src/init/hginit',
    54     'src/init/hgadmin-hgrc')
    54     'src/init/hgadmin-hgrc')
    55 installFiles('/etc/mercurial-server',
    55 installFiles('/etc/mercurial-server',
    56     'src/init/conf/remote-hgrc',
    56     'src/init/conf/remote-hgrc',
    57     'src/init/conf/access.conf')
    57     'src/init/conf/access.conf')
    72        pwd.getpwnam('hg')
    72        pwd.getpwnam('hg')
    73     except KeyError:
    73     except KeyError:
    74         subprocess.check_call(
    74         subprocess.check_call(
    75             "adduser --system --shell /bin/sh --group --disabled-password".split() + 
    75             "adduser --system --shell /bin/sh --group --disabled-password".split() + 
    76             ["--gecos", "Mercurial repositories", "hg"])
    76             ["--gecos", "Mercurial repositories", "hg"])
    77         subprocess.check_call([options.prefix + '/lib/mercurial-server/init/hginit'],
    77         subprocess.check_call([options.prefix + '/share/mercurial-server/init/hginit'],
    78             preexec_fn = becomeFunc('hg'))
    78             preexec_fn = becomeFunc('hg'))
    79 
    79