Home Home
Sign up | Login

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

[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

Read the rest of this entry »

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. Read the rest of this entry »

A New Font Repository

May 21st, 2012 by

what do you need when you write some text? Content, of course. Apart from your content you need an additional part to make it a shiny contribution: fonts! If you don’t know already: we have now a new repository dedicated just to fonts.

Read the rest of this entry »

openSUSE in Education, Spreading Continue

May 17th, 2012 by

What do you feel as an open source developer, user, or enthusiast if you see this beautiful piece of software is used by hundred of schools and thousand of students? Great isn’t it? And that’s what happened here in a small dot on this earth in Yogyakarta Indonesia.

This program was initiated by the Government of Indonesia with the objective to introduce the open source and e-learning method to student and teacher. So three years ago I was contacted to help them to realize their dream, and here I’m now reporting that there are around 7300 openSUSE installation in 350 elementary and junior-high schools. We also use SLES in servers to provide repositories and e-learning materials in SCORM using Moodle.  This is work in progress. We educate teachers to use openSUSE and also creating learning material so it is always in beta stage I think 😀

I want to say thank you to all the good people, my friends and co-workers, they are unknown in openSUSE community, even many of them are not subscribing the mailing list, but they are the true openSUSE ambassadors in Indonesia. They come to schools and persuade the teachers to use openSUSE. Without them this dream will never come true. Picture below show some of them smiling holding the openSUSE 12.1 promo DVD that AJ sent to me. You all great! Also picture of teachers while following our session about openSUSE.

All the good people

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Teachers train using openSUSE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Finally we welcome everyone in openSUSE community if you want to visit Indonesia don’t forget to pay a visit to one of this schools in Yogyakarta and you will see how student are happy using it 😀

CLI to upload image to openstack cloud

April 18th, 2012 by

I work on automatic testing of one of our products that creates other projects.
And because there is a lot of clouds everywhere I want to use them too. We
have internally an OpenStack cloud (still Diablo release). So I need to solve
automatic uploading of images built in the Build Service. Below I describe my working version.

Read the rest of this entry »