Beiträge mit dem Tag 'development'

  • efaLive 2.10.4 released

    efaLive 2.10.4 is released. The x86 image and the RaspberryPi image are now based on Debian 12 (Bookworm). The efa software is updated to version 2.3.3.

    I implemented support for encrypted backups. The backup is encrypted with a password and can be restored with the same password. The look and feel has changed a bit. The mouse pointer is now bigger and the font rendering is improved, which is mainly a preparation for one of the upcoming efa releases.

    For more information check the efaLive page.

    mehr ...
  • Some experiments with Rust on ESP32

    After I have done some Rust development for web application, Lambdas, etc. I have started to experiment with Rust on the ESP32. The ESP32 is a low-cost microcontroller. The Rust support by Espressif, the company behind ESP32, is really great. So it’s a nice way to start with Rust on embedded devices. If you want to learn more about this project, you can read my Rust ESP32 page.

    mehr ...
  • efaLive 2.8.5 released

    efaLive 2.8.5 is now ready for download. This update brings the latest version of the efa Software as well as the latest stable Debian release, codename ‘bullseye’

    The documentation das been removed from the CD image, because it always was some pain to update it. I always had to re-generate the CD image.

    For more information check the efaLive page.

    mehr ...
  • efaLive 2.8.0 released

    efaLive 2.8.0 is available. There are not so many changes, but the efa software has been updated and now brings efaCloud support and the underlying Debian system is up to date.

    Please note that the key for the efaLive Debian archive has changed, so you have to update it in older versions of efaLive to be able to install new packages.

    For more information check the efaLive page.

    mehr ...
  • efaLive 2.7 released

    I just uploaded a new version of efaLive. I spend a lot of time to port the efaLive tools from Python 2 to Python 3. The support for Python 2 will end soon. The images are based on Debian Buster now and the efa version is 2.2.2_42. The image for the Raspberry Pi now support the new Raspberry Pi 4. For more information check the efaLive page.

    mehr ...
  • efaLive 2.6 released

    Finally there is a new release of efaLive. Some refactoring has been performed in the efaLive-Setup tool. And of course a new version of efa and Debian is included. For more information check the efaLive page.

    mehr ...
  • efaLive 2.5 released

    There is a new version of efaLive available for download! As usual, you can find bug fixes and an updated version of efa in the images. The main news is that efaLive is available for the popular RaspberryPi now. You can find a SD card image in the download section. For more information, check the efaLive page.

    mehr ...
  • Make your development environment flexible

    Many bigger development projects require a more or less complex development environment. In this case I do not talk about the IDE, compiler etc., but all components that are required to run the project that is under development. Let’s take a big web application that requires Apache, Tomcat and MySQL. All of these applications are customized in one way or the other. Each time a new developer needs to be ramped up for the project, just setting up the PC might take a day or even more.

    To simplify this and keep away the complexity of the setup from developers, I started to experiment with VirtualBox virtual machines (VM). After a while I started to use more tools to make the setup and configuration of a development VM as flexible as possible. The current result is a setup that uses Packer, Docker, Vagrant and VirtualBox. All a new developer has to do when he/she starts to work on the project is to check out a Vagrant file, make a few configurations and run ‘vagrant up’. This only takes a few minutes and after that a full setup for the development is in place.

    Below, I will explain the tool chain a bit.

    mehr ...
  • efaLive 2.4 released

    I just pushed efaLive 2.4 to the download section. The main difference, compared to the 2.3 release, is a task scheduler, which allows you to run commands periodically in the background and to configure automated backup e-mails. Besides that, the image size is below 700 MB again. So you can burn it to normal CDRs. For more details, check the efaLive page.

    mehr ...
  • efaLive 2.3.beta image for the RaspberryPI

    Finally, I managed to create a first beta image of efaLive for the Raspberry Pi. I have tested it on a Raspberry Pi 1B. It more or less works as described in the efaLive documentation. Besides the users efa and root, you have the default pi user. The language and keyboard layout is English per default. Feel free to test the image. For more information check the efaLive page.

    mehr ...
  • How to destroy a project

    Yesterday there have been many mails on the debian-live mailing list. A few people entered a bug that announced a new piece of software called ‘live-build-ng’. The author of ‘live-build’, Daniel, complained about the name, because it is very close to the name of his package. Then the people behind the new package explained that ‘live-build-ng’ will replace ‘live-build’ in the near future, as the name already suggests. This disappointed Daniel so much, that he announced the end of the ‘live-build’ project. You can find his full post on the mailing list (or in his temporary blog).

    I would like to say thank you to Daniel, who made a great job in inventing and developing ‘live-build’! I feel very sad, that a few people attack a project leader who spent a huge amount of time to develop ‘live-build’ in such a way. They have no right to do that and there is no reason to choose a package name like ‘live-build-ng’ instead of attacking Daniel.

    We will see what tool chain I will use for efaLive in the future. Maybe there will be a fork of the original ‘live-build’ project.

    I wish all the best to Daniel. I hope you recover from this demotivating situation soon. Thank you!

    mehr ...
  • efaLive 2.3 running on RaspberryPI

    Finally I found the time to try to run efaLive on a Raspberry Pi. It was less effort than expected. You just need a Raspbian installation that you upgrade from Wheezy to Jessie. This can be done by exchanging “wheezy” by “jessie” in /etc/apt/sources.list. Then run apt-get update and apt-get dist-upgrade. This will take a lot of time, but at the end you have a Debian Jessie based installation. Now add deb http://efalive.hannay.de/debian jessie main to /etc/apt/sources.list and run apt-get update and apt-get install efalive (ignore the missing GPG key for now). Many dependencies are installed now. At the end everything is ready to run efaLive. Just configure raspi-config to boot into the GUI and put the following lines into a file /home/efa/.xsessionrc:

    1
    2
    
    #!/bin/bash
    exec ~/.xinitrc
    

    Now you have to change the autologin user from “pi” to “efa” in /etc/lightdm/lightdm.conf. From now on, the efaLive Kiosk environment should start automatically.

    Maybe I can provide a complete image for the Raspberry Pi in the future, we will see.

    mehr ...
  • Pitfalls with mocking in Python

    Yesterday I have implemented a test for a Python module of the efaLive project. It required me to mock out one class that is used by the test target. So I used the @patch annotation to mock the class. In a first step I used assert_called_once(), copied from some website, to verify that a specific method of the mock has been called. The test was green. Then I changed the test to use assert_called_once_with() to verify the arguments of the mock method as well. After that, the test became red. I checked the test code and did not find the reason for this. With assert_called_once() I verified that the method is called, but assert_called_once_with() tells me that it is called with other arguments than I expected. Here the test code that was green:

    1
    2
    3
    4
    5
    
    @patch("package1.ThirdPartyClass")
    def test_my_module(self, third_party_mock)
        class_under_test = my_module.MyClass()
        class_under_test.do_something()
        third_party_mock.called_by_do_something.assert_called_once()
    

    After a while I found an interesting article about this problem. The point is: third_party_mock is a mock object and in Python you can call any method of such a mock and it will not fail. The method assert_called_once() does not exist. It was a failure to copy this code from an article in the web. However, the method assert_called_once_with() exists and triggers the statistics of the mock object. But there is another problem in the test code. The method called_by_do_something() is never called of the mock, but of its instance. So the correct code would be:

    1
    2
    3
    4
    5
    
    @patch("package1.ThirdPartyClass")
    def test_my_module(self, third_party_mock)
        class_under_test = my_module.MyClas()
        class_under_test.do_something()
        third_party_mock.return_value.called_by_do_something.assert_called_once_with("foo")
    

    This code will work and trigger the correct mock statistics. To avoid issues like this, I even go a step further now. I don’t use the convenience method assert_called_once_with() any more. Now I use the statistics attributes call_count and call_args directly. Here is what I would suggest to use for the test:

    1
    2
    3
    4
    5
    6
    
    @patch("package1.ThirdPartyClass")
    def test_my_module(self, third_party_mock)
        class_under_test = my_module.MyClas()
        class_under_test.do_something()
        self.assertEqual(1, third_party_mock.return_value.called_by_do_something.call_count)
        self.assertEqual(call("foo"), third_party_mock.return_value.called_by_do_something.call_args)
    
    mehr ...
  • efaLive 2.3 released

    I now have uploaded efaLive 2.3 to the server. The main difference is that this version is now based on the new stable Debian release “Jessie” 8.0. Besides that there is a small watchdog that restarts the PC in case of a X-server crash. For more details have a look to the efaLive page.

    Unfortunately the image size has grown over 700 MB. So you can not burn the image to a standard CD. You need an oversize CD oder a DVD. However, I recommend to use a USB stick, anyway.

    mehr ...
  • efaLive 2.2 released

    Today I have released efaLive version 2.2. There are many structural changes but some new features as well. For more information check the efaLive page.

    mehr ...
  • Microsoft's hand made parser

    I recently had to implement an API to send push messages to Windows phone 8 from Java. So called “tile” messages did work fine after getting the authentication part working. But “toast” messages did not work. The Microsoft push server answered that everything is OK, but the test software on the phone said that there is an error in the payload. The payload for these messages is XML which describes to the phone what text etc it should display.

    After some conversation with Microsoft everything pointed to the encoding of the XML payload. I was wondering, why they use different encoding for tile and toast messages. After some checks in the code, I was 100% sure that I send UTF8 there as required.

    Then I took a test push send software from Microsoft and analyzed the payload. There were some different HTTP headers, but the payload was XML just as mine. The only difference was, that the Microsoft payload was formatted XML. And yes, unbelievable, but this was the problem. After I added carriage return/line feed and some spaces, the toast messages worked as expected.

    Thanks Microsoft for this nice hand made XML parser that expects the payload to contain “\r\n” to form a well formatted XML string!! And I thought that formatting XML is only good for human being’s eyes. You never stop learning…

    mehr ...
  • Source of efaLive now on GitHub!!

    The source code of everything that makes up efaLive is now available on GitHub. Up to now, the source code was available in the CD image only. There was no configuration for live-build to create CD images. Now, everything is available to create an efaLive CD image. All Bash scripts, Python code and configuration files are there. It took some time to make it available in such a comfortable way. I had to restructure many things so that it is more easy for “external” people to understand the project. See the efaLive page for more information.

    mehr ...
  • LaTeX is back

    Ok, it has “ever” been there, but I found back to it. I used it once to write my diploma thesis and was impressed how easy it is, to write long texts with it. It is not really easy for people who are used to Wysiwyg software like OpenOffice or so, I think. But for software development oriented people, it is really easy. And the output is much more professional than with any Wysiwyg tool.

    Until now I used LibreOffice to write the documentation for efaLive. Now I switched to LaTeX and am very happy about this decision. The handling of the document is much easier, you have better control of the layout and you just need a tiny editor. To convert the LibreOffice document, I used the writer2latex extension for OpenOffice/LibreOffice. I used the ultra clean setting for the export.

    I should always use LaTeX for long texts!

    mehr ...
  • efaLive 2.1 available!!

    efaLive 2.1 is released. This is the first “international version”. Documentation is available in English and German. You can run the live system in English or German, the installed system supports all languages which are supported by efa. The new efa 2.1 with many great new features is included in this version of efaLive. It is based on Debian GNU/Linux 7.1 (Wheezy) and should bring better support for the latest hardware. For the download and more information about the changes you can check the efaLive page.

    mehr ...
  • First steps with Firefox OS

    I have started with some Firefox OS app development experiments. It looks promising and I think this is one of the big mobile platforms in the future. You can read more under Computer -> Firefox OS.

    mehr ...
  • efaLive 2.1 BETA available!!

    I just released a BETA version of efaLive 2.1! It is based on the brand new Debian 7 “Wheezy” GNU/Linux. This is the first international version. Try it! Here the details of changes:

    [N]: New; [E]: Enhancement; [F]: Bugfix

    2.1-2.0.7_18 BETA (released 11.05.2013):

    • [E] [4745] Support for German and English in live mode, for many more languages as installed system
    • [E] Based on new stable Debian distribution (Wheezy)
    • [E] Update efa2 to 2.0.7_18
    • [E] Update efa to 1.8.3_19 (deprecated)
    • [E] Support for broadband connections
    • [E] Improved network configuration
    • [E] [4746] efaLive, efa and efa2 are now Debian packages, improve update
    • [N] Support for dynamic DNS services
    • [F] [5676] Fix window move bug
    • [F] [5778] Another solution for permanent backups

    For more information on efaLive, check the efaLive page.

    mehr ...
  • efa2 migration finished

    The efa2 migration for our two boat houses is done. It was some work to clean up the data from our two boat houses. The two logbooks got inconsistent over the time.

    I wrote a small Python script to synchronize the the data of two logbooks. The script just copies all entries from one logbook to the other one, if they do not exist there already and vice versa. This fixed almost all of my over 200 error received during import of two logbooks from the same year. The rest was hand work. There were names written different in the two logbooks, for example. This can’t be fixed automatically.

    For now efa2 runs very well in my club. There were minor problems I have to investigate further. But none of them is mission critical.

    You can find the script here. Each year or tuple of logbooks needs one call of the script. So if you have two logbooks logbook1_2012.efb and logbook2_2012.efb you have to call the script like this on Linux: ./efa_sync.py logbook1_2012 logbook2_2012. You have to strip the extension of the file name. This needs to be done, because the script automatically opens several of the data files, which have different file extensions. The script should work on Windows as well, but I did not test that.

    mehr ...
  • efaLive 2.0 released!

    Today I released efaLive 2.0. It includes the new version 2.0 of efa, which was released today, too. Both, efa and efaLive, bring many new features that make life easier for users and administrators. efa 2.0 is a new development from scratch. So there was a lot of effort to finish it.

    Here are the changes of efaLive:

    • [N] Configure efa shutdown action
    • [N] Configure network settings (including Wifi, VPN, mobile broadband [experimiental])
    • [N] Configure keyboard
    • [N] shutdown/restart PC buttons in efaLive setup
    • [N] Screensaver
    • [N] File manager
    • [N] NTP support
    • [N] Configure date and time
    • [N] Restore backup from USB device
    • [N] General backup/restore dialog
    • [N] Support for NTFS formatted USB sticks
    • [E] Update efa 2 to version 2.0.0_00
    • [E] efa 2 is default now
    • [E] Enable/disable automatic USB backup
    • [E] Optional dialog for automatic USB backup

    You can find the download links on the efaLive page. Unfortunately efaLive is only available in German at the moment. For the installation you can choose English. In this case the whole system should work in English, but this is not tested. I hope I can provide an English version soon.

    mehr ...
  • Betaversion of efaLive 2.0 available!

    Today I released a beta version of the upcoming efaLive 2.0. efaLive 2.0 has some interesting new features which should make the life of the administrator more easy. There is a file manager, a GUI editor, a GUI for backup and restore, a configuration manager for network connections and some more things. So please try it out and report bugs, if you find some. Many of the changes are a result of the feedback from the seminars in Berlin and Osnabrück in September last year.

    The final release is planned to be released around 26th of February. Probably I can announce it in the web seminar (German only …).

    For more details about efaLive and the download links you can check the efaLive page.

    mehr ...