10
9

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 5 years have passed since last update.

SRPMの扱い方法メモ

Posted at

SRPMを扱う時のメモ

SRPMを手に入れる

YUMの場合

$ sudo yum install yum-utils
$ yumdownloader --source kernel

DNFの場合

$ dnf download --source kernel

downloadはプラグインによる提供だが、dnf-pluins-coreに含まれるためすぐに使える(と思うたぶん)。

SRPMの展開

なんとインストールと同じ。

$ rpm -ivh kernel.src.rpm

pwdにrpmbuildというディレクトリが作成され、その中にSPECSとSOURCESが展開される。
と、思うのだがどうやら/usr/local/src/redhatに展開されることもあるらしい(え、でもそれroot必要じゃん。)
どこに展開されるかは以下で確認できる。

$ rpm --showrc | grep _topdir
10
9
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
10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?