2014-02-03 Bruce Dubbs <bruce.du...@gmail.com>:

> Michael Uleysky wrote:
> > 2014-02-03 Bruce Dubbs <bruce.du...@gmail.com>:
> >
> >> I am getting ready to change the iana file installation in LFS.  The
> >> procedure will be to download:
> >>
> >>
> >>
> http://anduin.linuxfromscratch.org/sources/LFS/lfs-packages/conglomeration/iana-etc/iana-files-1.0.tar.xz
> >>
> >> After unpacking the install will be:
> >>
> >> install -m644 -u root -g root services protocols /etc
> >> install -m744 -u root -g root update* /usr/sbin
> >>
> >
> > I add a simple Makefile for this.
>
> Why add a Makefile for such a simple install?
>
>
> >> Two executable scripts are installed, update-iana-protocols and
> >> update-iana-services.  These scripts create /usr/share/iana-etc if it
> >> does not exist and use wget (not available in LFS) to get the upstream
> >> xml files.  The scripts then parse the xml files and update
> >> /etc/protocols and /etc/services as appropriate.
> >>
> >> As I write this, I'm thinking that the header of the installed files
> >> should perhaps also read:
> >>
> >> # To update this file, use the update-iana-<file> script.
> >>
> > Also include in my patch.
> >
> >
> >>
> >> We might also want to just number the tarball iana-files-1.tar.xz and
> >> increment the number as needed without major/minor versions.
> >>
> > May be iana-files-$DATE_OF_UPDATE.tar.xz?
>
> Seems to be overkill since the only time I foresee this changing is if
> the upstream xml format changes.  We have been using files since 2006
> and this is the first time it has come up.
>
Ok, I agree with it.

>> Other tweaks can be made. Please let me know what you think.
>>
> I create a patch with some additions:
> 1) Simple Makefile for installation. I think, we must also include source
> protocol-numbers.xml and service-names-port-numbers.xml in installation.

I thought about that, but why is it needed?  It's not in the old tarball
> and we've never needed it.  I'm not completely against this though.
>
For me is much simple to type make; make install than type long install
bla-bla-bla strings. Make is just more familiar.
Old iana-etc have a Makefile.


> > 2) I add an option "restore" for update scripts. With this option
> services
> > and protocols will be regenerated from backup xml files.
>
> Again, this seems to be overkill.  The tarball has the needed files if
> that is needed.  Generally the files are just in /etc and don't often
> change.  The only update we've ever needed is to change sunrpc to
> rpcbind in the services file.
>
It can be dangerous situation, if someone try to update and leave with
unusable files because IANA changes format again. In this case restore will
be useful.

Another comment.  If we start adding options to the scripts, we need to
> add at least a help option and perhaps man pages.  I'm trying to KISS
> this change.
>
I completely agree with you. My solution is not optimal and I also not very
like it.
Ok, do we really need such thing as update scripts, installed somewhere in
the system? I think, not. So, lets just place protocols and services in
/etc (we can do it without Makefile, of course) and leave update scripts
only in the tarball for people who want update _before_ install. It is just
a way as original iana-etc works. But in this case we need to set
IANA_DIR=. and remove /etc in last two strings in scripts.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to