brokndodge
Member

Posts: 83
Linux is sooo HOT
|
 |
« Reply #15 on: August 04, 2009, 07:17:17 am » |
|
gotta walk back thru what i did and maybe test on a clean install, but i believe the major deps are nspr 4.7.4 and nss 3.12.3.
|
|
|
|
|
Logged
|
|
|
|
brokndodge
Member

Posts: 83
Linux is sooo HOT
|
 |
« Reply #16 on: August 04, 2009, 10:31:09 am » |
|
Updated my install script to handle the two biggest dependencies and wget google-chrome-unstable_current_i586.deb. I posted my hacked together nspr package to my source forge site. the script will confirm that you want to install my nspr and connie's mozilla-nss before actually doing it. it must now be run as root (per Daniel's suggestion, thx for the code). call this version 0.0.2. beware, i think i did everything right, but it might damage your system. you should always be very careful running any starnge script as root. I will try to repackage my nspr tonight. Hopefully, the second time around I can do it right. UPDATE: nspr is required to build nss, but does NOT need to be installed to run Chrome. I'm going to try to repackage nss 3.12.3 into a nice tlz for the repo. Maybe I can talk someone into adding it when I'm done. #!/bin/bash # Title: install-chrome # Author: BroknDodge # License: BSD # Version: 0.0.2 # # Special thanks to Vectorite Daniel for his help and suggestions. #
if [ $UID != 0 ];then echo "You must run this script as root." exit 0 fi
function dowhat { ########################### # # First run or update? # ###########################
echo echo echo "Do we need to create the simlinks? (y/n)" read YN if [ "$YN" = "y" ]; then simlinks fi }
function simlinks { cd /usr/lib ln -s libnspr4.so libnspr4.so.0d ln -s libnss3.so libnss3.so.1d ln -s libnssutil3.so libnssutil3.so.1d ln -s libplc4.so libplc4.so.0d ln -s libplds4.so libplds4.so.0d ln -s libsmime3.so libsmime3.so.1d ln -s libssl3.so libssl3.so.1d
quit }
function quit { echo echo echo "Are you sure your done? (y/n)" read YN if [ "$YN" = "n" ]; then main else exit 0 fi
}
function clean-up { rm -R /tmp/install-chrome rm google-chrome-unstable_current_i386.deb }
function deps { #echo "Do you want to install BroknDodge's" #echo "home grown nspr package? (y/n)" #read YN #if [ "$YN" = "y" ]; then
# cd /tmp # wget -r -nH -nd http://downloads.sourceforge.net/project/file-butler/VectorLinux-Packages/nspr-#4.7.4-i586-1vl60vl60.tlz?use_mirror=voxel # installpkg nspr-4.7.4-i586-1vl60vl60.tlz # rm nspr-4.7.4-i586-1vl60vl60.tlz #fi echo "Do you want to install Connie's" echo "SlackWare mozilla-nss package? (y/n)" read YN if [ "$YN" = "y" ]; then
cd /tmp wget -r -nH -nd http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2/mozilla-nss-3.12.3-i486-1alien.tgz installpkg mozilla-nss-3.12.3-i486-1alien.tgz rm mozilla-nss-3.12.3-i486-1alien.tgz fi main }
function deb { echo echo echo "Are you sure you want to install" echo "Chrome from Deb? (y/n)" read YN if [ "$YN" = "n" ]; then main else rm -R /opt/google/chrome cd /tmp wget -r -nH -nd http://dl.google.com/linux/direct/google-chrome-unstable_current_i386.deb mkdir /tmp/install-chrome cd /tmp/install-chrome echo Unpacking the deb file... ar -x /tmp/google-chrome-unstable_current_i386.deb echo Extracting Google Chrome... lzma -d data.tar.lzma cd / echo Installing Google Chrome... echo Password may be required tar xf /tmp/install-chrome/data.tar fi dowhat #echo #echo #echo "Do you want me to clean up? (y/n)" #echo #read YN #if [ "$YN" = "y" ]; then # echo Cleaning up my mess... clean-up #else # echo You will have to manually # echo remove /tmp/install-chrome before # echo Next Install!!! #fi
echo Installation complete! echo Just type google-chrome quit
}
function buildbot { echo echo echo "Are you sure you want to install" echo "Chrome from the Buildbot? (y/n)" read YN if [ "$YN" = "n" ]; then main else
rm -R /opt/chrome-linux mkdir /tmp/chromium-buildbot cd /tmp/chromium-buildbot wget -r -nH -nd http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/LATEST
#Open file for reading to array exec 10< LATEST read BUILD <&10 echo Getting build number: $BUILD exec 10>&- rm LATEST wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/$BUILD/chrome-linux.zip unzip -d /opt/ chrome-linux.zip cd /tmp rm -R /chromium-buildbot fi echo Installation complete! cd /opt/chrome-linux echo just type ./chrome quit }
function main { echo echo WARNING WARNING WARNING WARNING WARNING echo This script may severely damage your system!!! echo Don't sat I didn't WARN you! echo echo Which Version of Chrome Do you want to install? echo select i in Dependencies Debian Buildbot Simlinks Quit do [ "$i" = "Dependencies" ] && deps [ "$i" = "Debian" ] && deb [ "$i" = "Buildbot" ] && buildbot [ "$i" = "Simlinks" ] && dowhat [ "$i" = "Quit" ] && quit done }
main quit
|
|
|
|
« Last Edit: August 04, 2009, 11:26:58 am by brokndodge »
|
Logged
|
|
|
|
brokndodge
Member

Posts: 83
Linux is sooo HOT
|
 |
« Reply #17 on: August 04, 2009, 08:24:36 pm » |
|
as promised, here's an update script. truth be told you could probably install from this script as well. but, then you wouldn't have the dependency install feature that i included in my other script. i know, it's just not the VectorLinux way. but i had to do it myself and my box isn't powerful enough to even build the required nss package. ok, so i figured out what debian's apt was asking for from the google repo. managed to hack together a lil script to ask for the same thing. it also checks to see if the version in the google repo is the same as the one installed locally. i included a few other minor checks as well, just to reduce the number of error's that appear on the screen. here it is (with the usual warning: this script must be run as root, always be careful when running a script as root): #!/bin/bash # Title: update-chrome # Author: BroknDodge # License: BSD # Version: 0.0.1
# http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz # http://dl.google.com/linux/deb/dists/pool/main/g/google-chrome-unstable/google-chrome-unstable_3.0.196.0-r22005_i386.deb
#----------------------------------------# # Settings
url="http://dl.google.com/linux/deb/" tmp="/tmp"
#----------------------------------------#
#----------------------------------------# # Testing the Environment
if [ $UID != 0 ];then # test for root echo "You must run this script as root." exit 0 fi
if [ ! -d "$tmp/update-chrome" ]; then # Will enter here if dir doesn't exist mkdir $tmp/update-chrome fi
cd $tmp/update-chrome
if [ -f "Packages" ]; then #checking to see if Packages exists mv Packages Packages.installed fi
#----------------------------------------#
function check-update { wget http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz gunzip Packages.gz
if [ ! -f "Packages.installed" ]; then update fi
version=`grep 'Version:' Packages` version=${version#*:} read -rd '' version <<< "$version"
VersionInstalled=`grep 'Version:' Packages.installed` VersionInstalled=${VersionInstalled#*:} read -rd '' VersionInstalled <<< "$VersionInstalled"
if [ "$version" == "$VersionInstalled" ]; then echo Google Chrome is Up to Date rm Packages quit else echo $VersionInstalled is installed, but $version is available echo Updating update fi
}
function update {
filename=`grep 'Filename:' Packages` # assign grep output to a variable filename=${filename#*:} read -rd '' filename <<< "$filename" # remove white space from a variable
mkdir tmp cd tmp wget $url$filename
rm -R /opt/google/chrome # get rid of the previous install # don't worry settings are stored in $HOME dir cd $tmp/update-chrome/tmp
echo Unpacking the deb file... ar -x ${filename##*/} echo Extracting Google Chrome... lzma -d data.tar.lzma cd / echo Updating Google Chrome...
tar xf $tmp/update-chrome/tmp/data.tar cd $tmp/update-chrome mv Packages Packages.installed VersionInstalled=`grep 'Version:' Packages.installed` filename=${VersionInstalled#*:} read -rd '' VersionInstalled <<< "$VersionInstalled" echo Google Chrome updated to version "$VersionInstalled" rm -R tmp
quit }
function quit { exit 0 }
function main { check-update }
main exit
I intend to make a version 0.0.3 of install-chrome.sh with some new checks and a lil cleaning of the code.
|
|
|
|
|
Logged
|
|
|
|
|
M0E-lnx
|
 |
« Reply #18 on: August 05, 2009, 07:30:37 am » |
|
Sorry man, I just tried your install script, and quite frankly it needs a lot of work Here are some things you might consider changing. First of all, don name a bash function "clean-up" the "-" trhows the shell off there, so it wont run. Consider something like cleanup or clean_up if you must have the space. I only tried your debian option, but failed within a split second. here are some hits. try the "deb2tgz" command in vectorlinux for converting a .deb to a .tgz package. Then, explode the .tgz Try it like this. You may still need to debug this, I haven't ran the code myself. function deb { echo echo echo "Are you sure you want to install" echo "Chrome from Deb? (y/n)" read YN if [ "$YN" = "n" ]; then main else rm -R /opt/google/chrome cd /tmp wget -r -nH -nd http://dl.google.com/linux/direct/google-chrome-unstable_current_i386.deb mkdir /tmp/install-chrome deb2tgz *.deb cd /tmp/install-chrome echo Unpacking the deb file... explodepkg ../google-*.deb echo Extracting Google Chrome... cd / echo Installing Google Chrome... echo Password may be required tar xf /tmp/install-chrome/data.tar # Not sure this is till needed. fi dowhat #echo #echo #echo "Do you want me to clean up? (y/n)" #echo #read YN #if [ "$YN" = "y" ]; then # echo Cleaning up my mess... clean-up #else # echo You will have to manually # echo remove /tmp/install-chrome before # echo Next Install!!! #fi
echo Installation complete! echo Just type google-chrome quit
}
|
|
|
|
|
Logged
|
|
|
|
|
Daniel
|
 |
« Reply #19 on: August 05, 2009, 07:45:04 am » |
|
Just noticed something in the above code. The command "deb2tgz" doesn't exist. It should be "/sbin/deb2targz".
|
|
|
|
|
Logged
|
The following sentence is true. The previous sentence is false.
VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM
|
|
|
|
M0E-lnx
|
 |
« Reply #20 on: August 05, 2009, 09:14:16 am » |
|
Yeah... that one 
|
|
|
|
|
Logged
|
|
|
|
brokndodge
Member

Posts: 83
Linux is sooo HOT
|
 |
« Reply #21 on: August 05, 2009, 09:50:53 am » |
|
the google-chrome deb file is packaged with lzma compression. when i tried alien or deb2targz, neither could handle the lzma compression. thats why i set it up in my script for manual install. if the deb option failed that quickly, which version of the script did you install from? edit: just took a close look at your patch, your running version 2 with wget. can you tell me exactly what point the script failed. i've been working on including some error handling and a few environment checks.
if you have nss>= 3.12.3 and the simlinks are already created, could you try using my new update script as the installer. it will pull directly from the google repository. please let me know how it goes. also if you could provide more detail regarding the failure point, i would appreciate that. it is still a work in progress and testing on a variety of machines is the most important part.
thank you for your input.
final edit: i just remembered, i may have had to "slapt-get --install lzma" before i could crack the deb package open. i'll add a test to the script for lzma capability.
|
|
|
|
« Last Edit: August 05, 2009, 10:29:37 am by brokndodge »
|
Logged
|
|
|
|
brokndodge
Member

Posts: 83
Linux is sooo HOT
|
 |
« Reply #22 on: August 05, 2009, 08:32:23 pm » |
|
so i've done a lot of work on my installation script. i did not follow a previous suggestion about using deb2targz. i prefer to do things manually if possible. i just added checks to make sure the deps were installed. it's possible some deps might be missing as i have not tried this on a fresh install. takes like 6 hours to install VL60 on this machine. soon as a couple of folks let me know this thing works for them, i'm going to post it to chromium. hopefully they can then add support for slackware and vectorlinux from their website. changelog: tests for the presence of lzma, if not present installs thru slapt-get tests for the presense of nss = 3.12.3, if not present installs from connie's slackware site. connie.slackware.com added a lot of tests and error points. i think every stage of the install now has a test and error message. that way we can tell exactly where things went wrong. removed almost all of the user prompts. the script still warns you that it's about to make some system changes as root. it also now checks to see if chrome has been installed, if so it will ask if you want to remove and reinstall chrome. checks for the existence of the simlinks. fixme: still need to follow the links to find out what they link to. added menu entry to any window manager that adhere's to the freedesktop.org specification. yes, there will now be a menu entry under xfce's menu under network. here it is: #!/bin/bash # Title: install-chrome # Author: BroknDodge # License: BSD # Version: 0.0.3 # # Special thanks to Vectorite Daniel for his help and suggestions. # Very Special thanks to the folks at Chromium.org and Google # without whom there wouldn't be anything to install #
#------------------------------------------# # Setting up the Environment
tmp="/tmp"
chromeURL="http://dl.google.com/linux/direct" chromePackage="google-chrome-unstable_current_i386.deb"
nssURL="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2" nssPackage="mozilla-nss-3.12.3-i486-1alien.tgz"
#------------------------------------------# # Making sure the system is sane
if [ $UID != 0 ]; then echo "You must run this script as root." exit 1 fi
if [ -d "$tmp/install-chrome" ]; then # check for and create temp dir # Will enter here if dir doesn't exist rm -R $tmp/install-chrome # hope you didn't have anything mkdir $tmp/install-chrome # stored there else mkdir $tmp/install-chrome fi
#------------------------------------------#
function DoTests {
echo Running tests... #------------------------------------------# # check for lzma
haveLZMA=`which lzma` # check for and getting lzma if [ "$haveLZMA" == "" ]; then slapt-get --install lzma fi
#------------------------------------------#
#------------------------------------------# # check for nss = 3.12.3
nssInstalled=`slapt-get --search nss-3.12.3` # I really need to check the version nssInstalled=${nssInstalled#*=} # as well, but this build seems to nssInstalled=${nssInstalled%]*} # work best with 3.12.3
if [ "$nssInstalled" != "yes" ]; then InstallNSS fi simlinks } #------------------------------------------#
function simlinks { cd /usr/lib if [ ! -f "libnspr4.so.0d" ]; then ln -s libnspr4.so libnspr4.so.0d fi
if [ ! -f "libnss3.so.1d" ]; then ln -s libnss3.so libnss3.so.1d fi
if [ ! -f "libnssutil3.so.1d" ]; then ln -s libnssutil3.so libnssutil3.so.1d fi
if [ ! -f "libplc4.so.0d" ]; then ln -s libplc4.so libplc4.so.0d fi
if [ ! -f "libplds4.so.0d" ]; then ln -s libplds4.so libplds4.so.0d fi
if [ ! -f "libsmime3.so.1d" ]; then ln -s libsmime3.so libsmime3.so.1d fi
if [ ! -f "libssl3.so.1d" ]; then ln -s libssl3.so libssl3.so.1d fi
InstallChrome }
function InstallNSS {
cd $tmp/install-chrome wget $nssURL/$nssPackage if [ ! -f "$nssPackage" ]; then echo For some reason wget didnt pull nss from Connie's echo slackware site!!! exit 1 fi installpkg $nssPackage
rm $nssPackage simlinks }
function InstallChrome {
cd $tmp/install-chrome wget $chromeURL/$chromePackage
if [ ! -f "$chromePackage" ]; then # quit running if wget failed echo Something went wrong while retrieving # and kick out a sane error msg echo Google Chrome!!! exit 1 fi
echo Unpacking the deb file... ar -x $tmp/install-chrome/$chromePackage
if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed echo Something went wrong while unpacking # and kick out a sane error msg echo the .deb file!!! exit 1 fi
echo Extracting Google Chrome... lzma -d data.tar.lzma if [ ! -f "data.tar" ]; then # quit running if lzma failed echo Something went wrong while extracting # and kick out a sane error msg echo Google Chrome!!! exit 1 fi
cd / echo Installing Google Chrome...
tar xf $tmp/install-chrome/data.tar if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't echo Installation failed while # installed correctly echo moving files!!! exit 1 else cp /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop echo Installation complete! echo Just type google-chrome quit fi }
function quit { exit 0 }
function main { echo echo WARNING WARNING WARNING WARNING WARNING echo This script may severely damage your system!!! echo Don't say I didn't WARN you! echo echo Are you sure you want me to Monkey with your System? [yes/no] echo [for your safety you must type "yes" to proceed] echo read YN if [ "$YN" = "yes" ]; then if [ -d "/opt/google/chrome" ]; then echo Looks like Google Chrome is already installed! echo Do you want to remove it and reinstall? [yes/no] read yn if [ "$yn" = "yes" ]; then rm -R /opt/google/chrome rm /usr/share/applications/google-chrome.desktop DoTests else quit fi else DoTests fi elif [ "$YN" = "no" ]; then quit else main fi quit }
main exit
|
|
|
|
|
Logged
|
|
|
|
|
stretchedthin
|
 |
« Reply #23 on: August 05, 2009, 10:50:34 pm » |
|
Howdy, I gave the script a whirl. Really do think it would be a win for Vector to be able to offer Google Chrome and this is taking things in that direction. First run of the script resulted in an error. I think it has to do with function InstallNSS function InstallNSS {
cd $tmp/install-chrome wget $nssURL/$nssPackage if [ ! -f "$nssPackage" ]; then echo For some reason wget didnt pull nss from Connie's echo slackware site!!! exit 1 fi installpkg $nssPackage
For some reason it downloads the package to $tmp/install-chrome, but it does not install it afterwards. So no biggy, I changed directories into /tmp/install-chrome and I did the installpkg myself. Then ran the script again. It moved further along but resulted in.... Running tests... ./chrome: line 99: InstallChrome: command not found
Well I figured for some reason the InstallChrome function wasn't being seen or recognized so I just copied the function code and needed variables into a second script and ran it separately. #!/bin/bash
tmp="/tmp"
chromeURL="http://dl.google.com/linux/direct" chromePackage="google-chrome-unstable_current_i386.deb"
cd /tmp/install-chrome wget http://dl.google.com/linux/direct/google-chrome-unstable_current_i386.debcd
if [ ! -f "$chromePackage" ]; then # quit running if wget failed echo Something went wrong while retrieving # and kick out a sane error msg echo Google Chrome!!! exit 1 fi
echo Unpacking the deb file... ar -x $tmp/install-chrome/$chromePackage
if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed echo Something went wrong while unpacking # and kick out a sane error msg echo the .deb file!!! exit 1 fi
echo Extracting Google Chrome... lzma -d data.tar.lzma if [ ! -f "data.tar" ]; then # quit running if lzma failed echo Something went wrong while extracting # and kick out a sane error msg echo Google Chrome!!! exit 1 fi
cd / echo Installing Google Chrome...
tar xf $tmp/install-chrome/data.tar if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't echo Installation failed while # installed correctly echo moving files!!! exit 1 else cp /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop echo Installation complete! echo Just type google-chrome quit fi exit
This time success!! I now have Google Chrome, and it is sooooooooo much faster then when I was running it under crossover. Hope my detail helps you shake the last couple of bugs out.
|
|
|
|
|
Logged
|
|
|
|
|
uelsk8s
|
 |
« Reply #24 on: August 06, 2009, 05:27:43 am » |
|
I had to enclose all the text in quotes after the echo's to get it to work here
|
|
|
|
|
Logged
|
|
|
|
|
M0E-lnx
|
 |
« Reply #25 on: August 06, 2009, 05:32:38 am » |
|
I really wanted to try this again, but I'm to lazy to be jacking with the script. I might just do it manually some time, just for giggles. I was not too impressed with crossover chrome, but want to check this out
|
|
|
|
|
Logged
|
|
|
|
|
uelsk8s
|
 |
« Reply #26 on: August 06, 2009, 05:37:23 am » |
|
to add flash: as root mkdir /opt/google/chrome/plugins cp -ax /usr/lib/mozilla/plugins/libflashplayer.so /opt/google/chrome/plugins/ then run it with: google-chrome --enable-plugins
|
|
|
|
|
Logged
|
|
|
|
|
M0E-lnx
|
 |
« Reply #27 on: August 06, 2009, 06:15:13 am » |
|
Changed my mind and did it manually using the steps outlined in the script.
here is a couple of suggestions for the script. chrome needs GConf installed, have it check for libgconf. clean up the bash code. look for the flash plugin, and install it if present.
|
|
|
|
|
Logged
|
|
|
|
|
M0E-lnx
|
 |
« Reply #28 on: August 06, 2009, 06:19:21 am » |
|
Is it just me, or does the thing not close when you click the X on the top-right corner (window decoreation)?
|
|
|
|
|
Logged
|
|
|
|
|
Daniel
|
 |
« Reply #29 on: August 06, 2009, 07:01:46 am » |
|
stretchedthin: was this the order that you ran the scripts and stuff?
Run brokndodge's script. Do manual installpkg. Run stretchedthin's script.
I would also like to get Google Chrome and I wanted to make sure of the order you did things in.
brokndodge: I am not completely sure but capitalized functions might not work in scripts.
|
|
|
|
|
Logged
|
The following sentence is true. The previous sentence is false.
VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM
|
|
|
|