if CGO is enabled, make sure to use C.getenv instead of os.Getenv to
read environment variables. It is required since rootless libpod
joins the user namespace through Cgo.
The variables set via C.setenv are not visible through os.Getenv, as
the latter uses sync.Once to read the variables once.
Requires: https://github.com/containers/libpod/pull/4911
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
at the moment the cgroups package is used only by Podman and by CRI-O
(that is already vendoring libpod). So let's simplify and not have a
duplicate here.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
The Capability check handles merging of Default capabiltiies along
with user specified add and drop capabilities.
Fork docker/docker/oci/caps file to prevent a huge vendor
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
We also want to be able to default namespaces to host, so that HPC
machines can default to not using most of the namespaces by default.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Fix handling of toml files
No longer need merge, since we can specify a default conf for each toml file.
The toml code will retain the previous defaults and only use the newly specified
values.
This greatly simplifies the code.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
We want to hide Optional Bools from the default configuration. Callers should only have to deal with boolean
fields and not deal with optionals.
Add accessor functions for all optional bools, easier.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Add configurations from libpod.conf to containers.conf.Use merge code from libpod to read and merge configurations from file.
Add unshare_linux for build linux: HomeDir should buildah not only for linux. so add unshare_linux for linux and unshare.go for other
convert bool to optinalbool:Use OptionalBool for on-disk configurations so we can distinguish field is undefined vs. user set to false.
Signed-off-by: Qi Wang <qiwan@redhat.com>
I looked more closely and realized there were two CONTRIBUTING.md files
already in the repo. The file in `.github/` link to itself, so this
commit fixes the URL.
Closes#4.
Signed-off-by: Justin W. Flory <git@jwf.io>
.github is a special directory for GitHub projects. The directory and
its files can serve as templates for projects under the
github.com/containers umbrella.
The following files are added:
- CONTRIBUTING.md
- ISSUE_TEMPLATE.md
- PULL_REQUEST_TEMPLATE.md
The underlying idea is that all three point to the main CONTRIBUTING.md
so we only need to update once and not for each project in the future.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>