Category: Development

0

CM: chromium doesn’t build with JDK 1.7

If you build Android or CyanogenMod and you run into issues with HashSet_jni.h you need the following changes to the chromium_org project: diff –git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py index de865d5..d4a2324 100755 — a/base/android/jni_generator/jni_generator.py +++ b/base/android/jni_generator/jni_generator.py @@ -555,18 +555,21 @@ class JNIFromJavaSource(object): contents) return JNIFromJavaSource(contents, fully_qualified_class) +def MultipleReplace(string, rep_dict): + pattern = re.compile(“|”.join([re.escape(k) for k in rep_dict.keys()]), re.M) + return pattern.sub(lambda x: rep_dict[x.group(0)], string) class InlHeaderFileGenerator(object): “””Generates an...

0

Curve25519-SHA256 is the default KEX in openSSH too now!

Since some hours is the default KEX in OpenSSH! Several weeks ago Aris added a new Elliptic Curve algorithm for key exchange using Curve25519. After he wrote some kind of a RFC and implemented it in libssh he started to suggest a patch for OpenSSH which finally has been integrated.

0

Curve25519 and SSH with ECDSA

For the SSH Library we try to keep up with OpenSSH features and implement the most important stuff. After what we read about the NSA and NIST it became clear that the new ECDSA support we added in libssh 0.6.0rc1 needs new curves. So Aris implemented and wrote a draft. At the same time he implemented the first draft and you can find the...

0

A new release of csync

Finally after 3 years there is a new version of csync available. csync is a file synchronizer especially designed for you, the normal user. About two years ago, Klaas started to use csync as the backend for the owncloud sync client. The last years we added a lot of features, improved our test framework and fixed several bugs. I have to thank Klaas for all...

1

Unit testing with mock objects in C

The article Jakub Hrozek and I wrote for Linux Weekly News (LWN.net) about CMocka and using mock objects is available to the public now. You can find it here: Unit testing with mock objects in C cmocka is a unit testing framework for C with support for mock objects. It is used by several Free Software projects like libssh, csync, SSSD or Elasto Cloud. If...

0

cmocka 0.3.0

I’ve just released a new version of cmocka. cmocka is a unit testing framework for C with support for mock objects. Jakub and I finished the API documentation and added two new useful macros mock_type(#type) and mock_type_ptr(#type). The rest is some small bugfixes and a pkgconfig file. You can download it here.

13

Writing and reading code

You’ve probably heard that a developer of an established software project writes an average of 100 lines of code (loc) a day. I can say that this applies to me. So if you write 100 loc per day, how many do you read? I would estimate that the amount of time you spend on reading and understanding code is significantly more than on writing code....

10

vim modelines in git config

I’m working on different Open Source projects and most of them have different coding style guidelines. Mostly spaces or tabs or different tabwidth. The easiest thing would be to store these information in the git config of the project. So here is a easy and secure way to have modelines in the git config. So first I set the modelines (here for the Samba project):...

24

cmocka – a unit testing framework for C

I’m a big fan of unit testing frameworks. When I developed csync, a bidirectional file synchronizer, I used check to write unit tests from the start. check was ok, but it were running valgrind on your testcases to find memleaks in your code the mode reports were about check. So I needed to add valgrind suppressions to get rid of them. When I started to...

6

Understanding Winbind

I recently fixed a bug resolving Domain Local groups in Winbind. I was asked how to reproduce it with a more complex setup, so I had to dig through the Winbind code to understand everything in more detail. I have documented my findings here, in order to retain what I’ve learned and to help others understand how Winbind works. The Setup We have a forest...