Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accumulated changes required for Yomi #165

Merged
merged 9 commits into from
Jul 30, 2019

Conversation

aplanas
Copy link
Contributor

@aplanas aplanas commented Jul 24, 2019

What does this PR do?

Partial accumulated changes required for Yomi:

Tests written?

Yes

@aplanas
Copy link
Contributor Author

aplanas commented Jul 24, 2019

After talking with @meaksh we agree on:

  • Accumulate the commits under a single PR
  • Make the PR WIP (?)
  • Merge the changes per week

@meaksh
Copy link
Member

meaksh commented Jul 24, 2019

@aplanas , for marking the PR as WIP, just add [WIP] at the beginning of the PR title. That's enough for us. Thanks!

@aplanas aplanas changed the title Accumulated changes required for Yomi [WIP] Accumulated changes required for Yomi Jul 24, 2019
The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)
(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)
(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)
(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)
(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)
(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)
(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)
(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)
The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
@aplanas aplanas changed the title [WIP] Accumulated changes required for Yomi Accumulated changes required for Yomi Jul 30, 2019
@aplanas
Copy link
Contributor Author

aplanas commented Jul 30, 2019

Removing the WIP tag, ready for review.

Copy link
Member

@meaksh meaksh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor comment about changing method signature. The rest of the PR looks good to me.

salt/modules/chroot.py Show resolved Hide resolved
@meaksh meaksh merged commit 8cd87eb into openSUSE:openSUSE-2019.2.0 Jul 30, 2019
@aplanas
Copy link
Contributor Author

aplanas commented Jul 30, 2019

Thanks!

meaksh pushed a commit that referenced this pull request Oct 1, 2019
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
brejoc pushed a commit that referenced this pull request Nov 15, 2019
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
dincamihai pushed a commit that referenced this pull request Nov 19, 2019
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
brejoc pushed a commit that referenced this pull request Jan 31, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
meaksh pushed a commit that referenced this pull request Mar 10, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
brejoc pushed a commit that referenced this pull request Mar 20, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
meaksh pushed a commit that referenced this pull request Mar 23, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
meaksh pushed a commit that referenced this pull request Mar 24, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
brejoc pushed a commit that referenced this pull request Apr 8, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
meaksh pushed a commit that referenced this pull request Apr 30, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
meaksh pushed a commit that referenced this pull request May 20, 2020
* cmdmod: fix runas and group in run_chroot

The parameters runas and group for cmdmod.run() will change the efective
user and group before executing the command. But in a chroot environment is
expected that the change happends inside the chroot, not outside, as the
user and groups are refering to objects that can only exist inside the
environment.

This patch add the userspec parameter to the chroot command, to change
the user in the correct place.

(cherry picked from commit f0434aaeeee3ace4e3fc65c04e69984f08b2541e)

* chroot: add missing sys directory

(cherry picked from commit cdf74426bcad4e8bf329bf604c77ea83bfca8b2c)

* chroot: change variable name to root

(cherry picked from commit 7f68b65b1b0f9eec2a6b07b02714ead0121f0e4b)

* chroot: fix bug in safe_kwargs iteration

(cherry picked from commit 39da1c69ea2781bed6e9d8e6879b70d65fa5a5b0)

* test_cmdmod: fix test_run_cwd_in_combination_with_runas

(cherry picked from commit 42640ecf161caf64c61e9b02927882f92c850092)

* test_cmdmod: add test_run_chroot_runas test

(cherry picked from commit d900035089a22f6741d2095fd1f6694597041a88)

* freezer: do not fail in cache dir is present

(cherry picked from commit 25137c51e6d6e53e3099b6cddbf51d4cb2c53d8d)

* freezer: clean freeze YAML profile on restore

(cherry picked from commit 56b97c997257f12038399549dc987b7723ab225f)

* zypperpkg: fix pkg.list_pkgs cache

The cache from pkg.list_pkgs for the zypper installer is too aggresive.
Some parameters will deliver different package lists, like root and
includes. The current cache do not take those parameters into
consideration, so the next time that this function is called, the last
list of packages will be returned, without checking if the current
parameters match the old one.

This patch create a different cache key for each parameter combination,
so the cached data will be separated too.

(cherry picked from commit 9c54bb3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants