=== mintos is now known as mintos_out
jmarsdenHello, my name is Jonathan and I am an Lubuntu developer and a long-time Linux system and network admin.02:00
jmarsdenThis session isabout Using VirtualBox for Testing.02:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Current Session: Using Virtual Box (VBox) - Instructors: jmarsden
jmarsdenHello, my name is Jonathan and I am an Lubuntu developer and a long-time Linux system and network admin.02:00
jmarsdenThis session isabout Using VirtualBox for Testing.02:00
jmarsdenI have put my notes andsome screenshots on a wiki pageat https://wiki.ubuntu.com/Testing/Activities/Classroom/Saucy/Virtualbox02:01
jmarsdenI suggest viewing that page during the class ifyou areable todo so.02:01
jmarsdenVirtualbox is free software that allows the creation and use of one or more virtual computers "inside" a real physical machine.02:02
jmarsdenWhat that means for testers is a way to test installation or other actions that might be destructive if done on their main PC.02:02
jmarsdenSo it saves us from having to have several machines just in order to test installing Ubuntu.02:02
jmarsdenI hope by the end of the session you will: Understand enough to install and use VirtualBox for Ubuntu ISO testing02:03
jmarsdenBe able to create, configure and use VirtualBox virtual machines02:03
jmarsdenAnd be aware of the limitations of this kind of testing.02:03
jmarsdenHopefully that is clear, and those wanting to follow along have already installed virtualbox on their own machines.02:04
jmarsdenIf not, on Quantal or Raring a quick    sudo apt-get install virtualbox -y02:04
jmarsdenshould be all you need to get that job done.02:05
jmarsdenOn earlier releases you probably want to download a .deb file fron virtualbox.org and install it manually.02:05
jmarsdenhttps://www.virtualbox.org/wiki/Linux_Downloads is the page, and sudo dpkg -i virtualbox-4.2_4.2.12-84980~Ubuntu~lucid_amd64.deb02:06
jmarsden(or similar) is the command to install it.02:06
jmarsdenOK, any questions about what virtualbox is or how to get it installed?02:06
jmarsdenGood!  Let's look at how to create a virtual machine suitable for testing the installation of Ubuntu from a downloaded ISO image.02:07
jmarsdenYou can run Virtualbox from the menus or with the command    virtualbox &   in a shell.02:07
jmarsdenThen click New to create a new VM (I will say VM when I mean Virtual Machine).02:08
jmarsdenYou need to give the VM a name and select Linux and Ubuntu for the OS type and version.02:09
jmarsdenYou then need to choose a memory size.  For Ubuntu 1024MB (1GB) is common.  512MB will work fine for Lubuntu or server installations, etc. and is the default size.02:10
jmarsdenIn general you do not want to use more than about 50% of the memory of your local PC for VMs that run at the same time.  Your host OS needs *some* RAM to work in.02:10
jmarsdenBut VMs only consume RAM when they are running, so you can create many VMs that use a lot of RAM, as long as you do not plan to run them all at once.02:11
jmarsdenGenerally speaking you will want to create a new virtual hard drive for each VM you create, and that is the default action on the next screen.02:12
jmarsdenThere are several different "hard drive file type"s to choose from.  The default is VDI which is fine for our purposes, so use that.02:13
jmarsdenThe next screen asks you to choose between a dynamic and fixed size virtual hard drive file.02:14
jmarsdenPerformance is somewhat faster with a fixed size file, but that uses up all the space it can be even if most of it is empty.  Using dynamic sizing means you only use the disk space on the real PC that you actually need.02:15
jmarsdenAnd dynamic is the default, so in general just keep life simple and use that.02:15
jmarsdenNext you need to tell Virtualbox how big this new virtual hard disk will be -- it's maximum size.02:16
jmarsdenThe default is 8GB and that works well for Lubuntu testing at least.  6GB is often sufficient if you want to keep things small.02:16
jmarsdenAt this point, you have a virtual machine which you could start up.  But a few changes to the configuration will help...02:17
jmarsdenThe first item is to tell the VM which ISO you want it to use to install from, so click on Storage and then on the "Empty" CD/DVD drive item.02:19
jmarsdenThen clicking on the CD icon on the far right lets you open an ISO file (which you downloaded earlier) to select it as the "virtual CD" (or DVD) to boot this virtual machine from.02:19
jmarsdenIf all is well you will see the name of that ISO file appear in the "Storage Tree" section of the screen once you have selected the ISO to use.02:20
jmarsdenThis is, in a sense, putting a "virtual" CD in the "virtual" CD/DVD drive of the VM.  No burning step is needed, which is convenient and saves time as well as the cost of CD-R blanks.02:21
jmarsdenNext we can configure networking to use what VirtualBox calls "Bridged" networking.  This is more flexible than the default of "NAT".02:22
jmarsdenBridged networking makes the virtual machine appear on the network it is bridged to (usually your local LAN).02:22
jmarsdenSo in that sense it is just like other machines on that network, it can see your local DHCP server, router, etc. and other machines can see it, and use services it runs.02:22
jmarsdenOne more optional thing we can do, while here in the Network screen, is to change the NIC type.02:23
jmarsdenThe default works fine, but since we are running Linux in the VM *and* Linux as a host OS, we can get better performance if we click the triangle next to "Advanced"02:24
jmarsdenand then select "virtio" as the adapter type.02:24
jmarsdenThen click OK to complete work in the Network dialog, and your changes to the NIC type and network type should be visible in the main Virtualbox GUI screen.02:25
jmarsdenThere are plenty of other things you can configure about your VM, but none are needed for ISO testing... we do not need multiple hard drives, or multiple screens, etc.02:26
jmarsdenOK, any questions about configuring a VM and getting it ready to install a test version of Ubuntu ?02:27
jmarsdenGood!  So now we have a VM all ready to run... how do we start it?02:27
jmarsdenThe easy way is to double-click on its entry in the list of VMs on the left, or select it and click the Start button , the green right-pointing arrow icon.02:28
jmarsdenIf you want to you can start it using a command in the shell:  VBoxHeadless --startvm name-of-vm &02:29
jmarsdenwhere "name-of-vm" is the name you gave to your VM when configuring it.02:29
jmarsdenActually you can do all this configuration work from the command line if you want, but that is only useful if you need to script it to configure many VMs in bulk, and we won't cover doing that in this session!02:30
jmarsdenWhen you click that Start button, or otherwise start up the VM, it will go through a boot process just like a real PC does, it even has a BIOS and you can configure whether to look at the floppy, CD, or hard disk first!02:31
jmarsdenIn our case it will boot from the ISO we selected for its virtual CD, and that should begin the process of installing your chosen flavour of Ubuntu.02:32
jmarsdenIf you are doing real ISO testing, follow the test case instructions carefully at this point... that is the subject of a different classroom session.02:32
jmarsdenAfter the installation process is complete, you will want to reboot the machine.  You will also want to remove the (virtual) CD so it boots from the hard drive the next time.02:33
jmarsdenWhile the VM is running you can do that by clicking Devices -> CD/DVD Devices... -> Remove disk from virtual drive.02:34
jmarsdenOr, once the VM is stopped you can configure the drive to be empty (takes too long for my taste!), or run a command    VboxManage modifyvm name-of-vm --dvd none02:34
jmarsdenNow if you start the VM it should boot from its virtual hard disk into Lubuntu, or whatever flavor you are testing.02:35
jmarsdenIf that works and you are doing application or network testing, it can be really helpful to shut the VM back down and then take a "snapshot" of it.02:36
jmarsdenThat means you can later quickly reset the state of the VM, including its hard disk, back to the state it was in at the time of the snapshot -- in this case, a freshly installed machine.02:36
jmarsdenSo, how can we shut down a VM?02:37
jmarsdenThe clean way is to use whatever buttons or commands exist inside the VM itself to shut it down.  For example, in a shell run the command    sudo shutdown -h now02:37
jmarsdenBut sometimes (recently for Lubuntu daily-live images!) doing that fails.  Just as in the real world we have some choices.02:38
jmarsdenOn a real PC we might push the reset button or even remove the AC power cord.02:38
jmarsdenThe equivalent in the Virtualbox GUI is to click Machine -> Close -> Power Off02:39
jmarsdenYou can do that from a command line if you prefer:    VboxManage controlvm lubuntu1310 poweroff02:39
jmarsden(if the machine name is lubuntu1310)02:39
jmarsdenIf the Virtualbox GUI does not work, or for whatever reason you just really really need to kill the VM, you can kill all of your currently running VMs with one command:02:40
jmarsdenkillall VirtualBox02:40
jmarsdenThe capitalization of VirtualBox matters in that command -- and please only do that if the other approaches fail to work.02:41
jmarsdenOk, any questions about the basic use of VirtualBox VMs -- starting them, stopping them, ejecting virtual CDs from them?02:41
jmarsdenOK, moving on then... Virtualbox has a lot of other capabilities that are good to know about but not always necessary for ISO testing.02:42
jmarsdenOne of them is Guest Additions.  Ihe idea is that if you run some additional software in the VM, it can be smarter about communicating with the host PC it is running on in useful ways, including cut and paste working between applications on the VM and applications on the host.02:43
jmarsdenIt also allows resizing of the VM screens to any resolution you can fit on your real screen -- handy for real world use, but not all that important for ISO test use.02:44
jmarsdenGuest Additions also allow setting up shared file space on the host machine that is visible in the VM as well.02:45
jmarsdenThis is handy for developers who build a new application on their host and then want to install it on the guest, or the other way around.02:45
jmarsdenIn ISO testing you do occasionally want to move a log file or a config file from the guest out to the host, ready to create a LaunchPad bug or something.02:46
jmarsdenFor that, just using scp works well enough that in general it is not worth setting up Guest Additions and file sharing, at least in my view.02:46
jmarsdenYou can configure VMs to be accessible using Remote Desktop.  This is the screen, keyboard and mouse "remote control" protocol that Microsoft Windows uses by default, and the rdesktop client uses in Linux.02:47
jmarsdenAgain that is rarely useful for our testing purposes, unless you set up test VMs at home and then go somewhere else and run tests on them :)02:48
jmarsdenOne thing Virtualbox does not offer by default is access to USB devices.  You can add a closed source "Extension pack" to get this capability, if you need it.02:49
jmarsdenHowever you still cannot boot from USB devices, so its use for ISO testing is somewhat limited, and in general I recommend NOT installing the Extension Pack.02:49
jmarsdenAny questions about these various additional capabilities that Virtualbox has?02:50
ClassBotThere are 10 minutes remaining in the current session.02:50
jmarsdenOK, let's briefly look at some limitations of using Virtualbox for testing.02:51
jmarsdenNot using real hardware (no BIOS bugs, weird video cards, etc.)02:51
jmarsdenSome people might say this is a benefit!  But it does mean some classes of bugs will not show up in a VM that will happen on some real machines.02:52
jmarsdenNo wireless NIC access (virtual NICs are "wired" NICs)02:52
jmarsdenThere may be workarounds for this but in general it is not easy to do wireless network testing in Virtualbox VMs.02:53
jmarsdenNo boot from USB (so testing Live USB stick "persistence" is not possible, please use a physical PC to test that)02:53
jmarsdenThere are test cases that need "perstistent" filesystem tests and booting from USB... Virtualbox cannot be used for those tests.02:53
jmarsdenAnd lastly, it is not easy to test or use special purpose hardware (Braille readers, USB devices, scanners, SCSI controllers, etc.) in VMs02:54
jmarsdenFor further detailed info, see http://www.virtualbox.org or the man pages for vboxmanage and vboxheadless , and the full Virtualbox user manual which is at https://www.virtualbox.org/manual/UserManual.html02:55
jmarsdenAnd we have five minutes left... any questions?02:55
ClassBotThere are 5 minutes remaining in the current session.02:55
jmarsdenNone :)  Either everyone is asleep or I answered the questions already :)02:56
jmarsdenOk, thanks for being here and learning about Virtualbox.02:57
jmarsdenThe URL for the wiki page with most of what I spoek about here is https://wiki.ubuntu.com/Testing/Activities/Classroom/Saucy/Virtualbox02:57
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || No Sessions Currently in Progress
ahmadubuntuhi every body06:00
ahmadubuntuhow I can see channel logs?06:00
smartboyhw!irclogs | ahmadubuntu06:01
ubot2`ahmadubuntu: Official channel logs can be found at http://irclogs.ubuntu.com/ . LoCo channels are now logged there too.06:01
ubot2`Official channel logs can be found at http://irclogs.ubuntu.com/ . LoCo channels are now logged there too.06:01
=== Pendulum_ is now known as Pendulum
balloonsHello and welcome to the Introducing Test Cases session . My name is Nicholas Skaggs and I'm the QA Community Coordinator. Thanks for attending (or reading this log later!)!14:30
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Current Session: Introducing Test Cases - Instructors: balloons
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2013/06/28/%23ubuntu-classroom.html following the conclusion of the session.14:31
balloonsI hope everyone is ready for some QA classroom sessions! I'll repeat my intro again for the log ;-)14:31
balloonsHello and welcome to the Introducing Test Cases session . My name is Nicholas Skaggs and I'm the QA Community Coordinator. Thanks for attending (or reading this log later!)!14:31
balloonsIn this session we're going to provide a brief overview of the different testcase types you'll encounter, talk a little about where the team stores and manages it's testcases, and then let you know how you can learn more about contributing testcases and results.14:31
balloonsFeel free to ask questions at any time by prefixing your question with QUESTION: in the chat14:32
balloonsThe sessions following this will cover using different tools to help you test manual testcases.14:32
balloonsNext week there is a section of classroom sessions on creating new manual and automated testcases. If your curious about contributing in this area, please feel free to ask questions and check out the resources given.14:32
balloonsAlso mark the date and time to attend those sessions.14:32
balloonsThe full classroom list is found here: https://wiki.ubuntu.com/Testing/Activities/Classroom/Saucy14:33
balloonsAnd with that, let's get started14:33
balloonsSo, let's start off by talking about what a testcases is.14:34
balloonsAccording to the ISTQB (http://en.wikipedia.org/wiki/International_Software_Testing_Qualifications_Board) a14:34
balloonsTestCase is:14:34
balloonsA set of input values, execution preconditions, expected results and execution postconditions, developed for a particular objective or test condition, such as to exercise a particular program path or to verify compliance with a specific requirement. [After IEEE 610]14:34
balloonsDefinitions are fun eh? So what does it really mean?14:35
balloonsSimply put a testcase is a set of specific actions and specific results. By performing the listed action, you should expect the listed result.14:35
balloonsThis allows for the test to be completely repeatable and reproducible across many machines and testers without ambiguity14:36
balloonsSo how is this useful to us?14:36
balloonsBy having a list of testcases we can ensure the software works EXACTLY the same, and as EXPECTED for ANYONE.14:36
balloonsIf I follow the testcase and get the proper result, and so does 5 other testers, we have assurance that the software will function properly on each of these representative machines.14:37
balloonsHowever we also have what are called smoke tests. These tests don't meet the listed criteria above for a testcase.14:37
balloonsInstead, they are a list of open exploratory questions intended for the testers to intercept and potentially find issues.14:38
balloonsA smoke test is not repeatable or reproducible and therefore has much more limited use. In general we greatly prefer well written testcases with the Action/Expected Result format.14:38
balloonsSo we understand what a testcase is, and how it is useful to us. So, what does a testcase look like?14:39
balloonsA typical testcase found on the testing tracker intended for manual testing will follow one of two formats mentioned above.14:39
balloonsYou can see the formats listed on this page: https://wiki.ubuntu.com/Testing/TestCaseFormat14:39
balloonsFor some real-life examples, let's look at the packages and iso trackers for an example of each testcase.14:41
balloonsHere's a default testcase on the iso tracker: http://iso.qa.ubuntu.com/qatracker/testcases/1301/info14:41
balloonsAnd here's an example of a smoke test: http://packages.qa.ubuntu.com/qatracker/testcases/1336/info14:42
balloonsSee how the smoke test (barring a couple Action/Expected results at the top :-) ) is a list of questions which are open ended? This allows for a broad range, but very shallow testing.14:42
balloonsThe default test showcases a list of Actions/Expected results that tests very specific functionality.14:42
balloonsIn general we prefer these style of testcases as noted above.14:43
balloonsSo how do you use it? If your contributing results to a qatracker and you have a default testcase you now have the knowledge to understand how to read it.14:44
balloonsPerform the action in bold, and then wait for the expected result listed in italics. If you don't get the expected result for ANY step you've found a bug and something is wrong.14:44
balloonsThis is general overview of what testcases look like, how they work, and the thought process behind them. The next sessions will cover performing testing using the testcases found on the various trackers.14:45
balloonsnext week we'll also cover writing testcases. Both manual tests, as we've covered and seen above, as well as automated tests14:45
balloonsAre there any questions?14:46
balloonsIf not we'll wrap this one up early then. Enjoy the next sessions!14:48
ClassBotThere are 10 minutes remaining in the current session.14:50
ClassBotThere are 5 minutes remaining in the current session.14:55
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Current Session: Using Virtual Manager(KVM) - Instructors: phillw
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2013/06/28/%23ubuntu-classroom.html following the conclusion of the session.15:01
phillwHi, my name is Phill. Whiteside and I'm the Team Leader for lubuntu-quality. This session is a brief over-view of the installation and use of KVM, using the graphical interface (GUI) virtual manager.15:01
phillwFirstly, can you please ensure that you have carried out the steps of getting and ISO and installing virtual-manager as detailed in https://wiki.ubuntu.com/Testing/Activities/Classroom/Saucy/Section315:02
phillwSo, what is KVM?15:03
phillwIt is a virtualisation system that allows you to install and run a different (or same) operating system from within your existing system.15:04
phillwIf any one has questions while I go through this session, please feel free to ask on the #ubuntu-classroom-chat channel, prefix your question QUESTION: so that I notice it!15:05
phillwKVM is exrtremely powerful, something which can put new comers off. I speak from experience!15:05
phillwHowever, we're going to use virtual-manager which takes care of the 'behind the scenes' stuff15:06
phillwAssuming you have virtual manager installed and have added yourself to the group libvirtd then Virtual Machine Manager should appear in your menu area (On my system it is under "System Tools")15:08
phillwlaunching it for the 1st time will bring up a window with no entries in it.15:09
phillwTowards the top left corner is a little icon that looks like a computer with a small sun shining on it. Clicking on this creates a new Virtual Machine15:10
phillwSorry for the pause, I was doing some other work on it and had managed to disconnect myself!15:13
phillwWe now have a window called 'New VM', into this enter the name you want it called (I'm using lubuntu AMD64, so I'll call mine lubuntu-64)15:14
phillwWe are using a local ISO, so we just need to click 'Next'.15:14
phillwNext, it is asking where the ISO is stored. That depends on where you saved it / them. I use ~/Desktop/iso/ to hold mine15:15
phillwSo I browse to /home/phillw/Desktop/isos/saucy-alternate-amd64.iso15:16
phillwThe OS Type is Linux from that drop down box15:16
phillwand it should default to ubuntu12.10 which is quite close enough for us15:17
phillwClick 'Forward'15:17
phillwI use 512MB of RAM and 1 processor for testing, obviously if you have plenty of RAM or you intend to do smoke testing of applications you can use the default of 1024 MB15:22
phillwnext up is the Create a disk image. Again I use 10 GB for this, so as to have room to do the side-by-side installs that are mentioned in the test cases, but you can use 5GB if space is low on your hard drive15:24
phillwsorry for the pauses here, my local virt-manager has decided not to play and I've had to ssh into my dedi server!15:26
ClassBotVasudevan asked: how to improve the video perf of the kvm guest - my settings are : model - vga,  RAM - 9 MB. Tried increasing ram - does not seem to help - screen refresh is sluggish15:27
phillwkvm guests are getting opengl acceleration sometime this year (fingers crossed) (thanks balloons)15:27
phillwVasudevan: one of the other things to check is if your CPU supports hardware acceleration, you can check that out at https://help.ubuntu.com/community/KVM/Installation#Check_that_your_CPU_supports_hardware_virtualization15:28
phillwagain, sorry for the pauses15:29
phillwHaving selected the disk size you want, click 'forward'15:30
phillwIt will give you a summary of what it is about to do.15:30
phillwone *VERY* important thing here is to click on the 'Customise installation before install'.15:31
phillwthis is because of bug 108067415:31
phillwwhich means the default video setting does not work15:32
phillwI'll include the full link... https://bugs.launchpad.net/cairo/+bug/108067415:32
phillwSo, put a tick in that box and then click 'Finish'.15:33
phillwa new window opens, click on video on the left hand panel.15:33
phillwand change it from 'default' to vmvga15:34
phillwClick 'Apply', then click on 'Begin Installation' (Near the Top left of the window)15:35
phillwA new window will appear, once it connects it behaves just like a normal installation.15:36
phillwNow then, in best tradtions... I prepared one earlier on my local machine.15:37
phillwAfter the installation is completed and it has rebooted, you will have the usual grub2 login screen.15:38
phillwone note of grub... it will say that it can only find one operating system in yor VM - this is correct. the virtual machine is enclosed in its own little 'sandbox' and cannot affect your host machine.15:39
phillwwhen you shut down the virtual machine (usually via the *ubuntu shut down method) you can close the window and also then close the virtual machine window.15:41
phillwThe next time you want to fire up the machine, launch virtual machine manager, click on the machine you want to use and then click the 'play' icon. Once it is starting up, click on Open and a new window will appear showing the machine boot up.15:42
phillwIf you want to really delve into how much you can do with KVM then there is an extensive wiki area at https://help.ubuntu.com/community/KVM/ which goes into full details of different ways to use KVM. These are beyond this course (I even use virt-manager on my dedicated server) with a couple of virsh commands to fine tune a couple of things as the VM's on there are 'production' machines.15:44
phillwSo, does anyone have any questions?15:45
ClassBotVasudevan asked: Did not use guestfish before; guestfish is installed, but the next cmd fails - sudo libguestfs-test-tool -> command not found?15:46
phillwVasudevan: I'm covering guest fish in the next session15:47
ClassBotThere are 10 minutes remaining in the current session.15:50
ClassBotThere are 5 minutes remaining in the current session.15:55
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Current Session: Using Guestfish with KVM - Instructors: phillw
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2013/06/28/%23ubuntu-classroom.html following the conclusion of the session.16:01
phillw Hi, my name is Phill. Whiteside and I'm the Team Leader for lubuntu-quality. This session is a brief over-view of the installation and use of guest-fish16:02
phillwwhat is guest-fish?16:03
phillwIt is a set of commands that allow to manipulate KVM's16:03
phillwThe one that I will specifically be covering is that of the copy-out command.16:06
phillwhas the general syntax, but I'll give an example16:06
phillwif your virtual machine 'died' during an install and will not restart, you need to get the log files from it.16:07
phillwto use guestfish tools the machine needs to not be running (in this case it is obviously not!!)16:08
phillwon your host machine, do a16:08
phillwto get to your home directory16:08
phillwassuming your virtual machine is called16:09
phillwwe issue the command16:09
phillwvirt-copy-out -d myvirtualmachine /var .16:10
phillwthis will take the entire contents of /var and pop them into ~/home/var16:10
phillwusing this command you can pull in crash reports etc. or even the entire machine using16:11
phillwvirt-copy-out -d myvirtualmachine / .16:11
phillwvirt-copy-out has a sister command virt-copy-in, which I've used on a poorly VM to insert a patch onto it when it could not 'see' the network and I couldn't use apt-get :)16:12
phillwIf you'd like to look at the other things you can do with guest fish, head over to http://libguestfs.org/guestfs-recipes.1.html16:16
phillwAgain, a lot of this is outside the scope of this quick introduction which was meant simply as a way to pull files from a 'dead' KVM so that a bug could still be raised.16:16
phillwif you have any questions, please feel free to ask (Remember to prefix them with QUESTION:  )16:17
ClassBotThere are 10 minutes remaining in the current session.16:21
phillwif you have questions on any of the subjects covered in these classrooms, please feel free to ask on #ubuntu-quality or contact the tutor directly.16:23
ClassBotThere are 5 minutes remaining in the current session.16:25
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Current Session: Using pbuilder - Instructors: chilicuil - Slides: http://is.gd/EW5Uv9
ClassBotSlides for Using pbuilder: http://people.ubuntu.com/~chilicuil/pdf/pbuilder.pdf16:31
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2013/06/28/%23ubuntu-classroom.html following the conclusion of the session.16:31
chilicuilHi, I'm Javier Lopez an Ubuntu contributor: http://wiki.ubuntu.com/~chilicuil16:31
chilicuilon this session I'll talk a little bit about pbuilder16:31
chilicuilpbuilder is a tool many people in Debian & Ubuntu use to compile .deb packages, however it can also be used to test software, or to try things in a sandbox16:32
chilicuilI made some slides that you can fetch from: http://people.ubuntu.com/~chilicuil/pdf/pbuilder.pdf16:32
chilicuilif you have any question at any point feel free to ask in the #ubuntu-classroom-chat channel and I'll be happy to answer16:32
chilicuilso, to begin16:32
chilicuiltechnically, pbuilder is a cli driven wrapper in bash for chroot, debootstrap, dpkg-source and other similar tools16:32
chilicuilit helps to create minimal Ubuntu setups (using debootstrap) which then are saved and compressed in /var/cache/pbuilder16:33
chilicuilafter the initial setup, pbuilder can uncompress and mount any of these images in a chroot environment16:33
chilicuilchroot is an old tool which was introduced for the first time in the 70s on Unix systems16:34
chilicuilit allows to change the root directory to one specified, this creates the ilussion that you are in other system from where you can launch apps that cannot access files from outside the chroot on normal conditions16:34
chilicuilthis minimal setups are easy to create and use with pbuilder16:34
chilicuilI forgot to tell you, that this session will be practical, so fire up you terminal if you haven't done it =P16:35
chilicuilto continue I'll ask you install:16:36
chilicuil $ sudo apt-get install pbuilder16:36
chilicuilif you don't feel like installing anything, feel free to ssh ubuntu@vps.javier.io and use any of the 10 available spots, passwd=ubuntu16:36
chilicuilpbuilder has already been installed there so you can avoid the last step16:36
chilicuilI'll wait a couple of minutes so you can decide if you install it or use the vps env =)16:36
chilicuilthere are many alternatives to pbuilder, such as, pbuilder-dist, pbuild, sbuild, etc16:38
chilicuilhowever in my opinion, pbuilder is one of the easiest to use and maintain once you've configured correctly16:38
chilicuilin order to start using it, you'll need to configure a couple of vars in your ~/.bashrc and ~/.pbuilderrc files16:38
chilicuilfirst, you need to identify yourself, you can do it if you add the following to the ~/.bashrc file16:39
chilicuil export DEBEMAIL="yourmail@domain.com"16:39
chilicuil export DEBFULLNAME="Your Name"16:39
chilicuil Ubuntu vars here: https://github.com/chilicuil/dotfiles/blob/master/.alias.linux#L5116:39
chilicuilthat how my personal conf looks, feel free to grab any var16:40
chilicuilonce you've updated your file, you need to create a ~/.pbuilderrc file16:40
chilicuilthe ~/.pbuilderrc is nothing but a pure bash script, it may seem scary at the first impression but don't let it to stopping you from trying it, I'll suggest you to try with the following file16:42
chilicuil $ wget https://raw.github.com/chilicuil/dotfiles/master/.pbuilderrc -O $HOME/.pbuilderrc16:42
chilicuilnow, if you open the file, you'll see a lot of vars, it because this file has been customized to allow pbuilder work with differente ubuntu and debian releases16:43
chilicuilI wont explain every aspect of it but the most important parts16:43
chilicuil UBUNTU_SUITES=("saucy" "raring" "quantal" "precise")16:43
chilicuilhere are defined the releases pbuilder will be able to manage, whenever a new dev cycle start you can update this part to include the newest ubuntu dev release16:44
chilicuil UBUNTU_MIRROR="us.archive.ubuntu.com"16:44
chilicuilfrom where pbuilder will download files16:44
chilicuil PATH_PBUILDER="/var/cache/pbuilder"16:44
chilicuilwhere minimal ubuntu setups will be saved16:44
chilicuil HOOKDIR="$HOME/.pbuider-hooks/"16:44
chilicuilwhere hooks will be saved, hooks are scripts (in any language) which are launched at different times, ie. before login into the chroot environment, before building packages, before deleting the environment, etc16:45
chilicuilright now I suggest you to trust me and use this config, if you agree, you'll need ot place a '#' before  export BUILDRESULT=....16:46
chilicuilthis will allow pbuilder to save to /var/cache/pbuilder/result/, otherwise it will fail when trying to copy to the specified version, I'm running a modified pbuilder version16:46
chilicuillet me know when if you do it, or if you have problems to edit the file, I'll wait a couple of minutes16:47
chilicuilok, now that we have it configured (hopefully correctly), we're gonna try to login16:49
chilicuilrun the following in a terminal:16:49
chilicuil $ sudo DIST=saucy ARCH=amd64 pbuilder login16:49
chilicuilanyone was able to do it?16:49
chilicuilif you try to do it, you'll find that it wont be possible, since you've not created the minimal image16:52
chilicuilso, we need to create it first16:52
chilicuil $ sudo DIST=saucy ARCH=amd64 pbuilder create16:52
chilicuilballoons> QUESTION:  sudo DIST=saucy ARCH=amd64 pbuilder create -- are you making a little chroot here?16:55
chilicuilthanks for asking balloons, yep, a chroot is created and then very basic packages are installed, after that, the complete chroot is saved and compressed so pbuilder don't need to recreate it every time you use it16:56
chilicuiland it end of the command you should have a file in /var/cache/pbuilder/saucy-amd64/saucy-amd64-base.tgz with the minimal setup16:57
chilicuilVasudevan> this also failed - E: debootstrap failed W: Aborting with an error17:00
chilicuilE: No such script: /usr/share/debootstrap/scripts/saucy17:01
chilicuilnice catch Vasudevan, when working with very recent ubuntu releases sometimes the soft links in /usr/share/debootstrap/scripts/ are not updated (on stable releases), so you need to create them manually17:02
chilicuilyou can do it by running: $ cd /usr/share/debootstrap/scripts && sudo ln -s gutsy saucy17:02
chilicuiland then retrying the create step: $ sudo DIST=saucy ARCH=amd64 pbuilder create17:02
chilicuilyou should look now a verbose output with all the packages which are been installed in the minimal setup17:04
chilicuildependying on you bandwidth it should create a minimal setup in 5-20 minutes17:05
chilicuilyou can create as many minimal setups as you want, for example, ubuntu precise for i386 computers17:06
chilicuil $ sudo DIST=precise ARCH=i386 pbuilder create17:06
chilicuilor ubuntu raring for amd64, $  sudo DIST=raring ARCH=amd64 pbuilder create17:07
chilicuilSkini151> QUESTION: What package we can't test with pbuilder?17:07
chilicuilgreat question Skini151, chroots have their limits, I've been personally able to run even unity on a chroot environment, however I'd say that it's perfect for testing apps which doesn't have too many dependencies, for example bad apps to test would be the scopes, or an apps which depends of a particular network setup, for example network-manager17:10
chilicuilgood examples are gedit, the calculator app, most cli apps, vim, netcat, coreutils...17:11
chilicuilSkini151> QUESTION: Is there a list of packages that can be tested with pbuilder or vice versa17:11
chilicuilSkini151: not that I know, however any app which can work on a chroot environment can be tested with pbuilder, since pbuilder is only a wrapper around chroot17:12
chilicuilSkini151: I'll look at it and will give you back a list off-air17:13
chilicuilalright, if you completed the last step, you should have now a minimal and pristine image of ubuntu saucy in /var/cache/pbuilder/saucy-amd64/saucy-amd64-base.tgz, let's continue17:14
chilicuilto make sure our image works, we are going to compile a package17:15
chilicuilin another terminal, please type:17:15
chilicuil $  mkdir hello && cd hello17:15
chilicuiland then: $ pull-lp-source hello #probably you'll need to install ubuntu-dev-tools17:15
chilicuilthis will fetch the source code of the hello package, which is a program that print 'Hello World!', a very basic program17:16
chilicuilVasudevan> QUESTION: can we ignore this error - E: Logic failure in hook handling. Directory /var/cache/pbuilder/saucy-amd64/build//31858/tmp/hooks should exist but it does not.17:19
chilicuil Vasudevan: if you don't have, and it fails completely, you can create a directory in ~/.pbuilder-hooks or to comment out the hooks var in your ~/.pbuilderrc file17:19
chilicuilit looks like this:17:19
ClassBotThere are 10 minutes remaining in the current session.17:20
chilicuilif you downloaded the source code of the hello package, you can create the source deb file (.dsc) with the following command:17:21
chilicuil $ cd hello-* && debuild -S -us -uc && cd ..17:21
chilicuiland then build the package with the following:  $ sudo DIST=saucy ARCH=amd64 pbuilder build hello*.dsc17:22
chilicuilthis step will take a couple of minutes, and the result will be available in: /var/cache/pbuilder/result/saucy-amd6417:22
chilicuilif you see a .deb package there, we've done it right, and we can ensure we have a working minimal image available17:23
chilicuilnow that we know for sure that pbuilder works we can use it for whichever we want, one of these possibilities is for testing sru's17:24
chilicuil https://wiki.ubuntu.com/QATeam/PerformingSRUVerification17:24
chilicuiltry this:17:24
chilicuil $ sudo DIST=saucy ARCH=amd54 pbuilder login17:24
chilicuilyou've access to a pristine environment, cool, eh?17:24
chilicuilthere are some tips available from the <SLIDE 16>, and some other good resources at:17:24
chilicuil * tinyurl.com/pbuilder17:25
chilicuil * wiki.ubuntu.com/PbuilderHowto17:25
chilicuiland if you need help, feel free to join us at #ubuntu-quality, #ubuntu-motu or ping me directly17:25
chilicuilI think that's all, any question?17:25
chilicuiljsjgruber-l99-p> QUESTION: How do you use pbuilder to test unity?17:25
ClassBotThere are 5 minutes remaining in the current session.17:25
chilicuiljsjgruber-l99-p: I was actually thinking in chroot when answered that question, I suppose pbuilder can be modified to do it, however it can't be done by default, to run unity inside of chroot you'll to mount extra directories, most taken from the livecd and then start some other deamons, such as dbus, enable X connections to the outside X and launch finally unity17:27
chilicuilthanks everyone for attending (or reading later)17:30
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2013/06/28/%23ubuntu-classroom.html17:30
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || No Sessions Currently in Progress
=== hggdh_ is now known as hggdh

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!