Fix podctl build itself

This commit is contained in:
jpic
2020-02-13 03:57:27 +01:00
parent f235db33ca
commit e80955936c
5 changed files with 64 additions and 8 deletions
-1
View File
@@ -11,4 +11,3 @@ from .pip import Pip # noqa
from .run import Run # noqa
from .template import Append, Template # noqa
from .user import User # noqa
from .uwsgi import uWSGI # noqa
+4 -4
View File
@@ -14,12 +14,12 @@ class Copy:
self.owner = script.variable('user')
async def build(self, script):
await script.run(f'sudo mkdir -p {self.dst}')
await script.crexec(f'mkdir -p {self.dst}')
for item in self.src:
await script.append(f'cp -a {item} $mnt{self.dst}')
await script.exec(f'cp -a {item} {script.mnt}{self.dst}')
if self.mode:
await script.run(f'sudo chmod {self.mode} $mnt{self.dst}')
await script.crexec(f'chmod {self.mode} {script.mnt}{self.dst}')
if self.owner:
await script.run(f'sudo chown -R {self.owner} $mnt{self.dst}')
await script.crexec(f'chown -R {self.owner} {script.mnt}{self.dst}')
+3 -3
View File
@@ -29,9 +29,9 @@ class Packages:
install='apt-get -y --no-install-recommends install',
),
dnf=dict(
update='dnf update',
upgrade='dnf upgrade --exclude container-selinux --best --assumeyes', # noqa
install='dnf install --exclude container-selinux --setopt=install_weak_deps=False --best --assumeyes', # noqa
update='dnf makecache --assumeyes',
upgrade='dnf upgrade --best --assumeyes --skip-broken', # noqa
install='dnf install --setopt=install_weak_deps=False --best --assumeyes', # noqa
),
yum=dict(
update='yum update',