Nov 10, 2015
Arabic Text Bugfix
Before:
After:
If this rings a bell but you can't quite remember why, here's an English version of the screen, and the spoiler for the puzzle is below it:
Spoiler: The line containing "passwd" is clipped at the (left) end, showing only "المحا" instead of "المحلي۔". This bug got popular in the YaST team because the localization testers dutifully reported every instance of a truncated label so the bug accumulated 22 duplicates. It only happened for the Arabic script which made it a bit more challenging to work with, but luckily I know the script and a few words.
Thanks to Max Lin who pointed me to a problem between the Qt UI library and the HarfBuzz text shaping engine, the problem is now fixed.
Aug 2, 2013
YaST in Ruby
As already announced on Factory, yast-devel, and by Lukáš: YaST, the SUSE installation and configuration tool, has been automatically translated from YCP, an in-house custom language, to Ruby. In the past 6 months, we have built a tool to translate 600.000 lines of code developed over the course of 12 years.
My role in the project was mainly shedding light on ancient details of the YCP language and its interpreter. Stop pulling my beard, kids! Also, knowing Bison (the tool used to implement the YCP parser in C++) I designed a part that transfers the comments. Mind you, not only at the function or statement level, but from inside of expressions too. Fun!
Thanks to the team, it was great working on the project with you!
Nov 2, 2009
The suse-ncc User
Answer: It comes from yast2-registration.rpm and is used to switch away from root when we spawn the web browser and let you register your SUSE Linux Enterprise product.
Thanks, mc.
May 18, 2009
Bugzilla Fables: Serving Two Masters
For certain tasks, YaST uses external helpers (agents) communicating via pipes. One of them was causing YaST to hang when cleaning up. Actually no, it was two of them. Either one was not enough, but if two of them had been used, they would both keep on running and YaST would not exit.
It turns out the bug is in YaST not closing unnecessary file descriptors before spawning the agents. So the second child inherits a copy of the pipe that controls the first child. Then YaST closes the first child's commands pipe, expecting it to see EOF and exit. But the pipe is still open in the second child, uselessly. And they all wait. And wait...(*)
Moral: close unnecessary FDs before exec.
If you wonder why we did not see the problem earlier, it is because both agents contained another bug, a banal one of not responding to an explicit Exit message.
*) Actually, only YaST wait(2)s. The other two read(2) ;-)
Jan 10, 2009
YaST UI table usability
Obviously we can improve the usability: Delete should be handled the same way as a function key so that YCP receives the `delete event. That would be quite easy. Maybe the context menu is doable too.
Jul 8, 2008
Cultural Exchange 4: First YaST
Fresh libzypp needs cmake 2.6 but there is only 2.4 in .debs. Fortunately the cmake authors provide a binary tarball with 2.6, only one has to know where to put the contained directories.
Notes for clean-up: Libzypp should say it needs hal-storage and boost-filesystem too. Python-bindings should check for python-dev, should use python-config. Perl does not seem to respect vendor_arch for ycp.pm?
Jul 7, 2008
Cultural Exchange 3: First .deb
Tried to print and failed miserably. The setup tool would not work with a remote CUPS printer, kept asking for my password. Switching AppArmor from enforcement to complain mode did not help, nor did disabling it.
The development package for openssl is libssl-dev (openSUSE: libopenssl-devel). http://packages.debian.org/ helps with that.
Perl packages, named perl-Foo-Bar on openSUSE, are usually named libfoo-bar-perl on Debian.
Packaging system started to complain that packages cannot be verified.
(Cultural Exchange is my long term project of working with Ubuntu instead of openSUSE. TODO: make a permanent index page.)
YaST Workshop 2008
Jun 17, 2008
Addressing Lines in Plain Text Files
This points to line 13, with the prototype of main:
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/HelloWorld.cc#line=,13
May 6, 2008
YaST from the Command Line
Here's a one-liner to do it using YaST:
Try also:# yast2 firewall services add zone=EXT service=service:sshd
(Saying "yast" instead of "yast2" should work too, but there is bug 374259.)# yast2 firewall help
# yast2 firewall longhelp
# yast2 firewall summary
# yast2 firewall services list
# yast2 -l
# yast2 FOO help
Apr 18, 2008
openSUSE 11.0 Beta 1: Is that the murderer's name and address in the victim's hand?
YaST does not crash. Never. Well, only rarely. Especially not during the initial installation. Seldom. So what do we do when it does? We want the backtrace and the debugging logs. So before 11.0 we would ask you to please let it crash again, but with some special options to produce the backtrace and the debugging info. Spoils the fun.
Since Alpha 2 YaST will take care of the backtrace. Since Beta 1, it will also produce tons of the debugging messages, but throw most of them away and only show the last few of them in case of a crash. Reporting a bug has become much easier!
This has actually helped us already in debugging one crash that blocked the release of Beta 1, bug 380283. If you want to see for yourself, search the log for "got signal". The next line says "Liberating suppressed debugging messages" and afterwards there is "Back trace".
References: FATE#302167, FATE#302166.
Apr 8, 2008
iogrind in openSUSE Build Service
Well now there are: iogrind in openSUSE Build Service. The packaging is very crude for now, but it appears to work. Now I have to make some sense of the tool :-)
Jun 28, 2007
YaST User Interface Library Useable From Perl
It has been possible for some time now to write YaST modules in Perl. But to call the UI code you had to use YCP. For the Hack Week I decided to finish Stano's earlier work on the subject and make the UI callable from Perl or any of the soon to be available languages. This is a first step on the way to completely liberate the YaST UI from YCP.
Want to try it out? It works alongside your stock YaST on openSUSE 10.2. Install the binary tarball to /home/martin (really there, the binaries have the path hardwired!)
wget http://www.suse.de/~mvidner/hackweek/yast-ui-from-perl.tar.bz2
sudo sh -c "mkdir /home/martin && bzcat yast-ui-from-perl.tar.bz2 | tar x -C /home/martin"
Here's an example perl script. Note the links to the UI reference.
Let's try with the stock YaST#! /usr/bin/perl -w
use YaST::YCP qw(:DATA);
YaST::YCP::Import "UI";
YaST::YCP::init_ui ($ARGV[0] || "qt");
my $c = Term("VBox",
Term("Label", "Now we can call YaST UI from other languages!"),
Term("PushButton", "&So What?")
);
UI->OpenDialog($c);
UI->UserInput();
UI->CloseDialog();
sh$ perl /home/martin/pfx/bin/helloui.pmNothing happens. If you are interested in the error messages, they are in ~/.y2log
Now let's use the new and improved environment and retry
sh$ /home/martin/pfx/bin/pfxsh
STARTING A NEW SHELL
sh$ perl /home/martin/pfx/bin/helloui.pm

sh$ perl /home/martin/pfx/bin/helloui.pm ncurses

Remember, this is just a preview. It is not packaged properly and has bugs. The source is at svn.opensuse.org.
Mar 26, 2007
YaST Log Summarizer
So I wrote a simple log summarizer y2logpids, that shows the first and last lines for each process ID in the log. And as a side feature, it also measures time differences for the case where the reporter says "and then it hangs for 30 minutes".
$ y2logpids -h
Usage:
y2logpids -h|--help
y2logpids [-m] [-d [<seconds>]] [log-files]
Options and Arguments:
-m, --maximum
Show the maximum time difference between log lines, within a single
PID.
-d [seconds], --difference[=seconds]
Show where the time difference is larger than seconds (60 if
unspecified), within a single PID
$ wc -l logs/255012-y2log
23501 logs/255012-y2log
$ y2logpids logs/255012-y2log
2007-03-20 11:13:31 <1> e111(4034) [liby2] genericfrontend.cc(main):200 Launched YaST2 component 'y2base' 'inst_suse_register' 'qt' ''
2007-03-20 11:13:45 <1> e111(4034) [media] MediaManager.cc(restoreAutoMounter):248 Restored HAL volume handling (automounter)
2007-03-20 11:14:15 <1> e111(4222) [liby2] genericfrontend.cc(main):200 Launched YaST2 component 'y2base' 'inst_suse_register' 'qt' ''
2007-03-20 11:29:07 <1> e111(4222) [media] MediaManager.cc(restoreAutoMounter):248 Restored HAL volume handling (automounter)
2007-03-20 11:32:51 <1> e111(5265) [liby2] genericfrontend.cc(main):200 Launched YaST2 component 'y2base' 'online_update' 'qt' ''
2007-03-20 11:33:12 <1> e111(5265) [media] MediaManager.cc(restoreAutoMounter):248 Restored HAL volume handling (automounter)
2007-03-20 11:34:07 <1> e111(5310) [liby2] genericfrontend.cc(main):200 Launched YaST2 component 'y2base' 'online_update' 'qt' ''
2007-03-20 12:02:02 <1> e111(5310) [YCP] OnlineUpdateCallbacks.ycp:50 PatchProgressCallback 100
2007-03-20 12:02:18 <1> e111(7003) [liby2] genericfrontend.cc(main):200 Launched YaST2 component 'y2base' 'print-product' 'qt' ''
2007-03-20 12:03:51 <1> e111(7003) [zypp] ZYppFactory.cc(unLockFile):139 unlocked
2007-03-20 12:03:55 <0> e111(5310) [zypp] ExternalProgram.cc(checkStatus):333 pid 5881 successfully completed
2007-03-20 12:24:22 <1> e111(5310) [media] MediaManager.cc(restoreAutoMounter):248 Restored HAL volume handling (automounter)
2007-03-20 12:35:41 <1> e111(8715) [liby2] genericfrontend.cc(main):200 Launched YaST2 component 'y2base' 'online_update' 'qt' ''
2007-03-20 12:38:51 <1> e111(8715) [media] MediaManager.cc(restoreAutoMounter):248 Restored HAL volume handling (automounter)
Download the script.
Mar 7, 2007
XML Package Metadata Verifier
Here: verify-repodataGreetings to Harald and Matt.


