> Sent: Friday, August 14, 2020 at 11:38 AM
> From: "Scott Andrews via blfs-support" 
> <blfs-support@lists.linuxfromscratch.org>
> To: blfs-support@lists.linuxfromscratch.org
> Cc: "Scott Andrews" <scott.andr...@columbus.rr.com>
> Subject: Re: [blfs-support] Beyond Linux® From Scratch (System V Edition) - 
> Version 9.1: LSB-Tools-0.6
>
> On Thu, 13 Aug 2020 18:08:52 -0500
> Bruce Dubbs via blfs-support <blfs-support@lists.linuxfromscratch.org>
> wrote:
> 
> > On 8/13/20 4:51 PM, Scott Andrews via blfs-support wrote:
> > > I have the following issues with this package:
> > > 
> > > Error! Unable to locate Requried-Start dependency localnet for
> > > script: network warning: %post(rngd-14-1.armv7hnl) scriptlet
> > > failed, exit status 2
> > > 
> > > Error! Unable to locate Requried-Start dependency localnet for
> > > script: sysklogd warning: %post(rngd-14-1.armv7hnl) scriptlet
> > > failed, exit status 2
> > > 
> > > hangs on:
> > > 
> > > /usr/sbin/install_initd /etc/rc.d/init.d/rngd
> > > 
> > > Also I believe this script name is in error:
> > > 
> > > /usr/sbin/remove_intid  
> > 
> > This does seem to be a typo in lsb-tools file setup.py.  I'll fix it.
> > 
> > > Does this thing even work?
> > > 
> > > cat > %{buildroot}/etc/rc.d/init.d/rngd <<- EOF
> > >   #!/bin/sh
> > > 
> > >   ### BEGIN INIT INFO
> > >   # Provides:            rngd
> > >   # Required-Start:      mountfs
> > >   # Should-Start:
> > >   # Required-Stop:
> > >   # Should-Stop:
> > >   # Default-Start:       S
> > >   # Default-Stop:        0 6
> > >   # Short-Description:   Starts rngd daemon.
> > >   # Description:         Starts rngd daemon.
> > >   # X-LFS-Provided-By:   LFS
> > >   ### END INIT INFO
> > > 
> > >   . /lib/lsb/init-functions
> > > 
> > >   case "\${1}" in
> > >           start)
> > >                   if [ -c "/dev/hwrng" ] ; then
> > >                           log_info_msg "Starting rng
> > > daemon..." start_daemon /usr/sbin/rngd
> > >                           evaluate_retval
> > >                   fi
> > >           ;;
> > >           stop)
> > >                   log_info_msg "Stopping rng daemon..."
> > >                   killproc /usr/sbin/rngd
> > >                   evaluate_retval
> > >           ;;
> > >           restart)
> > >                   \${0} stop
> > >                   sleep 1
> > >                   \${0} start
> > >           ;;
> > >           status)
> > >                   statusproc /usr/sbin/rngd
> > >           ;;
> > >           *)
> > >                   echo "Usage: \${0}
> > > {start|stop|restart|status}" exit 1
> > >           ;;
> > >   esac
> > >   exit 0
> > > EOF
> > >   
> > 
> > Where does rngd come from?  It's not in LFS.  The structure is
> > similar to ours, but there are differences.  For instance we do not
> > escape dollar signs .
> 
> The rngd is for a hardware entropy generator ( from debian ).
> Works with most hardware. I use it on the raspberry pi platform
> as the platform includes a hardware random number generator.
> 
> 
> The BCM2835 chip on the Pi contains a hardware entropy source that can
> be tapped by crypto-heavy applications to improve the quality of
> randomness and might even help speed up some operations
> 
> http://ftp.de.debian.org/debian/pool/main/r/rng-tools/rng-tools_2-unofficial-mt.14.orig.tar.bz2
> 
> 
> I am using rpm and I have a "spec file" builder that reads a text file
> and generates a spec file for a "package". Being that it is a bash file
> the dollar signs need escaped. You should ignore the escape character
> as it is not in the file.
> 
> 
> > 
> > The localnet dependency is provided in the LFS bootscript 'localnet'.
> > 
> 
> Yes and it is present in /etc/rc.d/init.d
> 
> That is why I question if this thing actually works.
> 
> I want to create a package out of the blfs-bootscripts and then use
> this package to "turn on" the daemons from a %post section of an rpm
> package. 
> 
> Like this:
> 
> Post='/usr/sbin/install_initd /etc/rc.d/init.d/rngd'
> 
> Preun='/usr/sbin/remove_intid /etc/rc.d/init.d/rngd'
> 
> That brings up the error and hangs.  It will give the errors when the
> package is installed but the "post scripts" are inhibited or not run.  
> Manually running causes the same issue.  
> 
> Chkconfig works for all init scripts ( it doesn't hang ) that don't need
> a symlink in /etc/rcS.d, it doesn't support that.
> 
> 
> I will test this on exim and dovecot blfs init script but I believe it
> will fail here also.  As a quick test I did the following
> 
> /usr/sbin/remove_intid /etc/rc.d/init.d/network
> /usr/sbin/install_initd /etc/rc.d/init.d/network
> 
> Those failed also.
> 
> This was from a newly built/installed system.
> -- 
> http://lists.linuxfromscratch.org/listinfo/blfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
> 

Hello,

As a general rule we do not give assistance to people who are doing things 
outside the scope of the written book instructions.  We do not use either the 
debian packaging system nor that of Redhat or whatever they like to call 
themselves these days.

I know from personal experience that you have to have an expert grasp on the 
various package managers to be able to successfully create a working package, 
and that is on a system that natively uses such a system, which lfs/blfs does 
not.

Christopher.
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to