Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338790 - mail-mta/courier-0.65.0 fails to start with openrc
Summary: mail-mta/courier-0.65.0 fails to start with openrc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High critical with 1 vote (vote)
Assignee: Hanno Böck
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-26 11:41 UTC by Bjarke Istrup Pedersen (RETIRED)
Modified: 2011-01-28 15:18 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2010-09-26 11:41:52 UTC
When trying to start courier, I get an error about not being able to find the ebegin and eend functions.

From what I can deduct, it is related to it being called inside the case/esac sections (but I'm not 100% sure)

Reproducible: Always

Steps to Reproduce:
1. Install courier on a system running baselayout-2 and openrc.
2. Ensure esmtpd is enabled in the config file.
3. Try and start courier

Actual Results:  
testmachine ~ # /etc/init.d/courier start
 * Starting Courier mail server: ...
 *  Starting courierfilterd ...
 *  Starting webmaild ...
 *  Starting courierd ...
/etc/init.d/courier: line 80: ebegin: command not found
/etc/init.d/courier: line 137: eend: command not found
 * ERROR: courier failed to start

Expected Results:  
It should have startet just fine.

testmachine ~ # emerge --info
Portage 2.2_rc77 (default/linux/amd64/10.0/no-multilib, gcc-4.4.4, glibc-2.12.1-r1, 2.6.35-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.35-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 07 Sep 2010 08:45:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/portage /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org/"
LC_ALL="en_DK.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="amd64 bzip2 caps curl dhcp hardened idn ikev1 ikev2 ipv6 logrotate lzma nat ncurses nfsv3 nfsv4 nls nptl oldnet openssl pam server sha1 sha512 ssl symlink syslog threads unicode winbind xml zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2010-09-26 11:48:03 UTC
Maybe a way to fix it would be migrating to use a file in /etc/conf.d to deside which services should be started (that would also give the option to disable the webmail c**p) :)
Comment 2 Hanno Böck gentoo-dev 2010-10-10 19:04:15 UTC
Seems it has something to do with the sourcing of the courier config files - this is bash-ism and should be fixed anyway, but I'm not sure what's causing that the eend-function is unknown.

Will investigate later.
Comment 3 Nick Ellson 2010-10-11 17:45:17 UTC
Same issue here, masked 0.65.0, going back to 0.64.1. Watching this thread for a resolution. Anything I can give for information? (same exact failure as original poster)

Nick
Comment 4 Nick Ellson 2010-10-11 18:10:03 UTC
Hrmm, back rev to 0.64.1 has same issue, perhaps it was some other update that hosed things?

Nick
Comment 5 Nick Ellson 2010-10-11 20:26:55 UTC
I did notive my output is less clean, each service not on it's own line.

But here is my result: ( I did check each command, they are there, and they run by hand)

 * Caching service dependencies ... [ ok ]
 * Starting Courier mail server: ... *  Starting courierfilterd ... *  Starting webmaild ... *  Starting courierd .../etc/init.d/courier: line 107: ebegin: command not found
/etc/init.d/courier: line 116: ebegin: command not found
/etc/init.d/courier: line 137: eend: command not found
 * ERROR: courier failed to start

gubbie ~ # emerge --info
Portage 2.1.9.14 (default/linux/x86/10.0, gcc-4.4.4, glibc-2.12.1-r1, 2.6.33-gentoo i686)
=================================================================
System uname: Linux-2.6.33-gentoo-i686-Intel-R-_Xeon-TM-_CPU_3.00GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 11 Oct 2010 09:15:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 1.3.7-r1, 2.1.11
dev-lang/python:     2.4.4-r4, 2.5.2-r7, 2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       3.4.6-r2::<unknown repository>, 4.1.2, 4.2.4-r1, 4.3.3-r2, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.gossamerhost.com http://gentoo.mirrors.hoobly.com/ http://gentoo.wetzlmayr.com/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--progress --recursive --links --safe-links --compress --perms --times --force --whole-file --itemize-changes --delete --delete-during --stats --timeout=1800 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /opt/axigen/portage-axigen"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acpi alsa apache2 ati avahi berkdb bzip2 cairo caps cdr cli consolekit courier cracklib crypt cups curl cxx dbus device-mapper dga diskio djvu dlloader dmx dpms dri dts dv dvb dvd dvdr dvdread dvi eds elf encode esd ethereal exif extensions extras fame ffmpeg fftw fits flac flash font-server fortran fpx fuse gdbm gdu gecko-sdk geoip gif gimp glitz glx gnome gnutls gocr gpgme gphoto2 gpm gs gstreamer gtk gtkhtml gtkspell gzip h323 hal hddtemp iconv id3 idn imagemagick imlib2 ipv6 ithreads java jbig jfs jp2 jpeg jpeg2k lame lcms libsamplerate lm_sensors logrotate lzo lzw mad math mbox md5sum mdnsresponder-compat mfd-rewrites milter ming mjpeg mmap mmx mmxext mng modules motif mozilla mozsvg mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap mysql mysqli mythtv nautilus ncurses nls nptl nptlonly nsplugin ntfs ocrad ogg opengl openmp pam pcre pdf perl pic pie player png policykit ppds pppd pwdb python pyzor qt3support qt4 quicktime rar razor readline reflection reiserfs rle rpm samba sasl sdk sdl secure-delete sensord server session sftp slang smime smp smux snmp sockets sox spamassassin speex spell spf sqlite srs sse sse-filters sse2 ssl stream svg svgz sysfs szip t1lib tcpd tesseract theora threads tiff tools tos type1 unzip usb v4l v4l2 vdr vhosts vlm vorbis win32codecs wma wma123 wmf x264 x86 xfs xinetd xml2 xorg xosd xpm xprint xscreensaver xulrunner xv xvid yv12 zip zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="auth_digest actions alias auth_basic authn_alias authn_anon authn_dbm authn_default      authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache         dav dav_fs dav_lock  deflate dir disk_cache env expires ext_filter file_cache filter    headers include info log_config logio mem_cache mime mime_magic negotiation          rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php-5.2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 Merc 2010-10-29 09:02:14 UTC
(In reply to comment #5)

Noticed the same with courier 0.62.2 on amd64 arch (not working), whilst on other out of the box system with same version but with i386 there were no problems. 

I appreciate the discussion about shell-agnosticism and bash-ism. 

Noticed that changing "source" into "." in the init scripts does not help. 

Anybody got a clue how to fix it (or how the maintainer should fix it for us ;-P) ??

A deduced conclusion: seems courier is not used at large in the Gentoo community.
Comment 7 Achim Breunig 2011-01-10 22:22:16 UTC
root cause of the problem is that some of the config files read by the 'source' command do contain a 'PATH=...' statement. If you comment this out, the start script finishes without errors. But I have not tested if the according module is working fine. 
Comment 8 Hanno Böck gentoo-dev 2011-01-23 22:33:59 UTC
I've now added a workaround that saves the path variable and restores it after every source operation.

Not nice, but seems to work. Please test (courier-0.65.2-r1)
Comment 9 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2011-01-24 08:09:48 UTC
I've moved my email to google mail, so I'm no longer running my own mail server.

Looks good though :)
Comment 10 Merc 2011-01-24 14:26:44 UTC
I wanted to deploy courier on a lxc host. I was in a hurry, and accidentally emerged courier-0.65.2-r1 on the host instead of the container. I was pleased to find that 0.65.2-r1 works fine on the host. 

After I emerged courier-0.65.2-r1 on the container, I was surprised to find out that the original problem still exists there. Soon I will deploy a fresh container from the latest Gentoo sources, and check if the problem still persists. 
Comment 11 Hanno Böck gentoo-dev 2011-01-25 11:27:01 UTC
@Merc: Did you do etc-update after merging courier?
Can you paste the output of the failing init start?

If the problem persists, please re-open this bug.
Comment 12 Merc 2011-01-28 15:18:26 UTC
It seems to work now on a fresh lxc-container. 

AFTER etc-update (-5). I have emerged many packages, but never had the needed to use this tool. 

Anyway, it works. Thanks for all who contributed, and especiall to those who fixed the ebuild.