[ELDK] Yocto equivalent of chkconfig --del?

Detlev Zundel dzu at denx.de
Fri Aug 23 12:44:11 CEST 2013


Hi Larry,

> Detlev,
>
> On Aug 23, 2013, at 1:05 AM, Detlev Zundel wrote:
>
>> Hi Larry,
>> 
>>> Thanks to Stefano, I have a modified generic-armv5te core-image-basic
>>> with NTP and chkconfig included.
>> 
>> Excellent.
>> 
>>> I am content to leave the NFS client features for the time being, but
>>> I do not want any NFS server or RPC ports open.  From what I can tell,
>>> the nfs-utils package provides the NFS server, as well as the NFS
>>> client mount utilities.  So, I cannot to any package pruning; I must
>>> configure the nfsserver.
>> 
>> If you only want to do NFS mounts, you can include "nfs-utils-client" in
>> the image.  This does not pull in any server.
>
> That is useful information.
>
> I am trying to customize the core-image-basic rootfs, since it seemed
> to be almost exactly what i need.  The core-image-basic rootfs recipe
> include nfs-utils.  Thus, I am limited to disabling the nfsserver
> service.  Is that not correct?  If there is a method to remove
> nfs-utils and add nfs-utils-client, that is what I am trying to
> accomplish.

Personally I view these (small) image recipes only as a template for
real customized image recipes.  Currently I usually start out with
copying core-image-minimal.bb and adjusting that to my needs.  I much
prefer such a "bottom up" approach to a "top down" approach of cutting
things away in a system.  The latter has more potential for problems I
believe.

> I just finished a build where I added
> meta-eldk/recipes-extras/nfs-utils_1.2.7.bbappend containing one line:
>
> INITSCRIPT_PARAMS = "remove"
>
> I was hoping this would override the INITSCRIPT_PARAMS = "defaults" in
> meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb.

Sorry to be so blunt, but I believe this to be completely misguided.
The nfs-utils recipe is a very generic piece of reusable components
building multiple packages for you to choose from, i.e. nfs-utils,
nfs-utils-client and nfs-utils-stats.  Touching it (even through
bbappend files) seems to me to be the wrong place.

If you check the recipe, you will find that this line

FILES_${PN}-client = "${base_sbindir}/*mount.nfs*"

includes only the mount binaries in the package and I believe this is
just what you want.  Here's the result from one of my builds:

[dzu at sisyphus eldk-5.3-socrates]$ ar p tmp/deploy/ipk/armv7ahf-vfp-neon/nfs-utils-client_1.2.3-r5_armv7ahf-vfp-neon.ipk data.tar.gz | tar ztf -
./
./sbin/
./sbin/mount.nfs
./sbin/umount.nfs
./sbin/umount.nfs4
./sbin/mount.nfs4
[dzu at sisyphus eldk-5.3-socrates]$ 

> My impression is that a .bbappend is textually appended to its .bb
> file, which is then parsed as a single file.  I assumed my assignment
> to INITSCRIPT_PARAMS would replace the original.  However, I see in
> tmp/buildhistory/packages/armv5te-linux-gnueabi/nfs-utils/nfs-utils/latest.pkg_postinst
>
> 	update-rc.d $OPT nfsserver defaults
>
> This is the line I was trying to override, but my plan did not work.
> (I assume this script gets called to enable the nfsserver service init
> scripts in the rootfs image.  I planned to fool it into doing a remove
> instead.)
>
> I chose this method because I do not think it would be possible to
> undo the inherit update-rc.d in
> meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb to avoid
> running update-rc.d altogether.  That would accomplish the same thing
> since the nfs-utils do_install_append() creates the nfsserver
> /etc/init.d script.

I cannot comment without looking into this but as I wrote above, I think
the whole approach is flawed and my time currently is very limited ;)

> Is this a rational approach?  What am I doing wrong?  It takes 3 hours
> for the build to compete to find out my plan did not work.

Even for a simple rebuild?  This should be faster and you most certainly
should not do "from scratch" builds during such a development.  bitbakes
dependency tracking is very sophisticated and should "mostly" do the
right thing. Note that the actual dependency tracking changed between
ELDK 5.2 and 5.3 and got more sophisticated. Of course I suggest doing a
scratch build, say weekly, to not let such dependency problems creep in
for too long.

> Am I correct in my reasoning that a .bb and .bbappend are effectively
> concatenated, then parsed?  That is what I hoped would happen to use
> my INITSCRIPT_PARAMS for nfs-utils.  Is there a bitbake command that
> will show me whether it is using my .bbappend?

Yep - try "bitbake-layers show-appends"

> Too late to try anything different tonight.  Any advice would be
> appreciated.

I hope I could help ;)

Cheers
  Detlev

-- 
Multiple exclamation marks, the sure sign of an insane mind.
                        -- Terry Pratchett
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the eldk mailing list