https://gist.github.com/fernandoaleman/1376720

 How to sign your custom RPM package with GPG key

这是文件rpm-digital-signature.sh

 #rpm-digital-signature.sh

 # How to sign your custom RPM package with GPG key

 # Step:
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response:
# -----------------------------------------------------------------------
# We need to generate a lot of random bytes. It is a good idea to perform
# some other action (type on the keyboard, move the mouse, utilize the
# disks) during the prime generation; this gives the random number
# generator a better chance to gain enough entropy.
# -----------------------------------------------------------------------
# Open up a separate terminal, ssh into your server and run this command:
# ls -R / gpg --gen-key # Step:
# Verify your gpg keys were created gpg --list-keys # Step:
# Export your public key from your key ring to a text file.
#
# You will use the information for Real Name and Email you used to
# create your key. I used Fernando Aleman and faleman@email.com gpg --export -a 'Fernando Aleman' > RPM-GPG-KEY-faleman # Step:
# Import your public key to your RPM DB
#
# If you plan to share your custom built RPM packages with others, make sure
# to have your public key file available online so others can verify RPMs sudo rpm --import RPM-GPG-KEY-faleman # Step:
# Verify the list of gpg public keys in RPM DB rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n' # Step:
# Configure your ~/.rpmmacros file
#
# You can use the following command to edit if you are on the server:
# vi ~/.rpmmacros
#
# %_signature => This will always be gpg
# %_gpg_path => Enter full path to .gnupg in your home directory
# %_gpg_name => Use the Real Name you used to create your key
# %_gpbin => run `which gpg` (without ` marks) to get full path %_signature gpg
%_gpg_path /root/.gnupg
%_gpg_name Fernando Aleman
%_gpgbin /usr/bin/gpg # Step:
# Sign your custom RPM package
#
# You can sign each RPM file individually: rpm --addsign git-1.7.7.3-.el6.x86_64.rpm # Or you can `cd` into your RPMS folder and sign them all: rpm --addsign *.rpm # Step:
# Check the signature to make sure it was signed
#
# Watch for 'gpg OK' as in this example:
# git-1.7.7.3-.el6.x86_64.rpm: (sha1) dsa sha1 md5 gpg OK rpm --checksig git-1.7.7.3-.el6.x86_64.rpm # Tip!
# Sign package during build
#
# To sign a package while it's being built, simply add '--sign' rpmbuild -ba --sign git.spec

DIY的RPM包怎么签名呢 How to sign your custom RPM package with GPG key的更多相关文章

  1. DIY的RPM包怎么签名呢 - 笔记

    参考 https://gist.github.com/fernandoaleman/1376720 如果打不开上一个连接,请参考https://www.cnblogs.com/LiuYanYGZ/p/ ...

  2. RPM 包的构建 - 实例

    打包目录 rpm 打包目录有一些严格的层次上的要求. rpm 的版本 <=4.4.x,rpmbuid 工具其默认的工作路径是 /usr/src/redhat.因为权限的问题,普通用户不能制作 r ...

  3. RPM 包的构建 - SPEC 基础知识

    spec 文件 制作 rpm 软件包并不是一件复杂的工作,其中的关键在于编写软件包的 spec 描述文件. 要想制作一个 rpm 软件包就必须写一个软件包描述文件 spec.这个文件中包含了软件包的诸 ...

  4. 使用rpm-build制作nginx的rpm包

    2014-11-27 11:05:49   一.RPM包的分类 RPM有五种基本的操作功能:安装.卸载.升级.查询和验证. linux软件包分为两大类: (1)二进制类包,包括rpm安装包(一般分为i ...

  5. 自学Linux Shell9.2-基于Red Hat系统工具包存在两种方式之一:RPM包

    点击返回 自学Linux命令行与Shell脚本之路 9.2-基于Red Hat系统工具包存在两种方式之一:RPM包 本节主要介绍基于Red Had的系统(测试系统centos) 1. 工具包存在两种方 ...

  6. rpm包的安装,查询,卸载,升级,校验,数据库重建,验证数据包

    rpm命名: 包:组成部分 主包:bind-9.7.1-1.i586.e15.rpm 子包:bind-lib-9.7.1-1.i586.e15.rpm bind-utils-9.7.1-1.i586. ...

  7. 一步步制作RPM包

    一步步制作RPM包 来源 http://blog.51cto.com/laoguang/1103628 一.RPM制作步骤 我们在企业中有的软件基本都是编译的,我们每次安装都得编译,那怎么办呢?那就根 ...

  8. linux 下载rpm包到本地,createrepo:创建本地YUM源

    如何下载rpm包到本地 设置yum安装时,保留rpm包. 1.编辑 /etc/yum.conf 将keepcache的值设置为1; 这样就可以将yum安装时的rpm包保存在 /var/cache/yu ...

  9. 部分rpm包总结描述

    acl-2.2.51-15.el7.x86_64 Commands for Manipulating POSIX(可移植操作系统接口 of unix) Access Control Lists.有ge ...

随机推荐

  1. brew安装php和扩展

    brew install homebrew/php/php56 --with-apache 报错: checking if the location of ZLIB install directory ...

  2. hdu4451 Dressing(容斥原理)

    #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #inc ...

  3. Git 版本管理工具(一)

    转自:http://blog.csdn.net/ithomer/article/details/7527877 Git 是一个分布式版本控制工具,它的作者 Linus Torvalds 是这样给我们介 ...

  4. Yii 查询 搜索

    一.视图 <div class="form-horizontal"> <?php $form = $this->beginWidget('CActiveFo ...

  5. http请求在asp.net中的请求过程

    当请求一个*.aspx文件的时候,这个请求会被inetinfo.exe进程截获,它判断文件的后缀(aspx)之后,将这个请求转交给 ASPNET_ISAPI.dll,ASPNET_ISAPI.dll会 ...

  6. laravel 配置文件的使用

    在开发的时候有许多数据是固定的 或者是多处使用的, 那么我们可以把它保存到配置文件中, 这样将来我们可以直接从配置文件中读取这个数据,如果有特殊的数据需要改变的时候,我们也可以在单独特定的环境中,不使 ...

  7. 自己写的highcharts级联(点击事件)

    $.fn.extend({ Zhu: function (option) { var id = $(this).attr("id"); $('#' + id).highcharts ...

  8. java代码继承疑惑,请有心人解答

    总结:这段程序没有问题,编译运行都是可以的.关键是,子类的无参构造方法第一句少了super(a,b);运行后,显示了双重结果 .还有.如果子类中没有声明成员变量String  name.那么结果显示父 ...

  9. Java-API:javax.servlet.http.HttpServletRequest

    ylbtech-Java-API:javax.servlet.http.HttpServletRequest 1.返回顶部 1. javax.servlet.http Interface HttpSe ...

  10. 侯捷STL学习(六)--深入list && Iterator traits

    第十三,四节 深度探索list(上,下) list Gnu2.9源代码实现 注意node代码和图示的位置 实现前闭后开,增加一个空白节点 用的分配器alloc Iterator智能指针,需要知道结点n ...