Merge lp:~semiosis/livecd-rootfs/fix-for-1565985 into lp:livecd-rootfs
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Merged at revision: | 1419 | ||||
| Proposed branch: | lp:~semiosis/livecd-rootfs/fix-for-1565985 | ||||
| Merge into: | lp:livecd-rootfs | ||||
| Diff against target: |
165 lines (+51/-30) (has conflicts) 2 files modified
debian/changelog (+15/-0) live-build/ubuntu-cpc/hooks/042-vagrant.binary (+36/-30) Text conflict in debian/changelog |
||||
| To merge this branch: | bzr merge lp:~semiosis/livecd-rootfs/fix-for-1565985 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Steve Langasek | 2016-06-24 | Needs Fixing on 2016-07-11 | |
| Dan Watkins (community) | Approve on 2016-07-11 | ||
|
Review via email:
|
|||
Description of the Change
Several problems with the official ubuntu vagrant boxes for Xenial:
- Standard packages were missing (virtualbox-guest stuff, config management stuff)
- Box name was statically assigned, limiting to only one instance per host
- Default synced folder was disabled
This change fixes all of the above issues, except for config management.
As per discussion in #ubuntu-devel we have opened a new bug for the missing config management packages: https:/
Also cleaned up some inconsistent indentation.
Last of all, had to change the shebang to not use -u. This is because clean_loops (from functions) gets called twice and the second time (by trap) has unset variables so the build would die.
As a side note, a solution to allow clean_loops to run twice under bash -u would be to use ${var_name-} instead of ${var_name} in the two variable test lines, but that was out of scope for my issues. Just FYI.
Thank you!
| Louis Zuckerman (semiosis) wrote : | # |
| Dan Watkins (daniel-thewatkins) wrote : | # |
Hi Louis,
I've tested this using our actual build stack, and hit some issues with package installation; I'm going to try a couple of things to get it working myself, and will let you know if I make progress.
Dan
| Dan Watkins (daniel-thewatkins) wrote : | # |
Hi Louis,
Added some comments inline; this includes the change I had to make, but also a couple of other thoughts. :)
Thanks again for looking at this!
Dan
- 1413. By Louis Zuckerman on 2016-07-06
-
[ Louis Zuckerman ]
* Merged the following changes from upstream
[ Łukasz 'sil2100' Zemczak ]
* Remove the ubuntu-pd project from the scripts
* Add instead an ubuntu-touch-custom project for custom re-builds of
ubuntu-touch
[ Daniel Watkins ]
* Consolidate cloud images
- Remove .tar.gz and .tar.xz (removed in favour of the squashfs).
- Remove the MBR-only disk image in favour of the shared GPT/MBR UEFI
image.
- Remove '-disk1' from bootable image names.
[ Phil Roche ]
* Removed HWCLOCKACCESS=no from /etc/default/rcS (LP: #1581044) - 1414. By Louis Zuckerman on 2016-07-06
-
[ Louis Zuckerman ]
* Fixes for vagrant box builder in ubuntu-cpc LP: #1565985
* Remove extra packages added on 24 Jun 2016 except virtualbox-guest stuff
* Add cloud-init config to manage /etc/hosts for localhost - 1415. By Louis Zuckerman on 2016-07-06
-
fixed changelog
- 1416. By Louis Zuckerman on 2016-07-06
-
fix changelog
- 1417. By Louis Zuckerman on 2016-07-06
-
clean up changelog
| Dan Watkins (daniel-thewatkins) wrote : | # |
I've started the process of building a test box now (which, unfortunately, I probably won't complete before I have to head out this (BST) evening).
One thought: could we restore u to the hashbang and then just wrap the offending line in `set +u; ...; set -u`?
| Louis Zuckerman (semiosis) wrote : | # |
> One thought: could we restore u to the hashbang and then just wrap the
> offending line in `set +u; ...; set -u`?
The offending line in clean_loops is in the functions file. If we have to change that, wouldn't it be better to use ${var-} instead of ${var} like I mentioned earlier? That seems closer to the intention of the code, which wants to know if a variable contains a path or not.
I may not be catching your suggestion, since I'm not a bash expert. If the above isn't the offending line you have in mind then please help me understand better.
- 1418. By Louis Zuckerman on 2016-07-07
-
update changelog: Add cloud-init config to manage /etc/hosts LP: #1561250
- 1419. By Louis Zuckerman on 2016-07-07
-
remove comment from vagrant script
| Louis Zuckerman (semiosis) wrote : | # |
Just realized I forgot to point out where the new changed file goes! See below...
> # Now we can have live-build set up the workspace
>
> lb config
>
After running the `lb config` command above you'll have a /build/config directory. Replace /build/
- 1420. By Louis Zuckerman on 2016-07-11
-
updated per Steve Langasek's feedback:
- put umount in trap
- wrap comment lines at 78 chars
- remove unnecessary DEBIAN_FRONTENT env var from apt-get lines
| Adam Conrad (adconrad) wrote : | # |
Surely, virtualbox-
| Adam Conrad (adconrad) wrote : | # |
$ apt-cache show linux-image-$(uname -r) | grep ^Provides
Provides: fuse-module, ivtv-modules, kvm-api-4, linux-image, redhat-
- 1421. By Louis Zuckerman on 2016-07-21
-
remove unnecessary virtualbox-
guest-dkms package from vagrant image builder
| Louis Zuckerman (semiosis) wrote : | # |
Removed virtualbox-
| Steve Langasek (vorlon) wrote : | # |
On Thu, Jul 21, 2016 at 10:52:49AM -0000, Dan Watkins wrote:
> > === modified file 'live-build/
> > --- live-build/
> > +++ live-build/
> > @@ -70,6 +78,7 @@
> > password: ${ubuntu_user_pass}
> > chpasswd: { expire: False }
> > ssh_pwauth: True
> > +manage_etc_hosts: localhost
> OK, I've finally had time to dig in to this. We don't actually create
> user-data in 999-cpc-
> fake_cloud_init which is only called when we're creating a Raspberry Pi
> image.
Oh, of course! Sorry :)
> We _could_ investigate applying this more generally, but I think it's
> appropriate for this to be a Vagrant-only fix until such a time as we can
> investigate more fully.
Ok, fine by me.
The only remaining issue I see with this merge is that one of my earlier
review comments seems to have been misunderstood; there's still an
invocation of apt-get that's using --no-install-
needs to be accounted for. Louis, you dropped the use of
DEBIAN_
no-op at this level because you shouldn't need to set it in an individual
script, but it doesn't hurt anything. The real issue is using
--no-install-
virtualbox-
Recommends: on virtualbox-
in to our cloud image.
So this use of --no-install-
comment in the script when merging to this effect.
| Louis Zuckerman (semiosis) wrote : | # |
Steve, I just saw your last comment. I addressed the recommends issue in an earlier comment but I guess it got lost among all the changes I pushed. You're right, we need --no-install-
Thanks!
| Louis Zuckerman (semiosis) wrote : | # |
Oh ok, I now see that my comments weren't saved. I'll try to save them now. Better late than never, right?

How to use/test:
I did all my development & testing on the official xenial vagrant box (dogfooding!)
The build will exceed the space available on / on the vagrant box so I had to disable some of the other hook scripts that were unrelated.
If you have about 10 GB free on / you should be able to build all of the images in ubuntu-cpc.
Here's how...
# First, set up the build tools and workspace.
# The scripts require that you work in /build
sudo -i livecd- rootfs/ live-build/ auto .
apt-get install -y livecd-rootfs
mkdir -p /build/chroot
cd /build
cp -a /usr/share/
# All the hard work is done with live-build (lb command)
# and we have to configure it with environment variables
export SUITE=xenial archive. ubuntu. com/ubuntu/
export ARCH=amd64
export PROJECT=ubuntu-cpc
export MIRROR=http://
# Now we can have live-build set up the workspace
lb config
# If you're short on time or disk space you can disable squashfs. binary 033-disk- image-uefi. binary image-ppc64el. binary 040-qcow2- image.binary image.binary 041-vmdk- ova-image. binary
# some of the builders. Go into /build/config/hooks and
# remove these scripts which are unrelated to vagrant:
# 032-root-
# 034-disk-
# 040-vmdk-
# And finally, start the build
lb build