Commit Graph

10 Commits

Author SHA1 Message Date
Sascha Grunert ce384684c0
Switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-07 11:41:47 +02:00
Brandon Lum 40df1c6e3b Fix errorf conventions
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-04-04 01:12:25 +00:00
Daniel J Walsh cca09881c3
Repair buildah so it can use containers.conf on the server side
In porting containers.conf to libpod, we found that buildah needed
to handle the containers.conf on the server side rather then from
the CLI.

Since the `podman-remote build` would probably not have the same content
as containers.conf on the server, the processesing of the defaults needs
to be handled in imagebuildah.  The CapAdd and CapDrop values need to be
passed in.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-10 09:41:31 -05:00
Daniel J Walsh af05f5aa3c
Add codespell support
Check codespell on each PR in make validate.

Add fixes for issues found with codespell.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-10 12:12:30 -05:00
Daniel J Walsh 36605c29eb Prepend a comment to files setup in container
setup.rpm attempts to modify /etc/hosts, if it thinks
it has never been modified.  By adding a #comment to the
front of the file, it should prevent this from blowing up
the build.

Also add hostname to the /etc/hosts file linked to localhosts

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1313
Approved by: vrothberg
2019-03-09 14:24:50 +00:00
Miloslav Trmač c8727b4033 Fix a few issues found by tests/validate/gometalinter.sh
For some reason, the CI does not report any of these; on macOS
I see many more reports (including complaints about the standard
library), this only cleans up the trivial cases.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>

Closes: #1365
Approved by: rhatdan
2019-02-25 10:27:46 +00:00
Nalin Dahyabhai bc2ea08003 Make sure we log or return every error
Make sure that when attempting to diagnose an error, if we encounter an
error during the diagnostic attempt, we return the original error rather
than the error encountered in trying to diagnose it.  Log that one.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #1072
Approved by: rhatdan
2018-10-07 12:07:09 +00:00
baude b599244cd1 vendor in latest runtime-tools
The latest runtime-tools is aware of other OS's than Linux.  Libpod needs the newer
version to compile on darwin.  Unfortunately, the API for generator.New() changed
and requires a string representation of the OS; furthermore, it also returns a
a generator and an error so code had to be adjusted for this too.

Signed-off-by: baude <bbaude@redhat.com>
2018-06-26 15:49:39 -05:00
Nalin Dahyabhai da7be32737 Use the right formatting when adding entries to /etc/hosts
Append address+"\t"+hostname to the hosts file instead of the
"hostname:address" format that we picked up from the command line.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #798
Approved by: rhatdan
2018-06-19 18:47:41 +00:00
Boaz Shuster 66c752bc54 Add unit tests to run.go
* Changed addHostsToFile to make it easy to test
* Changed .travis.yml and Makefile to run all unit tests except ./tests/
* Added unit-tests to addHosts, addHostsToFile and addRlimits

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>

Closes: #529
Approved by: rhatdan
2018-03-22 11:32:58 +00:00