:: [devuan-dev] INJ - Init Freedom inJ…
Etusivu
Poista viesti
Vastaa
Lähettäjä: viverna
Päiväys:  
Vastaanottaja: devuan-dev
Aihe: [devuan-dev] INJ - Init Freedom inJector
A few days ago I wrote in dng mailing-list about my posix shell script
named IFJ (Init Freedom inJector) that inject init diversity in a 
single package.
Workflow I imagined it like this:
- Init script experts write run scripts for all daemon based on rules 
specified below
- Script read a package one by one:
        - Open package in tmp dir
        - For all init system included in Devuan:
                - If exists run script for package
                        - Insert run script
                        - Edit if requested postinst and prerm script
        - Create package from tmp dir
- New package created (automatically)


Run script resides in /var/local/INITSYSTEM/ and are copied in the
package.

Script I wrote support epoch (https://universe2.us/epoch.html) and
runit. Other init can be supported if implemented.

Config file for epoch are in 
/var/local/epoch/package_name_all_daemon.conf
For example openssh-server.conf
ObjectID=sshd
       ObjectDescription=SSHD
       ObjectStartCommand=mkdir -p /run/sshd && /usr/sbin/sshd
       ObjectStopCommand=PIDFILE /run/sshd.pid
       ObjectStartPriority=Start_Network_Daemon_H
       ObjectStopPriority=Stop_Daemon_H
       ObjectEnabled=true
       ObjectOptions=SERVICE AUTORESTART
       ObjectRunlevels=boot core net



Script file for runit are in /var/local/runit/package/

For daemon:
/var/local/runit/package/daemon/run

For example /var/local/runit/openssh-server/sshd/run
#!/bin/sh
exec 2>&1
sv start rsyslogd || exit 1
mkdir -p /run/sshd
exec /usr/sbin/sshd -D

System one time tasks (inject in /etc/runit/{1,2,3}):
/var/local/runit/package/dir/{1,2,3}

Hard work is ONLY create script for all init systems supported (more
easy if a small committee of experts write it).

I would like to release the script with AGPL3.
Normally I use AGPL 3.0 for all my personal project because:

https://www.gnu.org/licenses/why-affero-gpl.en.html

However this is a simple script and might be released with AGPL3 but
init script with GPL (best strategy?) or other license.
Or IFJ script and init script with GPL3?

In any case, if it is useful and can serve the cause of Devuan, I will
release it with the license which can be most useful for the project.

What do you think?

-- 
 _________
< Viverna >
 ---------
       \                    ^    /^
        \                  / \  // \
         \   |\___/|      /   \//  .\
          \  /0  0  \__  /    //  | \ \           *----*
            /     /  \/_/    //   |  \  \          \   |
            @_^_@`/   \/_   //    |   \   \         \/\ \
            //_^_/     \/_ //     |    \    \         \  \
         ( //) |        \///      |     \     \       |  |
       ( / /)  |         //       |      \     _\     |  /
     ( // /)   |          ; -.    |    _ _\.-~       /   /
   (( / / ))   |        _      *-.|.-~-.           .~    ~
  (( // / ))    \      /                 ~-. _ .-~      /
  (( /// ))      `.   }            {                   /
   (( / ))      .----~-.\        \-`                 .~
                ///.----..<        \             _ -~
                   ///-._ _ _ _ _ _ _{^ - - - - ~