Digest of YaST Development Sprint 118
It has been three weeks since the previous development report from the YaST Team. That’s one week more than our usual cadence, since most of the team was booked during four days in an internal SUSE workshop. But fear no more, we are back and loaded with news as usual. This time we bring:
- Support to enable and configure SELinux during installation
- A revamped interface for configuring wireless network devices
- Usability improvements in several areas
- A new “hidden level” in the installer with advanced tools ;-)
You may know that both the SUSE and openSUSE families of operating systems include container-oriented members, namely openSUSE MicroOS and SLE Micro. In order to make them even more awesome, we got the request to make possible to propose and configure the usage of Security-Enhanced Linux, more widely known as SELinux, during the (auto)installation. This is a complex change affecting several parts of YaST and various versions of (open)SUSE, but you can get a good overview in the description of this pull request which includes some screenshots that may be worth a thousand words. Right now, the feature may look different on each one of the distributions due to the different state of SELinux on them. While in SLE Micro the new setting is visible during installation and activated at its more restrictive level, in others it may look more permisive or even not be presented at all. We expect things to consolidate during the upcoming weeks.
And talking about things that take their time, for a long time we had wanted to improve the usability of the configuration of wireless network adapters. Finally we found the time to reorganize the corresponding tab in the YaST Network module, improving the mechanism to select a wireless network and automatically pre-filling as much information as possible. You can see the result in the following animation and in the detailed pull request with the usual before-and-after screenshots.
That’s not the only usability improvements we implemented during this sprint. Now the Partitioner offers more useful information about file-systems that need to be unmounted in advance and presents a more sensible initial state for the collapsable branches in its tables. YaST Network permits to tweak the virt bridge interface during manual installation and reports AutoYaST errors more nicely. Last but not least in the usability field, we improved how long texts are managed and presented in most YaST pop-up dialogs.
If you are still not impressed with all the new things this sprint brought, we can give you a sneak peak on something we have been preparing lately to give power-users more… er… power. ;-) As you all know, YaST is already a pretty advanced installer offering many options. And it’s very configurable so it can be tweaked to behave differently depending on the distribution, the product or the system role selected by the user. But believe it or not, we still face situations in which we would like to configure the installer even more during its execution to overcome some obstacle found in a very special scenario or just for debugging purposes. How do we plan to do it? Meet the new YaST installation console, available through the even newer installer configuration screen!
While we dive into the beta phase of openSUSE Leap 15.3 and SLE-15-SP3, the YaST Team will focus during the next weeks in fixing the bugs found by the testers of those upcoming distributions, which implies we cannot give you a fixed date for the next development report, but it will be for sure during March. Meanwhile, stay tuned and do not hesitate to report any significant bug you can find in YaST or in openSUSE in general. See you soon(ish)!
Call for Papers Open for openSUSE Conference
The call for papers for the openSUSE Virtual Conference is open!
The call for papers is open until May 4. This leaves a little more than 60 days to submit a proposal. The dates of the conference are scheduled for June 18 - 20. Registration for the conference has also begun.
Presentations can be submitted for the following length of time:
- Lightning Talks (15 mins)
- Normal Talk (30 mins)
- Long Talk (45 mins)
- Workshop (1 hour)
The following tracks are listed for the conference:
- Cloud and Containers
- Community
- Embedded Systems and Edge Computing
- New Technologies
- Open Source
- openSUSE
The conference already has two sponsors with Fedora and SUSE. Companies interested in sponsoring the event can view the sponsorship prospectus on the project’s wiki page.
Volunteers who would like to help the Program Committee and/or the Organizing Team can email ddemaio@opensuse.org.
LCD Chalkboard Smart Sign, Raspberry Pi Powered
Revisiting Html in Java
Some time ago I wrote a post about creating an embedded dsl for Html in Java. Sadly, it was based on an abuse of lambda name reflection that was later removed from Java.
I thought I should do a followup because a lot of people still visit the old article. While it’s no longer possible to use lambda parameter names in this way, we can still get fairly close.
The following approach is slightly less concise. That said, it does have some benefits over the original:
a) You no longer need to have parameter name reflection enabled at compile time.
b) The compiler can check your attribute names are valid, and you can autocomplete them.
What does it look like?
html(
head(
title("Hello Html World"),
meta($ -> $.charset = "utf-8"),
link($->{ $.rel=stylesheet; $.type=css; $.href="/my.css"; }),
script($->{ $.type= javascript; $.src="//benjiweber.co.uk/some.js"; })
),
body(
div($-> $.cssClass = "article",
a($-> $.href="https://benjiweber.com/",
span($->$.cssClass="label", "Click Here"),
img($->{$.src="//benjiweber.co.uk/htmldsl2.png"; $.width=px(25); $.height=px(25); })
),
p(span("some text"), div("block"))
)
)
)
This generates the following html
Hello Html World
You get nice autocompletion, and feedback if you specify inappropriate values:
You’ll also get a helping hand from the types to not put tags in inappropriate places:

Generating Code
As it’s Java you can easily mix other code to generate markup dynamically:
assertEquals(
"""
Paragraph one
Paragraph two
Paragraph three
""".trim(),
html(
head(
meta($ -> $.charset = "utf-8")
),
body(
Stream.of("one","two","three")
.map(number -> "Paragraph " + number)
.map(content -> p(content))
)
).formatted()
);
And the code can help you avoid injection attacks by escaping literal values:
assertEquals(
"""
<script src="attack.js"></script>
""".trim(),
html(
head(
meta($-> $.charset = "utf-8")
),
body(
p("")
)
).formatted()
);
How does it work?
There’s only one “trick” here that’s particularly useful for DSLs. Using the Parameter Objects pattern from my lambda type references post.
The lambdas used for specifying the tag attributes are “aware” of their own types. And capable of instantiating the configuration they specify.
When we call
meta($ -> $.charset="utf-8")
We make a call to
default Meta meta(Parameters params, Tag... children) { … }
The lambda specifying the attribute config is structurally equivalent to the Parameters<Meta> type. This provides a get() function that instantiates an instance of Meta, and then passes the new instance to the lambda function to apply the config.
public interface Parameters extends NewableConsumer {
default T get() {
T t = newInstance();
accept(t);
return t;
}
}
Under the hood the newInstance() method uses reflection to examine the SerializedLambda contents and find the type parameter (in this case “Meta”) before instantiating it.
You can follow the code or see the previous post which explains it in a bit more detail.
Add Mixins
It’s helpful to use interfaces as mixins to avoid having to have one enormous class with all the builder definitions.
public interface HtmlDsl extends
Html.Dsl,
Head.Dsl,
Title.Dsl,
Meta.Dsl,
Link.Dsl,
Script.Dsl,
Body.Dsl,
Div.Dsl,
Span.Dsl,
A.Dsl,
P.Dsl,
Img.Dsl {}
Each tag definition then contains its own builder methods. We compose them together into a single HtmlDsl interface for convenience. This saves having to import hundreds of different methods. By implementing the Dsl interface a consumer gets access to all the builder methods.
Show me the code
It’s all on github. I’d start from the test examples. Bear in mind that it’s merely a port of the old proof of concept to a slightly different approach. I hope it helps illustrate the technique. It’s in no way attempting to be a complete implementation.
This approach can also be useful as an alternative to the builder pattern for passing a specification or configuration to a method. There’s another example on the type references article.
What else could you use this technique for?
The post Revisiting Html in Java appeared first on Benji's Blog.
Kraft Version 0.96
Ich freue mich, heute das Release Version 0.96 von Kraft herauszugeben. Die neue Version kann über die Homepage heruntergeladen werden.
Kraft 0.96 ist ein Bugfix Release, das einige kleine Fehler der Version 0.95 behebt. Insbesondere betrifft das das in 0.95 eingeführte neue PDF-Rendering mit Weasyprint.
Es gibt auch ein paar kleine neue Funktionen: Im Dokument Editor kann per Hinzufügen-Knopf nun auch eine neue Posten-Vorlage hinzugefügt werden. Außerdem werden in Folgedokumenten die im Vorgängerdokument eingetragenen Kopf- und Fußtexte kopiert, wenn die Standard-Texte für den neuen Dokumenttyp nicht gesetzt sind. Wichtig dabei: Kraft verwendet den Kopftext mit dem Namen „Standard“ als Standardtext, ebenso bei Fußtexten.
Weiterhin viel Erfolg mit Kraft!
Noodlings 23 | Not Fading Yet
Btrfs: Resolving the logical-resolve
openSUSE Tumbleweed – Review of the weeks 2021/08
Dear Tumbleweed users and hackers,
This week, we have released almost daily snapshots. It shows that I have received help in working on the Stagings. Richard has been very busy this week, working together with me on these areas. So, we managed to publish 6 snapshots (0218, 0219, 0220, 0221, 0222, and 0223).
The noteworthy changes therein were:
- Transactional-Updates 3.1.4
- GNOME 3.38.4
- binutils 2.36
- util-linux 2..36.2
- libguestfs 1.44.0
- PostgreSQL 13.2
- Mozilla Firefox 85.0.2
- Dracut 052
In the staging projects, we are preparing and testing these updates:
- NetworkManager 1.30
- Mozilla Firefox 86.0
- KDE Plasma 5.21.1
- podman 3.0.1
- Dracut 053
- Linux kernel 5.11.2
- openssl 1.1.1i, based on centralized crypto-policies package
- GCC 11 as default compiler
PostgreSQL, GNOME, Rubygems Update in Tumbleweed
Slonik fans are excited for this week’s openSUSE Tumbleweed snapshots as PostgreSQL has a major release in the rolling release distribution.
Snapshot 20210224 brought in the new postgresql 13 version. The new major version brings in highly requested features like parallelized vacuuming and incremental sorting. PostgreSQL brought some security enhancements with its extension system that allows developers to expand its functionality. There are also improvements to its indexing and lookup system, which benefit large databases. PostgreSQL wasn’t the only major version updated in the snapshot; the utility library ndctl jumped two versions to 70.1, which added firmware activation support. Other major version updates were made to liberation-fonts 2.1.1 and perl-Mail-DKIM 1.20200907. The Advanced Linux Sound Architecture package updated to version 1.2.4, which provided some plugin updates and Link Time Optimization fixes. Among other packages to update in the snapshot were bind 9.16.7, libsolv 0.7.16 and debugging tool xfsprogs 5.9.0.
An update of translations was made in the gnome-desktop 3.38.4 update within snapshot 20210222. A fix of a deadlock during startup was made in the Mozilla Firefox 85.0.2 update. The reading of multichannel PSD files with 1 or 2 channels were made in ImageMagick 7.0.11.0. The update of gtk3 3.24.25 fixed the touchscreen event handling and had some Wayland fixes for crashes on tablets; the update also added Application Programming Interfaces to support clients with subsurfaces better. Several new features were added with the firmware package fwupd 1.5.6; the updated added support for the System76 keyboard. Detecting the AMD Transparent Secure Memory Encryption encryption state for HSI-4 and new plugins were made available in the update.
The 20210220 snapshot could be dubbed the RubyGems snapshot. Rubygem-autoprefixer-rails 10.2.4.0, rubygem-bootsnap 1.7.2, rubygem-jbuilder 2.11.2, rubygem-msgpack 1.4.2, rubygem-puma 5.2.1 and rubygem-thor 1.1.0 were all updated in the snapshot. The rubygem-thor release added support for Ruby 3.0, and the rubygem-msgpack update dropped support of old Ruby versions that included 1.8, 1.9, 2.0, 2.1, 2.2 and 2.3.
The smallest snapshot this week with one package update was 20210219. The 1.44.0 version of libguestfs, which is a C library and a set of tools for accessing and modifying virtual disk images, requires a minimum version of Python 3.6. The update also removed references between openSUSE Leap and SUSE Linux Enterprise in the specfile.
Snapshot 20210218 started off the week and had several package updates for GNOME. Among the updates were personal information manager evolution 3.38.4, which fixed a memory leak when quoting headers for message replies, and gnome-maps 3.38.4, which fixed a drag hang and a bug that resulted in writing a broken last view position. A WebKitPluginProcess in webkit2gtk3 2.30.5 was returned to the package after mistakenly being removed. Other packages updated in the snapshot were freeipmi 1.6.7, glib2 2.66.7, udisks2 2.9.2, kplotting 5.79.0 and a new major version update of transactional-update 3.1.4, which fixed the syncing of SELinux attributes when using overlays.
about openQA-bites
openQA bites is a blog about tutorials, insights and love stories from a simple openQA developer. It aims to provide small and bite-sized posts about typical usage issues that every openQA dev encounters and atypical corner-cases that are worth to be written down. In the best case it can complement the official openQA documentation. by sharing some stories and make some typical and atypical use cases searchable in via your search engine of choice.

