QtのGitリポジトリが公開されてた
Windows、C++、.NET不使用という条件の上で最有力のライブラリQtですが、いつのまにかGitリポジトリが公開されてました。今まで分散リポジトリのVCSについては「そのうちMercurialやろうかなー」程度にしか考えてなかったんですが、必要性が出てきてしまったので、先にGitに手をつけることになりました。
手元の環境はCentOS 5.3。Gitは標準のYumリポジトリに入ってないので、まずRPMforgeを登録するところから始めます(参考)
$ wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm --17:29:06-- http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm Resolving apt.sw.be... 193.1.193.67 Connecting to apt.sw.be|193.1.193.67|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 16698 (16K) [application/x-redhat-package-manager] Saving to: `rpmforge-release-0.3.6-1.el5.rf.i386.rpm' 100%[=================================================================================>] 16,698 18.9K/s in 0.9s 17:29:08 (18.9 KB/s) - `rpmforge-release-0.3.6-1.el5.rf.i386.rpm' saved [16698/16698] $ sudo rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt $ rpm -K rpmforge-release-0.3.6-1.el5.rf.i386.rpm rpmforge-release-0.3.6-1.el5.rf.i386.rpm: (sha1) dsa sha1 md5 gpg OK $ sudo rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm
この後、上のドキュメントにあるように、リポジトリのpriorityを適宜設定しておきます。
次にGitをインストールします。といってもこれだけですが。
$ sudo yum install git Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * rpmforge: apt.sw.be * base: www.ftp.ne.jp * updates: www.ftp.ne.jp * addons: www.ftp.ne.jp * extras: www.ftp.ne.jp 369 packages excluded due to repository priority protections Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package git.i386 0:1.5.2.1-1.el5.rf set to be updated --> Processing Dependency: perl(LWP::UserAgent) for package: git --> Processing Dependency: perl(SVN::Ra) for package: git --> Processing Dependency: rcs for package: git --> Processing Dependency: perl(SVN::Core) for package: git --> Processing Dependency: perl(DBI) for package: git --> Processing Dependency: perl(Git) for package: git --> Processing Dependency: perl(SVN::Delta) for package: git --> Running transaction check ---> Package perl-Git.i386 0:1.5.2.1-1.el5.rf set to be updated --> Processing Dependency: perl(Error) for package: perl-Git ---> Package perl-libwww-perl.noarch 0:5.805-1.1.1 set to be updated --> Processing Dependency: perl-HTML-Parser >= 3.33 for package: perl-libwww-perl --> Processing Dependency: perl(HTML::Entities) for package: perl-libwww-perl --> Processing Dependency: perl(Compress::Zlib) for package: perl-libwww-perl ---> Package subversion-perl.i386 0:1.4.2-4.el5 set to be updated ---> Package perl-DBI.i386 0:1.52-2.el5 set to be updated ---> Package rcs.i386 0:5.7-30.1 set to be updated --> Running transaction check ---> Package perl-HTML-Parser.i386 0:3.55-1.fc6 set to be updated --> Processing Dependency: perl-HTML-Tagset >= 3.03 for package: perl-HTML-Parser --> Processing Dependency: perl(HTML::Tagset) for package: perl-HTML-Parser ---> Package perl-Error.noarch 0:0.17015-1.el5.rf set to be updated ---> Package perl-Compress-Zlib.i386 0:1.42-1.fc6 set to be updated --> Running transaction check ---> Package perl-HTML-Tagset.noarch 0:3.10-2.1.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================== Package Arch Version Repository Size ========================================================================================================================== Installing: git i386 1.5.2.1-1.el5.rf rpmforge 27 M Installing for dependencies: perl-Compress-Zlib i386 1.42-1.fc6 base 52 k perl-DBI i386 1.52-2.el5 base 600 k perl-Error noarch 0.17015-1.el5.rf rpmforge 27 k perl-Git i386 1.5.2.1-1.el5.rf rpmforge 18 k perl-HTML-Parser i386 3.55-1.fc6 base 92 k perl-HTML-Tagset noarch 3.10-2.1.1 base 15 k perl-libwww-perl noarch 5.805-1.1.1 base 376 k rcs i386 5.7-30.1 base 332 k subversion-perl i386 1.4.2-4.el5 base 753 k Transaction Summary ========================================================================================================================== Install 10 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 29 M Is this ok [y/N]: y Downloading Packages: (1/10): perl-HTML-Tagset-3.10-2.1.1.noarch.rpm | 15 kB 00:00 (2/10): perl-Git-1.5.2.1-1.el5.rf.i386.rpm | 18 kB 00:00 (3/10): perl-Error-0.17015-1.el5.rf.noarch.rpm | 27 kB 00:00 (4/10): perl-Compress-Zlib-1.42-1.fc6.i386.rpm | 52 kB 00:00 (5/10): perl-HTML-Parser-3.55-1.fc6.i386.rpm | 92 kB 00:00 (6/10): rcs-5.7-30.1.i386.rpm | 332 kB 00:00 (7/10): perl-libwww-perl-5.805-1.1.1.noarch.rpm | 376 kB 00:00 (8/10): perl-DBI-1.52-2.el5.i386.rpm | 600 kB 00:01 (9/10): subversion-perl-1.4.2-4.el5.i386.rpm | 753 kB 00:01 (10/10): git-1.5.2.1-1.el5.rf.i386.rpm | 27 MB 00:57 -------------------------------------------------------------------------------------------------------------------------- Total 455 kB/s | 29 MB 01:05 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : subversion-perl [ 1/10] Installing : rcs [ 2/10] Installing : perl-DBI [ 3/10] Installing : perl-Compress-Zlib [ 4/10] Installing : perl-Error [ 5/10] Installing : perl-HTML-Tagset [ 6/10] Installing : perl-HTML-Parser [ 7/10] Installing : perl-libwww-perl [ 8/10] Installing : perl-Git [ 9/10] Installing : git [10/10] Installed: git.i386 0:1.5.2.1-1.el5.rf Dependency Installed: perl-Compress-Zlib.i386 0:1.42-1.fc6 perl-DBI.i386 0:1.52-2.el5 perl-Error.noarch 0:0.17015-1.el5.rf perl-Git.i386 0:1.5.2.1-1.el5.rf perl-HTML-Parser.i386 0:3.55-1.fc6 perl-HTML-Tagset.noarch 0:3.10-2.1.1 perl-libwww-perl.noarch 0:5.805-1.1.1 rcs.i386 0:5.7-30.1 subversion-perl.i386 0:1.4.2-4.el5 Complete!
Perlの依存ライブラリと共にGitがインストールされます。そして本来の目的、Qtをcloneします。
$ git clone git://gitorious.org/qt/qt.git Initialized empty Git repository in /home/rch850/qt-git/qt/.git/ remote: Counting objects: 55370, done. remote: Compressing objects: 100% (27771/27771), done. Indexing 55370 objects... remote: Total 55370 (delta 30302), reused 50040 (delta 25537) 100% (55370/55370) done Resolving 30302 deltas... 100% (30302/30302) done Checking 30996 files out... 100% (30996/30996) done
これでqtディレクトリが作成され、その中にソースコード一式が入ります。ちなみに最後のgit cloneだけで30分以上かかりました。さすがにdu -hsして671MBもあるようなソースだと時間かかりますね。とりあえず今日はここまで。
==余談==
最初に以下のようなことをやってみたのですが、
# cd /etc/yum.repos.d # wget http://kernel.org/pub/software/scm/git/RPMS/git.repo # yum install git
依存関係でエラーが出たのでRPMforgeを使う運びとなりました。