| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This allows the image downloader to download files from restricted sources
using HTTP basic auth, specifying the credentials in the UHD_IMAGES_USER and
UHD_IMAGES_PASSWORD environment variables:
```
UHD_IMAGES_USER=lane UHD_IMAGES_PASSWORD=MyS3cretPassword uhd_images_downloader.py
```
|
|
|
|
|
| |
This parameter isn't used by any callers of the function. Additionally,
it doesn't actually change the default answer.
|
|
|
|
|
| |
This makes the utility warn the user when they pass a path argument that
is invalid; the utility falls back to defaults if this occurs.
|
|
|
|
|
|
| |
This complements b721621. In that commit, we directly go to HTTPS, but
in either case (direct or indirect) the --http-proxy command line
argument did not use the proxy for https.
|
|
|
|
|
|
|
| |
This changes two things in all applicable files:
- Remove imports from __future__
- Change default shebangs from /usr/bin/env python to /usr/bin/env
python3
|
|
|
|
|
|
|
|
| |
Since the webserver responding to requests at http://files.ettus.com
replies with a redirect to the same URL, but using the https://
transport, this isn't only the safer thing we should be doing, anyways,
but also the quicker, since it saves the user from one unnecessary
redirect.
|
|
|
|
|
|
| |
- Remove Python2 compat hacks
- Read the UHD_IMAGES_URL environment variable. If set, it overrides the
default value for --base-url
|
|
|
|
|
|
| |
If the content-length header is not available, uhd_images_downloader
will now ask the user if she wants to continue. Previously, the tool
would throw an exception.
|
|
|
|
|
|
|
|
|
|
| |
Prior to downloading any images, check that the images destination:
- Is a valid directory
- Has valid permissions for images to be written
Images are downloaded to a temporary location before being written to
image destination, so these checks help avoid situation where images are
downloaded but unable to be written
|
|
|
|
|
| |
Adding more details on uhd_images_downloader usage, as well as some
technical details.
|
|
|
|
|
|
|
|
|
|
| |
Change the uhd_images_downloader's first line to execute with a runtime
Python interpreter, as determined at UHD build time. Users can still
use an arbitrary Python executable by calling
`python uhd_images_downloader`
This will fix our embedded products by ensuring that we call Python3
when running uhd_images_downloader in embedded mode.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets the user specify a HTTP proxy. The environment variable
HTTP_PROXY is still usable, but --http-proxy will override it. Example:
$ uhd_images_downloader \
--http-proxy http://user:pass@10.20.30.40:3128 \
-t x310
Here, the tool will download all the images matching 'x310' using
a proxy at 10.20.30.40.
|
|
|
|
|
|
| |
This is effectively a refactoring: The main() function now returns True
on success. This fixes a bug where one branch would simply return (None)
instead of returning a value.
|
|
|
|
|
|
|
|
|
| |
If platform.system() is 'Windows', the Python script will stall on
error before terminating, e.g., when an import is missing or when an
unexpected Exception occurred during the execution.
The rationale is that many Windows users run this script directly,
without a shell, and wouldn't have a way to see error messages from the
script in that case.
|
|
|
|
|
|
|
| |
Since the uhd_images_downloader is so tightly integrated into our
infrastructure, we've dropped support for .tar.gz and .tar.xz file for
this particular purpose. Note that UHD releases still receive images in
all three formats.
|
|
|
|
|
| |
No functional changes. The main effort was to reduce the length of
main() and reduce the number of Pylint warnings.
|
|
|
|
|
|
| |
Note: All archives shipped using this tool are zip files. However, this
allows us to ship other types of files, which will be downloaded and
sorted into the images directory as-is.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This download limit prevents users from accidentally downloading really
large files. The default limit is 100 MiB. When a file is selected for
download that exceeds this size, the user is prompted if she really
wants to download that file.
By specifying --yes (or -y), this can can be bypassed. Example:
$ uhd_images_downloader --yes -t sdimg
Will match all files that match 'sdimg', which are typically larger than
100 MiB, without interaction.
|
|
|
|
|
|
|
|
|
| |
This will answer 'yes' to all questions that are asked and allows to
script the downloader. Example:
$ uhd_images_downloader -t sdimg -y
Any interaction that the script will have with the user will be skipped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running
$ uhd_images_downloader -l
will now print the full URL of the target. By specifying
$ uhd_images_downloader -l --url-only
It will *only* print the URLs, nothing else, making this suitable for
scripting. The list will always go to stdout, whereas the logging is
going to stderr and thus can easily be siphoned off.
|
| |
|
|
|
|
|
| |
Users can supply the --test/-T option to test the downloaded archive
before extracting it, using the Python zipfile.testzip() function.
|
|
|
|
|
| |
uhd_images_downloader: Adding INFO message when there is no target
selected to download, as when the user misspells a target name.
|
|
|
|
|
|
|
|
| |
uhd_images_downloader was mismanaging the image inventory- image
packages entries were not being deleted when the images were
overwritten. Now, each target is saved as a single entry in the
inventory, which is overwritten when a new image package is
downloaded.
|
|
|
|
|
|
|
|
|
|
|
|
| |
uhd_images_downloader now accepts multiple '--types' options, each of
which is a RegEx. Targets which match to all of the provided `types`
are downloaded.
Example usage:
`uhd_images_downloader -t n3xx -t fpga`
will match the following targets:
- n3xx_n310_fpga_default
- n3xx_n310_fpga_aurora
- n3xx_n300_fpga_default
|
|
|
|
|
|
| |
Targets in the manifest with SHA256 values of '0' will not be
verified. This will allow us to skip the verification for certain
image packages (ie. the filesystem).
|
|
|
|
| |
The image package is not unzipped or kept if the SHA256 checksum fails
|
| |
|
|
|
|
|
|
| |
This was forgotten in the transition to the new downloader. The command
line options --install-location will still override the env variable if
it exists.
|
| |
|
|
|
|
|
|
|
| |
All copyright is now attributed to "Ettus Research, a National
Instruments company".
SPDX headers were also updated to latest version 3.0.
|
|
|
|
|
| |
Adding SHA256 checking for downloaded image archives. The expected SHA
is read from the manifest, and checked after the download completes.
|
|
|
|
|
| |
When users supply the --keep argument, image archives are saved in the
images directory alongside the image files.
|
|
|
|
|
|
|
|
| |
Adding a message at the INFO log level (the default) to tell users
that downloads have begun. Also added the filename being downloaded
to the progress bars.
Reviewed-by: Martin Braun <martin.braun@ettus.com>
|
|
|
|
|
|
| |
Command line argument --dry-run is now available. This runs through
the downloader without actually downloading any files or editing the
inventory file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing structure of the files.ettus.com images directory, and
updating uhd_images_downloader correspondingly. The images downloader
now downloads a number of smaller archives of images, instead of one
large archive containing all of our images. Furthermore, the images
downloader maintains an inventory of currently installed images, so
that images are not redownloaded unnecessarily.
When called with no arguments, behavior should not change.
CMake variables are used to populate a number of fields in the images
downloader, including the contents of the manifest file.
Reviewed-by: Martin Braun <martin.braun@ettus.com>
Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Affects the uhd_images_downloader utility.
Older versions of requests didn't know the "stream" kwarg.
Added a compatibility fallback.
|
| |
|
| |
|
| |
|
|
|
|
| |
with older Pythons
|
| |
|
| |
|
|
|
|
| |
robust and user-friendly)
|
| |
|
| |
|
|
|
|
|
| |
* Better error handling
* Improved default download location logic
|