Commit Graph

101 Commits

Author SHA1 Message Date
Daniel J Walsh f6044d41ef Merge pull request #46 from giuseppe/unshare-cgo
unshare: add getenv from cgo
2020-01-20 22:40:12 -05:00
Giuseppe Scrivano 758b4e2730 unshare: add getenv from cgo
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>
2020-01-20 15:53:55 +01:00
Daniel J Walsh 69f0b47c1c Move to v0.1.2-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-17 07:48:16 -05:00
Daniel J Walsh 57dfe60780 Bump to v0.1.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-17 07:47:51 -05:00
Daniel J Walsh b3d6ec550e Fix definitions for cross compilers
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-16 16:58:38 -05:00
Daniel J Walsh b484416f22 Move to 0.1.1-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-14 13:38:32 -05:00
Daniel J Walsh a79f17071b Bump to 0.1.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-14 13:38:00 -05:00
Giuseppe Scrivano 990e0fc7c3 pkg/cgroups: delete it
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>
2020-01-09 08:45:00 +01:00
Daniel J Walsh 789d9a515f Run code through codespell
Fix spelling mistakes found using codespell.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-08 08:56:50 -05:00
Daniel J Walsh 3e1c3932bf Add new Capability function to parse Capabiltiies
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>
2020-01-07 17:57:04 -05:00
Daniel J Walsh 5760a49664 HooksDir should be in LibpodConfig
This field is owned by libpod and is not part of containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-07 17:53:02 -05:00
Daniel J Walsh 2603f5de14 Fix handling of SELinux labeling
Also re-add DefaultMountsFile since we need a holding place to be
used in libpod.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-04 05:45:17 -05:00
Daniel J Walsh e17a5a6d94 Move to v0.0.8-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-03 14:07:07 -05:00
Daniel J Walsh bf9df00c5e Bump to v0.0.7
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-03 14:06:33 -05:00
Daniel J Walsh 74d7f91c66 Update/Fix man page and fix several bugs in definition.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-03 13:57:01 -05:00
Daniel J Walsh 4f0fa63812 Move to v0.0.7-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-29 06:02:58 -05:00
Daniel J Walsh eccc86b2ae Bump to v0.0.6
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-29 06:02:16 -05:00
Daniel J Walsh b406a112e1 Add new fields to containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-28 07:22:07 -05:00
Daniel J Walsh c4d2aafd65 Add missing fields to be used with podman
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>
2019-12-28 07:19:15 -05:00
Daniel J Walsh ebff9a0851 Move to v0.0.6-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-12 05:09:12 -05:00
Daniel J Walsh 46d08f9629 Bump to v0.0.5
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-12 05:09:12 -05:00
Daniel J Walsh 6abce3eb91 Move to v0.0.4-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-11 12:30:23 -05:00
Daniel J Walsh d982575de0 Bump to v0.0.4
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-11 12:30:03 -05:00
Daniel J Walsh 60644e7a72 Comment out all fields in containers.conf by default
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-11 08:26:52 -05:00
Daniel J Walsh 67213c41a3 Remove merge code and optional handling
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>
2019-12-11 08:26:52 -05:00
Daniel J Walsh 547b101e3e Change optional bools to be private options
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>
2019-12-09 12:01:43 -05:00
Daniel J Walsh dfb351a9da Add support for CONTAINERS_CONF environment variable
This is needed to help in CI/CD systems to use an alternative containers.conf file for testing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-07 06:20:27 -05:00
Qi Wang 894913abdf add libpod.conf to containers.conf
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>
2019-12-06 15:55:47 -05:00
Daniel J Walsh 33274b9dc1 Move to v0.0.4-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-06 06:26:02 -05:00
Daniel J Walsh 49ac5eac1a Bump to v0.0.3
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-06 06:25:33 -05:00
Qi Wang aab667743b move cgroups pkg from libpod
move cgroups package from libpod so can be shared by Buildah and Podman.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-12-05 12:09:11 -05:00
Valentin Rothberg 66d9591d6f unshare.HomeDir: get home dir of current user
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-22 11:18:27 +01:00
Valentin Rothberg d451ba12b8 delete _output
Delete the empty _output directory which has been mistakenly added by a
previous commit.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-18 10:44:36 +01:00
Valentin Rothberg 7e703afe81 add Apache 2.0 license file
When creating the repository, we forgot to add the license file.

Fixes: containers/common#15
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-18 10:41:54 +01:00
Qi Wang 023822b7b0 turn off the check of the hook directory
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-11-09 13:05:58 -05:00
Qi Wang dd9bff0e7e bump to 0.0.3-dev
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-11-06 16:20:29 -05:00
Qi Wang 189ce74efa bump to v0.0.2 2019-11-06 16:19:11 -05:00
Qi Wang 64705d1f72 Fix tests failure #11
tests failures should be fixed since #11 add hooksdir to default config.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-11-04 10:28:56 -05:00
Qi Wang 760d4a30a0 change default value of pidslimit and hooksdir
Change default value of pidslimit and hooksdir.
Add hooksdir to default config.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-11-01 10:46:12 -04:00
Daniel J Walsh 0772db3ba6 Merge pull request #10 from QiWang19/selinux_unsupport
add selinux unsupported
2019-10-22 21:32:39 -04:00
Qi Wang 542afa60a4 add selinux unsupported
Add unsupported file for non linux.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-22 13:51:22 -04:00
Qi Wang 3edd342200 Bump to 0.0.2-dev
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-14 22:36:54 -04:00
Qi Wang c570a6832a Add VERSION file 0.0.1
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-14 10:41:07 -04:00
Qi Wang 676d4298d3 move pkg/unshare from buildah
move the buildah/pkg/unshare into containers/common

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-10 22:35:31 -04:00
Qi Wang 9bb8e7e62b Add config package for containers.conf
This PR adds a package config for reading configurations from the containers.conf into the go struct.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-07 13:38:17 -04:00
Daniel J Walsh ddf2d69278 Update README.md 2019-09-18 09:40:23 -04:00
Justin W. Flory 73b53f0bbe Use correct URL for contributing guidelines (closes #4)
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>
2019-07-08 10:53:41 -05:00
Valentin Rothberg c02842a6e3 add .github dir
.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>
2018-12-10 13:37:59 +01:00
Valentin Rothberg c58833851d fix typo
s/thi/the/

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2018-12-10 12:57:11 +01:00
TomSweeneyRedHat 75c67c0f6e Add initial contributing for the Container's projects
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-11-08 13:45:45 -05:00
Tom Sweeney 5c13c45725 Create README.md
Initial README.md to get the repository cranking.
2018-11-08 13:32:27 -05:00