ltib
[Top][All Lists]
Advanced

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

Fw: Re: [Ltib] %post spec section not expanded in rpm


From: Badicioiu Alexandru
Subject: Fw: Re: [Ltib] %post spec section not expanded in rpm
Date: Fri, 12 Jun 2009 01:25:38 -0700 (PDT)



--- On Fri, 6/12/09, Badicioiu Alexandru <address@hidden> wrote:

> From: Badicioiu Alexandru <address@hidden>
> Subject: Re: [Ltib] %post spec section not expanded in rpm
> To: "Stuart Hughes" <address@hidden>
> Date: Friday, June 12, 2009, 4:23 AM
> Hi Stuart,
> thanks for your quick reply. 
> I checked carefully the command line for rpm when the
> package is installed and it doesn't contain --noscripts
> switch. However, in the rpm file the %post should be
> expanded, if not prevented somehow in rpmbuild command. I
> didn't find anywhere how to disable %post processing in
> rpmbuild. What I want to do is to build an external package
> which contains a kernel module and after installation onto
> the rootfs to execute scripts to add the module in MODLIST
> variable in rc.conf on target rootfs and run depmod also.
> Executing these actions in %post looked to me the way to do
> it.
> 
> These are the commands for ltib -p bpswitch.spec -m scbuild
> and
> ltib -p bpswitch.spec -m scdeploy. The rpm builds and
> installs just fine, I omitted the output.
> 
> Processing: bpswitch
> ======================
> Build path taken because: build key set,
> 
> rpmbuild --dbpath
> /home/alex/bhr/ltib-mpc8313erdb-20081222/rootfs//var/lib/rpm
> --target ppc --define '_unpackaged_files_terminate_build 0'
> --define '_target_cpu ppc' --define '__strip strip' --define
> '_topdir /home/alex/bhr/ltib-mpc8313erdb-20081222/rpm'
> --define '_prefix /usr' --define '_tmppath
> /home/alex/bhr/ltib-mpc8313erdb-20081222/tmp' --define
> '_mandir /usr/share/man' --define '_sysconfdir /etc'
> --define '_localstatedir /var' -bc --short-circuit 
> /home/alex/bhr/ltib-mpc8313erdb-20081222/dist/lfs-5.1/bpswitch/bpswitch.spec
> 
> Processing: bpswitch
> ======================
> Build path taken because: build key set,
> 
> rpmbuild --dbpath
> /home/alex/bhr/ltib-mpc8313erdb-20081222/rootfs//var/lib/rpm
> --target ppc --define '_unpackaged_files_terminate_build 0'
> --define '_target_cpu ppc' --define '__strip strip' --define
> '_topdir /home/alex/bhr/ltib-mpc8313erdb-20081222/rpm'
> --define '_prefix /usr' --define '_tmppath
> /home/alex/bhr/ltib-mpc8313erdb-20081222/tmp' --define
> '_mandir /usr/share/man' --define '_sysconfdir /etc'
> --define '_localstatedir /var' -bi --short-circuit 
> /home/alex/bhr/ltib-mpc8313erdb-20081222/dist/lfs-5.1/bpswitch/bpswitch.spec
> 
> Processing: bpswitch
> ======================
> Build path taken because: build key set, spec file newer
> than rpm,
> 
> rpmbuild --dbpath
> /home/alex/bhr/ltib-mpc8313erdb-20081222/rootfs//var/lib/rpm
> --target ppc --define '_unpackaged_files_terminate_build 0'
> --define '_target_cpu ppc' --define '__strip strip' --define
> '_topdir /home/alex/bhr/ltib-mpc8313erdb-20081222/rpm'
> --define '_prefix /usr' --define '_tmppath
> /home/alex/bhr/ltib-mpc8313erdb-20081222/tmp' --define
> '_mandir /usr/share/man' --define '_sysconfdir /etc'
> --define '_localstatedir /var' -bb --clean --rmsource 
> /home/alex/bhr/ltib-mpc8313erdb-20081222/rpm/SPECS/bpswitch.spec
> 
> sudo /opt/freescale/ltib/usr/bin/rpm --root
> /home/alex/bhr/ltib-mpc8313erdb-20081222/rootfs --dbpath
> /var/lib/rpm -e --allmatches --nodeps --define '_tmppath
> /tmp/ltib' bpswitch 2>/dev/null
> 
> sudo /opt/freescale/ltib/usr/bin/rpm --root
> /home/alex/bhr/ltib-mpc8313erdb-20081222/rootfs --dbpath
> /var/lib/rpm --prefix / --ignorearch -ivh --force
> --excludedocs --define '_tmppath /tmp/ltib'
> /home/alex/bhr/ltib-mpc8313erdb-20081222/rpm/RPMS/ppc/bpswitch-1.0-1.ppc.rpm
> Preparing...           
>     ###########################################
> [100%]
>    1:bpswitch       
>    
>    ###########################################
> [100%]
> 
> --- On Fri, 6/12/09, Stuart Hughes <address@hidden>
> wrote:
> 
> > From: Stuart Hughes <address@hidden>
> > Subject: Re: [Ltib] %post spec section not expanded in
> rpm
> > To: "Badicioiu Alexandru" <address@hidden>
> > Cc: address@hidden
> > Date: Friday, June 12, 2009, 3:43 AM
> > Hi Alex,
> > 
> > I recently updated ltib so it adds --noscripts to the
> rpm
> > install/erase commands.  This has the effect of not
> > running and pre/post preun/postun scripts in the spec
> > file.  I suspect that when you query the installed
> > package these are now not recorded and so you see no
> > output.
> > 
> > This is deliberate as another user correctly pointed
> out
> > this is a security risk.  I should also mention that
> > there are few instances where running these scripts
> makes
> > sense.
> > 
> > What are you trying to do, maybe there's another way
> to do
> > this.
> > 
> > Regards, Stuart
> > 
> > Badicioiu Alexandru wrote:
> > > Hi, I'm trying to use %post section in an package
> spec
> > file, but the
> > > corresponding script is not expanded in the
> generated
> > rpm file. Does
> > > anybody know why it doesn't work? The spec file
> is the
> > one from
> > > dist/lfs-5.1/hello/hello_mod.spec with an added
> %post
> > section. Doing
> > > an /opt/freescale/ltib/usr/bin/rpm -qp --scripts
> on
> > the rpm file
> > > shows no scripts are present.
> > > 
> > > Thank you.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> LTIB
> > home page:
> > > http://bitshrine.org
> > > 
> > > Ltib mailing list address@hidden 
> > > http://lists.nongnu.org/mailman/listinfo/ltib
> > > 
> > 
> 
> 
> 
> 








reply via email to

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