Home Home > 2012
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 2012

[gsoc] osc2 client – summary of week 7

July 11th, 2012 by

Hi,

here’s a small summary of the 7th (coding) week. Last week
I was really busy with university stuff (it was the second
last week in the lecture period so I had to recap quite
some stuff) and didn’t manage to work much on the GSoC project.
I’m going work off the TODO this weekend.

Marcus

[gsoc] osc2 client – summary of week 6

July 3rd, 2012 by

Hi

here’s a small summary of the 6th (coding) week. Last week I
continued working on the build module and developed a concept
for the package fetcher (and discussed some parts
with darix:) ).
The main idea is to modularize the fetcher code, verify code etc.
Thus we have a fetcher class which takes care of retrieving the
packages. The fetcher class utilizes a “cache manager” which takes
care of storing the fetched packages on the filesystem. The goal is
that at some point in time one can exchange the “simple” cache manager
with a more “clever” cache manager (which for instance cleans up the
cache from time to time or only allows exactly one version of a
package in the cache etc.). In order to achieve this no code in the
fetcher has to be touched – instead it’s sufficient to pass a different
cache manager object to the fetcher.
Additionally the fetcher provides some hooks like pre, pre_fetch,
post_fetch and post. For instance a post_fetch hook can be used to
verify the just fetched package etc.

TODO:
– write testcases and implement the concept from above

If you have questions, suggestions etc. feel free to contact me:)

Marcus

Repository GNOME:Contrib is dead

June 29th, 2012 by

An announcement for GNOME users in openSUSE: the repository GNOME:Contrib is now dead. This used to be the development branch of GNOME packages living in Contrib. Packages previously in this repository have all been pushed to Factory. If this is in the list of your subscribed repositories, please remove it now (using zypper rr <reponame> or from YaST, etc.), because the repository itself will be deleted from the download.opensuse.org server shortly.

[gsoc] osc2 client – summary of week 5

June 26th, 2012 by

Hi,

here’s a small summary of the 5th (coding) week. Last week I spent
most of my time with working on the cpio module. Finally I ended
up with a complete rewrite of osc’s “old” cpio module. The
cpio implementation details are taken from the cpio 2.11 package.
Currently only the “new ascii” format is supported and we can
only handle regular files (this is sufficient for our needs). Here’s
a small example how to use it:

# cpio_open is just a convenience method for CpioArchive(filename=fname)
with cpio_open(fname) as archive:
    for archive_file in archive:
        # print filename
        print archive_file.hdr.name
        # print contents
        print archive_file.read()

It’s also possible to pass a file-like object to a CpioArchive
instance (in this case we do not need to use the with statement).
Also it can be “easily” enhanced to support different cpio formats
(one just have to write the specific ArchiveReader and ArchiveWriter
classes:) ). The code is available at [1] and the testcases at [2].

Todo for this week:
* finish the build module
* start with working on the package fetching code

Marcus

[1] https://github.com/openSUSE/osc2/blob/master/osc/util/cpio.py
[2] https://github.com/openSUSE/osc2/blob/master/test/util/test_cpio.py

[gsoc] osc2 client – summary of week 3 and 4

June 19th, 2012 by

Hi,

here’s a small summary of the 3rd and 4th (coding) week . First of all I
wasn’t able to do lots of work in week 3 and 4 so I’m still working on
the new build module for the osc2 library.
The initial plan was to copy/reuse some of the existing modules from the
(old) “osc” like the cpio [1] and packagequery modules. But I decided to
refactor/rewrite cpio module for the following reasons:

  • “save” disc space:
    In our scenario we retrieve a cpio archive from the api (which contains
    binary packages for example). The old cpio module expects a filename
    in order to “unpack” the archive – that is the file has to be stored on
    disc first. Consequently approximately 2 * of free disc
    space is needed.
    The new idea is that we pass a file-like object (in our case an object
    which inherits from “AbstractHTTPResponse”) to the cpio module and
    unpack the archive “on the fly” (without storing the http response
    on disc first).
  • have testcases:
    The old cpio module has no testcases (because some time ago I didn’t
    follow the TDD approach;) ). For nearly all modules in osc2 there exist
    testcases (white-box tests) thus it would be nice if we have some
    testcases for the cpio module, too (theoretically we could add some
    black-box tests (the current methods aren’t really testable thus
    white-box tests aren’t possible)).
  • have a nice pythonic interface:
    The new interface will look like this:

    from cpio import cpio_open
    # let "f" be a file-like object (for instance a http response)
    with cpio_open(fobj=f) as cpio_archive:
        for a_file in cpio_archive:
            # store file (with correct permissions etc.) in os.curdir
            a_file.write(os.curdir)
            # alternatively it's also possible to read some data (instead of
            # writing it to disc) via a_file.read(len)

    We will also support a plain filename in cpio_open.

Currently the cpio module will only support the “new ascii” (ascii SVR4
no CRC) format and regular files (that’s sufficient for our needs). But
it will be possible to simply pass in a class for a different format
(that is no code has to be altered in order to support a new format).

Finally this will be finished by the end of this week.
If you have any questions or suggestions please tell me:)

Marcus

[1] https://github.com/openSUSE/osc/blob/master/osc/util/cpio.py

New blog

June 7th, 2012 by

As some of you already know, I have moved my blog to:
Por si no lo sabías, he mudado mi blog a:

www.javierllorente.com

My first post comes with lots of green (12.2 beta1 screenshots)
Mi primer artículo tiene un verdor increíble (capturas de pantalla de la versión 12.2 beta1)
🙂

[gsoc] osc2 client – summary of week 1 and 2

June 4th, 2012 by

Hi,

first of all I’m happy that I was accepted for GSoC again. The goal of this year’s project is to enhance
the existing osc2 library which was developed during last GSoC. Additionally I’m going to work on a new osc2 client. For the details have a look at the proposal (or just ask:) ).
Here’s a small summary of the first and second (coding) week. Unfortunately I was a bit busy with university (as usual…) and I just implemented the missing code for the “Request” class. Now it is possible to accept, decline etc. reviews and requests. Example

req = Request.find('123')
req.accept(comment='looks good')
# or accept the second review
req = Request.find('42')
review = req.review[1]
req.accept(comment='ok', review=review)

As usual the test driven development approach is used which worked quite good in the last year.
Todo for this week:

  • add a build module to the osc2 library which can be used to build a package (basically a wrapper around the “build” script)

KDE3 gets Udisks2 backend

June 2nd, 2012 by

Thanks to exceptional work by Serghei Amelian KDE3 has recently gained an Udisks2 backend (earlier than KDE4 did btw!). The Udisks2 backend is capable of operation autonomously or in conjunction with udisks-glue. Unfortunately the autonomous operation is still not perfect and requires altered polkit rules.

System storage

To switch the Udisks2 backend on and off, go to Peripherals->Storage Media->Advanced in KDE control center.

Switching Udisks2 backend on and off

AMD/ATI fglrx 8.961 Catalyst 12.4 (build 5) rpms available for openSUSE 12.2, 12.1, 11.4, 11.3 & Tumbleweed

May 31st, 2012 by

Those informations are obsolete now : please consult //lizards.opensuse.org/?p=8888

AMD/ATI Catalyst 12.4 / fglrx 8.961 (build 5 revised) rpms are available

Quick Résumé about 12.4

The first version available in repository from April 30th has trouble with any kernel never than 3.3

Sebastian Siebert has create a patch for kernel 3.4+, I google translate quickly his blog article here.

AMD catalyst control center and fgl_glxgears

May 30th 2012
WARNING! Who use AMD Catalyst 12.4 driver from the AMD installer will inevitably have problems with kernel 3.4.0 and higher (eg from the Tumbleweed repo).
Because the driver is designed, at least up to kernel 3.3.x on openSUSE only.
Here are some examples of errors when compiling a kernel module fglrx:

error: 'cpu_possible_map' undeclared (first use in this function) ... 
error: implicit declaration of function '__save_init_fpu'

Or when you load the fglrx kernel module:

 A FATAL: Error inserting fglrx (/ lib/modules/3.4.0-25-desktop/extra/fglrx.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 The output of dmesg: fglrx: Unknown symbol old_rsp (err 0) 

I now have an updated makerpm-amd script and replaced the older packaging from script to a newer.
At this point, I say thank you for the helpful feedback and also to the AMD community that their minds have assembled to investigate the problem and make it to the world.
The packaging script I maintain, need no extra time. The kernel patches for the compiler error I’ve already entered for this month in the AMD installer. In the next AMD Catalyst we will not need this patch anymore. Since the patch will be included in the source fglrx from AMD for the next version.

Small warning for stormy times: AMD plans to graphics chips R6xx/R7xx not lead to the main branch.
The graphics card series Radeon HD 2000, 3000 and 4000 are affected (Phoronix has reported). The last supported version is expected to be AMD Catalyst 12.7. However, AMD has turned in and stored in a separate branch of this, it weiterzupflegen there. It means that no new feature added, but only fix bugs. openSUSE 11.4 and 12.1 is still supported and maintained. The chances are good that the driver to get there will also run on an X-Server 1.12.
The next openSUSE version 12.2 in July, will should use the X-server 1.10, so that the driver theoretically run on this version of openSUSE. For this I’ll create a separate makerpm-amd script, that this legacy continues as usual drivers to install on openSUSE 11.4 and 12.1 (possibly 12.2) and will also provide the necessary kernel patches. AMD believes that these chipsets will already extensive support from the free Radeon driver. So it is time to order a new graphics card in order to continue the beta drivers from AMD Catalyst testing on openSUSE. A new graphics card was already planned last October. So I will finally keep your hardware donation for the new graphics card.

See more at Sebastian’s blog.
Don’t be shy, you can leave there the result of test in english too 😀
or ask in forums, irc and ping freespacer.
See below what to do in case of troubles.

The rpms version 8.961 are available from Thursday May 31

(more…)

Ruby: Why to use symbols as Hash keys ( and why not )

May 24th, 2012 by

I have often read that for hash keys it is better to use symbols than strings. So I was interested why and what is performance impact. It is quite easy to create a test scenario to measure it. The blog post also contains technical explanation and shows potential security problem. (more…)