Archive

Posts Tagged ‘opensuse’

Open Build Service – Introducing Download Page
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

February 1st, 2012 No comments

This is something I should’ve blogged about some time ago, but we wanted to make it a part of a bigger announcement, which did not happen so … here goes.

One of the ideas how to help with Open Build Service adoption was to create some kind of download widget that would be possible to embed into upstream projects’ download pages. After a few days of work I ended up with the page that is now available from this URL:

http://software.opensuse.org/download?project=PROJECT&package=PACKAGE

It contains instructions for all distributions (like adding repo and installing the package), provides direct link to packages (which I recommend using only as a last resort solution), and for SUSE/openSUSE there are One-Click-Install buttons. The page also automatically preselects your distribution (if it’s possible to guess from user agent).

Go to http://software.opensuse.org/download?project=openSUSE:Tools&package=osc to see the page in action. You can also embed the page using slightly modified URL into your download page:

<iframe src="http://software.opensuse.org/download/iframe?project=openSUSE:Tools&package=osc"></iframe>

If you want to modify the default color theme just use the following GET attributes (acolor – link color, bcolor – background color, fcolor – foreground color, hcolor – headers color). They accept standard HTML color values like 123 or 112233 (without the #).

PS: Some projects (like for example Geogebra) are already using this, although it was not yet properly announced. Feel free to join them if you think it’s a good idea!

Getting SSH fingerprints for machines in your network
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

November 9th, 2011 5 comments

Some time ago we were trying to get SSH fingerprints for all machines in our local network. Solution is not that straightforward, but it’s not a rocket science either:

#!/bin/bash
tmpfile=$(mktemp)
for i in $(seq 2 254); do
    ssh-keyscan -t rsa,dsa,ecdsa 192.168.1.$i >> $tmpfile
done
ssh-keygen -l -f $tmpfile
rm -f $tmpfile

First, we retrieve the keys using ssh-keyscan, store them into temporary file and compute fingerprints afterwards using ssh-keygen. Or is there a less complex and more elegant solution?

PS: Thanks David for kicking in the right direction.

openSUSE Conference 2011 is coming …
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

August 19th, 2011 No comments

… and I’ll be there again as well! I guess there’s no need to tell I am really looking forward to it.

I’m pretty excited when I look closer at the just published Conference Timetable. What I really like about the openSUSE Conference is that it has also sessions that are not directly related to SUSE or Linux in general. You can “geek out” about topics like Digital processing of early color photography, Open Street Map, 8-bit Music, Wooden kayaks or Open Hardware and Hackerspaces. The last one will be held by me and I’ll try to bring a functional Rep Rap 3d printer from our Prague hackerspace brmlab so you can see it in action and print your own 3d models. All in the spirit of our motto: Have a lot of fun!

Together with Henne and Tom we’ll hold a workshop about our social networking platform called Connect and we hope we’ll get more contributors to it.

Among the talks I mentioned I also plan to visit sessions about GNOME 3, tmux, 5Ws of Contributions, Static Code Checking and Lightning Talks. And of course don’t miss the keynotes and social event The Geek in Wild West theme!

See you all there!

openSUSE IRC Word Clouds
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

August 7th, 2011 No comments

You might know a web tool call Wordle. It’s a simple way how to create nice word clouds from texts. It has one disadvantage though. It runs as a web service, so you cannot run it offline. I tried to find the source but the only thing I found was this FAQ answer, where Jonathan (the author) mentioned working for IBM. After few search queries I found Word-Cloud Generator, which seems like the Wordle predecessor from IBM that can be run offline. After some fiddling with the tool I present you these (word clouds from 3 big openSUSE IRC channels I am on):

#opensuse-buildservice #opensuse-factory #opensuse-project

Come on, join our IRC channels and have a lot of fun!

Version sorting in Ruby
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

July 19th, 2011 No comments

Today I needed to implement “human sort” for a list of distributions we support in the Open Build Service. I wanted to sort them alphabetically but at the same time the newest ones at the top. I ended up with the following code:

module Enumerable
  def version_sort
    sort_by { |key,val|
       key.gsub(/_SP/,'.').gsub(/_Factory/,'_100').split(/_/) \
          .map { |v| v =~ /\A\d+(\.\d+)?\z/ ? -(v.to_f) : v.downcase }
    }
  end
end

@distros = [
  'openSUSE_Factory_PPC',
  'CentOS_6',
  'openSUSE_11.4',
  'RHEL_4',
  'Mandriva_2010',
  'RHEL_5',
  'Debian_5.0',
  'SLE_10',
  'Ubuntu_9.04',
  'Fedora_14',
  'RHEL_6',
  'Ubuntu_11.04',
  'SLE_11',
  'Mandriva_2009.1',
  'CentOS_5',
  'openSUSE_11.3',
  'Debian_6.0',
  'openSUSE_11.1_Evergreen',
  'Ubuntu_10.04',
  'ScientificLinux_6',
  'openSUSE_Factory',
  'Ubuntu_10.10',
  'SLE_11_SP1',
  'Fedora_15',
  'Ubuntu_8.04',
  'Ubuntu_9.10',
  'Mandriva_2010.1',
]

@distros.version_sort.each{ |v|
  puts v
}

which produces this list:

CentOS_6
CentOS_5
Debian_6.0
Debian_5.0
Fedora_15
Fedora_14
Mandriva_2010.1
Mandriva_2010
Mandriva_2009.1
openSUSE_Factory
openSUSE_Factory_PPC
openSUSE_11.4
openSUSE_11.3
openSUSE_11.1_Evergreen
RHEL_6
RHEL_5
RHEL_4
ScientificLinux_6
SLE_11_SP1
SLE_11
SLE_10
Ubuntu_11.04
Ubuntu_10.10
Ubuntu_10.04
Ubuntu_9.10
Ubuntu_9.04
Ubuntu_8.04

Nifty, right? :-) The idea is simple. I use the sort_by function which pre-computes the values that are later compared. I replace some special values like “_Factory” or “_SP”, because I want “Factory” to be the newest (100 is higher than any other openSUSE version) and “11_SP1″ to behave exactly like “11.1″. Then I split the key using the “_” delimiter and turn any string in form “digit” or “digit.digit” to float number. I change the sign, because I want versions to be sorted in the reverse direction. Good thing is that Ruby operator <=> works on arrays also, so I’m done with key modifications and the sort does the rest …

PS: I used |key,val| in sort_by block because I want to use this function also to sort hashes by their key. This way it works both for arrays and hashes with any further modifications.

GNOME-Shell Extension: YaST (item in) Status Menu
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

June 14th, 2011 3 comments

This is just a short follow-up to my older blogpost Adding YaST menuitem to GNOME 3 status menu. Few minutes ago Andy asked me if I could create a proper gnome-shell extension so I went ahead and did it. :-)

I’ve set a git repo on Gitorious and also built the package in my home:prusnak project. If there will be interest from our GNOME Team, I will create a submit request to some GNOME devel project and Factory as well.

If you don’t know this yet, you have to install the gnome-shell-extension-yast-status-menu and then either logout and login or press Alt+F2 and type “r” (which will restart gnome-shell).

Enjoy! :-)

Tags: , ,

Bash PS1 tricks
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

June 8th, 2011 3 comments

Many of you know already about this feature, but some of you don’t so I wanted to share it with you. I just changed mine PS1 configuration in ~/.bashrc to look like this:

export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export PS1='\[\033[1;37m\][\[\033[1;32m\]\u\[\033[0m\]@\h\[\033[0m\] $? \[\033[1;34m\]\w\[\033[0;35m\]$(__git_ps1 " %s")\[\033[1;37m\]]\[\033[0m\] '

Take a look at the following picture to see how it works:

or check the video on youtube.

The number between user@host and the current working directory is the exit status of the most recently executed command (or pipeline). This is great because you don’t have to type echo $? everytime you want to find it out. The __git_ps1 magic will print git branch name if you are inside of the git repository. Furthermore it will add special characters indicating the state of the repo: % – untracked files present, + – new files added, * – some tracked files changed, $ – there is something in the stash (see git stash --help). Pretty cool, right?

openSUSE Spacebus
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

May 25th, 2011 1 comment

Yesterday we were replacing old chairs in our Prague SUSE office with the brand new ones. We got a wicked idea to stack the older ones into the Boosters’ Office and have a virtual bus ride for a few minutes. Our colleague Michal Kubecek and his camera were ready as usual so he quickly took a photo of us enjoying the ride:

Later I had some time to practice my 1337 GIMP skillz and created a motivational poster for your viewing pleasure. After Geeko Bus and Geeko Tram I give you without further ado the “openSUSE Spacebus!”:

Credits: bus photo CC BY-NC by yewenyi, space photo CC-BY by Sweetie187, spacebus photo CC BY-NC by me

Adding YaST menuitem to GNOME 3 status menu
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

May 2nd, 2011 4 comments

This blogpost is now obsolete.

Please go to GNOME-Shell Extension: YaST (item in) Status Menu.

I read a blogpost from Nelson Marques about adding YaST modules icon to GNOME Shell. I kind of liked the idea of YaST integration into GNOME Shell, but I had to share Julian Aloofi’s worries in comments. He came up with a simple idea to just add the YaST menuitem to status menu in the top-right corner. This was very easy to implement because most of the GNOME Shell features are written in Javascript. I created the following simple hack and ended up with this:

GNOME 3 status menu with YaST menuitem

If you want to add the YaST menuitem as well, just follow these simple steps (as root):

cd /
wget https://gist.github.com/raw/8d0d7d756e18b8a1da21/131a6caae2556edaa045f9cc3f13c573e12f2d31/gnome3-statusmenu-yast.patch
patch -p1 < gnome3-statusmenu-yast.patch
rm gnome3-statusmenu-yast.patch

Now you have to restart GNOME Shell (press Alt+F2 and enter “r” command) and you can enjoy the new menu item. :-) Remember, the changes will be lost next time you reinstall the gnome-shell package.

I already contacted Frederic and Vincent about the patch and they are still looking for the best way how to integrate YaST with the rest of the system, so stay tuned. :-)

PS: Andy found an interesting bug. For him, the item was added but clicking on it did nothing. Solution was found by Frederic – just install the missing gnome-menus-branding-openSUSE package.

Tags: , ,

openSUSE 11.4 Release Party – Prague
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

March 29th, 2011 1 comment

Last Friday we held an openSUSE 11.4 Release Party in Prague, more particularly in the first Czech hackerspace called brmlab. We decided to go with later date and not doing the party immediately after the release, so we could have promo materials available. This included openSUSE posters, DVD media, T-shirts but also openSUSE beer! Thanks Michal and Klaas for delivering them to Prague. In the beginning we had 100 promo DVDs and we ended with slightly more than 10, so I think the event was a huge success!

We planned to start the event with a talk from Martin about changes in YaST and WebYaST and his plans to reincarnate the “classic” YaST using Ruby, but Martin got ill, so we had to improvise. Fortunately, we had a lot of new faces in the audience, so I could reuse my presentation from the last release party called openSUSE from A to Z. Most of the things mentioned there are still valid now anyway. :-)

Next on program was a talk from Kendy about LibreOffice. He explained the reasons for forking, some new features available in version 3.3, but also ways how one can contribute to the project. For example, there is a list of easy hacks which includes things like translating German source comments into English or removing unused code. More advanced programmers can participate in Google Summer of Code by solving one of the ideas (btw, this also applies for openSUSE: ideas to grab are here).

The official part continued with my talk about changes in openSUSE. I talked about our desktop environments shipping with the latest 11.4 release (KDE, GNOME, Xfce and LXDE), about applications like Firefox and other browsers or LibreOffice. I also mentioned changes under the hood like Linux kernel, Xorg + Mesa or systemd. At the end I mentioned other changes in the project like Tumbleweed initiative, split of Packman repositories, SUSE Studio and virtualization in general and our web infrastructure: more precisely Build Service and Connect.

The last talk was given by Miro. He is an editor-in-chief of the Czech Linux magazine called LinuxExpres. While doing interviews in our offices a week ago, we asked him if he’d be willing to do a talk at our release party about Xfce 4.8 which is available in 11.4. To our delight he agreed, although he uses Xfce in Debian, but he wanted to see how 4.8 looks like. In fact, openSUSE is the first major distro to have Xfce 4.8 in its stable release!

After the Xfce talk we had pizzas for dinner and continued with free discussions, playing with KDE 4.6 and GNOME 3 on our touchscreen, simply having a lot of fun! Thanks Alena and the whole Prague SUSE office for sponsoring food and drinks!

All photos taken by Michal Kubecek, thanks!