Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Ubuntu rootfs #59

Closed
wants to merge 2 commits into from
Closed

Ubuntu rootfs #59

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 8, 2018

Support for ubuntu rootfs

-v "${kernel_mod_dir}":"${kernel_mod_dir}" \
-v "${GOPATH}":"${GOPATH}" \
--privileged \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debootstrap needs chroot Is there another way of doing this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it mounting any special device or why chroot need it ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think debootstrap first downloads the rootfs then chroots into it then mounts file systems and then installs packages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are fakeroot and fakechroot packages. I had a quick play around but they didn't allow me to run debootstrap successfully ;(

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will go through them and get back soon.

Thanks

elif check_program "debootstrap" ; then
PKG_MANAGER="debootstrap"
else
die "debootstrap is not installed"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block specifies debootstrap quite a few times. Could you maybe add a variable to rootfs-builder/ubuntu/config.sh and use that variable in all these places?

@@ -0,0 +1,17 @@
#
# Copyright (c) 2017 Intel Corporation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new file so should show 2018 but also your name/or company right @grahamwhaley ? Same comment for the other new files.

# This will install the proper golang to build Kata components
@INSTALL_GO@


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: multiple blank lines here and below in various places.

ARCHIVE_URL=${ARCHIVE_URL:-"http://archive.ubuntu.com/ubuntu/"}

# this should be ubuntu's codename eg Xenial for 16.04
OS_NAME=${OS_NAME:-"xenial"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really a comment specific to this PR - just a reminder to all...

I appreciate this is following the existing convention, but we do all need to think about how we'll manage these versions and code names as one day, they will become invalid.

See:

For osbuilder, we could create a special build target which called a shell script and checked ARCHIVE_URL + OS_NAME maybe (and there are bound to be distro-specific bits to add to that). But we could then atleast call this build rule as part of the CI.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we should have a mechanism to detect EOL distro version.....However I won't be able to work on that issue before 17th(have my exams till then) I can hopefully work on it after that, if the issue is not already resolved by then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ydjainopensource - thanks. I added this comment as your PR just reminded me of the general issue. Please don't feel you have to work on that feature unless it's something that interests you ;)

I suspect there will need to be a bit of discussion about how best to solve this problem for all the distros we handle but it is something that has "caught us out" before so it would be good to find a general and robust solution to the problem.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I loved love to work on it. Do you have any ideas as to how we should go about tackling them? I have worked only on apt based distros.

@ghost ghost changed the title [WIP] Ubuntu rootfs Ubuntu rootfs Feb 10, 2018
@ghost
Copy link
Author

ghost commented Feb 10, 2018

I have removed the WIP tag since I had kept it as I was looking for an alternative to running debootstrap without a privileged container. I have also changed and squashed the PR to include the suggested fixes

Yash Jain added 2 commits February 21, 2018 23:22
Ubuntu rootfs using debootstrap with support for extra packages

Fixes #32

Signed-off-by: Yash Jain <[email protected]>
Signed-off-by: Yash Jain <[email protected]>
@jodh-intel
Copy link
Contributor

jodh-intel commented Feb 22, 2018

lgtm

Approved with PullApprove

@ghost
Copy link
Author

ghost commented Feb 22, 2018

I think the CI is failing due to some network error issue...can someone confirm?

@grahamwhaley
Copy link
Contributor

Looks like an Euleros repo timeout/failure?

# Downloading packages:
# http://developer.huawei.com/ict/site-euleros/euleros/repo/yum/2.2/os/x86_64/updates/gcc-4.8.5-4.h2.x86_64.rpm: [Errno 14] curl#18 - "transfer closed with 4311628 bytes remaining to read"
# Trying other mirror.
# 
# 
# Error downloading packages:
#   gcc-4.8.5-4.h2.x86_64: [Errno 256] No more mirrors to try.
# 
# The command '/bin/sh -c yum -y update && yum install -y yum git make gcc' returned a non-zero code: 1

@jodh-intel
Copy link
Contributor

Yep - we really need #56 to land...

@jodh-intel
Copy link
Contributor

Now #56 is merged (cough...), I've re-started Travis so fingers crossed...

/cc @jcvenegas.

@jodh-intel
Copy link
Contributor

Hi @ydjainopensource - any update on this PR? It needs a rebase now.

@ghost
Copy link
Author

ghost commented May 6, 2018

Sorry for the late reply. I have been busy lately and hence haven't been able to work on this.
So I am closing this PR for now.

@ghost ghost closed this May 6, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants