摘自: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. C# 在类文件自动添加文件注释的方法

    对于vs2013来讲, 步骤: 1.VS2013 中找到(安装盘符以C盘为例)C:\ProgramFiles(x86)\Microsoft VisualStudio12.0\Common7\IDE\I ...

  2. Android Studio 打包及引用 AAR(可能是史上最详细的 )

    https://www.jianshu.com/p/1777a634db5e Android Library(AAR) 的好处 Android 库在结构上与 Android 应用模块相同.它可以提供构 ...

  3. Linux环境下安装jenkins

    废话不多说,直接开始 1.从官网下载Jenkins的war包 2.下载好的War放到Tomcat的网站根目录webapps下,然后启动Tomcat. 3.打开浏览器,输入http://IP:8080/ ...

  4. 使用内部变量,删除,替换,UNSET,等字符操作

    使用内部变量,删除,替换,UNSET,等字符操作 FREDDY=freddy   删除字符串前几2个字符: [root@localhost tmp]# echo ${FREDDY:2} eddy   ...

  5. grep 命令使用指南

    grep 命令 grep参数: -E:等同于egrep -o:只匹配你想要的内容,下面是示例: [root@localhost ~]# cat /data/game/config/server_con ...

  6. erlang的dict和maps模块

    erlang在r17以后增加了map这个数据结构,在之前,类似map的需求用dict模块来实现,这里直接贴一下相关的操作 dict D = dict:new(). D1 = dict:store(k1 ...

  7. (转)winform下TCP通信的简单应用

    本文转载自:http://blog.csdn.net/wanlong360599336/article/details/7557064 先看效果图: TCP比较繁琐的就是三次握手定理,每次再发送数据前 ...

  8. js前端处理datetime时间类型

    MySql数据库日期字段定义的是datetime类型,(顺带插入MySql数据库datetime类型可以用这个: str_to_date('2008-4-2 15:23:28','%Y-%m-%d % ...

  9. C语言中的未初始化变量的值

    C语言中未初始化的变量的值是0么 全局变量 .静态变量初始值为0局部变量,自动变量初始值随机分配 C语言中,定义局部变量时如果未初始化,则值是随机的,为什么? 定义局部变量,其实就是在栈中通过移动栈指 ...

  10. SecureCRT乱码问题解决方法

    环境:SecureCRT登陆REDHAT5.3 LINUX系统 问题:vi编辑器编辑文件时文件中的内容中文显示乱码,但是直接使用linux系统terminal打开此文件时中文显示正常,确诊问题出现在客 ...