Product Creation with the openSUSE Build Service
Product
First of all, what is a “Product”? The openSUSE Wiki has the following statement on the Product Definition Article:
“A product is a defined set of packages plus extra information”
In the most simple interpretation this means a set of RPM files plus a set of metadata which contains the installation kernel, information about the installation work flow, hardware detection, languages, licenses, slide shows and the like.
Thus the most simple product imaginable is a basic set of RPM files for the system to be installed and a minimum set of metadata: an installation system consisting of kernel, initrd and the packages necessary for installation.
kiwi
The kiwi imaging system allows creation of all kinds of live media: live DVDs, CDs, USB sticks and VMware and XEN bootable images. Those images are extremely useful for systems where a regular setup of equal hosts is required. The build client farm of the openSUSE Build Service is just one popular example.
kiwi is used in several popular projects, among which you can find several project based live DVDs, terminal server, thin clients and preload images. It is also relatively easy to create a personal custom image to boot different machines from USB stick or live CD, for instance to fix crashed machines and save or recover data.
kiwi-instsource module
A weakness of the images is that it is not possible to install from them as easy and complete as it is from installable media. The reason therefore is the way in which the image is created. As explained in depth in the official kiwi documentation (available from the project web site and delivered with the kiwi-doc package) kiwi creates a so called root tree (“physical extent”) where packages are installed into. After finishing the installation an image (“logical extent”) is created from that root tree. The same root tree can be used for multiple image types (usb, iso, xen, …) and can even be tweaked manually after the physical extent is created.
This means several things. First of all, the installation process makes choices. It is not possible to have conflicting packages installed in parallel and hence there is no choice later (in case there is no other installation source available). Secondly, the system can only install on one compatible platform. Which means you can’t use a x86_64 image to boot and install an i386 machine. And only with regressions vice versa.
All those problems are solvable by using an installation source. This term refers to official online repositories (such as openSUSE:11.1), product media (boxes, downloadable iso images) and update channels.
These repositories were created by the autobuild team in the past and are created by kiwi-instsource as imaging back end in the openSUSE Build Service since openSUSE-11.1. In principle everybody can brew his or her own linux distribution that way. I presented several talks on that topic, one on FOSDEM 2008 about imaging in general, then an interim talk which was held in the Nürnberg SuSE office and is available through tube.opensuse.org, and finally about installation source creation on FOSDEM 2009.
All three talks were recorded and can be found at [1] and [2].
kiwi-instsource is a subpackage to kiwi and maintained in the openSUSE:Tools build service project [3]. Its devel project is my home project at home:helcaraxe [4].
FOSDEM Talk
Preparing and delivering this talk was really fun, thanks a lot to all attendees. I was amazed how many people attended the talk, the openSUSE DevRoom was nicknamed openSAUNA later. It is always very interesting to know possible users and contributors face to face. I met several people I knew from mailing lists before and we got some nice discussions on what is needed in the community.
Please feel free to comment on that.
One mayor feedback to me is that we have to document what needs to be done to customise installation sources. I will add some information to the openSUSE wiki at this article: Installation_Source
FOSDEM is always a great event, thanks to all the organisation around it. Unfortunately I could not attend as many talks as I intended but got at least to the ext4 talk and the syslinux talk on the main track and some of my colleagues’ talks in the openSUSE DevRoom.
Plus I discovered some very nice locations for dinner and good belgian beers thanks to the people of the X.org team.
Further Reading
[1] FOSDEM talks linked in openSUSE Wiki: FOSDEM 09, FOSDEM 08
[2] Interim talks aggregated in openSUSE Wiki
[3] Development project for kiwi in Build Service: openSUSE:Tools
[4] My home project in Build Service: home:helcaraxe
[5] My user page: User:helcaraxe
Testing GNOME 2.25.90 on my main Workstation
I was already testing 2.25.x on my jhbuild without any problems so far.
So i just added three repositories and upgraded. After that i'm running Gnome 2.25.90. The upgrade run pretty good and no issues so far.
If you want to test 2.25.90 on openSUSE just add these repositories:
http://download.opensuse.org/repositories/home:/MBoman/openSUSE_11.1/ (Xorg packages needed a patch to avoid 100% CPU, already fixed upstream)
http://download.opensuse.org/repositories/GNOME:/Factory/openSUSE_11.1/ (Main 2.25.90 Repository)
http://download.opensuse.org/repositories/GNOME:/Backports/openSUSE_11.1/ (Packages from openSUSE Factory needed by the new Gnome)
and sudo zypper up
USB EVDO (Alltel UM175AL) under SLED 10
This was a bit of a bear, but I’ve inhereted a generic looking USB EVDO stick at the office. After some research and elbow grease, I’ve managed to get it working. In this post, I’ll detail EVDO configuration under SLED 10. I’ll leave out most of the gory technical details as others have covered that for me. I’ll link to the appropriate reference where necessary.
The UM175AL card from Alltel attempts to identify itself as a USB storage device/cdrom when it’s first inserted. This is a huge mess as it needs to be recognized as a serial device. After some searching, I came across Mark A. Ziesemer’s post on using this same card under Ubuntu. He recommends using USB_ModeSwitch to change the device’s mode.
First, I downloaded the USB_ModeSwitch source, extracted it, and deleted the binary. Next, you’ll want to download libusb and libusb-devel from the OBS. If you don’t have OneClick-Install enabled on your SLED install, simply download the libusb RPMs and issue the following commands:
rpm -Uv libusb-*.rpm
rpm -ivh libusb-devel*.rpm
Once those are installed, go ahead and issue ‘make’ in the USB_ModeSwitch directory. This should execute rather quickly and you should have a new usb_modeswitch binary. Copy ‘usb_modeswitch’ to /usr/sbin.
Next you’ll need to create a config for USB_ModeSwitch. As root, edit /etc/usb_modeswitch.conf with the following information (all the gory details can be found at Mark’s site if you’re up for a read):
# /etc/usb_modeswitch.conf
# alltel evdo hax
DefaultVendor = 0x106c
DefaultProduct = 0x3b03MessageEndpoint = 0x05
MessageContent = “55534243904ed68a24000000800008ff024445564348470000000000000000”
Note that the above only works for this particular card. You can likely ignore that if your EVDO card is already supported.
Now we should be able to access the modem and use ‘wvdial’ (which conveniently ships with SLED) to get connected. First we’ll need to edit our /etc/wvdial.conf. This example is for Alltel only:
[Dialer Defaults]
Stupid Mode = On
Modem = /dev/ttyACM0
Baud = 921600
Init = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Phone = #777
Username = XXXXXXXXXX@alltel.net
Password = alltel
Init1 = ATZ
ISDN = 0
Modem Type = Analog Modem
Auto Reconnect = on
Carrier Check = no
[Dialer shh]
Init3 = ATM0
[Dialer Pulse]
Dial Command = ATDP
Replace XXXXXXXXXX with your 10 digit phone number. I gleaned this information from two sources: Linux.com’s EVDO tutorial for VoIP and Linux * Screw’s EVDO with Linux article.
Now that everything is all configured, plug in your EVDO stick and use usb_switchmode to switch it to the proper mode for serial access:
/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.conf
Which should spit out some “everything OK” messages. If it didn’t, you’ll need to go back and check your configuration.
Once you’ve switched the card to the proper setting, go ahead and use ifconfig to bring your wireless and wired network interfaces down (ifconfig eth0 down, etc.). This step is optional, but I like to do it for good measure.
Now you should be ready to dial your wireless carrier. To do so, simply execute ‘wvdial’ and wait for the connection to finish. You should be online at this point!
So there you have it. I want to give a HUGE thanks to Mark Ziesemer for doing so much research on this card, that helped progress a TON!
Enjoy!
Fosdem talks
I held two talks that were pretty crammed (actually, on the RandR 1.3 talk the room was completely full, and people weren't allowed to get in any more). The r600_demo talk was pretty technical, so of course it drew in a little less people.
If you hadn't had a chance to visit the talks, you can download the slides from my web page. And Phoronix will have videos of all talks.
-
RandR1.3: New Features in a Nutshell
Transformation, Panning, Properties
Slides Video
-
r600_demo: Programming the New GPU Generations from ADM
HowTo Render a Freaking Triangle
Slides Video
Android Fun
And it's easy to programme. I used to try to programme my Nokia phone using Symbian. But the number of hoops I had to jump through in order to get anything to work totally put me off, and I never got futher than writing a programme which said 'Hello' on the screen. (I guess 'Hello World' wouldn't have been much more effort, but by that time I'd had enough.) But programming Android is very easy. At first it was a little awkward, because on my six year old laptop (yes, six years old) the emulator was very slow, and used nearly all my computer's memory. But now I have a real phone I can plug the USB cable in and run and debug my programmes directly on the device. And from Linux too, which is pretty good.
I'm currently working on a little programme which will log sensor values to a file. Then I'll be able to plot them on a Google map and see how fast I was travelling and how hard I was accelerating or cornering. Not because I drive 'that way', but because I've always thought it would be interesting to log stuff like that, and now I have a device which can do it. So far I've just written a test programme which shows the values of the various sensors and moves sliders around, but it's been incredibly easy to do.
And just in case there's anyone reading this who wonders how I got the debugging to work in openSUSE 11.1, here's how. (Bear in mind that this is additional info to that which is in the SDK - it doesn't really make sense on its own). I created a file called 50-android.rules in /etc/udev/rules.d containing this line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666", SYMLINK+="android_adb"
Then I chmodded it to 755, and, as root, ran 'adb kill-server' followed by 'adb start-server'. Then I ran 'adb devices' to see if the device showed up in the list. If it didn't I killed and restarted the server again until it did. (I don't know if I need to, or if I could just wait.)
After that, I was able to run and debug programmes from Eclipse directly on the device. Although I had to make sure that the manifest file had debuggable set to true, otherwise it didn't work.
Registering your shiny new HP Mini-Note 2133
So you just got an HP Mini-Note 2133 pre-loaded with SLED 10? Great, right?
Well… It’s not been so great for a lot of people. It seems that HP simply put this laptop together, half-assed a SLED load and sent it out into the wild. I’ve had a ton of problems with it, the two major ones being that I couldn’t register the machine with the Novell Customer Center (not even with my site license) it ships with a non-working wireless card.
My wifi fix was simple, buy a new usb wifi dongle… Registration, however, was a little easier to fix (after some wailing, gnashing of teeth, and chat in #opensuse-GNOME… thanks captiain_magnus!).
If you attempt to use YaST to register you copy of SLED on the 2133, you’ll be re-directed to a “special” Novell Customer Center login. It’s a little different than the normal one in that it wants an HP license, not any other SLED license you may have. The biggest difference, however, is that it’s broke. It simply refreshes the page when you click submit and sends nothing to Novell.
They’re pretty sneaky about hiding your license number as well. It happens to be on your restore DVD. It’s located on the right hand side below the HP logo and the “2133” text. It’s in a series something like NNNNNN-XNN, where N’s are numbers and X is some letter.
To get around the registration bug, have your license number handy and fire up your terminal. Use ‘sudo’ or just ‘su to root and issue the following command:
suse_register -n -a serial-hp=NNNNNN-XNN
Where “NNNNNN-XNN” is your registration code. Sit back and wait, it took almost 20 minutes for this command to finish for me and you’ll receive absolutely no indication that it’s functioning. Once it’s done, you’ll simply be returned to your prompt. Fire up YaST or your favorite terminal emulator and check your repositories. You should now have a Novell repository added.
Enjoy!
Acronis 10 Personal for FREE
Acronis is giving away for download copies of Acronis True Image 10 Personal Edition because a new version is out. That means you get whole disk image backups from a friendly interface. You may use free utility to clone your hard drive but it may not have many features as compared to paid hard drive cloning utility like Acronis True Image which is a commercial disk cloning utility and costs around \$50 per license. Download Acronis True Image 10 Personal Edition for Free with Serial Key:
- Go acronis.co.uk website (http://www.acronis.co.uk/mag/ati10pe)
- Fill up the form by entering your name and email address
- You will receive an email, so, click on Confirmation Link in your inbox
Once you have confirmed your email, you will receive a serial number of Acronis True Image 10 Personal Edition in your inbox and you can download the software from your account on Acronis website.
Now, you have a good piece of software :)
Combining pdf files in Linux/Unix
Just to show a few examples how to combine pdf files. Let us assume we have three pdf files and now we need to combine them:
- gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=finalcombinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf
- joinpdf myfinalFile.pdf file1.pdf file2.pdf file3.pdf
- pdfmeld file1.pdf, file2.pdf, file3.pdf resultcombinedfile.pdf
Some of the other tools available for merging PDF files include pfdtk, Multivalent, and pdcat.
* Ghostscript - A popular tool for
viewing Postscript and PDF documents
* joinPDF - A simple, yet
effective, PDF merging tool
* pdfmeld - A powerful tool
for combining PDF files
Hey Planet SUSE!!
This is my first post there, I'm a member of the GNOME Team trying to do the best i know, in my free time, to improve the GNOME Desktop.
I don't work for Novell i'm just having some fun contributing for GNOME.
Some things about me here.
Linking Buildservice packages with exact revisions
During the “cleanup” of the HP-Education repository, I used a very interesting feature of the openSUSE Build Service: linking against revisions.
Sometimes, you want to patch a package from another repository to build with special features enabled or disabled. The Build Service allows you to link the package from this other repository (and avoid wasting space by duplicating the sources) and add your patches.
Now think about a patch against a special version of a package – and you know that you don’t want a package with a newer version in your repository for a foreseeable time. But if you use the plain link command of the Build Service, the linked package in your repository will get updated if the original package in the original project is updated.
Luckily, the buildservice allows you to link against a “frozen” state of a package: it’s source-revision. People already knowing any revision control systems like Subversion also know that the revision of a source is increased each time, a new change is submitted. And that’s what we need now: link against a special revision of the package from the other repository and apply our patch against it. The webclient currently doesn’t support such special features, but with osc it’s very easy.
First, check the needed revision in the original project:
cd Education/MultiplicationStation
osc info
Project name: Education
Package name: MultiplicationStation
Path: /home/data/SVN/Education/MultiplicationStation
API URL: https://api.opensuse.org
Source URL: https://api.opensuse.org/source/Education/MultiplicationStation
srcmd5: 484c329659d613e3bbdd515a1a8d1099
Revision: 10
Link info: None
Now create a link with this (or any further) revision to your new project:
osc linkpac -r 10 Education MultiplicationStation isv:hp:education
..and in the resulting “_link” file in your new project, you’ll find:
<link project="Education" package="MultiplicationStation" rev="10">
<patches>
<!-- <apply name="patch" /> -->
<!-- <topadd>%define build_with_feature_x 1</topadd> -->
</patches>
</link>
So your linked package will always use the source revision 10 of the original project. Let’s start applying patches…