Python27, LLVM and CLI for OneDrive

One of the most useful features I use the Freebsd box for is to cache a copy of my MS OneDrive that is only periodically synced, so that is MS has a problem I have a full offline copy or if I manage delete a file from the cloud that I really didn’t want to do and hopefully I still have a copy in the unsynced cache.

All was fine until the OneDrive port for FreeBSD insisted on reinstalling the long deprecated Python27 libraries. No matter how much cleaning and checking dependencies prevented Python27 being rebuilt from ports each time.

I managed to spend some time today looking at each of the OneDrive dependencies and found that LLVM70 and LLVM10 are both listed. Oddly LLVM10 supersedes LLVM70 and calls in the more modern Python37. So by building LLVM10 first so the dependency is met, when I rebuild OneDrive I no longer get the obsolete version installed.

The Metaport of LLVM is not clear which version is built, I already have LLVM90 installed but does not seem to satisfy the OneDrive dependencies. Not sure if this is OneDrive maintenance issue, or a LLVM issue. but thankfully now resolved and the box can get back to doing what it should. –

Update – LLVM was not the issue, but LDC which calls in LLVM. When the next port update to OneDrive came out, LDC rebuilt LLVM70. So now looking at LDC as the culprit.

The OneDrive CLI client is not unique to BSD and the default GitHub page for Linux version can be found here.

re-build world again….

might not be full lockdown, but the vaccines are here so time to rebuild both the virtual and IRL world.. Updated FreeBSD to 12.2 which had probably been one of the simplest OS updates. I usually get caught out with merging the updated config files but guess the second point update to 12.x probably was not a major change to get wrong. Also made easier by stripping off MATE and most of the desktop apps that I occassionally dabbled with as its back to running as as Headless Server with all access over SSH or Web Interface.

PHPipam, FreeBSD and network discovery

PHPipam is an IP Address Management utility written in PHP. Slightly overkill for managing a home network with just one subnet and just a possible 255 different IP addresses for me to manage, but hey, its free and we use it at work so being able to hack about with it in the safety of my own home is quite nice.

However, FreeBSD is not first choice for PHPipam average users so the default locations for Ping and FPing are not where a standard Linux install would expect to find them. For FreeBSD you have to log into your PHPipam landing page and head to the Administration section and amend the path for :

/bin/ping to /sbin/ping note the extra s

and

/bin/fping to /usr/local/sbin/fping

and then network discovery scans should work for you

Grrr Nettle woes next

After finally getting RHASH to build, a few easy days and then Nettle would not build. I tried everything, MAKE CLEAN, DEINSTALL, rebuilding build dependencies, nothing worked. Re-installing the old package again kept everything work.

In deperation, I saw the the GHOST-BSD laptop I am currently testing had a built package for nettle-3.6 so in desparation and part trial, I copied the nettle package from the laptop to the server and then issued SUDO PKG ADD path/to/nettle.3.5.xxx and hey presto, it installed and after several reboots and rebuilds of dependent packages it works. Its probably not the safest or more secure, but allowed all the packages that then depend on GNUTLS to build to the latest ports.

RHASH build woes

Have spent two weeks trying to update RHASH from 1.3.5 to 1.3.9 via ports, but kept giving build errors on openssl.mod which no one else was reporting. Tried to deinstall clean and rebuild and still no go.

Checked Freshports for updates and it is not updated very often but did notice that gettext-tools and gettext-runtime where listed as dependencies too. So quick make deinstall clean and re-install I thought might help. But part way thru reinstalling, Sudo no longer worked on getting gettext-runtime to function. Seems deinstalling gettext-tools broke Sudo. So quick SU to rebuild gettext-tools and sign out and back in again might fix it.

but oh no, still the same build error. However asking portmaster to build atril, it then went away happily and updated RHASH thereby allowing CMAKE to update and now the remaining ports seems to be updating happily enough.

Things to do in lockdown – rebuild world!

Well, FreeBSD world. time had come to update to 12.1 release and thankfully its been much easier than the jump from 11.x to 12.0 Merge did not throw up any issues and 12.1 base built itself overnight ready for installing yesterday morning.

Only pain has been trying to stop python2 getting installed with re-installing all the ports. I think I am just going to have to accept until everything is rebuilt and then remove it. Default versions have been defined in make.conf but seems some ports ignore.

Biggest challenge I was running the Kmod-legacy-drm drivers in the belief these were correct. Several reboots and reinstalls and tinkering did not resolve the unreadable display at boot time meant I had to SSH in from elsewhere to work on it. The cure in the end was quite simple, install the current kmod driver port and voila hi-res text and graphics have been restored. Only issue now is that the Mate Desktop menu’s have disappeared to I can’t actually quit the desktop. but least I can work the box directly now.

EDIT: reinstall of Mate notifications and menu ports has restored my menus.

Old School BIOS Update – via CD-ROM

Planning for the next major FreeBSD update, I decided I should update the old BIOS first, Lenovo are very good at releasing updates to BIOS/UEFI long after the product has ceased being available.

Suffice to say a quick check of https://pcsupport.leveno.com/gb/en and pumping in the Model No (or device serial no) detailed a list of updates for my hardware a good 5 years newer than the original BIOS that shipped with this box.

However is its non-Windows all the usual update tools where irrelevant. Litterally had to dust down my DVD/CD recordable drive and download the BIOS ISO and burn to CD. A quick dabble to change the boot order and re-enable the original DVD drive and I was finally able to flash the BIOS. All very slow compared to in-windows updates on my other devices.

No major great improvements, but better support for any more modern hardware I might chuck inside like SSD’s in the future.

Mad patching day

Decided to upgrade the base MySQL backend today, but got into a world of pain, by following the last advice in /usr/ports/UPDATING.

That only updated the packages and lead to about 280 other ports and packages being over-written. Not good. Ended up having to Make Deinstall from the old Mysqlxx-Server and Mysqlxx-client ports and manually installing again.

But down now and hopefully some other lost dependencies fixed.

MS Azure and FreeBSD

Home Server has been offline for a bit as I grappled with MS Azure and setting up a FreeBSD VM. The initial setup went fine, and the first month was free, but trying to establish the monthly running costs for a comparable VM to the current setup proved elusive so I never actually got a “mirror” of this site up and running in the MS Cloud.

So I waited it out and eventually the real prices became visible, £79 per month so the equivalent VM for what I only paid £140 a one-off for the physical box sat here at home. Yes, it burns electricity and hums away in the corner and needs me to feed VirginMedia a shedload of money per month, to keep the “VIP” bandwidth and upload speed but I would be doing that anyway for the rest of the family, MS Azure and FreeBSD does not currently work for me.

Back online!

A MySQL server update at the start of the year did not go as planned and corrupted the tablespace. Its taken me a while to restore the system and coupled with a busy summer meant I have only just found the time to restore to an operational state.