[lxc-devel] [distrobuilder/master] Fix CentOS 7
monstermunchkin on Github
lxc-bot at linuxcontainers.org
Fri Jun 29 12:52:02 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 351 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180629/d639d62a/attachment.bin>
-------------- next part --------------
From 3bbb4ebf36d9a4154054179bc94613f687302ca7 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 29 Jun 2018 09:49:55 +0200
Subject: [PATCH 1/2] sources: Mount CentOS iso read-only
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
sources/centos-http.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sources/centos-http.go b/sources/centos-http.go
index e265fcd..5b5cf87 100644
--- a/sources/centos-http.go
+++ b/sources/centos-http.go
@@ -81,7 +81,7 @@ func (s CentOSHTTP) unpack(filePath, rootfsDir string) error {
defer os.RemoveAll(filepath.Join(os.TempDir(), "distrobuilder"))
// this is easier than doing the whole loop thing ourselves
- err := shared.RunCommand("mount", filePath, isoDir)
+ err := shared.RunCommand("mount", "-o", "ro", filePath, isoDir)
if err != nil {
return err
}
From 8348c1b34350fc5cb0f72b9c6edd228a6d0bd172 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 29 Jun 2018 14:48:35 +0200
Subject: [PATCH 2/2] doc: Fix CentOS 7 post-unpack
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
doc/examples/centos | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/examples/centos b/doc/examples/centos
index e6d69a8..9d19ae6 100644
--- a/doc/examples/centos
+++ b/doc/examples/centos
@@ -64,8 +64,8 @@ actions:
action: |-
#!/bin/sh
cd /mnt/cdrom/Packages
- rpm -ivh --nodeps rpm-4.11.3-25.el7.x86_64.rpm
- rpm -ivh --nodeps yum-3.4.3-154.el7.centos.noarch.rpm
+ rpm -ivh --nodeps $(ls rpm-*.rpm | head -n1)
+ rpm -ivh --nodeps $(ls yum-*.rpm | head -n1)
# add cdrom repo
mkdir -p /etc/yum.repos.d
More information about the lxc-devel
mailing list