The awesome stuff Leon

Apple Airplay on Raspberry Pi

We have an old audioset, which looks pretty nice, but is very old skool. Only an audio in cable and nothing else. No bluetooth, no airplay, no streaming.

I have some USB audio output connectors, those are perfect for creating a small audio system with the Raspberry Pi. (as you maybe know, the 3mm jack on the Pi is not that great)

Start with a Pi3 or newer. If you use the older ones you could get some glitches during playback because lack of cpu power.

Start with install the Raspbian Lite images and enable SSH

Configure the Airplay Server:

Install the deps:

# sudo apt-get update sudo apt-get install autoconf automake avahi-daemon build-essential git libasound2-dev libavahi-client-dev libconfig-dev libdaemon-dev libpopt-dev libssl-dev libtool xmltoman

Now lets build and install shairpoint-sync:

# git clone https://github.com/mikebrady/shairport-sync.git
# cd shairport-sync
# autoreconf -i -f
# ./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata
# make
# sudo make install

The metadata in the configure line is used to be able to show the audio information to an external screen or external service.

Lets start the service and make sure the service starts after a reboot:

# sudo service shairport-sync start
# sudo systemctl enable shairport-sync
# sudo reboot

When the reboot is done, check if the service started:
# sudo systemctl status shairport-sync.service

Make sure the Wifi stays up and running without dropouts:

# sudo nano /etc/network/interfaces

Go to the end of the file and add the lines:
# Disable wifi power management
wireless-power off

Save and do a reboot:
# sudo reboot

Change the audio default:

Because I use an usb adapter for doing audio out, you need to tell alsa to use usb as the default:

# sudo nano /usr/share/alsa/alsa.conf

Replace the 0 to 1 for the following lines:
defaults.ctl.card 0
defaults.pcm.card 0

Save the file and reboot and all should work as expected :)

Inspired by 7-easy-steps-to-apple-airplay-on-raspberry-pi and updating-alsa-config

Testcontainers and permissions issue on OSX

We use testcontainers to easily do integration tests that depend on other services.
It makes it easy to spin up docker container in your tests. With Quarkus it is even simpeler because it supports testcontainers out of the box.

Unfortunately I kept getting an issue with running the mariadb container.
As soon as the test starts after a few seconds the mariadb gets shutdown again.

After checking the log of the shutdown container I found that it didn't have permission to read the my.cnf file.

I was really stuck, I had no clue but after searching I found this nice post talking about permissions.

This got me thinking because I have set umask pretty strict because of security reasons. Here is a nice post that explains it. Mine is set to 027.

After setting the umask to 011 I still had the same issue.
When I do a:

/tmp> ls -la
total 208
drwxrwxrwt  20 root       wheel    640 Feb 16 12:10 ./
drwxr-xr-x   6 root       wheel    192 Jan  1  2020 ../
drwxr-x---   3 logic  wheel     96 Feb 16 12:09 .testcontainers-tmp-379975470819841649/

As you can see, the settings are still wrong. Then it hit me, gradle is running as a daemon. You need to restart the daemon to pick up the new umask settings.

This fixed it :

drwxrw-rw-   3 logic  wheel     96 Feb 16 12:14 .testcontainers-tmp-14701789202178352376/
drwxrw-rw-   3 logic  wheel     96 Feb 16 12:14 .testcontainers-tmp-2461134091080897801/

So now I have a zsh function that will alter the umask when I run gradle.

2020 and gaming

I was looking at the game release list of last year. You know January is the month of lists and I was wondering what game I played the most.

I found it strange that for me the games that topped my list are games that are pretty old and just received a bump, in being remastered or being extended with more DLC in some form.

Yes, I am a very big Skyrim fan. So Skyrim was on top of my list. I played it on my OneXplayer and it is perfect to play it on. Playing on a small screen and easily switching to my dock so that I can play it on my ultrawide screen.

And the second game I really enjoyed was Mass Effect the remaster trilogy.

I really hope that after Cyberpunk in 2019 a new game can really catch my attention. I have big hope for Starfield. Yes it is Bethesda again :)

Honorable mention is btw for Forza Horizon 5.

Morning Glories: Volume 1

I have to be honest, this comic has been om my list for a very long time. You could say i'm late for the party with it's first release in 2011.

It is about six teenagers that go to a prestigious boarding school. It feels a bit like Lost meets teenage drama with some flavor or horror mixed into it. There are flashbacks with every character so you get a bit more background information while they are struggeling with their new environment.

I really like the artwork and the story line. Volume 1 is all about the introduction of the characters. Cannot wait to start with Volume 2.

What happened to 2021Q1 and 2021Q2 smartos images?

If you do a imgadm avail you will see that the latest LTS image of smartos is :

800db35c-5408-11eb-9792-872f658e7911  minimal-64-lts   20.4.0 smartos zone-dataset  2021-01-11
1d05e788-5409-11eb-b12f-037bd7fee4ee  base-64-lts   20.4.0 smartos zone-dataset  2021-01-11
188ee9ce-540a-11eb-9cc1-2748cd10e5e2  pkgbuild-lts   20.4.0 smartos zone-dataset  2021-01-11

I was wondering what happened to the rest of the images? We used to see them every quarter. Jonathan Perkin answered the question on the mailinglist (https://smartos.topicbox.com/groups/smartos-discuss/Tf17bc027dd6f9cba-M7dedf357e2bb4ca48d8065a5):

I stopped producing the non-LTS quarterly releases.  They weren't all 
that useful (in my opinion), as users are better served running either 
LTS if they want a static set of packages with the occasional security 
fix, or trunk if they just want the latest and most secure software.  

It's also hard to justify spending time and resources on them now that 
JPC is no more (so my available hardware is significantly reduced) and 
I'm no longer working on pkgsrc full-time.

Simply change your pkgin repo to the trunk version if you want the latest and greatest:

edit /opt/local/etc/pkgin/repositories.conf and replace the :

/packages/SmartOS/2020Q4/x86_64/All -> /packages/SmartOS/trunk/x86_64/All

and run a pkgin upgrade

Older Posts