OSDN Git Service

Change test.
authorHe Chenlan <210hcl@gmail.com>
Mon, 18 Jan 2021 08:19:31 +0000 (16:19 +0800)
committerHe Chenlan <210hcl@gmail.com>
Mon, 18 Jan 2021 08:19:31 +0000 (16:19 +0800)
RPM参考指南.txt

index f4f55f4..376ddd4 100644 (file)
@@ -1,61 +1,61 @@
-RPM参考指南\r
-1.rpm编译\r
-2.rpm内容查看与解包\r
-3.打包环境准备\r
-3.rpm spec\r
-4.rpmbuild\r
-5.rpmlint\r
-\r
-0.说明\r
-RPM许可证为GPL2+ 以及LGPL2+除外\r
-https://rpm.org/ http://ftp.rpm.org/releases/rpm-4.16.x/rpm-4.16.1.2.tar.bz2\r
-\r
-1.编译\r
-参考来自https://github.com/rpm-software-management/rpm/raw/master/INSTALL fedora的spec以及openSUSE的spec\r
-编译必须的包:\r
-popt https://github.com/rpm-software-management/popt http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz\r
-zlib https://zlib.net/ https://zlib.net/zlib-1.2.11.tar.xz\r
-libmagic 系统核心包file提供\r
-加密库二选一\r
-openssl(fedora选择的) https://www.openssl.org/ https://mirrors.cloud.tencent.com/openssl/source/openssl-1.1.1i.tar.gz (受制于EAR①,openssl 1系列许可证与GPL不兼容) //EAR 美国出口管制条例\r
-libgcrypt(openSUSE选择的) https://www.gnupg.org/software/libgcrypt/ https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.7.tar.bz2 (不受制于EAR)\r
-数据库引擎\r
-主推荐ndb (rpm自己写的,rpm内建)\r
-主推荐sqlite https://sqlite.org/index.html https://sqlite.org/2020/sqlite-src-3340000.zip https://sqlite.org/2020/sqlite-autoconf-3340000.tar.gz \r
-BDB已经弃用 (BDB新版使用AGPLv3,是开源许可证,但是和GPLv2不兼容)\r
-BDB RO版支持方案--enable-bdb-ro (rpm内建)\r
-lua支持 (fedora的spec嵌入了大量lua源代码) https://www.lua.org/ https://www.lua.org/ftp/lua-5.4.2.tar.gz\r
-SELinux (原文为可选依赖,但fedora和OpenSUSE都有) https://github.com/SELinuxProject https://github.com/SELinuxProject/selinux/releases/download/20200710/libselinux-3.1.tar.gz //Warning:SELinux编译依赖较多\r
-python (原文为可选依赖,但fedora和OpenSUSE都有) https://www.python.org/ https://mirrors.huaweicloud.com/python/3.9.1/Python-3.9.1.tar.xz //Python依赖非常多连Xorg都需要\r
-libcap (原文为可选依赖,但fedora和OpenSUSE都有) https://sites.google.com/site/fullycapable/ http://mirrors.ustc.edu.cn/kernel.org/linux/libs/security/linux-privs/libcap2/libcap-2.46.tar.xz\r
-acl (原文为可选依赖,但fedora和OpenSUSE都有) https://savannah.nongnu.org/projects/acl https://download.savannah.nongnu.org/releases/acl/acl-2.2.53.tar.gz\r
-autoconf\r
-automake\r
-libtool\r
-makeinfo\r
-m4\r
-存疑 gnupg2 ncurses dwz audit-libs dbus libarchive zstd cpio\r
-\r
-讨论:数据库默认引擎,python,selinux,存疑库\r
-\r
-2.rpm内容查看与解包\r
-查看本地rpm内容 rpm -qlp *.rpm //任何rpm包,包括二进制包与src.rpm\r
-查看已经安装的包的内容 rpm -ql bash\r
-完全解压rpm rpm2cpio ./a.rpm | cpio -idmv //需要rpm2cpio与cpio\r
-cpio的参数:\r
--i = extract\r
--d = make directories\r
--m = preserve modification time\r
--v = verbose\r
-图形化软件如ark等也可以查看解压。(windows下用7zip)\r
-\r
-3.打包环境准备\r
-sudo zypper in rpm-build rpmconf rpmdevtools rpmlint ##build build在zypper未打包,自成体系前不要使用 spec\r
-rpm-build为rpm提供\r
-rpmconf 处理.rpmnew, .rpmsave和.rpmorig文件 https://github.com/xsuchy/rpmconf https://github.com/xsuchy/rpmconf/archive/rpmconf-1.1.3-1.tar.gz\r
-rpmdevtools 提供一些帮助打包的脚本 https://pagure.io/rpmdevtools https://releases.pagure.org/rpmdevtools/rpmdevtools-9.2.tar.xz\r
-rpmlint 检查rpm包中的错误 https://github.com/rpm-software-management/rpmlint https://github.com/rpm-software-management/rpmlint/archive/rpmlint-1.11.tar.gz\r
-build 自动在发行版内以chroot形式打包,自动解决依赖 \r
-rpmdev-setuptree \r
-执行后会自动在所在目录下新建rpmbuild文件夹,里面是rpm打包专用的目录。五个文件夹,BUILD文件夹,临时编译目录,宏%buildroot定义的目录,如果编译或打包失败,日志也在这个目录;RPMS文件夹,生成的二进制文件所在目录,.rpm前会有文件所属架构,如noarch,x86_64,aarch64;SOURCES文件夹,patch,源代码,额外的要打包进去的源文件放在这儿;SPEC文件夹,.spec文件就放这里;SRPM文件夹,生成的.src.rpm所在位置。\r
-\r
+RPM参考指南
+1.rpm编译
+2.rpm内容查看与解包
+3.打包环境准备
+3.rpm spec
+4.rpmbuild
+5.rpmlint
+
+0.说明
+RPM许可证为GPL2+ 以及LGPL2+除外
+https://rpm.org/ http://ftp.rpm.org/releases/rpm-4.16.x/rpm-4.16.1.2.tar.bz2
+
+1.编译
+参考来自https://github.com/rpm-software-management/rpm/raw/master/INSTALL fedora的spec以及openSUSE的spec
+编译必须的包:
+popt https://github.com/rpm-software-management/popt http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz
+zlib https://zlib.net/ https://zlib.net/zlib-1.2.11.tar.xz
+libmagic 系统核心包file提供
+加密库二选一
+openssl(fedora选择的) https://www.openssl.org/ https://mirrors.cloud.tencent.com/openssl/source/openssl-1.1.1i.tar.gz (受制于EAR①,openssl 1系列许可证与GPL不兼容) //EAR 美国出口管制条例
+libgcrypt(openSUSE选择的) https://www.gnupg.org/software/libgcrypt/ https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.7.tar.bz2 (不受制于EAR)
+数据库引擎
+主推荐ndb (rpm自己写的,rpm内建)
+主推荐sqlite https://sqlite.org/index.html https://sqlite.org/2020/sqlite-src-3340000.zip https://sqlite.org/2020/sqlite-autoconf-3340000.tar.gz 
+BDB已经弃用 (BDB新版使用AGPLv3,是开源许可证,但是和GPLv2不兼容)
+BDB RO版支持方案--enable-bdb-ro (rpm内建)
+lua支持 (fedora的spec嵌入了大量lua源代码) https://www.lua.org/ https://www.lua.org/ftp/lua-5.4.2.tar.gz
+SELinux (原文为可选依赖,但fedora和OpenSUSE都有) https://github.com/SELinuxProject https://github.com/SELinuxProject/selinux/releases/download/20200710/libselinux-3.1.tar.gz //Warning:SELinux编译依赖较多
+python (原文为可选依赖,但fedora和OpenSUSE都有) https://www.python.org/ https://mirrors.huaweicloud.com/python/3.9.1/Python-3.9.1.tar.xz //Python依赖非常多连Xorg都需要
+libcap (原文为可选依赖,但fedora和OpenSUSE都有) https://sites.google.com/site/fullycapable/ http://mirrors.ustc.edu.cn/kernel.org/linux/libs/security/linux-privs/libcap2/libcap-2.46.tar.xz
+acl (原文为可选依赖,但fedora和OpenSUSE都有) https://savannah.nongnu.org/projects/acl https://download.savannah.nongnu.org/releases/acl/acl-2.2.53.tar.gz
+autoconf
+automake
+libtool
+makeinfo
+m4
+存疑 gnupg2 ncurses dwz audit-libs dbus libarchive zstd cpio
+
+讨论:数据库默认引擎,python,selinux,存疑库
+
+2.rpm内容查看与解包
+查看本地rpm内容 rpm -qlp *.rpm //任何rpm包,包括二进制包与src.rpm
+查看已经安装的包的内容 rpm -ql bash
+完全解压rpm rpm2cpio ./a.rpm | cpio -idmv //需要rpm2cpio与cpio
+cpio的参数:
+-i = extract
+-d = make directories
+-m = preserve modification time
+-v = verbose
+图形化软件如ark等也可以查看解压。(windows下用7zip)
+
+3.打包环境准备
+sudo zypper in rpm-build rpmconf rpmdevtools rpmlint ##build build在zypper未打包,自成体系前不要使用 spec-clean 对spec文件进行格式化
+rpm-build为rpm提供
+rpmconf 处理.rpmnew, .rpmsave和.rpmorig文件 https://github.com/xsuchy/rpmconf https://github.com/xsuchy/rpmconf/archive/rpmconf-1.1.3-1.tar.gz
+rpmdevtools 提供一些帮助打包的脚本 https://pagure.io/rpmdevtools https://releases.pagure.org/rpmdevtools/rpmdevtools-9.2.tar.xz
+rpmlint 检查rpm包中的错误 https://github.com/rpm-software-management/rpmlint https://github.com/rpm-software-management/rpmlint/archive/rpmlint-1.11.tar.gz
+build 自动在发行版内以chroot形式打包,自动解决依赖 
+rpmdev-setuptree 
+执行后会自动在所在目录下新建rpmbuild文件夹,里面是rpm打包专用的目录。五个文件夹,BUILD文件夹,临时编译目录,宏%buildroot定义的目录,如果编译或打包失败,日志也在这个目录;RPMS文件夹,生成的二进制文件所在目录,.rpm前会有文件所属架构,如noarch,x86_64,aarch64;SOURCES文件夹,patch,源代码,额外的要打包进去的源文件放在这儿;SPEC文件夹,.spec文件就放这里;SRPM文件夹,生成的.src.rpm所在位置。
+