摘自:http://livecipher.blogspot.com/2012/06/disable-binary-stripping-in-rpmbuild.html

Stripping Binary files in rpmbuild

RedHat Package Manage
When we create an RPM using rpmbuild, the binary files are stripped. The intention is to reduce the file size, without affecting the functionality. This is the default setting, configured using the rpm macro__os_install_post.  
 
This blog entry talks about how to disable this option. 
 
This is done using the compression scripts, installed as part of rpm-build rpm.
The rpm macro __os_install_post is defined to execute these scripts. The scripts used to compress the binary file size are as follows.
$ rpm --showrc | grep -A 4 ': __os_install_post'
-14: __os_install_post  
    /usr/lib/rpm/brp-compress 
    /usr/lib/rpm/brp-strip 
    /usr/lib/rpm/brp-strip-static-archive 
    /usr/lib/rpm/brp-strip-comment-note

Recently, I had an uncommon requirement to disable this option. I do not want to reduce the file size of all files packaged in the rpm. This is achievable using any of 3 mechanisms.

  • Spec file
  • ~/.rpmmacros
  • /etc/rpm/macros
To prevent binary stripping for specific rpm, we could add following line at the top of any rpm spec file.
%global __os_install_post %{nil}
To prevent binary stripping for all rpms created by specific user, we could add following line in ~/.rpmmacros file:

%__os_install_post %{nil}

To prevent binary stripping for all rpms created by all users, we could add following line in /etc/rpm/macros file:

%__os_install_post %{nil}

rpmbuild spec 打包jar变小了、设置禁止压缩二进制文件Disable Binary stripping in rpmbuild的更多相关文章

  1. bootstrap中给表格设置display之后表格宽度变小问题解决

    问题描述:bootstrap中给表格设置display之后表格宽度变小了 解决方案:给表格加上 display:table样式就可以了.

  2. SpannableString 转换局部字体大小,但在EditText测量之前设置内容,测量高度为,字体变小之前的高度

    public void setHint(@NonNull String hint, @Nullable CharSequence subHint) { this.hint = hint; if (su ...

  3. ant+proguard签名打包 .jar

    ant+proguard签名打包 .jar 摘自: https://blog.csdn.net/a_ycmbc/article/details/53432812 2016年12月02日 14:52:3 ...

  4. exe4J打包jar文件成exe可执行文件

    exe4j_6.0下载(x86\x64\注册机):        https://pan.baidu.com/s/1oFzif5ZVswbgbBkKHc8HFQ 打包步骤: 再次偷一下懒,使用别人的内 ...

  5. 基于Java的打包jar、war、ear包的作用与区别详解

      本篇文章,小编为大家介绍,基于Java的打包jar.war.ear包的作用与区别详解.需要的朋友参考下   以最终客户的角度来看,JAR文件就是一种封装,他们不需要知道jar文件中有多少个.cla ...

  6. css通用小笔记03——浏览器窗口变小 div错位的问题

    我最近写网页的时候,经常碰到一个普遍的问题,经过我的查阅和尝试,终于解决了这一问题,这里有两种方法提供给大家,如果博友还有更好的方法,欢迎补充. 一.使用min-width属性: 我们先看看下面这段代 ...

  7. [word]2010中插入公式自动编号并且公式不自动缩小/变小

    要实现在word2010中插入公式自动编号,就要用到自动图文集功能,具体操作如下: 1.先制定制表位位置:单击一个空白段落,然后双击标尺线的底部:这会激活"制表位"对话框,如图所示 ...

  8. Eclipse将android项目打包jar文件

    Eclipse+android打包jar文件 蔡建良 2016-3-12 以Android-SlideExpandableListView开源框架为例,将源码Library打包成jar文件并包含R.c ...

  9. 关于在打包Jar文件时遇到的资源路径问题(一)

    当我们将程序写好,并进行打包成Jar文件时,通常都带有各种资源,这些资源可以是图像或者声音文件,也可以是别的如文本文件或二进制文件等,这些资源都和代码密切相关.例如在一个JPanel类上显示一些可能变 ...

随机推荐

  1. LeetCode Minimum Time Difference

    原题链接在这里:https://leetcode.com/problems/minimum-time-difference/description/ 题目: Given a list of 24-ho ...

  2. Python学习流程

    这是我在过去几家公司招聘到工程师,Python入职培训的过程. 时间分为4周,全部自学,仅提供大纲.适用于Web方向: 1.Week1:读完<简明Python教程>,适应Python开发环 ...

  3. linux下修改ip地址

    1.more  /etc/sysconfig/network-scripts/ifcfg-eth0 2.ifconfig eth0 192.168.1.211 netmask 255.255.255. ...

  4. 连续创建多个Oracle触发器失败,单个创建才成功的解决方法

    当用到自增序列,需要用到触发器的时候,当我连续执行创建多个触发器时,总是报编译通过,但存在警告或错误. ---.应用信息 drop table app_info cascade constraints ...

  5. linux用netstat查看服务及监听端口

    [root@localhost ~]# netstat -nlp netstat命令各个参数说明如下: -t : 指明显示TCP端口 -u : 指明显示UDP端口 -l : 仅显示监听套接字(所谓套接 ...

  6. mysql时间运算

    DELETE FROM zhongqiu WHERE caretatime<=ADDDATE(NOW(),-14) caretatime` timestamp NOT NULL DEFAULT ...

  7. css中伪类和伪元素的区别

    转载:http://www.cnblogs.com/ihardcoder/p/5294927.html CSS3伪类和伪元素的特性和区别   前端er们大都或多或少地接触过CSS伪类和伪元素,比如最常 ...

  8. https配置指导

    为了使Apache支持https访问,系统需要安有apache.openssl.mod_ssl.so 证书申请 https://ninghao.net/blog/4449 安装证书时 安装编译open ...

  9. 工具软件集合 Adobe AE PS Pr CC 2018 2019 破解教程

    来源https://mp.weixin.qq.com/s/zeq1sTmaPsKt7Bsok0Ldrg(若链接失效,请关注软件安装管家公众号) 相关链接 Office 2019破解教程 Adobe 2 ...

  10. 配置MapReduce插件时,弹窗报错org/apache/hadoop/eclipse/preferences/MapReducePreferencePage : Unsupported major.minor version 51.0(Hadoop2.7.3集群部署)

    原因: hadoop-eclipse-plugin-2.7.3.jar 编译的jdk版本和eclipse启动使用的jdk版本不一致导致.  解决方案一: 修改myeclipse.ini文件即可解决. ...