WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] tcz creation using /etc versus /usr/local/etc  (Read 2448 times)

aus9

  • Guest
[SOLVED] tcz creation using /etc versus /usr/local/etc
« on: December 19, 2012, 07:28:28 PM »
Hi

I am aware of the various pages associated with tcz creations namely
http://wiki.tinycorelinux.net/wiki:creating_extensions which has further links in the info section.

Based on this thread
http://forum.tinycorelinux.net/index.php?topic=443.0

theme create sym links from /usr/local/lib to /lib

would you agree that if a new or update tcz....man page.... expected config files to be under /etc
TCZ checkers prefer submitters create
/usr/local/etc/somefile(folder)
ln -s /usr/local/etc/somefile(folder) /etc

I ask this because I have a package with a man page that expects users to look at /etc/filename and
I don't want to edit the relevant man pages

And

I don't know enough about whether /etc is "non-tcz" territory

2) Alternatively, I can give a warning in the info file for the doc (man page) tcz that users are to look under /usr/local/etc

3) and extra request, if user needs to edit /usr/local/etc/somefile
do TCZ checkers prefer that:
just add the one file =  /usr/local/etc/somefile to /opt/.filetool.lst and use a script in bootlocal to create the sym link or
add both files to filetool.lst?

Your thoughts please

cheers

Gordon
« Last Edit: December 20, 2012, 03:11:56 AM by aus9 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10963
Re: tcz creation using /etc versus /usr/local/etc
« Reply #1 on: December 20, 2012, 02:32:32 AM »
If the package is hard-coded to look in /etc, then it's ok to use that directly (--sysconfdir=/etc to configure). pppd is an example of such.

If it's not, and merely a documentation reference, then a mention in the info file would be enough. A symlink is ok if you want to add such.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: tcz creation using /etc versus /usr/local/etc
« Reply #2 on: December 20, 2012, 02:33:58 AM »
According to FHS:

Quote
The following directories, or symbolic links to directories, must be in /usr/local
...
etc       Host-specific system configuration for local binaries
...
/usr/local/etc may be a symbolic link to /etc/local.

Tip Rationale                                                                                                                             
       The consistency of /usr/local/etc is beneficial to installers, and is already used in other systems. As all of /usr/local needs to   
       be backed up to reproduce a system, it introduces no additional maintenance overhead, but a symlink to /etc/local is suitable if     
       systems want alltheir configuration under one hierarchy.                                                                             
                                                                                                                                             
       Note that /usr/etc is still not allowed: programs in /usr should place configuration files in /etc.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14549
Re: tcz creation using /etc versus /usr/local/etc
« Reply #3 on: December 20, 2012, 02:45:31 AM »
would you agree that if a new or update tcz....man page.... expected config files to be under /etc
TCZ checkers prefer submitters create
/usr/local/etc/somefile(folder)
ln -s /usr/local/etc/somefile(folder) /etc
If you compiled the extension to expect the conf file in /usr/local/etc there's no need to make the symlink.

Quote
Alternatively, I can give a warning in the info file for the doc (man page) tcz that users are to look under /usr/local/etc
I think that sounds fine

Quote
and extra request, if user needs to edit /usr/local/etc/somefile
do TCZ checkers prefer that:
just add the one file =  /usr/local/etc/somefile to /opt/.filetool.lst and use a script in bootlocal to create the sym link or
add both files to filetool.lst?
To make the conf file editable you can have the extension start-up script check for the presence of the file and copy the default to /usr/local/etc if it is not present. This way you only need to add the conf file to filetool.lst if it has been modified. You can look at the cups extension or similar to find an example of such a script

aus9

  • Guest
Re: tcz creation using /etc versus /usr/local/etc
« Reply #4 on: December 20, 2012, 03:11:29 AM »
hi

EDIT

tricked me, the makefile suggested I could go to /usr/local/etc but when I read a certain config file, after building it, it says the user should use /etc.

Quote
If the package is hard-coded
I now believe this is the case.

marked as SOLVED

I did not mention, but a number of users may need to edit this file so I will now look at the install script example thanks

cheers
« Last Edit: December 20, 2012, 04:21:31 AM by aus9 »