which is now available as 'docker' in PyPI and as a `python{2,3}-docker`
in Fedora.
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Closes: #902
Approved by: rhatdan
latest dnf failed the installation with:
"Error: Will not install a source rpm package"
Specify an empty source rpm tag so that the rpm is not considered a
source rpm.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1183
Approved by: TomasTomecek
It solves a TypeError exception:
Traceback (most recent call last):
File "/bin/atomic", line 185, in <module>
sys.exit(_func())
File "/usr/lib/python2.7/site-packages/Atomic/install.py", line 134, in install
return be.install(self.image, self.name)
File "/usr/lib/python2.7/site-packages/Atomic/backends/_ostree.py", line 128, in install
return self.syscontainers.install(image, name)
File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 563, in install
return_value = self._install(image, name)
File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 686, in _install
self._checkout_wrapper(repo, name, image, 0, SystemContainers.CHECKOUT_MODE_INSTALL, values=values, remote=self.args.remote, system_package=self.args.system_package)
File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 797, in _checkout_wrapper
return self._checkout(repo, options)
File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 813, in _checkout
return self._do_checkout(repo, options)
File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 1126, in _do_checkout
rpm_install_content = self._handle_system_package_files(options, manifest, exports)
File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 469, in _handle_system_package_files
new_installed_files_checksum = RPMHostInstall.rm_add_files_to_host(options["installed_files_checksum"], exports, options["prefix"] or "/", files_template=installed_files_template, values=options["values"], rename_files=rename_files, use_links=use_links)
File "/usr/lib/python2.7/site-packages/Atomic/rpm_host_install.py", line 155, in rm_add_files_to_host
created = RPMHostInstall._copyfile(selinux_hnd, src_file, dest_path, try_hardlink=try_hardlink)
File "/usr/lib/python2.7/site-packages/Atomic/rpm_host_install.py", line 24, in _copyfile
ctx = selinux.selabel_lookup_raw(selinux_hnd, dest, mode)
TypeError: in method 'selabel_lookup_raw', argument 3 of type 'char const *'
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1542144
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1175
Approved by: peterbaouoft
upstream Docker has no support for additional registries, if that is
the case hardcode to ['docker.io'].
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1171
Approved by: baude
Images coming from registry.access.redhat.com through "skopeo copy"
have this information in the "v1Compatibility" block. Use this
information so we can correctly catch "atomic.run".
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
We skipped file names just based on their ending without checking if
it is a symlink. This prevented container with a name ending in .0 or
.1 to be uninstalled.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1166
Approved by: peterbaouoft
A unit test for rm_add_files_to_host is added. The basic/expected
functionality of that function is tested by the new test
Other functions in rpm_host_install are mostly covered
by the integration test already, and thus not tested here
Closes: #1155
Approved by: giuseppe
A 'high-level' unit test is added that covers basic functionality
check for refactored function '_handle_system_package_files'.
Closes: #1155
Approved by: giuseppe
Since most of the local variables rooted from manifest are removed,
now it is safe to refactor the manifest duplication into a function.
There are two places that uses the similar style of reading manifest
and thus duplication is removed once the refactoring is done.
Closes: #1155
Approved by: giuseppe
This commit refactors the writing info part from 'do_checkout'
into a function.
Also, because of the above action, two of the local variables
'installed_files_template' and 'rename_files' are also removed
Other than those, an extra error case was added to the except list.
A unit test is added for future regression
Closes: #1155
Approved by: giuseppe
Refactor the code section for handling system_package
into a function.
Another worthy point to note is that now the old local
variables from the previous code section is refactored into
a dictionary to reduce the number of local variables and coupling
among other parts in '_do_checkout'
Closes: #1155
Approved by: giuseppe
This commit refactors the "rename file value substitution" code
section in '_do_checkout' function
There should not be any functional impact with this commit
A unit test is added for future regression
Closes: #1155
Approved by: giuseppe
This commit contains small refactoring of getting manifest
attributes and refactoring of the "tempfile cleaning during
upgrade" code section in '_do_checkout'
Also, 'has_container_service' local variable is genereated in the
function instead of being passed in as a parameter. This is done
because in the future refactoring we might want to elminate the
usage of local variables related to manifest completly.
A unit test is added to verify getting manifest attribute works
as expected
Closes: #1155
Approved by: giuseppe
Solves this exception:
'Namespace' object has no attribute 'system'
Traceback (most recent call last):
File "/usr/bin/atomic", line 185, in <module> sys.exit(_func())
File "/usr/local/lib/python2.7/dist-packages/Atomic/install.py", line
110, in install str_backend = 'ostree' if self.args.system else
self.args.storage or storage AttributeError: 'Namespace' object has no
attribute 'system'
Closes: https://github.com/projectatomic/atomic/issues/1165
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1167
Approved by: baude
we use hard links now by default when copying files to /usr, allow a
way to override this behavior through the manifest file.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1163
Approved by: peterbaouoft
Assume files under /usr are not going to be overwritten so create an
hard link instead of copying these files from the container
/exports/hostfs checkout directory.
Depends on: https://github.com/containers/image/pull/401
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1163
Approved by: peterbaouoft
This commit contains refactoring for write config in '_do_checkout' function,
this refactoring also removes the duplication of writing config in 'run_once'
There should not be functional impact with this commit.
A unit test is added for future regression
Closes: #1160
Approved by: giuseppe
This commit is regression from 0902503ea7
This unused function was removed, and no functional impact should be introduced
Closes: #1160
Approved by: giuseppe
According to discussion, the '_checkout' function is now being replaced
temporarily with '_checkout_wrapper'. Now, the parameters other than
repo is being packed into a dictionary and the parameter list for
'_do_checkout' and '_checkout' is greatly shortened
This commit also contains a small "if fix", by refactoring the same
if statements into one.
This commit enables further refactoring on '_do_checkout' and should
not introduce any functional change. With the help with other future
refactoring that builds on top of this commit, '_do_checkout' function
should look nicer in the future =).
Closes: #1164
Approved by: giuseppe
The image validation was not done anymore, use the backend specific
code for doing it.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1150
Approved by: rhatdan
If the labels are not found in the manifest file, then look them up in
the config layer.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1150
Approved by: rhatdan
use the implementation of validate_image_manifest and
adapt it to be used in place of validate_layer.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1150
Approved by: rhatdan
It is not used anymore since the backend abstration supports ostree.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1150
Approved by: rhatdan
If specified, pull the latest version for all the images in a
storage.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1136
Approved by: baude
In _do_checkout, we refactor the part for getting rootfs location
into a function.
A todo comment( refactoring 'missing image layer check') is also added
in this commit based on discussions on irc
A unit test is added for future regression
Closes: #1154
Approved by: giuseppe