1. From the diary of AArch64 porter — rpm packaging

    In previous part I wrote about code managing issues. Today I want to write more about packaging and other ugly things.

    Each time I see block with check for 32/64 architecture I want to scream. Funny part is in RPM packaging. For example:

    %ifarch x86_64 ppc64 s390x sparc64
    %define bitsize 64
    %else
    %define bitsize 32
    %endif
    

    Can be replaced with simple “%define bitsize %__isa_bits” so we would not have to patch yet another spec file.

    But developers are smart — always can create some nice way of fsck such thing up…

    if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then
        libsubdirs="lib64 lib lib64"
    fi
    

    This is from configure of one of libraries which failed to find boost version (as it did it by scanning library paths).

    Such issues are fun. Especially when component builds fine with wrong value and then all packages which depend on it fail in some weird way.

    But sometimes they fail in a way that it is cleanly visible what was wrong. ORBit2 is good example:

    DEBUG: /usr/include/orbit-2.0/orbit/orbit-config.h:9:30: fatal error:
    orbit-config-64.h: No such file or directory
    

    Everyone see that something is fishy with ORBit2 here. One small patch (similar to %ifarch example) and then all it’s dependencies build just fine.

    So if you are software developer and have such 32/64 checks in your software please consider doing it in a way that another 64bit architecture will not have to patch your code again.

    Written by Marcin Juszkiewicz on
  2. I miss Debian tools

    It is nearly two months since I switched from Debian/Ubuntu to Fedora/RHEL. And I start to miss Debian tools…

    Under Debian (which also means derivatives like Ubuntu) I used simple set of tools and I have found their Fedora replacements:

    Debian Fedora
    dpkg rpm
    apt-get yum/dnf
    apt-cache yum/dnf
    dpkg-buildpackage rpmbuild
    debuild rpmbuild
    pbuilder mock
    debdiff rpmdev-diff
    dgit(?) fedpkg/rhpkg

    The problem with Fedora tools is that they feel like few years behind Debian ones ;(

    While Debian world moved to use “quilt” to manage patches in source packages few years ago, Fedora’s RPM just got it recently so it is hard to find package which makes use of it. Updating patches is far from being pleasure.

    Yum (and it’s younger brother ‘dnf’) work in other way than APT. But are usable and do what they have to. The fun starts when you run “yum upgrade -y” on slow machine (like AArch64 model) and someone will regenerate repository data in meantime — you end with 404 errors cause repodata/ directory uses random file names…

    rpmbuild works. It even has some limited support for running separate steps. But without dependencies between them so “rpmbuild -bi specfile” needs “rpmbuild -bc specfile” first while in Debian world “debian/rules install” is enough. There is also “—short-circuit” option to not clean build directory when you want to go through single steps. But resulting binary packages are tainted and can not be installed without using “—nodeps” switch to RPM. I see a sense behind it but it hit me hard on AArch64 when I was building Qt (do not ask how long it took cause I did it several times during last 2 months).

    Then we have mock. Argh… I put it in one line with pbuilder but it is not worthy. No user setup possible, just one build at time (my machine is now 10% busy) make mock wasting lot of developer time. I opened bugs with feature requests for user config and multiple builds — hope that one day it will appear.

    And last entry is what I like. Both fedpkg and rhpkg allow me to clone git repository of package so I can create patches for packaging in quick way. In Debian world I never used such tool. Under Ubuntu packages were kept in Bazaar repositories but you know already what I think of this SCM.

    Written by Marcin Juszkiewicz on
  3. From the diary of AArch64 porter — autoconf

    One day I will go to software conference with an axe or a knife and will turn a place into slaughterhouse…

    During last few weeks most of my work was related to fixing build issues on AArch64 platform. That’s what I do since September 2012. Just operating system changed from OpenEmbedded to Fedora. And there are days when I want to kill.

    Kill who? Software developers. Some for shipping few years old copies of config.{guess,sub} files. Others for inventing crazy ways of abusing autoconf usage. My latest find was fakeroot.spec which has this precious jewel:

    for type in sysv tcp; do
    mkdir obj-$type
    cd obj-$type
    cat >> configure << 'EOF'
    #! /bin/sh
    exec ../configure "$@"
    EOF
    chmod +x configure
    %configure
     --disable-dependency-tracking
     --disable-static
     --libdir=%{_libdir}/libfakeroot
     --with-ipc=$type
     --program-suffix=-$type
    make
    cd ..
    done
    

    By default “%configure” macro updates config.{guess,sub} files. But it does it in place. So no luck here.

    There are countless packages like that. Code for 3rd-party libraries bundled with code may have them as well.

    So if your package uses config.{guess,sub} files then please take a look and do an update of them with new release.

    Written by Marcin Juszkiewicz on
  4. My father died

    An hour ago my mother called me and told me that my father died.

    In the morning I will pack and go to my home town to take care of my mother and help as much as I can with funeral organization.

    So if you wanted something from me, postpone it for at least a week. I may scan emails but this is not granted.

    Written by Marcin Juszkiewicz on
  5. TouchWiz? Thanks, but no

    Week ago I was at SmartDevCon conference where Samsung was main sponsor. They had some contest which I won and got Samsung Galaxy S4 (GT-I9505) phone.

    Phone arrived on Friday just before my trip to WeCan demoparty so I had to spend some time with original software instead of starting from flashing CyanogenMod. It was painful experience…

    Hardware is nice — Qualcomm Snapdragon 600 with 4 cores, 2GB ram, 5” fullhd screen made it nice device but software… I had a dejavu and felt like travel back in time to moment when I bought Nexus S. Why? TouchWiz looks and feels like Gingerbread ;(

    I have read many times posts where people complained about it, saw it on Galaxy S2 but never thought that it is so bad until played with it for few days.

    As a person used to clean AOSP interface I had problems finding my place with it. For example dialer:

    Dialer - keyboard
    Dialer - keyboard
    Dialer - connection list
    Dialer - connection list

    As phone is running Android 4.2.2 I would rather expect Holo compatible UI with tabs which can be switched by simple swipe. But no, Samsung decided to give users Gingerbread style with tab captions to tap if you want to switch. I did called few people by mistake as swipe right is call (left == send text message). Sure, dialer can be replaced by other application from Google Play Store but why?

    Compare it with standard Android dialer on my Nexus 4:

    Dialer on Nexus - keyboard
    Dialer on Nexus - keyboard
    Dialer on Nexus - connection list
    Dialer on Nexus - connection list

    Note also indicator icons on status bar. On Nexus WiFi icon is near to GSM signal one to not take precious space — not possible for Samsung. And while on AOSP network speed icon (GSM/EDGE/HSPA(+)) is above signal one, TouchWiz has separate one — just like it was in Gingerbread.

    Or notification panel… This one is insane:

    Notifications
    Notifications
    Quick Settings?
    Quick Settings?

    I already disabled brightness slider which was there as well. Note how pressing button in right top corner changed switches from ribbon to be full screen. I would like to remind Samsung that Android 4.2.2 has Quick Settings panel for such stuff (screenshot from my Nexus 4):

    Quick Settings on Nexus 4
    Quick Settings on Nexus 4

    I could add more and more screenshots and complain about many things. But will not because I feel sick when have to use this UI. But just two more, Settings and recent apps:

    Settings
    Settings
    Recent apps
    Recent apps

    Note tab captions again, huge fonts (with text size already set to “small”). Recent apps list is another crazy thing. Device has “hardware” buttons so “Google Now” is harder to run now.

    Speaking of buttons… Let me quote Android documentation for developers:

    Beginning with Android 3.0, the Menu button is deprecated (some devices don’t have one), so you should migrate toward using the action bar to provide access to actions and other options.

    And Honeycomb was released over two and half year ago. Recent apps button would be much more useful.

    So what next? CyanogenMod 10.2 (Android 4.3 based) will land on device as usual.

    Written by Marcin Juszkiewicz on
  6. My own company started 8th year today

    Seven years ago I created my one person company. And it was one of best things I did in my life.

    All started in 2006 when I started doing some small paid jobs around OpenEmbedded. Small things: solving build problems, updating recipes, adding new ones. But companies prefer to get invoice for such stuff instead of just giving money…

    So one day I went to city hall and created what was then called “HaeRWu Marcin Juszkiewicz”. I changed name 2 years later and got rid of that ‘impossible to pronouce’ part.

    There were many different clients for my consulting work. CELF was my first one, later I dropped my daily work and started remote work for OpenedHand. When they were acquired by Intel I got quite nice offer but preferred not to move to UK so went own way. From time perspective I do not know was it right decision ;)

    So I looked at market around OpenEmbedded and started working with Bug Labs and few smaller jobs for other clients (some knew me from OpenedHand times). Also had job proposal from Canonical for their newly created ARM team but nothing came from it.

    Time passed. One and half-year later Canonical made another attempt and this time I though “why not?”. So I went there just to be moved outside to a team which did not have any official name (other than NewCo or New Core which you may heard somewhere). And that team became Linaro some days later.

    At Linaro I did lot of cleanup in Debian/Ubuntu toolchain components, added bootstrapable cross toolchain and fixed several packages (also created some new ones). But then, just when I was supposed to move to Canonical, new things came and AArch64 took my whole time.

    ARMv8 work was great time. Learnt new things about OpenEmbedded, saw how project moved during those two years when I did not follow it’s development. Och it was good time.

    But good things have to end one day. And so did my time at Linaro. But at around same time I started talking with several companies around Linaro to find a new place for me.

    And I found it at Red Hat. Took a bit of time to get everything set up but I think that it was worth it. But due to the fact that I am employee not contractor I will suspend and in few months shutdown my consulting company.

    It served me well. I came from being person not recognizable to someone who is known by people who I see for first time. It is good feeling ;)

    Written by Marcin Juszkiewicz on
  7. My first day with Fedora

    Yesterday I switched my home desktop from Ubuntu 13.10 to Fedora 19 to have work environment ready for my Red Hat tasks.

    Installation was easy as Fedora installer does not ask too many questions. But also does not give any software choice so I took KDE one. Made a backup of Ubuntu rootfs and /home partition and 10 minutes later I was running same X11 session but with Fedora logo in a corner.

    Installing extra packages is argh… There is yum and basically nothing else. I tried Apper and Yumex — none of them was useful. Apper was unable to remove Konversation and message I got was useless (“some package depend on it” like). Yum did not have any objections. Yumex was even worse as it gave me a list of all packages without any grouping applied. Even “dselect” was better in 1999 when I started with Debian.

    So I installed APT. This one works but only kind of… “apt-cache search something” takes eons, installing packages is impossible due to a way how RPM works…

    Because RPM allows to have more than 1 version of package installed at same time. WHY? How it is supposed to work at all??? And no, I did not have any filesystem corruptions or something like that…

    Anyway those problems can be bypassed or ignored. But then there are other ones. I always thought that Debian legal team has very strict rules about what can go into distribution. Fedora proved that I was wrong. External repositories are a must have here. MP3 or AAC playback? Forget. Probably also video playback etc. Want Google Chrome? Forget. I understand why Adobe Flash is not in repo (but there is one with it as well) but all that? Probably there are more entries here but I did not yet finished installing stuff I use/need.

    Will have to add few tweaks here and there (like bumping “nr_uarts” kernel option to have all 7 serial ports) but it works. And I like “journalctl -b” way of checking what was going on since system boot ;D

    Written by Marcin Juszkiewicz on
  8. New boot setup of my Chromebook

    After several recompilations I finally got what I wanted on my Chromebook. Clean and easy way of booting own kernel.

    Now situation is clean and easy:

    • power on Chromebook
    • ChromeOS U-Boot from SPI flash starts
    • white screen of warning appears
    • Ctrl-d to skip it
    • U-Boot starts from mmcblk0p1
    • U-Boot reads boot.txt from mmcblk0p2 (ext2 /boot/ partition)
    • U-Boot reads uImage kernel and exynos5250-snow.dtb file from mmcblk0p2
    • Kernel boots directly to Fedora F19 stored on mmcblk0p3

    This way I can quickly test mainline kernels (but this may require U-Boot change for simplefb support), manipulate 3.[48]-chromeos ones etc.

    Next step would be replace bootloader stored in SPI flash but this voids warranty so let it wait a bit.

    Written by Marcin Juszkiewicz on
Page 30 / 106