[Player-issues] [Bug 2615] .rpm segfault if reallocated to /usr/share instead of /usr/local
Helix Bug Tracker admin at helixcommunity.org
xbill changed:
What |Removed |Added
----------------------------------------------------------------------------
Comment| |This is related to bug #2473
| |and #2615.
| |I just tested the latest
| |nightly build, RealPlayer-
| |9.9.0.257-20040717.i586.rpm
Comment| |both on RedHat Linux
| |9 and Fedora Core 1. It can
| |be relocated successfully on
| |RH9 but will segfault on
| |FC1. So the
| |conclusion is that it is
| |something related to FC1. I
| |tried to run "strace rpm --
| |prefix=/usr/share
Comment| |RealPlayer-9.9.0.257-
| |20040717.i586.rpm" on FC1
| |and the result did not
| |reveal much to me. It
| |said nmap failed after many
| |gettimeofday functions.
| |...
| |read(3, "", 8192)
| |= 0
| |gettimeofday({1090252007,
| |687268}
Comment| |NULL) = 0
| |gettimeofday({1090252007,
| |687549}, NULL) = 0
| |close(3)
| |= 0
| |gettimeofday({1090252007,
| |687684}, NULL) = 0
| |gettimeofday({1090252007,
| |687753}, NULL) = 0
| |gettimeofday({1090252007,
| |687820}
Comment| |NULL) = 0
| |munmap(0xbf3af000, 8192)
| |= 0
| |--- SIGSEGV (Segmentation
| |fault) @ 0 (0) ---
| |+++ killed by SIGSEGV +++
| |Anyway, I am working on a
| |better solution (in my
| |personal opinion
Comment| |:) ). That is I try to let
| |the
| |rpm put stuff directly to
| |/usr/share instead of
| |/usr/local. The modification
| |is pretty
| |straight-forward. I just
| |replace "/usr/local" in
| |RealPlay.spc and
| |HelixPlay.spec with
| |"/usr/share"
| |everywhere.
| |My another attempt
Comment| |is to move excutables (i.e.,
| |script hxplay|realplay and
| |binary
| |hxplay.bin|realplay.bin)
| |into $INSTDIR/bin directory.
| |With the HelixPlayer
| |milestone 2.2 this would
| |not work. But now the helix
| |developers get this
| |possible. After installation
Comment| |I can move all
| |excutables to $INSTDIR/bin
| |and properly set $HELIX_LIBS
| |variable. It works.
| |Therefore I am trying to
| |modify the installation
| |script so that it will adapt
| |this change.
Comment| |I change two lines with the
| |script realplay as below:
| |/usr/share/RealPlay/bin/real
| |play
| |+++ HELIX_LIBS=`echo
| |$REALPLAYDIR | sed
| |"s/\/bin$//"`
| |---
| |HELIX_LIBS=$REALPLAYDIR
| |+++
| |REALPLAYBIN=$HELIX_LIBS/bin/
| |realplay.bin
Comment| |REALPLAYBIN=$HELIX_LIBS/real
| |play.bin
| |The first line change is not
| |necessary if the variable
| |$HELIX_LIBS is explicitly
| |set at the
| |beginning of the script. At
| |present the post-
| |installation script will set
| |HELIX_LIBS according to
| |user's choice for
Comment| |installation path and backup
| |the original script as
| |realplay.bak. I would say
| |this
| |post-installation treatment
| |is *not* necessary since the
| |script tries to figure out
| |$HELIX_LIBS if
| |it is not explicitly set.
| |Similiar changes can be
| |applied for
Comment| |HelixPlayer.
| |The change for the source
| |are listed as below:
| |player_all_real-bingo-beta-
| |20040717/player/app/gtk/real
| |play:
| |+++ HELIX_LIBS=`echo
| |$REALPLAYDIR | sed
| |"s/\/bin$//"`
| |---
| |HELIX_LIBS=$REALPLAYDIR
Comment| |REALPLAYBIN=$HELIX_LIBS/bin/
| |realplay.bin
| |---
| |REALPLAYBIN=$HELIX_LIBS/real
| |play.bin
| |player_all_real-bingo-beta-
| |20040717/player/app/gtk/hxpl
| |ay:
| |+++ HELIX_LIBS=`echo
| |$HXPLAYDIR | sed
| |"s/\/bin$//"`
| |--- HELIX_LIBS=$HXPLAYDIR
| |+++
Comment| |HXPLAYBIN=$HELIX_LIBS/bin/hx
| |play.bin
| |---
| |HXPLAYBIN=$HELIX_LIBS/hxplay
| |.bin
| |player_all_real-bingo-beta-
| |20040717/player/installer/co
| |mmon/confscript.sh:
| |+++ if [ -f
| |../bin/hxplay.bin -o -f
| |../bin/realplay.bin ] ; then
| |--- if [ -f ../hxplay.bin
| |-o
Comment| |-f ../realplay.bin ] ; then
| |+++ elif [ -f
| |bin/hxplay.bin -o -f
| |bin/realplay.bin ] ; then
| |--- elif [ -f hxplay.bin -
| |o -f realplay.bin ] ; then
| |+++ if [ -f
| |$INSTDIR/bin/realplay ] ;
| |then
| |--- if [ -f
| |$INSTDIR/realplay ] ; then
| |+++ elif [ -f
Comment| |$INSTDIR/bin/hxplay ] ; then
| |--- elif [ -f
| |$INSTDIR/hxplay ] ; then
| |+++ cd $INSTDIR/bin ;
| |--- cd $INSTDIR ;
| |player_all_real-bingo-beta-
| |20040717/player/installer/co
| |mmon/postinst.sh:
| |+++ if [ -f
| |../bin/hxplay.bin -o -f
| |../bin/realplay.bin
Comment| |] ; then
| |--- if [ -f ../hxplay.bin
| |-o -f ../realplay.bin ] ;
| |then
| |+++ elif [ -f
| |bin/hxplay.bin -o -f
| |bin/realplay.bin ] ; then
| |--- elif [ -f hxplay.bin
| |-o -f realplay.bin ] ; then
| |+++ if [ -f
| |$INSTDIR/bin/realplay ] ;
| |then
Comment| |$INSTDIR/realplay ] ; then
| |+++ elif [ -f
| |$INSTDIR/bin/hxplay ] ; then
| |--- elif [ -f
| |$INSTDIR/hxplay ] ; then
| |player_all_real-bingo-beta-
| |20040717/player/installer/rp
| |m/RealPlayer.spec:
| |+++ Prefix :
| |/usr/share
| |--- Prefix :
Comment| |/usr/local
| |+++ mkdir -p
| |%buildroot/usr/share
| |+++ cp -a .
| |%buildroot/usr/share/RealPla
| |yer/
| |--- mkdir -p
| |%buildroot/usr/local
| |--- cp -a .
| |%buildroot/usr/local/RealPla
| |yer/
| |--- # this is not needed
| |--- rm -rf
| |%buildroot/usr/local/RealPla
| |yer/Bin
Comment| |rm -f
| |"$INSTDIR/bin/$TARGET.bak"
| |--- rm -f
| |"$INSTDIR/$TARGET.bak"
| |+++ /usr/share/RealPlayer
| |--- /usr/local/RealPlayer
| |+++ * Mon Jul 19 2004
| |Jiaying Xu <jx206 AT cam DOT
| |ac DOT uk>
| |+++ - change the default
| |installation place from
| |/usr/local to
Comment| |/usr/share
| |+++ - move excutables to
| |$INSTDIR/bin
| |+++
| |player_all_real-bingo-beta-
| |20040717/player/installer/rp
| |m/HelixPlayer.spec:
| |+++ Prefix :
| |/usr/share
| |--- Prefix :
| |/usr/local
| |+++ mkdir -p
| |%buildroot/usr/share/HelixPl
| |ayer
Comment| |mkdir -p
| |%buildroot/usr/local/HelixPl
| |ayer
| |+++ mkdir -p
| |%buildroot/usr/share
| |+++ cp -a .
| |%buildroot/usr/share/HelixPl
| |ayer/
| |--- mkdir -p
| |%buildroot/usr/local
| |--- cp -a .
| |%buildroot/usr/local/HelixPl
| |ayer/
| |--- # this is not needed
| |--- rm -rf
Comment| |%buildroot/usr/local/HelixPl
| |ayer/Bin
| |+++ rm -f
| |"$INSTDIR/bin/$TARGET.bak"
| |--- rm -f
| |"$INSTDIR/$TARGET.bak"
| |+++ /usr/share/HelixPlayer
| |--- /usr/local/HelixPlayer
| |+++ * Mon Jul 19 2004
| |Jiaying Xu <jx206 AT cam DOT
| |ac DOT uk>
Comment| |default installation place
| |from /usr/local to
| |/usr/share
| |+++ - move excutables to
| |$INSTDIR/bin
| |+++
| |I am not sure how the bz2
| |source for the rpm
Comment| |install.bz2 is generated. If
| |the excutables are placed
| |in bin/ subdirectory after
| |complied. These changes
| |should be enough. The
| |changes for HelixPlayer are
| |similiar.
| |Hope it helps the community
| |a bit.
| |Kill Bill
| |--
Comment| |game at
| |http://www.xbill.org/
------- Additional Comments From xbill 2004-19-07 09:24 GMT-0800 -------
This is related to bug #2473 and #2615.
I just tested the latest nightly build, RealPlayer-9.9.0.257-20040717.i586.rpm, both on RedHat Linux
9 and Fedora Core 1. It can be relocated successfully on RH9 but will segfault on FC1. So the
conclusion is that it is something related to FC1. I tried to run "strace rpm --prefix=/usr/share
-Uvh RealPlayer-9.9.0.257-20040717.i586.rpm" on FC1 and the result did not reveal much to me. It
said nmap failed after many gettimeofday functions.
...
read(3, "", 8192) = 0
gettimeofday({1090252007, 687268}, NULL) = 0
gettimeofday({1090252007, 687549}, NULL) = 0
close(3) = 0
gettimeofday({1090252007, 687684}, NULL) = 0
gettimeofday({1090252007, 687753}, NULL) = 0
gettimeofday({1090252007, 687820}, NULL) = 0
munmap(0xbf3af000, 8192) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Anyway, I am working on a better solution (in my personal opinion, :) ). That is I try to let the
rpm put stuff directly to /usr/share instead of /usr/local. The modification is pretty
straight-forward. I just replace "/usr/local" in RealPlay.spc and HelixPlay.spec with "/usr/share"
everywhere.
My another attempt is to move excutables (i.e., script hxplay|realplay and binary
hxplay.bin|realplay.bin) into $INSTDIR/bin directory. With the HelixPlayer milestone 2.2 this would
not work. But now the helix developers get this possible. After installation, I can move all
excutables to $INSTDIR/bin and properly set $HELIX_LIBS variable. It works. Therefore I am trying to
modify the installation script so that it will adapt this change.
Firstly, I change two lines with the script realplay as below:
/usr/share/RealPlay/bin/realplay
+++ HELIX_LIBS=`echo $REALPLAYDIR | sed "s/\/bin$//"`
--- HELIX_LIBS=$REALPLAYDIR
+++ REALPLAYBIN=$HELIX_LIBS/bin/realplay.bin
--- REALPLAYBIN=$HELIX_LIBS/realplay.bin
The first line change is not necessary if the variable $HELIX_LIBS is explicitly set at the
beginning of the script. At present the post-installation script will set HELIX_LIBS according to
user's choice for installation path and backup the original script as realplay.bak. I would say this
post-installation treatment is *not* necessary since the script tries to figure out $HELIX_LIBS if
it is not explicitly set.
Similiar changes can be applied for HelixPlayer.
The change for the source are listed as below:
player_all_real-bingo-beta-20040717/player/app/gtk/realplay:
+++ HELIX_LIBS=`echo $REALPLAYDIR | sed "s/\/bin$//"`
--- HELIX_LIBS=$REALPLAYDIR
+++ REALPLAYBIN=$HELIX_LIBS/bin/realplay.bin
--- REALPLAYBIN=$HELIX_LIBS/realplay.bin
player_all_real-bingo-beta-20040717/player/app/gtk/hxplay:
+++ HELIX_LIBS=`echo $HXPLAYDIR | sed "s/\/bin$//"`
--- HELIX_LIBS=$HXPLAYDIR
+++ HXPLAYBIN=$HELIX_LIBS/bin/hxplay.bin
--- HXPLAYBIN=$HELIX_LIBS/hxplay.bin
player_all_real-bingo-beta-20040717/player/installer/common/confscript.sh:
+++ if [ -f ../bin/hxplay.bin -o -f ../bin/realplay.bin ] ; then
--- if [ -f ../hxplay.bin -o -f ../realplay.bin ] ; then
+++ elif [ -f bin/hxplay.bin -o -f bin/realplay.bin ] ; then
--- elif [ -f hxplay.bin -o -f realplay.bin ] ; then
+++ if [ -f $INSTDIR/bin/realplay ] ; then
--- if [ -f $INSTDIR/realplay ] ; then
+++ elif [ -f $INSTDIR/bin/hxplay ] ; then
--- elif [ -f $INSTDIR/hxplay ] ; then
+++ cd $INSTDIR/bin ;
--- cd $INSTDIR ;
player_all_real-bingo-beta-20040717/player/installer/common/postinst.sh:
+++ if [ -f ../bin/hxplay.bin -o -f ../bin/realplay.bin ] ; then
--- if [ -f ../hxplay.bin -o -f ../realplay.bin ] ; then
+++ elif [ -f bin/hxplay.bin -o -f bin/realplay.bin ] ; then
--- elif [ -f hxplay.bin -o -f realplay.bin ] ; then
+++ if [ -f $INSTDIR/bin/realplay ] ; then
--- if [ -f $INSTDIR/realplay ] ; then
+++ elif [ -f $INSTDIR/bin/hxplay ] ; then
--- elif [ -f $INSTDIR/hxplay ] ; then
player_all_real-bingo-beta-20040717/player/installer/rpm/RealPlayer.spec:
+++ Prefix : /usr/share
--- Prefix : /usr/local
+++ mkdir -p %buildroot/usr/share
+++ cp -a . %buildroot/usr/share/RealPlayer/
--- mkdir -p %buildroot/usr/local
--- cp -a . %buildroot/usr/local/RealPlayer/
--- # this is not needed
--- rm -rf %buildroot/usr/local/RealPlayer/Bin
+++ rm -f "$INSTDIR/bin/$TARGET.bak"
--- rm -f "$INSTDIR/$TARGET.bak"
+++ /usr/share/RealPlayer
--- /usr/local/RealPlayer
+++ * Mon Jul 19 2004 Jiaying Xu <jx206 AT cam DOT ac DOT uk>
+++ - change the default installation place from /usr/local to /usr/share
+++ - move excutables to $INSTDIR/bin
+++
player_all_real-bingo-beta-20040717/player/installer/rpm/HelixPlayer.spec:
+++ Prefix : /usr/share
--- Prefix : /usr/local
+++ mkdir -p %buildroot/usr/share/HelixPlayer
--- mkdir -p %buildroot/usr/local/HelixPlayer
+++ mkdir -p %buildroot/usr/share
+++ cp -a . %buildroot/usr/share/HelixPlayer/
--- mkdir -p %buildroot/usr/local
--- cp -a . %buildroot/usr/local/HelixPlayer/
--- # this is not needed
--- rm -rf %buildroot/usr/local/HelixPlayer/Bin
+++ rm -f "$INSTDIR/bin/$TARGET.bak"
--- rm -f "$INSTDIR/$TARGET.bak"
+++ /usr/share/HelixPlayer
--- /usr/local/HelixPlayer
+++ * Mon Jul 19 2004 Jiaying Xu <jx206 AT cam DOT ac DOT uk>
+++ - change the default installation place from /usr/local to /usr/share
+++ - move excutables to $INSTDIR/bin
+++
I am not sure how the bz2 source for the rpm, install.bz2 is generated. If the excutables are placed
in bin/ subdirectory after complied. These changes should be enough. The changes for HelixPlayer are
similiar.
Hope it helps the community a bit.
Kill Bill
--
Let's play my favorite game at http://www.xbill.org/
--
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
You are in the CC list for the product the bug is within.
This e-mail is sent to you automatically from the Helix Bug Tracker. Please, do
not respond
to this message, but instead edit your Bug Tracker user preferences to change
when Bug
Trackers sends you e-mail.