[Slackbuilds-users] Content Disposition part 2
Andrew Payne
phalange at komputermatrix.com
Sat Apr 30 21:24:07 UTC 2022
D & B, it's the script I just took over for Sakura.
https://github.com/dabisu/sakura/tags
I'm sure there's a bespoke url that can be crafted, but I was curious
about a more generic solution to a problem that pops up a lot.
I can't visualize how the || "if" statement would cause trouble, but I
accept it if this is not the right fix.
In my experience, tweaking the url must be done by hand and is thus prone
to typos.
For example, my NC url had this typo:
https://github.com/nextcloud/desktop/archive/refs/tags/v3.4.3/desktop-3.4.4.tar.gz
(see the mismatched versions) and the 3.4.3 version was downloaded with no
error. (?) Copy-paste from github tarball urls is mostly fool proof.
As for my sakura slackbuild, the tarball naming is "sakura-SAKURA_3_8_5",
which is silly so I did this:
SRCNAM = SAKURA_3_8_5
[...]
tar xvf $CWD/$PRGNAM-$SRCNAM.tar.gz || tar xvf $CWD/$SRCNAM.tar.gz
mv $TMP/$PRGNAM-$SRCNAM $TMP/$PRGNAM-$VERSION
[...]
>
>
> On Sat, 30 Apr 2022, Andrew Payne wrote:
>
>> Hi all, revisiting the Github tarball 'content disposition' problem.
>>
>> While manually tweaking the tarball url to
>>
>> https://github.com/DEVELOPER/PRGNAM/archive/refs/tags/vVERSION/PRGNAM-VERSION.tar.gz
>>
>> works, I have a case where the devs use underscores instead of dots and
>> I
>> cannot seem to get a workable url with the above.
>
> Can you show us the actual URL you're having problems with?
>
>> tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
>>
>> This means I can copy paste the Github tarball url into the *.info file,
>> and it matters not how the user downloads it.
>>
>> Thoughts?
>
> That will work, but it's suboptimal. If there's no other way to get a
> consistent filename, it'll have to be done that way.
>
> But it can cause problem for automated tools that people use to
> download the file and check its md5sum. It can also cause problems
> for the SBo source archive: https://slackware.uk/sbosrcarch/
>
> You might want to host the file on a different web server, if you have
> one handy.
>
More information about the SlackBuilds-users
mailing list