最近は殆どyumでパッケージのインストールを行いますが、そのパッケージがインストールするファイルを確認したいことがあります。
rpmだと以下ですかね。
1 |
# rpm -qlpi パッケージ名.rpm |
yumの場合だとrepoqueryコマンドを利用しますが、これはyum-utilsに含まれています。
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
[root@host01 ~]# yum -y install yum-utils 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ yum-utils.noarch 0:1.1.31-29.el7 を インストール --> 依存性の処理をしています: python-kitchen のパッケージ: yum-utils-1.1.31-29.el7.noarch --> トランザクションの確認を実行しています。 ---> パッケージ python-kitchen.noarch 0:1.1.1-5.el7 を インストール --> 依存性の処理をしています: python-chardet のパッケージ: python-kitchen-1.1.1-5.el7.noarch --> トランザクションの確認を実行しています。 ---> パッケージ python-chardet.noarch 0:2.0.1-7.el7 を インストール --> 依存性解決を終了しました。 依存性を解決しました ================================================================================================ Package アーキテクチャー バージョン リポジトリー 容量 ================================================================================================ インストール中: yum-utils noarch 1.1.31-29.el7 base 112 k 依存性関連でのインストールをします: python-chardet noarch 2.0.1-7.el7 base 222 k python-kitchen noarch 1.1.1-5.el7 base 267 k トランザクションの要約 ================================================================================================ インストール 1 パッケージ (+2 個の依存関係のパッケージ) 総ダウンロード容量: 601 k インストール容量: 2.8 M Downloading packages: (1/3): yum-utils-1.1.31-29.el7.noarch.rpm | 112 kB 00:00:00 (2/3): python-chardet-2.0.1-7.el7.noarch.rpm | 222 kB 00:00:00 (3/3): python-kitchen-1.1.1-5.el7.noarch.rpm | 267 kB 00:00:00 ------------------------------------------------------------------------------------------------ 合計 1.6 MB/s | 601 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction インストール中 : python-chardet-2.0.1-7.el7.noarch 1/3 インストール中 : python-kitchen-1.1.1-5.el7.noarch 2/3 インストール中 : yum-utils-1.1.31-29.el7.noarch 3/3 検証中 : python-chardet-2.0.1-7.el7.noarch 1/3 検証中 : python-kitchen-1.1.1-5.el7.noarch 2/3 検証中 : yum-utils-1.1.31-29.el7.noarch 3/3 インストール: yum-utils.noarch 0:1.1.31-29.el7 依存性関連をインストールしました: python-chardet.noarch 0:2.0.1-7.el7 python-kitchen.noarch 0:1.1.1-5.el7 完了しました! |
試しにnet-toolsを確認してみます。
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
[root@host01 ~]# repoquery --list net-tools /bin/netstat /sbin/arp /sbin/ether-wake /sbin/ifconfig /sbin/ipmaddr /sbin/iptunnel /sbin/mii-diag /sbin/mii-tool /sbin/nameif /sbin/plipconfig /sbin/route /sbin/slattach /usr/lib/systemd/system/arp-ethers.service /usr/share/doc/net-tools-2.0 /usr/share/doc/net-tools-2.0/COPYING /usr/share/locale/cs/LC_MESSAGES/net-tools.mo /usr/share/locale/de/LC_MESSAGES/net-tools.mo /usr/share/locale/et_EE/LC_MESSAGES/net-tools.mo /usr/share/locale/fr/LC_MESSAGES/net-tools.mo /usr/share/locale/pt_BR/LC_MESSAGES/net-tools.mo /usr/share/man/de/man5/ethers.5.gz /usr/share/man/de/man8/arp.8.gz /usr/share/man/de/man8/ifconfig.8.gz /usr/share/man/de/man8/netstat.8.gz /usr/share/man/de/man8/plipconfig.8.gz /usr/share/man/de/man8/route.8.gz /usr/share/man/de/man8/slattach.8.gz /usr/share/man/fr/man5/ethers.5.gz /usr/share/man/fr/man8/arp.8.gz /usr/share/man/fr/man8/ifconfig.8.gz /usr/share/man/fr/man8/netstat.8.gz /usr/share/man/fr/man8/plipconfig.8.gz /usr/share/man/fr/man8/route.8.gz /usr/share/man/fr/man8/slattach.8.gz /usr/share/man/man5/ethers.5.gz /usr/share/man/man8/arp.8.gz /usr/share/man/man8/ether-wake.8.gz /usr/share/man/man8/ifconfig.8.gz /usr/share/man/man8/ipmaddr.8.gz /usr/share/man/man8/iptunnel.8.gz /usr/share/man/man8/mii-diag.8.gz /usr/share/man/man8/mii-tool.8.gz /usr/share/man/man8/nameif.8.gz /usr/share/man/man8/netstat.8.gz /usr/share/man/man8/plipconfig.8.gz /usr/share/man/man8/route.8.gz /usr/share/man/man8/slattach.8.gz /usr/share/man/pt/man8/arp.8.gz /usr/share/man/pt/man8/ifconfig.8.gz /usr/share/man/pt/man8/netstat.8.gz /usr/share/man/pt/man8/route.8.gz |
man yum-utils
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
yum-utils(1) yum-utils(1) NAME yum-utils - tools for manipulating repositories and extended package management SYNOPSIS debuginfo-install - install debuginfo packages and their dependencies find-repos-of-install - report which repository the package was installed from needs-restarting - report process ids that started running before they or some component they use were updated package-cleanup - manage package cleanup, duplicates, orphaned packages and outstanding dependency problems repo-graph - outputs a full package dependency list in dot format repo-rss - generates an RSS feed from one or more repositories repoclosure - reads metadata of repositories, checks dependencies and displays list of unresolved dependencies repodiff - takes two or more repositories, returns a list of added, removed or changed packages repomanage - manages a directory of rpm packages, returns a list of newest or oldest packages in a directory repoquery - query yum repositories and get additional information on the them reposync - synchronize a remote yum repository to a local directory using yum to retrieve packages repotrack - track packages and its dependencies and downloads them show-changed-rco - list of changes to a package Requires, Conflicts and Obsoletes data from installed to a specified rpm file show-installed - gives a compact description of packages installed and makes use of comps groups in repositories verifytree - verify that a local yum repository is consistent yum-builddep - installs missing dependencies to build a specified package yum-complete-transaction - finds incomplete or aborted yum transactions and attempts to complete them yum-config-manager - toggle yum repositories, add new repositories and set main yum configuration options yum-debug-dump - creates gzipped file containing information for debugging problems yum-debug-restore - replays any transactions captured in gzipped file in yum shell yum-groups-manager - create and edit yum's group metadata yum-installed - print a compact package list making use of comps groups yumdb - query or alter the yum database yumdownloader - downloads packages from yum repositories including source RPMs DESCRIPTION yum-utils is a collection of tools and programs for managing yum repositories, installing debug packages, source packages, extended information from repositories and administration. NOTES See respective tools for additional help for commands without a manual page SEE ALSO debuginfo-install(1), package-cleanup(1), repodiff(1), repoquery(1), reposync(1), repo-rss(1), show-changed-rco(1), show-installed(1), yumdownloader(1), yum-build‐ dep(1), yum-debug-dump(1), yum-groups-manager(1), yumdb(8), yum-complete-transac‐ tion(8) AUTHOR Shawn Starr <shawn.starr@rogers.com> yum-utils August 2011 yum-utils(1) |
man repoquery
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
repoquery(1) repoquery(1) NAME repoquery - query information from Yum repositories SYNOPSIS repoquery [options] <item ...> repoquery -a [options] DESCRIPTION repoquery is a program for querying information from YUM repositories similarly to rpm queries. GENERAL OPTIONS --querytags List valid queryformat tags and exit.. -v, --version Report program version and exit. --repoid=<repo> Specify which repository to query. Using this option disables all repositories not explicitly enabled with --repoid option (can be used multiple times). By default repoquery uses whatever repositories are enabled in YUM configuration. --enablerepo=<repo> In addition to the default set, query the given additional repository, even if it is disabled in YUM configuration. Can be used multiple times. --disablerepo=<repo> Do not query the given repository, even if it is enabled in YUM configuration. Can be used multiple times. --repofrompath=<repoid>,<path/url> Specify a path or url to a repository (same path as in a baseurl) to add to the repositories for this query. This option can be used multiple times. If you want to view only the pkgs from this repository combine this with --repoid. The repoid for the repository is specified by <repoid>. --plugins Enable YUM plugin support. -q, --query For rpmquery compatibility, doesn't do anything. -h, --help Help; display a help message and then quit. --quiet Run quietly: no warnings printed to stderr. --verbose Produce verbose output. -C, --cache Tells repoquery to run entirely from YUM cache - does not download any metadata or update the cache. Queries in this mode can fail or give par‐ tial/incorrect results if the cache isn't fully populated beforehand with eg "yum makecache". --tempcache Create and use a private cache instead of the main YUM cache. This is used by default when run as non-root user. -c <config file>, --config=<config file> Use alternative config file (default is /etc/yum.conf). --releasever=version Pretend the current release version is the given string. This is very useful when combined with --installroot. You can also use --releasever=/ to take the releasever information from outside the installroot. Note that with the default upstream cachedir, of /var/cache/yum, using this option will corrupt your cache (and you can use $releasever in your cachedir configuration to stop this). --installroot=root Specifies an alternative installroot, relative to which all packages will be installed. Think of this like doing "chroot <root> yum" except using --installroot allows yum to work before the chroot is created. Note: You may also want to use the option --releasever=/ when creating the installroot as otherwise the $releasever value is taken from the rpmdb within the installroot (and thus. will be empty, before creation). --setopt=option=value Set any config option in yum config or repo files. For options in the global config just use: --setopt=option=value for repo options use: --setopt=repoid.option=value PACKAGE QUERY OPTIONS -i, --info Show general information about package similarly to "rpm -qi" -l, --list List files in package. -R, --requires List package dependencies. --resolve When used with --requires, resolve capabilities to originating packages. --provides List capabilities package provides. --obsoletes List capabilities obsoleted by package. --conflicts List capabilities conflicting with package. --changelog List package changelog. --location Show a location where the package could be downloaded from. For example: wget `repoquery --location yum` -s, --source Show package source RPM name. --srpm Operate on corresponding source RPM. --groupmember PACKAGE List the repodata groups (yumgroups.xml) belongs to (if any). --nvr Use name-version-release output format (rpm query default) --nevra Use name-epoch:version-release.architecture output format (default) --envra Use epoch:name-version-release.architecture output format (easier to parse than nevra) --qf=FORMAT, --queryformat=FORMAT Specify custom output format for queries. You can add ":date", ":day" and ":isodate" to all the tags that are a time, and you can add ":k", ":m", ":g", ":t" and ":h" to sizes. You can also specify field width as in sprintf (Eg. %-20{name}) --output [text|ascii-tree|dot-tree] Output format which can be used with --requires/--whatrequires/--obsoletes/--conflicts. Default output is 'text'. --level [all|any int] In combination with --output ascii-tree|dot-tree this option specifies the number of level to print on the tree. Default level is 'all'. PACKAGE SELECTION OPTIONS -a, --all Query all available packages (for rpmquery compatibility / shorthand for repoquery '*') --show-duplicates Query all versions of packages. -f, --file FILE Query package owning FILE. --whatobsoletes CAPABILITY Query all packages that obsolete CAPABILITY. --whatconflicts CAPABILITY Query all packages that conflict with CAPABILITY. --whatprovides CAPABILITY Query all packages that provide CAPABILITY. --whatrequires CAPABILITY Query all packages that require CAPABILITY. --alldeps When used with --whatrequires, look for non-explicit dependencies in addition to explicit ones (e.g. files and Provides in addition to package names). This is the default. --exactdeps When used with --whatrequires, search for dependencies only exactly as given. This is effectively the opposite of --alldeps. --recursive When used with --whatrequires, and --requires --resolve, query packages recursively. --archlist=ARCH1[,ARCH2...] Limit the query to packages of given architecture(s). Valid values are all architectures known to rpm/yum such as 'i386' and 'src' for source RPMS. Note that repoquery will now change yum's "arch" to the first value in the archlist. So "--archlist=i386,i686" will change yum's canonical arch to i386, but allow packages of i386 and i686. --pkgnarrow=WHAT Limit what packages are considered for the query. Valid values for WHAT are: installed, available, recent, updates, extras, all and repository (default). --installed Restrict query ONLY to installed pkgs - disables all repos and only acts on rpmdb. GROUP QUERY OPTIONS -i, --info Show general information about group. -l, --list List packages belonging to (required by) group. --grouppkgs=WHAT Specify what type of packages are queried from groups. Valid values for WHAT are all, mandatory, default, optional. --requires List groups required by group. GROUP SELECTION OPTIONS -a Query all available groups. -g, --group Query groups instead of packages. EXAMPLES List all packages whose name contains 'perl': repoquery '*perl*' List all packages depending on openssl: repoquery --whatrequires openssl List all package names and the repository they come from, nicely formatted: repoquery -a --qf "%-20{repoid} %{name}" List name and summary of all available updates (if any), nicely formatted: repoquery -a --pkgnarrow=updates --qf "%{name}:\n%{summary}\n" List optional packages in base group: repoquery -g --grouppkgs=optional -l base List build requirements from 'anaconda' source rpm: repoquery --requires anaconda.src List packages which BuildRequire gail-devel repoquery --archlist=src --whatrequires gail-devel NB: This command will only work if you have repositories enabled which include srpms. MISC Specifying package names A package can be referred to in all queries with any of the following: name name.arch name-ver name-ver-rel name-ver-rel.arch name-epoch:ver-rel.arch epoch:name-ver-rel.arch For example: repoquery -l kernel-2.4.1-10.i686 Additionally wildcards (shell-style globs) can be used. FILES As repoquery uses YUM libraries for retrieving all the information, it relies on YUM configuration for its default values like which repositories to use. Consult YUM documentation for details: /etc/yum.conf /etc/yum/repos.d/ /var/cache/yum/ SEE ALSO yum.conf (5) http://yum.baseurl.org/ AUTHORS See the Authors file included with this program. BUGS There are of course no bugs, but should you find any, you should first consult the FAQ section on http://yum.baseurl.org/wiki/Faq and if unsuccessful in finding a resolution contact the mailing list: yum-devel@lists.baseurl.org. To file a bug use http://bugzilla.redhat.com for Fedora/RHEL/Centos related bugs and http://yum.baseurl.org/report for all other bugs. Panu Matilainen 17 October 2005 repoquery(1) |