There is a very strange problem with the wwwoffle package. emerge wwwoffle fails at /var/tmp/portage/wwwoffle-2.7g/work/wwwoffle-2.7g/cache/Makefile $(TAR) cf $(SPOOLDIR)/html.tar html && cd $(SPOOLDIR) && $(TAR) xpf html.tar && rm html.tar Here is the output: make[1]: Entering directory `/var/tmp/portage/wwwoffle-2.7g/work/wwwoffle-2.7g/cache' [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/http ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/http [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/outgoing ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/outgoing [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/monitor ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/monitor [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/lasttime ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/lasttime [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/prevtime1 ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/prevtime1 [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/lastout ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/lastout [ -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/local ] || /bin/install -c -d -m 750 /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/local [ ! -x /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/html ] || mv /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/html /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/html.old cd html ; rm -f default ; ln -sf en default tar cf /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle/html.tar html && cd /var/tmp/portage/wwwoffle-2.7g/image//var/spool/wwwoffle && tar xpf html.tar && rm html.tar tar: html/de/search/htdig/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/en/search/htdig/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/en/search/namazu/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/en/search/mnogosearch/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/es/search/htdig/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/es/search/mnogosearch/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/fr/search/htdig/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/fr/search/namazu/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/fr/search/mnogosearch/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/it/search/htdig/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/it/search/mnogosearch/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/pl/search/htdig/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/pl/search/namazu/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: html/pl/search/mnogosearch/index.html: Cannot change ownership to uid 250, gid 250: No such file or directory tar: Error exit delayed from previous errors make[1]: *** [install-html] Error 2 make[1]: Leaving directory `/var/tmp/portage/wwwoffle-2.7g/work/wwwoffle-2.7g/cache' All these files are symbolic links in the tar file (they come before the target file in the archive). # emerge --info Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.23-ck1) ================================================================= System uname: 2.4.23-ck1 i686 AMD Duron(tm) processor Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox userpriv usersandbox" GENTOO_MIRRORS="http://localhost/gentoo http://localhost ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X Xaw3d aalib acl acpi activefilter alsa apache2 apm avi berkdb caps cdr crypt cscope cups dga directfb dvd emacs encode esd fbcon ffmpeg flac foomaticdb gd gdbm ggi gif gtk gtk2 guile imap imlib innodb java jpeg lcms ldap libg++ libwww lirc lucid mad maildir mcal mikmod mmx motif mozcalendar mozilla mozsvg mozxmlterm mpeg mpi mule mysql ncurses nls nvidia oav oggvorbis opengl pam pdflib perl png python quicktime readline sasl scanner sdl slang slp snmp socks5 spell sse ssl svga t1lib tcltk tcpd tetex tiff truetype unicode usb v4l wmf x86 xface xfs xml xml2 xmms xosd xv zlib video_cards_nvidia" Reproducible: Always Steps to Reproduce: Expected Results: No Error message. I found this while i was working on a new ebuild for the latest wwwoffle version. The problem persists.
Created attachment 21825 [details] ebuild for the latest wwwoffle version
After i got no comment until now, i changed the ebuild to patch the Makefile so now it --dereference s the links. Comments to this? - $(TAR) cf $(SPOOLDIR)/html.tar html && cd $(SPOOLDIR) && $(TAR) xpf html.tar && rm html.tar + $(TAR) -chf $(SPOOLDIR)/html.tar html && cd $(SPOOLDIR) && $(TAR) -xpf html.tar && rm html.tar Further i did some cleaning. Before wwwoffle is installed, a running server must be stopped. I tried to improve the pkg_pre/postinst() routines. It looks like... pkg_preinst() { source ${ROOT}/etc/init.d/functions.sh [...] if [ -L ${svcdir}/started/wwwoffled ]; then einfo "The wwwoffled init script is running. I'll stop it, merge the new files and restart the script." /etc/init.d/wwwoffled stop touch ${T}/restart fi ...and results in: * The wwwoffled init script is running. I'll stop it, merge the new files and restart the script. * Stopping wwwoffled... [ ok ]/sbin/runscript.sh: line 450: rc_splash_update: command not found (See #33479) (This is sys-apps/baselayout-1.8.6.12-r3) Don't forget the ebuilds in portage are broken. The tar part is broken and this "rc_splash_update: command not found" occurs too.
Created attachment 22848 [details] wwwoffle-2.8a.ebuild
Created attachment 22849 [details, diff] dereference
Created attachment 22900 [details] wwwoffle-2.8a.ebuild If i install manually there are no problems, so i removed the dereference patch again.
Created attachment 23233 [details] wwwoffle-2.8a.ebuild This ebuild addes --no-same-owner to the tar in cache/Makefile.in. Thx to Daniel Black for his hint in gentoo-dev@lists.g.o. (if gentoo doesn't want to upgrade - it should fix existing ebuilds: add the 'sed'!) Well, the pre/post_inst() with "rc_splash_update: command not found" is not 'nice'. Any suggestions? I couldn't find an ebuild that stops and restarts a server.
Sorry should of mentioned a dependancy too (">=sys-apps/sed-4") so that is supports "sed -i". Awk and perl are also dependices for the documentaion. Small error - docs install to /usr/doc instead on /usr/share/doc/... Attached patch fixes these previous discrepancies. Another quirk - the pkg_p???inst methods indicate that you are going to merge the new files (? which ones) when you realy don't. I got caught out when a wwwoffle 2.7 option was not in 2.8 and it didn't restart. Personally I'd like to see the default config as a non-root user and make /var/spool/wwwoffle writeable by that user (I use wwwcache:daemon), and setting /etc/wwwoffle.conf options: run-uid run-gid. However its Brandy's bug and I think I've said enough. Good work and thanks for the submission.
Created attachment 23439 [details, diff] patch for dependancies and doc dir
previous summary indicated its was buggy when its realy not (too bad). Comments 0-5 not applicable. BTW I don't thinks its a good idea for a ebuild to alter system state by restarting services. wwwoffled forks however it doesn't spawn stuff that may lead to a data inconsitancy as far as i know. Recommend adding keywords EBUILD (Torsten/Brandy) and changing summary to "wwwoffle ebuild version 2.8a" since it realy isn't "wwwoffle with tar problems" any more. (I don't have the authority)
Thx for your response and the patch. Does it really /every/ dependency? Like sys-devel/gcc? Or sed? Is there any limit? "the pkg_p???inst methods indicate that you are going to merge the new files (? which ones) when you realy don't." What do you mean? I don't understand this. "BTW I don't thinks its a good idea for a ebuild to alter system state by restarting services. wwwoffled forks however it doesn't spawn stuff that may lead to a data inconsitancy as far as i know." What do you suggest? The INSTALLATION file advises to stop before make install and restart after. You are right, i too think that the start/stop service part is buggy. It doesn't even work if you change the status of wwwoffle manually. But after all this bug is reported for over a month and nobody is interested at all (execpt you). "Personally I'd like to see the default config as a non-root user..." Me, too. "I got caught out when a wwwoffle 2.7 option was not in 2.8 and it didn't restart." Which one? And how can we prevent this? "previous summary indicated its was buggy when its realy not (too bad). Comments 0-5 not applicable." Maybe i don't understand exactly what you mean. I tried to express that the ebuilds in the tree are broken and that they should get fixed. Why are my comments not applicable? "changing summary to "wwwoffle ebuild version 2.8a" since it realy isn't "wwwoffle with tar problems" any more" My POV: As long as it is broken in portage tree it's a bug and the summary is still precise. But i changed it hoping the fix gets a little more attention.
"Does it really /every/ dependency? Like sys-devel/gcc? Or sed? Is there any limit?" Maybe I get anal about dependencies. I thinks its ok to exclude core packages (/usr/portage/profiles/default-x86-1.4/packages) where the version don't matter. "the pkg_p???inst methods indicate that you are going to merge the new files (? which ones) when you realy don't." "What do you mean? I don't understand this." I interperated this as merging configuration. A non-ebuild developer may not see the correlation between merge and install. "BTW I don't thinks its a good idea for a ebuild to alter system state by restarting services. wwwoffled forks however it doesn't spawn stuff that may lead to a data inconsitancy as far as i know." "What do you suggest? The INSTALLATION file advises to stop before make install and restart after." I didn't read that one. I don't thinks its too dangerious - it didn't burn me anyway. Maybe a ewarn at the start of the installation. "You are right, i too think that the start/stop service part is buggy. It doesn't even work if you change the status of wwwoffle manually. But after all this bug is reported for over a month and nobody is interested at all (execpt you)." A lot of people are realy busy - I've had bugs here for over 6 months without anything but an assignment. Its just a matter of what interest the dev at the time. Version bumps and popular packages are accepted quickly while lesser used packages that look like bugs sometimes get neglected, esp if they look like a botched ebuild that keeps getting modified (like quite a few of mine have) "Personally I'd like to see the default config as a non-root user..." Me, too. Well look at using enewuser and enewgroup in a pkg_setup or pkg_preinst function. chmoding the /var/spool/wwwoffle dir and sed the wwwoffle.config run-uid and run-gid args to point to that user. "I got caught out when a wwwoffle 2.7 option was not in 2.8 and it didn't restart." "Which one?" I can't remember and at the moment I too lazy to look it up. It was a simple matter of omitting it. The problem is true of any program upgrade. The solution would be to determine what version was installed, cut the difference, auto-merge the solution (ok I'm being theatrical here) blah blah blah -- the user can accept some responsibility in my humble opinion. "And how can we prevent this?" Encourage a etc-update on the users part and hopefully they will carely merge or just accept the new config. "previous summary indicated its was buggy when its realy not (too bad). Comments 0-5 not applicable." "Maybe i don't understand exactly what you mean. I tried to express that the ebuilds in the tree are broken and that they should get fixed. Why are my comments not applicable?" More obselete now that the attached ebuild is working. "But i changed it hoping the fix gets a little more attention." That was my intension too. Adding EBUILD in the keywords has a similar effect.
Passing this back to bug-wranglers since unfortunately I'll be very much indisposed for the next 6 weeks.
Why does starting wwwoffled-online start eth0 even though ppp0 is already up? klippie jean # /etc/init.d/wwwoffled-online restart * Stopping wwwoffled-online... * Bringing eth0 up... [ ok ] * Setting default gateway... [ ok ] * Starting wwwoffled-online... I see it has: depend() { need wwwoffled net } Shouldn't 'net' be provided by ppp0? Sorry if this is a bit clueless .. I'm not sure exactly how the init dependencies work.
Hmm. Is /etc/init.d/net.ppp0 start (ed)? It checks the start up scripts rather than the interfaces if I remember? If web-apps want to set this to a particular interface look at pdnsd-1.1.9. Interface, IFACE, defined in /etc/conf.d/wwwoffle with depend in the init as "need net.$IFACE". Just a suggestion. Jean what wwwoffle version are you using?
Jean, In answer to you question "net" will be satisified by any /etc/init.d/net.* script.
Created attachment 28670 [details] wwwoffle-2.8b.ebuild cleaned up -- doesnot stop/start wwwoffled while merging. in files/wwwoffled i changed --exec to --name in stop(). this seems to be more reliable on my computer. Now: [...] stop() { ebegin "Stopping wwwoffled" start-stop-daemon --stop --quiet --name wwwoffled eend $? }
Sorry for the lack of comment from Gentoo. We currently don't have a maintainer for wwwoffle. As soon as we get one, we'll be able to do something about this bug. Best regards, Stu
Stuart - I volunteer - I've being using wwwoffle for a few years and will commit to the maintenance of wwwoffle if you have no objections. I will commit a user run version of this ebuild and fix the existing ebuilds within 3 days if no objection reached.
Created attachment 29938 [details] wwwoffle-2.8b.ebuild - adds user 'wwwoffle' and adds htdig path - adds an unprivileged user 'wwwoffle' enewgroup wwwoffle enewuser wwwoffle -1 /bin/false /var/spool/wwwoffle wwwoffle and changes /etc/wwwoffled. - if htdig is installed htsearch is in /var/www/localhost/cgi-bin (it really is in ${HTTPD_CGIBIN}). i added this path to wwwoffle-htsearch. I am not sure what the correct way is (see ebuild) or if it should be done at all. - see #7728
Daniel, No objections at all. Thank you. Best regards, Stu
tove - thanks for the updated ebuild. I've been meaning to get htdig to work for ages.
#adjust path for htdig - /usr/share/webapps/${PF}/cgi-bin/ #(as per http://www.gentoo.org/proj/en/glep/glep-0011.html) Not impliemented yet :-( I'll ask to Stu to make sure this is still the current plan. questions: webapp-apache deprecated? - yes ## function shouldn't be in src_unpack? ## useless function, always /var/www/localhost/cgi-bin Not sure what your talking about here ^^^^^^^. If the GLEP specifies the location, is this relevant? Also considering chown -R wwwoffle:wwwoffle \ ${D}/var/spool/wwwoffle/{http,outgoing,monitor,lasttime,prevtime1,lastout,local}\ ${D}/var/spool/wwwoffle/search/{mnogosearch/db,htdig/tmp,htdig/db-lasttime,htdig/db} is this sufficient?
files/wwwoffled changed to use --name in stop. Versions 2.7g and 2.7h fixed tar unpack. Version bump to 2.8b as well. Still TODO: fix files/wwwoffled-online to depend on a user controlable interface. Fix htdig so that wwwoffle will use it (version 2.8b and beyond) Stop wwwoffled before install in $ROOT (sorry tove you were right) Any probs let me know.
Hi Daniel, some remarks, questions, fixes: 1) # for those upgrading... [ -f ${ROOT}/etc/wwwoffle.conf ] && \ sed -e 's/\(run-[gu]id\)[ \t]*=[ \t]*[a-zA-Z0-9]*[ \t]*$/\1 = wwwoffle/g' \ ${ROOT}/etc/wwwoffle.conf \ ${D}/etc/wwwoffle/wwwoffle.conf There is something wrong. But i don't know what you wanted to do. Did you mean: > ${D}/etc/wwwoffle.conf ? Then i don't like it. Users can't see if there were changes in the config file. 2) ${D} doesn't make sense in pkg_postinst. Use ${ROOT}. 3) In pkg_postinst: # fix permissions for those upgrading I think this is the only place to set permission correctly. Consider binary packages then you can't be sure that the uid is the right one if you only set it in src_install. (uid of wwwoffle can be different on different machines.) 4) | #adjust path for htdig - /usr/share/webapps/${PF}/cgi-bin/ | #(as per http://www.gentoo.org/proj/en/glep/glep-0011.html) | | Not impliemented yet :-( | ## function shouldn't be in src_unpack? forget this one. i didn't understood. | ## useless function, always /var/www/localhost/cgi-bin | Not sure what your talking about here ^^^^^^^. If the GLEP specifies the | location, is this relevant? Right now, htdig installs htsearch in /var/www/localhost/cgi-bin (hardcoded in webapp-apache.eclass). The only thing to make htdig work (with the setting in wwwoffle package - scripts, conf and db are in /var/spool/wwwoffle/search/htdig/{conf,db,scripts}) is to add the path to htsearch to cache/search/htdig/scripts/wwwoffle-htsearch. So i don't understand why you: echo '/usr/share/webapps/*/cgi-bin/htsearch -c /var/spool/wwwoffle/search/htdig/conf/htsearch.conf' \ > cache/search/htdig/scripts/wwwoffle-htsearch 5) | chown -R wwwoffle:wwwoffle \ | ${D}/var/spool/wwwoffle/{http,outgoing,monitor,lasttime,prevtime1,lastout,local}\ | ${D}/var/spool/wwwoffle/search/{mnogosearch/db,htdig/tmp,htdig/db-lasttime,htdig/db} | | is this sufficient? Maybe upgraders need also previme? and prevout?. ? is [1-7] here.
1. yes I did mean > ${D}/etc/wwwoffle.conf This will show up when the user does an etc-update due to config protection on /etc. 2. your right 3. Will look into this further 4. I'm planning on fixing htdig soon so it goes to the directories refered to here. 5. Yep will include these too.
Additional thought with regard to 1. Did you mean that changes from 2.7 to 2.8 are not shown? Suggestions please
Yes, i don't like it because the user can not see if there were changes in the package config file. Further i think the run-[ug]id changes can also be done while etc-updating. Maybe a einfo "blabla for upgraders wwwoffle server runs unprivileged as wwwoffle user. etc-update will show you the necessary changes (run-[gu]id = wwwoffle) in your /etc/wwwoffle.conf. blabla" could be useful. (If they miss that they run their server unter uid 0 as they do it now.)
ad 3) Sorry, i was wrong. tar remembers the name and uses it if user exists.
hopefully fixed. Thanks for your patience. As usual any probs tell me. Will get onto 7728 soon too.