LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script built Vivaldi installed unintentionally as root with installpkg. (https://www.linuxquestions.org/questions/linux-newbie-8/script-built-vivaldi-installed-unintentionally-as-root-with-installpkg-4175625597/)

globetrotterdk 03-14-2018 06:45 PM

Script built Vivaldi installed unintentionally as root with installpkg.
 
I have very little practical experience with Slackware... I have a new 14.2 install on a laptop. I used a script to build Vivaldi browser and installed it with installpkg:
https://gist.github.com/ruario/dcbba...cc883542ff7ace
As I haven't been able to get it to run, I ran an
Code:

$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?

BW-userx 03-14-2018 06:55 PM

Quote:

Originally Posted by globetrotterdk (Post 5831048)
I have very little practical experience with Slackware... I have a new 14.2 install on a laptop. I used a script to build Vivaldi browser and installed it with installpkg:
https://gist.github.com/ruario/dcbba...cc883542ff7ace
As I haven't been able to get it to run, I ran an
Code:

$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?

what is the execuable name?
Code:

/opt/Vivaldi/vivaldi(executable)
on your command line if it starts. then look for the desktop file and copy it into
Code:

/usr/share/applications
though it would be wise to open it under root.
Code:

sudo nano Vivaldi.desktop
then find the line in the file
Code:

// here goes the absolute path and executable name
// in Exec

Exec=/opt/Vivaldi/vivaldi

keeping in mind what I wrote is only an example of what it needs to be.

Code:

-rwxr-xr-x 1 root root 140748848 Feb 26  2017 /opt/blender/blender
permissions on /opt
everyone can execute a app from /opt/ the x tells you that.
owner, group, other are all getting the x

globetrotterdk 03-15-2018 03:18 AM

Quote:

Originally Posted by BW-userx (Post 5831052)
what is the execuable name?
Code:

/opt/Vivaldi/vivaldi(executable)

Thanks for the reply BW-userx. Here is what things look like in /opt and /vivaldi:
Code:

$ cd /opt
bash-4.3$ ls -l
total 4
drwxr-xr-x 7 root root 4096 Mar 14 23:12 vivaldi
bash-4.3$ cd vivaldi
bash-4.3$ ls -l
total 151192
drwxr-xr-x 2 root root      4096 Feb 27 03:17 cron
-rw-r--r-- 1 root root      812 Feb 27 03:17 features.json
-rw-r--r-- 1 root root  10170896 Feb 27 03:17 icudtl.dat
drwxr-xr-x 2 root root      4096 Feb 27 03:17 lib
-rw-r--r-- 1 root root  2878720 Mar 14 23:12 libffmpeg.so
lrwxrwxrwx 1 root root        36 Mar 14 22:28 libwidevinecdm.so -> /opt/google/chrome/libwidevinecdm.so
-rw-r--r-- 1 root root    432312 Feb 27 03:17 libwidevinecdmadapter.so
drwxr-xr-x 2 root root      4096 Feb 27 03:17 locales
-rw-r--r-- 1 root root    218121 Feb 27 03:17 natives_blob.bin
-rw-r--r-- 1 root root      4672 Feb 27 03:17 product_logo_128.png
-rw-r--r-- 1 root root      520 Feb 27 03:17 product_logo_16.png
-rw-r--r-- 1 root root      527 Feb 27 03:17 product_logo_22.png
-rw-r--r-- 1 root root      573 Feb 27 03:17 product_logo_24.png
-rw-r--r-- 1 root root      9421 Feb 27 03:17 product_logo_256.png
-rw-r--r-- 1 root root      1165 Feb 27 03:17 product_logo_32.png
-rw-r--r-- 1 root root      1602 Feb 27 03:17 product_logo_32.xpm
-rw-r--r-- 1 root root      1690 Feb 27 03:17 product_logo_48.png
-rw-r--r-- 1 root root      2274 Feb 27 03:17 product_logo_64.png
drwxr-xr-x 3 root root      4096 Feb 27 03:17 resources
-rw-r--r-- 1 root root  12511893 Feb 27 03:17 resources.pak
-rw-r--r-- 1 root root  1358436 Feb 27 03:17 snapshot_blob.bin
drwxr-xr-x 2 root root      4096 Feb 27 03:17 swiftshader
-rwxr-xr-x 1 root root      3426 Feb 27 03:17 vivaldi
-rwxr-xr-x 1 root root 125209048 Feb 27 03:17 vivaldi-bin
-rwxr-xr-x 1 root root    19504 Feb 27 03:17 vivaldi-sandbox
-rw-r--r-- 1 root root    824509 Feb 27 03:17 vivaldi_100_percent.pak
-rw-r--r-- 1 root root  1101306 Feb 27 03:17 vivaldi_200_percent.pak

The Vivaldi browser will not execute and there is no feedback of any kind. I know that this build works on a Salix OS system, so if it isn't a permission issue, that would suggest that I am missing something on my system. My Slackware system was installed excluding KDE, but I went through the install in "expert" mode to try to make sure that I included everything that would be normal "gotchas", such as PyQT.
----
Code:

$ vivaldi
bash: vivaldi: command not found


AwesomeMachine 03-15-2018 05:18 AM

Try
Code:

# ./vivaldi-bin

globetrotterdk 03-15-2018 08:16 AM

Quote:

Originally Posted by AwesomeMachine (Post 5831184)
Try
Code:

# ./vivaldi-bin

Code:

# ./vivaldi-bin
bash: ./vivaldi-bin: No such file or directory


BW-userx 03-15-2018 08:31 AM

How did you run your script?
Code:

//Step 1 copy script into another file then make it executable
userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ chmod +x latest-Vivaldi

//step 2 run same script
userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ ./latest-Vivaldi
Downloading Vivaldi 1.14.1077.55 for x86_64
ca chunk Ka Chunk compiling
....

//step 3 install results

Slackware package "/tmp/vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz" created.

userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ sudo installpkg /tmp/vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz
Verifying package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz.
Installing package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz:
PACKAGE DESCRIPTION:
# vivaldi-stable (Vivaldi web browser)
#
# Vivaldi browser is made with power users in mind by people who love
# the Web.
#
# Homepage:  https://vivaldi.com
#
Executing install script for vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz.
Package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz installed.

//step 4 find where it went.
$ ls /opt
blender  dropbox  share  vivaldi

//step 5 go there


 cd /opt/vivaldi


//step 6 find the executable
userx@slackwhere101:/opt/vivaldi
$ ls
cron                      product_logo_16.png  resources.pak
features.json            product_logo_22.png  snapshot_blob.bin
icudtl.dat                product_logo_24.png  swiftshader
lib                      product_logo_256.png  vivaldi
libwidevinecdm.so        product_logo_32.png  vivaldi-bin
libwidevinecdmadapter.so  product_logo_32.xpm  vivaldi-sandbox
locales                  product_logo_48.png  vivaldi_100_percent.pak
natives_blob.bin          product_logo_64.png  vivaldi_200_percent.pak
product_logo_128.png      resources


//step 7 run the executable
userx@slackwhere101:/opt/vivaldi
$ ./vivaldi

No suitable library for HTML5 MP4 (H.264/AAC) video and MP3 audio was
found, therefore only open codecs will play.

For assistance on how to enable proprietary media, visit:

https://help.vivaldi.com/article/html5-mp4-h-264aac-video-and-mp3-audio-support-under-linux/

Works for me.

you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications

globetrotterdk 03-15-2018 09:01 AM

Quote:

Originally Posted by BW-userx (Post 5831250)
Works for me.

you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications

Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop. I tried running:
Code:

# removepkg vivaldi

No such package: /var/log/packages/vivaldi. Can't remove.

so that I could try building and install it on Slackware. How do I remove the package?
----
Got it: "vivaldi-stable".

BW-userx 03-15-2018 09:05 AM

Quote:

Originally Posted by globetrotterdk (Post 5831261)
Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop. I tried running:
Code:

# removepkg vivaldi

No such package: /var/log/packages/vivaldi. Can't remove.

so that I could try building and install it on Slackware. How do I remove the package?

Code:

ls /var/log/packages | grep vivaldi
then if you get a return on that.
Code:

sudo removepkg the entire file name off of your return
can you mix salix with slack? I know salix can use slack but is it ambidextrous between the two?
anyways .. it wouldn't hurt to remove it then installed right off of slack. It does not take that much time to do.

globetrotterdk 03-15-2018 09:17 AM

New Vivaldi install completed without problems. However:
Code:

$ vivaldi-stable
[3201:3239:0315/151338.399968:FATAL:nss_util.cc(631)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted

Code:

# slackpkg search NSS

Looking for NSS in package list. Please wait... DONE

No package name matches the pattern.

Code:

# sbopkg -s NSS
Searching for NSS
sbopkg: package "NSS" not found.

----
I found the answer. I needed to run:

Code:

# slackpkg upgrade mozilla-nss-3.31.1
Vivaldi is now running :) Thanks for all the help.

BW-userx 03-15-2018 09:34 AM

Quote:

Originally Posted by globetrotterdk (Post 5831268)
New Vivaldi install completed without problems. However:
Code:

$ vivaldi-stable
[3201:3239:0315/151338.399968:FATAL:nss_util.cc(631)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted

Code:

# slackpkg search NSS

Looking for NSS in package list. Please wait... DONE

No package name matches the pattern.

Code:

# sbopkg -s NSS
Searching for NSS
sbopkg: package "NSS" not found.

----
I found the answer. I needed to run:

Code:

# slackpkg upgrade mozilla-nss-3.31.1

I'm finding all kinds of things for nss using sbofind nss -r
use lower case in your search. it's probably a lib files there is too many here for me to get a definite idea which to use though. I have to have whatever it needs in nss already installed from something else I have installed on my system. Then again I never looked at my messages after it was done.

though I am actually using it right now posting this to you. :D

edit I just seen your fix... mozilla

BW-userx 03-15-2018 09:41 AM

I just redid it, and did not get any kind of nss errors did see this though,
Code:

  8375 2018-02-26 20:17 usr/share/applications/vivaldi-stable.desktop
so you should have a desktop already. what WindowManager you running? XFCE4 and such should pick it up and put it in their menu. whereas fluxbox, WMaker will not.


EDIT:
I lied due to misinformation. It is not there. It is located here
Code:

$ sudo find / -name vivaldi-stable.desktop
/tmp/repackage-vivaldi-stable/pkg/usr/share/applications/vivaldi-stable.desktop
find: `/home/userx/.gvfs': Permission denied


ruario 04-18-2018 05:52 AM

Quote:

Originally Posted by globetrotterdk (Post 5831261)
Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop

This is your primary problem. You cannot run 64bit binaries on 32bit.
The second issue seems to be that you are not keeping your distro up to date and hence had old NSS libs. This is a security issue as well, so you want to keep an eye on that.

Perhaps you want to update your first post explaining it was simply a case of installing the wrong architecture and having an outdated system. I suggest this because this thread a very confusing read and generally gives the impression there is something very wrong with my packaging script, when there isn't.

While I am here I also want to address some other things. Many of them seem to have been worked out by BW-userx (or you) along the way but just to summerise again to be 100% clear.

Quote:

Originally Posted by globetrotterdk (Post 5831048)
I ran an
Code:

$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?

Nothing, it should be root owned

Quote:

Originally Posted by BW-userx (Post 5831052)
what is the execuable name?
Code:

/opt/Vivaldi/vivaldi(executable)

It is “/opt/vivaldi/vivaldi” (note the lower case). There is also a symlink in /usr/bin and that is what the .desktop file points to.

Quote:

Originally Posted by BW-userx (Post 5831052)
then look for the desktop file and copy it into
Code:

/usr/share/applications

It is already there as “/usr/share/applications/vivaldi-stable.desktop” and contains “Exec=/usr/bin/vivaldi-stable %U”

Quote:

Originally Posted by globetrotterdk (Post 5831162)
Code:

$ vivaldi
bash: vivaldi: command not found


That is because it is the wrong command. After typing “vivaldi” presssing tab would have autocompleted from the name of symlink in “/usr/bin”, i.e. vivaldi-stable

Quote:

Originally Posted by globetrotterdk (Post 5831247)
Code:

# ./vivaldi-bin
bash: ./vivaldi-bin: No such file or directory


Because you are not in “/opt/vivaldi/” when you type it.

It would be the wrong way to start anyway, since you bypass the startup wrapper which does some tests and sets up variables.

Quote:

Originally Posted by BW-userx (Post 5831250)
you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications

No need since a symlink is already setup and there is a desktop file already present and working.

Quote:

Originally Posted by globetrotterdk (Post 5831261)
Code:

# removepkg vivaldi

No such package: /var/log/packages/vivaldi. Can't remove.

so that I could try building and install it on Slackware. How do I remove the package?

Use the correct package name (vivaldi-stable)

Quote:

Originally Posted by BW-userx (Post 5831275)
[…]did not get any kind of nss errors did see this though,
Code:

  8375 2018-02-26 20:17 usr/share/applications/vivaldi-stable.desktop
EDIT:
I lied due to misinformation. It is not there. It is located here
Code:

$ sudo find / -name vivaldi-stable.desktop
/tmp/repackage-vivaldi-stable/pkg/usr/share/applications/vivaldi-stable.desktop
find: `/home/userx/.gvfs': Permission denied


No it really is there. Did you check this after you had uninstalled? From my own system:

Code:

$ ls -l /usr/share/applications/vivaldi-stable.desktop
-rw-r--r-- 1 root root 8375 Mar 21 14:52 /usr/share/applications/vivaldi-stable.desktop
$ grep \.desktop /var/log/packages/vivaldi-stable-1.14.1077.60-x86_64-1ro
usr/share/applications/vivaldi-stable.desktop
usr/share/xfce4/helpers/vivaldi.desktop



All times are GMT -5. The time now is 07:48 AM.