[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Trouble adding new package in LTIB

From: Peter Barada
Subject: Re: [Ltib] Trouble adding new package in LTIB
Date: Thu, 14 Aug 2008 15:02:49 -0400

On Thu, 2008-08-14 at 09:07 -0700, James E. Chargin Jr. wrote:

Thanks for the help. Based on the information you gave, I've made progress.

I was going to use .gz because the first two steps in the FAQ use .gz 
and don't mention .bz2. I made this choice before noticing in the 
specfile that .bz2 is supported.

Today, I used the .bz2 directly from GNU, using your instructions.

Today, I also noticed that your instructions regarding modifications to 
packages.lkc and pkg_map are mentioned in a later FAQ. Since I'm really 
a novice to packaging systems, I did not make the connection between the 
two FAQs. Perhaps the FAQ regarding "How can I add a completely new 
package..." should mention the FAQ "How do I introduce my new package to 
the config system".

Anyway, once I made additions to packages.lkc and pkg_map as you 
suggest, the following command worked:

./ltib -m prep -p parted.spec

If I specified parted, rather than parted.spec, the specfile was not 
found. Even though the command worked, it did emit some error messages, 
which I ignored. The rpmbuild seemed to work so I'm not sure the 
messages about network connections are important to me (for now).

 > ./ltib -m prep -p parted.spec
Processing platform: Freescale MPC8315E RDB PowerPC board
using config/platform/mpc8315erdb/.config

Processing: parted
Testing network connectivity
Testing proxy connection for GPP : FAIL
response was: 500 Can't connect to (Bad 
hostname '')
Can't get gpp index, proxy forced off
FAILED PPP: : 500 Can't connect to (Bad 
hostname '')

FAILED GPP: parted-1.8.8.tar.bz2.md5: 404 Not Found
WARN: skipping md5sum check for 
/opt/freescale/pkgs/parted-1.8.8.tar.bz2, md5 file was not found

When you add a new package to the system, add a md5sum file to /opt/freescale/pkgs:

$ pushd /opt/freescale/pkgs
$ md5sum parted-1.8.8.tar.bz2 > parted-1.8.8.tar.bz2.md5

LTIB looks for the .md5 to be sure that what you have is not corrupt, and if it doesn't find the .md5 in /opt/freescale/pkgs/ it looks int the Global Package Pool and Private Package Pool.  The global pool is in, but hte provate pool is in Freescale (your BSP came from them), which can't be seen by your machine since you're outside Freescale's network.  It would be nice if Freescale would disable the Provate Package Pool on .iso BSPs they release to remove this problem.

Also you'll need to get the PKG_PARTED into config/platforms/mpc8315erdb/.config so you don't have to specify "parted.spec".  You can try "./ltob -c" and under packages you should see 'parted' listed.  Select it, and on save/exit, you should see LTIB run rpmbuild over your package...

rpmbuild --dbpath /home/jimc/borg/ltib/ltib-mpc8315erdb-20071129/rpmdb 
--define '_unpackaged_files_terminate_build 0' --define '_target_cpu 
powerpc' --define '__strip strip' --define '_topdir 
/home/jimc/borg/ltib/ltib-mpc8315erdb-20071129/rpm' --define '_prefix 
/usr' --define '_tmppath 
/home/jimc/borg/ltib/ltib-mpc8315erdb-20071129/tmp' --define '_mandir 
/usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir 
/var' -bp 
rpmbuild --dbpath /home/jimc/borg/ltib/ltib-mpc8315erdb-20071129/rpmdb 
--define _unpackaged_files_terminate_build 0 --define _target_cpu 
powerpc --define __strip strip --define _topdir 
/home/jimc/borg/ltib/ltib-mpc8315erdb-20071129/rpm --define _prefix /usr 
--define _tmppath /home/jimc/borg/ltib/ltib-mpc8315erdb-20071129/tmp 
--define _mandir /usr/share/man --define _sysconfdir /etc --define 
_localstatedir /var -bp 

I didn't mention in my original report that once
   ./ltib -m prep -p parted
failed, based on the error message, I had tried
   ./ltib -m prep -p parted.spec
   ./ltib -m prep -p \
These commands gave the same error as when I didn't specify .spec so I 
didn't mention these attempts.

My next problem is with the step

7. Build the new package with your changes:
./ltib -m scbuild -p parted.spec

After much output, I get the message:

configure: error: termcap could not be found which is required for the 
--with-readline option (which is enabled by default).  Either disable 
readline support with --without-readline or download and install termcap 
Note: if you are using precompiled packages you will also need the 
development package as well (which may be called termcap-devel or 
something similar).
Note: (n)curses also seems to work as a substitute for termcap.  This 
was not found either - but you could try installing that as well.

I would prefer (I think) to build without termcap, rather than include 
it on my embedded system, but I don't know where I would specify 
--without-readline.  I know this would be a command line parameter for 
configure, but I don't know where that command line is generated.

Could you (or anyone) provide guidance?


Peter Barada wrote:
> On Wed, 2008-08-13 at 10:19 -0700, James E. Chargin Jr. wrote:
>> I'm using LTIB on Ubuntu 7.10, targeting the MPC8315e.
>> Since I've determined that GNU parted is not currently available for 
>> LTIB, I'm attempting to port parted so it is available on our target.
>> I've followed the instructions in the LTIB FAQ as best I can but am 
>> getting an error that I can't find an explanation for.
>> I downloaded parted-1.8.8.tar.bz2 from fsf. I unpacked it so I could 
>> later tar it to .gz as is expected by the instructions in the FAQ.
> Hmm, then the FAQ is wrong since it supports .bz2 (as specified in your 
> .spec file 'Source' further on).
>> So, starting with section "How can I add a completely new package to the 
>> root filesystem" in the LTIB FAQ:
>> 1. First clean your sources...
>> Since I had just downloaded and untarred the package, I did not "make 
>> clean". I executed "tar zcvf parted-1.8.8.tar.gz parted-1.8.8"
>> 2. Move this tarball...
>> I executed "cp parted-1.8.8.tar.gz /opt/freescale/pkgs/
>> 3; Create a specfile...
>> I executed:
>> cd .../ltib/ltib-mpc8315erdb-20071129
>> mkdir dist/lfs-5.1/parted
>> cp dist/lfs-5.1/template/template.spec dist/lfs-5.1/parted/parted.spec
>> 4: Edit and fixup the template...
>> My edited specfile is:
>> 8--
>> %define pfx /opt/freescale/rootfs/%{_target_cpu}
>> Summary         : GNU parted - partition editor
>> Name            : parted
>> Version         : 1.8.8
>> Release         : 1
>> License         : GPL
>> Vendor          : Free Software Foundation
>> Packager        : xxxx
>> Group           : xxxx
>> URL             :
>> Source          : %{name}-%{version}.tar.bz2
>> BuildRoot       : %{_tmppath}/%{name}
>> Prefix          : %{pfx}
>> %Description
>> %{summary}
>> %Prep
>> %setup
>> %Build
>> ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}
>> make
>> %Install
>> rm -rf $RPM_BUILD_ROOT
>> make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
>> %Clean
>> rm -rf $RPM_BUILD_ROOT
>> %Files
>> %defattr(-,root,root)
>> %{pfx}/*
>> --8
>> 5. Unpack the new package source:
>> Here is where I encounter the error. When I execute "./ltib -d -m prep 
>> -p parted" (I am dry-running to see what it will do), I see the message:
>> 8--
>> Cannot find spec file that contains the package name parted.
>> If necessary please give the whole spec file name (with the
>> .spec extension).
>> Exiting on error or interrupt
>> --8
>> I tried various commands trying to give the full specfile pathname, with 
>> no success. The last command I tried was "./ltib -d -m prep -p 
>> .../ltib/ltib-mpc8315erdb-20071129/dist/lfs-5.1/parted/parted.spec" (I 
>> tried this with sudo also). I got the error message:
>> 8--
>> get_spec: can't find spec file 
>> .../dist/ltib-mpc8315erdb-20071129/lfs-5.1/parted/parted.spec
>> in search any of the directories:
>>      .../ltib/ltib-mpc8315erdb-20071129/rpm/SPECS
>>      .../ltib/ltib-mpc8315erdb-20071129/config/platform/mpc8315erdb
>>      .../ltib/ltib-mpc8315erdb-20071129/dist/lfs-5.1
>> Processing platform: Freescale MPC8315E RDB PowerPC board
>> ===========================================================
>> using config/platform/mpc8315erdb/.config
>> Processing: .../dist/lfs-5.1/parted/parted
>> =======================================================================================
>> skipping .../ltib/ltib-mpc8315erdb-20071129/dist/lfs-5.1/parted/parted, 
>> specfile not found
>> f_prep() returned an error, exiting
>> Exiting on error or interrupt
>> --8
>> It seems I'm doing something basic incorrectly, but I can't see what it 
>> might be.
>> Any suggestions?
> Add to config/userspace/packages.lkc a stanza to allow selection of 
> parted, preferably in alphabetical order:
> config PKG_PARTED
>     bool "parted"
>     help
>         partition manipulation tool
> Then add to dist/lfs-5.1/common/pkg_map
> PKG_PARTED    = parted
> This should get "./ltib -p parted" to find the spec file.
> Hope this helps...
>> Thanks,
>> Jim
> -- 
> Peter Barada <address@hidden <mailto:address@hidden>>

LTIB home page:

Ltib mailing list
Peter Barada <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]