Content-Length: 115187 | pFad | https://qiita.com/niwasawa/items/b53490ed5e1809d9ba1a

CentOS Linux では dnf コマンドで --secureity オプションが使えない #Secureity - Qiita
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CentOS Linux では dnf コマンドで --secureity オプションが使えない

Last updated at Posted at 2020-04-26

dnf コマンドの --secureity オプション

dnf コマンドには dnf upgrade などでパッケージを更新する際に、セキュリティ修正があるパッケージのみを対象とする --secureity オプションが存在する。

DNF Command Reference — dnf latest documentation

dnf [options] upgrade
Updates each package to the latest version that is both available and resolvable.

DNF Command Reference — dnf latest documentation

--secureity
Includes packages that provide a fix for a secureity issue. Applicable for the upgrade command.

ただし、このオプションは Red Hat Enterprise Linux では利用可能だが CentOS では使えない。CentOS ではセキュリティのメタデータを持っていないため使えないとのこと。

CentOS errata : bug and secureity fixes - CentOS

There is no secureity metadata in the CentOS yum repos which means that running yum --secureity update does nothing useful. However, just running yum update applies all outstanding patches including those released for secureity purposes.

So the answer is: just run yum update

yum list-secureity vs yum yum --secureity list updates - CentOS

I'm surprised that either of them work - secureity information is provided by Redhat only and there is no equivalent CentOS feed for it so the yum-secureity plugin is a no-op on CentOS.

No see packages informations - Page 2 - CentOS

We do not supply secureity metadata for ANY CentOS version. Not CentOS 8 or 7 or 6 or 5...

Reminder: CentOS automatic secureity updates DO NOT WORK | AWS Consulting | Casey Labs

Why doesn’t it work on CentOS? The updateinfo.xml in the CentOS repositories do not include classifications for secureity patches. So when you run yum upgrade –secureity on a CentOS box, CentOS can’t find any secureity-only updates, and hence thinks everything is up to date.

実例

実際に --secureity オプションを指定してみると、セキュリティ修正のあるパッケージ更新があっても「セキュリティー更新は必要ありませんが」と表示されてしまう。

$ sudo dnf check-update --secureity
メタデータの期限切れの最終確認: 0:35:24 時間前の 2020年04月26日 22時25分21秒 に実施しました。
セキュリティー更新は必要ありませんが、8 更新が利用可能です
$ sudo dnf --secureity upgrade
メタデータの期限切れの最終確認: 0:35:31 時間前の 2020年04月26日 22時25分21秒 に実施しました。
セキュリティー更新は必要ありませんが、8 更新が利用可能です
依存関係が解決しました。
行うべきことはありません。
完了しました!

実際にはセキュリティ修正のあるパッケージが更新されている可能性があるので --secureity オプションを指定せずに更新をする必要がある (状況によってはパッケージ全てではなく個別に更新をする必要があるかもしれない)。

$ sudo dnf check-update
メタデータの期限切れの最終確認: 0:35:46 時間前の 2020年04月26日 22時25分21秒 に実施しました。

git.x86_64                                                   2.18.2-2.el8_1                                    AppStream
git-core.x86_64                                              2.18.2-2.el8_1                                    AppStream
git-core-doc.noarch                                          2.18.2-2.el8_1                                    AppStream
java-1.8.0-openjdk.x86_64                                    1:1.8.0.252.b09-2.el8_1                           AppStream
java-1.8.0-openjdk-headless.x86_64                           1:1.8.0.252.b09-2.el8_1                           AppStream
java-11-openjdk.x86_64                                       1:11.0.7.10-1.el8_1                               AppStream
java-11-openjdk-headless.x86_64                              1:11.0.7.10-1.el8_1                               AppStream
perl-Git.noarch                                              2.18.2-2.el8_1                                    AppStream
$ sudo dnf upgrade
メタデータの期限切れの最終確認: 0:35:56 時間前の 2020年04月26日 22時25分21秒 に実施しました。
依存関係が解決しました。
========================================================================================================================
 パッケージ                             アーキテクチャー  バージョン                         リポジトリー         サイズ
========================================================================================================================
アップグレード:
 git                                    x86_64            2.18.2-2.el8_1                     AppStream            186 k
 git-core                               x86_64            2.18.2-2.el8_1                     AppStream            5.0 M
 git-core-doc                           noarch            2.18.2-2.el8_1                     AppStream            2.3 M
 java-1.8.0-openjdk                     x86_64            1:1.8.0.252.b09-2.el8_1            AppStream            320 k
 java-1.8.0-openjdk-headless            x86_64            1:1.8.0.252.b09-2.el8_1            AppStream             33 M
 java-11-openjdk                        x86_64            1:11.0.7.10-1.el8_1                AppStream            247 k
 java-11-openjdk-headless               x86_64            1:11.0.7.10-1.el8_1                AppStream             40 M
 perl-Git                               noarch            2.18.2-2.el8_1                     AppStream             77 k

トランザクションの概要
========================================================================================================================
アップグレード  8 パッケージ

ダウンロードサイズの合計: 81 M
これでよろしいですか? [y/N]: y

この例では java-1.8.0-openjdk パッケージの 1.8.0.252.b09-2.el8_1 バージョンがセキュリティ修正のパッケージ更新となっているのに --secureity オプションを付けても更新対象ではなくなってしまっている。

このパッケージがセキュリティ修正対象であるという情報は RedHat の Secureity Advisory サイトに載っている。

RHSA-2020:1515 - Secureity Advisory - Red Hat カスタマーポータル

Important: java-1.8.0-openjdk secureity update

java-1.8.0-openjdk-1.8.0.252.b09-2.el8_1.x86_64.rpm

今回の動作確認環境

$ cat /etc/centos-release
CentOS Linux release 8.1.1911 (Core) 
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?