Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199210 - net-irc/envbot - an irc bot coded in bash (new ebuild)
Summary: net-irc/envbot - an irc bot coded in bash (new ebuild)
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Dawid Węgliński (RETIRED)
URL: http://envbot.org/trac
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2007-11-15 08:27 UTC by Arvid Norlander
Modified: 2008-04-29 14:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
envbot-0.0.1.ebuild (envbot-0.0.1.ebuild,1.86 KB, text/plain)
2007-11-15 08:27 UTC, Arvid Norlander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Norlander 2007-11-15 08:27:07 UTC
I made an ebuild for envbot (an IRC bot coded in bash that I'm a developer of). Ebuild attached below.

Reproducible: Always
Comment 1 Arvid Norlander 2007-11-15 08:27:39 UTC
Created attachment 136023 [details]
envbot-0.0.1.ebuild
Comment 2 Dawid Węgliński (RETIRED) gentoo-dev 2007-12-24 09:28:18 UTC
It requires some patching, /usr/share isn't best place to log in:

mkdir: cannot create directory `/usr/share/envbot/logs/1198486531': Permission denied
Error: couldn't create log dir
Comment 3 Arvid Norlander 2007-12-24 10:31:46 UTC
Well the log directory is set in the config file, as you would need to set it something to match the user you run it as I can't see how the ebuild can be aware of that?

If you would use system wide logging instead (create a special account? I got no idea how to do that in ebuilds) then I'd suggest /var/log/envbot.
Comment 4 Dawid Węgliński (RETIRED) gentoo-dev 2007-12-24 14:32:18 UTC
That's not really possible now. The problem is you can't run envbot as a root, but while running it as a regular user you have access problems.

mkdir: cannot create directory `/var/log/envbot': Permission denied
Error: couldn't create log dir

Setting anything that touch $USER directory in globally in /etc is just silly. IMO it should create ~/.envbot, then copy bot_settings.sh.example into it.

The patch should be also applied:
diff -Naur envbot-0.0.1.old/lib/log.sh envbot-0.0.1/lib/log.sh
--- envbot-0.0.1.old/lib/log.sh 2007-12-24 10:22:10.000000000 +0000
+++ envbot-0.0.1/lib/log.sh     2007-12-24 10:26:11.000000000 +0000
@@ -170,7 +170,7 @@
        # This creates log dir for this run:
        log_dir="${config_log_dir}/$(date -u +%s)"
        # Security, the log may contain passwords.
-       mkdir -m 700 "$log_dir"
+       mkdir -m 700 -p "$log_dir"
        if [[ $? -ne 0 ]]; then
                echo "Error: couldn't create log dir"
                envbot_quit 1
Comment 5 Dawid Węgliński (RETIRED) gentoo-dev 2008-04-29 14:19:44 UTC
Hi Arvid,

how it's going with your project? Have you fixed Makefile and other stuff we were talking about last time? Please reopen if this bug can be moved on. ;)