Commit 3b3cf4cc authored by Michael Shigorin's avatar Michael Shigorin

QUICKSTART, mktmpdir, build.mk: hasher's /proc

Either /etc/hasher-priv/system or /etc/hasher-priv/user.d/$USER must contain at least "allowed_mountpoints=/proc" for mkimage to work for mkimage-profiles; thanks Daniil Golovanov for providing feedback indicating the lack of the corresponding checks.
parent 4dfc4417
......@@ -5,7 +5,7 @@ http://en.altlinux.org/Hasher; large tmpfs helps a lot).
~~~~~~~~~
- ALT Linux 7.0 или выше (возможна адаптация "вниз")
- установленный mkimage (свежий, как и hasher)
- пользователь с правом запуска hasher
- пользователь с правом запуска hasher и подключения /proc к нему
полезно
~~~~~~~
......
......@@ -6,6 +6,14 @@
DIRS="$TMP $TMPDIR $HOME/hasher /tmp /var/tmp .."
MINSIZE=262144 # face control criterion
# mkimage needs /proc among those, be clear about that
check_allowed_mountpoints()
{
grep -wqs "^allowed_mountpoints=[^#]*/proc" \
/etc/hasher-priv/system \
`/usr/libexec/hasher-priv/getconf.sh`
}
# poor man's SourceIfExists()
try_source() { [ -f "$1" ] && . "$1"; }
......@@ -59,6 +67,12 @@ choose_tmpdir() {
}
# bringing it all together
if ! check_allowed_mountpoints; then
echo "error: hasher's allowed_mountpoints do not include /proc;"
echo "please check hasher docs and /etc/hasher-priv/system"
exit 1
fi >&2
TMPDIRS="`contemplate_dirs $DIRS`"
if [ -z "$TMPDIRS" ]; then
echo "error: no suitable directories found;"
......
......@@ -4,7 +4,7 @@ ANSI_FAIL ?= 1;31
MAX_LINES = 200
MAX_ERRORS = 5
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (FAILURE|FATAL|ERROR|conflicts|Depends:) .*)|(.* (Stop|failed|not found)\.))$$
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (FAILURE|FATAL|ERROR|conflicts|Depends:) .*)|(.* (Stop|failed|not found)\.)|(not allowed))$$
ifndef MKIMAGE_PROFILES
$(error this makefile is designed to be included in toplevel one)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment