^ This is good.Blaine wrote:There's never too many questions.![]()
Ok, here it comes:Code: Select all
moe ~ # cat /etc/beagle/crawl-portage # Beagle Crawl Setup source /etc/make.globals source /etc/make.conf CRAWL_ENABLED="yes" CRAWL_INDEX_NAME="portage" CRAWL_PATHS="${PORTDIR} ${PORTDIR_OVERLAY} /var/db/pkg" CRAWL_ALLOW_PATTERNS="*.ebuild,ChangeLog,metadata.xml" CRAWL_RECURSIVE="yes" CRAWL_DISABLE_FILTERING="no" CRAWL_CACHE_TEXT="no"
^ This is not good. beagleindex must have a shell. Beagle 0.2.5 almost addresses this issue, but not with the unstable version of 'su' that comes with portage. Arguments are in the wrong order. Make /etc/cron.daily/beagle-crawl-system this (you may have to remove /etc/cron.d/beagle*):Blaine wrote:Code: Select all
moe ~ # grep beagleindex /etc/passwd beagleindex:x:104:444:added by portage for beagle:/var/lib/cache/beagle:/usr/sbin/nologin
Code: Select all
[double@ee-pdouble pts/1] cat /etc/cron.daily/beagle-crawl-system
#!/bin/sh
#
# beagle-crawl-system
#
# Copyright (C) 2005 Novell, Inc.
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
umask 022
CRAWL_USER=beagleindex
export TMPDIR=/tmp
# Mono requires a writable wapi directory
MONO_SHARED_DIR=`mktemp -d -p $TMPDIR .beagleindexwapi.XXXXXXXXXX`|| ( echo "Can't create wapi directory!" ; exit 1 )
chown $CRAWL_USER $MONO_SHARED_DIR
for crawl_file in /etc/beagle/crawl-*; do
unset CRAWL_ENABLED CRAWL_DISABLE_FILTERING CRAWL_RECURSIVE CRAWL_CACHE_TEXT CRAWL_ALLOW_PATTERNS CRAWL_DENY_PATTERNS CRAWL_PATHS CRAWL_INDEX_NAME
if [ -f $crawl_file ] ; then
. $crawl_file
if [ -n "$CRAWL_ENABLED" -a "$CRAWL_ENABLED" = "yes" ] ; then
OPTIONS="`test -n "$CRAWL_DISABLE_FILTERING" -a "$CRAWL_DISABLE_FILTERING" = "yes" && \
echo --disable-filtering`"
OPTIONS="$OPTIONS `test -n "$CRAWL_RECURSIVE" -a "$CRAWL_RECURSIVE" = "yes" && \
echo --recursive`"
OPTIONS="$OPTIONS `test -n "$CRAWL_CACHE_TEXT" -a "$CRAWL_CACHE_TEXT" = "yes" && \
echo --enable-text-cache`"
OPTIONS="$OPTIONS `test -n "$CRAWL_ALLOW_PATTERNS" && \
echo --allow-pattern $CRAWL_ALLOW_PATTERNS`"
OPTIONS="$OPTIONS `test -n "$CRAWL_DENY_PATTERNS" && \
echo --deny-pattern $CRAWL_DENY_PATTERNS`"
IONICE=`which ionice 2>/dev/null`
if [ -n "$IONICE" ]; then
IONICE="$IONICE -c 3"
fi
eval nice -n 19 $IONICE su -s /bin/bash $CRAWL_USER -c " MONO_SHARED_DIR=$MONO_SHARED_DIR /usr/sbin/beagle-build-index --target /var/lib/cache/beagle/indexes/$CRAWL_INDEX_NAME $OPTIONS $CRAWL_PATHS" >/dev/null 2>&1
#eval nice -n 19 $IONICE su -s /usr/sbin/beagle-build-index $CRAWL_USER "/usr/sbin/beagle-build-index --target /var/lib/cache/beagle/indexes/$CRAWL_INDEX_NAME $OPTIONS $CRAWL_PATHS" > /dev/null 2>&1
fi
fi
done
# delete wapi directory
rm -rf $MONO_SHARED_DIR
exit 0
^ This is bad too. Static indexes go into /var/lib/cache/beagle, not your home dir. So:Blain wrote:Code: Select all
moe ~ # ls -lah /var/lib/cache/beagle/ insgesamt 0 drwxr-xr-x 3 beagleindex root 72 14. Apr 14:18 . drwxr-xr-x 4 root root 104 14. Apr 14:16 .. drwxr-xr-x 2 beagleindex beagleindex 72 22. Apr 18:36 indexes"/var/lib/cache/beagle/indexes/" is empty. I suppose there should be something in there, otherwise you wouldn't ask? All the indexes are in "~/.beagle/Indexes/" of my user.Code: Select all
moe ~ # du -sh /var/lib/cache/beagle/indexes/* du: Zugriff auf ,,/var/lib/cache/beagle/indexes/*" nicht möglich: Datei oder Verzeichnis nicht gefunden
Hope this helps.
Code: Select all
# mkdir -p /var/lib/cache/beagle/indexes
# chown beagleindex /var/lib/cache/beagle/indexes
# /etc/cron.daily/beagle-crawl-system
I suppose when beagle 0.2.5 is available you won't need to make these changes. Your decision to wait or not





