All of lore.kernel.org
 help / color / mirror / Atom feed
* [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks
@ 2019-12-10 14:51 Fabiano Rosas
  2019-12-10 14:51 ` [Virtio-fs] [PATCH 1/2] build-rootfs: Fix fedora build Fabiano Rosas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabiano Rosas @ 2019-12-10 14:51 UTC (permalink / raw)
  To: virtio-fs

Some improvements for the rootfs build:

- first patch fixes the rootfs build in Fedora

- second patch makes the bootstrap tool selection according to distro
  automatically


Fabiano Rosas (2):
  build-rootfs: Fix fedora build
  build-rootfs: Select bootstrap command based on build machine distro

 build-rootfs.sh | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

--
2.23.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Virtio-fs] [PATCH 1/2] build-rootfs: Fix fedora build
  2019-12-10 14:51 [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks Fabiano Rosas
@ 2019-12-10 14:51 ` Fabiano Rosas
  2019-12-10 14:51 ` [Virtio-fs] [PATCH 2/2] build-rootfs: Select bootstrap command based on build machine distro Fabiano Rosas
  2019-12-17 19:18 ` [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Fabiano Rosas @ 2019-12-10 14:51 UTC (permalink / raw)
  To: virtio-fs

Ensure that the rootfs build in Fedora finishes without errors.

- include wget in the rootfs
- fix dnf install command line
- include a resolv.conf

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
 build-rootfs.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build-rootfs.sh b/build-rootfs.sh
index c23656c..f616981 100755
--- a/build-rootfs.sh
+++ b/build-rootfs.sh
@@ -6,7 +6,7 @@
 # Copyright (C) 2019 Red Hat, Inc.
 
 FEDORA_RELEASE=30
-FEDORA_PACKAGES="system-release vim-minimal systemd passwd dnf rootfiles autoconf automake gcc make git perl-Test-Harness tar"
+FEDORA_PACKAGES="system-release vim-minimal systemd passwd dnf rootfiles autoconf automake gcc make git perl-Test-Harness tar wget"
 
 DEBIAN_PACKAGES="vim-tiny autoconf automake gcc libc6-dev make git perl tar ca-certificates wget"
 
@@ -24,7 +24,8 @@ run_in_rootfs() {
 umask 022
 rm -rf rootfs
 mkdir rootfs
-#dnf "--installroot=$PWD/rootfs" "--releasever=$FEDORA_RELEASE" --assumeyes install $PACKAGES
+#dnf "--installroot=$PWD/rootfs" "--releasever=$FEDORA_RELEASE" --assumeyes install $FEDORA_PACKAGES
+#install -D -m 0644 /etc/resolv.conf "$PWD/rootfs/etc/"
 debootstrap --include="$DEBIAN_PACKAGES" stable "$PWD/rootfs"
 install -D -m 0755 run-test-in-guest.sh "$PWD/rootfs/root/"
 install -D -m 0644 run-test.service "$PWD/rootfs/etc/systemd/system/"
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Virtio-fs] [PATCH 2/2] build-rootfs: Select bootstrap command based on build machine distro
  2019-12-10 14:51 [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks Fabiano Rosas
  2019-12-10 14:51 ` [Virtio-fs] [PATCH 1/2] build-rootfs: Fix fedora build Fabiano Rosas
@ 2019-12-10 14:51 ` Fabiano Rosas
  2019-12-17 19:18 ` [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Fabiano Rosas @ 2019-12-10 14:51 UTC (permalink / raw)
  To: virtio-fs

Read the distro id from /etc/os-release and use the correct bootstrap
command.

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
 build-rootfs.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/build-rootfs.sh b/build-rootfs.sh
index f616981..3b109a8 100755
--- a/build-rootfs.sh
+++ b/build-rootfs.sh
@@ -24,9 +24,15 @@ run_in_rootfs() {
 umask 022
 rm -rf rootfs
 mkdir rootfs
-#dnf "--installroot=$PWD/rootfs" "--releasever=$FEDORA_RELEASE" --assumeyes install $FEDORA_PACKAGES
-#install -D -m 0644 /etc/resolv.conf "$PWD/rootfs/etc/"
-debootstrap --include="$DEBIAN_PACKAGES" stable "$PWD/rootfs"
+
+source /etc/os-release
+if [[ "$ID $ID_LIKE" =~ "fedora" ]]; then
+	dnf "--installroot=$PWD/rootfs" "--releasever=$FEDORA_RELEASE" --assumeyes install $FEDORA_PACKAGES
+	install -D -m 0644 /etc/resolv.conf "$PWD/rootfs/etc/"
+elif [[ "$ID $ID_LIKE" =~ "debian" ]]; then
+	debootstrap --include="$DEBIAN_PACKAGES" stable "$PWD/rootfs"
+fi
+
 install -D -m 0755 run-test-in-guest.sh "$PWD/rootfs/root/"
 install -D -m 0644 run-test.service "$PWD/rootfs/etc/systemd/system/"
 run_in_rootfs /bin/bash -c "cd /root && git clone https://github.com/pjd/pjdfstest && cd pjdfstest && autoreconf -ifs && ./configure && make pjdfstest"
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks
  2019-12-10 14:51 [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks Fabiano Rosas
  2019-12-10 14:51 ` [Virtio-fs] [PATCH 1/2] build-rootfs: Fix fedora build Fabiano Rosas
  2019-12-10 14:51 ` [Virtio-fs] [PATCH 2/2] build-rootfs: Select bootstrap command based on build machine distro Fabiano Rosas
@ 2019-12-17 19:18 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2019-12-17 19:18 UTC (permalink / raw)
  To: Fabiano Rosas; +Cc: virtio-fs

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

On Tue, Dec 10, 2019 at 11:51:03AM -0300, Fabiano Rosas wrote:
> Some improvements for the rootfs build:
> 
> - first patch fixes the rootfs build in Fedora
> 
> - second patch makes the bootstrap tool selection according to distro
>   automatically
> 
> 
> Fabiano Rosas (2):
>   build-rootfs: Fix fedora build
>   build-rootfs: Select bootstrap command based on build machine distro
> 
>  build-rootfs.sh | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> --
> 2.23.0
> 

Thanks, applied!

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-17 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 14:51 [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks Fabiano Rosas
2019-12-10 14:51 ` [Virtio-fs] [PATCH 1/2] build-rootfs: Fix fedora build Fabiano Rosas
2019-12-10 14:51 ` [Virtio-fs] [PATCH 2/2] build-rootfs: Select bootstrap command based on build machine distro Fabiano Rosas
2019-12-17 19:18 ` [Virtio-fs] [PATCH 0/2] virtio-fs-ci: build-rootfs tweaks Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.