Bug 1316 - tomcat6 preinstall and posttrans scripts contains build system paths
Summary: tomcat6 preinstall and posttrans scripts contains build system paths
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High normal
Target Milestone: ---
Assignee: D Morgan
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 00:56 CEST by Christiaan Welvaart
Modified: 2011-05-29 18:22 CEST (History)
0 users

See Also:
Source RPM: tomcat6-6.0.32-2.mga1.src.rpm
CVE:
Status comment:


Attachments

Description Christiaan Welvaart 2011-05-18 00:56:32 CEST
Description of problem:

The preinstall scriptlet of the tomcat6 package refers to /home/iurt/rpm which causes an error during installation:
/bin/cp: cannot create directory `/home/iurt/rpm/tmp//tomcat6-libdir.bak': No such file or directory

The posttrans scriptlet also contains such references but does not cause error messages during installs.

rpm -qp --scripts /var/cache/apt/archives/tomcat6-6.0.32-2.mga1.noarch.rpm
preinstall scriptlet (using /bin/sh):
# add the tomcat user and group
/usr/sbin/groupadd -g 91 -r tomcat 2>/dev/null || :
/usr/sbin/useradd -c "Apache Tomcat" -u 91 -g tomcat \
    -s /bin/nologin -r -d /usr/share/tomcat6 tomcat 2>/dev/null || :
# Save the conf, app, and lib dirs
# due to rbgz 640686. Copy them to the _tmppath so we don't pollute
# the tomcat file structure
[ -d /var/lib/tomcat6/webapps ] && /bin/cp -rp /var/lib/tomcat6/webapps /home/iurt/rpm/tmp//tomcat6-webapps.bak || :
[ -d /etc/tomcat6 ] && /bin/cp -rp /etc/tomcat6 /home/iurt/rpm/tmp//tomcat6-confdir.bak || :
[ -d /usr/share/java/tomcat6  ] && /bin/cp -rp /usr/share/java/tomcat6 /home/iurt/rpm/tmp//tomcat6-libdir.bak || :

(other scripts)

postuninstall scriptlet (using /bin/sh):

echo -e "<dependencies>\n" > /etc/maven/maven2-depmap.xml
if [ -d /etc/maven/fragments ] && [ -n "`find /etc/maven/fragments -type f`" ]; then
cat /etc/maven/fragments/* >> /etc/maven/maven2-depmap.xml
fi
echo -e "</dependencies>\n" >> /etc/maven/maven2-depmap.xml
posttrans scriptlet (using /bin/sh):
if [ -d /home/iurt/rpm/tmp//tomcat6-webapps.bak ]; then
  /bin/cp -rp /home/iurt/rpm/tmp//tomcat6-webapps.bak/* /var/lib/tomcat6/webapps
  /bin/rm -rf /home/iurt/rpm/tmp//tomcat6-webapps.bak
fi
if [ -d /home/iurt/rpm/tmp//tomcat6-libdir.bak ]; then
  /bin/cp -rp /home/iurt/rpm/tmp//tomcat6-libdir.bak/* /usr/share/java/tomcat6
  /bin/rm -rf /home/iurt/rpm/tmp//tomcat6-libdir.bak
fi
if [ -d /home/iurt/rpm/tmp//tomcat6-confdir.bak ]; then
  /bin/cp -rp /home/iurt/rpm/tmp//tomcat6-confdir.bak/* /etc/tomcat6
  /bin/rm -rf /home/iurt/rpm/tmp//tomcat6-confdir.bak
fi

Version-Release number of selected component (if applicable):
6.0.32-2.mga1
Ahmad Samir 2011-05-18 01:55:45 CEST

Priority: Normal => High
Assignee: bugsquad => dmorganec

Comment 1 Christiaan Welvaart 2011-05-29 16:09:14 CEST
this was fixed in 6.0.32-3

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 2 Ahmad Samir 2011-05-29 18:22:47 CEST
Yes, sorry, forgot to close this one.

Note You need to log in before you can comment on or make changes to this bug.