[Rpm-maint] [rpm-software-management/rpm] how to use the multi-threaded mode for packaging rpm? (#970)

ThreeDog notifications at github.com
Fri Dec 6 03:58:51 UTC 2019


Here are some more informations:
OS: Ubuntu 16.04 xenial
Kernel: x86_64 Linux 4.15.0-70-generic
CPU: Intel Core i7-8700 CPU @ 4.6GHz
Content of spec file: _(I have replaced some sensitive words with *)_
```
%global test_dir /opt/test/mytest/*****/

Name:           *********
Version:        1.1.1.1
Release:        1
Summary:        *******
Summary(zh_CN.UTF-8): ******
Group:          Applications/Editors
License:        Proprietary
URL:            http://www.threedog.top/
Source1:			opt
Source2:			usr
Source3:			etc
AutoReqProv:    no
Requires: libICE.so.6()(64bit)
Requires: libSM.so.6()(64bit)
Requires: libX11.so.6()(64bit)
Requires: libXext.so.6()(64bit)
Requires: libXrender.so.1()(64bit)
Requires: libxcb.so.1()(64bit)
Requires: libfontconfig.so.1()(64bit)
Requires: libglib-2.0.so.0()(64bit)
Requires: libgobject-2.0.so.0()(64bit)
Requires: libgthread-2.0.so.0()(64bit)
Requires: libpthread.so.0()(64bit)
Requires: librt.so.1()(64bit)
Requires: libz.so.1()(64bit)
Requires: libcups.so.2()(64bit)
Requires: libpng12.so.0()(64bit)
Requires: libGLU.so.1()(64bit)

%define __prelink_undo_cmd %{nil}
%description
Some nonsense

%description -l zh_CN.UTF-8
Some nonsense too

%prep

%build

%install
mkdir -p $RPM_BUILD_ROOT

mv -f %{SOURCE1} $RPM_BUILD_ROOT
mv -f %{SOURCE2} $RPM_BUILD_ROOT
mv -f %{SOURCE3} $RPM_BUILD_ROOT

%pre

%post

%preun

%postun

%posttrans

%files
%{_bindir}/*
/opt/test/
%{_datadir}/applications/******.desktop
%{_datadir}/mime/packages/*.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/fonts/*
%{_datadir}/templates/******.desktop

%attr(757, root, root) /usr/lib/mozilla/plugins/libbrowsergrapher.so

#开始菜单
%attr(757, root, root) %{_datadir}/desktop-directories/*******.directory
%attr(757, root, root) %{_sysconfdir}/xdg/menus/applications-merged/******.menu
%attr(757, root, root) %{_sysconfdir}/xdg/autostart/******.desktop

# font
%{_sysconfdir}/fonts/conf.avail/*******.conf
%{_sysconfdir}/fonts/conf.d/*******.conf
%{_sysconfdir}/*
```
The command I executed is:(with -bb , Does not  include compilation during packaging)
```
sudo rpmbuild --define "_topdir "/home/threedog/******" " --define "_binary_payload w9.lzdio" -bb  /home/threedog/******/SPECS/*****.spec
``` 
Build logs:
```
正在执行(%prep):/bin/sh -e /usr/var/tmp/rpm-tmp.nUkjlD
+ umask 022
+ cd /home/threedog/******/BUILD
+ RPM_EC=0
+ jobs -p
+ exit 0
正在执行(%build):/bin/sh -e /usr/var/tmp/rpm-tmp.y8GaQB
+ umask 022
+ cd /home/threedog/******/BUILD
+ RPM_EC=0
+ jobs -p
+ exit 0
正在执行(%install):/bin/sh -e /usr/var/tmp/rpm-tmp.YX8ilA
+ umask 022
+ cd /home/threedog/******/BUILD
+ mkdir -p /home/threedog/******/BUILDROOT/*****-1.1.1.1.x86_64
+ mv -f /home/threedog/******/SOURCES/opt /home/threedog/******/BUILDROOT/*****-1.1.1.1.x86_64
+ mv -f /home/threedog/******/SOURCES/usr /home/threedog/******/BUILDROOT/*****-1.1.1.1.x86_64
+ mv -f /home/threedog/******/SOURCES/etc /home/threedog/******/BUILDROOT/*****-1.1.1.1.x86_64
+ /usr/lib/rpm/brp-compress /usr
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
处理文件:******1.1.1.1.x86_64
警告:被列出两次的文件:/etc/fonts/conf.avail/******.conf
警告:被列出两次的文件:/etc/fonts/conf.d/******.conf
警告:absolute symlink: /etc/fonts/conf.d/******.conf -> /etc/fonts/conf.avail/******.conf
警告:被列出两次的文件:/etc/xdg/autostart/*****.desktop
警告:被列出两次的文件:/etc/xdg/menus/applications-merged/*****.menu
Provides: ***** = 1.1.1.1.****  *****(x86-64) = 1.1.1.1.****
Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(pre): /bin/sh
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires(postun): /bin/sh
Requires(posttrans): /bin/sh
检查未打包文件:/usr/lib/rpm/check-files /home/threedog/******/BUILDROOT/*****-1.1.1.1.x86_64
已写至:/home/threedog/******/RPMS/x86_64/******1.1.1.1****.x86_64.rpm
```
My files have 1.2G before packaging, here are all the file mime-types ,maybe It's helpful for analysis.I think these types should can be packaged with Multi-threading mode
```
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
text/x-shellscript
application/vnd.ms-office
image/x-icon
text/plain
audio/x-wav
image/x-ms-bmp
application/x-font-ttf
application/msword
application/zip
application/x-sharedlib
application/vnd.openxmlformats-officedocument.presentationml.presentation
application/vnd.ms-excel
application/x-setupscript
image/jpeg
text/html
application/vnd.ms-powerpoint
application/octet-stream
application/xml
application/x-zmachine
application/x-font-sfn
inode/x-empty
image/gif
application/CDFV2-unknown
application/x-executable
image/png
inode/symlink
```

Now I have tried three versions of rpm,  including 4.15.0 4.15.1 and 4.15.90(master branch on github) but none of them dose work.

I guess there are some macros should be add to the spec file ,which can trun this feature on but I didn't.  

I have ever installed version 4.12.0.1 by `apt-get install rpm` , it is now uninstalled clearly. And I don't known if it will cause some trouble.

Is there any problem in my files and commands? if not, maybe my packaging process really cannot be multi-threaded. That's so frustrating

Thank you for all the work for rpm!










-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/970#issuecomment-562422705
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191205/96b503da/attachment-0001.html>


More information about the Rpm-maint mailing list