linutronix / elbe Goto Github PK
View Code? Open in Web Editor NEWEmbedded Linux Build Environment
Home Page: https://elbe-rfs.org
License: GNU General Public License v3.0
Embedded Linux Build Environment
Home Page: https://elbe-rfs.org
License: GNU General Public License v3.0
% ./elbe initvm submit examples/x86_64-pc-hdimg-gnome3.xml --keep-files --skip-build-bin --skip-build-sources
elbe control create_project failed.
Server returned error:
project in directory /var/cache/elbe/8c3888f4-4652-4ae8-82ed-6f98c71a3545 of user root is currently busy and cannot be closed
Giving up
This is because the soap daemon holds a single project-manager instance. I think we need to extend the project manager handling mulitple projects.
Similar code found in 4 other locations
https://codeclimate.com/github/Linutronix/elbe/elbepack/db.py#issue_568e29e2b1957d0001889365
cp: error writing '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/cache/apt/srcpkgcache.bin': No space left on device
cp: failed to extend '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/cache/apt/srcpkgcache.bin': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/cache/apt/archives': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/cache/debconf': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/cache/ldconfig': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/cache/man': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/cache/elbe': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/tmp': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/spool': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/log': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/local': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/backups': No space left on device
cp: cannot create directory '/var/cache/elbe/c2235b79-a071-4857-9d75-13167b6bb48c/imagemnt/var/opt': No space left on device
When creating an image with , elbe creates a grub configuration
that passes 'root=/dev/poop1' on the kernel command line.
Funny? Yes.
Useful? No.
Thanks,
Richard
Running 'elbe chg_archive' does not preserve xml comments but rather deletes
them without any kind of warning. This command really should be polite and leave
the comments alone when updating the section. After all, somebody's
important notes or other critical information may be in the comment blocks.
Thanks,
Richard
Similar code found in 3 other locations
It would be nice to be able to copy a file from the rfs to the build directory.
The bash prompt is not modified if 'elbe chroot' is called to enter the target or buildimg RFS.
It would be very helpful to generate a prompt including the architecture and projectname/version of the target.
elbe init / make / relies on the files-to-extract file, however this file is no longer generated.
large XML file (88M) causes error on elbe initvm submit:
$ elbe initvm submit castellum.xml
elbe control create_project failed.
Traceback (most recent call last):
File "/usr/bin/elbe", line 61, in
cmdmod.run_command( sys.argv[2:] )
File "/usr/lib/python2.7/dist-packages/elbepack/commands/control.py", line 102, in run_command
action.execute (control, opt, args[1:])
File "/usr/lib/python2.7/dist-packages/elbepack/soapclient.py", line 171, in execute
print (client.service.create_project ( xml_base64 ))
File "/usr/lib/python2.7/dist-packages/suds/client.py", line 542, in call
return client.invoke(args, kwargs)
File "/usr/lib/python2.7/dist-packages/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/usr/lib/python2.7/dist-packages/suds/client.py", line 641, in send
reply = transport.send(request)
File "/usr/lib/python2.7/dist-packages/suds/transport/https.py", line 64, in send
return HttpTransport.send(self, request)
File "/usr/lib/python2.7/dist-packages/suds/transport/http.py", line 77, in send
fp = self.u2open(u2request)
File "/usr/lib/python2.7/dist-packages/suds/transport/http.py", line 118, in u2open
return url.open(u2request, timeout=tm)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>
Giving up
$
elbe github frontpage talks about elbe init
% elbe initvm create --directory=/scratch/elbe (15:16 - 15-06-23)
/scratch/elbe
Reading package lists... Done
Building dependency tree... Done
No keyring installed in /tmp/tmpS0o6XI/etc/apt/trusted.gpg.d/.No keyring installed in /tmp/tmpS0Reading package lists... Done
Building dependency tree... Done
No keyring installed in /tmp/tmpS0o6XI/etc/apt/trusted.gpg.d/.No keyring installed in /tmp/tmpS0o6XI/etc/apt/trusted.gpg.d/.Traceback (most recent call last):
File "/usr/bin/elbe", line 61, in
cmdmod.run_command( sys.argv[2:] )
File "/usr/lib/python2.7/dist-packages/elbepack/commands/init.py", line 148, in run_command
copy_kinitrd(xml.node("/initvm"), out_path, defs, arch="amd64")
File "/usr/lib/python2.7/dist-packages/elbepack/pkgutils.py", line 156, in copy_kinitrd
uri = get_initrd_uri(prj, defs, arch)
File "/usr/lib/python2.7/dist-packages/elbepack/pkgutils.py", line 115, in get_initrd_uri
uri = x.archive_uri(r.filename)
AttributeError: 'NoneType' object has no attribute 'archive_uri'
'elbe init' Failed
Giving up
Similar code found in 4 other locations
There are many places where the elbe-daemon will simply print() an error and then sys.exit(). For example, if an invalid buildtype is specified in the XML. This is a problem because:
for systemd its ok to do
etc/systemd/system/getty.target.wants/[email protected]/rm>
in finetuning
but for sysv-init its more complicated
/dev is in use during generation of ubi-image. So it ould not be moved to a new directory and is therefore not included in the ubi-image.
Similar code found in 3 other locations
https://codeclimate.com/github/Linutronix/elbe/elbepack/db.py#issue_568e29e397e18c000119d6b2
Similar code found in 3 other locations
if the connection to a repository gets broken during a build, rpcaptcache throws an exception that isn't
caught anywhere, so elbe buildchroot terminates with a backtrace. If it was an inital build, /etc/elbe_version was not written, but the system may be debootstraped. Another call to 'elbe buildchroot' is not able to detect this status correctly and so the project is in an unusable state.
elbe initvm create examples/bbb-jessie.xml
....
elbe initvm create elbe-build-*/bin-cdrom.iso
...
if the attached xml file is used with 'elbe buildchroot -o bla.log -t bla --build-sources --skip-cdrom bla.xml' no source cdrom is generated. However if afterwards 'elbe mkcdrom bla' is called the cdrom
is generated correctly.
<ns0:RootFileSystem xmlns:ns0="https://www.linutronix.de/projects/Elbe" xmlns:xs
i="http://www.w3.org/2001/XMLSchema-instance" created="2009-05-20T08:50:56" revi
sion="6" xsi:schemaLocation="https://www.linutronix.de/projects/Elbe dbsfed.xsd"
<project> <name>src-test</name> <version>1</version> <description> bla </description> <buildtype>i386</buildtype> <mirror> <primary_host>ftp.de.debian.org</primary_host> <primary_path>/debian</primary_path> <primary_proto>http</primary_proto> <url-list> <url> <source> http://ftp.de.debian.org/debian wheezy main </source> </url> </url-list> </mirror> <noauth/> <suite>wheezy</suite> </project> <target> <hostname>lx-training</hostname> <domain>tec.linutronix.de</domain> <passwd>root</passwd> <console>ttyS0,115200</console> <pkg-list> <pkg>bash</pkg> </pkg-list> </target>
/ns0:RootFileSystem
Select and install software ... 10%... 27%... 31%... 40%... 50%... 61%... 70%... 80%... 90%... 100%
Installing GRUB boot loader ... 16%... 33%... 50%... 66%... 83%... 100%
The system is going down NOW!.. 12%... 20%... 33%... 41%... 50%... 62%... 70%... 83%... 91%
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
[ 499.033275] reboot: Restarting system
mkdir -p .stamps
touch .stamps/stamp-install-initial-image
Uploading CDROM. This might take a while
Upload finished
Fri Feb 5 08:19:26 2016-- project still busy, waiting
Build finished !
Server returned error:
OSError: [Errno 2] No such file or directory: '/var/cache/elbe/2d9bf523-8378-4731-a79d-36047416eb3e/validation.txt'
Project failed to generate validation.txt
Getting log.txt
Enqueueing project for build
Build started
report timestamp: 20160205-071925
running cmd +mkdir -p "/var/cache/elbe/2d9bf523-8378-4731-a79d-36047416eb3e/chroot"+
getting output from cmd +dpkg --print-architecture+
running cmd +mkdir -p "/var/cache/elbe/2d9bf523-8378-4731-a79d-36047416eb3e/chroot/cdrom"+
I: Retrieving Release
I: Retrieving Release.gpg
Command failed with errorcode 1
running cmd +umount "/var/cache/elbe/2d9bf523-8378-4731-a79d-36047416eb3e/chroot/cdrom"+
Build failed !!!
Debootstrap failed to install the base rootfilesystem.
Probable cause might be:
the code is flexible enough, just reworking the XML schema is needed
Similar code found in 3 other locations
https://codeclimate.com/github/Linutronix/elbe/elbepack/soapclient.py#issue_568e29e2dae62c000119f3d3
If a mirror is used, that doesn't contain the source packages, the source CDROM can't be generated.
However the resulting error messages are very confusing.
Please improve validation that runs before the buld, that it checks if the source mirrors are availbable
if --skip-build-sources wasn't specified.
Installing GRUB boot loader ... 16%... 33%... 50%... 66%... 83%... 100%
The system is going down NOW!.. 13%... 22%... 31%... 40%... 50%... 63%... 72%... 81%... 90%
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
[ 610.013885] reboot: Restarting system
mkdir -p .stamps
touch .stamps/stamp-install-initial-image
XML file is inavlid: Repository http://10.0.2.2//debian/dists/jessie/Release can not be validated
termi@Ubuntu12:~/elbe-v1$ ./elbe initvm submit ./testlinux.xml
Build started, waiting till it finishes
Tue Mar 8 15:03:31 2016-- project still busy, waiting
Tue Mar 8 15:03:36 2016-- project still busy, waiting
Tue Mar 8 15:03:41 2016-- project still busy, waiting
...
Build finished !
Server returned error:
OSError: [Errno 2] No such file or directory: '/var/cache/elbe/59969b01-165f-400d-8940-3bb0006401e0/validation.txt'
Project failed to generate validation.txt
Getting log.txt
Enqueueing project for build
Build started
report timestamp: 20160308-140329
running cmd +mkdir -p "/var/cache/elbe/59969b01-165f-400d-8940-3bb0006401e0/chroot"+
getting output from cmd +dpkg --print-architecture+
I: Retrieving Release
I: Retrieving Release.gpg
...
I: Configuring systemd...
running cmd +chroot /var/cache/elbe/59969b01-165f-400d-8940-3bb0006401e0/chroot debconf-set-selections < /var/cache/elbe/59969b01-165f-400d-8940-3bb0006401e0/chroot/var/cache/elbe/preseed.txt+
update cache failed
Build failed !!!
Failed to build the Apt Cache.
Not all Mirror Index Files could be downloaded.
Probable cause might be:
the steps i have done:
i tried these steps already on three diffrent Systems:
the results were always the same. it was not possible to run the image-file in graphical mode.
Grub and linux booted well. but Init hangs in its last step!!
Trying to build an image with stable failed silently:
...
Package List validation
-----------------------
No Errors found
Getting generated Files
Saving generated Files to elbe-build-20160202-181513
source.xml (Current source.xml of the project)
cdrom.cpio (Image)
licence.txt (License file)
validation.txt (Package list validation result)
elbe-report.txt (Report)
log.txt (Log file)
$
Looking into log.txt shows a build failure:
------------------------------------------------------------------------------
Build failed
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/elbepack/asyncworker.py", line 86, in execute
self.project.build(skip_pkglist=True, build_bin=self.build_bin, build_sources=self.build_src)
File "/usr/lib/python2.7/dist-packages/elbepack/elbeproject.py", line 260, in build
cdrom_size=cdrom_size )
File "/usr/lib/python2.7/dist-packages/elbepack/cdroms.py", line 93, in mk_binary_cdrom
repo_path, log, cdrom_size, mirror)
File "/usr/lib/python2.7/dist-packages/elbepack/repomanager.py", line 213, in __init__
maxsize )
File "/usr/lib/python2.7/dist-packages/elbepack/repomanager.py", line 73, in __init__
self.gen_repo_conf()
File "/usr/lib/python2.7/dist-packages/elbepack/repomanager.py", line 96, in gen_repo_conf
fp.write( "Suite: " + codename2suite[ att.codename ] + "\n" )
KeyError: 'stable'
this can't be fixed in elbe, it is caused by a bug in qemu-ppc-static:
running cmd +cp /usr/bin/qemu-ppc-static /var/cache/elbe/d1995287-5d24-426f-8bd7-057a5d09d7f9/chroot/usr/bin+
qemu-ppc-static: /build/qemu-1000/qemu-1.1.2+dfsg/linux-user/signal.c:4341: setup_frame: Assertion `({ unsigned long __guest = (unsigned long)(ka->_sa_handler) - guest_base; (__guest < (1ul << 32)) && (!reserved_va || (__guest < reserved_va)); })' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Command failed with errorcode 134
Build failed !!!
The applied file "var/cache/elbe/pkg-selections" is not generated before
(see elbepack/filesystems.py:250)
Also the mount/umount stuff there should be reworked. Currently the dpkg --set-selections quits with
an exceptions and then the mounts are not umounted.
please validate that, before pbuilder is started and give at least a warning
cdrom images don't include the packages needed to recreate the initvm.
we need a SOAP interface for the update generation
at the moment make deb-pkg generates a debian directory and builds the kernel.
Let's generate the debianization in a separate make target
elbe chroot into an existing chroot or target directory alters files, e.g. /etc/apt/sources.list
This is caused by
self.initialize_dirs (build_sources=build_sources)
in the BuildEnv constructor.
I'm afraid of moving this function without testing. It might affect pbuilder, etc
on incremental buildchroot calls temporary buildfiles are stored in the target image:
/var/cache/elbe/binaries/*
/var/cache/elbe/sources/*
Similar code found in 4 other locations
https://codeclimate.com/github/Linutronix/elbe/elbepack/db.py#issue_568e29e2b1957d0001889365
When running elbe under debian wheezy, the 'make' command fails when
starting qemu. The error message is:
kvm: -device virtio-rng-pci: Parameter 'driver' expects device type
Apparently wheezy's qemu (1.1.2+dfsg-6a+deb7u6) is either too old or was
compiled without a critical option. Qemu from wheezy-backports works fine.
Elbe depends on qemu-utils and qemu-system, but without any version
restriction. However it should depend on the minimal qemu version needed
in order to run properly.
Thanks,
Richard
Similar code found in 5 other locations
either allow them in initvm or remove them completely
Processing a large XML file failed on a second run:
$ elbe initvm submit castellum.xml
.... (build OK)
$ elbe initvm submit castellum.xml
elbe control create_project failed.
Server returned error:
Elbe XML Validation Error
XML Parse error
Memory allocation failed : growing buffer
Giving up
$
After restarting the initvm the elbe initvm submit works as expected for the next run.
After increasing the memory of the initvm from 1024M to 2048M the project could be build several times.
the packages are placed on the wrong position in the XML file
due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766459
If you need to do this, using debootstrap from wheezy-backports is a solution.
Similar code found in 3 other locations
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.