On the road...
Busy times currently as we’re heading to releases of ownCloud. The syncing client I am working on plays a role for that and thus I was doing a lot of work on csync upstream and mirall to get that going. Meanwhile I succeeded to get mirall running under Win32, it was quite an experience for me digging through the mud of various compilers and environments and the different understandings of C standards, especially since csync is plain C and never run on Win32 before.
Last week I have been on CeBIT for a day, which is a huge and busy event. We had a nice preview running there with syncing between the web client and the desktop clients on Windows and Linux, as well as on an Android device. That already worked quite ok, nevertheless I got quite some bug reports since then. And I still have to work with csync upstream to get patches in there before we’re ready for a public beta.
This weekend I will be at the Chemnitzer Linuxtage together with friends from the openSUSE project. I will show some ownCloud syncing there as well, so if you like show up at the openSUSE booth for a demo and a chat :-)
php5.3 packages in SLES 11 SP2
SLES 11 SP2 ships php5.3 binaries but the default package php5 still installs php5.2 which already has reached upstream end of life and should be considered unsupported by any means. Recent versions of phpunit and other developer tools won’t provide all features on php5.2 any more.
You must use apache2-mod_php53, php53, php53-mysql and so on if you want to use php on SLES.
ESR and Thunderbird under KDE
A quick update about recent changes in Mozilla applications for openSUSE.
With the release of Firefox and Thunderbird 11 (and Seamonkey 2.8) the older versions (10) got obsolete as always. But Mozilla created ESR (Extended Support Release) for Firefox and Thunderbird based on versions 10 and will maintain them for a longer time. Please read the FAQ about the details. For openSUSE we will not switch to these versions for different reasons but I’ll provide these from the buildservice repository mozilla. You should be able to install the current versions (10.0.3) of Firefox and Thunderbird by choosing firefox-esr or thunderbird-esr (there is also xulrunner-esr) in your package manager if you added that repository before. Please note that this is opt-in only and it’s not possible to install latest normal version and ESR versions in parallel. They are using the same profile directory and therefore I didn’t give them a separate installation directory neither. It’s also a bit risky to jump between ESR and normal versions because of the profile. So as normal version gets higher every six weeks the riskier to jump back and forth. Basically those ESR versions should probably be used only if really necessary but I still wanted to provide that possibility. If you install the ESR versions and found issues please let me know. Because of the renaming and parallel usage of the branding packages I might have missed some packaging foo to make updates in every case smooth.
A similar topic is about Firefox 3.6 and Thunderbird 3.1. The latest round of updates (3.6.28 / 3.1.20) was most likely the last one and people should start switching to more recent versions. That also means that 11.4 will get Thunderbird 12 as replacement for 3.1.20 with the next round. Other versions are already on the latest packages. (Evergreen will likely switch to the ESR versions btw.)
And about the last announcement (from my “quick update”) people might notice that Thunderbird 11 now got at least some of the KDE integration from Firefox as people kept pinging me about it. (And Firefox’ KDE integration is also back for the official updates!)
subversion with libserf – continued
Further about my work on packages for Apache Subversion with support for serf / libserf / ra_serf, that repository access module was not made default in the 1.7 release after all. Anyway, version 1.0.13 of serf is now available in devel:libraries:c_c++ with the intention of getting this into and in Factory. You will find current Apache Subversion packages with fixed conditional compilation against serf in home:AndreasStieger:serf home:AndreasStieger:branches:devel:tools:scm:svn devel:tools:scm:svn for testing.
Updated 27/05/2012: repository locations
And again after SR#122507 was accepted.
Meeting the Incas in memory of Jane Morffew
C++ vector iterators, why over-use?
I understand that it can be seen as nice and orthogonal that all kinds of containers have a uniform paradigm to access them sequentially. Or something similarly sublime.
But in the specific case of vectors, in a method of a class that has a vector as a private field (and said method thus knows that it is implemented as a vector), what does one win by accessing the vector through iterators and not indexing?
I mean, using indexing is much safer.
Case in point:
Klass::Method()
{
VectorMemberType::iterator it = vectorMember::begin();
while (it != vectorMember::end()) {
VectorElement el = *it;
if (SomeTest(el))
DoSomethingToTheVectorThatMightPushBack();
++it;
}
}
Now, as it happens increasing a vector size (for instance by push_back()) does not always make iterators open on it de facto invalid with GCC, it seems, the code just silently does something slightly wrong or whatever. Apparently it does make the iterator really invalid much more easily with MSVC, leading to a crash.
Working around that while still using iterators gets pretty ugly, doesn't it? You have to restart the iteration and skip the number of elements already handled. Or change the code structure completely.
Compare to simply using indexing:
Klass::Method()
{
size_t it = 0;
while (it < vectorMember::size()) {
VectorElement el = vectorMember[it];
if (SomeTest(el))
DoSomethingToTheVectorThatMightPushBack();
++it;
}
}
No stateful iterator that might get invalidated when the vector is resized. Just a simple integer index. What is so wrong and ugly with this? That it, shock horror, looks more like C?
Persistent IUCV Network Devices
On mainframes, Inter User Communication Vehicle provides a means to exchange data between two guests in z/VM. Some time ago, this has been one of the preferred networking methods between two Users (virtual machines) on z/VM. From a linux perspective, IUCV is not a supported networking method anymore, although it actually still works quite nicely.
Setup as a pointopoint connection, IUCV needs a special machine that is run as a pointopoint partner and routes to the rest of the network if needed. With linux, it is quite easy to setup IUCV interfaces. The problems arise when you have more than one IUCV interface and must make sure that the IP configuration in /etc/sysconfig/network/ifcfg-iucv* is setup for the correct User.
In SLES11 and later, the hardware configuration of IUCV interfaces is done with udev rules. For each available connection, there is an extra file with a ruleset below /etc/udev/rules.d. By default, such a rules file looks like this:
# cat /etc/udev/rules.d/51-iucv-LINUX001.rules
ACTION=="add", SUBSYSTEM=="subsystem", KERNEL=="iucv", RUN+="/sbin/modprobe netiucv"
ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="netiucv", ATTR{connection}="LINUX001"
The issue is, that during network device setup, all of the devices are simply setup as they are found. This is unfortunately not persistent and commonly results in connecting a User (virtual machine) with the IP address of a completely different machine. In the end, networking is simply broken.
For example, if you look at the netiucv0 user, the following is found:
# cat /sys/devices/iucv/netiucv0/user LINUX001
However the actual device is configured in /etc/sysconfig/network/ifcfg-iucv36. To solve this, a special iucv device below the netiucv device must be configured. This is a task for udev. The above udev rule needs an extra line at the end:
ACTION=="add", SUBSYSTEM=="subsystem", KERNEL=="iucv", RUN+="/sbin/modprobe netiucv"
ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="netiucv", ATTR{connection}="LINUX001"
ACTION=="add", SUBSYSTEM=="net", KERNEL=="iucv*", SUBSYSTEMS=="iucv", ATTRS{user}=="LINUX001", NAME="iucv36"
After this, the netiucv0/user is still LINUX001. In this case, an extra iucv36 is configured like this:
# cat /sys/devices/iucv/netiucv0/net/iucv36/device/user LINUX001
and now, the iucv36 device, like it is found in /proc/net/dev is the one that is configured with ifcfg-iucv36, really uses LINUX001 as pointopoint partner. For the sake of completeness, here is the configuration as it is found in /etc/sysconfig/network/:
# cat ifcfg-iucv36 BOOTPROTO='static' BROADCAST='' ETHTOOL_OPTIONS='' IPADDR='192.168.0.127/24' MTU='' NAME='' NETWORK='' REMOTE_IPADDR='192.168.0.67' STARTMODE='auto' USERCONTROL='no'
Note, that it is possible to use the same IPADDR for all of the configured IUCV interfaces. Only the pointopoint partners that are configured with REMOTE_IPADDR must have their own unique addresses.
When configuring the partner User, IPADDR and REMOTE_IPADDR are swapped of course.
When a Raspberry has all the flavour a Pi needs
Installing Horde 4 pear packages to a custom pear location (SUSE)
When installing horde to a custom pear location, you need to run the pear of your custom location, not the system pear with the custom location’s config.
So the steps would be:
1 mkdir /srv/horde 2 pear config-create /srv/horde/ /srv/horde/pear.conf 3 pear -c /srv/horde/pear.conf install PEAR
as the install docs say but then:
4 /srv/horde/pear/pear -c /srv/horde/pear.conf channel-discover pear.horde.org 5 /srv/horde/pear/pear -c /srv/horde/pear.conf run-scripts horde/Horde_Role 6 /srv/horde/pear/pear -c /srv/horde/pear.conf install --alldeps horde/groupware
Otherwise running the Horde_Role script will fail saying
config-set (horde_dir, /srv/horde/, user) failed, channel pear.php.net
This was experienced on SLES11SP1, SLES11SP2 and openSUSE Factory.
I did not test this for any debian based products yet.
/dev/sdx is apparently in use by the system.
Greetings programs, in today’s post i will present a little issue i had with
an old box i needed to format and reuse:
root@nibelheim:~# mkfs.ext4 /dev/sdxy
mke2fs 1.41..12 (17-May-2010)
/dev/sdxy is apparently in use by the system; will not make a filesystem here!
this one might get triggered by a number of factors:
1. the drive could be mounted on the current system.
2. there are raid array data left marking the drive or partition as “in use”.
Disk /dev/md127: 10.5 GB, 10536091648 bytes
255 heads, 63 sectors/track, 1280 cylinders, total 20578304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md127 doesn't contain a valid partition table
and here is our ‘little’ problem.
As you can see my case falls under the second “category”, there are some raid data left on the device,
now that we know what the problem is we can proceed with the solution.
root@nibelheim:~# mdadm --remove /dev/md127
root@nibelheim:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
then it was a simple:
root@nibelheim:~# mkfs.ext4 /dev/sdxy
and the driver was ready and formated :)