LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-20-2015, 06:12 PM   #1
neymac
Member
 
Registered: May 2009
Distribution: Slackware64-14.1
Posts: 138

Rep: Reputation: 19
Angry Latest-firefox ruari's script broken due change Firefox download site


Firefox changed the site where the latest firefox is and the script latest-firefox developed by Ruari Oedegaard shows "Could not work out the latest version".

README.txt (from firefox):
Quote:
Please use download.mozilla.org to retrieve the latest Firefox release.

For example, if you wish to download the US English installer for Windows (32bit)
the url is
https://download.mozilla.org/?produc...win&lang=en-US

This could be pasted into the location bar of a browser, or used with curl or wget, e.g.
wget -O FirefoxSetup.exe "https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US"

For other operating systems replace 'os=win' with:
Windows 64bit os=win64
OS X os=osx
Linux x86_64 os=linux64
Linux i686 os=linux

For other languages replace 'lang=en-US' with:
Acholi lang=ach
Afrikaans lang=af
Albanian lang=sq
Arabic lang=ar
....

Last edited by neymac; 11-20-2015 at 06:20 PM.
 
Old 11-21-2015, 02:04 PM   #2
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
I did a quick three line fix that seems to work on my 14.1 64 bit system, you can try replacing the following lines.

Code:
70c70
< VERSION=${VERSION:-$(wget -qO- http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$FFCHANNEL/linux-$ARCH/$FFLANG/ | sed -nr 's|.*>firefox-(.*)\.tar\.bz2</a>.*|\1|p')}
---
> VERSION=${VERSION:-$(curl -s "https://download.mozilla.org/?product=firefox-${FFCHANNEL}&os=linux${LIBDIRSUFFIX}&lang=${FFLANG}" | awk -F/ '{print $7}')}
101c101
< FIREFOXPKG=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-$ARCH/$FFLANG/firefox-$VERSION.tar.bz2
---
> FIREFOXPKG="https://download.mozilla.org/?product=firefox-${FFCHANNEL}&os=linux${LIBDIRSUFFIX}&lang=${FFLANG}"
165c165
<   wget -P "$REPACKDIR/src" $FIREFOXPKG
---
>   wget -O "$REPACKDIR/src/firefox-$VERSION.tar.bz2" $FIREFOXPKG
 
4 members found this post helpful.
Old 11-21-2015, 03:51 PM   #3
lukameen
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 69

Rep: Reputation: 31
Thanks, speck. That fix worked for me too.
 
Old 11-21-2015, 04:59 PM   #4
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware, VMs
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
neymac,

Perhaps you could send a PM to ruario and let him know? He does excellent work for our community.
 
1 members found this post helpful.
Old 11-21-2015, 05:58 PM   #5
neymac
Member
 
Registered: May 2009
Distribution: Slackware64-14.1
Posts: 138

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by hitest View Post
neymac,

Perhaps you could send a PM to ruario and let him know? He does excellent work for our community.
I know he does indeed. I don't know how to send private message to Ruario, I don't have his address.

@speck:> Thanks for the fix, it worked fine.

Last edited by neymac; 11-21-2015 at 06:26 PM.
 
1 members found this post helpful.
Old 11-21-2015, 07:23 PM   #6
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,308

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
Quote:
Originally Posted by hitest View Post
neymac,

Perhaps you could send a PM to ruario and let him know? He does excellent work for our community.
I tried to PM him this thread. Thanks speck.
 
1 members found this post helpful.
Old 11-23-2015, 04:03 AM   #7
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Hi, sorry I missed all this and have not been using Firefox much for the last few months so did not encounter the problem myself. Thanks in particular to speck for quickly posting a working fix and glorsplitz fr pinging me.

I have updated the Gist on GitHub. I went with a slight variation from speck as I want the script to handle ESR and would prefer only use one download utility—Wget or cURL are both fine but I would prefer the script was reliant on only one of them.

Code:
2c2
< # latest-firefox Version 1.2
---
> # latest-firefox Version 1.3
61c61
<   FFCHANNEL=latest-esr
---
>   FFCHANNEL=esr-latest
70c70
< VERSION=${VERSION:-$(wget -qO- http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$FFCHANNEL/linux-$ARCH/$FFLANG/ | sed -nr 's|.*>firefox-(.*)\.tar\.bz2</a>.*|\1|p')}
---
> VERSION=${VERSION:-$(wget --spider --max-redirect 0 "https://download.mozilla.org/?product=firefox-${FFCHANNEL}&os=linux${LIBDIRSUFFIX}&lang=${FFLANG}" 2>&1 | sed -n '/^Location:/s/.*\/firefox-\(.*\)\.tar\.[bx]z2\{0,1\} .*/\1/p')}
101c101
< FIREFOXPKG=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-$ARCH/$FFLANG/firefox-$VERSION.tar.bz2
---
> FIREFOXPKG="https://download.mozilla.org/?product=firefox-${FFCHANNEL}&os=linux${LIBDIRSUFFIX}&lang=${FFLANG}"
165c165
<   wget -P "$REPACKDIR/src" $FIREFOXPKG
---
>   wget --trust-server-names -P "$REPACKDIR/src" $FIREFOXPKG

Last edited by ruario; 11-23-2015 at 05:24 AM. Reason: added in a diff for the curious; added back in mdash that went missing during quick edit
 
3 members found this post helpful.
Old 11-23-2015, 04:12 AM   #8
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
One annoying thing with using a URL that is constructed with the download.mozilla.org download links is that you can't just redefine the variable VERSION to fetch an old package any more. You would need to download the package first and place it in the directory you are running the script from, in addition to redefining that variable. I'm sure that is fixable but I am not sure I can be bothered right now. Maybe when I get bored!
 
Old 11-23-2015, 04:44 AM   #9
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by ruario View Post
One annoying thing with using a URL that is constructed with the download.mozilla.org download links is that you can't just redefine the variable VERSION to fetch an old package any more. You would need to download the package first and place it in the directory you are running the script from, in addition to redefining that variable. I'm sure that is fixable but I am not sure I can be bothered right now. Maybe when I get bored!
Ok, actually that is easily handled. Another update. The key bit being:

Code:
< FIREFOXPKG="https://download.mozilla.org/?product=firefox-${FFCHANNEL}&os=linux${LIBDIRSUFFIX}&lang=${FFLANG}"
---
> FIREFOXPKG=http://download.cdn.mozilla.net/pub/firefox/releases/$VERSION/linux-$ARCH/$FFLANG/firefox-$VERSION.tar.bz2
 
2 members found this post helpful.
Old 11-23-2015, 05:19 AM   #10
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by ruario View Post
One annoying thing with using a URL that is constructed with the download.mozilla.org download links is that you can't just redefine the variable VERSION to fetch an old package any more.
I was wrong, you can but I need to use product=firefox-${VERSION} and not product=firefox-${FFCHANNEL} for the download link. So another edit to go back to using download.mozilla.org/? for FIREFOXPKG, as it is more likely to result in a secure (https) download and yet you can still download a specific version.

Last edited by ruario; 11-23-2015 at 07:11 AM.
 
Old 11-23-2015, 10:40 AM   #11
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
Thanks Ruari, I've switched back to your official version.
 
Old 11-23-2015, 04:47 PM   #12
neymac
Member
 
Registered: May 2009
Distribution: Slackware64-14.1
Posts: 138

Original Poster
Rep: Reputation: 19
Thanks Ruari.

PS: By the way, after read the latest-firefox script I saw that you are now working on Vivaldi and I tried the beta version of the vivaldi browser. It is very fast, when will we have a "latest-vivaldi" script for slackware?

Last edited by neymac; 11-24-2015 at 07:32 PM.
 
  


Reply

Tags
firefox



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Firefox 21 and Ruario's latest-firefox script neymac Slackware 14 12-19-2013 10:25 PM
download issue from youtube site using Firefox addon download helper ubume2 General 0 09-27-2011 07:51 AM
Millions download latest Firefox browser Jeebizz Linux - News 11 03-25-2011 08:22 AM
Broken download with firefox liamkincaid25 Linux - Newbie 4 07-22-2008 10:47 AM
Official download site for Firefox RPM Mic Q SUSE / openSUSE 3 03-31-2005 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration