Home Home > 2010 > 06
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Archive for June, 2010

Hackweek V: osc bash completion

June 15th, 2010 by

During last week , I was working on my Hackweek V project: bash completion for osc. It’s still far from being complete, but IMHO it is usable already, so here we go.

Download

The project is hosted on gitorious.org. To get the sources, use git:

git clone git://gitorious.org/opensuse/osc-bash-completion.git

Installation

You need working and configured osc. I have tested the completion with osc-0.126git, but it should more or less work with older/newer versions too. Naturally, your shell has to be bash (I used bash-4.x). The easiest way how to try the completion is simply to do
~> source osc.shThis will enable the completion for the given shell only – see README for more “persistent” ways how to enable the osc completion.

Features

The script provides support for completing:

  • osc subcommand names (checkout, commit, …)
  • global long osc options (e.g. –quiet, –debug, …)
  • long subcommand options
  • project names
  • package names (in given project)
  • file names (in given project/package)
  • repository names (openSUSE_Factory, …)
  • architectures (i586, x86_64, …)

Some examples:
osc com<tab><tab> => osc commit
osc --ht<tab><tab> => osc --http-debug
osc build --a<tab><tab> => osc build --alternative-project
osc ls Ar<tab><tab> => osc ls Archiving
osc ls Base:System pa<tab><tab> => osc ls Base:System parted
osc cat Base:System parted ba<tab><tab> => osc cat Base:System parted baselibs.conf
osc buildlog openSUSE_<tab><tab> => osc buildlog openSUSE_
openSUSE_Factory openSUSE_11.0 openSUSE_11.1 openSUSE_11.2

osc buildlog openSUSE_Factory x<tab><tab> => osc buildlog openSUSE_Factory x86_64
osc createrequest -a<tab><tab> => osc createrequest -a
add_role delete change_devel set_bugowner submit

osc ? d<tab><tab> => osc ?
delete deleterequest dependson dif

osc meta a<tab><tab> => osc meta attribute
osc my <tab><tab> => osc my
pkg prj rq sr

osc request <tab><tab> => osc request
accept approvenew co decline checkout
list log revoke show wipe

osc getpac for<tab><tab> => osc gepac fortune

At the moment, the script DOES NOT provide support for completing

  • short options
  • arguments for most of the options
  • some complex combinations of arguments

Caching

To avoid long delays and spamming OBS server too much, the script caches several information:

  • list of projects in OBS
  • list of packages in individual projects (only in those that have been accessed by osc)
  • output of “osc repos prj” (dtto)

Please see the README file for more information about how the caching works and how to customize it (to make the completion significantly faster).

Known issues, TODO

  • The script does not work correctly if there is a long option with argument and there is ‘=’ between the option and argument (–long-option=arg). Please use the ‘–long-option arg’ form instead.
  • For the time being, the script does not recognize alternative apiurl (-A|–apiurl) and thus it works only with default (https://api.opensuse.org) api.
  • Sourcing the script removes the colon from COMP_WORDBREAKS variable to make completion of Build Service projects easier. This was known to break e.g. git completion in the past (however, I didn’t notice any issues). In the future, the script should be fixed so that modifying of COMP_WORDBREAKS is not necessary.
  • The script should dynamically create list of osc subcommands and lists of their options by parsing osc help output (or something similar). Now the lists and logic are hardcoded in the script, which will make it maintenance nightmare when osc changes.
  • Completing of “osc {chroot,build}” is not yet implemented.
  • See TODO file

Testing and feedback

The completion script is very new, tested only by me and mvyskocil for a while, so it definitely has a lot of bugs. Before releasing it as a separate package, I’d like to collect some feedback first (and fix the already known problems and TODOs), so, if you are interested, please give it a try and report any bugs, suggestions or patches directly to me (petr.uzel@suse.cz). Also, feel free to ping me on IRC: ptr_uzl @ freenode.net.

I hope at least somebody (except me 🙂 ) will find the completion useful. Thanks and happy completing.

Hello Word

June 14th, 2010 by

Hello Word…I’m the new openSUSE  Member.

Use the forçe, USE openSUSE!

“Collaborate attract friends, compete attract enemy”

http://pt.opensuse.org/Usuario:Cabelo

Hackweek V: Local caching for CIFS network file system

June 14th, 2010 by

Hackweek

It’s that time of the year when SUSE/Novell developers use their Innovation Time-off to do a project of their interest/wish – called as Hackweek. Last week was Hackweek V. I worked on making the Common Internet File System (CIFS) cache aware, i.e. local caching for CIFS Network File System.

Linux FS-Cache

Caching can result in performance improvements in network filesystems where access to network and media is slow. The cache can indirectly improve performance of the network and the server by reduced network calls. Caching can be also viewed as a preparatory work for making disconnected operation (Offline) work with network filesystems.

The Linux Kernel recently added a generic caching facility (FS-Cache) that any network filesystem like NFS or CIFS or other service can use to cache data locally. FS-Cache supports a variety of cache backends i.e. different types of cache that have different trade-offs (like CacheFiles, CacheFS etc.) FS-Cache mediates between cache backends and the network filesystems. Some of the network filesystems such as NFS and AFS are already integrated with FS-Cache.

Making CIFS FS-Cache capable

To make any network filesystem FS-Cache aware, there are a few things to consider. Let’s consider them step by step (though not in detail):

* First, we need to define the network filesystem and it should be able to register/unregister with the FS-Cache interface.
* The network filesystem has to define the index hierarchy which could be used to locate a file object or discard a certain subset of all the files cached.
* We need to define the objects and the methods associated.
* All the indices in the index hierarchy and the data file need to be registered. This could be done by requesting a cookie for each index or data file. Upon successful registration, a corresponding cookie is returned.
* Functions to store and retrieve pages in the cache.
* Way to identify whether the cache for a file is valid or not.
* Function to release any in-memory representation for the network filesystem page.
* Way to invalidate a data file or index subtree and relinquish cookies.

Implementation

I wanted to get the prototype working within a week. So the way I have implemented it is rudimentary and has lot of room for improvement.

The index hierarchy is not very deep. It has three levels – Server, Share and Inode. The only way that I know of identifying files with CIFS is by ‘UniqueId’ which is supposed to be unique. However, some server do not ensure that the ‘UniqueId’ is always unique (for example when there is more than one filesystem in the exported share). The cache coherency is currently ensured by verifying the ‘LastWriteTime’ and size of the file. This is not a reliable way of detecting changes as some CIFS servers will not update the time until the filehandle is closed.

The rudimentary implementation is ready and the cumulative patch can be found here:

http://www.kernel.org/pub/linux/kernel/people/jays/patches/

[WARNING: The patch is lightly tested and of prototype quality.]

Here are some initial performance numbers with the patch:

Copying one big file of size ~150 MB.

$time cp /mnt/cifs/amuse.zip .
(Cache initialized)

real 1m18.603s
user 0m0.016s
sys 0m8.569s

$time cp /mnt/cifs/amuse.zip /
(Read from Cache)

real 0m28.055s
user 0m0.008s
sys 0m1.140s

openSUSE Edu: Li-f-e theme for 11.3

June 14th, 2010 by

For openSUSE Edu: Linux for Education based on openSUSE 11.3 we will be going with great new default openSUSE 11.3 theme by Jakub “Jimmac”  Steiner with small addition of our own, here is how it looks.

(more…)

Some wrap-up from LinuxTag

June 14th, 2010 by

Just traveling back by train from LinuxTag, Berlin to Nürnberg. How was LinuxTag? In general it seems to me that LinuxTag may should change their motto “Were .com meets .org” as the event changed over the years more and more to an community project events with a few companies attending and a few business visitors passing by. I wonder who’s willing to pay the bill for LinuxTag ongoing? But that’s not of my business. Apart of the trade show the LinuxTag team served a pretty broad and high quality 4 days conference. For the community guys and girls I’d say it was a pretty good event with much conversation and meeting of people you normally just meet on mailingslists, forums or IRC and with a bunch of poeple new or intersted in Linux and open source.

We had big fun at the openSUSE booth showing mainly the openSUSE Build Service 2.0 and milestone 7 of openSUSE 11.3. Additional of this usual trade show program we served daily 3-4 small hack sessions on the booth to teach people in things like, Roll your first package in the Build Service, Insights into GNOME 3.0 or learning some Inkscape magic.  They all were well attended and gave room for intensive 1:few conversations. The biggest fun we had with “Henne’s handicraft workshop” which took place daily at 5pm at the booth and covered stuff like creating your openSUSE bag, match LinuxNacht dress cody by wearing an openSUSE pin etc.

In the conference I visited a few presentation to get more knowledge about SUSE Studio, Mono, open sourc in companies etc. I visited as well Microsoft’s keynote and I was not alone in the room 😉
The keynote was given by James Utzschneider who’s heading the open source department at Microsoft since less then a year but is with Microsoft for over 15 years. He’s a good talker and it looks to me that he’s a smart guy as well. He was pretty clear on the open source strategy Microsoft is following:

  • Microsoft changed heavily. Everything can be put on the table for disussion today but should be backed with good arguments.
  • Customer are asking that Microsoft products work seamlessly with open source products where ever they are used at customers location. So, main goal here is to follow common standards and improve the interoperability in literally all areas to make the customers confident and stay with Microsoft products.
  • Microsoft is a business company and is mainly driven through business cases – if the open source path is beneficial in $ for Microsoft – Microsoft will take it further down. Its pretty unlikely that things are done for the open source community just to make them happy.

We might get in touch with James as Microsoft could spice up the openSUSE conference in October. Ahh, with regards to that we informed pretty many other projects and developers at LinuxTag about the openSUSE conference and this years motto “Collaboration accross borders” and it was well received and we should be able to cover a number of interesting topics working together with communities other then the openSUSE one. Now it the time to shape the conference, call for papers is open till July 31.

Pavol put up a collection of photos which give a good summary of openSUSE @ LinuxTag 2010. We had fun at LinuxTag 2010, had many good conversations, got new valuable input in many areas and are keen on how LinuxTag evolves in the future.

Some LinuxTag 2010 impressions

June 13th, 2010 by

LinuxTag 2010 has ended, openSUSE had a booth in the community area and we had a number talks. We also released OBS 2.0 on LinuxTag. You know this of course already, but here are some impressions.

openSUSE booth was very well visited. Various workshops and activities created several times actually a big swarm around it. Many people were interessted about OBS in special and I hope we won some more OBS users and developers.

Hennes and mine talk about “how to escape the free software hell” was provocant enough to get quite some people into our room directly after the keynote. I hope we were able to show off the coolness of OBS there.

Read the comments in the picture gallery for some background information.

Improve Software Quality

June 12th, 2010 by

Today I and some hundred others on LinuxTag in Berlin attended a keynote by Mark Shuttleworth, the “head dreamer” of the ubuntu Linux distribution.

He had pretty few slides with hardly any words on it. The headlines were “Cadence”, “Quality” and “Design”. As I have been working towards openSUSE quality, this interested me most – so this is what this text is going to be about. His thoughts were mostly what I was thinking anyway.

Quality works like this: if Factory (equivalent of Debian/sid or whatever it is called in ubuntu) breaks horribly every other week, few people will feel inclined to keep running on Factory or even on factory-snapshot. Mark spoke about a difference in number of testers of “one or two orders of magnitude” (which would mean a factor of 10-100 in mathematical terms). And having fewer testers during development can only mean lower quality for the final release.

This is why efforts should be taken to ensure a working Factory. Automated testsuites and reviews were specifically mentioned, among others. Some packages like gcc include own test-suites, but most do not. When asked how that was handled in ubuntu, he described an approach with scripts using computer vision, recognizing/clicking buttons which most likely referred to sikuli which has many similarities to what I did, just with a different focus (more user-friendliness) and quite some sophistication. Also for text-mode there is still good old “expect”.

Another thing that was not mentioned there, but which I was always thinking of as an odd shortcoming of openSUSE is that Debian has a “testing” distribution which is not like factory-snapshot. Debian/testing contains only packages migrated from sid after a certain time with no bugs above a certain criticality threshold. Of course, this needs a way to track automatically which bug applies to which package (something that ubuntu does in launchpad).

Launchpad is also nicely integrated with bazaar, so that adding “(LP: #12345)” into a changelog will cause the bug to have a link to the proposed fix and later be automatically closed, once the branch was merged into the main trunk.

This is not only cool, but plain useful. It can save a lot of work and frustration. I think Adrian Schröter will be working into that direction with better integration of buildservice into bugzilla and other openSUSE tools.

There is also a big human component. Especially with testers which are non-technicians. It is not so much about motivating them, but about not demotivating them (which can happen surprisingly easy in some cases). I have seen crash messages along the lines of “xxx has crashed. This is in no way your fault. You could help us by …” which is a very good thing in this regard.

Yet another related note: there are openSUSE-Promo and openSUSE-Biarch DVD iso variants which are so well hidden, that few people even know about their existence, so that there can not be much public testing. However, those are the variants that are given away to hordes of interested people at openSUSE booths around the world, but those are also the variants that are least tested. I still have bad memories of the 11.1 or 11.0 one which was degraded to coaster after three unsuccessful tries on different machines. If bandwidth or mirror-space is a problem, offering them only via bittorrent could be a solution.

Overall, still some way to go, but IMHO we are moving into the right direction.

Linuxtag 2010 in Berlin

June 12th, 2010 by

Thursday morning at 5am I woke up, had a quick breakfast and traveled via Nürnberg to Berlin for LinuxTag 2010. I arrived around 12:00 at the fair and was surprised to see it the back occupied by around 7 persons. We had a small booth, so it was full. They were taking part in the workshop “Build your own multi-distro package” held by Michal. The openSUSE boosters had organized these workshops as practical hands-on experience sessions.

(more…)

Zippl – a Lightweigth Presentation Tool

June 11th, 2010 by

Recently people played around a lot with a new kind of presentations. The pages in the classical presentation tool sense seem to lie around on a large canvas and while the presentation running, the focus moves over the canvas and stops by interesting points. Zooming allows to go more in detail and other cool graphics effects make it fun to watch these presentations.

This week was the fifth Hackweek at Novell where we can pick an interesting topic and work on it. I am always interested in cool applications and I wanted to investigate a bit on Qts GraphicsView anyway so I decided to go for a proof of concept implementation of a lightweight but cool presentation tool following these concepts.

The tool is called Zippl (for no specific reason). It is implemented in C++ with Qt 4.6. Via a XML file the user can specify so called spots on the Zippl-canvas. During a presentation one after the other canvas is displayed with an animated move from one to the other.

Spots can consist of text in various fonts and sizes, geometric forms and images. Colors and line widths and stuff can be specified for each item. It is amazing what can already be done with these few elements.

But decide yourself by checking the following out, its the first little presentation done with Zippl:

With Qt its again fun to work on this kind of applications and the GraphicsView framework is awesome. If you want to see code, it is in the KDE svn, module playground/office.

What do you think? Is that something to investigate more on? You can give me feedback in openFATE about it if you want and rate it.

Guest Blog: Rares Aioanei – Weekly Kernel Review (openSUSE Flavor)

June 11th, 2010 by

Guest Blog from Rares Aioanei

Welcome to another edition of openSUSE’s kernel weekly news!
This week sees the launch of 2.6.35-rc2, plus other goodies, so let’s dive into it!

-Takashi Iwai pushed sound fixes for -rc2, mainly for the USB audio stack, v4l/dvb fixes were pushed by Mauro Carvalho Chehab (-rc1), Len Brown has patches for the SFI and ACPI trees targetting -rc1 and openSUSE’s Greg Kroah-Hartman also posted multiple fixes for USB, driver-core, staging and TTY and serial targetting 2.6.35-git.

-Grant Likely has fixes for the sparc architecture : “This patch moves SPARC architecture specific data members out of struct of_device and into the pdev_archdata structure. The reason for this change is to unify the struct of_device definition amongst all the architectures.  It also remvoes the .sysdata, .slot, .portid and .clock_freq properties because they aren’t actually used by anything.

A subsequent patch will replace struct of_device entirely with struct platform_device and the of_platform support code will share common routines with the platform bus (but the bus instances themselves can remain separate).

This patch also adds ‘struct resources *resource’ and num_resources to match the fields defined in struct platform_device.  After this change, ‘struct platform_device’ can be used as a drop-in replacement for ‘struct of_platform’.

This change is in preparation for merging the of_platform_bus_type with the platform_bus_type.”

-Al Viro posted fixes for the vfs tree targetting -rc2, while Ryusuke Konishi and David Miller posted patches for the nilfs2 and networking trees, respectively. Alex Elder updated the XFS tree  for -rc2, Jens Axboe updated block for -rc1, Michal Simek updated the arch/microblaze tree with fixes targetting 2.6.35-rc3 and Jeff Garzik updated the libata tree with some quirk fixes.

-Jeffrey Merkey announced Merkey’s Kernel Debugger 2.6.34 :  “Have not tested the APIC IPI calls yet but should work.  Let me know if there are problems.  I disable the hw_breakpoints interface with MDB is loaded because it is not well designed and to be honest, virtualizing DR6 and trying to handle these types of events outside of a debugger core causes a lot of problems.  Has support for x86_64 and works under it however, I have not completed the dissassembler with the newer x86_64 instructions, so some of them do not display properly and do not detect the 64 bit flag, but will finish this at a later date as I need it.  I do most of my work on 32 bit anyway and will work on it as I have time.  Someone else is welcome to add it and send me back the changes since this is the only thing missing for full
x86_64 features — finished everything else.”

-Mr. Torvalds, Linus Torvalds, announced the release of 2.6.35-rc2 thusly :
“So -rc2 is out there, and hopefully fixes way more problems than it introduces. I’m slightly unhappy with its size – admittedly it’s not nearly as big as rc2 was the last release cycle, but that was an unusually big -rc2. And I really hoped for a calmer release cycle this time.

In fact, for once I’m going to enforce -rc3 being sane, because the  upcoming week is the last week of school for my kids. And when the kids get out of school, I’m going be offline for a while. And as a result, I _really_ don’t want to pull anything even half-way scary in the next week for -rc3.

So any pull requests had better be obvious fixes only, and this time I’m not going to let things slide.

Anyway, the biggest patches in -rc2 are some staging drivers (70% of the patch is just that), so while it’s still biggish, at least most of it is clearly staging.

Of the remaining non-staging 30%, half of _that_ is just the regular drivers (drm: i915 and radeon, along with some dvb updates is a noticeable chunk), with a new Core i7 EDAC driver that I had gotten a pull request for before -rc1, but just hadn’t had the energy to pull until -rc2 (same goes for a build system update – the pull request predated -rc1).

And some late powerpc changes that I do _not_ think predated -rc1. Tssk.  I’m really not going to let things like that slide next -rc, as mentioned.

But the most important part is obviously the regression fixes, which tend to be small and not show up much in the patch statistics. A number of reverts, a number of fixes, hopefully things are all rosy.

And it really isn’t _that_ bad – the -rc2 shortlog is almost never small  enough to be worth posting on the mailing list, but I think it’s doable this time, even if it’s borderline. So ShortLog appended if people care
about the (summary of) details.

Linus ”

-Dave Airlie updated the drm tree with some fixes as he explains in his mail : “3 regressions fixes, one radeon loading on IGP, one i865 loading, one and  an evergreen userspace interaction workaround.

It adds hwmon support for a temperature sensor on r600 cards, later PM patches were build on this and Alex had tested them in one so I didn’t want to cherry-pick around it. Also its useful to report the gpu temp to check if power management is helping cooling it down.”

-Stefan Richter came up with a single update/fix for Firewire, Martin Schwidefsky posted three bug fixes and a defconfig update for the s390 architecture targetting-rc2, Tejun Heo has also some fixes, this time for sched/core and Frederic Weisbecker updated the perf and tracing trees with various fixes.

-Karel Zak of Redhat announces util-linux-ng version 2.18-rc1, posting also the release notes, stating the updates, fixes and improvements specific to this version.

-Artem Bityutskiy posted a pull request for the UBI tree targetting -rc3, David Miller pushed another series of networking updates, Jesse Barnes updated the PCI tree, while Takashi Iwai targeted -rc3 with updates to the sound tree; other updates include perf (Ingo Molnar), perf for 2.6.36 (Arnaldo Carvalho de Melo) and block/io (Jens Axboe).

-Rafael Wysocki posted a list of reported regressions from 2.6.33.4 (related to-rc2-git2), comprised of 15 regressions, from which 13 are pending and 10 are unresolved.

-Thomas Gleixner announced 2.6.33.5-rt23, a new kernel from the preempt-rt series – changelog to be found in the lkml archive.

-Avi Kivity has updates for the kvm tree targetted at -rc2, Jeff Garzik updated the libata tree with some fixes, Sage Weil, as usual, updated the ceph tree (for -rc3) and Steven Rostedt updated the perf tree (2.6.35).

That would be it for this week, take care and enjoy your weekend!