简体   繁体   English

自定义rpm pkg安装时间很长,最终导致cpio错误

[英]custom rpm pkg takes very long time to install and causes cpio error at the end

The rpm package which i created takes long time to install. 我创建的rpm软件包需要很长时间才能安装。 It contains only database file of Berkely db format and size 2.2GB. 它仅包含Berkely db格式和大小为2.2GB的数据库文件。

Below is my RPM spec 以下是我的RPM规格

#AutoReq: no
AutoReqProv: no
%define PYTHON /usr/bin/python
%define RPM_BUILD_DIR %{_topdir}/BUILD
%define RPM_BUILD_ROOT %{_topdir}/tmp
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')

%define _source_payload w0.gzdio
%define _binary_payload w0.gzdio

#
Summary:   Prefixcat db package
Name:      prefixcat
Version:   %{VERSION}
Release:   %{RELEASE}
Source:    %{_sourcedir}
BuildRoot: %{_tmppath}/%{name}
License:   internal-only
Distribution: WR Linux
Vendor:    XXX xxx
Packager: XXX xx<xxx@xxx.com>
Group:     Test/Applications
#BuildArch: x86_64

%description
Prefixcat db

#%prep

#%build

%install
mkdir -p %{buildroot}/data/db/wbrs/factory/db
cp -r %{_sourcedir}/data/db/wbrs/factory/db/prefixcat_db %{buildroot}/data/db/wbrs/factory/db

%clean
%{__rm} -rf %{buildroot}

%pre

%post
echo "Prefixcat DB installed successfully in /data folder"


%files
%defattr(-,admin,root,-)
/data

%changelog
* Tue Aug 01 2017 Sudharsan C <xxx@xxx.com>
- Create prefixcat db as a seperate rpm

rpm ivh prefixcat-1.1.100.x86_64.rpm, takes almost 15mins to install. rpm ivh prefixcat-1.1.100.x86_64.rpm,大约需要15分钟的安装时间。

Also the above command causes this error 同样上述命令也会导致此错误

error: unpacking of archive failed on file /data/db/wbrs/factory/db/prefixcat_db;59818e12: cpio: read failed - Bad file descriptor 错误:文件/ data / db / wbrs / factory / db / prefixcat_db上存档的解压缩失败; 59818e12:cpio:读取失败-错误的文件描述符

Any help on how to compress the size and install faster? 任何有关如何压缩尺寸和更快安装的帮助吗?

Fyi:- i am building this rpm on CentOS7 and installing on windriver 8. RPM version is same across both OS. 仅供参考:-我正在CentOS7上构建此rpm并在windriver 8上安装。两个操作系统的RPM版本相同。

If the target architecture is 32-bit you might be running into a 2GB file size limit. 如果目标体系结构是32位,则可能会遇到2GB的文件大小限制。 What is the target architecture and root filesystem type? 目标体系结构和根文件系统类型是什么?

EDIT: Since you are using a 64-bit kernel a 2GB limit is far less likely. 编辑:由于您使用的是64位内核,因此2GB限制的可能性大大降低。

Have you verified (with sha256sum or similar) that the .rpm file on the remote system matches the file on your development system? 您是否已验证(使用sha256sum或类似工具)远程系统上的.rpm文件与开发系统上的文件匹配?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM