DEV Community

nabbisen
nabbisen

Posted on • Originally published at scqr.net

Devuan アップグレード: 4 から 5 Daedalus へ

はじめに

DevuanDebian GNU+Linux のフォークであり、systemd への依存が無いディストリビューションです。

新しいメジャーバージョンである 5 - Daedalus (ディダラス、ダイダロス) がこの八月 (2023-08-14) に リリースされました (英語) 🎉 前回 (英語) の 4 - Chimaera (キメラ) から二年近くの時を経てのリリースでした。
Debian 12 - Bookworm (ブックウォーム) と Linux 6.1 (LTS) がベースになっています ☺️

私は、公式ガイド "Upgrade to Daedalus (英語)" の助けを借りながら、ワークステーションを複数アップグレードしました。本記事はその記録です。

環境

  • OS: Devuan GNU+Linux
    • バージョン: 🌟 5 🇩aedalus ⬅️ 🌟 4 🇨himaera
  • Init システム: OpenRC
  • デスクトップ環境: Xfce

基本の手順

最初のそして最も重要なステップは、パッケージ・リポジトリを Chimaera から Daudalus へ向け変えることです:

# nvim /etc/apt/sources.list 
Enter fullscreen mode Exit fullscreen mode

実際にアップデートする前に、Python に依存していないシェル (shell) を使っていることを確認してください。fish を使っているような場合には要注意です:

$ # (optional) $ bash 
Enter fullscreen mode Exit fullscreen mode

パッケージのアップデートを実行します。時間を掛けて多くのパッケージの更新が行われます。さらにその中ではいくつかの質問も行われます:

# apt update 
Enter fullscreen mode Exit fullscreen mode

アップグレードのために xscreensaver が実行中の場合は停止させます:

$ killall xscreensaver 
Enter fullscreen mode Exit fullscreen mode

ディストリビューションのアップグレードを実行します:

# apt dist-upgrade 
Enter fullscreen mode Exit fullscreen mode

クリーンアップして終了です:

# apt autoremove --purge # apt autoclean 
Enter fullscreen mode Exit fullscreen mode

以下に詳細を記述します。個々のステップでの出力結果と選択肢も記載しています。


詳細

doasOpenBSD 由来 のものですが、いずれも sudo に置き換え可能です。

互換性の確認

事前に Devuan Daedalus リリース・ノート (英語) に目を通しておくと良いでしょう。

リポジトリの置き換え

必要に応じて前バージョンのバックアップを作成しておきましょう。以下のようなコマンドが使えます:

$ # (optional) $ doas cp -p /etc/apt/sources.list /etc/apt/sources.list.bk-chimaera 
Enter fullscreen mode Exit fullscreen mode

さあ、Daudauls へのマイグレーションを始めましょう:

$ doas nvim /etc/apt/sources.list 
Enter fullscreen mode Exit fullscreen mode

chimaeradaedalus に置き換えます:

< deb http://deb.devuan.org/merged chimaera main non-free contrib < deb-src http://deb.devuan.org/merged chimaera main non-free contrib > deb http://deb.devuan.org/merged daedalus main non-free contrib > deb-src http://deb.devuan.org/merged daedalus main non-free contrib < deb http://pkgmaster.devuan.org/merged chimaera-security main contrib non-free < deb-src http://pkgmaster.devuan.org/merged chimaera-security main contrib non-free > deb http://pkgmaster.devuan.org/merged daedalus-security main contrib non-free > deb-src http://pkgmaster.devuan.org/merged daedalus-security main contrib non-free < deb http://deb.devuan.org/merged chimaera-updates main contrib non-free < deb-src http://deb.devuan.org/merged chimaera-updates main contrib non-free > deb http://deb.devuan.org/merged daedalus-updates main contrib non-free > deb-src http://deb.devuan.org/merged daedalus-updates main contrib non-free 
Enter fullscreen mode Exit fullscreen mode

パッケージの更新

準備ができました。パッケージのアップデートを行いましょう:

$ doas apt update 
Enter fullscreen mode Exit fullscreen mode

以下のように出力されます。それから最初の質問が表示されます:

Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: (...) Use 'apt autoremove' to remove them. The following NEW packages will be installed: (...) The following packages have been kept back: (...) The following packages will be upgraded: (...) 1595 upgraded, 233 newly installed, 0 to remove and 117 not upgraded. Need to get 1587 MB of archives. After this operation, 2563 MB of additional disk space will be used. Do you want to continue? [Y/n] y 
Enter fullscreen mode Exit fullscreen mode

以下のように続きます:

Get:1 (...) (...) Fetched 1533 MB in 2min 58s (8612 kB/s) Reading changelogs... 
Enter fullscreen mode Exit fullscreen mode

changelog (変更履歴) が表示されます:

apt-listchanges: News --------------------- adduser (3.130) unstable; urgency=low  deluser's --no-preserve-root option is deprecated, and it will be (...) 
Enter fullscreen mode Exit fullscreen mode

それから以下のように続きます:

Reading changelogs... Done Extracting templates from packages: 100% Preconfiguring packages ... 
Enter fullscreen mode Exit fullscreen mode

次の質問が表示されます。コンソール設定に関するものたちです:

devuan-upgrade-daedalus-console-01

devuan-upgrade-daedalus-console-02

回答内容はもちろんあなたの環境によります。私はいずれもデフォルトを選択しました。

その後、以下のように続きます:

Installing new version of config file /etc/debian_version ... Installing new version of config file /etc/devuan_version ... Installing new version of config file /etc/issue ... Installing new version of config file /etc/issue.net ... (...) Setting up libc6:amd64 (2.36-9+deb12u1) ... 
Enter fullscreen mode Exit fullscreen mode

以下のようにたずねられるでしょう:

devuan-upgrade-daedalus-libc-01

続けて次のような質問がされる場合もあります:

devuan-upgrade-daedalus-libc-02

その後は以下のように続きます:

Restarting services possibly affected by the upgrade: cups: restarting...done. cron: restarting...done. Services restarted successfully. (...) Setting up devuan-keyring (2023.05.28) ... 
Enter fullscreen mode Exit fullscreen mode

質問があといくつか表示されます。

Setting up devuan-keyring (2023.05.28) ... Configuration file '/etc/apt/trusted.gpg.d/devuan-keyring-2016-archive.gpg'  ==> File on system created by you or by a script.  ==> File also in package provided by package maintainer.  What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** devuan-keyring-2016-archive.gpg (Y/I/N/O/D/Z) [default=N] ? Y 
Enter fullscreen mode Exit fullscreen mode

ここでの私の選択は、上のように、上書きでした。出力が続きます:

(...) Setting up cups-ipp-utils (2.4.2-3+deb12u1) ... Setting up slim (1.4.0-0devuan2) ... Installing new version of config file /etc/init.d/slim ... 
Enter fullscreen mode Exit fullscreen mode

次の質問が表示されます:

Configuration file '/etc/slim.conf'  ==> Modified (by you or by a script) since installation.  ==> Package distributor has shipped an updated version.  What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** slim.conf (Y/I/N/O/D/Z) [default=N] ? Y 
Enter fullscreen mode Exit fullscreen mode

私は同じように上書きを選びました。

Removing obsolete conffile /etc/init.d/lvm2 ... Removing obsolete conffile /etc/init.d/lvm2-lvmpolld ... Setting up grub-efi-amd64 (2.06-13) ... Replacing config file /etc/default/grub with new version 
Enter fullscreen mode Exit fullscreen mode

最後の質問です:

devuan-upgrade-daedalus-grub-01

私はきれいな環境につくり直すことにしました。くりかえしになりますが、何を選ぶかはあなたの環境次第です。

あとは自動で終わります。

aspell-autobuildhash: processing: en [en_US-wo_accents-only]. Processing triggers for sgml-base (1.31) ... Processing triggers for ca-certificates (20230311) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Processing triggers for libvlc-bin:amd64 (3.0.18-2) ... Processing triggers for initramfs-tools (0.142) ... update-initramfs: Generating /boot/initrd.img-6.1.0-11-amd64 Processing triggers for dbus (1.14.6-1devuan1) ... Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.10+dfsg-1+b1) ... Processing triggers for shim-signed:amd64 (1.39+15.7-1) ... Processing triggers for ca-certificates-java (20230103) ... done. 
Enter fullscreen mode Exit fullscreen mode

注意: Python に依存するシェル環境では、問題が発生することがある

fish シェルを使っている場合、上の apt update でコンソールに以下のようなエラが出るかもしれません:

/usr/share/fish/functions/prompt_pwd.fish (line 41): Invalid index value  set full $all[2..]  ^ in function 'prompt_pwd' called on line 1 of file /usr/share/fish/functions/fish_prompt.fish in command substitution called on line 33 of file /usr/share/fish/functions/fish_prompt.fish in function 'fish_prompt' in command substitution /usr/share/fish/functions/fish_git_prompt.fish (line 173): $(...) is not supported. In fish, please use '(uname)'. if string match -q Darwin -- "$(uname)" && string match -q /usr/bin/git -- "$(command -s git)" && type -q xcode-select && type -q xcrun  ^ from sourcing file /usr/share/fish/functions/fish_git_prompt.fish called on line 1 of file /usr/share/fish/functions/fish_vcs_prompt.fish in command substitution called on line 4 of file /usr/share/fish/functions/fish_vcs_prompt.fish in function 'fish_vcs_prompt' called on line 1 of file /usr/share/fish/functions/fish_prompt.fish in command substitution called on line 33 of file /usr/share/fish/functions/fish_prompt.fish in function 'fish_prompt' in command substitution source: Error while reading file '/usr/share/fish/functions/fish_git_prompt.fish' /usr/share/fish/functions/prompt_pwd.fish (line 41): Invalid index value  set full $all[2..]  ^ in function 'prompt_pwd' with arguments '-d 1 -D 1' called on line 1 of file /usr/share/fish/functions/fish_title.fish in command substitution called on line 18 of file /usr/share/fish/functions/fish_title.fish in function 'fish_title' in command substitution 
Enter fullscreen mode Exit fullscreen mode

こちらが出ていても、アップグレードは完了できるようでした。しかしながら細部まで含めて成功していたのかはわかりません。

xscreensaver が実行中の場合、停止する

実行します:

$ killall xscreensaver 
Enter fullscreen mode Exit fullscreen mode

ディストリビューションの更新

次に、以下のコマンドを実行します:

$ doas apt dist-upgrade 
Enter fullscreen mode Exit fullscreen mode

パッケージに比べて、格段にシンプルに終わります。以下のように出力されます:

Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: (...) Use 'apt autoremove' to remove them. The following packages will be REMOVED: (...) The following NEW packages will be installed: (...) The following packages will be upgraded: (...) 115 upgraded, 54 newly installed, 14 to remove and 0 not upgraded. Need to get 196 MB of archives. After this operation, 149 MB of additional disk space will be used. Do you want to continue? [Y/n] y 
Enter fullscreen mode Exit fullscreen mode

そしてそれ以上質問されることも無く完了します:

Get:1 (...) (...) Processing triggers for eudev (3.2.12-1) ... Setting up libgnustep-base1.28 (1.28.1+really1.28.0-5) ... Setting up gnustep-base-runtime (1.28.1+really1.28.0-5) ... Setting up unar (1.10.7+ds1+really1.10.1-2+b2) ... Processing triggers for libc-bin (2.36-9+deb12u1) ... 
Enter fullscreen mode Exit fullscreen mode

クリーンアップ

autoremove を実行

$ doas apt autoremove --purge 
Enter fullscreen mode Exit fullscreen mode

以下のように出力されます:

Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be REMOVED: exfat-fuse* golang-github-containernetworking-plugin-dnsname* libaom0* libavcodec58* libavdevice58* libavfilter7* libavformat58* libavutil56* libcmis-0.5-5v5* libcodec2-0.9* libdav1d4* libextutils-pkgconfig-perl* libgs9-common* libicu67* libidn11* libilmbase25* libldap-2.4-2* libmpdec3* libnautilus-extension1a* libneon27-gnutls* libopenexr25* liborcus-0.16-0* liborcus-parser-0.16-0* libperl5.32* libpoppler102* libpostproc55* libpython3.9* libpython3.9-dev* libpython3.9-minimal* libpython3.9-stdlib* libqrcodegencpp1* libsrt1.4-gnutls* libswresample3* libswscale5* libtiff5* libvpx6* libwebp6* libwmf0.2-7* libx264-160* libx265-192* perl-modules-5.32* python3-ldb* python3-talloc* python3.9* python3.9-dev* python3.9-minimal* (...) 0 upgraded, 0 newly installed, 47 to remove and 0 not upgraded. After this operation, 210 MB disk space will be freed. Do you want to continue? [Y/n] y 
Enter fullscreen mode Exit fullscreen mode

そして以下のように終了します:

(...) Unlinking and removing bytecode for runtime python3.9 (...) Processing triggers for desktop-file-utils (0.26-1) ... (Reading database ... 201030 files and directories currently installed.) Purging configuration files for libpython3.9-minimal:amd64 (3.9.2-1) ... Purging configuration files for python3.9-minimal (3.9.2-1) ... 
Enter fullscreen mode Exit fullscreen mode

autoclean を実行

$ doas apt autoclean 
Enter fullscreen mode Exit fullscreen mode

すぐに完了します:

Reading package lists... Done Building dependency tree... Done Reading state information... Done Del libavdevice58 7:4.3.6-0+deb11u1 [128 kB] (...) Del libtirpc-dev 1.3.1-1+deb11u1 [191 kB] 
Enter fullscreen mode Exit fullscreen mode

追加の設定 (必要に応じて)

一例を挙げると /etc/default/grub を編集したい時があるかもしれません。以下を実行すればその変更を適用できます:

$ doas nvim /usr/sbin/update-grub 
Enter fullscreen mode Exit fullscreen mode

実行すると次のように出力されるでしょう:

Generating grub configuration file ... Found background image: splash.png Found linux image: /boot/vmlinuz-6.1.0-11-amd64 Found initrd image: /boot/initrd.img-6.1.0-11-amd64 Found linux image: /boot/vmlinuz-5.10.0-23-amd64 Found initrd image: /boot/initrd.img-5.10.0-23-amd64 Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done 
Enter fullscreen mode Exit fullscreen mode

マシンの再起動 (必要に応じて)

新しい楽しみが見付かりますように 🌄


おわりに

次のように実行すると、アップデートされたことを確認できます:

$ uname --all Linux (...) 6.1.0-11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linux 
Enter fullscreen mode Exit fullscreen mode

ところで次の Devuan プロジェクトはすでに始まっています。"Excalibur" (🇪、エクスカリバー) というコードネームが割り当てられています。今も十分に楽しいですが、次のバージョンも楽しみです ⛵

Top comments (0)