Fixed /usr in launch scripts to allow run in container

This commit is contained in:
Martin Stransky 2019-03-21 15:18:35 +01:00
parent cb313562d6
commit 0813120c79
4 changed files with 29 additions and 25 deletions

View File

@ -4,4 +4,4 @@
# #
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
exec /usr/bin/firefox "$@" exec /__PREFIX__/bin/firefox "$@"

View File

@ -4,4 +4,4 @@
# #
export MOZ_DISABLE_WAYLAND=1 export MOZ_DISABLE_WAYLAND=1
exec /usr/bin/firefox "$@" exec /__PREFIX__/bin/firefox "$@"

View File

@ -39,12 +39,12 @@ cmdname=`basename $0`
MOZ_ARCH=$(uname -m) MOZ_ARCH=$(uname -m)
case $MOZ_ARCH in case $MOZ_ARCH in
x86_64 | s390x | sparc64) x86_64 | s390x | sparc64)
MOZ_LIB_DIR="/usr/lib64" MOZ_LIB_DIR="/__PREFIX__/lib64"
SECONDARY_LIB_DIR="/usr/lib" SECONDARY_LIB_DIR="/__PREFIX__/lib"
;; ;;
* ) * )
MOZ_LIB_DIR="/usr/lib" MOZ_LIB_DIR="/__PREFIX__/lib"
SECONDARY_LIB_DIR="/usr/lib64" SECONDARY_LIB_DIR="/__PREFIX__/lib64"
;; ;;
esac esac
@ -79,7 +79,7 @@ fi
## Set MOZ_GRE_CONF ## Set MOZ_GRE_CONF
## ##
MOZ_GRE_CONF=/etc/gre.d/gre.conf MOZ_GRE_CONF=/etc/gre.d/gre.conf
if [ "$MOZ_LIB_DIR" == "/usr/lib64" ]; then if [ "$MOZ_LIB_DIR" == "/__PREFIX__/lib64" ]; then
MOZ_GRE_CONF=/etc/gre.d/gre64.conf MOZ_GRE_CONF=/etc/gre.d/gre64.conf
fi fi
export MOZ_GRE_CONF export MOZ_GRE_CONF
@ -107,7 +107,7 @@ export MOZ_PLUGIN_PATH
## ##
## Set MOZ_APP_LAUNCHER for gnome-session ## Set MOZ_APP_LAUNCHER for gnome-session
## ##
export MOZ_APP_LAUNCHER="/usr/bin/firefox" export MOZ_APP_LAUNCHER="/__PREFIX__/bin/firefox"
## ##
## Set FONTCONFIG_PATH for Xft/fontconfig ## Set FONTCONFIG_PATH for Xft/fontconfig
@ -167,7 +167,7 @@ MOZILLA_DOWN=0
if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then
if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then
# Is firefox running? # Is firefox running?
/usr/bin/pidof firefox > /dev/null 2>&1 /__PREFIX__/bin/pidof firefox > /dev/null 2>&1
MOZILLA_DOWN=$? MOZILLA_DOWN=$?
fi fi
fi fi

View File

@ -1,7 +1,7 @@
# Set to true if it's going to be submitted as update. # Set to true if it's going to be submitted as update.
%global release_build 1 %global release_build 0
# Special config to build as module # Special config to build as module
%global module_build 0 %global module_build 1
# Disabled arm due to rhbz#1658940 # Disabled arm due to rhbz#1658940
ExcludeArch: armv7hl ExcludeArch: armv7hl
@ -97,7 +97,7 @@ ExcludeArch: s390x
Summary: Mozilla Firefox Web browser Summary: Mozilla Firefox Web browser
Name: firefox Name: firefox
Version: 66.0 Version: 66.0
Release: 9%{?pre_tag}%{?dist} Release: 10%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/ URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+ License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@ -597,8 +597,8 @@ make -C objdir buildsymbols
%if %{?run_tests} %if %{?run_tests}
%if %{?system_nss} %if %{?system_nss}
ln -s /usr/bin/certutil objdir/dist/bin/certutil ln -s %{_prefix}/bin/certutil objdir/dist/bin/certutil
ln -s /usr/bin/pk12util objdir/dist/bin/pk12util ln -s %{_prefix}/bin/pk12util objdir/dist/bin/pk12util
%endif %endif
mkdir test_results mkdir test_results
@ -657,14 +657,15 @@ desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29}
%global wayland_default false %global wayland_default false
%endif %endif
%{__rm} -rf %{buildroot}%{_bindir}/firefox %{__rm} -rf %{buildroot}%{_bindir}/firefox
%{__sed} -e 's/__DEFAULT_WAYLAND__/%{wayland_default}/' %{SOURCE21} > %{buildroot}%{_bindir}/firefox %{__sed} -e 's/__DEFAULT_WAYLAND__/%{wayland_default}/' \
-e 's,__PREFIX__,%{_prefix},g' %{SOURCE21} > %{buildroot}%{_bindir}/firefox
%{__chmod} 755 %{buildroot}%{_bindir}/firefox %{__chmod} 755 %{buildroot}%{_bindir}/firefox
%if 0%{?wayland_backend_default} %if 0%{?wayland_backend_default}
%{__cat} %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11 %{__sed} -e 's,__PREFIX__,%{_prefix},g' %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11
%{__chmod} 755 %{buildroot}%{_bindir}/firefox-x11 %{__chmod} 755 %{buildroot}%{_bindir}/firefox-x11
%else %else
%{__cat} %{SOURCE28} > %{buildroot}%{_bindir}/firefox-wayland %{__sed} -e 's,__PREFIX__,%{_prefix},g' %{SOURCE28} > %{buildroot}%{_bindir}/firefox-wayland
%{__chmod} 755 %{buildroot}%{_bindir}/firefox-wayland %{__chmod} 755 %{buildroot}%{_bindir}/firefox-wayland
%endif %endif
@ -927,6 +928,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#--------------------------------------------------------------------- #---------------------------------------------------------------------
%changelog %changelog
* Thu Mar 21 2019 Martin Stransky <stransky@redhat.com> - 66.0-10.test
- Test build
* Thu Mar 21 2019 Martin Stransky <stransky@redhat.com> - 66.0-9 * Thu Mar 21 2019 Martin Stransky <stransky@redhat.com> - 66.0-9
- Release build - Release build