• Upgrading Nextcloud 15 to 19 on Debian …

    So my Debian 9 server was still running Nextcloud 15. Meanwhile Nextcloud 20 is out.

    When I looked at performing the (manual) update I actually found a Nextcloud 16 download already in place but it seems I never completed that. Not long afterwards I discovered why – Nextcloud 16 requires PHP 7.3, but Debian 9 only has PHP 7.0 available.

    Long story short, instead of chimera’ing my Debian install I bit the bullet and decided to finally upgrade the server to Debian 10

    Some time later…

    After the server upgrade completed I was able to use the Nextcloud web interface to upgrade to Nextcloud 16.. and 17… and 18… and 19… and 20!

    That’s were the fun stopped, many things were broken in NC20 (apps just showing blank pages), so, having taken a backup between every upgrade, I rolled back to NC19 (incidentally validating that my backups worked).

    Most things worked out of the box. Critically for me, Grauphel did not.

    Long story short, it turns out that on Debian 10, the version of the PHP OAuth package is actually not compatible with the installed version of PHP 7.3! Installing a binary-compatible package from the Debian package snapshots site fixed this.

    Amongst other things I did during the upgrade cycles was:

    • changed the database to 4-byte suppport allowing for more characters in paths and comments.
    • fixed several other minor PHP configuration issues which Nextcloud was warning about.
    • fixed support for Maps (Nextcloud bug in the upgrade scripts left some database columns misconfigured:
      • Column name "oc_maps_address_geo"."object_uri" is NotNull, but has empty string or null as default.
      • The fix was to manually edit the scripts.
    • wrote backup scripts backing up the Nextcloud directory, the database, and, optionally, the data directory.


  • Upgrading Debian 9 to Debian 10

    Triggered by needing to upgrade Nextcloud, I finally bit the bullet and decided to upgrade my virtually-hosted Debian server from Debian 9 “stretch” to Debian 10 “buster”.

    The upgrade, as usual, was fairly trivial:

    apt-get update
    apt-get upgrade
    <edit /etc/apt/sources.conf to point to the new version>
    apt-get update
    apt-get upgrade
    apt-get full-upgrade
    reboot

    There were various configuration files which needed tweaking during and after the upgrade. vimdiff was very useful. I also learned a new screen feature – split-screen! (Ctrl-a – |). Finally a shoutout to etckeeper for maintaining a full history of all edits made in /etc.

    Post-upgrade Issues and Gotchas

    dovecot (imap server)

    A huge issue was that I could no longer access my emails from anywhere.

    Turns out that dovecot was no longer letting me log in. The mail log file had numerous “Can’t load DH parameters” error entries. I had not merged in a required change to the ssl certificate configuration.

    exim4 (mail server)

    The second huge issue was that exim was no longer processing incoming mail. Turns out that spamd wasn’t started after the reboot. Fixed by:

    systemctl start spamassassin.service
    systemctl enable spamassassin.service

    shorewall (firewall)

    Another major gotcha: the shorewall firewalls were not automatically re-enabled, and it took me three days to notice. Yikes! I had left the server on sys-v init instead of systemctl and the upgrade had silently switched over. After restarting the firewall, use systemctl enable to configure it to start on bootup.

    systemctl start shorewall.service
    systemctl enable shorewall.service
    systemctl start shorewall6.service
    systemctl enable shorewall6.service

    bind9 (name server)

    Another item was that bind was no longer starting up – it needed a tweak to the apparmor configuration. Appears that on my server the log files are written to a legacy directory and the new default configuration prevented bind from writing into it and hence failing to start up.

    Miscellaneous

    • I finally removed dovecot spam from syslog by giving it its own logfiles (tweaking fail2ban accordingly).
    • Various PHP options needed tweaking and several new modules needed installing to support Nextcloud (manually installed so no dependency tracking).

    Later Updates

    • Discovered that phpldapadmin was broken. Manually downloaded and installed an updated version from “testing”.

  • New Scuba Toy – Shearwater Peregrine

    Just bought a Shearwater Peregrine as a backup for my Shearwater Perdix AI (budget didn’t quite stretch to a second Perdix..)

    Haven’t dived it yet, but following are my immediate unboxing impressions (pictures (via Google image search)).

    The good:

    • Familiar layout and the same great screen as the Perdix.
    • Smaller and lighter form factor than the Perdix.
    • Mostly full-featured recreational dive computer with some intro-to-tec features.
      • No AI/compass
      • Up to 100% O2 and 3 gases
      • Lots of “tec” displays
    • Built-in battery charging is via the Qi wireless standard, so absolutely no exposed contacts.
      • But due to wrist-straps/bungees it may be difficult to use generic Qi charging pads.
    • Dive download via Bluetooth (hopefully works better than the Perdix!)

    The bad:

    • Buttons are physical rather than the piezo-electric ones from the Perdix (subjective).
    • Battery is a built-in rechargeable battery (subjective).
    • Limited display customisation (as compared to the Perdix).
    • Screen protector is a standard thin protector rather than the thick gel-like one of the Perdix.

    The ugly:

    • The charging pad uses a micro-USB cable rather than USB-C (for a brand-new product, I would expect it to use the latest standards)
    • Still fairly large (although required to support the screen, the bezel _could_ be a bit smaller given the target market)
    • No compass or Air Integration (for the price-point, many competing products offer these features)

  • Gotcha when testing Unity Objects for null in C#

    Unity has overloaded the ‘==’ operator, specifically, checking objects against “null” might not always do what you expect. More information can be found in this blog post from Unity.

    Specifically, if a Unity Object (as opposed to a C# object) gets destroyed, it will be set to a “fake null” object.  In this case, the following statements are true:

    1
    2
    3
    4
    
        obj == null          // true    obj is null          // false
        (object)obj == null  // false
        obj ?? value         // obj

    Note the different results between lines 1 and  2 & 3.

    If obj truly is null, then the results are as expected:

    1
    2
    3
    4
    
        obj == null          // true
        obj is null          // true
        (object)obj == null  // true
        obj ?? value         // value

    It may be more readable to provide an Extension Method to UnityObject:

        /// <summary>
        /// Extension Method on Unity Objects returning whether the object really is null.
        /// </summary>
        /// Unity overloads the '==' operator so that it returns true on both null references
        /// as well as references to destroyed objects. This function only returns true if
        /// the reference truly is null, and returns false for "fake null" objects.
        public static bool IsTrueNull(this UnityEngine.Object ob)
        {
            return (object)ob == null;
        }

  • Last minute ski trip – first afternoon

    So I eventually made it to the Chalet and met up with FiSH and John after checking in. Brief spot of lunch, sort out ski hire and lift pass, and a short while later we’re heading up the mountain for my first attempt at nreaking bones in 14 years or so.

    With a shout of “No guts, no glory” I launched myself down the slope. The first turn was a bit iffy (I had completely forgotten how to) but then muscle memory kicked.in and it was all good.

    Had a great arvo skiing even hitting some red runs. Weather and surroundings just gorgeous and surprisingly empty slopes.

    After the lifts closed we headed back to the Chalet for a warm-up in the Onsen before heading to dinner at a local Izakaya. Highlight was horse sashimi – delicious and so tender it melted in your mouth.

    Then back to the Chalet for and early night.. brekky at 7:30!


  • Last minute ski trip – departure

    So a mate of mine, FiSH, texted me around 5pm saying the skiing was great up in Yamanouchi and that it would be great if I could join fir the weekend.

    A few clicks later and I had a reservation at Chalet Shiga, the place he’s staying at. Then off.to ask my boss if I could.take the Friday off – to which he surprisingly agreed 😀

    Next priority – down to Bar82 where I was meeting up with some old friends. A few beers later and it’s to the JR counter to get a Shinkansen ticket to Nagano.

    Back to the apartment, pack, shower, set alarm, sleep. Too few hours (6) later and I’m up – 10 minutes before the alarm!

    A short while and a pic of sunrise later and I’m on the Yamanote line bound for Tokyo where the Shinkansen stops. In typical German style I’m on the platform 40 minutes too early – time to write a blog entry and have a coffee!