casper 发表于 2004-5-13 12:55:20

制作包的问题

今天按照公社的培训大纲里的
如何制作RPM
http://www.linuxfans.org/nuke/modules.php?name=News&file=article&op=view&sid=18
动手做了一遍,完全按照介绍,一字不漏,最后并没有生成包,输出的两个文件的内容如下:
1./tmp/err

+ umask 022
+ cd /usr/src/mBuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/mBuild/BUILD
+ rm -rf helloworld-1.0
+ /bin/mkdir -p helloworld-1.0
+ cd helloworld-1.0
+ /bin/gzip -dc /usr/src/mBuild/SOURCES/helloworld-1.0-1.tar.gz
+ tar -xvvf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ exit 0
+ umask 022
+ cd /usr/src/mBuild/BUILD
+ cd helloworld-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ make helloworld
+ exit 0
+ umask 022
+ cd /usr/src/mBuild/BUILD
+ cd helloworld-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ install -m 755 helloworld /usr/local/bin/helloworld
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/mBuild/BUILD/helloworld-1.0
0 blocks
+ /usr/lib/rpm/mBuild/brp-compress
+ /usr/lib/rpm/mBuild/brp-strip /usr/bin/strip
+ /usr/lib/rpm/mBuild/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/mBuild/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ umask 022
+ cd /usr/src/mBuild/BUILD
+ cd helloworld-1.0
+ DOCDIR=/usr/share/doc/helloworld-1.0
+ export DOCDIR
+ rm -rf /usr/share/doc/helloworld-1.0
+ /bin/mkdir -p /usr/share/doc/helloworld-1.0
+ cp -pr README /usr/share/doc/helloworld-1.0
+ exit 0
getOutputFrom(): 断开的管道


2./tmp/out

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9006
-rw-rw-r-- casper/casper    45 2004-05-12 21:42:55 README
-rw-rw-r-- casper/casper    38 2004-05-12 21:43:39 helloworld.c
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.9006
cc   helloworld.c   -o helloworld
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.48602
extracting debug info from ./helloworld
Processing files: helloworld-1.0-1
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.34764
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libc.so.6 libc.so.6(GLIBC_2.0)
Processing files: helloworld-debuginfo-1.0-1
Provides: ark.so.debug cupsdconf.so.debug cupsdconf.so.debug.debug dcopserver.so.debug dcopserver.so.debug.debug highcolor.so.debug highcolor.so.debug.debug kabc_dir.so.debug kabc_dir.so.debug.debug kabc_file.so.debug kabc_file.so.debug.debug kabc_imap.so.debug kabc_ldapkio.so.debug kabc_ldapkio.so.debug.debug kabc_net.so.debug kabc_net.so.debug.debug kabcformat_binary.so.debug kabcformat_binary.so.debug.debug kabcformat_kdeaccounts.so.debug kaddprinterwizard.so.debug kaddprinterwizard.so.debug.debug katecppsymbolviewerplugin.so.debug katefll_initplugin.so.debug katefll_plugin.so.debug katehtmltoolsplugin.so.debug kateinsertcommandplugin.so.debug katemodelineplugin.so.debug kateopenheaderplugin.so.debug katepybrowseplugin.so.debug katetextfilterplugin.so.debug katexmlcheckplugin.so.debug katexmltoolsplugin.so.debug kbabel_accelstool.so.debug kbabel_argstool.so.debug kbabel_contexttool.so.debug kbabel_equationstool.so.debug kbabel_gettextexport.so.debug kbabel_gettextimport.so.debug kbabel_lengthtool.so.debug kbabel_linguistexport.so.debug kbabel_linguistimport.so.debug kbabel_nottranslatedtool.so.debug kbabel_pluraltool.so.debug kbabel_punctuationtool.so.debug kbabel_setfuzzytool.so.debug kbabel_whitespacetool.so.debug kbabel_xmltool.so.debug kbabeldict_dbsearchengine.so.debug kbabeldict_poauxiliary.so.debug kbabeldict_pocompendium.so.debug kbabeldict_tmxcompendium.so.debug kbinaryclock_panelapplet.so.debug kbuildsycoca.so.debug kbuildsycoca.so.debug.debug kbzip2filter.so.debug kbzip2filter.so.debug.debug kcal_imap.so.debug kcal_kabc.so.debug kcal_local.so.debug kcal_localdir.so.debug kcal_remote.so.debug kcalc.so.debug kcm_audiocd.so.debug kcm_cddb.so.debug kcm_kabconfig.so.debug kcm_kabldapconfig.so.debug kcm_kdf.so.debug kcm_kmix.so.debug kcm_kontact.so.debug kcm_kopete_accountconfig.so.debug kcm_kopete_appearanceconfig.so.debug kcm_kopete_autoreplace.so.debug kcm_kopete_behaviorconfig.so.debug kcm_kopete_cryptography.so.debug kcm_kopete_highlight.so.debug kcm_kopete_history.so.debug kcm_kopete_msn.so.debug kcm_kopete_nowlistening.so.debug kcm_kopete_texteffect.so.debug kcm_kopete_translator.so.debug kcm_kopete_webpresence.so.debug kcm_korganizer.so.debug kcm_kresources.so.debug kcm_kresources.so.debug.debug kcm_ktalkd.so.debug kcm_kuick.so.debug kcm_kwallet.so.debug kcm_laptop.so.debug kcm_userinfo.so.debug kconf_update.so.debug kconf_update.so.debug.debug kcookiejar.so.debug kcookiejar.so.debug.debug kded.so.debug kded.so.debug.debug kded_kcookiejar.so.debug kded_kcookiejar.so.debug.debug kded_kdeprintd.so.debug kded_kdeprintd.so.debug.debug kded_klaptopdaemon.so.debug kded_kpasswdserver.so.debug kded_kpasswdserver.so.debug.debug kded_kssld.so.debug kded_kssld.so.debug.debug kded_kwalletd.so.debug kded_kwalletd.so.debug.debug kded_proxyscout.so.debug kded_proxyscout.so.debug.debug kdeprint_cups.so.debug kdeprint_cups.so.debug.debug kdeprint_ext.so.debug kdeprint_ext.so.debug.debug kdeprint_lpdunix.so.debug kdeprint_lpdunix.so.debug.debug kdeprint_lpr.so.debug kdeprint_lpr.so.debug.debug kdeprint_rlpr.so.debug kdeprint_rlpr.so.debug.debug kdeprint_tool_escputil.so.debug kdeprint_tool_escputil.so.debug.debug kdewidgets.so.debug kdewidgets.so.debug.debug kdvipart.so.debug keramik.so.debug keramik.so.debug.debug kfaxpart.so.debug kfile_au.so.debug kfile_avi.so.debug kfile_bmp.so.debug kfile_cpp.so.debug kfile_deb.so.debug kfile_desktop.so.debug kfile_diff.so.debug kfile_dvi.so.debug kfile_folder.so.debug kfile_html.so.debug kfile_ico.so.debug kfile_jpeg.so.debug kfile_m3u.so.debug kfile_mp3.so.debug kfile_ogg.so.debug kfile_pcx.so.debug kfile_pdf.so.debug kfile_png.so.debug kfile_pnm.so.debug kfile_po.so.debug kfile_ps.so.debug kfile_rpm.so.debug kfile_tga.so.debug kfile_tiff.so.debug kfile_ts.so.debug kfile_txt.so.debug kfile_vcf.so.debug kfile_wav.so.debug kfile_xbm.so.debug kfileaudiopreview.so.debug kfileaudiopreview.so.debug.debug kgzipfilter.so.debug kgzipfilter.so.debug.debug khtml_kget.so.debug khtmlimagepart.so.debug khtmlimagepart.so.debug.debug kimg_eps.so.debug kimg_eps.so.debug.debug kimg_ico.so.debug kimg_ico.so.debug.debug kimg_pcx.so.debug kimg_pcx.so.debug.debug kimg_tga.so.debug kimg_tga.so.debug.debug kimg_tiff.so.debug kimg_tiff.so.debug.debug kimg_xview.so.debug kimg_xview.so.debug.debug kio_audiocd.so.debug kio_file.so.debug kio_file.so.debug.debug kio_ftp.so.debug kio_ftp.so.debug.debug kio_ghelp.so.debug kio_ghelp.so.debug.debug kio_help.so.debug kio_help.so.debug.debug kio_http.so.debug kio_http.so.debug.debug kio_http_cache_cleaner.so.debug kio_http_cache_cleaner.so.debug.debug kio_metainfo.so.debug kio_metainfo.so.debug.debug kio_sieve.so.debug kio_uiserver.so.debug kio_uiserver.so.debug.debug kjavaappletviewer.so.debug kjavaappletviewer.so.debug.debug klauncher.so.debug klauncher.so.debug.debug kmix.so.debug kmix_panelapplet.so.debug kmixctrl.so.debug knotify.so.debug knotify.so.debug.debug kolourpicker_panelapplet.so.debug konq_smbmounterplugin.so.debug konqsidebar_mediaplayer.so.debug kopete_aim.so.debug kopete_autoreplace.so.debug kopete_chatwindow.so.debug kopete_connectionstatus.so.debug kopete_contactnotes.so.debug kopete_cryptography.so.debug kopete_highlight.so.debug kopete_history.so.debug kopete_icq.so.debug kopete_irc.so.debug kopete_jabber.so.debug kopete_msn.so.debug kopete_nowlistening.so.debug kopete_sms.so.debug kopete_texteffect.so.debug kopete_translator.so.debug kopete_webpresence.so.debug kopete_yahoo.so.debug ktexteditor_insertfile.so.debug ktexteditor_insertfile.so.debug.debug ktexteditor_isearch.so.debug ktexteditor_isearch.so.debug.debug ktexteditor_kdatatool.so.debug ktexteditor_kdatatool.so.debug.debug kthemestyle.so.debug kthemestyle.so.debug.debug ktimemon_panelapplet.so.debug kviewerpart.so.debug ldifvcardthumbnail.so.debug libDCOP.so.4.2.0.debug libDCOP.so.4.2.0.debug.debug libarkpart.so.debug libarts_mpeglib-0.3.0.so.0.0.3.debug libarts_splay.so.0.0.0.debug libartsbuilder.so.0.0.0.debug libartscontrolapplet.so.1.0.0.debug libartscontrolsupport.so.1.0.0.debug libartsgui.so.0.0.0.debug libartsgui_idl.so.0.0.0.debug libartsgui_kde.so.0.0.0.debug libartskde.so.1.2.0.debug libartskde.so.1.2.0.debug.debug libartsmidi.so.0.0.0.debug libartsmidi_idl.so.0.0.0.debug libartsmodules.so.0.0.0.debug libartsmodulescommon.so.0.0.0.debug libartsmoduleseffects.so.0.0.0.debug libartsmodulesmixers.so.0.0.0.debug libartsmodulessynth.so.0.0.0.debug libaudiofilearts.so.debug libautorefresh.so.debug libbabelfishplugin.so.debug libcervisiapart.so.debug libcrashesplugin.so.debug libcvsservice.so.0.0.1.debug libdirfilterplugin.so.debug libdomtreeviewerplugin.so.debug libfsviewpart.so.debug libkabc.so.1.2.0.debug libkabc.so.1.2.0.debug.debug libkabc_dir.so.1.0.0.debug libkabc_dir.so.1.0.0.debug.debug libkabc_file.so.1.0.0.debug libkabc_file.so.1.0.0.debug.debug libkabc_ldapkio.so.1.0.0.debug libkabc_ldapkio.so.1.0.0.debug.debug libkabc_net.so.1.0.0.debug libkabc_net.so.1.0.0.debug.debug libkabinterfaces.so.1.0.0.debug libkaddrbk_bookmark_xxport.so.debug libkaddrbk_cardview.so.debug libkaddrbk_csv_xxport.so.debug libkaddrbk_distributionlist.so.debug libkaddrbk_eudora_xxport.so.debug libkaddrbk_gnokii_xxport.so.debug libkaddrbk_iconview.so.debug libkaddrbk_kde2_xxport.so.debug libkaddrbk_ldif_xxport.so.debug libkaddrbk_location.so.debug libkaddrbk_merge.so.debug libkaddrbk_opera_xxport.so.debug libkaddrbk_pab_xxport.so.debug libkaddrbk_tableview.so.debug libkaddrbk_vcard_xxport.so.debug libkaddressbook.so.0.0.0.debug libkaddressbookpart.so.debug libkalarmd.so.0.0.0.debug libkatepart.so.debug libkatepart.so.debug.debug libkatepartinterfaces.so.0.0.0.debug libkatepartinterfaces.so.0.0.0.debug.debug libkbabelcommon.so.3.2.0.debug libkbabeldictplugin.so.1.2.0.debug libkcal.so.2.0.0.debug libkcddb.so.1.0.0.debug libkcertpart.so.debug libkcertpart.so.debug.debug libkcmlaptop.so.0.0.0.debug libkdecore.so.4.2.0.debug libkdecore.so.4.2.0.debug.debug libkdefakes.so.4.2.0.debug libkdefakes.so.4.2.0.debug.debug libkdefx.so.4.2.0.debug libkdefx.so.4.2.0.debug.debug libkdeinit_ark.so.debug libkdeinit_cupsdconf.so.debug libkdeinit_cupsdconf.so.debug.debug libkdeinit_dcopserver.so.debug libkdeinit_dcopserver.so.debug.debug libkdeinit_kaddprinterwizard.so.debug libkdeinit_kaddprinterwizard.so.debug.debug libkdeinit_kbuildsycoca.so.debug libkdeinit_kbuildsycoca.so.debug.debug libkdeinit_kcalc.so.debug libkdeinit_kconf_update.so.debug libkdeinit_kconf_update.so.debug.debug libkdeinit_kcookiejar.so.debug libkdeinit_kcookiejar.so.debug.debug libkdeinit_kded.so.debug libkdeinit_kded.so.debug.debug libkdeinit_kio_http_cache_cleaner.so.debug libkdeinit_kio_http_cache_cleaner.so.debug.debug libkdeinit_kio_uiserver.so.debug libkdeinit_kio_uiserver.so.debug.debug libkdeinit_klauncher.so.debug libkdeinit_klauncher.so.debug.debug libkdeinit_kmix.so.debug libkdeinit_kmixctrl.so.debug libkdenetwork.so.2.2.0.debug libkdepim.so.1.0.0.debug libkdeprint.so.4.2.0.debug libkdeprint.so.4.2.0.debug.debug libkdeprint_management.so.4.2.0.debug libkdeprint_management.so.4.2.0.debug.debug libkdeprint_management_module.so.debug libkdeprint_management_module.so.debug.debug libkdesasl.so.1.2.0.debug libkdesasl.so.1.2.0.debug.debug libkdesu.so.4.2.0.debug libkdesu.so.4.2.0.debug.debug libkdeui.so.4.2.0.debug libkdeui.so.4.2.0.debug.debug libkdgantt.so.0.0.0.debug libkgantt.so.0.0.2.debug libkghostviewlib.so.0.0.0.debug libkghostviewpart.so.debug libkhtml.so.4.2.0.debug libkhtml.so.4.2.0.debug.debug libkhtmlpart.so.debug libkhtmlpart.so.debug.debug libkhtmlsettingsplugin.so.debug libkimgallery.so.debug libkio.so.4.2.0.debug libkio.so.4.2.0.debug.debug libkjava.so.1.0.0.debug libkjava.so.1.0.0.debug.debug libkjs.so.1.2.0.debug libkjs.so.1.2.0.debug.debug libkmailpart.so.1.0.0.debug libkmailprivate.so.0.0.0.debug libkmdi.so.1.0.0.debug libkmdi.so.1.0.0.debug.debug libkmediaplayer.so.0.0.0.debug libkmediaplayer.so.0.0.0.debug.debug libkmid.so.0.0.95.debug libkmid.so.0.0.95.debug.debug libkmultipage.so.0.0.0.debug libkmultipart.so.debug libkmultipart.so.debug.debug libknewstuff.so.1.0.0.debug libknodepart.so.1.0.0.debug libkontact.so.1.0.0.debug libkontact_kaddressbookplugin.so.debug libkontact_kmailplugin.so.debug libkontact_knodeplugin.so.debug libkontact_knotesplugin.so.debug libkontact_korganizerplugin.so.debug libkontact_summaryplugin.so.debug libkontact_todoplugin.so.debug libkontact_weatherplugin.so.debug libkopete.so.1.0.0.debug libkopete_msn_shared.so.0.0.0.debug libkopete_oscar.so.1.0.0.debug libkorg_birthdays.so.debug libkorg_datenums.so.debug libkorg_exchange.so.debug libkorg_hebrew.so.debug libkorg_holidays.so.debug libkorg_projectview.so.debug libkorg_webexport.so.debug libkorganizer.so.1.0.0.debug libkorganizer_eventviewer.so.1.0.0.debug libkorganizerpart.so.debug libkparts.so.2.1.0.debug libkparts.so.2.1.0.debug.debug libkpimexchange.so.1.0.0.debug libkpinterfaces.so.1.0.0.debug libkresources.so.1.2.0.debug libkresources.so.1.2.0.debug.debug libkrichtexteditpart.so.debug libkscreensaver.so.4.2.0.debug libkscreensaver.so.4.2.0.debug.debug libkscript.so.0.0.0.debug libkscript.so.0.0.0.debug.debug libksieve.so.0.0.0.debug libkspell.so.4.2.0.debug libkspell.so.4.2.0.debug.debug libksvg.so.0.0.1.debug libksvgplugin.so.debug libksvgrendererlibart.so.debug libktexteditor.so.0.0.0.debug libktexteditor.so.0.0.0.debug.debug libktnef.so.1.0.0.debug libkuickplugin.so.debug libkutils.so.1.2.0.debug libkutils.so.1.2.0.debug.debug libkwalletbackend.so.1.0.0.debug libkwalletbackend.so.1.0.0.debug.debug libkwalletclient.so.1.0.0.debug libkwalletclient.so.1.0.0.debug.debug libmimelib.so.1.0.1.debug libminitoolsplugin.so.debug libmpeg-0.3.0.so.debug librenaudioplugin.so.debug librenimageplugin.so.debug librss.so.1.0.0.debug libshellscript.so.debug libshellscript.so.debug.debug libtext2path.so.0.0.0.debug libuachangerplugin.so.debug libvalidatorsplugin.so.debug libvcard.so.0.0.0.debug libvcard.so.0.0.0.debug.debug libwebarchiverplugin.so.debug libworkman.so.6.0.0.debug libyafcore.so.0.0.0.debug libyafxplayer.so.0.0.0.debug light.so.debug light.so.debug.debug mediacontrol_panelapplet.so.debug pothumbnail.so.debug svgthumbnail.so.debug webarchivethumbnail.so.debug
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}


我安装的magiclinux1.2pre6(5月1日更新的),没有加装其他任何包,请问一下错误是什么,怎么解决,谢谢

MichaelBibby 发表于 2004-5-13 13:19:14

spec文件也完全相同?

casper 发表于 2004-5-13 18:36:51

应该没有问题,我是照着教程上的一行一行的输入的

llc 发表于 2004-5-14 10:59:57

在spec文件的开头加上一句:
Buildroot: /var/tmp/
再重新试试

aniuge007 发表于 2004-5-14 13:42:39

第一个估计是你的系统有问题。第二个没看出什么问题啊。我觉得rpm数据库是不太稳定。

樱家冢 发表于 2004-5-14 21:29:40

呵呵,rpm的稳定性就是这样的,基本上没什么办法。

casper 发表于 2004-5-15 12:13:49

按照llc的方法,加了那句到开头,然后建包出现以下错误
RPM build errors:
    File not found: /var/tmp/usr/local/bin/helloworld
aniuge007能不能请你说清楚一点,第一个到底是系统的什么问题引起的,谢谢:)

aniuge007 发表于 2004-5-15 14:02:39

我也遇到过,怎么好的我也不知道。

llc 发表于 2004-5-15 19:15:27

我以前也遇过这种错误,加上Buildroot定义就正常了,但在旧版本(rh8)rpmbuild里不用也行

加上Buildroot:/var/tmp后再将
%files
%doc README
/usr/local/bin/helloworld
改成
%files
%doc README
%{Buildroot}/usr/local/bin/helloworld
试试

或干脆将Buildroot定义成/
也就是
Buildroot:/
试试

casper 发表于 2004-5-17 10:07:34

按照llc的方法,还是不行,提示我说File need begin with "/",大概是这个意思吧,后来在另外一张贴子里面得到了灵感,干脆把/usr/local/bin/helloworld这一行注释掉了,结果建包成功,晕了,现在越来越糊涂了

llc 发表于 2004-5-25 02:06:36

Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}

从你的log信息来看,你最初的rebuild失败是因为%{buildroot}变量导致的
因此才建议你在spec的开头加上
%define buildroot /var/tmp
(先前的帖子里说错了,不是Buildroot: /var/tmp/,至于Buildroot和buildroot之间的区别,我也不懂...)
也就是定义buildroot变量
但加上buildroot后将发生
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp
error: Installed (but unpackaged) file(s) found:
   /usr/share/doc/helloworld-1.0/README
错误,这是因为:
在执行%doc README时自动将README文件拷贝到/usr/share/doc/helloworld-1.0/README
因此应该在%file段还应加上/usr/share/doc/helloworld-1.0/README

完整的spec如下:

%define buildroot /var/tmp
Summary: Simple Example for RPM Building DEMO.
Name: helloworld
Version: 1.0
Release: 1
Copyright: Open Source
Group: Extensions/Chinese
Source: helloworld-1.0-1.tgz
Packager: Penelope Marr
%description
This package is used as a demo for RPM building only.
%changelog
* Thu Jul 16 1998 Penelope Marr
- build for the first time.
%prep
%setup -c
%build
make helloworld
%install
install -m 755 helloworld /usr/local/bin/helloworld
%files
%doc README
/usr/local/bin/helloworld
/usr/share/doc/helloworld-1.0/README

rebuild之前记得先清空/var/tmp目录
我的经验是:凡是遇见log里执行到Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}就发生"getOutputFrom(): 断开的管道"错误的话,多数是由于buildroot没定义引起的,加上%define buildroot /var/tmp应该就没问题了,当然,前提是/var/tmp目录下要先清空,否则很容易产生"Installed (but unpackaged) file(s) found:"错误,而这种错误在新版本的rpmbuild里是不允许通过的(在rh8.0的rpmbuild里是允许的)

llc 发表于 2004-5-25 02:16:08

按照llc的方法,还是不行,提示我说File need begin with "/",大概是这个意思吧,后来在另外一张贴子里面得到了灵感,干脆把/usr/local/bin/helloworld这一行注释掉了,结果建包成功,晕了,现在越来越糊涂了
这是因为定义了Buildroot后(Buildroot:/var/tmp),相当于设定了虚拟的安装目录,rpmbuild在处理你%file段时里面的所有路径都看作是相对于Buildroot的目录,因此rpmbuild在处理你%file段的/usr/local/bin/helloworld它实质上是当作/var/tmp/usr/local/bin/helloworld来处理的,因此如果不注销/usr/local/bin/helloworld这行它将因为找不到/var/tmp/usr/local/bin/helloworld这个文件(%install段只是将文件安装到绝对的/usr/local/bin路径下而没安装在/var/tmp/usr/local/bin)错误而build失败,而如果你注释掉这行它将因为没产生错误而build成功。
提示我说File need begin with "/"是因为%file段定义的文件路径需要以/开头,因此原先我贴出的"%{Buildroot}/usr/local/bin/helloworld"非法错误

KanKer 发表于 2004-5-25 08:37:59

llc,你说的这个问题:"Installed (but unpackaged) file(s) found:"错误,而这种错误在新版本的rpmbuild里是不允许通过的。
可以修改/usr/lib/rpm/mBuild/macros,rh的应该是/usr/lib/rpm/redhat/macros,将下列内容改为0
# Should missing %doc files terminate a build?
%_missing_doc_files_terminate_build   0

#
# Should unpackaged files in a build root terminate a build?
%_unpackaged_files_terminate_build    0

llc 发表于 2004-5-25 09:12:29

llc,你说的这个问题:"Installed (but unpackaged) file(s) found:"错误,而这种错误在新版本的rpmbuild里是不允许通过的。
可以修改/usr/lib/rpm/mBuild/macros,rh的应该是/usr/lib/rpm/redhat/macros,将下列内容改为0
# Should missing %doc files terminate a build?
%_missing_doc_files_terminate_build   0

#
# Should unpackaged files in a build root terminate a build?
%_unpackaged_files_terminate_build    0

谢谢,又多学会一招!

casper 发表于 2004-5-25 13:26:25

现在再用llc的spec建包成功了,而且可以卸载,以前我把%file里的内容注释了以后,能安装,但是卸载了以后,helloworld还是在。不过用llc的spec文件建包卸载的时候还是有什么东西没有卸干净,因为我卸载了以后,再运行,提示的是“bash: /usr/local/bin/helloworld: 没有那个文件或目录”,而不是“bash: dfw: command not found”,这个建包的相对路径和绝对路径真是很迷糊人,不知道%install里面那个路径和%file里的路径是否相同,也是相对于buidroot的路径,我现在还在努力学习中,就是spec的文件太少,再问几个问题:
1查看包里的文件用什么命令?我用rpm -l helloworld-1.0-1.i386.rpm 好象没有用
2.install都有什么参数,执行了什么命令?
3.看到别的spec里的$RPM_BUILD_ROOT,这种东西是指的什么
这种拷贝单个文件的包比较麻烦,我觉得要是作者写好了makefile的比较好一点,就是%file的东西不太好写,都有利有弊呀
最后,非常感谢大家的热情帮助:)
页: [1] 2
查看完整版本: 制作包的问题