I've been struggling with replacing parts of my old sysadmin
monitoring toolkit (previously built with Nagios, Munin and Smokeping)
with more modern tools (specifically Prometheus, its "exporters" and
Grafana) for a while now.
Replacing Munin with Prometheus and Grafana is fairly straightforward:
the network architecture ("server pulls metrics from all nodes") is
similar and there are lots of exporters. They are a little harder to
write than Munin modules, but that makes them more flexible and
efficient, which was a huge problem in Munin. I wrote a Migrating
from Munin guide that summarizes those differences. Replacing
Nagios is much harder, and I still haven't quite figured out if it's
worth it.
How does Smokeping work
Leaving those two aside for now, I'm left with Smokeping, which I used
in my previous job to diagnose routing issues, using Smokeping as a
decentralized looking glass, which was handy to debug long term
issues. Smokeping is a strange animal: it's fundamentally similar to
Munin, except it's harder to write plugins for it, so most people just
use it for Ping, something for which it excels at.
Its trick is this: instead of doing a single ping and returning this
metrics, it does multiple ones and returns multiple
metrics. Specifically, smokeping will send multiple ICMP packets (20
by default), with a low interval (500ms by default) and a single
retry. It also pings multiple hosts at once which means it can
quickly scan multiple hosts simultaneously. You therefore see network
conditions affecting one host reflected in further hosts down (or up)
the chain. The multiple metrics also mean you can draw graphs with
"error bars" which Smokeping shows as "smoke" (hence the name). You
also get per-metric packet loss.
Basically, smokeping runs this command and collects the output in a
RRD database:
$mininterval is 0.01s (minimum wait interval between any target)
$hostinterval is 1.5s (minimum wait between probes on a single target)
It can also override stuff like the source address and TOS
fields. This probe will complete between 30 and 60 seconds, if my math
is right (0% and 100% packet loss).
How do draw Smokeping graphs in Grafana
A naive implementation of Smokeping in Prometheus/Grafana would be to
use the blackbox exporter and create a dashboard displaying those
metrics. I've done this at home, and then I realized that I was
missing something. Here's what I did.
install the blackbox exporter:
apt install prometheus-blackbox-exporter
make sure to allow capabilities so it can ping:
dpkg-reconfigure prometheus-blackbox-exporter
hook monitoring targets into prometheus.yml (the default blackbox
exporter configuration is fine):
Notice how we lower the scrape_interval to 5 seconds to get more
samples. nexthop.anarc.at was added into DNS to avoid hardcoding
my upstream ISP's IP in my configuration.
use this Grafana panel to graph the results. It was created
with this query:
sum(probe_icmp_duration_seconds phase="rtt" ) by (instance)
Set the Legend field to instance RTT
Set Draw modes to lines and Mode options to staircase
Set the Left Y axis Unit to duration(s)
Show the LegendAs table, with Min, Avg, Max and
Current enabled
Then this query, for packet loss:
1-avg_over_time(probe_success[$__interval])!=0 or null
Set the Legend field to instance packet loss
Set a Add series override to Lines: false, Null point mode:
null, Points: true, Points Radius: 1, Color: deep red,
and, most importantly, Y-axis: 2
Set the Right Y axis Unit to percent (0.0-1.0) and set
Y-max to 1
Then set the entire thing to Repeat, on target,
vertically. And you need to add a target variable like
label_values(probe_success, instance).
The result looks something like this:
Not bad, but not Smokeping
This actually looks pretty good! The resulting dashboard is available
in the Grafana dashboard repository.
What is missing?
Now, that doesn't exactly look like Smokeping, does it. It's pretty
good, but it's not quite what we want. What is missing is variance,
the "smoke" in Smokeping.
There's a good article about replacing Smokeping with
Grafana. They wrote a custom script to write samples into InfluxDB
so unfortunately we can't use it in this case, since we don't have
InfluxDB's query language. I couldn't quite figure out how to do the
same in PromQL. I tried:
The first two give zero for all samples. The latter works, but doesn't
look as good as Smokeping. So there might be something I'm missing.
SuperQ wrote a special exporter for this called
smokeping_prober that came out of this discussion in the blackbox
exporter. Instead of delegating scheduling and target definition
to Prometheus, the targets are set in the exporter.
They also take a different approach than Smokeping: instead of
recording the individual variations, they delegate that to Prometheus,
through the use of "buckets". Then they use a query like this:
Yes, I know about smokeping's bursts of pings. IMO, smokeping's data
model is flawed that way. This is where I intentionally deviated
from the smokeping exact way of doing things. This prober sends a
smooth, regular series of packets in order to be measuring at
regular controlled intervals.
Instead of 20 packets, over 10 seconds, every minute. You send one
packet per second and scrape every 15. This has the same overall
effect, but the measurement is, IMO, more accurate, as it's a
continuous stream. There's no 50 second gap of no metrics about the
ICMP stream.
Also, you don't get back one metric for those 20 packets, you get
several. Min, Max, Avg, StdDev. With the histogram data, you can
calculate much more than just that using the raw data.
For example, IMO, avg and max are not all that useful for continuous
stream monitoring. What I really want to know is the 90th percentile
or 99th percentile.
This smokeping prober is not intended to be a one-to-one replacement
for exactly smokeping's real implementation. But simply provide
similar functionality, using the power of Prometheus and PromQL to
make it better.
[...]
one of the reason I prefer the histogram datatype, is you can use
the heatmap panel type in Grafana, which is superior to the
individual min/max/avg/stddev metrics that come from smokeping.
Say you had two routes, one slow and one fast. And some pings are
sent over one and not the other. Rather than see a wide min/max
equaling a wide stddev, the heatmap would show a "line" for both
routes.
That's an interesting point. I have also ended up adding a heatmap
graph to my dashboard, independently. And it is true it shows those
"lines" much better... So maybe that, if we ignore legacy, we're
actually happy with what we get, even with the plain blackbox
exporter.
So yes, we're missing pretty "fuzz" lines around the main lines, but
maybe that's alright. It would be possible to do the equivalent to
the InfluxDB hack, with queries like:
The output looks something like this:
Looks more like Smokeping!
But there's a problem there: see how the middle graph "dips" sometimes
below 20ms? That's the min_over_time function (incorrectly, IMHO)
returning zero. I haven't quite figured out how to fix that, and I'm
not sure it is better. But it does look more like Smokeping than the
previous graph.
Update: I forgot to mention one big thing that this setup is
missing. Smokeping has this nice feature that you can order and group
probe targets in a "folder"-like hierarchy. It is often used to group
probes by location, which makes it easier to scan a lot of
targets. This is harder to do in this setup. It might be possible to
setup location-specific "jobs" and select based on that, but it's not
exactly the same.
Welcome to the May 2020 report from the Reproducible Builds project.
One of the original promises of open source software is that distributed peer review and transparency of process results in enhanced end-user security. Nonetheless, whilst anyone may inspect the source code of free and open source software for malicious flaws, almost all software today is distributed as pre-compiled binaries. This allows nefarious third-parties to compromise systems by injecting malicious code into seemingly secure software during the various compilation and distribution processes.
In these reports we outline the most important things that we and the rest of the community have been up to over the past month.
Recent years saw a number of supply chain attacks that leverage the increasing use of open source during software development, which is facilitated by dependency managers that automatically resolve, download and install hundreds of open source packages throughout the software life cycle.
In related news, the LineageOS Android distribution announced that a hacker had access to the infrastructure of their servers after exploiting an unpatched vulnerability.
Marcin Jachymiak of the Sia decentralised cloud storage platform posted on their blog that their siac and siad utilities can now be built reproducibly:
This means that anyone can recreate the same binaries produced from our official release process. Now anyone can verify that the release binaries were created using the source code we say they were created from. No single person or computer needs to be trusted when producing the binaries now, which greatly reduces the attack surface for Sia users.
Synchronicity is a distributed build system for Rust build artifacts which have been published to crates.io. The goal of Synchronicity is to provide a distributed binary transparency system which is independent of any central operator.
The Comparison of Linux distributions article on Wikipedia now features a Reproducible Builds column indicating whether distributions approach and progress towards achieving reproducible builds.
Distribution work
In Debian this month:
Paul Wise continued a discussion that was started in February regarding the storing and distribution of build logs and other related artifacts and their relationship to reproducible builds. For example, the binutils package ships its own, unreproducible, log files in its binary packages. It was followed-up by replies from Chris Lamb and Matthias Klose.
diffoscope
Chris Lamb made the changes listed below to diffoscope, our in-depth and content-aware diff utility that can locate and diagnose reproducibility issues. He also prepared and uploaded versions 142, 143, 144, 145 and 146 to Debian, PyPI, etc.
Comparison improvements:
Improve fuzzy matching of JSON files as file now supports recognising JSON data. (#106)
Refactor .changes and .buildinfo handling to show all details (including the GnuPG header and footer components) even when referenced files are not present. (#122)
Use our BuildinfoFile comparator (etc.) regardless of whether the associated files (such as the orig.tar.gz and the .deb) are present. []
Include GnuPG signature data when comparing .buildinfo, .changes, etc. []
Add support for printing Android APK signatures via apksigner(1). (#121)
Identify iOS App Zip archive data as .zip files. (#116)
Don t print a traceback if we pass a single, missing argument to diffoscope (eg. a JSON diff to re-load). []
Correct differences typo in the ApkFile handler. (#127)
Output improvements:
Never emit the same id="foo" anchor reference twice in the HTML output, otherwise identically-named parts will not be able to linked to via a #foo anchor. (#120)
Never emit an empty id anchor either; it is not possible to link to #. []
Don t pretty-print the output when using the --json presenter; it will usually be too complicated to be readable by the human anyway. []
Use the SHA256 over MD5 hash when generating page names for the HTML directory-style presenter. (#124)
Reporting improvements:
Clarify the message when we truncate the number of lines to standard error [] and reduce the number of maximum lines printed to 25 as usually the error is obvious by then [].
Print the amount of free space that we have available in our temporary directory as a debugging message. []
Clarify Command [ ] failed with exit code messages to remove duplicate exited with exit but also to note that diffoscope is interpreting this as an error. []
Don t leak the full path of the temporary directory in Command [ ] exited with 1 messages. (#126)
Clarify the warning message when we cannot import the debian Python module. []
Don t repeat stderr from if both commands emit the same output. []
Clarify that an external command emits for both files, otherwise it can look like we are repeating itself when, in reality, it is being run twice. []
Testsuite improvements:
Prevent apksigner test failures due to lack of binfmt_misc, eg. on Salsa CI and elsewhere. []
Install/remove the build-essential during build so we can install the recommended packages from Git. []
Codebase improvements:
Bump the officially required version of Python from 3.5 to 3.6. (#117)
Drop the (default) shell=False keyword argument to subprocess.Popen so that the potentially-unsafe shell=True is more obvious. []
Perform string normalisation in Black [] and include the Black output in the assertion failure too [].
Inline MissingFile s special handling of deb822 to prevent leaking through abstract layers. [][]
Allow a bare try/except block when cleaning up temporary files with respect to the flake8 quality assurance tool. []
Rename in_dsc_path to dsc_in_same_dir to clarify the use of this variable. []
Abstract out the duplicated parts of the debian_fallback class [] and add descriptions for the file types. []
Various commenting and internal documentation improvements. [][]
Rename the Openssl command class to OpenSSLPKCS7 to accommodate other command names with this prefix. []
Misc:
Rename the --debugger command-line argument to --pdb. []
Normalise filesystem stat(2) birth times (ie. st_birthtime) in the same way we do with the stat(1) command s Access: and Change: times to fix a nondeterministic build failure in GNU Guix. (#74)
Ignore case when ordering our file format descriptions. []
Drop, add and tidy various module imports. [][][][]
In addition:
Jean-Romain Garnier fixed a general issue where, for example, LibarchiveMember s has_same_content method was called regardless of the underlying type of file. []
Daniel Fullmer fixed an issue where some filesystems could only be mounted read-only. (!49)
Emanuel Bronshtein provided a patch to prevent a build of the Docker image containing parts of the build s. (#123)
Mattia Rizzolo added an entry to debian/py3dist-overrides to ensure the rpm-python module is used in package dependencies (#89) and moved to using the new execute_after_* and execute_before_* Debhelper rules [].
Use Jekyll s absolute_url and relative_url where possible [][] and move a number of configuration variables to _config.yml [][].
Upstream patches
The Reproducible Builds project detects, dissects and attempts to fix as many currently-unreproducible packages as possible. We endeavour to send all of our patches upstream where appropriate. This month, we wrote a large number of such patches, including:
mescc-tools: Inherit CFLAGS in a Makefile, allowing -ffile-prefix-map/-fdebug-prefix-map to sanitise build paths (merged upstream).
Other tools
Elsewhere in our tooling:
strip-nondeterminism is our tool to remove specific non-deterministic results from a completed build. In May, Chris Lamb uploaded version 1.8.1-1 to Debian unstable and Bernhard M. Wiedemann fixed an off-by-one error when parsing PNG image modification times. (#16)
In disorderfs, our FUSE-based filesystem that deliberately introduces non-determinism into directory system calls in order to flush out reproducibility issues, Chris Lamb replaced the term dirents in place of directory entries in human-readable output/log messages [] and used the astyle source code formatter with the default settings to the main disorderfs.cpp source file [].
Holger Levsen bumped the debhelper-compat level to 13 in disorderfs [] and reprotest [], and for the GNU Guix distribution Vagrant Cascadian updated the versions of disorderfs to version 0.5.10 [] and diffoscope to version 145 [].
Project documentation & website
Carl Dong:
Clarify some potential confusion around GCC libtool. []
Sort our Academic publications page by publication year [] and add Trusting Trust and Fully Countering Trusting Trust through Diverse Double-Compiling [].
Testing framework
We operate a large and many-featured Jenkins-based testing framework that powers tests.reproducible-builds.org that, amongst many other tasks, tracks the status of our reproducibility efforts as well as identifies any regressions that have been introduced. Holger Levsen made the following changes:
System health status:
Improve page description. []
Add more weight to proxy failures. []
More verbose debug/failure messages. [][][]
Work around strangeness in the Bash shell let VARIABLE=0 exits with an error. []
Fail loudly if there are more than three .buildinfo files with the same name. []
Fix a typo which prevented /usr merge variation on Debian unstable. []
Temporarily ignore PHP s horde](https://www.horde.org/) packages in Debian bullseye. []
Document how to reboot all nodes in parallel, working around molly-guard. []
Further work on a Debian package rebuilder:
Workaround and document various issues in the debrebuild script. [][][][]
Improve output in the case of errors. [][][][]
Improve documentation and future goals [][][][], in particular documentiing two real world tests case for an impossible to recreate build environment [].
Find the right source package to rebuild. []
Increase the frequency we run the script. [][][][]
Improve downloading and selection of the sources to build. [][][]
Improve version string handling.. []
Handle build failures better. []. []. []
Also consider architecture all .buildinfo files. [][]
In addition:
kpcyrd, for Alpine Linux, updated the alpine_schroot.sh script now that a patch for abuild had been released upstream. []
Alexander Couzens of the OpenWrt project renamed the brcm47xx target to bcm47xx. []
Mattia Rizzolo fixed the printing of the build environment during the second build [][][] and made a number of improvements to the script that deploys Jenkins across our infrastructure [][][].
Lastly, Vagrant Cascadian clarified in the documentation that you need to be user jenkins to run the blacklist command [] and the usual build node maintenance was performed was performed by Holger Levsen [][][], Mattia Rizzolo [][] and Vagrant Cascadian [][][].
To make the results accessible, storable and create tools around them, they should all follow the same schema, a reproducible builds verification format. The format tries to be as generic as possible to cover all open source projects offering precompiled source code. It stores the rebuilder results of what is reproducible and what not.
Do you own your Bitcoins or do you trust that your app allows you to use your coins while they are actually controlled by them ? Do you have a backup? Do they have a copy they didn t tell you about? Did anybody check the wallet for deliberate backdoors or vulnerabilities? Could anybody check the wallet for those?
Elsewhere, Leo had posted instructions on his attempts to reproduce the binaries for the BlueWallet Bitcoin wallet for iOS and Android platforms.
If you are interested in contributing to the Reproducible Builds project, please visit our Contribute page on our website. However, you can get in touch with us via:
This month s report was written by Bernhard M. Wiedemann, Chris Lamb, Holger Levsen, Jelle van der Waa and Vagrant Cascadian. It was subsequently reviewed by a bunch of Reproducible Builds folks on IRC and the mailing list.
At work we have a wonderful pyhon tool that we are able to send CoAP messages to and from our products. Perfect for development work. However recently I needed to install a copy of the tools onto my personal laptop because the only work laptops I have access to have completely dead batteries and so are not suitable for taking out into a field to perform RF range tests .
As a company we have chosen not to package internal development tools I think that this is a mistake, but this is not my decision. So I simply copied across the coap tools directory and tried to run them. Obviously nothing worked! However, the error messages were enough to work out what dependencies I needed to resolve.
Error #1 Missing libasan.so.2 shared library By a process of deduction we found that gcc5 contains libasan2, quite old. Debian s snapshots was our saviour here:
great that was enough to get the port bindings to work
Error #2 google.protobuf
When I tried to issue coap requests I ran into missing python3 imports google.protobuf fortunately this is found packaged in Debian buster as party of python3-protobuf
BigBlueButton, aka BBB, is a webrtc conferencing solution, that among many features, allows to record a conference, for later replay.
We have been working together with my colleague Fran ois Trahay, on a set of scripts (bbb-downloader) that will allow to easily (on Linux) download recordings of BBB conferences, for local backup, video editing, upload on video sharing platforms, etc. This is particularly useful in our distance learning contexts where students may have to catch up on a live session that was recorded.
We have integrated a hackish solution to capture, as a single video, presentations that contained slide deck presentations. Let me explain why this was necessary.
A nice feature of BBB is the fact that, to present a slides deck, you don t need to share your screen (as a video stream), but just have to upload your file, which is then auto-converted to images, that are sent to participants, in sync with your next/previous browsing of the slides.
This is great for participants with low bandwidth, which can see the slides ( static images) instead of receiving a full screen video stream.
But a side effect is that the recording of a class/conference that is done by BBB replays the slides just as it was done live : displaying images one after the other.
While it is easy to retrieve the audio, webcams of participants, or screen sharings as video streams, directly available from the recordings replay app, it is thus not the same for the slides, which don t come as a video.
Our script will perform a replay, using a Docker container which drives Selenium under the hood, to capture the full replay, as a single video, which then includes the slides and everything. You can see my demo of this process in the following video:
bbb-downloader full capture demo.
It takes long to replay, in real-time, the recordings, to perform this capture but it works. Kudos to elgalu/docker-selenium for the Docker env.
Feel free to test it and profit, or to report issues in the Guthub issues of the repo: https://github.com/trahay/bbb-downloader/.
Because of the lock-down in France and thanks to Lucas, I have been able to make some progress rebuilding Debian with clang instead of gcc.
TLDR
Instead of patching clang itself, I used a different approach this time: patching Debian tools or implementing some workaround to mitigate an issue.
The percentage of packages failing drop from 4.5% to 3.6% (1400 packages to 1110 - on a total of 31014).
I focused on two classes of issues:
Symbol differences
Historically, symbol management for C++ in Debian has been a pain. Russ Allbery wrote a blog post in 2012 explaining the situation. AFAIK, it hasn't changed much.
Once more, I took the dirty approach: if there new or missing symbols, don't fail the build.
The rational is the following: Packages in the Debian archive are supposed to build without any issue. If there is new or missing symbols, it is probably clang generating a different library but this library is very likely working as expected (and usable by a program compiled with g++ or clang). It is purely a different approach taken by the compiler developer.
In order to mitigate this issue, before the build starts, I am modifying dpkg-gensymbols to transform the error into a warning.
So, the typical Debian error some new symbols appeared in the symbols file or some symbols or patterns disappeared in the symbols file will NOT fail the build.
Unsurprisingly, all but one package (libktorrent) build.
Even if I am pessimistic, I reported a bug on dpkg-dev to evaluate if we could improve dpkg-gensymbol not to fail on these cases.
For maintainers & upstream
Maintainer of Debian/Ubuntu packages? I am providing a list of failing packages per maintainer: https://clang.debian.net/maintainers.php
For upstream, it is also easy to test with clang. Usually, apt install clang && CC=clang CXX=clang++ <build step> is good enough.
Conclusion
With these two changes, I have been able to fix about 290 packages. I think I will be able to get that down a bit more but we will soon reach a plateau as many warnings/issues will have to fix in the C/C++ code itself.
I have been quite absent from Debian stuff lately, but this increased since COVID-19 hits us. In this blog post I'll try to sketch what I have been doing to help fight COVID-19 this last few months.
In the beginningWhen the pandemic reached Argentina the government started a quarantine. We engineers (like engineers around the world) started to think on how to put our abilities in order to help with the situation. Some worked toward providing more protection elements to medical staff, some towards increasing the number of ventilation machines at disposal. Another group of people started thinking on another ways of helping. In Bah a Blanca arised the idea of monitoring some variables remotely and in masse.
Simplified Monitoring of Patients in Situations of Mass Hospitalization (MoSimPa)
This is where the idea of remotely monitored devices came in, and MoSimPa (from the spanish of "monitoreo simplificado de pacientes en situaci n de internaci n masiva") started to get form. The idea is simple: oximetry (SpO2), heart rate and body temperature will be recorded and, instead of being shown in a display in the device itself, they will be transmitted and monitored in one or more places. In this way medical staff doesn't has to reach a patient constantly and monitoring could be done by medical staff for more patients at the same time. In place monitoring can also happen using a cellphone or tablet.
The devices do not have a screen of their own and almost no buttons, making them more cheap to build and thus more in line with the current economic reality of Argentina.
This is where the project Para Ayudar was created. The project aims to produce the aforementioned non-invasive device to be used in health institutions, hospitals, intra hospital transports and homes.
It is worth to note that the system is designed as a complementary measure for continuous monitoring of a pacient. Care should be taken to check that symptomps and overall patient status don't mean an inmediate life threat. In other words, it is NOT designed for ICUs.
A vast majority of Covid pneumonia patients I met had remarkably low oxygen saturations at triage seemingly incompatible with life but they were using their cellphones as we put them on monitors. Although breathing fast, they had relatively minimal apparent distress, despite dangerously low oxygen levels and terrible pneumonia on chest X-rays.
This greatly reinforced the idea we were on the right track.
The project from a technical standpoint
As the project is primarily designed for and by Argentinians the current system design and software documentation is written in spanish, but the source code (or at least most of it) is written in english. Should anyone need it in english please do not hesitate in asking me.
General system description
The system is comprised of the devices, a main machine acting as a server (in our case for small setups a Raspberry Pi) and the possibility of accessing data trough cell phones, tablets or other PCs in the network.
The hardware
As of today this is the only part in which I still can't provide schematics, but I'll update this blog post and technical doc with them as soon as I get my hands into them.
Again the design is due to be built in Argentina where getting our hands on hardware is not easy. Moreover it needs to be as cheap as possible, specially now that the Argentinian currency, the peso, is every day more depreciated. So we decided on using an ESP32 as the main microprocessor and a set of Maxim sensors devices. Again, more info when I have them at hand.
The software
Here we have many more components to describe. Firstly the ESP32 code is done with the Arduino SDK. This part of the stack will receive many updates soon, as soon as the first hardware prototypes are out.
For the rest of the stack I decided to go ahead with whatever is available in Debian stable. Why? Well, Raspbian provides a Debian stable-based image and I'm a Debian Developer, so things should go just natural for me in that front. Of course each component has its own packaging. I'm one of Debian's Qt maintainers then using Qt will also be quite natural for me. Plots? Qwt, of course. And with that I have most of my necessities fulfilled. I choose PostgreSql as database server and Mosquitto as MQTT broker.
Between the database and MQTT is mosimpa-datakeeper. The piece of software from which medical staff monitor patients is unsurprisingly called mosimpa-monitor.
MoSimPa's monitor main screen
Plots of a patient's data
Alarm thresholds setup
And for managing patients, devices, locations and internments (CRUD anyone?) there is currently a Qt-based application called mosimpa-abm.
ABM main screen
ABM internments view
The idea is to replace it with a web service so it doesn't needs to be confined to the RPi or require installations in other machines. I considered using webassembly but I would have to also build PostgreSql in order to compile Qt's plugin.
Translations? Of course! As I have already mentioned the code is written in English. Qt allows to easily translate applications, so I keep a Spanish one as the code changes (and we are primarily targeting spanish-speaking people). But of course this also means it can be easily translated to whichever language is necessary.
Here is my transparent report for my work on the Debian Long Term Support (LTS) and Debian Extended Long Term Support (ELTS), which extend the security support for past Debian releases, as a paid contributor.
In May, the monthly sponsored hours were split evenly among contributors depending on their max availability - I was assigned 17.25h for LTS (out of 30 max; all done) and 9.25h for ELTS (out of 20 max; all done).
A survey will be published very shortly to gather feedback from all parties involved in LTS (users, other Debian teams...) -- let us know what you think, so we start the forthcoming new (Stretch) LTS cycle in the best conditions
Discussion is progressing on funding & governance of larger LTS-related projects. Who should decide: contributors, Freexian, sponsors? Do we fund with a percentage or by capping resources allocated on security updates? I voiced concerns over funding these at the expense of smaller, more organic, more recurrent tasks that are less easy to specify but greatly contribute to the overall quality nevertheless.
ELTS - Wheezy
mysql-connector-java: upgrade to 5.1.49, refresh patches, document/run test suite, prepare upload, prepare upgrade path (+ see LTS)
CVE-2020-3810/apt: triage (affected), enquire about failing test, run testsuite, security upload ELA 228-1
LTS - Jessie
ansible: global triage: finish last month's triage, fix affected versions, provide reproducer
ansible: backport patches to early version, security upload DLA 2202-1
A Quick Recap from last year:
Kotlin is being packaged under the Google Summer of Code within the Debian organization itself. The major reason behind bringing Kotlin in Debian is to update all the Android packages which are now heavily dependent upon the Kotlin libraries.
The major work to bring Kotlin into Debian is done for the version 1.3.30, by Saif Abdul Cassim (goes by m36 on IRC) as a part of his GSoC'2019.
All his contributions to the team can be found in his blog posts.
So, for now, we have a bootstrap package and a Kotlin package for the version with 1.3.30.
There were still changes needed as we lacked some of the dependencies for Kotlin, and the source package lacked copyright information and didn t comply with Debian standards.
What's the present year brought for Kotlin?
To be specific the following were mainly left dependencies for Kotlin:
JLine3
intellij-community-idea
kotlin-bootstrap
And, we lack documentation for the newbies in order to get them started :(
Most importantly the crucial part was and still is, to figure out how to upload the package?
For GSoC'20, three students are selected as a part of project Android SDK tools in Debian.
What's the work done/left?
Work Done
A couple of dependencies were completed and reside in NEW Queue, those include Jline3 (done by @samyak-jn, myself), and intellij-community-idea (finished by @The_LoudSpeaker, Raman Sarda).
The kotlin package residing in m36 s repository had a couple of issues that were needed to be fixed to meet Debian standards, but Kotlin was building fine locally with the mentioned dependencies. :D
I (Samyak Jain) took the work for converting all the commits to the patches as all the changes were made directly to the source, and henceforth fixed rules and control files to meet Debian Standards. Debian is very particular about its license policies. The copyright was a pending task that was completed for Good.
The newer package exists at Samyak's repo.
I set up an initial wiki page for Kotlin as well, so everyone can follow. Thanks, Hans (@_hc) for the help with that. The wiki page for Kotlin exists here.
What's Blocking?
The most uncertain thing is to decide, how Kotlin will be uploaded to the Debian Archive?
What is the problem being faced?
The Kotlin-Bootstrap package consists of JAR files for various dependencies of kotlin such as Gradle, kotlin compiler, and kotlinx. The package is added to the build-depends of the main package so that the JAR files can be provided. Since the kotlin-bootstrap consists of binaries (JAR files), it is not feasible to upload the package as free software.
The other workaround was the Gradle 6.4 version, which consists of Kotlin files and generates a suitable JAR. But since the package needed Kotlin language itself, it was never updated, as it created a cyclic dependency.
Final workaround came, which proposed Kotlin to build from itself, that was a pretty impressive suggestion. But, we still have to look if the solution is feasible? Because, as far as I last checked and conversed with ebourg on the mailing list here, Emmanuel Bbourg mentioned very clearly that the rebuilt package is our interest. So, this is under WIP.
But, I fail to acknowledge the fact if we can drop the kotlin-bootstrap package totally, Kotlin will not be able to be built because each and every JAR file present in the bootstrap is needed.
That pretty much is the ongoing work and the update on the kotlin package. We intend to bring Kotlin to the Debian Archive as soon as possible :)
Have any queries or suggestions for Kotlin?
Please feel to drop a message at #debian-mobile channel on OFTC.
Here s my (eighth) monthly update about the activities I ve done in the F/L/OSS world.
Debian
This month marks my 15 months of contributing to Debian.
And 6th month as a DD! \o/
Whilst I love doing Debian stuff, I have started spending more time on the programming
side now. And I hope to keep it this for some time now.
Of course, I ll keep doing the Debian stuff, but just lesser in amount.
Anyway, the following are the things I did in May.
Experimenting and improving Ruby libraries FTW!
I have been very heavily involved with the Debian Ruby team for over an year now.
Thanks to Antonio Terceiro (and GSoC), I ve started experimenting and taking more
interest in upstream development and improvement of these libraries.
This has the sole purpose of learning. It has gotten fun since I ve started doing Ruby.
And I hope it stays this way.
This month, I opened some issues and proposed a few pull requests. They are:
Issue #802 against whenever for Ruby2.7 test failures.
Issue #8 against aggregate asking upstream for a release on rubygems.
Issue #104 against irb for asking more about Array.join("\n").
Issue #1391 against mail asking upstream to cut a new release.
Issue #1655 against rack reporting test failures in the CVE fix.
Debian LTS
Debian Long Term Support (LTS) is a project to extend the lifetime of all Debian stable releases
to (at least) 5 years. Debian LTS is not handled by the Debian security team, but by a separate group
of volunteers and companies interested in making it a success.
This was my eighth month as a Debian LTS paid contributor. I was assigned 17.25 hours and worked on
the following things:
CVE Fixes and Announcements:
Issued DLA 2191-1, fixing CVE-2020-10683, for dom4j.
For Debian 8 Jessie , this problem has been fixed in version 1.6.1+dfsg.3-2+deb8u2.
Issued DLA 2192-1, fixing CVE-2020-10663, for ruby2.1.
For Debian 8 Jessie , this problem has been fixed in version 2.1.5-2+deb8u10.
Issued DLA 2210-1, fixing CVE-2020-3810, for apt.
This update was prepared by the maintainer, Julian. I just took care of the paperwork.
For Debian 8 Jessie , this problem has been fixed in version 1.0.9.8.6.
Other(s)
Sometimes it gets hard to categorize work/things into a particular category.
That s why I am writing all of those things inside this category.
This includes two sub-categories and they are as follows.
Personal:
This month I could get the following things done:
Wrote and published my first Ruby gem/library/tool on RubyGems!
It s open-sourced and the repository is here.
Bug reports and pull requests are welcomed!
Wrote a small Ruby script (available here) to install Ruby gems from Gemfile(.lock).
Needed this when I hit a bug while using ruby-standalone, which Antonio fixed pretty quickly!
Here is my monthly update covering what I have been doing in the free software world during May 2020 (previous month):
Opened a pull request against the kitty shell to set a default socket timeout when retrieving remote items via the icat command-line tool. (#659)
Opened a pull request to make the documentation for the Wand Python/ImageMagick graphics library to build in reproducible manner. [...]
Fixed an issue in my tickle-me-email library that implements Gettings Things Done (GTD)-like behaviours in IMAP inboxes to prevent a traceback when adding text attachments that were not valid UTF-8. ...]
The Open Source Initiative held their twice-annual multi-day 'face-to-face' board meeting this time held virtually and participated in the accompanying conversations on strategy, tactical and governance issues, as well as the usual discussions regarding licensing and policy (minutes pending). I also attended the regular monthly meeting for Software in the Public Interest (minutes).
For my django-slack library (which provides a convenient library between projects using the Django and the Slack chat platform) I reviewed and merged a pull request from Cleiton de Lima to fix an issue due to the force_text method was deprecated favour of force_str. [...]
Replace Copyright (C) with the Unicode copyright symbol for consistency [...] and update my copyright years [...].
Factor out matching Homepage fields to data/fields/bad-homepages. [...]
Various alterations for the continuous integration pipeline. [...][...]
Reproducible builds
One of the original promises of open source software is that distributed peer review and transparency of process results in enhanced end-user security. However, whilst anyone may inspect the source code of free and open source software for malicious flaws, almost all software today is distributed as pre-compiled binaries. This allows nefarious third-parties to compromise systems by injecting malicious code into ostensibly secure software during the various compilation and distribution processes.
The motivation behind the Reproducible Builds effort is to ensure no flaws have been introduced during this compilation process by promising identical results are always generated from a given source, thus allowing multiple third-parties to come to a consensus on whether a build was compromised.
The initiative is proud to be a member project of the Software Freedom Conservancy, a not-for-profit 501(c)(3) charity focused on ethical technology and user freedom.
Conservancy acts as a corporate umbrella allowing projects to operate as non-profit initiatives without managing their own corporate structure. If you like the work of the Conservancy or the Reproducible Builds project, please consider becoming an official supporter.
Opened a pull request to make the documentation for the Wand Python/ImageMagick graphics library to build in reproducible manner. [...]
Categorised a large number of packages and issues in the Reproducible Builds "notes" repository.
In disorderfs, our FUSE-based filesystem that deliberately introduces non-determinism into directory system calls in order to flush out reproducibility issues, I replaced the term "dirents" in place of "directory entries" in human-readable output/log messages [...] and used the astyle source code formatter with the default settings to the main disorderfs.cpp file [...].
Elsewhere in our tooling, I made the following changes to diffoscope, our in-depth and content-aware diff utility that can locate and diagnose reproducibility issues, including preparing and uploading versions 142, 143, 144, 145 and 146 to Debian:
Comparison improvements:
Improve fuzzy matching of JSON files as file now supports recognising JSON data. (#106)
Refactor .changes and .buildinfo handling to show all details (including the GnuPG header and footer components) even when referenced files are not present. (#122)
Use our BuildinfoFile comparator (etc.) regardless of whether the associated files (such as the orig.tar.gz and the .deb) are present. [...]
Include GnuPG signature data when comparing .buildinfo, .changes, etc. [...]
Add support for printing Android APK signatures via apksigner(1). (#121)
Identify "iOS App Zip archive data" as .zip files. (#116)
Don't print a traceback if we pass a single, missing argument to diffoscope (eg. a JSON diff to re-load). [...]
Correct differences typo in the ApkFile handler. (#127)
Output improvements:
Never emit the same id="foo" anchor reference twice in the HTML output, otherwise identically-named parts will not be able to linked to via a #foo anchor. (#120)
Never emit an empty "id" anchor either; it is not possible to link to #. [...]
Don't pretty-print the output when using the --json presenter; it will usually be too complicated to be readable by the human anyway. [...]
Use the SHA256 over MD5 hash when generating page names for the HTML directory-style presenter. (#124)
Reporting improvements:
Clarify the message when we truncate the number of lines to standard error [...] and reduce the number of maximum lines printed to 25 as usually the error is obvious by then [...].
Print the amount of free space that we have available in our temporary directory as a debugging message. [...]
Clarify Command [ ] failed with exit code messages to remove duplicate exited with exit but also to note that diffoscope is interpreting this as an error. [...]
Don't leak the full path of the temporary directory in Command [ ] exited with 1 messages. (#126)
Clarify the warning message when we cannot import the debian Python module. [...]
Don't repeat stderr from if both commands emit the same output. [...]
Clarify that an external command emits for both files, otherwise it can look like we are repeating itself when, in reality, it is being run twice. [...]
Testsuite improvements:
Prevent apksigner test failures due to lack of binfmt_misc, eg. on Salsa CI and elsewhere. [...]
Install/remove the build-essential during build so we can install the recommended packages from Git. [...]
Codebase improvements:
Bump the officially required version of Python from 3.5 to 3.6. (#117)
Drop the (default) shell=False keyword argument to subprocess.Popen so that the potentially-unsafe shell=True is more obvious. [...]
Perform string normalisation in Black [...] and include the Black output in the assertion failure too [...].
Inline MissingFile's special handling of deb822 to prevent leaking through abstract layers. [...][...]
Allow a bare try/except block when cleaning up temporary files with respect to the flake8 quality assurance tool. [...]
Rename in_dsc_path to dsc_in_same_dir to clarify the use of this variable. [...]
Abstract out the duplicated parts of the debian_fallback class [...] and add descriptions for the file types. [...]
Various commenting and internal documentation improvements. [...][...]
Rename the Openssl command class to OpenSSLPKCS7 to accommodate other command names with this prefix. [...]
Misc:
Rename the --debugger command-line argument to --pdb. [...]
Normalise filesystem stat(2) "birth times" (ie. st_birthtime) in the same way we do with the stat(1) command's Access: and Change: times to fix a nondeterministic build failure in GNU Guix. (#74)
Ignore case when ordering our file format descriptions. [...]
Drop, add and tidy various module imports. [...][...][...][...]
Investigated and triaged freerdp, keystone, nginx, tcpreplay & thunderbird, as well as tended to the general upkeep of the dla-needed.txt and ela-needed.txt files, adding various notes, references, attributions and citations.
Frontdesk duties including responding to user/developer questions, reviewing others' packages, participating in mailing list discussions as well as attending our second regular IRC contributor meeting.
Issued DLA 2201-1 to prevent a Denial of Service (DoS) vulnerability the ntp network time protocol server/client. ntp allowed an "off-path" attacker to block unauthenticated synchronisation via a server mode packet with a spoofed source IP address because transmissions were rescheduled even if a packet lacked a valid "origin timestamp".
Issued DLA 2203-1 for the SQLite database to prevent a denial of service attack. In the event of a semantic error in an aggregate query, SQLite did not return early from the resetAccumulator() function which would lead to a crash via a segmentation fault.
Issued DLA 2204-1 for the Mailman mailing list manager to prevent an arbitrary content injection attack.
One of the things I maintain in Debian is OpenOCD. I say maintain, but it s so far required very little work, as it s been 3 years since a release (0.10.0). I ve talked about doing a git snapshot package for some time (I have an email from last DebConf in my inbox about it, and that wasn t the first time someone had asked), but never got around to it. Spurred on by some moves towards a 0.11.0 release I ve built a recent snapshot and uploaded it to the experimental suite in Debian.
Of particular interest is the support for more recent architectures that this brings - ARMv8/aarch64 and RISC-V being the big ones, but also MIPS64 and various other ARM improvements. I no longer have access to Xilinx Zynq or Mellanox Bluefield platforms to test against so I ve just done some some basic tests with a Sheevaplug and BusPirate/STM32F103, but those worked just fine.
Builds should hopefully happen shortly. Enjoy!
Something I ve found myself doing as the pandemic rolls on is picking
out and (re-)reading through sections of the GNU Emacs
manual and the
GNU Emacs Lisp reference
manual. This
has got me (too) interested in some of the recent history of Emacs
development, and I did some digging into archives of emacs-devel from
2008 (15M
mbox) regarding the change to turn Transient Mark mode on by default
and set mark-even-if-inactive to true by default in Emacs 23.1.
It s not always clear which objections to turning on Transient Mark
mode by default take into account the mark-even-if-inactive change.
I think that turning on Transient Mark mode along with
mark-even-if-inactive is a good default. The question that remains
is whether the disadvantages of Transient Mark mode are significant
enough that experienced Emacs users should consider altering Emacs
default behaviour to mitigate them. Here s one popular blog arguing
for some
mitigations.
How might Transient Mark mode be disadvantageous?
The suggestion is that it makes using the mark for navigation rather
than for acting on regions less convenient:
setting a mark just so you can jump back to it (i) is a distinct
operation you have to think of separately; and (ii) requires two
keypresses, C-SPC C-SPC, rather than just one keypress
using exchange-point-and-mark activates the region, so to use it
for navigation you need to use either C-u C-x C-x or C-x C-x
C-g, neither of which are convenient to type, or else it will be
difficult to set regions at the place you ve just jumped to because
you ll already have one active.
There are two other disadvantages that people bring up which I am
disregarding. The first is that it makes it harder for new users to
learn useful ways in which to use the mark when it s deactivated.
This happened to me, but it can be mitigated without making any
behavioural changes to Emacs. The second is that the visual
highlighting of the region can be distracting. So far as I can tell,
this is only a problem with exchange-point-and-mark, and it s
subsumed by the problem of that command actually activating the
region. The rest of the time Emacs automatic deactivation of the
region seems sufficient.
How might disabling Transient Mark mode be disadvantageous?
When Transient Mark mode is on, many commands will do something
usefully different when the mark is active. The number of commands in
Emacs which work this way is only going to increase now that Transient
Mark mode is the default.
If you disable Transient Mark mode, then to use those features you
need to temporarily activate Transient Mark mode. This can be fiddly
and/or require a lot of keypresses, depending on exactly where you
want to put the region.
Without being able to see the region, it might be harder to know where
it is. Indeed, this is one of the main reasons for wanting Transient
Mark mode to be the default, to avoid confusing new users. I don t
think this is likely to affect experienced Emacs users often, however,
and on occasions when more precision is really needed, C-u C-x C-x
will make the region visible. So I m not counting this as a
disadvantage.
How might we mitigate these two sets of disadvantages?
Here are the two middle grounds I m considering.
Mitigation #1: Transient Mark mode, but hack C-x C-x behaviour
(defunspw/exchange-point-and-mark (arg)"Exchange point and mark, but reactivate mark a bit less often.Specifically, invert the meaning of ARG in the case whereTransient Mark mode is on but the region is inactive."(interactive"P")(exchange-point-and-mark(if(and transient-mark-mode (not mark-active))(not arg)
arg)))(global-set-key[remap exchange-point-and-mark] &aposspw/exchange-point-and-mark)
We avoid turning Transient Mark mode off, but mitigate the second of
the two disadvantages given above.
I can t figure out why it was thought to be a good idea to make C-x
C-x reactivate the mark and require C-u C-x C-x to use the action
of exchanging point and mark as a means of navigation. There needs to
a binding to reactivate the mark, but in roughly ten years of having
Transient Mark mode turned on, I ve found that the need to reactivate
the mark doesn t come up often, so the shorter and longer bindings
seem the wrong way around. Not sure what I m missing here.
Mitigation #2: disable Transient Mark mode, but enable it temporarily more often
(setq transient-mark-mode nil)(defunspw/remap-mark-command (command&optional map)"Remap a mark-* command to temporarily activate Transient Mark mode."(let* ((cmd(symbol-name command))(fun(intern(concat"spw/" cmd)))(doc(concat"Call "
cmd
"&apos and temporarily activate Transient Mark mode.")))(fset fun (lambda(),doc
(interactive)(call-interactively#&apos,command)(activate-mark)))(if map
(define-key map (vector&aposremap command) fun)(global-set-key(vector&aposremap command) fun))))(dolist(command&apos(mark-word
mark-sexp
mark-paragraph
mark-defun
mark-page
mark-whole-buffer))(spw/remap-mark-command command))(with-eval-after-load&aposorg
(spw/remap-mark-command &aposorg-mark-element org-mode-map)(spw/remap-mark-command &aposorg-mark-subtree org-mode-map));; optional(global-set-key"\M-="(lambda() (interactive) (activate-mark)));; resettle the previous occupant(global-set-key"\C-cw"&aposcount-words-region)
Here we remove both of the disadvantages of Transient Mark mode given
above, and mitigate the main disadvantage of not activating Transient
Mark mode by making it more convenient to activate it temporarily.
For example, this enables using C-M-SPC C-M-SPC M-( to wrap the
following two function arguments in parentheses. And you can hit
M-h a few times to mark some blocks of text or code, then operate on
them with commands like M-% and C-/ which behave differently when
the region is active.1
Comparing these mitigations
Both of these mitigations handle the second of the two disadvantages
of Transient Mark mode given above. What remains, then, is
under the effects of mitigation #1, how much of a barrier to using
marks for navigational purposes is it to have to press C-SPC
C-SPC instead of having a single binding, C-SPC, for all manual
mark setting2
under the effects of mitigation #2, how much of a barrier to taking
advantage of commands which act differently when the region is
active is it to have to temporarily enable Transient Mark mode with
C-SPC C-SPC, M-= or one of the mark-* commands?
These are unknowns.3 So I m going to have to experiment, I think,
to determine which mitigation to use, if either. In particular, I
don t know whether it s really significant that setting a mark for
navigational purposes and for region marking purposes are distinct
operations under mitigation #1.
My plan is to start with mitigation #2 because that has the additional
advantage of allowing me to confirm or disconfirm my belief that not
being able to see where the region is will only rarely get in my way.
The idea of making the mark-* commands activate the mark comes
from an emacs-devel post by Stefan Monnier in the archives linked
above.
One remaining possibility I m not considering is mitigation #1
plus binding something else to do the same as C-SPC C-SPC. I
don t believe there are any easily rebindable keys which are
easier to type than typing C-SPC twice. And this does not deal
with the two distinct mark-setting operations problem.
Another way to look at this is the question of which of setting
a mark for navigational purposes and activating a mark should get
C-SPC and which should get C-SPC C-SPC.
A new version of drat arrived on CRAN overnight, once again taking advantage of the fully automated process available for such packages with few reverse depends and no open issues. As we remarked at the last release fourteen months ago when we scored the same nice outcome: Being a simple package can have its upsides
This release is mostly the work of Felix Ernst who took on what became a rewrite of how binary macOS packages are handled. If you need to distribute binary packages for macOS users, this may help. Two more small updates were made, see below for full details.
drat stands for drat R Archive Template, and helps with easy-to-create and easy-to-use repositories for R packages. Since its inception in early 2015 it has found reasonably widespread adoption among R users because repositories with marked releases is the better way to distribute code.
As your mother told you: Friends don t let friends install random git commit snapshots. Rolled-up releases it is. drat is easy to use, documented by five vignettes and just works.
The NEWS file summarises the release as follows:
Changes in drat version 0.1.6 (2020-05-29)
Changes in drat functionality
Support for the various (current) macOS binary formats was rewritten (Felix Ernst in #89 fixing #88).
Travis CI use was updated to R 4.0.0 and bionic (Dirk).
A drat repo was added to the README (Thomas Fuller in #86)
The diffoscope maintainers are pleased to announce the release of diffoscope
version 146. This version includes the following changes:
[ Chris Lamb ]
* Refactor .changes and .buildinfo handling to show all details (including
the GPG header and footer components), even when referenced files are not
present. (Closes: reproducible-builds/diffoscope#122)
* Normalise filesystem stat(2) "birth times" (ie. st_birthtime) in the same
way we do with stat(1)'s "Access:" and "Change:" times to fix a
nondetermistic build failure on GNU Guix.
(Closes: reproducible-builds/diffoscope#74)
* Drop the (default) subprocess.Popen(shell=False) keyword argument so that
the more unsafe shell=True is more obvious.
* Ignore lower vs. upper-case when ordering our file format descriptions.
* Don't skip string normalisation in Black.
[ Mattia Rizzolo ]
* Add a "py3dist" override for the rpm-python module (Closes: #949598)
* Bump the debhelper compat level to 13 and use the new
execute_after_*/execture_before_* style rules.
* Fix a spelling error in changelog.
[ Daniel Fullmer ]
* Mount GuestFS filesystem images readonly.
[ Jean-Romain Garnier ]
* Prevent an issue where (for example) LibarchiveMember's has_same_content
method is called regardless of the actual type of file.
So, Megacli is to be replaced by Storcli, both being proprietary tools for configuring RAID cards from LSI.
So I went to download what s provided by Lenovo, available here: https://support.lenovo.com/fr/en/downloads/ds041827
It s very annoying, because they force users to download a .zip file containing a deb file, instead of providing a Debian repository. Well, ok, though at least there s a deb file there. Let s have a look what s using my favorite tool before installing (ie: let s run Lintian). Then it s a horror story. Not only there s obvious packaging wrong, like the package provide stuff in /opt, and all is statically linked and provide embedded copies of libm and ncurses, or even the package is marked arch: all instead of arch: amd64 (in fact, the package contains both i386 and amd64 arch files ), but there s also some really wrong things going on:
E: storcli: arch-independent-package-contains-binary-or-object opt/MegaRAID/storcli/storcli
E: storcli: embedded-library opt/MegaRAID/storcli/storcli: libm
E: storcli: embedded-library opt/MegaRAID/storcli/storcli: ncurses
E: storcli: statically-linked-binary opt/MegaRAID/storcli/storcli
E: storcli: arch-independent-package-contains-binary-or-object opt/MegaRAID/storcli/storcli64
E: storcli: embedded-library opt/MegaRAID/storcli/storcli64: libm
E: storcli: embedded-library use no-tag-display-limit to see all (or pipe to a file/program)
E: storcli: statically-linked-binary opt/MegaRAID/storcli/storcli64
E: storcli: changelog-file-missing-in-native-package
E: storcli: control-file-has-bad-permissions postinst 0775 != 0755
E: storcli: control-file-has-bad-owner postinst asif/asif != root/root
E: storcli: control-file-has-bad-permissions preinst 0775 != 0755
E: storcli: control-file-has-bad-owner preinst asif/asif != root/root
E: storcli: no-copyright-file
E: storcli: extended-description-is-empty
W: storcli: essential-no-not-needed
W: storcli: unknown-section storcli
E: storcli: depends-on-essential-package-without-using-version depends: bash
E: storcli: wrong-file-owner-uid-or-gid opt/ 1000/1000
W: storcli: non-standard-dir-perm opt/ 0775 != 0755
E: storcli: wrong-file-owner-uid-or-gid opt/MegaRAID/ 1000/1000
E: storcli: dir-or-file-in-opt opt/MegaRAID/
W: storcli: non-standard-dir-perm opt/MegaRAID/ 0775 != 0755
E: storcli: wrong-file-owner-uid-or-gid opt/MegaRAID/storcli/ 1000/1000
E: storcli: dir-or-file-in-opt opt/MegaRAID/storcli/
W: storcli: non-standard-dir-perm opt/MegaRAID/storcli/ 0775 != 0755
E: storcli: wrong-file-owner-uid-or-gid use no-tag-display-limit to see all (or pipe to a file/program)
E: storcli: dir-or-file-in-opt opt/MegaRAID/storcli/storcli
E: storcli: dir-or-file-in-opt use no-tag-display-limit to see all (or pipe to a file/program)
Some of the above are grave security problems, like wrong Unix mode for folders, even with the preinst script installed as non-root. I always wonder why this type of tool needs to be proprietary. They clearly don t know how to get packaging right, so they d better just provide the source code, and let us (the Debian community) do the work for them. I don t think there s any secret that they are keeping by hiding how to configure the cards, so it s not in the vendor s interest to keep everything closed. Or maybe they are just hiding really bad code in there, that they are ashamed to share? In any way, they d better not provide any package than this pile of dirt (and I m trying to stay polite here ).
I know most Debian people know about this already But in case you
don t follow the usual Debian communications channels, this might
interest you!
Given most of the world is still under COVID-19 restrictions, and that
we want to work on Debian, given there is no certainty as to what the
future holds in store for us Our DPL fearless as they always are
had the bold initiative to make this weekend into the first-ever
miniDebConf
Online
(MDCO)!
So, we are already halfway through DebCamp (which means, you can come
and hang out with us in the debian.social DebCamp Jitsi
lounge, where some
impromptu presentations might happen (or not).
Starting tomorrow morning (11AM UTC),
we will have a quite interesting set of talks. I am reproducing the
schedule here:
Saturday 2020.05.30
Time (UTC)
Speaker
Talk
11:00 - 11:10
MDCO team members
Hello + Welcome
11:30 - 11:50
Wouter Verhelst
Extrepo
12:00 - 12:45
JP Mengual
Debian France, trust european organization
13:00 - 13:20
Arnaud Ferraris
Bringing Debian to mobile phones, one package at a time
13:30 - 15:00
Lunch Break
A chance for the teams to catch some air
15:00 - 15:45
JP Mengual
The community team, United Nations Organizations of Debian?
16:00 - 16:45
Christoph Biedl
Clevis and tang - overcoming the disk unlocking problem
17:00 - 17:45
Antonio Terceiro
I m a programmer, how can I help Debian
Sunday 2020.05.31
Time (UTC)
Speaker
Talk
11:00 - 11:45
Andreas Tille
The effect of Covid-19 on the Debian Med project
12:00 - 12:45
Paul Gevers
BoF: running autopkgtest for your package
13:00 - 13:20
Ben Hutchings
debplate: Build many binary packages with templates
13:30 - 15:00
Lunch break
A chance for the teams to catch some air
15:00 - 15:45
Holger Levsen
Reproducing bullseye in practice
16:00 - 16:45
Jonathan Carter
Striving towards excellence
17:00 - 17:45
Delib*
Organizing Peer-to-Peer Debian Facilitation Training
18:00 - 18:15
MDCO team members
Closing
subject to confirmation
Timezone
Remember this is an online event, meant for all of the world! Yes, the
chosen times seem quite Europe-centric (but they are mostly a function
of the times the talk submitters requested).
Talks are 11:00 18:00UTC, which means, 06:00 13:00 Mexico (GMT-5),
20:00 03:00 Japan (GMT+9), 04:00 11:00 Western
Canada/USA/Mexico (GMT-7) and the rest of the world, somewhere in
between.
(No, this was clearly not optimized for our dear usual beer
team. Sorry! I
guess we need you to be fully awake at beertime!)
[update] Connecting!
Of course, I didn t make it clear at first how to connect to the
Online miniDebConf, silly me!
The video streams are available at: https://video.debconf.org/
Suggested: tune in to the #minidebconf-online IRC channel in OFTC.
That should be it. Hope to see you there!
(Stay home, stay safe )
I know most Debian people know about this already But in case you
don t follow the usual Debian communications channels, this might
interest you!
Given most of the world is still under COVID-19 restrictions, and that
we want to work on Debian, given there is no certainty as to what the
future holds in store for us Our DPL fearless as they always are
had the bold initiative to make this weekend into the first-ever
miniDebConf
Online
(MDCO)!
So, we are already halfway through DebCamp (which means, you can come
and hang out with us in the debian.social DebCamp Jitsi
lounge, where some
impromptu presentations might happen (or not).
Starting tomorrow morning (11AM UTC),
we will have a quite interesting set of talks. I am reproducing the
schedule here:
Saturday 2020.05.30
Time (UTC)
Speaker
Talk
11:00 - 11:10
MDCO team members
Hello + Welcome
11:30 - 11:50
Wouter Verhelst
Extrepo
12:00 - 12:45
JP Mengual
Debian France, trust european organization
13:00 - 13:20
Arnaud Ferraris
Bringing Debian to mobile phones, one package at a time
13:30 - 15:00
Lunch Break
A chance for the teams to catch some air
15:00 - 15:45
JP Mengual
The community team, United Nations Organizations of Debian?
16:00 - 16:45
Christoph Biedl
Clevis and tang - overcoming the disk unlocking problem
17:00 - 17:45
Antonio Terceiro
I m a programmer, how can I help Debian
Sunday 2020.05.31
Time (UTC)
Speaker
Talk
11:00 - 11:45
Andreas Tille
The effect of Covid-19 on the Debian Med project
12:00 - 12:45
Paul Gevers
BoF: running autopkgtest for your package
13:00 - 13:20
Ben Hutchings
debplate: Build many binary packages with templates
13:30 - 15:00
Lunch break
A chance for the teams to catch some air
15:00 - 15:45
Holger Levsen
Reproducing bullseye in practice
16:00 - 16:45
Jonathan Carter
Striving towards excellence
17:00 - 17:45
Delib*
Organizing Peer-to-Peer Debian Facilitation Training
18:00 - 18:15
MDCO team members
Closing
subject to confirmation
Timezone
Remember this is an online event, meant for all of the world! Yes, the
chosen times seem quite Europe-centric (but they are mostly a function
of the times the talk submitters requested).
Talks are 11:00 18:00UTC, which means, 06:00 13:00 Mexico (GMT-5),
20:00 03:00 Japan (GMT+9), 04:00 11:00 Western
Canada/USA/Mexico (GMT-7) and the rest of the world, somewhere in
between.
(No, this was clearly not optimized for our dear usual beer
team. Sorry! I
guess we need you to be fully awake at beertime!)
[update] Connecting!
Of course, I didn t make it clear at first how to connect to the
Online miniDebConf, silly me!
The video streams are available at: https://video.debconf.org/
Suggested: tune in to the #minidebconf-online IRC channel in OFTC.
That should be it. Hope to see you there!
(Stay home, stay safe )
Float/String Conversion in Picolibc
Exact conversion between strings and floats seems like a fairly
straightforward problem. There are two related problems:
String to Float conversion. In this case, the goal is to
construct the floating point number which most closely
approximates the number represented by the string.
Float to String conversion. Here, the goal is to generate the
shortest string which, when fed back into the String to Float
conversion code, exactly reproduces the original value.
When linked together, getting from float to string and back to float
is a round trip , and an exact pair of algorithms does this for every
floating point value.
Solutions for both directions were published in the proceedings of the
ACM SIGPLAN 1990 conference on Programming language design and
implementation, with the string-to-float version written by William
Clinger and the
float-to-string version written by Guy Steele and Jon
White. These solutions
rely on very high precision integer arithmetic to get every case
correct, with float-to-string requiring up to 1050 bits for the 64-bit
IEEE floating point format.
That's a lot of bits.
Newlib Float/String Conversion
The original newlib code, written in 1998 by David M. Gay, has
arbitrary-precision numeric code for these functions to get exact
results. However, it has the disadvantages of performing numerous
memory allocations, consuming considerable space for the code, and
taking a long time for conversions.
The first disadvantage, using malloc during conversion,
ended up causing a
number of CVEs
because the results of malloc were not being checked. That's bad on
all platforms, but especially bad for embedded systems where reading
and writing through NULL pointers may have unknown effects.
Upstream newlib applied a quick fix to check the allocations and call
abort. Again, on platforms with an OS, that at least provides a
way to shut down the program and let the operating environment figure
out what to do next. On tiny embedded systems, there may not be any
way to log an error message or even restart the system.
Ok, so we want to get rid of the calls to abort and have the error
reported back through the API call which caused the problem. That's
got two issues, one mere technical work, and another mere
re-interpretation of specifications.
Let's review the specification issue. The libc APIs involved here are:
Input:
scanf
strtod
atof
Output:
printf
ecvt, fcvt
gcvt
Scanf and printf are both documented to set errno to ENOMEM when they
run out of memory, but none of the other functions takes that
possibility into account. So we'll make some stuff up and hope it
works out:
strtod. About the best we can do is report that no conversion was
performed.
atof. Atof explicitly fails to detect any errors, so all we can do
is return zero. Maybe returning NaN would be better?
ecvt, fcvt and gcvt. These return a pointer, so they can return
NULL on failure.
Now, looking back at the technical challenge. That's a simple matter
of inserting checks at each allocation, or call which may result in an
allocation, and reporting failure back up the call stack, unwinding
any intermediate state to avoid leaking memory.
Testing Every Possible Allocation Failure
There are a lot of allocation calls in the newlib code. And the call
stack can get pretty deep. A simple visual inspection of the code
didn't seem sufficient to me to validate the allocation checking code.
So I instrumented malloc, making it count the number of allocations
and fail at a specific one. Now I can count the total number of
allocations done over the entire test suite run for each API involved
and then run the test suite that many times, failing each allocation
in turn and checking to make sure we recover correctly. By that, I
mean:
No stores through NULL pointers
Report failure to the application
No memory leaks
There were about 60000 allocations to track, so I ran the test suite
that many times, which (with the added malloc tracing enabled) took
about 12 hours.
Bits Pushed to the Repository
With the testing complete, I'm reasonably confident that the code is
now working, and that these CVEs are more completely squashed. If
someone is interested in back-porting the newlib fixes upstream to
newlib, that would be awesome. It's not completely trivial as this
part of picolibc has diverged a bit due to the elimination of the
reent structure.
Picolibc's Tinystdio Float/String Conversion
Picolibc contains a complete replacement for stdio which was
originally adopted from avr libc.
That's a stdio implementation designed to run on 8-bit Atmel
processors and focuses on very limited memory use and small code
size. It does this while maintaining surprisingly complete support for
C99 printf and scanf support.
However, it also does this without any arbitrary precision arithmetic,
which means it doesn't get the right answer all of the time. For most
embedded systems, this is usually a good trade off -- floating point
input and output are likely to be largely used for diagnostics and
debugging, so mostly correct answers are probably
sufficient.
The original avr-libc code only supports 32-bit floats, as that's all
the ABI on those processors has. I extended that to 64-, 80- and 128-
bit floats to cover double and long double on x86 and RISC-V
processors. Then I spent a bunch of time adjusting the code to get it
to more accurately support C99 standards.
Tinystdio also had strtod support, but it was missing ecvt, fcvt and
gcvt. For those, picolibc was just falling back to the old newlib
code, which introduced all of the memory allocation issues we've just
read about.
Fixing that so that tinystdio was self-contained and did ecvt, fcvt
and gcvt internally required writing those functions in terms of the
float-to-string primitives already provided in tinystdio to support
printf. gcvt is most easily supported by just calling sprintf.
Once complete, the default picolibc build, using tinystdio, no longer
does any memory allocation for float/string conversions.