Skip to main content

the avatar of Sébastien sogal Poher

Mises à jour de GNOME, LLVM, Samba, Ruby dans Tumbleweed

Deux instantanés openSUSE Tumbleweed ont été publiés cette semaine, mettant à jour plusieurs bibliothèques et une nouvelle version de GNOME, Ruby, Samba, Mozilla et le compilateur LLVM.

L'instantané 20191018 a fourni des mises à jour mineures pour Mozilla Firefox 69.0.3 et Thunderbird 68.1.2. La mise à jour de Firefox a corrigé un bug qui invitait les utilisateurs de Yahoo mail à télécharger des fichiers en cliquant sur les courriels et la mise à jour Thunderbird a corrigé quelques problèmes ainsi que l'importation de contacts dans le carnet d'adresses à partir d'un fichier CSV. La suite logicielle GNOME a été mise à jour vers la version 3.34, qui pourrait être la version qui entrera dans openSUSE Leap 15.2. Cette version de GNOME, nommée Thessaloniki, inclut des mises à jour visuelles pour un certain nombre d'applications et les paramètres de sélection d'arrière-plan ont également fait l'objet d'une refonte, ce qui facilite la sélection d'arrière-plans personnalisés. Les développeurs utilisant GNOME 3.34 remarqueront davantage de sources de données dans Sysprof facilitant le profilage des performances des applications. Les améliorations apportées à Builder incluent un inspecteur intégré D-Bus. Les liaisons Javascript pour GNOME ont également été mises à jour avec la version gjs 1.58.1 et la version gtk3 3.24.12 a corrigé un décalage de pointeur sous X11 et Wayland. L'environnement d'exécution Python2 a été supprimé avec la mise à jour de samba 4.11.0; python 3.4 ou une version ultérieure est désormais requise.

L'instantané 20191018 apportait une mise à jour du nouveau langage de programmation vala 0.46.3 qui se concentre sur les développeurs GNOME. Le langage de programmation ruby 2.6.5 a corrigé une vulnérabilité d'injection de code avec trois autres Vulnérabilités et expositions courantes. La paquet Snapper d'OpenSUSE 0.8.5 a été mis à jour pour permettre le suivi des commentaires dans les fichiers de configuration. Le noyau Linux a été mis à jour en 5.3.6. NetworkManager 1.18.4 a amélioré la gestion des règles de routage, des règles ajoutées en externe et des règles reprises après le redémarrage d'un service NetworkManager. Le package NetworkManager-applet 1.8.24 a ajouté la prise en charge de l'authentification SAE (WPA3 Personnel). Des correctifs de régression ont été apportés aux versions 2.62.1 de glib2 et de glib-networking; ce dernier a également inclus deux corrections de fuite mémoire. Les autres paquets remarquables mis à jour dans l'instantané étaient webkit2gtk3 2.26.1, libsoup 2.68.2, grilo 0.3.10 et dconf 0.34.0.

Selon le commentateur de clichés Tumbleweed, l’instantané a une cote stable de 92.

La plupart des mises à jour de l'instantané 20191016 concernaient des paquets YaST2. Un plantage causé par une méthode de widget a été corrigé dans yast2-network 4.2.23 et au moins 10 langues ont été mises à jour dans le package yast2-trans. Les personnes peuvent contribuer au projet en traduisant via l'instance openSUSE's Weblate. Il y avait une poignée d'autres paquets mis à jour dans l'instantané, mais le plus important à noter est une nouvelle version majeure de llvm9. La nouvelle version majeure du compilateur nécessite uniquement une base python3 au lieu des paquets python3 complets. L'optimiseur LLVM convertira désormais les appels à memcmp en appels à bcmp dans certaines circonstances. La version majeure ne considère plus non plus la cible RISCV comme "expérimentale". Il est maintenant construit par défaut, plutôt que d'avoir besoin d'être activé avec LLVM\ EXPERIMENTAL\ TARGETS_TO_BUILD.

Cet instantané a enregistré une note stable de 91, selon le commentateur de clichés Tumbleweed.

Updated via GHActions

Tags: opensuse

a silhouette of a person's head and shoulders, used as a default avatar

Skia branch merged to master

So, the branch implementing VCL drawing based on the  Skia graphics library has been merged in.
All(?) the necessary info about how to enable it etc. are in this mail, but there are things that better fit a blog post than a mail, and in this case that's going to be a table and a picture showing how well it may perform. Note that these results are from running visualbackendtest, which is not really a benchmark, so these numbers should be taken with a grain of salt. It's just a test that draws a gradient, several big polygons (each circle is actually 720 lines) and short text.
And LibreOffice of course does many more things than just paint on the screen. And it's not just about performance of drawing (some of these e.g. do not double-buffer, which makes things like alpha blending complicated and slow). And for some of these we could discuss the complicated reasons for why the numbers are what they are. But still, some of the numbers are interesting:
Render method FPS
Linux gen (X11) 86
Linux gtk3 70-90
Linux OpenGL 45
Linux Skia Vulkan (GPU) 65-90
Linux Skia raster (CPU) 5
Windows GDI 64
Windows OpenGL 40-60
Windows Skia Vulkan (GPU) 175-185
Windows Skia raster (CPU) 75-85


the avatar of Nathan Wolf

Broken Headband on Bluetooth Headphones | Repair Instead of Replace

I purchased a medium of the road Bluedio headset that I have been using in both Bluetooth and wired modes. It’s pretty decent and they fit my head well. Unfortunately, my Magilla Guerrilla handling of it I snapped the headband. I didn’t think I was being rough with it but I do have a track … Continue reading Broken Headband on Bluetooth Headphones | Repair Instead of Replace

the avatar of Federico Mena-Quintero

Moving gnome-shell's styles to Rust

Gnome-shell uses CSS processing code that dates from HippoCanvas, a CSS-aware canvas from around 2006. It uses libcroco to parse CSS, and implements selector matching by hand in C.

This code is getting rather dated, and libcroco is unmaintained.

I've been reading the code for StTheme and StThemeNode, and it looks very feasible to port it gradually to Rust, by using the same crates that librsvg uses, and eventually removing libcroco altogether: gnome-shell is the last module that uses libcroco in distro packages.

Strategy

StTheme and StThemeNode use libcroco to load CSS stylesheets and keep them in memory. The values of individual properties are just tokenized and kept around as a linked list of CRTerm; this struct represents a single token.

Later, the drawing code uses functions like st_theme_node_lookup_color(node, "property_name") or st_theme_node_lookup_length() to query the various properties that it needs. It is then that the type of each property gets determined: prior to that step, property values are just tokenized, not parsed into usable values.

I am going to start by porting the individual parsers to Rust, similar to what Paolo and I did for librsvg. It turns out that there's some code we can share.

So far I have the parser for colors implemented in Rust. This removes a little bunch of code from the C parsers, and replaces it with a little Rust code, since the cssparser crate can already parse CSS colors with alpha with no extra work — libcroco didn't support alpha.

As a bonus, this supports hsl() colors in addition to rgb() ones out of the box!

After all the parsers are done, the next step would be to convert the representation of complete stylesheets into pure Rust code.

What can we expect?

A well-maintained CSS stack. Firefox and Servo both use the crates in question, so librsvg and gnome-shell should get maintenance of a robust CSS stack "for free", for the foreseeable future.

Speed. Caveat: I have no profile data for gnome-shell yet, so I don't know how much time it spends doing CSS parsing and cascading, but it looks like the Rust version has a good chance of being more efficient.

The selectors crate has some very interesting optimizations from Mozilla Servo, and it is also now used in Firefox. It supports doing selector matching using Bloom filters, and can also avoid re-cascading child nodes if a change to a parent would not cause its children to change.

All the parsing is done with zero-copy parsers thanks to Rust's string slices; without so many malloc() calls in the parsing code path, the parsing stage should really fly.

More CSS features. The selectors crate can do matching on basically all kinds of selectors as defined by recent CSS specs; one just has to provide the correct hooks into the calling code's representation of the DOM tree. The kind of matching that StTheme can do is somewhat limited; the rustification should make it match much more closely to what people expect from CSS engines in web browsers.

A well-defined model of property inheritance. StThemeNode's model for CSS property inheritance is a bit ad-hoc and inconsistent. I haven't quite tested it, but from looking at the code, it seems that not all properties get inherited in the same way. I hope to move it to something closer to what librsvg already does, which should make it match people's expectations from the web.

In the meantime

I have a merge request ready to simply move the libcroco source code directly inside gnome-shell's source tree. This should let distros remove their libcroco package as soon as possible. That MR does not require Rust yet.

My playground is here:

This does not compile yet! I'll plug things together tomorrow.

(Oh, yes, the project to redo Firefox's CSS stack in Rust used to be called Stylo. I'm calling this Stylish, as in Styles for the Shell.)

the avatar of Nathan Wolf

Ubuntu 19.10 | Review from an openSUSE User

Ubuntu is, without any dispute, the most prolific Linux distribution today. You can look at any metric and you will see that Ubuntu is number one. How did they rise to this level? I can only speculate, perhaps it has to do with the charismatic and enthusiastic visionary of Canonical’s founder Mark Shuttleworth that made … Continue reading Ubuntu 19.10 | Review from an openSUSE User

the avatar of Nathan Wolf
the avatar of Ish Sookun

अगला openSUSE Asia Summit भारत में होगा

पिचले सितंबर को Bali, Indonesia के Udayana University में openSUSE Asia Summit 2019 घटित हुआ। लगातार दो दिनों तक दुनिया के कोने कोने से आए हुए इंजीनियरों, डेवलपर्स, डिजाइनरों और कइ तरह के openSUSE योगदानकर्ताओं ने मिलकर तकनीकी प्रदर्शन तथा अन्य कार्यशालाएँ आयोजित कीं।

इस सम्मेलन के द्वारा openSUSE समुदाय अपने उपयोगकर्ताओं और योगदानकर्ताओं को एक साथ लाता हें ताकि इन में openSUSE प्रोजैक्ट को लेकर बातचीत हो सके। बोर्ड के सदस्य समुदाय को प्रोजैक्ट से संबंधित जानकारी देते हैं। नए उपयोगकर्ता इस सम्मेलन से बहुत लाभ उठा सकते हैं।

सम्मेलन के समापन समारोह से पहले यह घोषित कि गइ की अगला सम्मेलन, याने कि openSUSE Asia Summit 2020, मानव रचना इंटरनेशनल इंस्टिट्यूट ऑफ़ रिसर्च एंड स्टडीस (Manav Rachna Int'l Institute of Research & Studies), फरीदाबाद, हरियाणा, भारत (Faridabab, Haryana, India) में होगा। इंस्टिट्यूट की प्रतिनिधि, शोभा त्यागी, ने विस्तार से अपना प्रस्ताव बाताया जोकी सम्मेलन के आयोजकों ने स्वीकार किया।

the avatar of Chun-Hung sakana Huang

將GCP Stackdriver Alert 傳送到 telegram 小記

將GCP Stackdriver Alert 傳送到 telegram 小記

OS: container with openSUSE Leap 15.1

上次寫的是 “使用 Stackdriver 監控 GCE CPU 使用率, 超出監控值主動發出通知”, 通知的方式是 E-mail

那如果要更即時的方式呢?
所以接下來就來實驗透過 Telegram 來接受訊息 :)

首先要來建立 telegram bot

可以點選 以下網址 開啟 telegram 

或是在 telegram 程式中 

搜尋 @botfather


點選 START


接下來就會進入對話
也可以看到剛剛點選的 /start


輸入 /newbot 建立 bot

接下來會被要求輸入 bot 名稱, 這邊我以 sakana-gcp 為例子
輸入 sakana-gcp


然後是建立 bot 的使用者, 必須以 bot 結尾

我這邊以 sakana_gcp_bot 為例
輸入 sakana_gcp_bot
  • 這邊的命名規則不給輸入 - , 所以我用底線



建立完成會給 bot 的 HTTP API TOKEN


整理一下
  • Bot 名稱( 顯示名稱 ): sakana-gcp
  • Bot 使用者名稱(帳號): sakana_gcp_bot


接下來觀察 bot 是否可以加入群組

輸入 /setjoingroups
  • 預設是 Enable, 就是 bot 可以被加入群組
  • 如果被要求輸入 bot , 要輸入的是 bot 使用者名稱, @sakana_gcp_bot 


建立 Group



搜尋剛剛建立的 bot
點選 sakana-gcp , 點選其他要加入的人, 例如自己
點選 NEXT


輸入群組名稱
點選 CREATE GROUP 建立群組


接下來檢查是否可以查到已經加入群組的資訊, 以及 Group ID

使用 curl 指令 針對 bot 查詢資訊
> curl  https://api.telegram.org/botYOUR_TOKEN/getUpdates

{"ok":true,"result":[]}

  • 這邊的 YOUR_TOKEN 就是剛剛 @botfather 給的 TOKEN

  • 如果result 是空的, 就把 bot 從群組踢出去再加入一次, 再試試看

從資料中取得 Group Chat ID


使用 curl 確認是否可以用這個 Group Chat ID 發送訊息

>curl  -X  POST  "https://api.telegram.org/botYOUR_TOKEN/sendMessage"   -d "chat_id=YOUR_CHAT_ID&text=my sample text"

  • -X 是 request , -d 是 data
    • 注意雙引號各把 host 以及 data 內容標示住

成功的話應該會看到訊息



Cloudfunction 部分

使用 container 方式來建立相關程式
  • 要有 npm 套件, 等等在 container 內建立, 不影響自己環境

> docker  run  -v  ~/.aws:/root/.aws  -v  ~/.azure:/root/.azure  -v ~/.config/gcloud:/root/.config/gcloud  -it  sakana/ansible_opensuse151  /bin/bash



==== 在 contaienr 內 ( openSUSE Leap 15.1 with ansible and cloud tools ) ====

安裝 npm
# zypper  install  npm

Loading repository data...
Reading installed packages...
'npm' not found in package names. Trying capabilities.
Resolving package dependencies...

The following 8 NEW packages are going to be installed:
  libicu60_2 libicu60_2-ledata nodejs-common nodejs10 nodejs10-devel npm10 system-user-nobody timezone

8 new packages to install.
Overall download size: 17.8 MiB. Already cached: 0 B. After the operation, additional 71.0 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y


建立 telegram 目錄
# mkdir  telegram

進入 telegram 目錄
# cd  telegram

建立 index.js

# vi   index.js

const axios = require('axios');
// replace the value below with the Telegram token you receive from @BotFather
const token = '[YOUR_TOKEN]';
const chatId ='[YOUR_CHAT_ID]';
const url = `https://api.telegram.org/bot${token}/sendMessage`;
function sendMessage(msg) {
  return axios.post(url, {
   chat_id: chatId,
   text: msg,
});
}
exports.trigger = (req, res) => {
 const incident = req.body.incident;
 const policy = incident.policy_name;
 const cond = incident.condition_name;
 const state = incident.state;
 const url = incident.url;
 const msg = `${policy} ${cond} is ${state}, please check ${url}`
 console.log(msg);
 sendMessage(msg)
 .then(function (response) {
   console.error('invoke telegram');
   res.send({ status: 'OK'});
 })
.catch(function (error) {
  console.error(error);
  res.sendStatus(500);
 });
};

執行 npm init , 全都按照預設值

# npm  init

This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (telegram) 
version: (1.0.0) 
description: 
entry point: (index.js) 
test command: 
git repository: 
keywords: 
author: 
license: (ISC) 
About to write to /telegram/package.json:

{
  "name": "telegram",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}


Is this OK? (yes)  Y


安裝 axios 

# npm install axios

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN telegram@1.0.0 No description
npm WARN telegram@1.0.0 No repository field.

+ axios@0.19.0
added 5 packages from 8 contributors and audited 5 packages in 2.123s
found 0 vulnerabilities

觀察相關資訊

# ls
index.js  node_modules  package-lock.json  package.json

# cat  package.json 

{
  "name": "telegram",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "axios": "^0.19.0"
  }
}

佈署 cloud function ( 因為是用 container with cloud tools 環境, 所以有 gcloud 指令可以用 )

# gcloud  functions  deploy  trigger  --runtime  nodejs8  --trigger-http  --region  asia-east2 --project  YOUR_PROJECT_ID

  • trigger 是名稱
  • region 的部分, asia-east 只有 asia-east2
  • Project 後面請用自己的 project ID

輸出的訊息中會有 httpsTrigger URL , 等等會拿來使用

url: https://asia-east2-YOUR_PROJECT.cloudfunctions.net/trigger

另外還有一段警告訊息 
WARNING: Function created with limited-access IAM policy. To enable unauthorized access consider "gcloud alpha functions add-iam-policy-binding trigger --region=asia-east2 --member=allUsers --role=roles/cloudfunctions.invoker"



接下來建立 Stackdriver Webhook
點選專案內的選單 STACKDRIVER -- > Monitoring



在 Stackdriver 頁面
點選專案的下拉式選單 -- > 點選 Workspace Settings

點選 Notifications -- > 點選 WEBHOOKS -- > 點選 Add Webhook


填入  httpsTrigger URL 
填入 Webhook name



這個時候如果點選 Test Connection , 但是 Telegram bot 沒有傳送訊息
那就要回到 Container 內下剛剛被提示的指令

# gcloud  alpha  functions  add-iam-policy-binding  trigger  --region=asia-east2 --member=allUsers --role=roles/cloudfunctions.invoker


再次在 Webhook 頁面點選 Test Connection
會看到 undefind 訊息這樣就算是成功了


接下來就是可以針對 Stackdriver 的 alert 增加 telegram ( 使用 web hook 方式 )通知

選一個要加入的 Alert policy , 點選選單內的 Edit


在 Notification 的地方
請將下拉式選單拉到底 ~~ 才會看到 Webhook with Token Authentication


選取 剛剛建立的 Webhook 點選 Add Notification Channel


記得點選 Save 存檔


測試方式, 我的警示條件是 CPU 大於一定百分比就發出警告
  • 登入該台 VM, 使用 # stress-ng -c 4 --cpu-method all 進行壓測


接下來就會觀察到 telegram bot 送來相關訊息


Future work
  • Bot 的管控
  • Cloud function with iam policy binding 




這樣也算是向 Cloud function 前進一步了 :)

~ enjoy it


Notes: 刪除 telegram bot 方式



Reference



a silhouette of a person's head and shoulders, used as a default avatar

openSUSE Tumbleweed – Review of the week 2019/47

Dear Tumbleweed users and hackers,

Another week, in which openQA did block some of the snapshots – and some issues it was unfortunately not able to see. Anyway, during the week 2019/47 we have released three snapshot into the wild (1116, 1118 and 1119), containing those changes:

  • Mesa 19.2.4: fixes critical rendering issues from earlier Mesa 19.2.3. As this rendering issue did not happen on all graphics adapters, openQA had no chance of spotting it
  • Linux kernel 5.3.11
  • KDE Plasma 5.17.3
  • Subversion 1.13.0
  • binutils 2.33.1

The things being worked on include:

  • openssl 1.1.1d: will be part of snapshot 1121 and later)
  • rpm 4.15.0: the new python dependency generator is nasty, as it adds much more dependencies that were the before (probably a good thing), exposing new build cycles
  • Python 3.8
  • Rust 1.39.0: break Firefox and Thunderbird so far
  • Perl 5.30.1
  • libxml 2.9.10: breaks perl-XML-LibXSLT (on i586 only, invalid free() )
the avatar of YaST Team

Highlights of YaST Development Sprints 88 and 89

The Contents

A More User Friendly Role Selector Dialog

Step by step, we continue improving the user experience making use of the newly added widgets to libyui. This sprint was the turn to update the role selection dialog to use the new item selector introduced during the sprint 87. Apart from looking better as it can be seen in the screenshots below, there are two immediate improvements:

  • the vertical scroll, when present, is respected after selecting a role (instead of “jumping to the beginning”), and
  • the selected role (if any) will be visible when arriving at the dialog even when the list is quite long or the available space too short.
Before After
   

What is more, updating the dialog was also useful for us to realize about some needed improvements for the widget itself, mentioned in the next section. Quite a productive change :smiley:

When one Bit is not Enough: The CustomStatusItemSelector

A few weeks ago, we wrote about the new ItemSelector widget that is finding its way into YaST user interfaces. It turned out that just a simple on/off status is not enough in some cases, so we had to extend that concept. For example, software modules may have dependencies, and we want to show the difference between one that was explicitly selected by the user and one that was auto-selected because some other software module requires it.

This kind of shook the foundations of the underlying classes; all of a sudden a bit is no longer just a bit, but it needs to be broken down into even smaller pieces. Well, we cheated; we now use integer values instead. Most of the class hierarchy still only uses 0 and 1, but the new YCustomStatusItemSelector also supports using higher numbers for application-defined purposes.

For each possible status value, the application defines the name of the icon to be displayed (for graphical UIs like the Qt UI), the text equivalent (for text mode / the NCurses UI), and an optional nextStatus which tells the widget what status to cycle to when the user changes the status of an item with a mouse click or with the keyboard. A value of -1 lets the application handle this.

So this is not a one-trick-pony that is useful only for that one use case (the software modules), but a generic tool that might find good uses in other places all over YaST as well.

Usage examples: C++, Ruby.

Snapper and Machine-readable Output

Most likely you already know snapper, a great tool to work with your filesystem snapshots. Some third-party scripts and tools (e.g., YaST) use the snapper CLI to get some information, but generally, snapper generates an output intended to be human-readable. Sometimes that could cause some troubles in scripts checking the snapper output. Now on, snapper also offers CLI options to generate its output in a machine-readable format, i.e., CSV and JSON. Please, check this post for more information about those new options.

Fix Boot Problems with Remote Encrypted Devices

Since we adopted systemd, the management during system boot of encrypted devices on top of network-based devices like iSCSI or FCoE disks has been less than optimal. But now we are happy to announce that we have put all the pieces together to make the experience as smooth as possible.

One of the main responsibilities of systemd is sorting the actions performed during boot and setting the dependencies between them. For example, if there are encrypted devices, systemd will first ask you for the password and activate the devices to afterwards mount the file system contained in those encrypted devices. Systemd should be able to distinguish when an encrypted device is based on a network-based storage device and, thus, can only be initialized after the network is up. In some cases that detection failed (for example network block device based mounts, such as iSCSI and FCoE disks) and systemd got stuck before initializing the network waiting for the device to be available.

Recently, SLE and openSUSE Leap has incorporated support for specifying the _netdev option in the /etc/crypttab file. With such option, systemd will recognize the encrypted device as network-based and will only try to activate it after setting up the network. That’s analogous to the corresponding _netdev option in /etc/fstab that has been already there for quite some time and that can be used to defer when a device is mounted. For it to work properly, the _netdev option must be present in all the relevant entries of both crypttab and fstab.

And that’s exactly what YaST will do now in openSUSE Tumbleweed and upcoming releases of both SLE and openSUSE Leap. From now on, the _netdev option will be added fstab for all mount points depending (directly or indirectly) on the network. In addition, that option (and also the noauto and nofail ones) will be propagated from fstab to all the corresponding crypttab entries.

This should mark the end of a dark age of encrypted iSCSI and FCoE devices timing out during boot.

AutoYaST Support for Random and Pervasive Encryption

Back in October, we announced that YaST got support for new encryption methods like random or pervasive encryption. At that time, AutoYaST was out of scope because we wanted to have a stable (and tested) API first. Fortunately, the time has come and now AutoYaST supports these encryption mechanisms.

Starting in autoyast2 4.2.17, you can specify the encryption method using a crypt_method element, as shown in the example below. Possible values are luks1 (regular LUKS1 encryption), pervasive_luks2 (pervasive volume encryption), protected_swap (encryption with volatile protected key), secure_swap (encryption with volatile secure key) and random_swap (encryption with volatile random key).

<drive>
 <type config:type="symbol">CT_DISK</type>
 <use>all</use>
 <partitions config:type="list">
  <partition>
   <size>20G</size>
   <mount>/</mount>
   <filesystem config:type="symbol">ext4</filesystem>
   <crypt_method config:type="symbol">luks1</crypt_method> <!-- default method if crypt_key is defined -->
   <crypt_key>S3CR3T</crypt_key>
  </partition>
  <partition>
   <size>1G</size>
   <mount>swap</mount>
   <crypt_method config:type="symbol">random_swap</crypt_method> <!-- set encryption method -->
  </partition>
 </partitions>
</drive>

As we want AutoYaST to be as user-friendly as possible, it will try to help you if you do some mistake setting the encryption configuration as when in the screenshot below.

Finally, the old crypt_fs element is deprecated, although it stills works for backward-compatibility reasons. Basically, it is equivalent to setting crypt_method to luks1.

Improve Support for AutoYaST Guided Partitioning

When it comes to partitioning, we can categorize AutoYaST use cases into three different levels:

  • Automatic partitioning: the user does not care about the partitioning and trusts in AutoYaST to do the right thing.
  • Guided partitioning: the user would like to set some basic settings (use LVM, set an encryption password, etc.)
  • Expert partitioning: the user specifies how the layout should look, although a complete definition is not required.

To some extent, it is like using the regular installer where you can skip the partitioning screen and trust in YaST, use the Guided Proposal, or define the partitioning layout through the Expert Partitioner.

The second level (Guided partitioning) was introduced in AutoYaST with the release of SUSE Linux Enteprise 15 (and Leap 15.0) but it was not documented at all. Additionally, although it was working as designed at first sight, it was far from being that useful.

This sprint with invested quite some time improving the documentation (kudos to our awesome documentation team) and the behaviour. Now, if you want to set up an LVM system without having the specify all the details, you can use the following snippet in your profile:

<general>
  <storage>
    <lvm config:type="boolean">true</lvm>
  </storage>
</general>

If you are interested in the available options, you can check the documentation draft.