Skip to main content

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

openSUSE 42.1 Leap :: Release Party in Munich

openSUSE 42.1 Leap was released about week ago and it is looking good. Now we have community enterprise system. I would like to thank everyone who contribute to openSUSE project and help to make it better.

Of course, we should have openSUSE release party! openSUSE community haven’t had release parties in Munich for a while (since I live in Munich I think we never had it here).

So, what is release party about? Well… like usual: Linux geeks meet together, speak about features in new openSUSE version, news in Free Software world, drink beer and… of course have a lot of fun 😉

A few days ago I started discussion about release party with Linux Presentation Day organizers and it seems that problem with location is solved now. We will get small meeting room with power sockets and beamer there. That is exactly what we need. I also asked Doug and Robert about some “promotional material”, openSUSE beer and TShirts. Tomorrow (Friday) I’m going to go to SUSE office in Nuremberg to take it (beer can not be trusted to anybody).

Do you want be a part of it?
* November 14, Saturday
* I start my presentation at 12:00 AM. I’m going to talk (presentation) about OBS, Leap and openSUSE project in general.
* vhs-Zentrum, Münchner Str. 72, Eingang rechts, 85774 Unterföhring
* Don’t forget to bring your good mood and friends 😉

Everybody are very welcome! If you have any questions about openSUSE, GNU project or Free Software, feel free to come and ask.

the avatar of Martin Vidner

Git: Single Line History

You get a bug report from a user:
/usr/lib/foo/bar.rb:432:in `doit': undefined method `[]' for nil:NilClass (NoMethodError)
but in bar.rb at the line 432 there are no square brackets. The user must be using an older version of the script. Can we find out which one without asking them?

Git can help. This code will go back in history and show the line how it appeared during the past. It's a history of a single line, kind of like "git blame" but in a different dimension.

FILE=lib/foo/bar.rb
LINE=432
git log --format=format:%H $FILE \
| while read COMMIT_ID; do
    echo -n $COMMIT_ID:$FILE:$LINE:
    git show $COMMIT_ID:$FILE | sed -n "$LINE{p;q}"
  done \
| less 

Have I reinvented the wheel? What is its name?

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

Arabic Text Bugfix

Can you spot the difference?

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.

the avatar of Bruno Friedmann

Proprietary AMD/ATI Catalyst fglrx rpms released for LEAP 42.1

Since the last few months, we all know that the new openSUSE Leap 42.1 is on its road.

But fglrx drivers were missing. Even with the 15.9 release in September.

Warnings

There’s really no warranties the drivers will work, for you!

If you are satisfied with the open-source radeon drivers, don’t risk to break your computer

All the trouble present in 15.9 will be there, like the failing gnome3 gdm start, see previous article from Sebastian, his scripts also available on the raw-src directory on the mirror, allow you to apply a quirk patch.

I’m considering the release of thoses rpms as experimental, they work for some, and sometimes are convenient. But they can also create kernel segfault on some configurations.
If you are in trouble start your openSUSE in rescue mode with nomodeset on boot line, and then zypper rm fglrx related packages, reboot and you should safely return to free radeon.

Story

Today, while packing my stuff for the SUSECON15 in Amsterdam, I was pleased on irc to have feedback of users
who were able to run fglrx Tumbleweed packages on their Leap 42.1

I’ve then start a Leap vm and hack a bit Sebastian Siebert’s script for 15.9 to add support for Leap.
The drivers build, and install correctly. I’ve also updated the one-click installer for people using this
technology.

Leap being available only for x86_64 bit plateform, the driver follow the same available arch.

Links to the new repository openSUSE_Leap_42

Have fun!

the avatar of Bruno Friedmann

Cleanup on OBS – Bacula packages to adopt

I was one of the creator and maintainers of bacula packages on obs (Story started 4 years ago).
Since then (+3 years) I’m using another tool called Bareos, and have no more interest
nor time to maintain those packages.

Since sometimes, bacula project has released two main major version. (7.0 and 7.2).
Nobody has taken care of the packages available on obs Archiving:Backup, nor have
proposed an update. [1]

Those packages have never been submitted to Factory, and proposed to any released openSUSE version.
From one of the last upstream announcement Bacula project will deliver directly prebuild packages for major distributions.

So if you’re interested to take ownership of those, raise your hands now (ask maintainer status with obs interface).
I will let a grace period of one month before sending a delete request.

Have fun!

the avatar of Chun-Hung sakana Huang

Ansible install with openSUSE 13.2 and Mac

I start to study Ansible cause recently needs.

Ansible is python based, using SSH deploy packages to remote servers, it's like Puppet / Chef / Salt.


Online resource

I study from Oreilly - Ansible up & running
  • code example

    

How to install Ansible

Install Ansible

openSUSE 13.2 ( Most of linux could install ansible now )
Use zypper to query ansible package
# zypper   search   ansible
Loading repository data...
Reading installed packages...

S | Name    | Summary                                                                  | Type      
--+---------+--------------------------------------------------------------------------+-----------
 | ansible | SSH-based configuration management, deployment, and orchestration engine | package   
 | ansible | SSH-based configuration management, deployment, and orchestration engine | srcpackage

Install Ansible
# zypper install  -y  ansible

That's all you need to do :-)

Ansible is clientless, that mean you don't need to install any packages in your remote hosts, it's the most diff with puppet and other tools.
The role is
  • The control machine
    • The one that you use to control remote machines
    • needs to have python 2.6 or later installed.  
  • To manage a server with Ansible
    • Needs to have SSH and Python 2.5 or later installed.
Most linux has python later 2.5 ( Might be python 2.7 ), that's the reason - Nothing to install

What do you need to know? ( From Oreilly book ^^ )
I think the most important point is - you could use ssh and ssh key to execute some commands in remote servers.

What do I need to know?
    • Connect to a remote machine using SSH.
    • Interact with the bash command-line shell (pipes and redirection).
    • Install packages.
    • Use the sudo command.
    • Check and set file permissions.
    • Start and stop services.
    • Set environment variables.
    • Write scripts ( Any language )
  • You don't need to know python to use Ansible unless you want to write your own module.
  • You will need to learn some YAML and Jinja2 to use Ansible.     


That's all today, I will write some Ansible module command next time.

~ enjoy it

the avatar of Just Another Tech Blog

UNDERGRADUATE IMPLEMENTATION OF GARBAGE COLLECTION

Authors: David Mulder, Curtis Welborn

ABSTRACT

This paper describes the implementation of a garbage collector as an undergraduate research project. The garbage collector is a continuation of a project where an Assembler, Virtual Machine and Compiler were implemented as a capstone project. The project required modifying the compiler to allocate memory compatible with a mark and sweep algorithm, and adding the mark and sweep algorithm to the virtual machine. Computer Science faculty should take note that this was all completed by an undergraduate student within a year’s time, and that such challenges can reasonably be accomplished by undergraduate seniors.

INTRODUCTION

Challenges of the nature described in this paper are generally reserved for graduate students, and are considered outside the grasp of undergraduates. Computer Science faculty and students alike will be interested to note that the preceding project was completed entirely by an undergraduate senior. It is also interesting to note that the project was completed by an average student of little academic achievement, and that a Compiler, Assembler and Multi-Processed Virtual Machine with Garbage Collection were written within a year’s time.

As part of an undergraduate capstone, an Assembler, Virtual Machine and Compiler were implemented. The two-pass Compiler performs Lexical and Syntax analysis in the first pass, and Semantic analysis and Intermediate code generation in the second pass. Using Intermediate code as input, the Compiler then generates target code (assembly) that can be fed to the Assembler to generate byte-code. The byte-code can then be loaded into the Virtual Machine for execution [1]. Through independent study, a garbage collector was added to the virtual machine, which included extensive changes to the compiler.

The compiler had to be modified to place by-reference parameters onto the run-time stack first. An additional parameter is also added that counts the number of by-reference parameters. The counter is needed by the Mark and Sweep algorithm to determine the location of the by-reference parameters within an Activation Record.

To support the mark and sweep garbage collection algorithm, the virtual machine had to be modified to allocate memory from a list of available blocks. The mark and sweep algorithm is triggered when a call to allocate memory detects no free blocks. In the mark phase of the algorithm, the run-time stack is traversed searching for points that reference blocks allocated on the heap. Any block of memory reachable from the run-time stack must be marked as in use. During the sweep phase of the algorithm, the heap is searched looking for any blocks not marked as in use during the mark phase.
Screenshot from 2015-10-09 13:18:55

COMPILER MODIFICATIONS

The compiler was originally written to pass parameters to a function call via an activation record in the order they were written in the source language (a language called KXI, which is similar to java). It was necessary for the compiler to segregate between by-reference and by-value parameters. The mark phase of the algorithm must know the location of every by-reference parameter within a function calls’ activation record. See the ordering of variables in the current Activation Record of Figure 1. Because the variables are segregated, references are easily located based on offsets. For example, the first reference is located by an offset of 4*sizeof(int) from the base of the activation record (the return address, previous activation record pointer and reference counters are all integers), and the second reference is offset 5*sizeof(int) from the base.

The mark phase of the algorithm needed a special field inserted in each activation record that counts the number of by-reference parameters. This field was added in the activation record in such a way that the mark phase could iterate over each by-reference parameter and set the mark bit in the corresponding block for each object allocated on the heap. The field is referred to as the Reference Counter in Figure 1. The reference counter in this activation record tells us that there are 2 references. If we decremented the reference counter to 1, for example, the second reference on the stack would be interpreted as an integer.

VIRTUAL MACHINE MODIFICATIONS

In order to make space allocation more efficient, the heap was separated into large and small blocks. Bit vectors were used to keep track of which blocks are allocated on the heap.

An instruction was added to the virtual machine for allocating memory. Prior to the instruction, memory allocation consisted of just moving a pointer within the heap. The new allocation instruction calls the mark and sweep algorithm. If there is space available on the heap, the instruction returns a pointer to that block and marks the block as unavailable within one of the vectors that tracks all blocks in the heap.

If no available space is found, garbage collection is started. The algorithm must calculate the location of the activation record for the current function call then calculates the offset to the by-reference counter field in the activation record. Now having the number of pass by-references parameters in the current activation record, the algorithm can calculate the offset to each allocated block on the heap and set its mark bit to in use.

The algorithm must recursively follow references allocated inside of each block. This was achieved by organizing objects within a block in a similar manner to how function calls are organized in an activation record. In this way, lists, trees and even recursive data structures allocated on the heap can all be traversed and marked. In Figure 1, the mark phase will follow all references inside of Small Block A, so Small Block B is also marked.

Once all objects (blocks) and descendant objects have been marked, the algorithm calculates the location of the previous activation record. The same process of following references and marking objects proceeds for each activation record until all function calls on the run-time stack have been searched.

The sweep phase of the algorithm now iterates over the entire heap, checking the mark bit. If the mark bit is set (the block is in use), it clears the bit and moves on. This means that the block has a live reference to it which originated in an activation record that is currently on the run-time stack. Blocks A, B and D in Figure 1 have references pointing to them. These blocks will be un-marked and will remain allocated.

If the mark bit is not set, the algorithm clears the relevant marker in the vector of available blocks, freeing the block for reuse (See Small Block C in Figure 1) [2]. This allocated block will be freed during the sweep phase because it has no references pointing to it on the run-time stack.

CONCLUSION

This method of garbage collection is effective, but did prove to be inefficient. Because the algorithm isn’t activated until there is no remaining free space, the algorithm isn’t suitable for real time applications. The algorithm could be modified to operate incrementally, but it would still cause an occasional lag. These are known problems of garbage collection.

The greatest achievement of this project was the recognition of what can be accomplished by undergraduate seniors. Computer Science faculty should recognize that computing projects of this caliber can reasonably be expected in an undergraduate senior project course.

FUTURE WORK

The primary author has started work on an hp-ux pa-risc virtual machine. The first obstacle will be setting up the correct environment, based on descriptions in the pa-risc specifications. The second will be translating the pseudo code in the specification into C. A compiler/translator will be written to automatically convert the specification pseudo code into C.

A significant part of the project will be writing the loader, since it will need to include things such as run time linking. Ideally, the virtual machine will run at boot time and will include a boot loader. This would allow pa-risc software to run on virtually any hardware.

REFERENCES

[1] Mulder, D., Welborn, C., Lessons in converting from python to c++, Journal of Computing Sciences in Colleges, 29(2), 49-57, December 2013, http://dl.acm.org/citation.cfm?id=253542
[2] Jones, R., Lins, R. D., Garbage collection: Algorithms for automatic dynamic memory management, West Sussex, England

© CCSC, (2014). This is the author’s version of the work. It is posted here by permission of CCSC for your personal use. Not for redistribution. The definitive version was published in The Journal of Computing Sciences in Colleges, {volume 30, number 2, December 2014}, http://dl.acm.org/.

the avatar of Just Another Tech Blog

Deploying Configuration Profiles in OSX using QAS Group Policy

Here’s an alternative to applying Configuration Profiles in OSX without using an MDM client. Profiles are deployed using Group Policy over SMB, so you don’t have to open APN ports to Apple.
QAS is an AD bridge tool for unix/linux systems (including mac) that also provides Group Policy support. You can view more details here.

QAS Group Policy lets you specify Group Policy settings inside the Group Policy Management Editor, the same way you’d apply settings for a Windows host.
Screenshot from 2015-10-08 14:48:40It works similar to Apple’s Profile Manager.

Screenshot from 2015-10-08 14:54:54

You can also create custom profiles by writing preference manifests. The preference manifests are converted to Configuration Profiles before they’re applied on the OSX host.

On the OSX host, settings are retrieved from Group Policy, and installed as Configuration Profiles.

Screenshot from 2015-10-08 15:22:01

the avatar of Frédéric Crozat