Planet Ubuntu is a window into the world, work and lives of Ubuntu developers and contributors
As part of the festive competition we’re hosting that asks you to build a seasonal snap on your RaspberryPi…we couldn’t help but try out another example of our own!
Didier from the dev team has created a Christmas music carousel snap! The snap allows you to play a Christmas music carousel from a selection of pre-selected music…with the option of having LED lights using a Raspberry PiGlow connected on the network.
Here are notes on how to do so!
On a 16.04 Ubuntu desktop, you can install this as a snap:
snap install christmas-music-carousel --beta --devmode
Optionally, connect on your network a Raspberry PiGlow with Ubuntu Core installed on it with a PiGlow. Install the grpc-piglow snap on it:
snap install grpc-piglow --beta --devmode
Finally, run the carousel with default music selection (as root):
christmas-music-carousel [-options] [LIST OF MIDI FILES]
Play a music carousel and optionally sync up with lights on a Raspberry PiGlow connected on the network.
A list of midi files can be provided, and in that case, the carousel will play over them in random orders. If none is provided, a default christmas selection is chosen. If you have a PiGlow on the same network, ensure you have the grpc-piglow snap installed on it.
This programs need to be ran as root on your laptop to connect to alsa.
brightness (integer): adjust brightness (from 1 to 255) for light up PiGlow. Warning: any value above default (30) is dazzling
debug: Enable debug (developer) messages
This project is orchestrating multiple binaries:
TiMidity, a software synthesizer playing MIDI files
alsa utilities: aconnect, aplaymidi: to play midi files and connecting MIDI ports
music-grpc-events a python program in music-grpc-events/ directory receiving MIDI events and forwarding them to the PiGlow RPI board via gRPC
christmas-music-carousel, a golang program in *chrismas-music-carousel directory, which orchestrates all above tools, restarting them as needed, handling the notions of required and optional components. It’s using the bonjour/mDNS protocol to detect the RPI PiGlow on the network and forward those connexions info to music-grpc-events
More information on gRPC-PiGlow can be found here
Regenerating the gRPC protocol (python)
Ensure you are in your python virtualenv in music-grpc-events:
pip install -r requirements.txt
Then, regenerate piglow_pb2.py from our protobuf protocole (the proto file is in github.com/didrocks/grpc-piglow):
pip install grpcio-tools
python -m grpc.tools.protoc -Ipath_to_grpc-piglow/proto/ --python_out=musicevents/ --grpc_python_out=musicevents/ path_to_grpc-piglow/proto/piglow.proto
Link to info on Github here.
Competition entry details
It’s Season Nine Episode Forty-One of the Ubuntu Podcast! Alan Pope, Mark Johnson, Martin Wimpress and Joe Ressington are connected and speaking to your brain.
We are four once more, thanks to some help from our mate Joe!
In this week’s show:
We discuss what we’ve been upto recently:
Playing with Amazon Echo dot and driving “up north” and back and using lots of mobile data.
We discuss the news:
The UK’s contentious surveillance bill has become law
PINE64 has launched the Pinebook, a low-cost Linux laptop
Mark Shuttleworth has announced that Canonical is launching a case against a cloud provider using Ubuntu branding on unoffical images
San Francisco transit stations have fallen victim to a hack, but the hacker got hacked… twice
An Indiegogo has launched for the “First True Linux x86 and x64 Tablet” for “TECHNO-GEEKS!”
Telegram is Launching Telegraph, a blogging platform for the impatient
Want a Death Star? That’ll be $7.7 octillion per day
Presenters news picks we didn’t have time to discuss:
New battery tech lasts for days, charges in seconds
Everybody is 4K streaming.
Netflix 4K streaming comes to the PC—but it needs Kaby Lake CPU
4K Netflix is finally coming to PCs, but you probably still can’t watch it
Hulu is now offering its originals and Bond in 4K
YouTube adds 4K support for livestreams
Foxconn exec faces 10 years for stealing 5,700 iPhones
Trump’s new tech adviser wants to gut the FCC
Trump’s FCC advisor wants to eliminate most of the FCC
Trump hires two net neutrality opponents to oversee FCC transition
Uber knows where you go, even after ride is over
Google Chrome now defaults to HTML5 for most sites
Plex can pull media from Google Drive, Dropbox and OneDrive
Chemists officially add new elements to the periodic table
At least 10 million Android users imperiled by popular AirDroid app
Snowden can be asked to testify in person in German NSA probe
Religion and gambling have the same effect on your brain
Worried about US surveillance, Internet Archive announces mirror in Canada
Homeopathic solutions now have to be labeled to disclose that there’s no science behind them
Ofcom will force BT to legally separate from Openreach
It will soon be illegal to punish customers who criticize businesses online
30 years later, $1.6B mega-project finally puts Chernobyl to rest“
GPU sales surged in 2016 on strong demand for high-end desktop, laptop gaming
Cyber college for wannabe codebreakers planned at UK’s iconic Bletchley Park
Amazon Lightsail: The private server killer
Newly discovered router flaw being hammered by in-the-wild attacks
Rule 41 — The FBI Just Got Unlimited Power To Hack Any Computer In The World
Fitbit is reportedly buying Pebble for $34 million-40 million
We discuss the community news:
Sujeevan Vijayakumaran: UbuCon Europe in the retrospective
Ubuntu Insights: UbuCon Europe – a sure sign of community strength
Ubuntu SDK meets snapcraft
Mir is not only about Unity8
Devuan, The Systemd-Free Debian Fork, Celebrates Its Second Birthday
Ubuntu is Prepping Its 16.04 “Rolling Hardware Enablement Kernel”
Rolling HWE Stacks for 16.04
Colin King: stress-ng 0.07.07 released
Timo Aaltonen: Mesa 12.0.4 backport available for testing
10 Desktop snaps written in November
Trisquel GNU/Linux 8.0 Alpha Is Now Available to Download
Harald Sitter: Snapping KDE Applications
Harald Sitter: KDE Framworks 5 Content Snap Techno
Zygmunt Krynicki: Ubuntu Core Gadget Snaps
A security update for Raspbian PIXEL
We mention some events:
BaDhack: 13th December 2016 – Basingstoke (well Chineham actually), England.
Basingstoke & Deane Makerspace is a new group looking to find like-minded people in the area of Basingstoke to form a new community and find a space in which we can meet and collaborate.
2nd Horsham Raspberry Jam: Sunday 11th December 2016 – Horsham, England.
Come and have fun leanring about and using Raspberry Pi, Arduinos, robotics, coding and electronics! Many interactive projects will be on show. Thanks to Gavin Hewins from HackHorsham for emailing us.
linux.conf.au 2017: 16 to 20 of January 2017 – Hobart, Australia.
linux.conf.au is a conference about the Linux operating system, and all aspects of the thriving ecosystem of Free and Open Source Software that has grown up around it.
FOSDEM 2017: 4 to 5 of February 2017 – Brussels, Belgium.
FOSDEM is a free event for software developers to meet, share ideas and collaborate.
This weeks cover image is taken from Wikipedia.
That’s all for this week! If there’s a topic you’d like us to discuss, or you have any feedback on previous shows, please send your comments and suggestions to email@example.com or Tweet us or Comment on our Facebook page or comment on our Google+ page or comment on our sub-Reddit.
Join us in the Ubuntu Podcast Chatter group on Telegram
A few weeks ago, I traveled to Bucharest, Romania for a busy week of work, planning the Ubuntu 17.04 (Zesty) cycle.I did have a Saturday and Sunday to myself, which I spent mostly walking around the beautiful, old city. After visiting the Romanian Athenaeum, I quite randomly stumbled into one truly unique experience. I passed a window shop for "Sir Ludovic Master Suit Maker" which somehow caught my eye.I travel quite a bit on business, and you'll typically find me wearing a casual sports coat, a button up shirt, nice jeans, cowboy boots, and sometimes cuff links. But occasionally, I feel a little under-dressed, especially in New York City, where a dashing suit still rules the room.Frankly, everything I know about style and fashion I learned from Derek Zoolander. Just kidding. Mostly.Anyway, I owned two suits. One that I bought in 2004, for that post-college streak of weddings, and a seersucker suit (which is dandy in New Orleans and Austin, but a bit irreverent for serious client meetings on Wall Street).So I stepped into Sir Ludovic, merely as a curiosity, and walked out with the most rewarding experience of my week in Romania. Augustin Ladar, the master tailor and proprietor of the shop, greeted me at the door. We then spent the better part of 3 hours, selecting every detail, from the fabrics, to the buttons, to the stylistic differences in the cut and the fit.Better yet, I absorbed a wealth of knowledge on style and fashion: when to wear blue and when to wear grey, why some people wear pin stripes and others wear checks, authoritative versus friendly style, European versus American versus Asian cuts, what the heck herringbone is, how to tell if the other guy is also wearing hand tailored attire, and so on...Augustin measured me for two custom tailored suits and two bespoke shirts, on a Saturday. I picked them up 6 days later on a Friday afternoon (paying a rush service fee).Wow. Simply, wow. Splendid Italian wool fabric, superb buttons, eye-catching color shifting inner linings, and an impeccably precise fit.I'm headed to New York for my third trip since, and I've never felt more comfortable and confident in these graceful, classy suits. A belated thanks to Augustin. Fabulous work!Cheers,Dustin
This is a guest post by Ryan Sipes, Community Manager at System76. If you would like to contribute a guest post, please contact firstname.lastname@example.org
Last week System76 engineers participated in a call with Martin Wimpress of the Ubuntu Desktop team to discuss HiDPI support in Ubuntu, specifically Unity 7. HiDPI support exists in Unity 7, but there are areas that could use improvement, and the call focused around those. The conversation was primarily focused around bugs that still remain in the out-of-the-box HiDPI experience; specifically around enabling automatic scaling and Ubuntu recognizing when a HiDPI display is present so that it can adjust accordingly.
This has become a focus of System76 as it has worked to provide a good experience for users purchasing their new 4K HiDPI displays now available on the Oryx Pro and BonoboWS laptops.
“With our HiDPI laptops, everything is twice as crisp; it’s like a high-quality printed magazine instead of a traditional computer display. The user interface is clearer, text is sharper, photos are more detailed, games are higher res, and videos can be viewed in full lifelike 4K. This is great whether you’re anyone from a casual computer user to a video editor producing high end content or a professional developer who wants a better display for your code editor.”, says Cassidy James Blaede, a developer at System76 and a co-founder of elementary OS, an Ubuntu-based distribution that has put a lot of work into HiDPI support. Cassidy recently wrote a blog post explaining HiDPI, diving into the specifics of how it works.
Some patches that improve HiDPI support are in review and they are expected to land in Ubuntu soon. In order to accelerate this process HiDPI bugs in Launchpad are being tagged accordingly and will make it easier for contributors to focus their efforts more easily. System76 will be contributing heavily to this process, but many other Ubuntu community members have expressed interest in contributing as well, so this will likely be a hot spot in the near future.
There is an empty chair at the conference table of business professionals, a not assigned place that increasingly demands for the presence of a new type of integration manager. The demands for an ever-increasing specialization, imposed by the modern world, are bringing out with great emphasis the need for an interdisciplinary professional who understands the demands of specialists and who is able to coordinate and to link actions and decisions. This need, often still ignored, is a direct result of the growing complexity of the modern world and the fast communications inside the network.
“Complexity” is undoubtedly the most suitable paradigm to characterize the historical and social model of today’s world, in which the interactions and connections between the various areas now form an inextricable network of relations. Since the ’60s and’ 70s a large group of scholars – including the chemist Ilya Prigogine and the physicist Murray Gell-Mann – began to study what would become a true Science of Complexity.
Yet this is not an entirely new concept: the term means “composed of several parts connected to each other and dependent on each other“, exactly as reality, nature, society, and the environment around us. A “complex” mode of thought integrates and considers all contexts, interconnections, interrelationships between the different realities as part of the vision.
What is professionalism? And who are professionals? What can define a professional? <…>
<Read More…[by Fabio Marzocca]>
From Linux kernel livepatches to encryption to ASLR to compiler optimizations and configuration hardening, we strive to ensure that Ubuntu 16.04 LTS is the most secure Linux distribution out of the box.These slides try to briefly explain:what we do to secure Ubuntuhow the underlying technology workswhen the features took effect in UbuntuI hope you find this slide deck informative and useful! The information herein is largely collected from the Ubuntu Security Features wiki page, where you can always find up to date information. Ubuntu 16.04 LTS Security Features from Dustin Kirkland Cheers,Dustin
UbuCon Europe 2016
If there is one defining aspect of Ubuntu, it's community. All around the world, community members and LoCo teams get together not just to work on Ubuntu, but also to teach, learn, and celebrate it. UbuCon Summit at SCALE was a great example of an event that was supported by the California LoCo Team, Canonical, and community members worldwide coming together to make an event that could host presentations on the newest developer technologies in Ubuntu, community discussion roundtables, and a keynote by Mark Shuttleworth, who answered audience questions thoughtfully, but also hung around in the hallway and made himself accessible to chat with UbuCon attendees.
Thanks to the Ubuntu Community Reimbursement Fund, the UbuCon Germany and UbuCon Paris coordinators were able to attend UbuCon Summit at SCALE, and we were able to compare notes, so to speak, as they prepared to expand by hosting the first UbuCon Europe in Germany this year. Thanks to the community fund, I also had the immense pleasure of attending UbuCon Europe. After I arrived, Sujeevan Vijayakumaran picked me up from the airport and we took the train to Essen, where we walked around the newly-opened Weihnachtsmarkt along with Philip Ballew and Elizabeth Joseph from Ubuntu California. I acted as official menu translator, so there were no missed opportunities for bratwurst, currywurst, glühwein, or beer. Happily fed, we called it a night and got plenty of sleep so that we would last the entire weekend long.
UbuCon Europe was a marvelous experience. Friday started things off with social events so everyone could mingle and find shared interests. About 25 people attended the Zeche Zollverein Coal Mine Industrial Complex for a guided tour of the last operating coal extraction and processing site in the Ruhr region and was a fascinating look at the defining industry of the Ruhr region for a century. After that, about 60 people joined in a special dinner at Unperfekthaus, a unique location that is part creative studio, part art gallery, part restaurant, and all experience. With a buffet and large soda fountains and hot coffee/chocolate machine, dinner was another chance to mingle as we took over a dining room and pushed all the tables together in a snaking chain. It was there that some Portuguese attendees first recognized me as the default voice for uNav, which was something I had to get used to over the weekend. There's nothing like a good dinner to get people comfortable together, and the Telegram channel that was established for UbuCon Europe attendees was spread around.
The main event began bright and early on Saturday. Attendees were registered on the fifth floor of Unpefekthaus and received their swag bags full of cool stuff from the event sponsors. After some brief opening statements from Sujeevan, Marcus Gripsgård announced an exciting new Kickstarter campaign that will bring an easier convergence experience to not just most Ubuntu phones, but many Android phones as well. Then, Jane Silber, the CEO of Canonical, gave a keynote that went into detail about where Canonical sees Ubuntu in the future, how convergence and snaps will factor into future plans, and why Canonical wants to see one single Ubuntu on the cloud, server, desktop, laptop, tablet, phone, and Internet of Things. Afterward, she spent some time answering questions from the community, and she impressed me with her willingness to answer questions directly. Later on, she was chatting with a handful of people and it was great to see the consideration and thought she gave to those answers as well. Luckily, she also had a little time to just relax and enjoy herself without the third degree before she had to leave later that day. I was happy to have a couple minutes to chat with her.
Microsoft Deutschland GmbH sent Malte Lantin to talk about Bash on Ubuntu on Windows and how the Windows Subsystem for Linux works, and while jokes about Microsoft and Windows were common all weekend, everyone kept their sense of humor and the community showed the usual respect that’s made Ubuntu so wonderful. While being able to run Ubuntu software natively on Windows makes many nervous, it also excites others. One thing is for sure: it’s convenient, and the prospect of having a robust terminal emulator built right in to Windows seemed to be something everyone could appreciate.
After that, I ate lunch and gave my talk, Advocacy for Advocates, where I gave advice on how to effectively recommend Ubuntu and other Free Software to people who aren’t currently using it or aren’t familiar with the concept. It was well-attended and I got good feedback. I also had a chance to speak in German for a minute, as the ambiguity of the term Free Software in English disappears in German, where freies Software is clear and not confused with kostenloses Software. It’s a talk I’ve given before and will definitely give again in the future.
After the talks were over, there was a raffle and then a UbuCon quiz show where the audience could win prizes. I gave away signed copies of my book, Beginning Ubuntu for Windows and Mac Users, in the raffle, and in fact I won a “xenial xeres” USB drive that looks like an origami squirrel as well as a Microsoft t-shirt. Afterwards was a dinner that was not only delicious with apple crumble for desert, but also free beer and wine, which rarely detracts from any meal.
Sunday was also full of great talks. I loved Marcos Costales’s talk on uNav, and as the video shows, I was inspired to jump up as the talk was about to begin and improvise the uNav-like announcement “You have arrived at the presentation.” With the crowd warmed up from the joke, Marcos took us on a fascinating journey of the evolution of uNav and finished with tips and tricks for using it effectively. I also appreciated Olivier Paroz’s talk about Nextcloud and its goals, as I run my own Nextcloud server. I was sure to be at the UbuCon Europe feedback and planning roundtable and was happy to hear that next year UbuCon Europe will be held in Paris. I’ll have to brush up on my restaurant French before then!
That was the end of UbuCon, but I hadn’t been to Germany in over 13 years so it wasn’t the end of my trip! Sujeevan was kind enough to put up with me for another four days, and he accompanied me on a couple shopping trips as well as some more sightseeing. The highlight was a trip to the Neanderthal Museum in the aptly-named Neandertal, Germany, and then afterward we met his friend (and UbuCon registration desk volunteer!) Philipp Schmidt in Düsseldorf at their Weihnachtsmarkt, where we tried the Feuerzangenbowle, where mulled wine is improved by soaking a block of sugar in rum, then putting it over the wine and lighting the sugarloaf on fire to drip into the wine. After that, we went to the Brauerei Schumacher where I enjoyed not only Schumacher Alt beer, but also the Rhein-style sauerbraten that has been on my to-do list for a decade and a half. (Other variations of sauerbraten—not to mention beer—remain on the list!)
I’d like to thank Sujeevan for his hospitality on top of the tremendous job that he, the German LoCo, and the French LoCo exerted to make the first UbuCon Europe a stunning success. I’d also like to thank everyone who contributed to the Ubuntu Community Reimbursement Fund for helping out with my travel expenses, and everyone who attended, because of course we put everything together for you to enjoy.
The LXD and AppArmor teams have been working to support loading AppArmor policies inside LXD containers for a while. This support which finally landed in the latest Ubuntu kernels now makes it possible to install snap packages.
Snap packages are a new way of distributing software, directly from the upstream and with a number of security features wrapped around them so that these packages can’t interfere with each other or cause harm to your system.
There are a lot of moving pieces to get all of this working. The initial enablement was done on Ubuntu 16.10 with Ubuntu 16.10 containers, but all the needed bits are now progressively being pushed as updates to Ubuntu 16.04 LTS.
The easiest way to get this to work is with:
Ubuntu 16.10 host
Stock Ubuntu kernel (4.8.0)
Stock LXD (2.4.1 or higher)
Ubuntu 16.10 container with “squashfuse” manually installed in it
Installing the nextcloud snap
First, lets get ourselves an Ubuntu 16.10 container with “squashfuse” installed inside it.
lxc launch ubuntu:16.10 nextcloud
lxc exec nextcloud -- apt update
lxc exec nextcloud -- apt dist-upgrade -y
lxc exec nextcloud -- apt install squashfuse -y
And then, lets install that “nextcloud” snap with:
lxc exec nextcloud -- snap install nextcloud
Finally, grab the container’s IP and access “http://<IP>” with your web browser:
stgraber@castiana:~$ lxc list nextcloud
| NAME | STATE | IPV4 | IPV6 |
| nextcloud | RUNNING | 10.148.195.47 (eth0) | fd42:ee2:5d34:25c6:216:3eff:fe86:4a49 (eth0) |
Installing the LXD snap in a LXD container
First, lets get ourselves an Ubuntu 16.10 container with “squashfuse” installed inside it.
This time with support for nested containers.
lxc launch ubuntu:16.10 lxd -c security.nesting=true
lxc exec lxd -- apt update
lxc exec lxd -- apt dist-upgrade -y
lxc exec lxd -- apt install squashfuse -y
Now lets clear the LXD that came pre-installed with the container so we can replace it by the snap.
lxc exec lxd -- apt remove --purge lxd lxd-client -y
Because we already have a stable LXD on the host, we’ll make things a bit more interesting by installing the latest build from git master rather than the latest stable release:
lxc exec lxd -- snap install lxd --edge
The rest is business as usual for a LXD user:
stgraber@castiana:~$ lxc exec lxd bash
root@lxd:~# lxd init
Name of the storage backend to use (dir or zfs) [default=dir]:
We detected that you are running inside an unprivileged container.
This means that unless you manually configured your host otherwise,
you will not have enough uid and gid to allocate to your containers.
LXD can re-use your container's own allocation to avoid the problem.
Doing so makes your nested containers slightly less safe as they could
in theory attack their parent container and gain more privileges than
they otherwise would.
Would you like to have your containers share their parent's allocation (yes/no) [default=yes]?
Would you like LXD to be available over the network (yes/no) [default=no]?
Would you like stale cached images to be updated automatically (yes/no) [default=yes]?
Would you like to create a new network bridge (yes/no) [default=yes]?
What should the new bridge be called [default=lxdbr0]?
What IPv4 subnet should be used (CIDR notation, “auto” or “none”) [default=auto]?
What IPv6 subnet should be used (CIDR notation, “auto” or “none”) [default=auto]?
LXD has been successfully configured.
root@lxd:~# lxd.lxc launch images:archlinux arch
If this is your first time using LXD, you should also run: sudo lxd init
To start your first container, try: lxc launch ubuntu:16.04
root@lxd:~# lxd.lxc list
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
| arch | RUNNING | 10.106.137.64 (eth0) | fd42:2fcd:964b:eba8:216:3eff:fe8f:49ab (eth0) | PERSISTENT | 0 |
And that’s it, you now have the latest LXD build installed inside a LXD container and running an archlinux container for you. That LXD build will update very frequently as we publish new builds to the edge channel several times a day.
It’s great to have snaps now install properly inside LXD containers. Production users can now setup hundreds of different containers, network them the way they want, setup their storage and resource limits through LXD and then install snap packages inside them to get the latest upstream releases of the software they want to run.
That’s not to say that everything is perfect yet. This is all built on some really recent kernel work, using unprivileged FUSE filesystem mounts and unprivileged AppArmor profile stacking and namespacing. There very likely still are some issues that need to get resolved in order to get most snaps to work identically to when they’re installed directly on the host.
If you notice discrepancies between a snap running directly on the host and a snap running inside a LXD container, you’ll want to look at the “dmesg” output, looking for any DENIED entry in there which would indicate AppArmor rejecting some request from the snap.
This typically indicates either a bug in AppArmor itself or in the way the AppArmor profiles are generated by snapd. If you find one of those issues, you can report it in #snappy on irc.freenode.net or file a bug at https://launchpad.net/snappy/+filebug so it can be investigated.
More information on snap packages can be found at: http://snapcraft.io
The main LXD website is at: https://linuxcontainers.org/lxd
Development happens on Github at: https://github.com/lxc/lxd
Mailing-list support happens on: https://lists.linuxcontainers.org
IRC support happens in: #lxcontainers on irc.freenode.net
Try LXD online: https://linuxcontainers.org/lxd/try-it
Welcome to the Ubuntu Weekly Newsletter. This is issue #490 for the week November 28 – December 4, 2016, and the full version is available here.
In this issue we cover:
Taking a stand against unofficial Ubuntu images
Zygmunt Krynicki: Ubuntu Core Gadget Snaps
Harald Sitter: Snapping KDE Applications
Ubuntu Phone News
In The Blogosphere
Other Articles of Interest
Featured Audio and Video
Weekly Ubuntu Development Team Meetings
Upcoming Meetings and Events
Updates and Security for 12.04, 14.04, 16.04 and 16.10
And much more!
The issue of The Ubuntu Weekly Newsletter is brought to you by:
Elizabeth K. Joseph
And many others
If you have a story idea for the Weekly Newsletter, join the Ubuntu News Team mailing list and submit it. Ideas can also be added to the wiki!
Except where otherwise noted, content in this issue is licensed under a Creative Commons Attribution 3.0 License BY SA Creative Commons License
Again if you missed it, IronFunctions is open-source, lambda compatible, on-premise, language agnostic, server-less compute service.
While AWS Lambda only supports Java, Python and Node.js, Iron Functions allows you to use any language you desire by running your code in containers.
With Microsoft being one of the biggest players in open source and .NET going cross-platform it was only right to add support for it in the IronFunctions's fn tool.
The following demos a .NET function that takes in a URL for an image and generates a MD5 checksum hash for it:
Using dotnet with functions
Make sure you downloaded and installed dotnet. Now create an empty dotnet project in the directory of your function:
By default dotnet creates a Program.cs file with a main method. To make it work with IronFunction's fn tool please rename it to func.cs.
mv Program.cs func.cs
Now change the code as you desire to do whatever magic you need it to do. In our case the code takes in a URL for an image and generates a MD5 checksum hash for it. The code is the following:
public class Program
public static void Main(string args)
// if nothing is being piped in, then exit
var input = Console.In.ReadToEnd();
var stream = DownloadRemoteImageFile(input);
var hash = CreateChecksum(stream);
private static bool IsPipedInput()
bool isKey = Console.KeyAvailable;
private static byte DownloadRemoteImageFile(string uri)
var request = System.Net.WebRequest.CreateHttp(uri);
var response = request.GetResponseAsync().Result;
var stream = response.GetResponseStream();
using (MemoryStream ms = new MemoryStream())
private static string CreateChecksum(byte stream)
using (var md5 = MD5.Create())
var hash = md5.ComputeHash(stream);
var sBuilder = new StringBuilder();
// Loop through each byte of the hashed data
// and format each one as a hexadecimal string.
for (int i = 0; i < hash.Length; i++)
// Return the hexadecimal string.
IO with an IronFunction is done via stdin and stdout. This code
Using with IronFunctions
Let's first init our code to become IronFunctions deployable:
fn init <username>/<funcname>
Since IronFunctions relies on Docker to work (we will add rkt support soon) the <username> is required to publish to docker hub. The <funcname> is the identifier of the function.
In our case we will use dotnethash as the <funcname>, so the command will look like:
fn init seiflotfy/dotnethash
When running the command it will create the func.yaml file required by functions, which can be built by running:
Push to docker
This will create a docker image and push the image to docker.
Publishing to IronFunctions
To publish to IronFunctions run ...
fn routes create <app_name>
where <app_name> is (no surprise here) the name of the app, which can encompass many functions.
This creates a full path in the form of http://<host>:<port>/r/<app_name>/<function>
In my case, I will call the app myapp:
fn routes create myapp
Now you can
fn call <app_name> <funcname>
So in my case
echo http://lorempixel.com/1920/1920/ | fn call myapp /dotnethash
curl -X POST -d 'http://lorempixel.com/1920/1920/' http://localhost:8080/r/myapp/dotnethash
You can find the whole code in the examples on GitHub. Feel free to join the Iron.io Team on Slack.
Feel free to write your own examples in any of your favourite programming languages such as Lua or Elixir and create a PR :)
In the previous post on Snapping KDE Applications we looked at the high-level implication and use of the KDE Frameworks 5 content snap to snapcraft snap bundles for binary distribution. Today I want to get a bit more technical and look at the actual building and inner workings of the content snap itself.
The KDE Frameworks 5 snap is a content snap. Content snaps are really just ordinary snaps that define a content interface. Namely, they expose part or all of their file tree for use by another snap but otherwise can be regular snaps and have their own applications etc.
KDE Frameworks 5’s snap is special in terms of size and scope. The whole set of KDE Frameworks 5, combined with Qt 5, combined with a large chunk of the graphic stack that is not part of the ubuntu-core snap. All in all just for the Qt5 and KF5 parts we are talking about close to 100 distinct source tarballs that need building to compose the full frameworks stack. KDE is in the fortunate position of already having builds of all these available through KDE neon. This allows us to simply repack existing work into the content snap. This is for the most part just as good as doing everything from scratch, but has the advantage of saving both maintenance effort and build resources.
I do love automation, so the content snap is built by some rather stringy proof of concept code that automatically translates the needed sources into a working snapcraft.yaml that repacks the relevant KDE neon debs into the content snap.
Looking at this snapcraft.yaml we’ll find some fancy stuff.
After the regular snap attributes the actual content-interface is defined. It’s fairly straight forward and simply exposes the entire snap tree as kde-frameworks-5-all content. This is then used on the application snap side to find a suitable content snap so it can access the exposed content (i.e. in our case the entire file tree).
The parts of the snap itself are where the most interesting things happen. To make things easier to read and follow I’ll only show the relevant excerpts.
The content snap consists of the following parts: kf5, kf5-dev, breeze, plasma-integration.
The kf5 part is the meat of the snap. It tells snapcraft to stage the binary runtime packages of KDE Frameworks 5 and Qt 5. This effectively makes snapcraft pack the named debs along with necessary dependencies into our snap.
The kf5-dev part looks almost like the kf5 part but has entirely different functionality. Instead of staging the runtime packages it stages the buildtime packages (i.e. the -dev packages). It additionally has a tricky snap rule which excludes everything from actually ending up in the snap. This is a very cool tricky, this effectively means that the buildtime packages will be in the stage and we can build other parts against them, but we won’t have any of them end up in the final snap. After all, they would be entirely useless there.
Besides those two we also build two runtime integration parts entirely from scratch breeze and plasma-integration. They aren’t actually needed, but ensure sane functionality in terms of icon theme selection etc. These are ordinary build parts that simply rely on the kf5 and kf5-dev parts to provide the necessary dependencies.
An important question to ask here is how one is meant to build against this now. There is this kf5-dev part, but it does not end up in the final snap where it would be entirely useless anyway as snaps are not used at buildtime. The answer lies in one of the rigging scripts around this. In the snapcraft.yaml we configured the kf5-dev part to stage packages but then excluded everything from being snapped. However, knowing how snapcraft actually goes about its business we can “abuse” its inner workings to make use of the part after all. Before the actual snap is created snapcraft “primes” the snap, this effectively means that all installed trees (i.e. the stages) are combined into one tree (i.e. the primed tree), the exclusion rule of the kf5-dev part is then applied on this tree. Or in other words: the primed tree is the snap before exclusion was applied. Meaning the primed tree is everything from all parts, including the development headers and CMake configs. We pack this tree in a development tarball which we then use on the application side to stage a development environment for the KDE Frameworks 5 snap.
Specifically on the application-side we use a boilerplate part that employs the same trick of stage-everything but snap-nothing to provide the build dependencies while not having anything end up in the final snap.
Using the KDE Framworks 5 content snap KDE can create application snaps that are a fraction of the size they would be if they contained all dependencies themselves. While this does give up optimization potential by aggregating requirements in a more central fashion it quickly starts paying off given we are saving upwards of 70 MiB per snap.
Application snaps can of course still add more stuff on top or even override things if needed.
Finally, as we approach the end of the year, we begin the season of giving. What would suit the holidays better than giving to the entire world by supporting KDE with a small donation?
Catalan LoCo Team celebrated on November 5th a release party of the next Ubuntu version, in that case, 16.10 Xenial Xerus, in Ripoll, such a historical place. As always, we started explaining what Ubuntu is and how it adapts to new times and devices.
FreeCad 3D design and Games were both present at the party.
A few weeks later, in December 3rd, we did another release party, this time in Barcelona.
We went to Soko, previously a chocolate factory, that nowadays is a kind of Makers Lab, very excited about free software. First, Josep explained the current developments in Ubuntu and we carried some installations on laptops.
We ate some pizza and had discussions about free software on public administrations. Apart from the usual users who came to install Ubuntu on their computers, the responsible from Soko gave us 10 laptops for Ubuntu installation too. We ended the tasks installing Wine for some Lego to run.
That’s some art that is being made at Soko.
I’m releasing that post because we need some documentation on release parties. If you need some advice on how to manage a release party, you can contact me or anyone in Ubuntu community.
As the name implies, “service-learning is an educational approach that combines learning objectives with community service in order to provide a pragmatic, progressive learning experience while meeting societal needs” (Wikipedia). When you add the “community” part to that definition it changes to, “about leadership development as well as traditional information and skill acquisition” (Janet 1999).
How does this apply to Open * communities?
Simple! Community service learning is an ideal way to get middle/high school/college students to get involved within the various communities and understand the power of Open *. And also to stay active after their term of community service learning.
This idea came to me just today (as of writing, Nov. 30th) as a thought on what is really Open *. Not the straightforward definition of it but the the affect Open * creates. As I stated on my home page of my site, Open * creates a sense of empowerment. One way is through the actions that create skills and improvements to those skills. Which skills are those? Mozilla Learning made a map and description to these skills on their Web Literacy pages. They are show below also:
Most of these skills along with the ways to gain these skills (read, write, participate) can be used as skills to worked on for community service learning.
As stated above, community service learning is really the focus of gaining skills and leadership skills while (in the Open * sense) contribute to projects that impacts the society of the world. This is really needed now as there are many local and world issues that Open * can provide solutions too.
I see this as an outreach program for schools and the various organizations/groups such as Ubuntu, System76, Mozilla, and even Linux Padawan. Unlike Google Summer of Code (GSoC), no one receives a stipend but the idea of having a mentor could be taken from GSoC. No, not could but should. Because the student needs someone to guide them, hence Linux Padawan could benefit from this idea.
Having that said, I will try to work out a sample program that could be used and maybe test it with Linux Padawan. Maybe I could have this ready by spring semester.
Random Fact #1: Simon Quigley, through his middle school, is in a way already doing this type of learning.
Random Fact #2: At one point of time, I wanted to translate that Web Literacy map into one that can be applied to Open *, not just one topic.
Releasing ISV applications on Linux is often hard. The ABI of all the libraries you need changes seemingly weekly. Hence you have the option of bundling the world, or building a thousand releases to cover a thousand distribution versions. As a case in point, when MonoDevelop started bundling a C Git library instead of using a C# git implementation, it gained dependencies on all sorts of fairly weak ABI libraries whose exact ABI mix was not consistent across any given pair of distro releases. This broke our policy of releasing “works on anything” .deb and .rpm packages. As a result, I pretty much gave up on packaging MonoDevelop upstream with version 5.10.
Around the 6.1 release window, I decided to take re-evaluate question. I took a closer look at some of the fancy-pants new distribution methods that get a lot of coverage in the Linux press: Snap, AppImage, and Flatpak.
I started with AppImage. It’s very good and appealing for its specialist areas (no external requirements for end users), but it’s kinda useless at solving some of our big areas (the ABI-vs-bundling problem, updating in general).
Next, I looked at Flatpak (once xdg-app). I liked the concept a whole lot. There’s a simple 3-tier dependency hierarchy: Applications, Runtimes, and Extensions. An application depends on exactly one runtime. Runtimes are root-level images with no dependencies of their own. Extensions are optional add-ons for applications. Anything not provided in your target runtime, you bundle. And an integrated updates mechanism allows for multiple branches and multiple releases parallel-installed (e.g. alpha & stable, easily switched).
There’s also security-related sandboxing features, but my main concerns on a first examination were with the dependency and distribution questions. That said, some users might be happier running Microsoft software on their Linux desktop if that software is locked up inside a sandbox, so I’ve decided to embrace that functionality rather than seek to avoid it.
I basically stopped looking at this point (sorry Snap!). Flatpak provided me with all the functionality I wanted, with an extremely helpful and responsive upstream. I got to work on trying to package up MonoDevelop.
Flatpak (optionally!) uses a JSON manifest for building stuff. Because Mono is still largely stuck in a Gtk+2 world, I opted for the simplest runtime, org.freedesktop.Runtime, and bundled stuff like Gtk+ into the application itself.
Some gentle patching here & there resulted in this repository. Every time I came up with an exciting new edge case, upstream would suggest a workaround within hours – or failing that, added new features to Flatpak just to support my needs (e.g. allowing /dev/kvm to optionally pass through the sandbox).
The end result is, as of the upcoming 0.8.0 release of Flatpak, from a clean install of the flatpak package to having a working MonoDevelop is a single command: flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref
For the current 0.6.x versions of Flatpak, the user also needs to flatpak remote-add --user --from gnome https://sdk.gnome.org/gnome.flatpakrepo first – this step will be automated in 0.8.0. This will download org.freedesktop.Runtime, then com.xamarin.MonoDevelop; export icons ‘n’ stuff into your user environment so you can just click to start.
There’s some lingering experience issues due the sandbox which are on my radar. “Run on external console” doesn’t work, for example, or “open containing folder”. There are people working on that (a missing DBus# feature to allow breaking out of the sandbox). But overall, I’m pretty happy. I won’t be entirely satisfied until I have something approximating feature equivalence to the old .debs. I don’t think that will ever quite be there, since there’s just no rational way to allow arbitrary /usr stuff into the sandbox, but it should provide a decent basis for a QA-able, supportable Linux MonoDevelop. And we can use this work as a starting point for any further fancy features on Linux.
So much for my monthly blogging! Here’s what I have been up to in the Open Source world over the last 6 months.
Uploaded a new version of the debian-multimedia blends metapackages
Uploaded the latest abcmidi
Uploaded the latest node-process-nextick-args
Prepared version 1.0.2 of libdrumstick for experimental, as a first step for the transition. It was sponsored by James Cowgill.
Prepared a new node-inline-source-map package, which was sponsored by Gianfranco Costamagna.
Uploaded kmetronome to experimental as part of the libdrumstick transition.
Prepared a new node-js-yaml package, which was sponsored by Gianfranco Costamagna.
Uploaded version 4.2.4 of Gramps.
Prepared a new version of vmpk which I am going to adopt, as part of the libdrumstick transition. I tried splitting the documentation into a separate package, but this proved difficult, and in the end I missed the transition freeze deadline for Debian Stretch.
Prepared a backport of Gramps 4.2.4, which was sponsored by IOhannes m zmölnig as Gramps is new for jessie-backports.
Began a final push to get kosmtik packaged and into the NEW queue before the impending Debian freeze for Stretch. Unfortunately, many dependencies need updating, which also depend on packages not yet in Debian. Also pushed to finish all the new packages for node-tape, which someone else has decided to take responsibility for.
Uploaded node-cross-spawn-async to fix a Release Critical bug.
Prepared a new node-chroma-js package, but this is unfortunately blocked by several out of date & missing dependencies.
Prepared a new node-husl package, which was sponsored by Gianfranco Costamagna.
Prepared a new node-resumer package, which was sponsored by Gianfranco Costamagna.
Prepared a new node-object-inspect package, which was sponsored by Gianfranco Costamagna.
Removed node-string-decoder from the archive, as it was broken and turned out not to be needed anymore.
Uploaded a fix for node-inline-source-map which was failing tests. This turned out to be due to node-tap being upgraded to version 8.0.0. Jérémy Lal very quickly provided a fix in the form of a Pull Request upstream, so I was able to apply the same patch in Debian.
Prepared a merge of the latest blends package from Debian in order to be able to merge the multimedia-blends package later. This was sponsored by Daniel Holbach.
Prepared an application to become an Ubuntu Contributing Developer. Unfortunately, this was later declined. I was completely unprepared for the Developer Membership Board meeting on IRC after my holiday. I had had no time to chase for endorsements from previous sponsors, and the application was not really clear about the fact that I was not actually applying for upload permission yet. No matter, I intend to apply again later once I have more evidence & support on my application page.
Added my blog to Planet Ubuntu, and this will hopefully be the first post that appears there.
Prepared a merge of the latest debian-multimedia blends meta-package package from Debian. In Ubuntu Studio, we have the multimedia-puredata package seeded so that we get all the latest Puredata packages in one go. This was sponsored by Michael Terry.
Prepared a backport of Ardour as part of the Ubuntu Studio plan to do regular backports. This is still waiting for sponsorship if there is anyone reading this that can help with that.
Did a tweak to the Ubuntu Studio seeds and prepared an update of the Ubuntu Studio meta-packages. However, Adam Conrad did the work anyway as part of his cross-flavour release work without noticing my bug & request for sponsorship. So I closed the bug.
Updated the Ubuntu Studio wiki to expand on the process for updating our seeds and meta-packages. Hopefully, this will help new contributors to get involved in this area in the future.
Took part in the testing and release of the Ubuntu Studio Trusty 14.04.5 point release.
Took part in the testing and release of the Ubuntu Studio Yakkety Beta 1 release.
Prepared a backport of Ansible but before I could chase up what to do about the fact that ansible-fireball was no longer part of the Ansible package, some one else did the backport without noticing my bug. So I closed the bug.
Prepared an update of the Ubuntu Studio meta-packages. This was sponsored by Jeremy Bicha.
Prepared an update to the ubuntustudio-default-settings package. This switched the Ubuntu Studio desktop theme to Numix-Blue, and reverted some commits to drop the ubuntustudio-lightdm-theme package fom the archive. This had caused quite a bit of controversy and discussion on IRC due to the transition being a little too close to the release date for Yakkety. This was sponsored by Iain Lane (Laney).
Prepared the Numix Blue update for the ubuntustudio-lightdm-theme package. This was also sponsored by Iain Lane (Laney). I should thank Krytarik here for the initial Numix Blue theme work here (on the lightdm theme & default settings packages).
Provided a patch for gfxboot-theme-ubuntu which has a bug which is regularly reported during ISO testing, because the “Try Ubuntu Studio without installing” option was not a translatable string and always appeared in English. Colin Watson merged this, so hopefully it will be translated by the time of the next release.
Took part in the testing and release of the Ubuntu Studio Yakkety 16.10 release.
After a hint from Jeremy Bicha, I prepared a patch that adds a desktop file for Imagemagick to the ubuntustudio-default-settings package. This will give us a working menu item in Ubuntu Studio whilst we wait for the bug to be fixed upstream in Debian. Next month I plan to finish the ubuntustudio-lightdm-theme, ubuntustudio-default-settings transition, including dropping ubuntustudio-lightdm-theme from the Ubuntu Studio seeds. I will include this fix at the same time.
At other times when I have had a spare moment, I have been working on resurrecting my old Family History website. It was originally produced in my Windows XP days, and I was no longer able to edit it in Linux. I decided to convert it to Jekyll. First I had to extract the old HTML from where the website is hosted using the HTTrack Website Copier. Now, I am in the process of switching the structure to the standard Jekyll template approach. I will need to switch to a nice Jekyll based theme, as as the old theming was pretty complex. I pushed the code to my Github repository for safe keeping.
Plan for December
Before the 5th January 2017 Debian Stretch soft freeze I hope to:
Ensure node-tape makes it through into Stretch.
Work on all the dependencies needed to get kosmtik into Stretch.
Convert Cree.py from QT4 to QT5 to allow it to re-enter Stretch.
Add the Ubuntu Studio Manual Testsuite to the package tracker, and try to encourage some testing of the newest versions of our priority packages.
Finish the ubuntustudio-lightdm-theme, ubuntustudio-default-settings transition including an update to the ubuntustudio-meta packages.
Reapply to become a Contributing Developer.
Start working on an Ubuntu Studio package tracker website so that we can keep an eye on the status of the packages we are interested in.
Continue working to convert my Family History website to Jekyll.
Try and resurrect my old Gammon one-name study Drupal website from a backup and push it to the new GoONS Website project.