local initdir = "@INITDIR@"
options = {
build_threads = 4,
scan_threads = 4,
log_level = "info",
}
environment = {
clear = true,
inherit = { "TERM", "HOME" },
set = {
PATH = "/sbin:/usr/bin:/usr/sbin",
},
}
pkgsrc = {
basedir = "/usr/pkgsrc",
bootstrap = initdir .. "/bootstrap.tar.gz",
make = "/opt/pkg/bin/bmake",
pkgpaths = {
"mail/mutt",
"sysutils/coreutils",
},
tar = "/usr/bin/tar",
cachevars = {
"_UNAME_V",
"NATIVE_OPSYS",
"NATIVE_OPSYS_VERSION",
"NATIVE_OS_VERSION",
},
}
scripts = {
["pre-build"] = initdir .. "/scripts/pre-build",
["post-build"] = initdir .. "/scripts/post-build",
}
sandboxes = {
basedir = "/data/chroot",
actions = {
{ action = "mount", fs = "lofs", dir = "/devices", opts = "-o ro", ifexists = true },
{ action = "mount", fs = "lofs", dir = "/dev", opts = "-o ro" },
{ action = "mount", fs = "fd", dir = "/dev/fd" },
{ action = "mount", fs = "proc", dir = "/proc" },
{ action = "mount", fs = "tmp", dir = "/tmp", opts = "-o size=1g" },
{ action = "mount", fs = "tmp", dir = "/var", opts = "-o size=1g" },
{ action = "mount", fs = "lofs", dir = "/lib", opts = "-o ro" },
{ action = "mount", fs = "lofs", dir = "/sbin", opts = "-o ro" },
{ action = "mount", fs = "lofs", dir = "/usr", opts = "-o ro" },
{ action = "symlink", src = "usr/bin", dest = "/bin" },
{ action = "copy", dir = "/etc" },
{ action = "cmd", chroot = true, create = "mkdir -m 1777 /var/tmp; chmod 1777 /tmp" },
{ action = "cmd", ifset = "pkgsrc.build_user",
create = [[
mkdir -p ${bob_sandbox_path}${bob_build_user_home}
chown ${bob_build_user} ${bob_sandbox_path}${bob_build_user_home}
]],
destroy = "rm -rf ${bob_sandbox_path}${bob_build_user_home}" },
{ action = "mount", fs = "lofs", dir = pkgsrc.basedir },
{ action = "mount", fs = "lofs", dir = initdir },
},
}