2014-01-20 11:41:56 +00:00
|
|
|
#!/usr/bin/env python
|
2013-02-13 22:16:00 +00:00
|
|
|
|
|
|
|
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
|
|
|
# All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# Manually maintained for brevity; consider making this compiled from
|
|
|
|
# distromatch or other rich data sources.
|
2014-02-18 22:14:43 +00:00
|
|
|
# Debian name on the left, Fedora/RHEL on the right.
|
2013-02-13 22:16:00 +00:00
|
|
|
package_map = {
|
2014-02-28 01:05:02 +00:00
|
|
|
'apache2': 'httpd',
|
|
|
|
'arping': 'iputils',
|
|
|
|
'augeas-tools': 'augeas',
|
|
|
|
'build-essential': 'make automake gcc gcc-c++ kernel-devel',
|
|
|
|
'default-jre': 'java',
|
|
|
|
'extlinux': 'syslinux-extlinux',
|
|
|
|
'gearman-job-server': 'gearmand',
|
2013-04-02 00:25:25 +00:00
|
|
|
'grub-pc': 'grub2-tools grub2',
|
2014-02-28 22:35:58 +00:00
|
|
|
'libaio1': 'libaio',
|
2014-02-28 01:05:02 +00:00
|
|
|
'libapache2-mod-wsgi': 'mod_wsgi',
|
|
|
|
'libc6-dev': 'glibc-devel',
|
2014-03-05 14:56:50 +00:00
|
|
|
'libmariadb-dev': 'mariadb-devel',
|
2014-03-24 14:23:39 +00:00
|
|
|
'libffi-dev': 'libffi-devel',
|
|
|
|
'libldap2-dev': 'python-ldap',
|
|
|
|
'libmysql-dev': 'mysql++-devel',
|
2014-02-28 01:05:02 +00:00
|
|
|
'libmysql-java': 'mysql-connector-java',
|
|
|
|
'libmysqlclient-dev': 'mysql-devel',
|
2014-03-24 14:23:39 +00:00
|
|
|
'libpq-dev': 'libpqxx-devel',
|
|
|
|
'libxslt-dev': 'libxslt-devel',
|
|
|
|
'libsasl2-dev': 'cyrus-sasl-devel',
|
|
|
|
'libsqlite3-dev': 'libsqlite3x-devel',
|
2014-02-28 01:05:02 +00:00
|
|
|
'libssl-dev': 'openssl-devel',
|
|
|
|
'libvirt-bin': 'libvirt',
|
2014-03-24 14:23:39 +00:00
|
|
|
'libxml2-dev': 'libxml2-devel',
|
2014-02-28 01:05:02 +00:00
|
|
|
'libz-dev': 'zlib-devel',
|
2013-02-13 22:16:00 +00:00
|
|
|
'linux-image-generic': 'kernel',
|
2014-02-28 01:05:02 +00:00
|
|
|
'lm-sensors': 'lm_sensors',
|
|
|
|
'mysql-client-5.5': 'mariadb',
|
|
|
|
'mysql-server-5.5': 'mariadb-server',
|
|
|
|
'nagios-plugins-basic': 'nagios-plugins-all',
|
2014-03-05 19:31:28 +00:00
|
|
|
'nfs-common': 'nfs-utils',
|
2014-02-28 01:05:02 +00:00
|
|
|
'nfs-kernel-server': 'nfs-utils',
|
2013-02-13 22:16:00 +00:00
|
|
|
'open-iscsi': 'iscsi-initiator-utils',
|
2014-02-28 01:05:02 +00:00
|
|
|
'openssh-client': 'openssh-clients',
|
|
|
|
'openvswitch-common': 'openvswitch',
|
|
|
|
'openvswitch-switch': 'openvswitch',
|
2014-03-24 14:23:39 +00:00
|
|
|
'python-dev': 'python-devel',
|
2013-04-23 10:57:25 +00:00
|
|
|
'python-libvirt': 'libvirt-python',
|
|
|
|
'python-memcache': 'python-memcached',
|
|
|
|
'python-mysqldb': 'MySQL-python',
|
|
|
|
'python-numpy': 'numpy',
|
2013-06-20 10:02:18 +00:00
|
|
|
'python-pyopenssl': 'pyOpenSSL',
|
2014-02-28 01:05:02 +00:00
|
|
|
'python-xattr': 'pyxattr',
|
|
|
|
'qemu-utils': 'qemu-img',
|
2013-08-07 20:44:55 +00:00
|
|
|
'qpid-client': 'qpid-cpp-client',
|
2014-02-28 01:05:02 +00:00
|
|
|
'qpidd': 'qpid-cpp-server',
|
2014-01-30 17:18:07 +00:00
|
|
|
'snmp-mibs-downloader': '',
|
2014-02-28 01:05:02 +00:00
|
|
|
'snmpd': 'net-snmp',
|
|
|
|
'stunnel4': 'stunnel',
|
|
|
|
'tftpd-hpa': 'tftp-server',
|
|
|
|
'tgt': 'scsi-target-utils',
|
|
|
|
'vlan': 'vconfig',
|
2014-02-06 22:10:38 +00:00
|
|
|
# openstack mappings
|
|
|
|
'openstack-neutron-dhcp-agent': 'openstack-neutron',
|
2014-02-17 21:37:34 +00:00
|
|
|
}
|
2013-02-13 22:16:00 +00:00
|
|
|
|
|
|
|
for arg in sys.argv[1:]:
|
2014-01-17 08:10:13 +00:00
|
|
|
if arg not in package_map and arg.endswith('-dev'):
|
|
|
|
# convert -dev into devel
|
|
|
|
print('%s%s' % (arg, 'el'))
|
|
|
|
else:
|
|
|
|
print(package_map.get(arg, arg))
|
2013-02-13 22:16:00 +00:00
|
|
|
sys.exit(0)
|