project-hatohol / hatohol

A unified manager of monitoring software
http://www.hatohol.org/
Other
89 stars 29 forks source link

Fix require package: from python-pika to python2-pika #2308

Closed noriki-nakamura closed 8 years ago

noriki-nakamura commented 8 years ago

In discuss of #2303, we found package name of python-pika for CentOS7 was changed to python2-pika. Maybe, spec file of the packages treats to be able to install python2-pika as python-pika.

cosmo0920 commented 8 years ago

Strictly speaking, we should be follow your suggestion. But, curiously, we got success building and installing hatohol rpms.

Result:

hatohol $ ./autogen.sh && ./configure && make dist
...
hatohol $ MAKEFLAGS="-j `cat /proc/cpuinfo | grep processor | wc -l`" rpmbuild -tb hatohol-*.tar.bz2
...
パッケージに含まれないファイルの検査中: /usr/lib/rpm/check-files /home/vagrant/rpmbuild/BUILDROOT/hatohol-16.04-1.el7.centos.x86_64
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-server-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-lib-common-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-web-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-hap2-common-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-devel-16.04-1.el7.centos.x86_64.rpm
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/hatohol-debuginfo-16.04-1.el7.centos.x86_64.rpm
実行中(%clean): /bin/sh -e /var/tmp/rpm-tmp.lBM0WU
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd hatohol-16.04
+ rm -rf /home/vagrant/rpmbuild/BUILDROOT/hatohol-16.04-1.el7.centos.x86_64
+ exit 0
$ ls
hatohol-debuginfo-16.04-1.el7.centos.x86_64.rpm               hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64.rpm
hatohol-devel-16.04-1.el7.centos.x86_64.rpm                   hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64.rpm
hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64.rpm         hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64.rpm
hatohol-hap2-common-16.04-1.el7.centos.x86_64.rpm             hatohol-lib-common-16.04-1.el7.centos.x86_64.rpm
hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64.rpm            hatohol-server-16.04-1.el7.centos.x86_64.rpm
hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64.rpm  hatohol-web-16.04-1.el7.centos.x86_64.rpm
読み込んだプラグイン:fastestmirror
hatohol-debuginfo-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-debuginfo-16.04-1.el7.centos.x86_64
hatohol-debuginfo-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-devel-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-devel-16.04-1.el7.centos.x86_64
hatohol-devel-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64
hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-hap2-common-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-hap2-common-16.04-1.el7.centos.x86_64
hatohol-hap2-common-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64
hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64
hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64
hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64
hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64
hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-lib-common-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-lib-common-16.04-1.el7.centos.x86_64
hatohol-lib-common-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-server-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-server-16.04-1.el7.centos.x86_64
hatohol-server-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
hatohol-web-16.04-1.el7.centos.x86_64.rpm を調べています: hatohol-web-16.04-1.el7.centos.x86_64
hatohol-web-16.04-1.el7.centos.x86_64.rpm をインストール済みとして設定しています
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ hatohol-debuginfo.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-devel.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-hap2-ceilometer.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-hap2-common.x86_64 0:16.04-1.el7.centos を インストール
--> 依存性の処理をしています: python-pika のパッケージ: hatohol-hap2-common-16.04-1.el7.centos.x86_64
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
---> パッケージ hatohol-hap2-fluentd.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-hap2-nagios-livestatus.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-hap2-nagios-ndoutils.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-hap2-rabbitmq-connector.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-hap2-zabbix.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-lib-common.x86_64 0:16.04-1.el7.centos を インストール
---> パッケージ hatohol-server.x86_64 0:16.04-1.el7.centos を インストール
--> 依存性の処理をしています: mariadb のパッケージ: hatohol-server-16.04-1.el7.centos.x86_64
---> パッケージ hatohol-web.x86_64 0:16.04-1.el7.centos を インストール
--> 依存性の処理をしています: httpd >= 2.2.15 のパッケージ: hatohol-web-16.04-1.el7.centos.x86_64
--> 依存性の処理をしています: mod_wsgi >= 3.2 のパッケージ: hatohol-web-16.04-1.el7.centos.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ httpd.x86_64 0:2.4.6-40.el7.centos.1 を インストール
--> 依存性の処理をしています: httpd-tools = 2.4.6-40.el7.centos.1 のパッケージ: httpd-2.4.6-40.el7.centos.1.x86_64
--> 依存性の処理をしています: /etc/mime.types のパッケージ: httpd-2.4.6-40.el7.centos.1.x86_64
--> 依存性の処理をしています: libaprutil-1.so.0()(64bit) のパッケージ: httpd-2.4.6-40.el7.centos.1.x86_64
--> 依存性の処理をしています: libapr-1.so.0()(64bit) のパッケージ: httpd-2.4.6-40.el7.centos.1.x86_64
---> パッケージ mariadb.x86_64 1:5.5.47-1.el7_2 を インストール
---> パッケージ mod_wsgi.x86_64 0:3.4-12.el7_0 を インストール
---> パッケージ python2-pika.noarch 0:0.10.0-3.el7 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ apr.x86_64 0:1.4.8-3.el7 を インストール
---> パッケージ apr-util.x86_64 0:1.5.2-6.el7 を インストール
---> パッケージ httpd-tools.x86_64 0:2.4.6-40.el7.centos.1 を インストール
---> パッケージ mailcap.noarch 0:2.1.41-2.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

===========================================================================================================================================
 Package                            アーキテクチャー
                                              バージョン               リポジトリー                                                   容量
===========================================================================================================================================
インストール中:
 hatohol-debuginfo                  x86_64    16.04-1.el7.centos       /hatohol-debuginfo-16.04-1.el7.centos.x86_64                   25 M
 hatohol-devel                      x86_64    16.04-1.el7.centos       /hatohol-devel-16.04-1.el7.centos.x86_64                       35 k
 hatohol-hap2-ceilometer            x86_64    16.04-1.el7.centos       /hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64             63 k
 hatohol-hap2-common                x86_64    16.04-1.el7.centos       /hatohol-hap2-common-16.04-1.el7.centos.x86_64                215 k
 hatohol-hap2-fluentd               x86_64    16.04-1.el7.centos       /hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64                27 k
 hatohol-hap2-nagios-livestatus     x86_64    16.04-1.el7.centos       /hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64      37 k
 hatohol-hap2-nagios-ndoutils       x86_64    16.04-1.el7.centos       /hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64        46 k
 hatohol-hap2-rabbitmq-connector    x86_64    16.04-1.el7.centos       /hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64     26 k
 hatohol-hap2-zabbix                x86_64    16.04-1.el7.centos       /hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64                 67 k
 hatohol-lib-common                 x86_64    16.04-1.el7.centos       /hatohol-lib-common-16.04-1.el7.centos.x86_64                 501 k
 hatohol-server                     x86_64    16.04-1.el7.centos       /hatohol-server-16.04-1.el7.centos.x86_64                     2.1 M
 hatohol-web                        x86_64    16.04-1.el7.centos       /hatohol-web-16.04-1.el7.centos.x86_64                        1.9 M
依存性関連でのインストールをします:
 apr                                x86_64    1.4.8-3.el7              base                                                          103 k
 apr-util                           x86_64    1.5.2-6.el7              base                                                           92 k
 httpd                              x86_64    2.4.6-40.el7.centos.1    updates                                                       2.7 M
 httpd-tools                        x86_64    2.4.6-40.el7.centos.1    updates                                                        82 k
 mailcap                            noarch    2.1.41-2.el7             base                                                           31 k
 mariadb                            x86_64    1:5.5.47-1.el7_2         updates                                                       8.9 M
 mod_wsgi                           x86_64    3.4-12.el7_0             base                                                           76 k
 python2-pika                       noarch    0.10.0-3.el7             epel                                                          196 k

トランザクションの要約
===========================================================================================================================================
インストール  12 パッケージ (+8 個の依存関係のパッケージ)

合計容量: 43 M
総ダウンロード容量: 12 M
インストール容量: 90 M

Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/6): httpd-tools-2.4.6-40.el7.centos.1.x86_64.rpm                                                                 |  82 kB  00:00:00     
(2/6): mod_wsgi-3.4-12.el7_0.x86_64.rpm                                                                             |  76 kB  00:00:00     
(3/6): mailcap-2.1.41-2.el7.noarch.rpm                                                                              |  31 kB  00:00:00     
(4/6): python2-pika-0.10.0-3.el7.noarch.rpm                                                                         | 196 kB  00:00:00     
(5/6): httpd-2.4.6-40.el7.centos.1.x86_64.rpm                                                                       | 2.7 MB  00:00:00     
(6/6): mariadb-5.5.47-1.el7_2.x86_64.rpm                                                                            | 8.9 MB  00:00:04     
-------------------------------------------------------------------------------------------------------------------------------------------
合計                                                                                                       2.7 MB/s |  12 MB  00:00:04     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : apr-1.4.8-3.el7.x86_64                                                                                    1/20 
  インストール中          : apr-util-1.5.2-6.el7.x86_64                                                                               2/20 
  インストール中          : hatohol-lib-common-16.04-1.el7.centos.x86_64                                                              3/20 
  インストール中          : httpd-tools-2.4.6-40.el7.centos.1.x86_64                                                                  4/20 
  インストール中          : 1:mariadb-5.5.47-1.el7_2.x86_64                                                                           5/20 
  インストール中          : python2-pika-0.10.0-3.el7.noarch                                                                          6/20 
  インストール中          : hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64                                                 7/20 
  インストール中          : hatohol-hap2-common-16.04-1.el7.centos.x86_64                                                             8/20 
  インストール中          : hatohol-server-16.04-1.el7.centos.x86_64                                                                  9/20 
  インストール中          : mailcap-2.1.41-2.el7.noarch                                                                              10/20 
  インストール中          : httpd-2.4.6-40.el7.centos.1.x86_64                                                                       11/20 
  インストール中          : mod_wsgi-3.4-12.el7_0.x86_64                                                                             12/20 
  インストール中          : hatohol-web-16.04-1.el7.centos.x86_64                                                                    13/20 
  インストール中          : hatohol-devel-16.04-1.el7.centos.x86_64                                                                  14/20 
  インストール中          : hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64                                                        15/20 
  インストール中          : hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64                                                           16/20 
  インストール中          : hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64                                                 17/20 
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting python-mk-livestatus
  Downloading python-mk-livestatus-0.4.tar.gz
Installing collected packages: python-mk-livestatus
  Running setup.py install for python-mk-livestatus
Successfully installed python-mk-livestatus-0.4
  インストール中          : hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64                                                   18/20 
  インストール中          : hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64                                                            19/20 
  インストール中          : hatohol-debuginfo-16.04-1.el7.centos.x86_64                                                              20/20 
  検証中                  : hatohol-debuginfo-16.04-1.el7.centos.x86_64                                                               1/20 
  検証中                  : mod_wsgi-3.4-12.el7_0.x86_64                                                                              2/20 
  検証中                  : hatohol-devel-16.04-1.el7.centos.x86_64                                                                   3/20 
  検証中                  : hatohol-hap2-common-16.04-1.el7.centos.x86_64                                                             4/20 
  検証中                  : apr-1.4.8-3.el7.x86_64                                                                                    5/20 
  検証中                  : httpd-2.4.6-40.el7.centos.1.x86_64                                                                        6/20 
  検証中                  : httpd-tools-2.4.6-40.el7.centos.1.x86_64                                                                  7/20 
  検証中                  : mailcap-2.1.41-2.el7.noarch                                                                               8/20 
  検証中                  : hatohol-server-16.04-1.el7.centos.x86_64                                                                  9/20 
  検証中                  : apr-util-1.5.2-6.el7.x86_64                                                                              10/20 
  検証中                  : hatohol-hap2-ceilometer-16.04-1.el7.centos.x86_64                                                        11/20 
  検証中                  : hatohol-hap2-rabbitmq-connector-16.04-1.el7.centos.x86_64                                                12/20 
  検証中                  : hatohol-hap2-fluentd-16.04-1.el7.centos.x86_64                                                           13/20 
  検証中                  : hatohol-hap2-nagios-livestatus-16.04-1.el7.centos.x86_64                                                 14/20 
  検証中                  : hatohol-hap2-nagios-ndoutils-16.04-1.el7.centos.x86_64                                                   15/20 
  検証中                  : python2-pika-0.10.0-3.el7.noarch                                                                         16/20 
  検証中                  : hatohol-web-16.04-1.el7.centos.x86_64                                                                    17/20 
  検証中                  : hatohol-lib-common-16.04-1.el7.centos.x86_64                                                             18/20 
  検証中                  : 1:mariadb-5.5.47-1.el7_2.x86_64                                                                          19/20 
  検証中                  : hatohol-hap2-zabbix-16.04-1.el7.centos.x86_64                                                            20/20 

インストール:
  hatohol-debuginfo.x86_64 0:16.04-1.el7.centos                      hatohol-devel.x86_64 0:16.04-1.el7.centos                            
  hatohol-hap2-ceilometer.x86_64 0:16.04-1.el7.centos                hatohol-hap2-common.x86_64 0:16.04-1.el7.centos                      
  hatohol-hap2-fluentd.x86_64 0:16.04-1.el7.centos                   hatohol-hap2-nagios-livestatus.x86_64 0:16.04-1.el7.centos           
  hatohol-hap2-nagios-ndoutils.x86_64 0:16.04-1.el7.centos           hatohol-hap2-rabbitmq-connector.x86_64 0:16.04-1.el7.centos          
  hatohol-hap2-zabbix.x86_64 0:16.04-1.el7.centos                    hatohol-lib-common.x86_64 0:16.04-1.el7.centos                       
  hatohol-server.x86_64 0:16.04-1.el7.centos                         hatohol-web.x86_64 0:16.04-1.el7.centos                              

依存性関連をインストールしました:
  apr.x86_64 0:1.4.8-3.el7                          apr-util.x86_64 0:1.5.2-6.el7             httpd.x86_64 0:2.4.6-40.el7.centos.1       
  httpd-tools.x86_64 0:2.4.6-40.el7.centos.1        mailcap.noarch 0:2.1.41-2.el7             mariadb.x86_64 1:5.5.47-1.el7_2            
  mod_wsgi.x86_64 0:3.4-12.el7_0                    python2-pika.noarch 0:0.10.0-3.el7       

完了しました!
noriki-nakamura commented 8 years ago

I understand it too. Offcourse, we don't need to fix the spec file of Hatohol. But, I think we understand the problem notwithstanding, it's strange that we don't fix it.

I didn't check the spec file of python2-pika although, I think the package or yum repository treat to be able to install python2-pika as python-pika. If you decide to not fix this issue, please close it. If this issue will be still open, we will fix it. (I want to fix this issue and send Pull Request although, I don't take the time to fix it...)

noriki-nakamura commented 8 years ago

(I want to fix this issue and send Pull Request although, I don't take the time to fix it...)

I've said above although, It's easy to fix this. So, I've create a patch 28d9801a5e3386884ae067843a853d5db8720b2f and send a Pull Request.

cosmo0920 commented 8 years ago

:-1:

Don't hurry up. Please calm down to send PR.

cosmo0920 commented 8 years ago

Ah, perhaps, I understood this behaviour. The trick of this curious yum resolver working is provided from %python_provide macro in the python-pika's spec: http://pkgs.fedoraproject.org/cgit/rpms/python-pika.git/tree/python-pika.spec#n45 This macro had been shipped from this ticket: https://fedorahosted.org/fpc/ticket/534#comment:10

In short, this macro manipulates Provides: python(?2)- in spec properly.

cosmo0920 commented 8 years ago

And I got following result:

$ rpm -qp --provides python2-pika-0.10.0-3.fc24.noarch.rpm # installed from EPEL 7
python-pika = 0.10.0-3.fc24
python2-pika = 0.10.0-3.fc24
noriki-nakamura commented 8 years ago

We discussed in #2311, we will fix this with issue of #2025. So, I close this issue.