Projects
Extra
vivaldi
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
vivaldi.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Jul 18 23:47:05 UTC 2016 - avvissu@yandex.by + +- Fix permissions on files and directories +- Update a startup script + +------------------------------------------------------------------- Sat Jul 16 12:17:40 UTC 2016 - avvissu@yandex.by - Add user variables: VIVALDI_USER_FLAGS and VIVALDI_USER_DATA_DIR
View file
vivaldi.spec
Changed
@@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - %global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$ %global __requires_exclude ^.*(ffmpeg|widevinecdm).*$ %if 0%{?suse_version} == 1320 @@ -24,7 +23,7 @@ %if 0%{?packman_bs} %if 0%{?is_opensuse} %define codecs_dir %(rpm -ql chromium-ffmpeg | grep -m1 "\.so" | xargs dirname) -%define codecs_ver %(rpm -q --queryformat '%{VERSION}' chromium-ffmpeg) +%define codecs_ver %(rpm -q chromium-ffmpeg --qf='%{VERSION}' | awk 'BEGIN{FS="."}{print $1 * 1000000 + $2 * 1000 + $3}') %define pepper_flash_lib %(rpm -ql chromium-pepper-flash | grep "flashplayer.so") %endif %endif @@ -86,9 +85,9 @@ -e 's|@VIVALDI_CONFIG@|%{_sysconfdir}/default/%{name}|g' \ -e 's|@CODECS_DIR@|%{?codecs_dir}|g' \ -e 's|@CODECS_VER@|%{?codecs_ver}|g' \ - -e 's|@PEPPER_FLASH_LIB@|%{?pepper_flash_lib}|g' \ -e 's|@VIVALDI_FLAGS@|--disable-setuid-sandbox|g' \ - -e 's|@VIVALDI_SANDBOX_FILE@|\./%{name}-sandbox|g' \ + -e 's|@VIVALDI_SANDBOX_FILE@|%{name}-sandbox|g' \ + %{?pepper_flash_lib:-e '/^PEPPER_PATH/s|\/.*[a-z]|%{pepper_flash_lib}|'} \ -i $file done @@ -149,7 +148,7 @@ file=$(echo $list | sed 's/[^/]//') dir=$(dirname $file) if echo $dir | grep "%{name}\|xfce4"; then - grep -wqs "\%dir\ $dir" $filelist || echo "%dir $dir" >> $filelist + grep -wqs "\%dir\ $dir" $filelist || echo "%dir $dir" >> $filelist fi [ -d "$list" ] || echo $file >> $filelist done @@ -184,8 +183,9 @@ %desktop_database_postun %files -f %{name}.lst -%defattr(-,root,root) +%defattr(-,root,root,0755) %doc COPYING +%attr(755,root,root) %{_libdir}/%{name}/%{name}-sandbox %config %{_sysconfdir}/default/%{name} %changelog
View file
vivaldi-stable-1.2.490.43_run.patch
Changed
@@ -1,27 +1,18 @@ diff -U 3 -dHrN vivaldi-stable-1.2.490.43.orig/opt/vivaldi/vivaldi vivaldi-stable-1.2.490.43/opt/vivaldi/vivaldi ---- vivaldi-stable-1.2.490.43.orig/opt/vivaldi/vivaldi 2016-07-11 11:02:13.391676192 +0300 -+++ vivaldi-stable-1.2.490.43/opt/vivaldi/vivaldi 2016-07-11 15:46:00.414527994 +0300 -@@ -9,25 +9,25 @@ +--- vivaldi-stable-1.2.490.43.orig/opt/vivaldi/vivaldi 2016-07-18 01:10:41.000000000 +0300 ++++ vivaldi-stable-1.2.490.43/opt/vivaldi/vivaldi 2016-07-19 09:16:37.172767119 +0300 +@@ -7,27 +7,28 @@ + # Let the wrapped binary know that it has been run through the wrapper. + export CHROME_WRAPPER="`readlink -f "$0"`" - HERE="`dirname "$CHROME_WRAPPER"`" +-HERE="`dirname "$CHROME_WRAPPER"`" ++HERE="${CHROME_WRAPPER%/*}" -# Check if the CPU supports SSE2. If not, try to pop up a dialog to explain the -# problem and exit. Otherwise the browser will just crash with a SIGILL. -# http://crbug.com/348761 -grep ^flags /proc/cpuinfo|grep -qs sse2 -+# Check for existence of needed config file -+VIVALDI_CONF_FILE="@VIVALDI_CONFIG@" -+if which zenity &> /dev/null; then -+ xMESSAGE="$(which zenity)" -+elif which gmessage &> /dev/null; then -+ xMESSAGE="$(which gmessage)" -+elif which xmessage &> /dev/null; then -+ xMESSAGE="$(which xmessage)" -+else -+ xMESSAGE="echo" -+fi -+test -r $VIVALDI_CONF_FILE - if [ $? != 0 ]; then +-if [ $? != 0 ]; then - SSE2_DEPRECATION_MSG="This computer cannot run Vivaldi because \ -its hardware is no longer supported." - if which zenity &> /dev/null; then @@ -32,10 +23,23 @@ - xmessage "$SSE2_DEPRECATION_MSG" - else - echo "$SSE2_DEPRECATION_MSG" 1>&2 -- fi -- exit 1 ++# Check for existence of needed config file ++VIVALDI_CONF_FILE="@VIVALDI_CONFIG@" ++if which zenity &> /dev/null; then ++ xMESSAGE="zenity" ++elif which gmessage &> /dev/null; then ++ xMESSAGE="gmessage" ++elif which xmessage &> /dev/null; then ++ xMESSAGE="xmessage" ++else ++ xMESSAGE="echo" ++fi ++if [[ -r "$VIVALDI_CONF_FILE" ]]; then ++ if [ $? != 0 ]; then + $xMESSAGE "$VIVALDI_CONF_FILE not existing." + exit 1 + fi +- exit 1 fi +. $VIVALDI_CONF_FILE @@ -43,7 +47,7 @@ # 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 -@@ -45,20 +45,24 @@ +@@ -45,21 +46,20 @@ fi # Find libffmpeg.so with additional codecs. @@ -53,30 +57,29 @@ - sed -n '1s/chromium-browser (\(\([0-9]\+\.\)\{3\}\).*/\1/p') - if [ "$CHR_CODECS_VER" = "51.0.2704." ] || [ "$CHR_CODECS_VER" = "50.0.2661." ] || [ "$CHR_CODECS_VER" = "49.0.2623." ]; then - FFMPEG_LD_LIBRARY_PATH=":/usr/lib/chromium-browser/libs" -+CHR_CODECS_DIR="@CODECS_DIR@" -+if [ -n "$CHR_CODECS_DIR" ] && [ -d "$CHR_CODECS_DIR" ]; then -+ CHR_CODECS_VER="@CODECS_VER@" -+ if [ -n "$CHR_CODECS_VER" ]; then -+ if [[ "$CHR_CODECS_VER" =~ '51.0.2704' ]] || [[ "$CHR_CODECS_VER" =~ '50.0.2661' ]] || [[ "$CHR_CODECS_VER" =~ '49.0.2623' ]]; then -+ FFMPEG_LD_LIBRARY_PATH=":$CHR_CODECS_DIR" -+ fi ++CODECS_DIR="@CODECS_DIR@" ++if [[ -n "$CODECS_DIR" && -d "$CODECS_DIR" ]]; then ++ CODECS_VER="@CODECS_VER@" ++ if [[ -n "$CODECS_VER" && "$CODECS_VER" -ge "48002564" ]]; then ++ FFMPEG_LD_LIBRARY_PATH=":$CODECS_DIR" fi -+else ++else + FFMPEG_LD_LIBRARY_PATH=":$HERE/lib" fi + # Set LD_LIBRARY_PATH to prefer our libs, excluding $HERE/lib/libffmpeg.so if # an alternative ffmpeg was found. - if [[ -n "$LD_LIBRARY_PATH" ]]; then +-if [[ -n "$LD_LIBRARY_PATH" ]]; then - LD_LIBRARY_PATH="$HERE$FFMPEG_LD_LIBRARY_PATH:$HERE/lib:$LD_LIBRARY_PATH" -+ LD_LIBRARY_PATH="$HERE$FFMPEG_LD_LIBRARY_PATH$:$LD_LIBRARY_PATH" - else +-else - LD_LIBRARY_PATH="$HERE$FFMPEG_LD_LIBRARY_PATH:$HERE/lib" -+ LD_LIBRARY_PATH="$HERE$FFMPEG_LD_LIBRARY_PATH" - fi +-fi ++LD_LIBRARY_PATH="$HERE$FFMPEG_LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ++ export LD_LIBRARY_PATH -@@ -73,37 +77,45 @@ + export CHROME_VERSION_EXTRA="stable" +@@ -73,37 +73,44 @@ exec > >(exec cat) exec 2> >(exec cat >&2) @@ -96,50 +99,51 @@ - FLASH_PATH="/usr/lib/chromium-browser/PepperFlash/libpepflashplayer.so" # rosa/mandriva 32-bit -elif [ -f "/usr/lib64/chromium-browser/PepperFlash/libpepflashplayer.so" ]; then - FLASH_PATH="/usr/lib64/chromium-browser/PepperFlash/libpepflashplayer.so" # rosa/mandriva 64-bit -+FLASH_PATH="@PEPPER_FLASH_LIB@" -+if [ -n "$FLASH_PATH" ] && [ -f "$FLASH_PATH" ]; then -+ FLASH_PATH="$FLASH_PATH" -+elif [ -f "@LIBDIR@/chromium/PepperFlash/libpepflashplayer.so" ]; then -+ FLASH_PATH="@LIBDIR@/chromium/PepperFlash/libpepflashplayer.so" - fi - if [ -f $FLASH_PATH ]; then +-fi +-if [ -f $FLASH_PATH ]; then ++PEPPER_PATH="@LIBDIR@/chromium/PepperFlash/libpepflashplayer.so" ++if [[ -n "$PEPPER_PATH" && -f "$PEPPER_PATH" ]]; then ++ FLASH_PATH="$PEPPER_PATH" FLASH_VERSION=`grep -m 1 -a -o "LNX [[:digit:]]\+,[[:digit:]]\+,[[:digit:]]\+,[[:digit:]]\+" $FLASH_PATH | cut -c 5- | sed -e "s/,/./g"` fi +# The setuid permission set on sandbox ++VIVALDI_SANDBOX_FILE="$HERE/@VIVALDI_SANDBOX_FILE@" +VIVALDI_FLAGS="${VIVALDI_USER_FLAGS:-$VIVALDI_FLAGS}" -+if [[ "$VIVALDI_FLAGS" =~ 'enable-setuid-sandbox' ]] && [[ ! "$VIVALDI_FLAGS" =~ 'disable-setuid-sandbox' ]]; then -+ VIVALDI_FLAGS=$(echo $VIVALDI_FLAGS | sed 's/--enable-setuid-sandbox\ \?//') -+ if [[ ! -u @VIVALDI_SANDBOX_FILE@ ]]; then -+ if which xdg-su &> /dev/null; then -+ $xMESSAGE "Setting the setgid permission on sandbox" -+ xdg-su -c "chmod u+s @VIVALDI_SANDBOX_FILE@" &> /dev/null -+ fi -+ fi -+elif [[ -u @VIVALDI_SANDBOX_FILE@ ]]; then -+ if which xdg-su &> /dev/null; then -+ $xMESSAGE "Removing the setgid permission on sandbox" -+ xdg-su -c "chmod u-s @VIVALDI_SANDBOX_FILE@" &> /dev/null ++if which xdg-su &> /dev/null; then ++ if [[ "$VIVALDI_FLAGS" =~ 'disable-setuid-sandbox' || "$@" =~ 'disable-setuid-sandbox' ]]; then ++ if [[ -u "$VIVALDI_SANDBOX_FILE" ]]; then ++ $xMESSAGE "Removing the setuid permission on sandbox" ++ xdg-su -c "chmod u-s $VIVALDI_SANDBOX_FILE" &> /dev/null || exit 1 + fi ++ elif [[ ! -u "$VIVALDI_SANDBOX_FILE" ]]; then ++ $xMESSAGE "Setting the setuid permission on sandbox" ++ xdg-su -c "chmod u+s $VIVALDI_SANDBOX_FILE" &> /dev/null || exit 1 ++ 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_USER_FLAGS="$VIVALDI_FLAGS" -+export VIVALDI_USER_DATA_DIR="${VIVALDI_USER_DATA_DIR:-$VIVALDI_DATA_DIR}" ++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 - # Note: exec -a below is a bashism. -+if [[ -n "$VIVALDI_USER_DATA_DIR" ]]; then ++if [[ -n "$VIVALDI_DATA_DIR" ]]; then exec -a "$0" "$HERE/vivaldi-bin" \ - --user-data-dir="$CHROME_USER_DATA_DIR" \ - --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION \ -+ --user-data-dir="$VIVALDI_USER_DATA_DIR" \ -+ --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION $VIVALDI_USER_FLAGS \ ++ --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 \ -+ --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION $VIVALDI_USER_FLAGS \ ++ --ppapi-flash-path=$FLASH_PATH --ppapi-flash-version=$FLASH_VERSION $VIVALDI_FLAGS \ "$@" fi
View file
vivaldi.config.in
Changed
@@ -1,7 +1,7 @@ # Description: Basic configuration for the Vivaldi ## Default options for the Vivaldi ## Type: string -## Default: @VIVALDI_FLAGS@ +## Default: "@VIVALDI_FLAGS@" ## Using user variable: VIVALDI_USER_FLAGS ## VIVALDI_FLAGS="@VIVALDI_FLAGS@"
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
.