Code Monkey home page Code Monkey logo

Comments (26)

Redsandro avatar Redsandro commented on July 3, 2024

Mentioned packages are now broken.

User d...@s...com sends the following message to the maintainers of Package 'classic-shell'.

No longer works, it seems fosshub has moved to a protected/expiring time link. The executable will have to be pulled from somewhere else now.

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

@TomOne I see you made the first commit of MkvToolNix. Can you help figure out how to cheat fosshub's policy (of making things less transparent and closing down downloads while profiting over the success of foss apps)? Maybe some regex trickery like we did in cnet.

from chocolatey-packages.

TomOne avatar TomOne commented on July 3, 2024

The mkvtoolnix and classic-shell packages are now fixed.

@Redsandro, you can look at the source files of the mkvtoolnix package to see how it is possible to download from fosshub.

from chocolatey-packages.

gep13 avatar gep13 commented on July 3, 2024

@TomOne can we close this issue?

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

Thanks @TomOne! 👍

I would like to apply this to LightAlloy player and pull it into auto updating core team repo. But no time at the moment.

In my opinion, this can stay open until I fixed LightAlloy and pulled it in. Also, I think we need to globalize the function to download from certain sources, so one fix applies to all packages. I think @ferventcoder does not plan to pick this up any time soon, seen as the issue arose in 2013, and I'm wondering if we can create helper packages that packages such as the 3 mentioned in this topic can depend upon.

from chocolatey-packages.

gep13 avatar gep13 commented on July 3, 2024

In my opinion, this can stay open until I fixed LightAlloy and pulled it in.

Okay dokay.

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

@TomOne what's happening here?

# In case you see \{\{DownloadUrlx64\}\} (without backslashes)
# after the commented lines, it’s intended.
  $genLinkUrlArray = {{DownloadUrlx64}}
  $url = Get-FosshubLinks $genLinkUrlArray[0]
  $url64 = Get-FosshubLinks $genLinkUrlArray[1]

How is my DownloadUrlx64 an array?
What to do if there is no 64bit version?
What's a genLink and where do I get it?

It's probably beautifully simple, but I'm not getting it.

PS C:\Users\IEUser> Get-FosshubLinks http://www.fosshub.com/Light-Alloy.html
Cannot index into a null array.
At line:3 char:30
+   $fosshubAppName = $Matches[ <<<< 1]
    + CategoryInfo          : InvalidOperation: (1:Int32) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

<!DOCTYPE html>
<html lang="en">
<head>

(followed by a html document)

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

@TomOne

Still haven't figured out what's going on with the DownloadUrlx64 array in your code, but I managed to use the module. Nice! 👍

#40

In my package I renamed this to Get-UrlFromFosshub. It makes sense to use similar name convention as I used in my previous helper extensions:

  • Get-UrlFromRegex (which is now in Chocolatey vCurrent)
  • Get-UrlFromCnet (which I wanted in Chocolatey vCurrent but @ferventcoder thought it should be a separate helper back in '13)

Anyway, a good way to use something that might get implemented into vCurrent or a helper - and might get updated without needing to renew the packages - is like so:

if (!(Get-Command Get-UrlFromFosshub -errorAction SilentlyContinue)) {
    Import-Module "$($pwd)\Get-UrlFromFosshub.ps1"
}
$url = Get-UrlFromFosshub $url

See https://github.com/chocolatey/chocolatey-coreteampackages/blob/d7bfe343c5b5698b26d587defcd9009301d09f55/automatic/lightalloy/tools/chocolateyInstall.ps1#L10-L14

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

Fosshub changed again?

See #64

We really should have helpers for this: chocolatey-archive/chocolatey#377

from chocolatey-packages.

TomOne avatar TomOne commented on July 3, 2024

Fosshub changed again?

See #64

No, that was just a package-related issue, see #64 (comment)

We really should have helpers for this: chocolatey-archive/chocolatey#377

Not sure about that. While it would certainly help to have less complicated install-scripts, there could be a significant delay until a new version of Chocolatey gets released that catches up when a change in such a download function is needed.

I think it would be better to keep such download functions in separate modules that can be updated independently of Chocolatey itself.

Thoughts?

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

Just a thought - what about installable helpers?
chocolatey -> helpers -> packages

from chocolatey-packages.

i-give-up avatar i-give-up commented on July 3, 2024

Hey guys, it seems like the Fosshub links are not working anymore. I'm getting "(403) Forbidden" error so it's not a scripting problem.

As such, packages that uses Fosshub links

  • mkvtoolnix
  • audacity
  • palemoon (ketarin was updated to not use fosshub but the change hasn't taken effect on current package yet)

fail to install.

Also, I see the ketarin for avidemux has been updated to use fosshub but the change hasn't taken effect on the current package yet.

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

The fosshub download page does this on download click:

    $(function () {
        $('.xlink').click(function () {
            var elem = $(this);
            $.ajax({
                type: "GET",
                url: "/updateStats/" + elem.attr('file'),
                success: function (data) {
                    if (data == 'alldone') {
                        window.location.href = elem.attr('data');
                    }
                }
            });
            return false;
        });
    });

I.e. this sends a request to:
"/updateStats/" + elem.attr('file') AKA
http://www.fosshub.com/updateStats/mkvtoolnix
and then it changes the location to:
elem.attr('data') AKA
http://download.fosshub.com/Protected/expiretime=1444570626;badurl=aHR0cDovL3d3dy5mb3NzaHViLmNvbS9NS1ZUb29sTml4Lmh0bWw=/746380211b8d20f1a005e6ce981ef454857dd0e14a2b2e48673da4b7aebc7ee6/MKVToolNix/mkvtoolnix-64bit-8.4.0-1-setup.exe

Obviously the last one is generated on pageview, but when I do these steps manually, I still don't get the download.

Maybe the link is only valid for a second. Someone should automate this in powershell, and keep in mind

$referer = "http://www.fosshub.com/[downloadlink]"
$webClient = New-Object System.Net.WebClient
$webClient.Headers.Add("Referer", $referer)

Also I still recommend adding these packages and let other packages depend on them:

  • choco-helper-fosshub
  • choco-helper-softonic

etc.

Fix one package to fix all packages with broken dependencies.

from chocolatey-packages.

i-give-up avatar i-give-up commented on July 3, 2024

It seems like I occasionally have to pass a captcha test (from Cloudflare) to get to any Fosshub page. I don't know if there's any way to bypass that.

from chocolatey-packages.

TomOne avatar TomOne commented on July 3, 2024

The packages which download files from Fosshub work fine for me. mkvtoolnix just had a package-related issue, because the author removed the 8.4.0 version from Fosshub and added 8.4.0-1 instead. Thus the package returned a 404 error.

It seems like I occasionally have to pass a captcha test (from Cloudflare) to get to any Fosshub page.

Really? I’ve never encountered a captcha when opening a Fosshub page. Perhaps the issue is related to your IP address.

We really should encourage software authors to not use that this 💩 FossHub service and instead switch to a more reasonable service like GitHub, which has no ads and doesn’t attempt to hamper automated downloads.

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on July 3, 2024

Did the capcha thing just start? I just implemented CloudFlare on Friday for chocolatey.org

from chocolatey-packages.

i-give-up avatar i-give-up commented on July 3, 2024

If you haven't seen it before, the captcha from CloudFlare looks like this.

I found this FAQ dated Jan 2015 about the captcha, so it definitely has been around for some time.

Really? I’ve never encountered a captcha when opening a Fosshub page. Perhaps the issue is related to your IP address.

Yeah, it's most likely IP-address-dependent.

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on July 3, 2024

Ah okay, it's from FossHub and not from https://chocolatey.org

from chocolatey-packages.

i-give-up avatar i-give-up commented on July 3, 2024

Okay, the Fosshub-genlink link works fine when I use a U.S. VPN.

No one seems to have raised this issue other than me, so maybe it's not a big deal?

from chocolatey-packages.

TomOne avatar TomOne commented on July 3, 2024

This issue doesn’t seems to require any more TODOs. Can it be closed?

from chocolatey-packages.

gep13 avatar gep13 commented on July 3, 2024

@TomOne I have been leaving this one open, as I have on my todo list to create a Chocolatey Extension package that other packages can take a dependency on, rather than each package including the current extra .ps1 file.

from chocolatey-packages.

wickles avatar wickles commented on July 3, 2024

I noticed the classic-shell package now uses a mediafire link. I opted not to install via chocolatey because of that, although I noticed since then that it is actually an 'official' mirror listed on the project webpage. Would it be possible to switch back to fosshub now? That seems to be their only proper official host.

from chocolatey-packages.

Redsandro avatar Redsandro commented on July 3, 2024

@wickles fosshub links seem to implement captcha for certain IPs and VPNs. So the downloads cannot be reliably automated.

from chocolatey-packages.

dtgm avatar dtgm commented on July 3, 2024

@Redsandro Just to clarify, fosshub uses CloudFlare, so it is CloudFlare implementing this restriction, and not something FossHub has control over AFAIK. Just something to keep in mind for other software distribution sites that may switch over to CloudFlare CDN.

@ferventcoder Because of ^^^, chocolatey packages should also be affected. I've seen CloudFlare captcha quite often when web browsing via Tor. Tor concentrates web traffic to specific IPs which subsequently get flagged as suspicious by CloudFlare. I haven't actually tested installing packages using chocolatey.org through tor though.

@wickles "fosshub [...] their only proper official host" seems to be a bit misleading given both distribution links are third party CDNs. The downside of using FossHub is what @Redsandro mentioned. The downside of mediafire is it could be from a free account and subject to limited bandwidth restrictions. I am not familiar with mediafire, but other cloud file services just cut off access to the account/file for the month if it exceeds an arbitrary bandwidth transfer threshold. So should that occur, that would be worse than FossHub/CloudFlare restriction. At this point MediaFlare wins because of KISS.

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on July 3, 2024

MediaFire has a bandwidth of a certain amount that rolls over each month (unused amounts). I don't remember all of the details but I have one of those.

CloudFlare has those captchas turned on by default, but you can adjust them. I had to adjust them for dot org.

from chocolatey-packages.

gep13 avatar gep13 commented on July 3, 2024

Calling this one down as well.

from chocolatey-packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.