rpm

excluding file types when packaging an rpm

不问归期 提交于 2019-12-05 12:05:11
In my spec file for packaging a python rpm, I want to remove certain filetypes in certain directories: e.g., I want to exclude source *.py files in these directories: lib/*.py comm/*.py I think I should do this in the %file section of my spec. Any suggestions? At one point in the distant past, you did that by just not including the files you didn't want in the %file section, and so they would not be packaged. That might have turned out to be too error prone, and so some RPM implementations started complaining about unpackaged files. Since RPM development has always been a bit fragmented and

Install RPM on Centos

拥有回忆 提交于 2019-12-05 12:02:55
I work with Centos 6.4 and RPM. When I install RPM, linux thows the error Installing : XXX Error unpacking rpm package XXX error: unpacking of archive failed on file /lib/libasteriskssl.so;51f7eebf: cpio: Digest mismatch Verifying : XXX Can anybody help me? Try to run /usr/sbin/prelink -u /lib/libasteriskssl.so after you put it in place it in the %install. 来源: https://stackoverflow.com/questions/17948184/install-rpm-on-centos

Linux之按照MySQL

好久不见. 提交于 2019-12-05 11:41:50
1.查看centos自带的MySQL:   输入 rpm -qa | grep mysql 2.将自带的MySQL卸载”   rpm -e --nodeps mysql文件名    来源: https://www.cnblogs.com/Life-is-Demo/p/11922918.html

linux源码包软件的安装与卸载

时间秒杀一切 提交于 2019-12-05 10:50:26
Linux软件安装与卸载(源码包形式):一般情况下linux程序的发布不能像windows那样,直接打包成一个setup.exe文件,然用户安装 时直接按下一步就完成了,因为它对库的依赖比较严重下面就来看下linux下软件源码包安装与卸载: Linux软件的源代码分发是指提供了该软件所有程序源代码的发布形式,需要用户自己编译成可执行的二进制代码并进行安装,其优点是配置灵活,可以随 意去掉或保留某些功能/模块,适应多种硬件/操作系统平台及编译环境,缺点是难度较大,一般不适合初学者使用。 1、*.src.rpm形式的源代码软件包 安装:rpm -rebuild *.src.rpm cd /usr/src/dist/RPMS rpm -ivh *.rpm 卸载:rpm -e packgename 说明:rpm --rebuild *.src.rpm命令将源代码编译并在/usr/src/dist/RPMS下生成二进制的rpm包,然后再安装该二进制包即可。packgename 如前所述。 2、*.tar.gz/*.tgz、*.bz2形式的源代码软件包 安装:tar zxvf *.tar.gz 或 tar yxvf *.bz2 先解压 然后进入解压后的目录: ./configure 配置 make 编译 make install 安装 卸载:make uninstall 或 手动删除 说明

RPM常用命令总结

北城以北 提交于 2019-12-05 09:25:28
常用命令 安装 rpm -ivh package_name (package_name指的是RPM包的文件名) 查询 1.查询是否安装,及安装版本 rpm -q 已安装的软件名(ex:rpm -q docker-engine) rpm -qa |grep 字符串(在已安装的所有软件中查询包含某字符串的软件版本) 2.查询相关配置文件 rpm -ql 软件名(列出该软件所有文件与目录所在的完整文件名) rpm -qc 软件名(列出软件的所有设置文件) 3.查询某软件依赖的其他软件 rpm -qR 软件名 4.rpm -qf 文件名 (查询文件属于哪个软件包) 卸载 rpm -e --nodeps package_name 验证 rpm -V 已安装的软件名 (列出该软件被修改过的配置文件) rpm -Vf 文件名 (列出某个文件是否被改动过) 回退到低版本 rpm --Uvh --oldpackage --nodeps package_name (此命令包含卸载源环境中的软件包,和安装低版本软件包的两个步骤) 备份工具 rpmrebuild 作用:备份已经安装在环境的的软件 用法:rpmrebuild pacakge_name 如果软件的相关配置被改动过,该命令会询问是否继续,以及是否要命名一个新的软件版本名 如果不需要此询问 可以使用 rpmrebuild -b 来源: https

Linux:RPM安装工具的使用

ε祈祈猫儿з 提交于 2019-12-05 08:31:54
RPM安装工具的使用 RPM包管理工具介绍 RedHat 软件包管理工具(RedHat Package Manager,RPM) RPM 软件包工具常用于软件包的安装、查询、更新升级、校验、卸载以及生成.rpm 格式 的软件包等操作。 RPM 软件包工具只能管理后缀是.rpm 的软件包。软件包的命名格式: 软件名称-版本号(包括主版本号和次版本号).软件运行的硬件平台.rpm 例:telnet-server-0.17-59.el7.x86_64.rpm。 RPM工具的使用 查询 软件包的查询功能主要由-q选项完成,为了实现特殊的查询功能要配合其它的选项使用。 【举例 1】查询系统中已经安装的所有 RPM 软件包。 #rpm -qa 【举例 2】在已经安装的软件包中查询包含 lib 关键字的软件包的名称。 #rpm -qa | grep lib 【举例 3】查询 openssh-server 软件包是否已经安装。 #rpm -q openssh-server 【举例 4】查询 openssh-server 和 telnet-server 两个软件是否已经安装。 #rpm -q openssh-server telnet-server 【举例 5】查询已安装的 openssh-server 软件包的信息。 # rpm -qi openssh-server 【举例 6】查询

Linux查看包依赖关系的神器-repoquery分享

*爱你&永不变心* 提交于 2019-12-05 07:51:57
  RPM 安装第三方包的时候,经常会遇到依赖缺失问题;   这对于新手朋友们就不这么友好了,甚至不知所措;   在此推荐个依赖包关系查询工具 repoquery;   说明:repoquery是yum扩展工具包yum-utils中的一个工具,所有如果你没有repoquery命令的话,可以先 sudo yum install yum-utils 安装yum-utils包。是为了加强和补充yum功能的工具,重点是查询包的关系。repoquery的官方说明是:query information from Yum repositories,故名意思,它只能查看信息,并不能执行安装卸载更新等实质性的操作。而且要和Yum库配合使用。 实际生产环境中经常出现的例子 : 安装Chrome浏览器 rpm -ivh google-chrome-stable_current_x86_64.rpm 如果出现下面错误消息,则表明缺少依赖包: [root@lenmomDesktop Downloads]# rpm -ivh google-chrome-stable_current_x86_64.rpm warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY

bdist_rpm from Ubuntu to CentOs

二次信任 提交于 2019-12-05 07:30:46
We develop on Ubuntu/Macs and deploy RPMs to CentOS (this is the settings, can't be changed much). The problem is that when installing from the rpm, the packages go to /usr/local/lib/python2.7/dist-packages (which is the right location for Ubuntu). However the default python path in CentOS is looking at /usr/local/lib/python2.7/site-packages . Is there a way to tell bdist_rpm where to install the files to? You can use a setup.cfg file to override the Python lib install path: setup.cfg : [install] install-lib=/usr/local/lib/python2.7/site-packages Example: % python setup.py bdist_rpm % rpm -qpl

Deploying Django with virtualenv inside a distribution package?

末鹿安然 提交于 2019-12-05 07:15:28
I have to deploy a Django application onto a SuSE Linux Enterprise 11 system. Corporate rules say I need to deploy using RPMs only. While I can use ./setup.py bdist_rpm for each dependency, it's not really sane, since RPM doesn't record all of the dependencies yet. Therefore I'd have no real advantage in using RPMs and managing dependencies manually is somewhat cumbersome and I would like to avoid it. Now I had the following idea: While building a package, I could create a virtualenv , install all my dependencies via pip there and then package it up with the rest of the code into one solid RPM