DIY的RPM包怎么签名呢 How to sign your custom RPM package with GPG key
How to sign your custom RPM package with GPG key
#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的更多相关文章
- DIY的RPM包怎么签名呢 - 笔记
参考 https://gist.github.com/fernandoaleman/1376720 如果打不开上一个连接,请参考https://www.cnblogs.com/LiuYanYGZ/p/ ...
- RPM 包的构建 - 实例
打包目录 rpm 打包目录有一些严格的层次上的要求. rpm 的版本 <=4.4.x,rpmbuid 工具其默认的工作路径是 /usr/src/redhat.因为权限的问题,普通用户不能制作 r ...
- RPM 包的构建 - SPEC 基础知识
spec 文件 制作 rpm 软件包并不是一件复杂的工作,其中的关键在于编写软件包的 spec 描述文件. 要想制作一个 rpm 软件包就必须写一个软件包描述文件 spec.这个文件中包含了软件包的诸 ...
- 使用rpm-build制作nginx的rpm包
2014-11-27 11:05:49 一.RPM包的分类 RPM有五种基本的操作功能:安装.卸载.升级.查询和验证. linux软件包分为两大类: (1)二进制类包,包括rpm安装包(一般分为i ...
- 自学Linux Shell9.2-基于Red Hat系统工具包存在两种方式之一:RPM包
点击返回 自学Linux命令行与Shell脚本之路 9.2-基于Red Hat系统工具包存在两种方式之一:RPM包 本节主要介绍基于Red Had的系统(测试系统centos) 1. 工具包存在两种方 ...
- 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. ...
- 一步步制作RPM包
一步步制作RPM包 来源 http://blog.51cto.com/laoguang/1103628 一.RPM制作步骤 我们在企业中有的软件基本都是编译的,我们每次安装都得编译,那怎么办呢?那就根 ...
- linux 下载rpm包到本地,createrepo:创建本地YUM源
如何下载rpm包到本地 设置yum安装时,保留rpm包. 1.编辑 /etc/yum.conf 将keepcache的值设置为1; 这样就可以将yum安装时的rpm包保存在 /var/cache/yu ...
- 部分rpm包总结描述
acl-2.2.51-15.el7.x86_64 Commands for Manipulating POSIX(可移植操作系统接口 of unix) Access Control Lists.有ge ...
随机推荐
- nyoj-952-最大四边形 (向量叉乘)
题目链接 /* Name:nyoj-952-最大四边形 Copyright: Author: Date: 2018/4/27 10:46:24 Description: 枚举一条对角线,再选择一个 看 ...
- nyoj-67-三角形面积(S=(1/2)*(x1y2+x2y3+x3y1-x1y3-x2y1-x3y2))
题目链接 /* Name:nyoj-67-三角形面积 Copyright: Author: Date: 2018/4/26 16:44:47 Description: 三角形的三个顶点坐标求其面积的公 ...
- hdu 4445 Crazy Tank(物理过程枚举)
遇到物理题,千万不要一味的当成物理题去想着推出一个最终结果来,这样ACM竞赛成了物理比赛,出题人就没水平了...往往只需要基础的物理分析,然后还是用算法去解决问题.这题n小于等于200,一看就估计是暴 ...
- UVA - 11019 Matrix Matcher (二维字符串哈希)
给你一个n*m的矩阵,和一个x*y的模式矩阵,求模式矩阵在原矩阵中的出现次数. 看上去是kmp在二维情况下的版本,但单纯的kmp已经无法做到了,所以考虑字符串哈希. 类比一维情况下的哈希算法,利用容斥 ...
- Windows平台下gitbook的安装与使用
最近要用到gitbook去阅读电子书,整理了一份在windows系统下安装gitbook的过程. * 安装nodejs * 安装cnpm * 搭建gitbook平台 1.在windows上安装node ...
- (转)更改Web.config中对上传文件大小限制
.net上传超过200K的图片的时候,会跳转到404,但是url没有错误,真J8的坑啊. 本文转载自:http://www.cnblogs.com/zwffff/archive/2009/04/29/ ...
- Annotation之四:注解中的-Xlint:unchecked和 -Xlint:deprecation
一.-Xlint:unchecked用法 对如下Test.java编译时 package com.dxz.annotation; import java.util.ArrayList; import ...
- JAVA web 相关知识点
1: web的三个核心标准: URL: http VS https HTTP: 通信协议,客户端/服务器端信息交互方式; 特点是无状态: HTML: 2: HT ...
- python startswith与endswith
如果你要用python匹配字符串的开头或末尾是否包含一个字符串,就可以用startswith,和endswith比如:content = 'ilovepython'如果字符串content以ilove ...
- Oracle 多表查询(2)
四.统计函数及分组查询 1.统计函数 在之前学习过一个COUNT()函数,此函数的功能可以统计出表中的数据量,实际上这个就是一个统计函数,而常用的统计函数有如下几个: COUNT():查询表中的数据记 ...