eggdrop
eggdrop copied to clipboard
Default directory
Found by: MalaGaM Patch by: MalaGaM Fixes: #1107
One-line summary: Default directory
Additional description (if needed): issue #1107
Test cases demonstrating functionality (if applicable):
Hi MalaGaM. Thank you for your work. What about enhancing this into a global FHS-compliant (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) solution that would also cover https://github.com/eggheads/eggdrop/issues/1107#issuecomment-767622697? With global solution i mean ./configure --prefix=...
. and FHS-compliant folder names (also in a local install, ./configure
without --prefix
). /data
would become /etc
and/or something like /usr/share/eggdrop/examples
. Do we want to also cover #474? Sounds similar to me. #474 links to operating systems (packaging) patches to make eggdrop install into "usual" folders. I would like to see eggdrop to install in a way that those operating system (packaging) patches become obsolete. Do you think, we can combine those Issues/PRs here? Other dir names to use are /var/log
for the logs, /var/run
for the .pid
-files. irc software like irc2.11.2p3 uses those directories. ircII uses /share
. I dunno where to put the modules, maybe /usr/lib/eggdrop/modules/
or /usr/lib/eggdrop-1.x.y/modules/
. For a local install, same directory names, only difference is to prefix any folder name by /home/user/eggdrop/
. Like /home/michael/eggdrop/usr/share/eggdrop/examples/eggdrop.conf
.
I chose the structure in the PR following the logic used in two unrealircd and anope projects which are two IRC projects too. To reflect / meditate during the night. for now the structure given to the debian package "eggdrop_1.6.21-4 + b1_amd64.deb"(eggdrop) is as follows:
dpkg-deb -xv eggdrop_1.6.21-4+b1_amd64.deb .
./
./usr/
./usr/bin/
./usr/bin/eggdrop-1.6.21
./usr/lib/
./usr/lib/eggdrop/
./usr/lib/eggdrop/modules/
./usr/lib/eggdrop/modules/assoc.so
./usr/lib/eggdrop/modules/blowfish.so
./usr/lib/eggdrop/modules/channels.so
./usr/lib/eggdrop/modules/compress.so
./usr/lib/eggdrop/modules/console.so
./usr/lib/eggdrop/modules/ctcp.so
./usr/lib/eggdrop/modules/dns.so
./usr/lib/eggdrop/modules/filesys.so
./usr/lib/eggdrop/modules/irc.so
./usr/lib/eggdrop/modules/notes.so
./usr/lib/eggdrop/modules/seen.so
./usr/lib/eggdrop/modules/server.so
./usr/lib/eggdrop/modules/share.so
./usr/lib/eggdrop/modules/transfer.so
./usr/lib/eggdrop/modules/uptime.so
./usr/lib/eggdrop/modules/wire.so
./usr/share/
./usr/share/doc/
./usr/share/doc/eggdrop/
./usr/share/doc/eggdrop/README.Debian
./usr/share/doc/eggdrop/changelog.Debian.amd64.gz
./usr/share/doc/eggdrop/changelog.Debian.gz
./usr/share/doc/eggdrop/changelog.gz
./usr/share/doc/eggdrop/copyright
./usr/share/lintian/
./usr/share/lintian/overrides/
./usr/share/lintian/overrides/eggdrop
./usr/share/man/
./usr/share/man/man1/
./usr/share/man/man1/eggdrop.1.gz
./usr/bin/eggdrop
./usr/share/doc/eggdrop/upstream
and "eggdrop-data_1.6.21-4_all.deb" (eggdrop-data) is
./
./usr/
./usr/share/
./usr/share/eggdrop/
./usr/share/eggdrop/scripts/
./usr/share/eggdrop/scripts/cmd_resolve.tcl
./usr/share/eggdrop/scripts/dccwhois.tcl
./usr/share/eggdrop/scripts/getops.tcl
./usr/share/eggdrop/scripts/quotepong.tcl
./usr/share/eggdrop/scripts/action.fix.tcl
./usr/share/eggdrop/scripts/weed
./usr/share/eggdrop/scripts/alltools.tcl
./usr/share/eggdrop/scripts/ques5.tcl
./usr/share/eggdrop/scripts/notes2.tcl
./usr/share/eggdrop/scripts/quotepass.tcl
./usr/share/eggdrop/scripts/compat.tcl
./usr/share/eggdrop/scripts/CONTENTS
./usr/share/eggdrop/scripts/botchk
./usr/share/eggdrop/scripts/userinfo.tcl
./usr/share/eggdrop/scripts/klined.tcl
./usr/share/eggdrop/help/
./usr/share/eggdrop/help/server.help
./usr/share/eggdrop/help/notes.help
./usr/share/eggdrop/help/irc.help
./usr/share/eggdrop/help/chaninfo.help
./usr/share/eggdrop/help/compress.help
./usr/share/eggdrop/help/filesys.help
./usr/share/eggdrop/help/wire.help
./usr/share/eggdrop/help/core.help
./usr/share/eggdrop/help/share.help
./usr/share/eggdrop/help/uptime.help
./usr/share/eggdrop/help/set/
./usr/share/eggdrop/help/set/server.help
./usr/share/eggdrop/help/set/notes.help
./usr/share/eggdrop/help/set/irc.help
./usr/share/eggdrop/help/set/compress.help
./usr/share/eggdrop/help/set/filesys.help
./usr/share/eggdrop/help/set/share.help
./usr/share/eggdrop/help/set/channels.help
./usr/share/eggdrop/help/set/console.help
./usr/share/eggdrop/help/set/transfer.help
./usr/share/eggdrop/help/set/cmds1.help
./usr/share/eggdrop/help/set/ctcp.help
./usr/share/eggdrop/help/cmd_resolve.help
./usr/share/eggdrop/help/assoc.help
./usr/share/eggdrop/help/cmds2.help
./usr/share/eggdrop/help/channels.help
./usr/share/eggdrop/help/console.help
./usr/share/eggdrop/help/transfer.help
./usr/share/eggdrop/help/msg/
./usr/share/eggdrop/help/msg/notes.help
./usr/share/eggdrop/help/msg/irc.help
./usr/share/eggdrop/help/msg/userinfo.help
./usr/share/eggdrop/help/msg/seen.help
./usr/share/eggdrop/help/cmds1.help
./usr/share/eggdrop/help/userinfo.help
./usr/share/eggdrop/help/ctcp.help
./usr/share/eggdrop/help/seen.help
./usr/share/eggdrop/language/
./usr/share/eggdrop/language/wire.german.lang
./usr/share/eggdrop/language/core.english.lang
./usr/share/eggdrop/language/notes.german.lang
./usr/share/eggdrop/language/filesys.danish.lang
./usr/share/eggdrop/language/assoc.finnish.lang
./usr/share/eggdrop/language/core.danish.lang
./usr/share/eggdrop/language/console.danish.lang
./usr/share/eggdrop/language/transfer.danish.lang
./usr/share/eggdrop/language/core.german.lang
./usr/share/eggdrop/language/assoc.german.lang
./usr/share/eggdrop/language/console.finnish.lang
./usr/share/eggdrop/language/core.french.lang
./usr/share/eggdrop/language/assoc.french.lang
./usr/share/eggdrop/language/transfer.finnish.lang
./usr/share/eggdrop/language/console.german.lang
./usr/share/eggdrop/language/wire.english.lang
./usr/share/eggdrop/language/console.french.lang
./usr/share/eggdrop/language/transfer.english.lang
./usr/share/eggdrop/language/filesys.english.lang
./usr/share/eggdrop/language/notes.french.lang
./usr/share/eggdrop/language/core.finnish.lang
./usr/share/eggdrop/language/transfer.french.lang
./usr/share/eggdrop/language/notes.finnish.lang
./usr/share/eggdrop/language/wire.french.lang
./usr/share/eggdrop/language/filesys.german.lang
./usr/share/eggdrop/language/transfer.german.lang
./usr/share/eggdrop/language/assoc.english.lang
./usr/share/eggdrop/language/wire.finnish.lang
./usr/share/eggdrop/language/notes.english.lang
./usr/share/eggdrop/language/filesys.finnish.lang
./usr/share/eggdrop/language/wire.danish.lang
./usr/share/eggdrop/language/console.english.lang
./usr/share/eggdrop/language/filesys.french.lang
./usr/share/eggdrop/language/notes.danish.lang
./usr/share/eggdrop/language/assoc.danish.lang
./usr/share/eggdrop/text/
./usr/share/eggdrop/text/motd
./usr/share/eggdrop/text/banner
./usr/share/doc-base/
./usr/share/doc-base/eggdrop-data
./usr/share/doc/
./usr/share/doc/eggdrop-data/
./usr/share/doc/eggdrop-data/TEXT-SUBSTITUTIONS
./usr/share/doc/eggdrop-data/WEIRD-MESSAGES
./usr/share/doc/eggdrop-data/BANS
./usr/share/doc/eggdrop-data/settings/
./usr/share/doc/eggdrop-data/settings/mod.assoc
./usr/share/doc/eggdrop-data/settings/mod.share
./usr/share/doc/eggdrop-data/settings/core.settings.gz
./usr/share/doc/eggdrop-data/settings/mod.notes
./usr/share/doc/eggdrop-data/settings/mod.woobie
./usr/share/doc/eggdrop-data/settings/mod.channels.gz
./usr/share/doc/eggdrop-data/settings/mod.compress
./usr/share/doc/eggdrop-data/settings/mod.blowfish
./usr/share/doc/eggdrop-data/settings/mod.dns
./usr/share/doc/eggdrop-data/settings/mod.filesys
./usr/share/doc/eggdrop-data/settings/mod.wire
./usr/share/doc/eggdrop-data/settings/mod.irc.gz
./usr/share/doc/eggdrop-data/settings/mod.uptime
./usr/share/doc/eggdrop-data/settings/mod.console
./usr/share/doc/eggdrop-data/settings/mod.server.gz
./usr/share/doc/eggdrop-data/settings/CONTENTS
./usr/share/doc/eggdrop-data/settings/mod.seen
./usr/share/doc/eggdrop-data/settings/mod.transfer
./usr/share/doc/eggdrop-data/settings/mod.ctcp
./usr/share/doc/eggdrop-data/ABOUT
./usr/share/doc/eggdrop-data/BOTNET.gz
./usr/share/doc/eggdrop-data/changelog.gz
./usr/share/doc/eggdrop-data/MODULES.gz
./usr/share/doc/eggdrop-data/USERS
./usr/share/doc/eggdrop-data/FIRST-SCRIPT
./usr/share/doc/eggdrop-data/copyright
./usr/share/doc/eggdrop-data/html/
./usr/share/doc/eggdrop-data/html/app-textsub.html
./usr/share/doc/eggdrop-data/html/party.html
./usr/share/doc/eggdrop-data/html/mod-irc.html
./usr/share/doc/eggdrop-data/html/mod-woobie.html
./usr/share/doc/eggdrop-data/html/mod-seen.html
./usr/share/doc/eggdrop-data/html/news.html
./usr/share/doc/eggdrop-data/html/users.html
./usr/share/doc/eggdrop-data/html/patch-howto.html
./usr/share/doc/eggdrop-data/html/install.html
./usr/share/doc/eggdrop-data/html/mod-compress.html
./usr/share/doc/eggdrop-data/html/mod-console.html
./usr/share/doc/eggdrop-data/html/index.html
./usr/share/doc/eggdrop-data/html/mod-notes.html
./usr/share/doc/eggdrop-data/html/app-problems.html
./usr/share/doc/eggdrop-data/html/mod-filesys.html
./usr/share/doc/eggdrop-data/html/mod-dns.html
./usr/share/doc/eggdrop-data/html/mod-share.html
./usr/share/doc/eggdrop-data/html/egg-core.html
./usr/share/doc/eggdrop-data/html/app-tricks.html
./usr/share/doc/eggdrop-data/html/tcl-commands.html
./usr/share/doc/eggdrop-data/html/mod-uptime.html
./usr/share/doc/eggdrop-data/html/app-weird.html
./usr/share/doc/eggdrop-data/html/mod-server.html
./usr/share/doc/eggdrop-data/html/readme.html
./usr/share/doc/eggdrop-data/html/mod-assoc.html
./usr/share/doc/eggdrop-data/html/about.html
./usr/share/doc/eggdrop-data/html/mod-transfer.html
./usr/share/doc/eggdrop-data/html/bans.html
./usr/share/doc/eggdrop-data/html/starting.html
./usr/share/doc/eggdrop-data/html/mod-wire.html
./usr/share/doc/eggdrop-data/html/mod-blowfish.html
./usr/share/doc/eggdrop-data/html/faqs.html
./usr/share/doc/eggdrop-data/html/mod-ctcp.html
./usr/share/doc/eggdrop-data/html/botnet.html
./usr/share/doc/eggdrop-data/html/features.html
./usr/share/doc/eggdrop-data/html/compiling.html
./usr/share/doc/eggdrop-data/html/mod-channels.html
./usr/share/doc/eggdrop-data/examples/
./usr/share/doc/eggdrop-data/examples/eggdrop.conf.gz
./usr/share/doc/eggdrop-data/AUTHORS.gz
./usr/share/doc/eggdrop-data/README.gz
./usr/share/doc/eggdrop-data/KNOWN-PROBLEMS
./usr/share/doc/eggdrop-data/BUG-REPORT
./usr/share/doc/eggdrop-data/tcl-commands.doc.gz
./usr/share/doc/eggdrop-data/Changes1.6.gz
./usr/share/doc/eggdrop-data/PARTYLINE
./usr/share/doc/eggdrop-data/TRICKS
./usr/share/doc/eggdrop-data/PATCH-HOWTO.gz
./usr/share/doc/eggdrop-data/NEWS.gz
./usr/share/doc/eggdrop-data/CONTENTS
./usr/share/doc/eggdrop-data/changelog.Debian.gz
I chose the structure in the PR following the logic used in two unrealircd and anope projects which are two IRC projects too.
/home/michael/eggdrop/usr/share/eggdrop/examples/eggdrop.conf
seems unclear to me.
/home/michael/eggdrop/conf/examples/eggdrop.conf
or /home/michael/eggdrop/conf/examples.conf
seems better to me for installation in a homedir. for a system installation use FHS-compliant /usr/share/eggdrop/conf/examples.conf
or /usr/share/eggdrop/conf/examples/eggdrop.conf
for module ./usr/lib/eggdrop/modules/
, I am not sure of the good efficiency of /usr/lib/eggdrop-1.x.y/modules
shouldn't it be necessary to have several different version of eggdrop? I don't necessarily have to watch how the other projects are doing.
The main idea of this PR is to allow several eggdrops (or not) to run in the same installdir without creating a conflict as the use of the same filename by several bots.
One thing I read, is for the pidfile:
Specify here the filename Eggdrop will save its pid to. If no
pidfile is specified, pid.(botnet-nick) will be used.
I think we will have to extend this to the other file names and botnet-nick should be ${network}.${nick}
by default.
Another thought during this work is the first line of eggdrop.conf and basic-eggdrop. The path '#! /path/to/executable/eggdrop
should be updated to the eggdrop binary
I also think that the ./scripts directory needs some thought. I think it's bad practice to put everything like that in there. the idea would be split in two:
# scripts from eggheads
source scripts/defaults/userinfo.tcl
# scripts thirds from user
source scripts/thirds/script1.tcl
1. the unclear example: /home/michael/eggdrop/usr/share/eggdrop/examples/eggdrop.conf
.
Usually (for any software) ./configure
installs system-wide and ./configure --PREFIX=
let the user install into some other directory, like into his home directory.
For historical reasons, eggdrops ./configure
without PREFIX
installs into ~/eggdrop/
.
My example was using ./configure
without PREFIX
.
So the entire directory tree of eggdrop, as i imagined with this PR applied, /usr
, /usr/lib
, /usr/share/eggdrop/examples/eggdrop.conf
, etc would then end up under pathes like /home/michael/eggdrop/usr/share/eggdrop/examples/eggdrop.conf
when my username is michael
.
It may look like some duplication in such a path, but its better than to apply extra logic to such a home-directory install, compared to a system wide install.
But lets stop thinking about this, because...
Now i was thinking again, and the whole idea of default install into ~/eggdrop should be dropped. It is non standard and makes things overly complex.
Eggdrop should install like "any other" package, systemwide by default. and an installation into a users home or somewhere else should be explicitely done with PREFIX=/home/user/
or whereever the user wants to install eggy.
2. The debian package directory tree
is a very good starting point where the files should end up. Maybe take that 1:1. Maybe check with other systems like FreeBSD to see and take best options, should different systems use different directories.
3. The main idea of this PR is to allow several eggdrops (or not) to run in the same installdir without creating a conflict as the use of the same filename by several bots.
Yes, but it should be based on changing the install process as described in (1) and (2).
Generating one keypair and install that doesnt make sense nwo anymore and i vote for dropping it. Lets drop "sslcert:" target from eggdrops Makefile. We let the user generate and install multiple keypairs where and when he wants to, as he would do with any other application.
set userfile "data/${network}-${nick}.user"
Yes, That looks like the way to go. Configure a bots nick and network, and the Bot would autoconfigure its pathes to make multiple eggdrops play nice and less error prone. If we change data
to the new directory structure, it should be fine.
Lets not place configs and logs under the same data dir. We need to add or change some code or config variable so that if one specified "nick and $network, logs would end up under var/log/${network}-${nick}.logfilename.log. Like:
logfile mco * "logs/${network}-${nick}.log"