Skip to content

Various build fixes #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

matthijskooijman
Copy link
Member

This PR fixes a few things:

This reverts commit 89dcd1c.

The commit didn't really solve the problem (it stopped making
SOURCE_DATE_EPOCH available for all commands) and broke building using
sudo by removing the SUDO variable for no apparent reason.
Previously, it would be based on the git version of this repo, which
isn't quite correct. Also, when running the build using the Dockerfile,
the .git directory of this repo would not be available, so no date could
be determined, which might break the build.

This should fix Webconverger#23 again.
When building a hdd image, syslinux is used. However, there seems to
be some kind of locking or timing issue, that causes the "sylinux"
command to fail:

	P: Copying binary contents into image...
	plain floppy: device "/proc/27467/fd/3" busy (Resource temporarily unavailable):
	Cannot initialize 'S:'
	Bad target s:/ldlinux.sys
	syslinux: failed to create ldlinux.sys

Note that the first two error messages are normal, the "Bad target"
error message is particular to this issue.

I have never figured out what the actual cause is, but it turns out that
adding a second sleep before the mcopy command (which is called by the
syslinux command) prevents this problem from occuring.

This commit adds a wrapper script for the mcopy command that does
exactly this.
There was an extra pair of parenthesis which bash didn't mind, but
breaks with dash.
It seems this script was written for an sha1sum command that only
returns the sum, but my version also returns the filename. This should
now work for both.
This command then shows the UUID from the VirtualBox database, which is
exactly what we need (since that is the UUID that VirtualBox expects to
be able to run without error). If the VDI file is not registered with
VirtualBox, it just shows the UUID from the current file, if any.

This change means the VDI file no longer needs to be kept around, it can
be removed and recreated later without problems.
@matthijskooijman
Copy link
Member Author

I just added two more commits that allow removing the VDI (virtualbox) file and recreating it later with the correct UUID.

@matthijskooijman
Copy link
Member Author

@kaihendry, did you ever have a look at this PR? It has some changes that make the build run better on some systems, I think (and makes it properly run using sudo again).

Without this, binary_iso (from live-build 1:20191221) fails because this
directory is missing. This is due to a change in live-build, for a fix
and a reference to the breaking commit, see
https://salsa.debian.org/live-team/live-build/-/merge_requests/219?

This is a bit of a workaround, and it can be reverted if the above merge
request is merged before bullseye is released (the buster version does
not seem to have this problem).
This works like the build-vbox-hdd target, but creates a qcow2 HDD image
for use with virt-manager.
@matthijskooijman
Copy link
Member Author

I added one more commit to work around a bug in the bullseye version of live-build, and one to add qemu hdd build support that I still had lying around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant