Accepting request 692303 from home:jengelh:branches:Virtualization:containers
- %pre bash features: replace by POSIX equivalents. - %build bash features: add %_buildshell definition for it. - Do not igonre errors from groupadd. OBS-URL: https://build.opensuse.org/request/show/692303 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=7
This commit is contained in:
parent
62ce3a04e8
commit
f4f011f862
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 13:18:50 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- %pre bash features: replace by POSIX equivalents.
|
||||
- %build bash features: add %_buildshell definition for it.
|
||||
- Do not igonre errors from groupadd.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 5 19:13:48 UTC 2019 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
|
9
lxd.spec
9
lxd.spec
@ -15,6 +15,7 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define _buildshell /bin/bash
|
||||
%define import_path github.com/lxc/lxd
|
||||
|
||||
Name: lxd
|
||||
@ -240,12 +241,12 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
||||
|
||||
%pre
|
||||
# Group which owns the lxd socket, which allows people to administer it.
|
||||
getent group %{name} &>/dev/null || groupadd -r %{name} ||:
|
||||
getent group %{name} >/dev/null || groupadd -r %{name}
|
||||
|
||||
# /etc/sub[ug]id should exist already (it's part of shadow-utils), but older
|
||||
# distros don't have it. LXD just parses it and doesn't need any special
|
||||
# shadow-utils helpers.
|
||||
touch /etc/sub{u,g}id ||:
|
||||
touch /etc/subuid /etc/subgid || :
|
||||
|
||||
# Add sub[ug]ids for LXD's unprivileged containers -- in order to support
|
||||
# isolated containers we add quite a few subuids. Since LXD runs as root we add
|
||||
@ -260,9 +261,9 @@ touch /etc/sub{u,g}id ||:
|
||||
#
|
||||
# This default setting of 500 million is enough for ~8000 isolated containers,
|
||||
# which should be enough for most users.
|
||||
grep '^root:' /etc/subuid &>/dev/null || \
|
||||
grep -q '^root:' /etc/subuid 2>/dev/null || \
|
||||
usermod -v 400000000-900000000 root ||:
|
||||
grep '^root:' /etc/subgid &>/dev/null || \
|
||||
grep -q '^root:' /etc/subgid 2>/dev/null || \
|
||||
usermod -w 400000000-900000000 root ||:
|
||||
|
||||
%service_add_pre %{name}.service
|
||||
|
Loading…
Reference in New Issue
Block a user