Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar
a silhouette of a person's head and shoulders, used as a default avatar
darix posted in English at

Howto patch a rubygem based package?

After I was asked again today how to properly patch a rubygems package, here is a quick how to.

First things first we branch the package.

darix@tengu ~/osc/tmp % osc bco devel:languages:ruby:extensions/rubygem-net-ssh-session
A    home:darix:branches:devel:languages:ruby:extensions
A    home:darix:branches:devel:languages:ruby:extensions/rubygem-net-ssh-session
A    home:darix:branches:devel:languages:ruby:extensions/rubygem-net-ssh-session/net-ssh-session-0.1.6.gem
A    home:darix:branches:devel:languages:ruby:extensions/rubygem-net-ssh-session/rubygem-net-ssh-session.changes
A    home:darix:branches:devel:languages:ruby:extensions/rubygem-net-ssh-session/rubygem-net-ssh-session.spec
At revision 9edd872bc9121e1c68a71d057dfa607f.
Note: You can use "osc delete" or "osc submitpac" when done.

darix@tengu ~/osc/tmp % cd home:darix:branches:devel:languages:ruby:extensions/rubygem-net-ssh-session

So far nothing unexpected a gem file and spec+changes.

darix@tengu rubygem-net-ssh-session % l
total 28
drwxr-xr-x 3 darix users   122 Jul 23 12:21 ./
drwxr-xr-x 4 darix users    47 Jul 23 12:21 ../
-rw-r--r-- 1 darix users 13824 Jul 23 09:54 net-ssh-session-0.1.6.gem
drwxr-xr-x 2 darix users  4096 Jul 23 12:21 .osc/
-rw-r--r-- 1 darix users   143 Jul 23 10:09 rubygem-net-ssh-session.changes
-rw-r--r-- 1 darix users  1472 Jul 23 09:54 rubygem-net-ssh-session.spec

I prefer quilt for my patch handling but quilt setup doesn’t know how to handle our spec files yet. So some manual work required. This btw is also the reason why I include the series file in the source package.

a silhouette of a person's head and shoulders, used as a default avatar

Livros - O diário de Jack, o estripador

Assim como outros personagens reais que foram parar no quase imaginário popular, Jack, o estripador, sempre me deixou curiosa. Refrescando: Inglaterra vitoriana, século 19. Havia um assassino de prostitutas à solta no distrito de Whitechapel em Londres. 5 mulheres foram mortas, com direito à evisceração. Não sou muito chegada em livros policiais nem em jornalecos sensacionalistas da TV, mas gosto

a silhouette of a person's head and shoulders, used as a default avatar

Livros - O fim da infância

Outro livro de Arthur C. Clarke na minha mão. Apesar de não ter gostado do filme "2001 -- Uma odisséia no espaço" (achei massante por se concentrar apenas no HAL-9000 e o final, apressado) o livro foi uma boa surpresa. E acabei gostando da forma com a qual Clarke escreve. No prefácio, o autor, morto em 2008, já diz que se Hollywood fizer um filme baseado em "O fim da infância", todos irão achar
a silhouette of a person's head and shoulders, used as a default avatar

Watching The Ashes

TV Struggles Watching live sport in Hong Kong can always be a bit of a challenge. There’s generally two providers of many things pay TV, and sometimes it feels like it’s all a bit of a stitch up. When I first arrived in Hong Kong (8+ years ago!) I signed up for nowTV with the […]

a silhouette of a person's head and shoulders, used as a default avatar

Progress?

New earphones! Yep – a new set of Jabra earphones turned up yesterday. As promised by Jabra, they’ve sent me a pair of Sport Coach earphones, which are supposedly the next development from the Sport Pulse ones I was previously using and breaking wearing out in rapid time. Unfortunately, this model of earphones do not […]

a silhouette of a person's head and shoulders, used as a default avatar

Accessing my XFCE desktop with x11vnc

The following is probably old boring stuff for many, but I did not know it and it was astonishingly hard to google for it, so maybe it might be news for others, too.

This week I needed to access the desktop of my machine at home from the office. SSH access and X forwarding were not really sufficient options.
I remembered that a long time ago, KDE already had a "share this desktop" function, which would export the current desktop via VNC and even send an invitation with the credentials via email. As far as I know, GNOME has a similar feature. However, I'm using neither KDE nor GNOME but XFCE, and I could not find such a function. Additionally, I was not at the machine, so interactively setting up something was not really an option.
Finally I came across x11vnc. The short description says it all:
x11vnc allows one to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. In this way it plays the role for Unix/X11 that WinVNC plays for Windows.
This allows exactly what I needed. There is even a neat wrapper "x11vnc_ssh" in the openSUSE package that does the tunneling via SSH and everything else, so that all you need to do is:

  • log in to your target machine via ssh
  • call "x11vnc -storepasswd" (attention: this will store the password in ~/.vnc/passwd)
  • log out and from your "viewer machine" call "x11vnc_ssh username@targethost"
Note that with my default 13.2 setup, x11vnc_ssh does use invalid options for vncviewer, so either update it from the  X11:RemoteDesktop repository, or just remove all options from the vncviewer invocation on line 75 of /usr/bin/x11vnc_ssh, just leaving
if vncviewer :$port $3; then break; fi
That's all you need to do to comfortably access your running desktop!

Now as I initially wrote, this is not really "news", but I still did not know  it before.
a silhouette of a person's head and shoulders, used as a default avatar

openSUSE – proprietären Grafik-Treiber AMD Catalyst 15.7 als RPM installieren

AMD Catalyst 15.7 (fglrx 15.20.1046) wurde veröffentlicht und unterstützt Grafikkarten ab Radeon HD 5000 und höher. Das Skript makerpm-amd-15.7.sh steht ab sofort zum Download zur Verfügung und unterstützt openSUSE 11.4, 12.1, 12.2, 12.3, 13.1, 13.2 und Tumbleweed sowie bis Kernel 4.1 (offiziell nur bis Kernel 3.19).

[UPDATE 03.09.2015]
Das Packaging Script wurde aktualisiert und enthält einen Patch für die Unterstützung von Kernel 4.2.0. Es waren einige tiefgreifende Änderungen im fglrx-Quellcode nötig, um den Treiber auf dem neueren Kernel zum Laufen zu bringen. Das hat mich etwas ins Schwitzen gebracht. Nun ist es endlich fertig und für die Allgemeinheit verfügbar. :-)
[/UPDATE 03.09.2015]

[UPDATE 25.07.2015]
Das Packaging Script wurde aktualisiert und behebt einen GPL-Konflikt mit pci_ignore_hotplug Funktion. Dieser Kompilierfehler ist mit Kernel 4.1.3 aus dem openSUSE-Kernel Repository aufgefallen.
[/UPDATE 25.07.2015]

Neue Features:

  • AMD PowerXpress support for laptops equipped with Intel 6th generation (Skylake) CPUs
  • Linux Platform Atomics & SVM Fine Grain Buffer support for Carrizo APUs
  • Multi-Device support for OpenCL 2.0

Gelöste Probleme:

  • [421317] Segmentation fault observed while launching some OpenGL games in RHEL7.1
  • [419365] Error message observed during installation through rpm package in RHEL 6.5, 7.0
  • [419162] System hangs while running Dying Light
  • [421858] clinfo could not recognize up to four GPU devices

Bekanntes Problem:

  • [419960]: Vari-Bright on some configurations is not decreasing brightness as expected

Link: AMD Catalyst 15.7 Release Notes

Wichtiger Hinweis: Dieser Treiber unterstützt nun offiziell X-Server 1.17 und läuft wieder mit openSUSE Tumbleweed. Der GNOME Desktopmanager ist nur bedingt funktionsfähig. Das bedeutet, dass ein kleiner Workaround notwendig ist, um es zum Laufen zu bringen. Wer unter GNOME das automatische Benutzerlogin aktiviert hat und ein Benutzerwechsel vollziehen möchte, sollte sich auf einen merkwürdigen Fehler gefasst machen. Alle TTY-Konsolen sind dann schwarz und der Anmeldefenster scheint abgestürzt zu sein. Sobald man den automatischen Benutzerlogin in GNOME ausschaltet, funktioniert der Benutzerwechsel ohne Probleme.

Wer GNOME mit gdm nutzen möchte, muss das Skript nach der Installation des Treibers und noch vor dem Neustart wie folgt als root ausgeführt werden:

sh makerpm-amd-15.7.sh --install-gdm-fix

Sollte es gute Gründe geben, den Fix wieder zu entfernen, lässt er sich einfach wieder rückgängig machen:

sh makerpm-amd-15.7.sh --uninstall-gdm-fix

Folgende Steam-Spiele habe ich getestet und laufen mit diesem Treiber (Fettdruck = Neu):

Eine kleine Bitte habe ich: Wenn irgendwelche Probleme mit dem Treiber auftauchen, scheut euch nicht mir zu berichten (Ich nehme deutsche und englische Bugreports gerne entgegen). ;-) Ich werde versuchen, soweit es mir möglich ist, den gemeldeten Fehler zu reproduzieren. Zusammen mit den nötigen System-Informationen werde ich mich direkt an die richtige Stelle bei AMD wenden, um den Bug in der nächsten Treiber-Version beheben zu lassen. Danke schön. :-D

Für Benutzer älterer AMD Grafikkarten (Radeon HD Serie 2000 – 4000) wird dringend die Installation dieses Treibers abgeraten. openSUSE bringt bereits für ältere Grafikkarten den freien Radeon-Treiber mit. Um regelmäßig Verbesserungen am freien Radeon-Treiber zu erhalten, ist die Installation eines neuen Kernel unumgänglich.

Downloads:

Installationsanleitung:
http://de.opensuse.org/SDB:AMD/ATI-Grafiktreiber#Installation_via_makerpm-amd-Skript

Installation guide (English):
http://en.opensuse.org/SDB:AMD_fglrx#Building_the_rpm_yourself

Über das makerpm-amd-Skript

Das Skript makerpm-amd-15.7.sh ist sehr mächtig, robust und läuft vollautomatisch. Der AMD-Installer wird automatisch heruntergeladen, falls er nicht schon im Verzeichnis liegt. Zudem wird geprüft, ob die Grafikkarte vom Treiber unterstützt wird. Auf Wunsch wird nach dem Bau des RPM-Packages der fglrx-Treiber installiert.

Folgende Argumente können dem Skript übergeben werden:

-b Nur das RPM-Package bauen (Standard)
-c <type> Nur X-Server konfigurieren. Monitor-Typ: single = 1 Monitor, dual = 2 Monitore (Wichtig: Nur ausführen, wenn es Probleme mit der Standardkonfiguration des X-Servers auftreten)
-d Nur den AMD-Installer downloaden
-i Das RPM-Package bauen und installieren bzw. updaten
-igf/–install-gdm-fix installiert einen Fix, um den Treiber mit dem GNOME Desktopmanager (gdm) läuffähig zu machen
-kms <yes|no> Kernel-Mode-Setting (KMS) aktivieren oder deaktivieren
-nohw Hardware-Erkennung explizit ausschalten. (z.B. beim Bau in einer VM)
-old2ddriver <yes|no> den alten 2D-Treiber aktivieren oder deaktivieren
-r|–report erstellt ein Report und speichert diese in eine Datei namens amd-report.txt
-u|–uninstall entfernt AMD Catalyst restlos vom System. Zuerst wird das fglrx-Package (falls vorhanden) vom System deinstalliert. Danach werden vorhandene AMD-Dateien und -Verzeichnisse entfernt. Hinweis: Falls das Rebuild-Skript installiert wurde, wird es ebenfalls entfernt und das Initskript /etc/init.d/xdm wiederhergestellt.
-ugf/–uninstall-gdm-fix entfernt den Fix, dass den Treiber mit dem GNOME Desktopmanager (gdm) läuffähig macht
-ur|–uploadreport wie Option –report nur zusätzlich wird der Report auf einem NoPaste-Service sprunge.us hochgeladen und gibt bei Erfolg den Link zurück.
-h Die Hilfe anzeigen lassen
-V Version des Skript anzeigen

Hilfe, es funktioniert nicht!

Bitte haltet folgende Regel ein:

  1. Bei der Eingabe der Befehle auf mögliche Tippfehler überprüfen.
  2. Möglicherweise ist die Lösung für das Problem im Wiki vorhanden.
  3. In Kommentaren lesen, ob eine Lösung zu einem Problem bereits existiert.

Wenn keines der o.g. Regel greift, dann könnt ihr mit eurem Anliegen an mich wenden. Damit ich euch helfen kann, müsst ihr erst vorarbeiten. Bitte ladet euch das Skript makerpm-amd-15.7.sh herunter und erstellt einen Report von eurem System in der Konsole:

su -c 'sh makerpm-amd-15.7.sh -ur'

Das Skript lädt das Report auf sprunge.us hoch und gibt anschließend einen Link aus. Diesen Link postet ihr in eurem Kommentar zusammen mit einer Beschreibung zu eurem Problem an mich. Ich werde mir euren Report anschauen und Hilfestellung geben, wo evtl. das Problem liegen könnte.

Feedbacks sind wie immer willkommen. :-)

the avatar of Klaas Freitag

DIY Net Player

Something I wanted to share is a device I recently built. It is a complete net player for music files, served by a NAS. It’s now finished and “in production” now, so here is my report. [caption id=“attachment_616” align=“alignleft” width=“595”]The cherry ear net player, based on raspberry pi and HifiBerry Amp+. The cherry ear net player, based on raspberry pi and HifiBerry Amp+.[/caption]

Hardware

The device is based on a Raspberry Model B+ with a HifiBerry Amp+. [caption id=“attachment_618” align=“alignleft” width=“446”]Cherry Ear backside with connectors and power supply Cherry Ear backside with connectors and power supply[/caption]The Amp+ is a high-quality power amplifier that is mounted on the Raspberry mini computer, shortcutting the sub optimal audio system of the raspy. Only loudspeakers need to be connected, and this little combination is a very capable stereo audio system.

Software: Volumio

On the Raspberry runs a specialised linux distribution with a web based audio player for audio files and web radio. The name of this project is Volumio and it is one of my most favorite projects currently. What I like with it is that it is only a music player, and not a project that tries to manage all kind of media. Volumios user interface is accessible via web browser, and it is very user friendly, modern, pretty and clean.

It works on all size factors (from mobile phone to desktop) and is very easy to handle. Its a web interface to mpd which runs on the raspi for the actual music indexing and playing.

[caption id=“attachment_619” align=“alignleft” width=“400”]Volumio User Interface Example Volumio User Interface[/caption]The distribution all is running on is an optimized raspbian, with a variety of kernel drivers for audio output devices. Everything is pre configured. Once the volumio image is written to SD-Card, the Raspberry boots up and the device starts to play nicely basically after network and media source was configured through the web interface.

It is impressive how the Volumio project aims for absolute simplicity in use, but also allows to play around with a whole lot of interesting settings. A lot can be, but very little has to be configured.

Bottomline: Volumio is really a interesting project which you wanna try if you’re interested in these things.

The Housing

I built the housing out of cherry tree from the region here. I got it from friends growing cherries, and they gave a few very nice shelfs. It was sliced and planed to 10mm thickness. The dark inlay is teak which I got from 70’s furniture that was found on bulky waste years ago.

After having everything cut, the cherry wood was glued together, with some internal help construction from plywood. After the sanding and polishing, the box was done.

[caption id=“attachment_621” align=“alignright” width=“300”]Sizes Sizes [cm][/caption]The Raspberry and Hifiberry are mounted on a little construction attached to the metal back cover, together with the speaker connector. The metal cover is tightend with one screw, and the whole electronics can be taken off the wood box by unscrewing it.

At the bottom of the device there is a switching power supply that provides the energy for the player.

How to Operate?

The player is comletely operated from the web interface. The make all additional knobs and stuff superflous, the user even uses the tablet or notebook to adjust the volume. And since the device is never switched off, it does not even have a power button.

I combined it with Denon SC-M39 speakers. The music files come from a consumer NAS in the home network. The Raspberry is very well powerful enough for the software, and the Hifiberry device is surprisingly powerful and clean. The sound is very nice. Clear and fresh in the mid and heights, but still enough base, which never is annoying blurry or drones.

I am very happy about the result of this little project. Hope you like it :-)

the avatar of Klaas Freitag

ownCloud Chunking NG Part 2: Announcing an Upload

The first part of this little blog series explained the basic operations of chunk file upload as we set it up for discussion. This part goes a bit beyond and talks about an addition to that, called announcing the upload.

With the processing described in the first part of the blog, the upload is done savely and with a clean approach, but it also has some drawbacks.

Most notably the server does not know the target filename of the uploaded file upfront. Also it does not know the final size or mimetype of the target file. That is not a problem in general, but imagine the following situation: A big file should be uploaded, which would exceed the users quota. That would only become an error for the user once all uploads happened, and the final upload directory is going to be moved on the final file name.

To avoid useless file transfers like that or to implement features like a file firewall, it would be good if the server would know these data at start of the upload and stop the upload in case it can not be accepted.

To achieve that, the client creates a file called _meta in /uploads/ before the upload of the chunks starts. The file contains information such as overall size, target file name and other meta information.

The server’s reply to the PUT of the _meta file can be a fail result code and error description to indicate that the upload will not be accepted due to certain server conditions. The client should check the result codes in order to avoid not necessary upload of data volume of which the final MOVE would fail anyway.

This is just a collection of ideas for an improved big file chunking protocol, nothing is decided yet. But now is the time to discuss. We’re looking forward to hearing your input.

The third and last part will describe how this plays into delta sync, which is especially interesting for big files, which are usually chunked.

a silhouette of a person's head and shoulders, used as a default avatar

Digital game distribution

UnReal World RPG have come long way how it have been distributed digitally since it started on 1992. First it was on multiple BBS as Shareware application and if you ordered then it was delivered by 4 disks by mail and you copied them to your hard disk. It was pure DOS application at that time. Game author Sami Maaranen have been always modern about this kind of things you could send order by email or normal mail on late ’90. After millennium real digital revolution started.

Internet early days

As that Big company released Window 98 and after that Windows XP URW started to look akward as it was still a DOS (it included graphics but still). Distribution model changed from BBS to Internet WWW-page were you could download installation package (still Shareware) and pay for full version by mail.

In this point distributional things started to rise. People wanted to buy a game with credit card and that wasn’t popular way in Finland which caused little bit hustle. Answer for that was start using ‘Albert’s Ambry’ net distribution system. It was working as expected and it had all needed facilities only problem was Albert’s Ambry got out of business rather soon after URW entered to it.

Times goes by and Internet grows

After Albert’s Ambry get out of business years has passed and UnReal World RPG was distributed through it’s web-page. Everything worked just fine until download rate began to be so huge that Internet service provider started to complain about the traffic that URW caused monthly. Time for mirrors and bigger pipes. Paypal arrived and it made credit card payment things simpler.

Distribution models changes 2013 and UnReal World turned away from old-school Shareware system. Shareware is very good model but it’s rather heavy to use. You provide two versions of your application (one that is for testing and another with full whistles and bells or one that can be modelled to full version with password). Shareware was changed to donation based system (and if you want to donate to URW please do so. All money goes to development of the game [Except that food what two cats can eat]). Donation model is easier games like UnReal World which are regularly updated. You get full game straight a head and you donate if you like it.

Modern web days

In same year 2013 URW changed from Shareware to donation based it also was ported to Mac OS X and Linux (openSUSE, Fedora and Ubuntu/Debian supported currently every build). Port was done by me and it was rumble as you try get DOS game to another platform but it was also ported few years back to SDL1 so it wasn’t that bad.

I assume all you gamers know there is one mammoth in modern PC game distribution: Steam. There were also smaller players like: Desura. Their idea is the same. You have distribution system that is standardized (which all games should be working) and you can buy new games to your own catalogue with credit card from their system. URW entered to Desura last year and now Desura is out-of-business. Desura was great channel delivering applications (supported Linux, Mac OS X and Windows) but I understand it’s very difficult to make money when you are wrestling against Steam.

In near future UnReal World RPG will in Steam as it get through Green light program. Hopefully it doesn’t give death kiss to that service too.

Lessons learned

Take time to make your installers as good as you can get. There is no excuse to have awful installer or Tar/RPM/DEB/DMG-package. If anyone can’t play your game straight away they will complain to you or they just move away without taking any second though. That is the power of Steam.

Don’t trust just one distribution model. If your distributor goes out of business have plan B on hand (very near if possible). If you are doing games for Apple iOS then you are out of luck but If you can use multiple ways to distribute your software do it. You need to work little bit more but more places more eyes to stare your application but. Remember these days many youngsters just play what they can download from Steam (and not blaming them from that) or some other shop that is tied to their device. They don’t know how to install game from Internet or they just don’t care.

If you support Linux (as you should). Ubuntu is biggest but also Arch people are fast growing player community (Fedora is non exist and openSUSE is mediocre). Have at least Ubuntu and provide DEB-package (in future Snappy) and if possible TAR-package (If you are willing provide RPM and Arch package). Have menu integration and do you homework with Linux. In future Linux gaming will be on rise if Steam machines take any market share and today you can buy many Linux AAA-games (over 1000) from Steam today!

Sorry to write this but truth is: In many cases user are all wrong (they just can’t understand how to play your game) but they pay the bills so make yourself a favour: fix bugs fast and give support at least at some forum. Community around the game is very hard to build and it even easier to lose. Final wisdom: last support multi platform. Mac OS X and Linux downloads are minority but do you want to cut these customers out?

Ok summer is crazy.. endless and crazy.. Peace out!