Projects
Extra
vivaldi
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 34
View file
vivaldi.spec
Changed
@@ -32,7 +32,7 @@ Source1: https://downloads.vivaldi.com/stable/%{name}-stable-%{version}-1.x86_64.rpm Source2: vivaldi.config.in # PATCH-FIX-OPENSUSE launcher.patch avvissu@yandex.by -- Change the startup script -Patch0: vivaldi-1.8.770.50_launcher.patch +Patch0: vivaldi-1.12.955.36_launcher.patch BuildRequires: build BuildRequires: build-mkbaselibs BuildRequires: chrpath
View file
vivaldi-1.12.955.36_launcher.patch
Added
@@ -0,0 +1,108 @@ +diff -U 3 -H -d -r -N -- vivaldi-stable-1.12.955.36.orig/opt/vivaldi/vivaldi vivaldi-stable-1.12.955.36/opt/vivaldi/vivaldi +--- vivaldi-stable-1.12.955.36.orig/opt/vivaldi/vivaldi 2017-09-20 04:40:40.000000000 +0200 ++++ vivaldi-stable-1.12.955.36/opt/vivaldi/vivaldi 2017-09-20 23:42:13.000000000 +0200 +@@ -9,6 +9,8 @@ + + HERE="`dirname "$CHROME_WRAPPER"`" + ++. @VIVALDI_CONFIG@ ++ + # We include some xdg utilities next to the binary, and we want to prefer them + # over the system versions when we know the system versions are very old. We + # detect whether the system xdg utilities are sufficiently new to be likely to +@@ -26,40 +28,18 @@ + fi + + # Find libffmpeg.so with additional codecs. +-checkffmpeg () { +- if [ "$VIVALDI_FFMPEG_FOUND" = "NO" ]; then +- if [[ -n "$2" ]] && [ -e "$2" ] || [[ -z "$2" ]]; then +- # Chromium's FFMpeg version N-82746-g6bb7ea7 is the oldest known working version +- # chromium/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h +- if [ -r "$1" ]; then +- if [ `grep -aom1 'FFmpeg version N-[0-9]\+-' "$1" | cut -f2 -d-` -ge "82746" ]; then +- if [[ -n "$LD_PRELOAD" ]]; then +- export LD_PRELOAD="$LD_PRELOAD:$1" +- else +- export LD_PRELOAD="$1" +- fi +- export VIVALDI_FFMPEG_FOUND=YES +- fi +- fi +- fi ++FFMPEG_LIB="$(rpm -ql @PKG_FFMPEG@ | grep 'ffmpeg.so')" ++if [[ -n "$FFMPEG_LIB" && -e "$FFMPEG_LIB" ]]; then ++ FFMPEG_VERSION="$(grep -aom1 'FFmpeg version N-[0-9]\+-' "$FFMPEG_LIB" | cut -f2 -d-)" ++ if [[ -n "$FFMPEG_VERSION" && "$FFMPEG_VERSION" -ge "82746" ]]; then ++ FFMPEG_LD_LIBRARY_PATH=":${FFMPEG_LIB%/*}" + fi +-} +- +-# Account for Debian multiarch directories +-case "`uname -m`" in +- x86_64) DEBARCH="x86_64-linux-gnu" ;; +- i?86) DEBARCH="i386-linux-gnu" ;; +-esac +- +-# Check for libs in order that they are most likely to appear. +-# Where possible, use other files/directories to confirm it's the correct variant. +-VIVALDI_FFMPEG_FOUND=NO +-checkffmpeg "/usr/lib/$DEBARCH/oxide-qt/libffmpeg.so" '/usr/share/doc/oxideqt-codecs-extra' +-checkffmpeg '/usr/lib/chromium-browser/libffmpeg.so' '/usr/share/doc/chromium-codecs-ffmpeg-extra' ++fi + +-# Check if the user has manually placed suitable libs. +-checkffmpeg "$HOME/.local/lib/vivaldi/libffmpeg.so" +-checkffmpeg "$HERE/libffmpeg.so" ++# Set LD_LIBRARY_PATH to prefer our libs, excluding $HERE/lib/libffmpeg.so if ++# an alternative ffmpeg was found. ++LD_LIBRARY_PATH="$HERE$FFMPEG_LD_LIBRARY_PATH:$HERE/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ++export LD_LIBRARY_PATH + + export CHROME_VERSION_EXTRA="stable" + +@@ -72,5 +52,41 @@ + exec > >(exec cat) + exec 2> >(exec cat >&2) + +-# Note: exec -a below is a bashism. +-exec -a "$0" "$HERE/vivaldi"-bin "$@" ++PEPPER_PATH="@LIBDIR@/chromium/PepperFlash/libpepflashplayer.so" ++if [[ -n "$PEPPER_PATH" && -f "$PEPPER_PATH" ]]; then ++ FLASH_PATH="$PEPPER_PATH" ++ FLASH_VERSION="$(grep -ao -m1 "LNX [,0-9]\+" $PEPPER_PATH | sed 's/[^0-9]\+//;s/,/./g')" ++fi ++ ++# The setuid permission set on sandbox ++VIVALDI_SANDBOX_FILE="$HERE/@VIVALDI_SANDBOX_FILE@" ++VIVALDI_FLAGS="${VIVALDI_USER_FLAGS:-$VIVALDI_FLAGS}" ++if which xdg-su &> /dev/null; then ++ if [[ "$VIVALDI_FLAGS" =~ 'disable-setuid-sandbox' || "$@" =~ 'disable-setuid-sandbox' ]]; then ++ if [[ -u "$VIVALDI_SANDBOX_FILE" ]]; then ++ echo "Removing the setuid permission on sandbox" ++ xdg-su -c "chmod u-s $VIVALDI_SANDBOX_FILE" &> /dev/null || exit $? ++ fi ++ elif [[ ! -u "$VIVALDI_SANDBOX_FILE" ]]; then ++ echo "Setting the setuid permission on sandbox" ++ xdg-su -c "chmod u+s $VIVALDI_SANDBOX_FILE" &> /dev/null || exit $? ++ fi ++fi ++ ++VIVALDI_FLAGS="${VIVALDI_FLAGS//--disable-setuid-sandbox/}" ++if [[ ! -u "$VIVALDI_SANDBOX_FILE" ]]; then ++ VIVALDI_FLAGS="$VIVALDI_FLAGS --disable-setuid-sandbox" ++fi ++ ++export VIVALDI_FLAGS="$VIVALDI_FLAGS" ++export VIVALDI_DATA_DIR="${VIVALDI_USER_DATA_DIR:-$VIVALDI_DATA_DIR}" ++ ++if [[ -n "$VIVALDI_DATA_DIR" ]]; then ++ exec -a "$0" "$HERE/vivaldi-bin" \ ++ --user-data-dir="$VIVALDI_DATA_DIR" \ ++ --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION $VIVALDI_FLAGS \ ++ "$@" ++else ++ exec -a "$0" "$HERE/vivaldi"-bin \ ++ --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION $VIVALDI_FLAGS \ ++ "$@" +\ No newline at end of file
View file
vivaldi-1.8.770.50_launcher.patch
Deleted
@@ -1,112 +0,0 @@ -diff -ruN vivaldi-stable-1.8.770.50.orig/opt/vivaldi/vivaldi vivaldi-stable-1.8.770.50/opt/vivaldi/vivaldi ---- vivaldi-stable-1.8.770.50.orig/opt/vivaldi/vivaldi 2017-03-29 18:43:04.849879591 +0300 -+++ vivaldi-stable-1.8.770.50/opt/vivaldi/vivaldi 2017-03-29 18:51:02.463220087 +0300 -@@ -9,6 +9,8 @@ - - HERE="`dirname "$CHROME_WRAPPER"`" - -+. @VIVALDI_CONFIG@ -+ - # We include some xdg utilities next to the binary, and we want to prefer them - # over the system versions when we know the system versions are very old. We - # detect whether the system xdg utilities are sufficiently new to be likely to -@@ -26,40 +28,18 @@ - fi - - # Find libffmpeg.so with additional codecs. --checkffmpeg () { -- if [ "$VIVALDI_FFMPEG_FOUND" = "NO" ]; then -- if [[ -n "$2" ]] && [ -e "$2" ] || [[ -z "$2" ]]; then -- # Chromium's FFMpeg version N-82746-g6bb7ea7 is the oldest known working version -- # chromium/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h -- if [ -r "$1" ]; then -- if [ `grep -aom1 'FFmpeg version N-[0-9]\+-' "$1" | cut -f2 -d-` -ge "82746" ]; then -- if [[ -n "$LD_PRELOAD" ]]; then -- export LD_PRELOAD="$LD_PRELOAD:$1" -- else -- export LD_PRELOAD="$1" -- fi -- export VIVALDI_FFMPEG_FOUND=YES -- fi -- fi -- fi -+FFMPEG_LIB="$(rpm -ql @PKG_FFMPEG@ | grep 'ffmpeg.so')" -+if [[ -n "$FFMPEG_LIB" && -e "$FFMPEG_LIB" ]]; then -+ FFMPEG_VERSION="$(grep -aom1 'FFmpeg version N-[0-9]\+-' "$FFMPEG_LIB" | cut -f2 -d-)" -+ if [[ -n "$FFMPEG_VERSION" && "$FFMPEG_VERSION" -ge "82746" ]]; then -+ FFMPEG_LD_LIBRARY_PATH=":${FFMPEG_LIB%/*}" - fi --} -+fi - --# Account for Debian multiarch directories --case "`uname -m`" in -- x86_64) DEBARCH="x86_64-linux-gnu" ;; -- i?86) DEBARCH="i386-linux-gnu" ;; --esac -- --# Check for libs in order that they are most likely to appear. --# Where possible, use other files/directories to confirm it's the correct variant. --VIVALDI_FFMPEG_FOUND=NO --checkffmpeg "/usr/lib/$DEBARCH/oxide-qt/libffmpeg.so" '/usr/share/doc/oxideqt-codecs-extra' --checkffmpeg '/usr/lib/chromium-browser/libffmpeg.so' '/usr/share/doc/chromium-codecs-ffmpeg-extra' -- --# Check if the user has manually placed suitable libs. --checkffmpeg "$HOME/.local/lib/vivaldi/libffmpeg.so" --checkffmpeg "$HERE/libffmpeg.so" -+# Set LD_LIBRARY_PATH to prefer our libs, excluding $HERE/lib/libffmpeg.so if -+# an alternative ffmpeg was found. -+LD_LIBRARY_PATH="$HERE$FFMPEG_LD_LIBRARY_PATH:$HERE/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" -+export LD_LIBRARY_PATH - - export CHROME_VERSION_EXTRA="stable" - -@@ -72,12 +52,45 @@ - exec > >(exec cat) - exec 2> >(exec cat >&2) - -+PEPPER_PATH="@LIBDIR@/chromium/PepperFlash/libpepflashplayer.so" -+if [[ -n "$PEPPER_PATH" && -f "$PEPPER_PATH" ]]; then -+ FLASH_PATH="$PEPPER_PATH" -+ FLASH_VERSION="$(grep -ao -m1 "LNX [,0-9]\+" $PEPPER_PATH | sed 's/[^0-9]\+//;s/,/./g')" -+fi -+ -+# The setuid permission set on sandbox -+VIVALDI_SANDBOX_FILE="$HERE/@VIVALDI_SANDBOX_FILE@" -+VIVALDI_FLAGS="${VIVALDI_USER_FLAGS:-$VIVALDI_FLAGS}" -+if which xdg-su &> /dev/null; then -+ if [[ "$VIVALDI_FLAGS" =~ 'disable-setuid-sandbox' || "$@" =~ 'disable-setuid-sandbox' ]]; then -+ if [[ -u "$VIVALDI_SANDBOX_FILE" ]]; then -+ echo "Removing the setuid permission on sandbox" -+ xdg-su -c "chmod u-s $VIVALDI_SANDBOX_FILE" &> /dev/null || exit $? -+ fi -+ elif [[ ! -u "$VIVALDI_SANDBOX_FILE" ]]; then -+ echo "Setting the setuid permission on sandbox" -+ xdg-su -c "chmod u+s $VIVALDI_SANDBOX_FILE" &> /dev/null || exit $? -+ fi -+fi -+ -+VIVALDI_FLAGS="${VIVALDI_FLAGS//--disable-setuid-sandbox/}" -+if [[ ! -u "$VIVALDI_SANDBOX_FILE" ]]; then -+ VIVALDI_FLAGS="$VIVALDI_FLAGS --disable-setuid-sandbox" -+fi -+ -+export VIVALDI_FLAGS="$VIVALDI_FLAGS" -+export VIVALDI_DATA_DIR="${VIVALDI_USER_DATA_DIR:-$VIVALDI_DATA_DIR}" -+ - # Make sure that the profile directory specified in the environment, if any, - # overrides the default. --if [[ -n "$CHROME_USER_DATA_DIR" ]]; then -+if [[ -n "$VIVALDI_DATA_DIR" ]]; then - # Note: exec -a below is a bashism. - exec -a "$0" "$HERE/vivaldi-bin" \ -- --user-data-dir="$CHROME_USER_DATA_DIR" "$@" -+ --user-data-dir="$VIVALDI_DATA_DIR" \ -+ --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION $VIVALDI_FLAGS \ -+ "$@" - else -- exec -a "$0" "$HERE/vivaldi"-bin "$@" -+ exec -a "$0" "$HERE/vivaldi"-bin \ -+ --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION $VIVALDI_FLAGS \ -+ "$@" - fi
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.