Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-06-02 Thread David Spencer
Hi Arthur,

> How should an .info's MD5SUM field be treated for sources that may
> readily change (e.g., github URLs)?  My recollection is that sbopkg
> wasn't happy with blank ("") MD5SUM fields, although not being an sbopkg
> user myself, I don't know if this is still the case.

With Git (including Github, Bitbucket, mercurial, svn, etc), if there
isn't a tagged version then you would choose a specific commit, which
will download with the same MD5SUM every time.
e.g.
https://slackbuilds.org/slackbuilds/14.1/libraries/luasocket/luasocket.info

But for everything else --

If the copyright terms allow redistribution, you can grab a copy with
a known MD5SUM and make it available on your own website if you have
one, or some maintainers even use their own Dropbox, or there's Ryan's
SBo Direct Links on Sourceforge (just email me or Willy or Ryan if you
need to use that).
e.g.
https://slackbuilds.org/cgit/slackbuilds/tree/network/GeoIP/GeoIP.info

But if you're not allowed to redistribute it --

The only solution we have is to put a warning in the README :-(
e.g.
https://slackbuilds.org/repository/14.1/multimedia/google-talkplugin/

Hope this is helpful (well, almost helpful)
Best regards
-D.
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/



Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-06-02 Thread David Spencer
Hi Alexander,

Yes you are exactly right.

> wget 
> https://github.com/Microsoft/cpprestsdk/archive/v2.8.0/cpprestsdk-2.8.0.tar.gz

The first one "v2.8.0" is a git tag from the Github repository (see
the 'tags' or 'releases' page), but the second one "-2.8.0.tar.gz"
should not have "v".

Apparently the Github download code removes "v" from the tag when it
creates the archive.  This isn't documented anywhere so thanks for
working it out on your own :)

Best regards
-D.
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/



Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-06-02 Thread Arthur W. Green

On 14/05/16 10:35, David Spencer wrote:
> For maintainers, here's some advice about what to put in DOWNLOAD in
> the .info file for github URLs.

Thanks to both of you for working this out!

How should an .info's MD5SUM field be treated for sources that may
readily change (e.g., github URLs)?  My recollection is that sbopkg
wasn't happy with blank ("") MD5SUM fields, although not being an sbopkg
user myself, I don't know if this is still the case.

Excuse me if I missed the message where this was addressed.

\\ Arthur
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/



Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-06-02 Thread Alexander Verbovetsky
Hello,

On Sat, May 14, 2016, at 19:35, David Spencer wrote:
> Hi everybody,
> 
> For maintainers, here's some advice about what to put in DOWNLOAD in
> the .info file for github URLs.
> 
> NOTE: you don't need to change any of your existing files, this is
> just some general advice that we hope you will find helpful and
> interesting and useful. Also, this is not related to 14.2, it is
> actually some new advice about github that Heinz worked out yesterday
> :)
> 
> Hopefully, most of you know already that github is "clever" with
> download URLs. It uses an HTTP "content disposition" header to tell
> browsers the name of the archive that githib has dynamically created.
> But by default wget and curl do not use the "content disposition"
> header and use the last component of the URL as a filename. Therefore
> (until now) our SlackBuilds have needed to try both possible names for
> the download, e.g.
> 
> tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
> 
> So, here's the new advice: Heinz has worked out that if we use (for
> example)
> 
> DOWNLOAD="https://github.com/trizen/clyrics/archive/0.04/clyrics-0.04.tar.gz;
> 
> then the archive will *always* be named clyrics-0.04.tar.gz, even if
> we use wget or curl, and so we can just do the usual tar command in
> the SlackBuild:
> 
> tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
> 
> Apparently this will even work nicely for projects that include the
> project name in the git tag, e.g.
> 
> DOWNLOAD="https://github.com/christophgysin/pasystray/archive/0.5.2/pasystray-0.5.2.tar.gz;
> 
> so we can now stop using confusing and ugly commands like these:
> 
> rm -rf $PRGNAM-$PRGNAM-$VERSION
> tar xvf $CWD/$PRGNAM-$PRGNAM-$VERSION.tar.gz
> cd $PRGNAM-$PRGNAM-$VERSION
> 
> I hope this is helpful to you.  Thanks to Heinz for finally working
> out the right way of handling this!
> 
> Best regards to everybody
> -D.
> 
> ps. If I've made any mistakes above, corrections will be gratefully
> received :D

Apparently, there are some minor variations here, e.g.,

wget
https://github.com/Microsoft/cpprestsdk/archive/2.8.0/cpprestsdk-2.8.0.tar.gz

doesn't work (with ERROR 404: Not Found), but with additional letter "v"
before the version number, it works:

wget
https://github.com/Microsoft/cpprestsdk/archive/v2.8.0/cpprestsdk-2.8.0.tar.gz

Best regards,
Alexander
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/



Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-05-16 Thread Andrzej Telszewski

On 16/05/16 16:51, Philip Lacroix wrote:

Am 14.05.2016 18:35 schrieb David Spencer:

So, here's the new advice: Heinz has worked out that if we use (for
example)

DOWNLOAD="https://github.com/trizen/clyrics/archive/0.04/clyrics-0.04.tar.gz;


then the archive will *always* be named clyrics-0.04.tar.gz, even if
we use wget or curl, and so we can just do the usual tar command in
the SlackBuild


Thanks!

It might be worth to mention that this works also with commit-specific
downloads
(useful when there are no actual releases). For example:

https://github.com/unicap/ucview/archive/29bd93aeef0573c58c9aee665dc43fdfd1f77a1f/ucview-29bd93aeef0573c58c9aee665dc43fdfd1f77a1f.tar.gz



I was also looking at it, but I would prefer something like:
https://github.com/unicap/ucview/archive/29bd93aeef0573c58c9aee665dc43fdfd1f77a1f/ucview-git_%DATE_%HEAD.tar.gz

but couldn't find anything that would work in this manner.


___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/





--
Best regards,
Andrzej Telszewski
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/



Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-05-16 Thread Philip Lacroix

Am 14.05.2016 18:35 schrieb David Spencer:
So, here's the new advice: Heinz has worked out that if we use (for 
example)


DOWNLOAD="https://github.com/trizen/clyrics/archive/0.04/clyrics-0.04.tar.gz;

then the archive will *always* be named clyrics-0.04.tar.gz, even if
we use wget or curl, and so we can just do the usual tar command in
the SlackBuild


Thanks!

It might be worth to mention that this works also with commit-specific 
downloads

(useful when there are no actual releases). For example:

https://github.com/unicap/ucview/archive/29bd93aeef0573c58c9aee665dc43fdfd1f77a1f/ucview-29bd93aeef0573c58c9aee665dc43fdfd1f77a1f.tar.gz
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/



Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-05-14 Thread Doogster
Thank, David and Heinz. That's great.

On Sat, May 14, 2016 at 10:06 AM, Andrzej Telszewski
 wrote:
> On 14/05/16 18:35, David Spencer wrote:
>>
>> Hi everybody,
>>
>> For maintainers, here's some advice about what to put in DOWNLOAD in
>> the .info file for github URLs.
>>
>> NOTE: you don't need to change any of your existing files, this is
>> just some general advice that we hope you will find helpful and
>> interesting and useful. Also, this is not related to 14.2, it is
>> actually some new advice about github that Heinz worked out yesterday
>> :)
>>
>> Hopefully, most of you know already that github is "clever" with
>> download URLs. It uses an HTTP "content disposition" header to tell
>> browsers the name of the archive that githib has dynamically created.
>> But by default wget and curl do not use the "content disposition"
>> header and use the last component of the URL as a filename. Therefore
>> (until now) our SlackBuilds have needed to try both possible names for
>> the download, e.g.
>>
>> tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
>>
>> So, here's the new advice: Heinz has worked out that if we use (for
>> example)
>>
>>
>> DOWNLOAD="https://github.com/trizen/clyrics/archive/0.04/clyrics-0.04.tar.gz;
>>
>> then the archive will *always* be named clyrics-0.04.tar.gz, even if
>> we use wget or curl, and so we can just do the usual tar command in
>> the SlackBuild:
>>
>> tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
>>
>> Apparently this will even work nicely for projects that include the
>> project name in the git tag, e.g.
>>
>>
>> DOWNLOAD="https://github.com/christophgysin/pasystray/archive/0.5.2/pasystray-0.5.2.tar.gz;
>>
>> so we can now stop using confusing and ugly commands like these:
>>
>> rm -rf $PRGNAM-$PRGNAM-$VERSION
>> tar xvf $CWD/$PRGNAM-$PRGNAM-$VERSION.tar.gz
>> cd $PRGNAM-$PRGNAM-$VERSION
>>
>> I hope this is helpful to you.  Thanks to Heinz for finally working
>> out the right way of handling this!
>>
>> Best regards to everybody
>> -D.
>>
>> ps. If I've made any mistakes above, corrections will be gratefully
>> received :D
>
>
> Well appreciated!
>
>> ___
>> SlackBuilds-users mailing list
>> SlackBuilds-users@slackbuilds.org
>> http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
>> Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
>> FAQ - http://slackbuilds.org/faq/
>>
>>
>
>
> --
> Best regards,
> Andrzej Telszewski
>
> ___
> SlackBuilds-users mailing list
> SlackBuilds-users@slackbuilds.org
> http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - http://slackbuilds.org/faq/
>
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/



Re: [Slackbuilds-users] DOWNLOAD advice for github

2016-05-14 Thread Andrzej Telszewski

On 14/05/16 18:35, David Spencer wrote:

Hi everybody,

For maintainers, here's some advice about what to put in DOWNLOAD in
the .info file for github URLs.

NOTE: you don't need to change any of your existing files, this is
just some general advice that we hope you will find helpful and
interesting and useful. Also, this is not related to 14.2, it is
actually some new advice about github that Heinz worked out yesterday
:)

Hopefully, most of you know already that github is "clever" with
download URLs. It uses an HTTP "content disposition" header to tell
browsers the name of the archive that githib has dynamically created.
But by default wget and curl do not use the "content disposition"
header and use the last component of the URL as a filename. Therefore
(until now) our SlackBuilds have needed to try both possible names for
the download, e.g.

tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz

So, here's the new advice: Heinz has worked out that if we use (for example)

DOWNLOAD="https://github.com/trizen/clyrics/archive/0.04/clyrics-0.04.tar.gz;

then the archive will *always* be named clyrics-0.04.tar.gz, even if
we use wget or curl, and so we can just do the usual tar command in
the SlackBuild:

tar xvf $CWD/$PRGNAM-$VERSION.tar.gz

Apparently this will even work nicely for projects that include the
project name in the git tag, e.g.

DOWNLOAD="https://github.com/christophgysin/pasystray/archive/0.5.2/pasystray-0.5.2.tar.gz;

so we can now stop using confusing and ugly commands like these:

rm -rf $PRGNAM-$PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$PRGNAM-$VERSION

I hope this is helpful to you.  Thanks to Heinz for finally working
out the right way of handling this!

Best regards to everybody
-D.

ps. If I've made any mistakes above, corrections will be gratefully received :D


Well appreciated!


___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/





--
Best regards,
Andrzej Telszewski
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/