\input{configpres} \title{ELBE - subcommands} \maketitle \subsection{ELBE commands} \begin{frame} \frametitle{Documentation} \begin{itemize} \item Have a look at /usr/share/doc/elbe/ \item Please read /usr/share/doc/elbe/elbeoverview-en.html \item There are man pages e.g. 'man elbe', 'man elbe-control', \dots \end{itemize} \end{frame} \begin{frame}[fragile] \frametitle{create project} Create a new project: \begin{verbatim} $ elbe initvm create \ --directory /home/user/elbe-initvm \end{verbatim} \end{frame} \begin{frame}[fragile] \frametitle{attach/start initvm} attach to running vm: \begin{verbatim} $ elbe initvm attach \end{verbatim} start the vm (e.g. after host PC reboot): \begin{verbatim} $ cd /home/user/elbe-initvm $ elbe initvm start \end{verbatim} \end{frame} \begin{frame}[fragile] \frametitle{start build} \begin{verbatim} $ cp /usr/share/doc/elbe-doc/examples/bbb-jessie.xml.gz . $ gunzip bbb-jessie.xml.gz $ elbe initvm submit --build-bin --build-sources bbb-jessie.xml Build started, waiting till it finishes project still busy, waiting project still busy, waiting ... \end{verbatim} \end{frame} \begin{frame}[fragile] \frametitle{generated files} \begin{verbatim} $ ls elbe-build-$DATE bin-cdrom.iso elbe-report.txt log.txt licence.txt sdcard.img source.xml src-cdrom.iso validation.txt \end{verbatim} \end{frame} \begin{frame} \frametitle{bin-cdrom.iso} \begin{itemize} \item ISO image that contains all used binary debian packages \item it is only created if the --build-bin switch was provided at elbe initvm submit \item a rebuild of the initvm and target image can be done with this cdrom and without a connection to a debian repository. \end{itemize} \end{frame} \begin{frame} \frametitle{elbe-report.txt} \begin{itemize} \item elbe report containing informations about used packages, finetuning, etc \item 'asciidoc elbe-report.txt' generates a html file \end{itemize} \end{frame} \begin{frame} \frametitle{log.txt} \begin{itemize} \item logfile from the image build process in asciidoc format \item 'asciidoc log.txt' generates a html file \end{itemize} \end{frame} \begin{frame} \frametitle{licence.txt} \begin{itemize} \item contains the licence text of all used debian packages \end{itemize} \end{frame} \begin{frame} \frametitle{sdcard.img} \begin{itemize} \item Images or archives containing the target RFS \item The 'target' section in the XML file describes which image and archive files are created; the 'fstab' section describes their content. \end{itemize} \end{frame} \begin{frame} \frametitle{source.xml} \begin{itemize} \item based on the XML file given to 'elbe create' \item added a 'fullpkgs' section containing informations about all installed packages and their version \item added a 'sources\_list' section that contains the used mirrors \item added a 'apt\_prefs' section that contains the pinning settings \item added a 'elbe\_version' section that contains the version number of the elbe tool that generated the file \end{itemize} \end{frame} \begin{frame} \frametitle{src-cdrom.iso} \begin{itemize} \item ISO image that contains all used source debian packages \item it is only created if the --build-source switch was provided at elbe initvm submit \end{itemize} \end{frame} \begin{frame} \frametitle{validation.txt} \begin{itemize} \item if elbe create was called with a XML file containing a 'fullpkgs' section the file contains informations if a package version differs \item if a package in the 'pkg-list' was not found on one of the mirrors this will be logged in this file \end{itemize} \end{frame} \begin{frame}[fragile] \frametitle{elbe-setsel usage} \begin{enumerate} \item Create package list: \begin{verbatim} # remove all pkgs not wanted on the target target$ dpkg --purge vim-nox libxml2-dev # export installed package list target$ dpkg --get-selections > selections.list # copy list to hostpc target$ scp selections.list YOURPC:/tmp \end{verbatim} \item Import the package list to your xml file: \begin{verbatim} hostpc$ elbe setsel rfs.xml /tmp/selections.list \end{verbatim} \end{enumerate} \end{frame} \begin{frame}[fragile] \frametitle{initvm and target image build from a binary CDROM} \begin{verbatim} $ elbe initvm create --directory=elbe-from-cd \ elbe/elbe-build-$DATE/bin-cdrom.iso \end{verbatim} This command builds an initvm and the target image without using 'http' repositories. \end{frame} \begin{frame}[fragile] \frametitle{elbe-chg\_archive} It is possible to include an archive into the xml file, that is unpacked into the target RFS before and after the finetuning step: \begin{verbatim} $ mkdir archive/testd $ cd archive $ echo 'port = 1234' > archive/testd/myconfig $ sudo tar cjf ../archive.tar.bz2 * $ cd .. $ elbe chg_archive archive.tar.bz2 \end{verbatim} NOTE: The file must be a bzip2 compressed tar (.tar.bz2) Take care on access right and owners of the files. \end{frame} \begin{frame}[fragile] \frametitle{elbe-get\_archive} It is also possible to extract an archive from an XML file: \begin{verbatim} $ elbe get_archive \end{verbatim} \end{frame} \begin{frame}[fragile] \frametitle{elbe-show} The elbe show command prints out some textual information about an ELBE xml file: \begin{verbatim} $ elbe show --verbose arm-example.xml == arm-example.xml: ARMexample - version 08.15 == Debian suite: wheezy/armel [...] \end{verbatim} The '--verbose' parameter shows more informations, like the complete package list. \end{frame} \begin{frame}[fragile] \frametitle{elbe-checkupdates} Use a source.xml file to check if there are updates available for an existing image: \begin{verbatim} $ elbe check_updates source.xml checking /home/user/rfs/build-release/source.xml armel Reading package lists... Done Building dependency tree... Done Reading package lists... Done Building dependency tree... Done adduser 3.113+nmu1 != 3.113+nmu3 1 updates required \end{verbatim} This can be used e.g. as cronjob to get notifications if updates are availabe. Than the person responsible for updates can decide what needs to be done. \end{frame} \begin{frame}[fragile] \frametitle{elbe-diff} compares to RFS trees and suggests commands to update the archive tar and a 'finetuning' section: \begin{verbatim} $ sudo elbe diff rfs rfs-modified suggesting: /etc/init.d/mountall-bootclean.sh /etc/init.d/bootmisc.sh tar rf archive.tar -C build/rfs /sbin/dhclient-script tar rf archive.tar -C build/rfs /etc/init.d/mountfstab.sh \end{verbatim} This can be used if a (nfsroot) filesystem was modified and these modifications should be included in an ELBE XML file. \end{frame} \begin{frame}[fragile] \frametitle{elbe-pkgdiff} compares to RFS trees and displays the difference of the installed packages \begin{verbatim} $ sudo elbe pkgdiff `pwd`/rfs `pwd`/rfs-modified -firmware-ivtv -firmware-ipw2x00 \end{verbatim} This can be used if a (nfsroot) filesystem was modified and these modifications should be included in an ELBE XML file. \end{frame} \input{tailpres}