fixes:
```
Traceback (most recent call last):
File "/home/tt/g/atomic/atomic", line 185, in <module>
sys.exit(_func())
File "/home/tt/g/atomic/Atomic/help.py", line 57, in help_tty
pager(result)
File "/usr/lib64/python3.6/pydoc.py", line 1421, in pager
pager(text)
File "/usr/lib64/python3.6/pydoc.py", line 1438, in <lambda>
return lambda text: pipepager(text, use_pager)
File "/usr/lib64/python3.6/pydoc.py", line 1468, in pipepager
pipe.write(text)
TypeError: write() argument must be str, not bytes
```
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Closes: #1128
Approved by: giuseppe
This is done so that atomic help is able to properly print out help files that are using tbl(1) descriptions of tables.
Signed-off-by: Petr Kubat <pkubat@redhat.com>
Closes: #1044
Approved by: giuseppe
Atomic Host variants do not have groff (and most likely never will since
it would pull in a lot of Perl packages). Print out a nicer error if
we're on AH, and make sure to skip that test.
Closes: #684
Approved by: cgwalters
In order to cleanup code and simplify interface, i
move help, info, verify and version to the images subcommand.
Remove man pages for these atomic commands and add info to images subcommand.
Since these have been previously documented we will continue to support
atomic help
atomic info
atomic verify
atomic version
But we will not document them.
Closes: #676
Approved by: rhatdan
Add missing interfaces.
Fix functions to return text, rather then displaying directly.
Change atomic_client.py to take input from command line. These args are translated into function calls in python.
Add tests scripts in tests/integration/dbus directory
Closes: #668
Approved by: rhatdan
Atomic mount blows up do to badly Camel Case on Graphdriver
Atomic umount blows up because it was not able to remove temporary container
Atomic diff blows up since overlayfs does not mount with a rootfs.
Atomic help blows up also because there is no rootfs directory.
Cleanup atomic help for Overlayfs back end
Closes: #535
Approved by: rhatdan
https://bugzilla.redhat.com/show_bug.cgi?id=1323165#c2 suggests
that atomic install does not deal with non-ascii input very
well. I believe this addresses the concerns with the proper
UTF-8 encode and decode operations.
Closes: #374
Approved by: rhatdan
The Python default is to keep all FDs open, which is how Unix
traditionally worked. This default behavior is particularly
problematic for the atomic command, which e.g. may
hold a reference to the Docker socket, and we don't
necessarily want to give that reference to all
child processes.
This patch changes most calls to subprocess to be through
util package. And the util subprocess calls all close_fds=True.
Closes: #370
Approved by: cgwalters
This addresses one of the two issues raised by bugzilla
1248038 where atomic is using shell=True on its subprocess
calls which exposes a security concern.
Two new functions were added to accomplish this. The
first is a util.chk_call which is similar to util.subp
but it uses the python function check call instead of
Popen.
The second function is atomic.sub_env_strings. Previously,
there was env variable substitution occuring with cmd_env and
the subprocess call. That was one upside of the shell=True
usage. Now, prior to calling util.chk_call, we pass the
intended command to sub_env_strings and use cmd_env to
perform the variable substitution.
We will address part 2 of the security concerns, which
is the handling of LABELS as strings, in a different
PR.
Images or containers can now have an associated
man-like help page to help users understand more
about the image. Typical information included
are things like a longer description, if the image
needs to be installed, security implications, steps
to upgrade, etc.
The default behavior is for atomic to display
a file called help.1 (in man format) located in
the / of the docker object. This default
can be overriden with the HELP LABEL. The
HELP LABEL needs to be a fully qualified
command to work correctly.