摘自: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. Linux性能评测工具之一:gprof篇介绍

    转:http://blog.csdn.net/stanjiang2010/article/details/5655143 这些天自己试着对项目作一些压力测试和性能优化,也对用过的测试工具作一些总结,并 ...

  2. Python学习系列(五)(文件操作及其字典)

    Python学习系列(五)(文件操作及其字典) Python学习系列(四)(列表及其函数) 一.文件操作 1,读文件      在以'r'读模式打开文件以后可以调用read函数一次性将文件内容全部读出 ...

  3. Java面试题:如何对HashMap按键值排序

    Java中HashMap是一种用于存储“键”和“值”信息对的数据结构.不同于Array.ArrayList和LinkedLists,它不会维持插入元素的顺序. 因此,在键或值的基础上排序HashMap ...

  4. 使用FormData实现ajax文件异步上传

    1.传统的web开发文件上传一般是基于form表单的文件上传,同步的方式,用户体验差,可控性也差 2.异步上传的实现 有以下方式 2.1 借助浏览器插件 一般需要安装一些类似flash的插件  这种方 ...

  5. RecyclerView(滚动控件)的用法

    1.首先在build.gradle中添加依赖库 compile 'com.android.support:recyclerview-v7:24.2.1' 2.修改activity_main.xml & ...

  6. java使用array.copy复制数组

    总结:理解理解.重要啊 package com.a; import java.util.Arrays; public class FJKDLS { public static void main(St ...

  7. nginx 的第三方模块ngx_http_accesskey_module 来实现下载文件的防盗链步骤(linux系统下)

    nginx 的第三方模块ngx_http_accesskey_module 来实现下载文件的防盗链步骤(linux系统下),安装Nginx和HttpAccessKeyModule模块(参考LNMP环境 ...

  8. crush class实验

    标签(空格分隔): ceph,ceph实验,crushmap luminous版本的ceph新增了一个功能crush class,这个功能又可以称为磁盘智能分组.因为这个功能就是根据磁盘类型自动的进行 ...

  9. php数组指定字段排序

    数据全都存放在名为 data 的数组中.这通常是通过循环从数据库取得的结果,例如 mysql_fetch_assoc(). <?php$data[] = array('volume' => ...

  10. linux lcd设备驱动剖析四

    在"linux lcd设备驱动剖析二"文章中,我们详细分析了s3c24xxfb_probe函数. 文章链接:http://blog.csdn.net/lwj103862095/ar ...