Skip to content

Commit

Permalink
mock: use shadow-utils on host, not in chroot
Browse files Browse the repository at this point in the history
The trick is that the {user,group}{add,del} commands can be executed
on host with `--prefix <chroot>` nowadays.

This commit removes one unnecessary dependency from the minimal
buildroot, so the 'shadow-utils' are removed from all the configs.
The good thing is also that we don't need a hacks around the potentially
obsolescent '/sbin/useradd' utility (the `config_opts['useradd']`
option) because since Mock v3 we support only RHEL 8 hosts and newer.

The `_make_build_user()` was renamed to `_make_users()`, but the
unnecessary side-effect of homedir cleanup was cut-out as a separate
method `_cleanup_homedir` that needs to be called only before build, not
for normal `mock --init` or `mock --shell`.  But we can otherwise
re-create the users in-chroot for every single mock run to assure the
UID/GID match the requirements.

The `chown_home_dir` used to be called in some unclear conditions, but
that call can not cause any harm and gives us guarantees that homedir is
readable by `mockbuilder`.  We newly call it everytime.

The `_setup_build_dirs()` is called a bit later for the `prebuild ==
True` case to align with `not self.chroot_was_initialized`.  But this
shouldn't have any real consequence (we call `chown_home_dir()` anyway).

There's one different thing.  We we don't do `userdel -r` anymore for
mockbuilder.  This shouldn't be needed, because when user is really
re-created (prebuild == True), we already did `_cleanup_homedir()`.
The other thing is that before we `useradd`, we already have `/builddir`
pre-created -> so useradd doesn't create `.bashrc`, etc.  We can iterate
on this, but it doesn't seem to be Mock's responsibility.

Fixes: #1102
Closes: #1103
  • Loading branch information
praiskup authored and xsuchy committed Jul 24, 2023
1 parent 895ba17 commit a34d3ae
Show file tree
Hide file tree
Showing 32 changed files with 119 additions and 78 deletions.
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/eol/templates/centos-6.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This list is taken from 'epel-6-x86_64' @buildsys-build group, minus the
# 'epel-*' specific stuff.
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed tar unzip util-linux-ng which xz'

config_opts['dist'] = 'el6' # only useful for --resultdir variable subst
# beware RHEL uses 6Server or 6Client
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/eol/templates/centos-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/eol/templates/rhel-6.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This list is taken from 'epel-6-x86_64' @buildsys-build group, minus the
# 'epel-*' specific stuff.
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed tar unzip util-linux-ng which xz'

config_opts['dist'] = 'el6' # only useful for --resultdir variable subst
# beware RHEL uses 6Server or 6Client
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/almalinux-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8.alma' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/almalinux-9.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils redhat-release findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils redhat-release findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'
config_opts['dist'] = 'el9.alma' # only useful for --resultdir variable subst
config_opts['releasever'] = '9'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/amazonlinux-2023.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config_opts['root'] = 'amazonlinux-2023-{{ target_arch }}'
config_opts['chroot_setup_cmd'] = 'install system-release bash bzip2 coreutils cpio diffutils findutils gawk glibc-minimal-langpack grep gzip info patch rpm-build sed shadow-utils system-rpm-config tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install system-release bash bzip2 coreutils cpio diffutils findutils gawk glibc-minimal-langpack grep gzip info patch rpm-build sed system-rpm-config tar unzip util-linux which xz'
config_opts['dist'] = 'amzn2023' # only useful for --resultdir variable subst
config_opts['plugin_conf']['ccache_enable'] = False
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/anolis-7.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config anolis-release rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config anolis-release rpm-build sed tar unzip util-linux which xz'

config_opts['dist'] = 'an7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/anolis-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config anolis-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config anolis-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'an8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/centos-7.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This list is taken from 'epel-7-x86_64' @buildsys-build group, minus the
# 'epel-*' specific stuff.
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'

config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/centos-stream-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/centos-stream-9.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar redhat-rpm-config redhat-release which xz sed make bzip2 gzip coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep glibc-minimal-langpack'
config_opts['chroot_setup_cmd'] = 'install tar redhat-rpm-config redhat-release which xz sed make bzip2 gzip coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep glibc-minimal-langpack'
config_opts['dist'] = 'el9' # only useful for --resultdir variable subst
config_opts['releasever'] = '9'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/circlelinux-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/eurolinux-8.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# EuroLinux open buildroots
# Note: perl modules are broken by design

config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/eurolinux-9.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EuroLinux open buildroots

config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el9' # only useful for --resultdir variable subst
config_opts['releasever'] = '9'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/fedora-eln.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config_opts['root'] = 'fedora-eln-{{ target_arch }}'
# Note that similar idiom used in fedora-branched.tpl and fedora-rawhide.tpl.
config_opts['mirrored'] = config_opts['target_arch'] != 'i686'

config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils fedora-release-eln findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils fedora-release-eln findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'

config_opts['dist'] = 'eln' # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/navy-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config system-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config system-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/openeuler-20.03.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ openEuler-rpm-config openEuler-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ openEuler-rpm-config openEuler-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'oe2003' # only useful for --resultdir variable subst
config_opts['releasever'] = '20.03LTS_SP3'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/openeuler-22.03.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ openEuler-rpm-config openEuler-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ openEuler-rpm-config openEuler-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'oe2203' # only useful for --resultdir variable subst
config_opts['releasever'] = '22.03LTS_SP1'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/oraclelinux-7.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This list is taken from 'epel-7-x86_64' @buildsys-build group, minus the
# 'epel-*' specific stuff.
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make oraclelinux-release patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make oraclelinux-release patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'

config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/oraclelinux-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release oraclelinux-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release oraclelinux-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/oraclelinux-9.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar redhat-rpm-config redhat-release oraclelinux-release which xz sed make bzip2 gzip coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep glibc-minimal-langpack'
config_opts['chroot_setup_cmd'] = 'install tar redhat-rpm-config redhat-release oraclelinux-release which xz sed make bzip2 gzip coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep glibc-minimal-langpack'
config_opts['dist'] = 'el9' # only useful for --resultdir variable subst
config_opts['releasever'] = '9'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/rhel-7.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7Server'
config_opts['package_manager'] = 'yum'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/rhel-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['releasever'] = '8'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/rhel-9.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils redhat-release findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils redhat-release findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'
config_opts['releasever'] = '9'
config_opts['dist'] = 'el{{ releasever }}' # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/rocky-8.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip diffutils cpio bash gawk rpm-build info patch util-linux findutils grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/rocky-9.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils redhat-release findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils redhat-release findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'
config_opts['dist'] = 'el9' # only useful for --resultdir variable subst
config_opts['releasever'] = '9'
config_opts['package_manager'] = 'dnf'
Expand Down
2 changes: 1 addition & 1 deletion mock-core-configs/mock-core-configs.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Provides: mock-configs
# distribution-gpg-keys contains GPG keys used by mock configs
Requires: distribution-gpg-keys >= 1.85
# specify minimal compatible version of mock
Requires: mock >= 4.1.post1
Requires: mock >= 4.1.post2
Requires: mock-filesystem

Requires(post): coreutils
Expand Down
3 changes: 0 additions & 3 deletions mock/docs/site-defaults.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@
# config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
# @buildsys-build is comps group defined by Fedora
# for chroot_setup_cmd we actually need those packages:
# * shadow-utils - mock needs /usr/sbin/useradd from this package
# * rpm-build - mock needs /usr/bin/rpmbuild
# * glibc-minimal-langpack - this is optional, but helps to avoid
# installation of huge glibc-all-langpacks.
Expand Down Expand Up @@ -568,8 +567,6 @@
# name of the group inside of chroot
# config_opts['chrootgroup'] = 'mock'

# config_opts['useradd'] = '/usr/sbin/useradd -o -m -u {{chrootuid}} -g {{chrootgid}} -d {{chroothome}} -N {{chrootuser}}'
#
# Security related
# config_opts['no_root_shells'] = False
#
Expand Down
3 changes: 2 additions & 1 deletion mock/mock.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Summary: Builds packages inside chroots
Name: mock
Version: 4.1.post1
Version: 4.1.post2
Release: 1%{?dist}
License: GPL-2.0-or-later
# Source is created by
Expand Down Expand Up @@ -100,6 +100,7 @@ BuildRequires: perl
Requires: util-linux
Requires: coreutils
Requires: procps-ng
Requires: shadow-utils


%description
Expand Down
Loading

0 comments on commit a34d3ae

Please sign in to comment.