mieki256's diary



2024/04/04(木) [n年前の日記]

#2 [prog] MSYS2パッケージをダウングレードしておいた

ここ最近、xzパッケージにバックドアが仕掛けられていたという事件が気になってる。MSYS2 のxzパッケージを調べてみたら、事件を起こしたバージョン、5.6.1 が入ってた…。

pacman -Ss xz

念のために、一つ前の 5.4.6-2 にダウングレードしてみたい。MSYS2上でそんなことをして意味があるのかないのか分からんけど…。まあ、pacman でダウングレードする方法を知っておいてもいいだろう…。

_パッケージのダウングレード - ArchWiki
_MSYS2でパッケージをダウングレードする - Qiita

/var/cache/pacman/pkg/ に、pacmanのキャッシュが残ってるらしい。調べてみたら、古いバージョンも残っていた。

$ ls /var/cache/pacman/pkg/ | grep xz
mingw-w64-i686-xz-5.4.5-1-any.pkg.tar.zst
mingw-w64-i686-xz-5.4.5-1-any.pkg.tar.zst.sig
mingw-w64-i686-xz-5.4.6-1-any.pkg.tar.zst
mingw-w64-i686-xz-5.4.6-1-any.pkg.tar.zst.sig
mingw-w64-i686-xz-5.4.6-2-any.pkg.tar.zst
mingw-w64-i686-xz-5.4.6-2-any.pkg.tar.zst.sig
mingw-w64-i686-xz-5.6.1-2-any.pkg.tar.zst
mingw-w64-i686-xz-5.6.1-2-any.pkg.tar.zst.sig
mingw-w64-x86_64-xz-5.4.5-1-any.pkg.tar.zst
mingw-w64-x86_64-xz-5.4.5-1-any.pkg.tar.zst.sig
mingw-w64-x86_64-xz-5.4.6-1-any.pkg.tar.zst
mingw-w64-x86_64-xz-5.4.6-1-any.pkg.tar.zst.sig
mingw-w64-x86_64-xz-5.4.6-2-any.pkg.tar.zst
mingw-w64-x86_64-xz-5.4.6-2-any.pkg.tar.zst.sig
mingw-w64-x86_64-xz-5.6.1-2-any.pkg.tar.zst
mingw-w64-x86_64-xz-5.6.1-2-any.pkg.tar.zst.sig
xz-5.4.5-1-x86_64.pkg.tar.zst
xz-5.4.5-1-x86_64.pkg.tar.zst.sig
xz-5.4.6-1-x86_64.pkg.tar.zst
xz-5.4.6-1-x86_64.pkg.tar.zst.sig
xz-5.4.6-2-x86_64.pkg.tar.zst
xz-5.4.6-2-x86_64.pkg.tar.zst.sig
xz-5.6.1-2-x86_64.pkg.tar.zst
xz-5.6.1-2-x86_64.pkg.tar.zst.sig

$ ls /var/cache/pacman/pkg/ | grep lzma
liblzma-5.4.5-1-x86_64.pkg.tar.zst
liblzma-5.4.5-1-x86_64.pkg.tar.zst.sig
liblzma-5.4.6-1-x86_64.pkg.tar.zst
liblzma-5.4.6-1-x86_64.pkg.tar.zst.sig
liblzma-5.4.6-2-x86_64.pkg.tar.zst
liblzma-5.4.6-2-x86_64.pkg.tar.zst.sig
liblzma-5.6.1-2-x86_64.pkg.tar.zst
liblzma-5.6.1-2-x86_64.pkg.tar.zst.sig

pacman -U でダウングレードできる。

pacman -U file:///var/cache/pacman/pkg/mingw-w64-i686-xz-5.4.6-2-any.pkg.tar.zst
pacman -U file:///var/cache/pacman/pkg/mingw-w64-x86_64-xz-5.4.6-2-any.pkg.tar.zst
pacman -U file:///var/cache/pacman/pkg/xz-5.4.6-2-x86_64.pkg.tar.zst
pacman -U file:///var/cache/pacman/pkg/liblzma-5.4.6-2-x86_64.pkg.tar.zst

$ pacman -Ss xz
clangarm64/mingw-w64-clang-aarch64-xz 5.6.1-2
    Library and command line tools for XZ and LZMA compressed files (mingw-w64)
mingw32/mingw-w64-i686-xz 5.6.1-2 [インストール済み: 5.4.6-2]
    Library and command line tools for XZ and LZMA compressed files (mingw-w64)
mingw64/mingw-w64-x86_64-xz 5.6.1-2 [インストール済み: 5.4.6-2]
    Library and command line tools for XZ and LZMA compressed files (mingw-w64)
ucrt64/mingw-w64-ucrt-x86_64-xz 5.6.1-2
    Library and command line tools for XZ and LZMA compressed files (mingw-w64)
clang32/mingw-w64-clang-i686-xz 5.6.1-2
    Library and command line tools for XZ and LZMA compressed files (mingw-w64)
clang64/mingw-w64-clang-x86_64-xz 5.6.1-2
    Library and command line tools for XZ and LZMA compressed files (mingw-w64)
msys/liblzma 5.6.1-2 (libraries) [インストール済み: 5.4.6-2]
    Library for XZ and LZMA compressed files
msys/xz 5.6.1-2 (compression) [インストール済み: 5.4.6-2]
    Library and command line tools for XZ and LZMA compressed files

インストール済み、が 5.4.6-2 になった。

ダウングレードできたら、/etc/pacman.conf の IgnorePkg= にパッケージ名を追加する必要があるらしい。これをしておかないとアップグレードされてしまうのだとか。

vi /etc/pacman.conf
IgnorePkg   = xz liblzma mingw-w64-i686-xz mingw-w64-x86_64-xz

これで合ってるのかな…。分からん…。

以上です。

過去ログ表示

Prev - 2024/04 -
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

カテゴリで表示

検索機能は Namazu for hns で提供されています。(詳細指定/ヘルプ


注意: 現在使用の日記自動生成システムは Version 2.19.6 です。
公開されている日記自動生成システムは Version 2.19.5 です。

Powered by hns-2.19.6, HyperNikkiSystem Project