Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Change installation path for a package?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Tue Oct 09, 2018 10:36 pm    Post subject: Change installation path for a package? Reply with quote

Hi, folks!
Finally, I'm not able to use Firefox 52.x anymore, especially having 60.2 at work, that provide another level of user experience.
But, as mentioned previously in https://forums.gentoo.org/viewtopic-t-1075648-highlight-.html, I still need an old version for occasional use because modern versions lacks of Java support.
Before installing precompiled firefox-bin-52 and compiling firefox-60 from sources, I wonder of there is a way to change the installation path for the package, so I still can build old version from sources exactly for my set of use flags and lib versions with -B option, and then manually unpack it to some different directory like /usr/lib64/firefox-52 or even something under /opt/ so it will not interfere with main version? In other words, is there is a way to change installation prefix, so all the compiled stuff will stay in one specified directory without being in system world and affecting main version?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Wed Oct 10, 2018 5:45 am    Post subject: Reply with quote

It's not more simple download official tar.bz2 and unpack it in /opt?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Wed Oct 10, 2018 6:17 am    Post subject: Reply with quote

fedeliallalinea wrote:
It's not more simple download official tar.bz2 and unpack it in /opt?

In case it is not possible to compile locally and install under some different from default path I will use a precompiled binary.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Wed Oct 10, 2018 6:30 am    Post subject: Reply with quote

I looked ebuild and firefox-bin already put in /opt
Code:
# ls /var/tmp/portage/www-client/firefox-bin-52.9.0/image/*/**
/var/tmp/portage/www-client/firefox-bin-52.9.0/image/etc/revdep-rebuild:
10firefox-bin

/var/tmp/portage/www-client/firefox-bin-52.9.0/image/opt/firefox:
all-gentoo.js      defaults            gmp-clearkey        liblgpllibs.so    libnspr4.so     libplc4.so       libxul.so          removed-files
application.ini    dependentlibs.list  gtk2                libmozavcodec.so  libnss3.so      libplds4.so      minidump-analyzer  run-mozilla.sh
browser            dictionaries        icons               libmozavutil.so   libnssckbi.so   libsmime3.so     omni.ja            Throbber-small.gif
chrome.manifest    firefox             icudt58l.dat        libmozgtk.so      libnssdbm3.chk  libsoftokn3.chk  platform.ini       updater
crashreporter      firefox-bin         libfreeblpriv3.chk  libmozsandbox.so  libnssdbm3.so   libsoftokn3.so   plugin-container   updater.ini
crashreporter.ini  fonts               libfreeblpriv3.so   libmozsqlite3.so  libnssutil3.so  libssl3.so       precomplete        update-settings.ini

/var/tmp/portage/www-client/firefox-bin-52.9.0/image/usr/bin:
firefox-bin

/var/tmp/portage/www-client/firefox-bin-52.9.0/image/usr/share:
applications  icons  pixmaps

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9523
Location: beyond the rim

PostPosted: Wed Oct 10, 2018 9:29 am    Post subject: Reply with quote

Pretty sure firefox isn't slotted, so you'll not be able to install multiple self-compiled versions in parallel without changing the ebuild.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Wed Oct 10, 2018 9:42 am    Post subject: Reply with quote

Genone wrote:
Pretty sure firefox isn't slotted, so you'll not be able to install multiple self-compiled versions in parallel without changing the ebuild.

Package are not slotted but can coexist, because change install dirs (/opt vs /usr/{lib64,...}) and name of program, firefox for source compiled and firefox-bin for pre-compiled
Code:
# emerge -1 firefox =firefox-bin-52.9.0

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] www-client/firefox-62.0.3::gallifrey  USE="dbus geckodriver gmp-autoupdate hwaccel kde pulseaudio screenshot startup-notification system-harfbuzz system-jpeg system-libevent system-libvpx -bindist -clang -custom-cflags -custom-optimization -debug -eme-free -hardened -jack -lto (-neon) (-selinux) -system-icu -system-sqlite -test -wifi" L10N="de fr it -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB
[ebuild  N     ] www-client/firefox-bin-52.9.0::gentoo  USE="ffmpeg pulseaudio startup-notification (-selinux)" L10N="de fr it -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cs -cy -da -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -fi -fy -ga -gd -gl -gu -he -hi -hr -hsb -hu -hy -id -is -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Wed Oct 10, 2018 8:35 pm    Post subject: Reply with quote

I have another plan. As I mentioned before, I would like to compile firefox-52.x just as it goes in the regular way with exception of changed installation path and without actual install (option -B). This will give me a package compiled exactly for my system with all the use flags and Gentoo patches and tweaks. Then, I can simply unpack it to the target directory without actually adding it to the world. This will at the same time give me old Firefox with support of IcedTea that I will run in case I need it, and current stable Firefox 60-something compiled and installed in a regular way for every day use not interfering one with each other. firefox-bin is the last resort.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9523
Location: beyond the rim

PostPosted: Thu Oct 11, 2018 8:35 am    Post subject: Reply with quote

fedeliallalinea wrote:
Genone wrote:
Pretty sure firefox isn't slotted, so you'll not be able to install multiple self-compiled versions in parallel without changing the ebuild.

Package are not slotted but can coexist, because change install dirs (/opt vs /usr/{lib64,...}) and name of program, firefox for source compiled and firefox-bin for pre-compiled

That's why I said "self-compiled" versions. As the OP also was already aware about that:
Quote:
Before installing precompiled firefox-bin-52 and compiling firefox-60 from sources ...


cz0 wrote:
I have another plan. As I mentioned before, I would like to compile firefox-52.x just as it goes in the regular way with exception of changed installation path and without actual install (option -B). This will give me a package compiled exactly for my system with all the use flags and Gentoo patches and tweaks. Then, I can simply unpack it to the target directory without actually adding it to the world.


That may work, but there are two things to consider:
a) the package may contain files in other parts of the filesystem (like /usr/bin), so better double-check contents before unpacking
b) it's possible that the path isn't just used for placing files but also during the build process itself (e.g. adjusting search paths)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Thu Oct 11, 2018 9:53 am    Post subject: Reply with quote

Genone wrote:
That's why I said "self-compiled" versions. As the OP also was already aware about that:
Quote:
Before installing precompiled firefox-bin-52 and compiling firefox-60 from sources ...

You right, I misunderstood
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Thu Oct 11, 2018 7:25 pm    Post subject: Reply with quote

Genone wrote:

a) the package may contain files in other parts of the filesystem (like /usr/bin), so better double-check contents before unpacking
b) it's possible that the path isn't just used for placing files but also during the build process itself (e.g. adjusting search paths)

a) The compiled firefox uses 2: /usr/lib64/firefox for binaries and /usr/share/icons/hicolor for media stuff. This dos not seem to make a problem, because binaries will be placed somewhere under /opt, and icons, I believe, can be shared with "main" version, or I can always make symlinks.
b) Firefox does not to seem to do that.
Everything seem to look good in case of FF. Except I still have no idea how to change the installation path..
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9523
Location: beyond the rim

PostPosted: Mon Oct 15, 2018 9:17 am    Post subject: Reply with quote

Looking at the ebuild/eclass, it allows usage of EXTRA_ECONF to supply user-defined options at the end of the configuration process. So you'll just have to figure out what options are required by firefox to relocate to a different target directory.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum