Feature: Bootstrap pkgin on NetBSD
Installing pkgin should be as simple as /usr/sbin/pkg_add pkgin.
let privilege_provider =
utilities::get_privilege_provider(&contexts).unwrap_or_else(|| "sudo".to_string());
vec![Step {
atom: Box::new(Exec {
command: String::from("pkg_add"),
arguments: vec![
String::from("pkgin"),
],
privileged: true,
privilege_provider: privilege_provider.clone(),
..Default::default()
}),
initializers: vec![],
finalizers: vec![],
}]
Yea, this could be done in the bootstrap method. The only reason I've never gotten around to it was because of some of the configuration before that.
# From https://www.netbsd.org/docs/pkgsrc/using.html
# PATH="/usr/pkg/sbin:/usr/pkg/bin:$PATH"
# PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages"
# PKG_PATH="$PKG_PATH/OPSYS/ARCH/VERSIONS/All/"
# export PATH PKG_PATH
# pkg_add pkgin
That is how I've always done it when setting up a new NetBSD system.
If you want to implement the bootstrap method for the package provider, I can help you with that. Otherwise, I can do it.
Thanks @martintc, if you could take the lead, that'd be great.
I think to allow setting environment variables during bootstrap, with #515 , we should be able to accomplish it.