hsh-copy(1)
| HSH-COPY(1) | User Commands | HSH-COPY(1) |
NAME
hsh-copy - put specified file or directory inside hasher chroot
SYNOPSIS
hsh-copy [options]
--workdir=<path-to-workdir> <source>
hsh-copy [options] --workdir=<path-to-workdir>
<source> [<sources>] <destination>
DESCRIPTION
hsh-copy - put specified file or directory inside hasher chroot
<path-to-workdir> must be a valid hasher directory.
This program copies the contents of a file or directory into the hasher chroot, either in the home directory or at a specified location in the chroot. If a local directory is specified as a source, its contents are recursively copied to the destination. To write the files inside the chroot, hsh-copy(1) assumes privileges of one of the satellite users. By default, it runs as builder. All other file object attributes, except the file uid or gid, are reproduced on each object.
OPTIONS
- --builder
- run program as builder;
- --hasher-priv-dir=DIR
- hasher-priv directory ($def_hasher_priv_dir);
- --number=NUMBER
- subconfig identifier ($number);
- --rooter
- run program as pseudoroot;
- --wait-lock
- wait for workdir and hasher-priv locks ($lock_nowait);
- --no-wait-lock
- do not wait for workdir and hasher-priv locks ($lock_nowait);
- --workdir=DIR
- path to workdir to use ($workdir);
- -q, --quiet
- try to be more quiet;
- -v, --verbose
- print all file names being copied and other info;
- -V, --version
- print program version and exit;
- -h, --help
- show this text and exit.
Correspondent config file variable, if any, is mentioned by dollar sign at the end of option description ($like_this).
NOTES
The current implementation of hsh-copy(1) uses cpio(1) to transfer file object trees inside the chroot, so if cpio cannot reproduce a particular inode attribute, it will not be present in the destination file.
EXAMPLES
Example 1. Set /etc/resolv.conf in the chroot, then run a shell inside in the host's netns
$ printf '%s\n' 'nameserver 2001:db8::53' > resolv.conf $ hsh-copy --rooter --workdir $TMP/hasher resolv.conf /etc $ share_network=1 hsh-shell --workdir $TMP/hasher
Example 2. Copy the user's various rc files to builder's $HOME in the chroot
$ hsh-copy --workdir $TMP/hasher ~/.gitconfig ~/.vimrc ~/.zshrc . $ hsh-copy --workdir $TMP/hasher ~/.vim .vim
AUTHOR
Written by Dmitry V. Levin <ldv@altlinux.org> et al.
REPORTING BUGS
Report bugs to https://bugzilla.altlinux.org/
COPYRIGHT
Copyright © 2003-2022 Dmitry V. Levin
<ldv@altlinux.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
SEE ALSO
| April 2024 | hasher 1.7.4 |
