Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 446378

Summary: www-servers/tomcat-7.0.32 and www-servers/tomcat-6.0.36 should install init scripts and configuration files
Product: Gentoo Linux Reporter: Mark H. Wood <mwood>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mark H. Wood 2012-12-07 16:48:04 UTC
After emerging, /etc/init.d/tomcat-* are gone; servlet-api, jsp-api, el-api are missing in /usr/share/tomcat-[67]*/lib; only edited configuration files remain in /etc/tomcat-*; 'emerge --configure tomcat-7.0.32' on a host where this had not previously been done returns "pkg_config() is not defined: 'tomcat-7.0.32.ebuild'"
and does not configure the product.  Tomcat cannot be stopped or started in the normal way.

Reproducible: Always

Steps to Reproduce:
1.emerge -u world
2.files are gone

Actual Results:  
Tomcat not startable

Expected Results:  
Tomcat upgraded

See also http://forums.gentoo.org/viewtopic-p-7199138.html

johncock ~ # emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0/server, gcc-4.5.4, glibc-2.15-r3, 3.4.9-gentoo x86_64)
=================================================================
System uname: Linux-3.4.9-gentoo-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_2218-with-gentoo-2.1
Timestamp of tree: Thu, 06 Dec 2012 23:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.1.5, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.6
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.5, 4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=opteron"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/spool/munin-async/.ssh"
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.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=opteron"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ http://distfiles.gentoo.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow acl amd64 apache2 berkdb bzip2 cjk cli cracklib crypt cups cxx dri fortran gd gdbm hal iconv ipv6 java6 ldap mmx modules mudflap multilib ncurses nptl nsplugin openmp pam pcre png postgres pppd readline sasl session snmp sse sse2 ssl svg tcpd truetype unicode xattr 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 cgi alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport enterprise groovy harness ide java nb php profiler websvccommon" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon vesa fbdev" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Miroslav Šulc gentoo-dev 2012-12-07 17:26:41 UTC
this is expected behavior. you are supposed to follow the after-merge information:

 * Messages for package www-servers/tomcat-7.0.33:

 * For how to deploy a server instance run:
 *   /usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash --help
 * tomcat-dbcp.jar is not built at this time. Please fetch jar
 * from upstream binary if you need it. Gentoo Bug # 144276

you can also find helpful information at https://wiki.gentoo.org/wiki/Apache_Tomcat
Comment 2 Mark H. Wood 2012-12-07 17:36:22 UTC
Do you mean to say that upgrading an existing Tomcat installation is expected to render it unusable?
Comment 3 Miroslav Šulc gentoo-dev 2012-12-07 17:42:31 UTC
what do you mean by "unusable"?
Comment 4 Mark H. Wood 2012-12-07 18:01:30 UTC
"Unusable" as in the initscript is gone, no way to start Tomcat.

I think I caused confusion by writing unclearly about two different situations (of which I have both):

  o I have several Tomcat 7 installs which were already in place and functioning, and after today's 'emerge -u world' their initscripts and some JARs and configuration (such as the logging) are missing.

  o I had one host which had not yet been moved to Tomcat 7.  When I remembered this, I tried to set it up (using the way many packages do, instead of reading the post-install note carefully).  The response to that looked like useful information about the other problem, but apparently it isn't.
Comment 5 Miroslav Šulc gentoo-dev 2012-12-07 18:54:00 UTC
the way to start tomcat is to create new tomcat instance and migrate your existing instance there. i have added https://wiki.gentoo.org/wiki/Apache_Tomcat#Migrating_Old_Tomcat_Instance to the wiki to ease the migration process. it is pretty easy i suppose.

you will be able to run tomcat using the init script once you finish the instance migration process.
Comment 6 Mark H. Wood 2012-12-07 19:12:32 UTC
So 'emerge -u tomcat' is *expected* to destroy my working instance of Tomcat 7?  Was this announced somewhere?

I do not want to -remove my existing, working Tomcat instance.  I do not want to invent more instances.  There's nothing to migrate; it's only a point release.  I want my existing single non-suffixed instance working again.  How can I do that?
Comment 7 Miroslav Šulc gentoo-dev 2012-12-07 19:23:10 UTC
if the suffix is problem for you, you can run the instance manager without suffix, but it will complain about already existing directories/files so you'd have to resolve that (rename) first. using suffix is much easier if you have tomcat instance from previous tomcat version.

another option is to create new instance using suffix and then adjust your non-suffixed instance so that it has the same config/init files.
Comment 8 Ralph Sennhauser (RETIRED) gentoo-dev 2012-12-12 21:10:57 UTC
I should have noted on the bug that there should be a news item accompanying the stabilization as this would have been the only means to do it. Miroslav was pushed by security and so I take the blame for not being careful enough back in July. I want to apologize for the hassle this has caused.

There are two paths to get things working, downgrading to a version still installing the old init script or to do the migration. The migration should be rather painless but needs some user intervention. Several months in unstable didn't brought up any user questions or complaints as far as I'm aware.

The migration should be well worth it, dozens of bugs fixed and maybe one or two introduced ;). The migration is not because of upstream but how Gentoo builds and installs Tomcat. It was shear luck that things still worked somewhat before. Though this doesn't excuse an insufficient warning, so I'd like to apologize once more for how things entered stable.