[Slackbuilds-users] system/dstat slackbuild cannot extract tarball

Arkadiusz Drabczyk arkadiusz at drabczyk.org
Sun Jul 28 19:28:54 UTC 2024


On 2024-07-28 12:56, Arkadiusz Drabczyk wrote:
> On 2024-07-28 12:44, Arkadiusz Drabczyk wrote:
>> On 2024-07-28 12:37, Arkadiusz Drabczyk wrote:
>>> $ wget 
>>> 'https://github.com/dstat-real/dstat/archive/refs/tags/v0.7.4.tar.gz'
>>> --2024-07-28 19:36:09--  
>>> https://github.com/dstat-real/dstat/archive/refs/tags/v0.7.4.tar.gz
>>> Resolving github.com (github.com)... 140.82.121.4
>>> Connecting to github.com (github.com)|140.82.121.4|:443... connected.
>>> HTTP request sent, awaiting response... 302 Found
>>> Location: 
>>> https://codeload.github.com/dstat-real/dstat/tar.gz/refs/tags/v0.7.4 
>>> [following]
>>> --2024-07-28 19:36:09--  
>>> https://codeload.github.com/dstat-real/dstat/tar.gz/refs/tags/v0.7.4
>>> Resolving codeload.github.com (codeload.github.com)... 140.82.121.10
>>> Connecting to codeload.github.com 
>>> (codeload.github.com)|140.82.121.10|:443... connected.
>>> HTTP request sent, awaiting response... 200 OK
>>> Length: unspecified [application/x-gzip]
>>> Saving to: ‘v0.7.4.tar.gz’
>>> 
>>> v0.7.4.tar.gz                                            [ <=>        
>>>                                                                       
>>>                                      ] 136.71K  --.-KB/s    in 0.08s
>>> 
>>> 2024-07-28 19:36:09 (1.72 MB/s) - ‘v0.7.4.tar.gz’ saved [139992]
>>> 
>>> $ sudo bash dstat.SlackBuild
>>> tar: /home/ja/slackbuilds/system/dstat/dstat-0.7.4.tar.gz: Cannot 
>>> open: No such file or directory
>>> tar: Error is not recoverable: exiting now
>>> tar: /home/ja/slackbuilds/system/dstat/0.7.4.tar.gz: Cannot open: No 
>>> such file or directory
>>> tar: Error is not recoverable: exiting now
>> 
>> OTOH this project is terminated so the package can be completely
>> removed https://github.com/dstat-real/dstat/issues/170.
> 
> I now found that tarballs have a different name when they are
> downloaded using Firefox but still the package can be removed.

But actually no, wait, it will not work in sbopkg with the default
settings:

     Processing dstat

     dstat:
     Found v0.7.4.tar.gz in /var/cache/sbopkg.
     Checking MD5SUM:
       MD5SUM check for v0.7.4.tar.gz ... OK
     Building package for dstat...
     tar: /var/lib/sbopkg/local/system/dstat/dstat-0.7.4.tar.gz: Cannot 
open: No such file or directory
     tar: Error is not recoverable: exiting now
     tar: /var/lib/sbopkg/local/system/dstat/0.7.4.tar.gz: Cannot open: 
No such file or directory
     tar: Error is not recoverable: exiting now

     dstat:
     Would you like to continue processing the rest of the
     queue or would you like to abort?  If this failed
     package is a dependency of another package in the queue
     then it may not make sense to continue.

     (Y)es to continue, (N)o to abort, (R)etry the build?:

Some slackbuilds try multiple tarball names and dstat does it too but
it uses incorrect name, it should be:

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

There is a similar problem in network/ngrep but this script is more
optimistic and does not try different tarballs:

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

It will not work with sbopkg neither.

And there is network/radicale/radicale.SlackBuild which tries 3
different tarball names including the version with `v` at the
beginning that dstat has missed but it isn't checked in $CWD:

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

so that will not work neither. Interestingly in this case wget gets a
correct filename even w/o using --content-disposition:

     $ wget 
https://github.com/Kozea/Radicale/archive/refs/tags/v3.1.8/radicale-3.1.8.tar.gz
     --2024-07-28 21:27:02--  
https://github.com/Kozea/Radicale/archive/refs/tags/v3.1.8/radicale-3.1.8.tar.gz
     Resolving github.com (github.com)... 140.82.121.3
     Connecting to github.com (github.com)|140.82.121.3|:443... 
connected.
     HTTP request sent, awaiting response... 302 Found
     Location: 
https://codeload.github.com/Kozea/Radicale/tar.gz/refs/tags/v3.1.8 
[following]
     --2024-07-28 21:27:02--  
https://codeload.github.com/Kozea/Radicale/tar.gz/refs/tags/v3.1.8
     Resolving codeload.github.com (codeload.github.com)... 140.82.121.10
     Connecting to codeload.github.com 
(codeload.github.com)|140.82.121.10|:443... connected.
     HTTP request sent, awaiting response... 200 OK
     Length: unspecified [application/x-gzip]
     Saving to: ‘radicale-3.1.8.tar.gz’

     radicale-3.1.8.tar.gz                                    [ <=>       
                                                                          
                                    ] 133.91K  --.-KB/s    in 0.08s

     2024-07-28 21:27:02 (1.69 MB/s) - ‘radicale-3.1.8.tar.gz’ saved 
[137123]

-- 
Arkadiusz Drabczyk <arkadiusz at drabczyk.org>


More information about the SlackBuilds-users mailing list