Commit Graph

93 Commits

Author SHA1 Message Date
tsteven4
a1ffb938a8 fix regression "check packaging" 2024-11-28 11:43:16 -07:00
tsteven4
8301064868 get --modules and --long-modules working with 6.8.0+ extensions 2024-11-28 10:22:56 -07:00
Hiroshi Miura
039209530d Merge pull request #826 from miurahr/topic/miurahr/fix-win64-llvm-mingw
Some checks failed
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.7.3) (push) Has been cancelled
Check tox tests, lint and types / Check packaging 📦 (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Publish Python 🐍 distributions 📦 to PyPI / Build and publish Python 🐍 distributions 📦 to PyPI (push) Has been cancelled
Test on GH actions environment / test (binary, windows-latest, 3.12, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.8.0) (push) Has been cancelled
bug: fix error when instaling win64_llvm_mingw / Qt 6.7 and 6.8
2024-10-12 19:11:19 +09:00
J.D. Purcell
44ee2e8a8c fix: installation of 6.8 win64_msvc2022_arm64_cross_compiled 2024-10-10 08:49:25 -04:00
Dave Dalcino
ff4fef3d1c black 2024-10-06 14:17:43 -07:00
Hiroshi Miura
7371504db1 Update aqt/metadata.py 2024-10-06 10:33:08 +09:00
Hiroshi Miura
7cfd15a585 fix: arch_dir of win64_llvm_mingw
- set arch_dir to be llvm_mingw_64

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-10-06 09:52:09 +09:00
Hiroshi Miura
7ad738b3a0 style: apply black
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-06-21 03:16:59 +09:00
Hiroshi Miura
b8f7ed69c1 feat: support list Qt 6.8.0 windows_arm64
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-06-20 21:15:13 +09:00
Hiroshi Miura
6f2f085fdb feat: support list Qt 6.8.0
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-06-20 20:11:13 +09:00
Andrew Wason
f049a82d9d Override host/target for src/docs if Qt >= 6.7.0 (#776)
* Override host/target for src/docs if Qt >= 6.7.0

Fixes https://github.com/miurahr/aqtinstall/issues/775
2024-05-05 09:28:02 +09:00
Hiroshi Miura
799fcfb026 fix: type error on type definition
commit d0603a25 has error in type definition for mypy.
It causes ‘type’ object is not subscriptable error.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-04-13 17:40:25 +09:00
Andrew Wason
1615782c25 Fixes and tests. Untested Azure pipeline support. 2024-03-05 18:37:15 -05:00
Andrew Wason
d0603a2555 Handle linux desktop arm64 arch with Qt 6.7.0 via new linux_arm64 host.
Top level directories are `qtsdkrepository/linux_x64` or `qtsdkrepository/linux_arm64`
qtsdkrepository files are suffixed with `.linux_gcc_64` or `.linux_gcc_arm64`
Installation directory is `gcc_64` or `gcc_arm64`
2024-03-05 09:55:10 -05:00
David Dalcino
4994594112 fix generate_combinations issue with Linux Qt 6.7 (#756)
* fix generate_combinations issue with Linux Qt 6.7

Qt 6.7.0 changes the default arch for Linux from gcc_64 to linux_gcc_64.
This allows the generate_combinations.py script to account for that.

Also, Qt 6.7.0 is missing a few architectures that were present in
earlier versions of Qt6. This makes sure that the script can pick those
up.

* black (v 24.1.1)

New version of black formats metadata.py differently than before
2024-02-10 12:24:00 +09:00
Cyril Margorin
5229003ec8 Fix issue #731
Make base_url argument optional with default to None and replace it with
Settings.baseurl if it is None (standard optional argument procedure)
2023-11-10 10:33:51 +03:00
lebarsfa
612dc7ba91 Add ignore_hash option in settings.ini (#684)
* Settings: add an option to skip checksum verification on Updates.xml

This allows aqt to work even when the server download.qt.io is
unreachable.

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>

* Update settings.ini

* Correct option to skip checksum verification

* Rename ignore_hash option to INSECURE_NOT_FOR_PRODUCTION_ignore_hash

* Update doc about INSECURE_NOT_FOR_PRODUCTION_ignore_hash

* Add hash_algorithm option

* Unofficial mirrors might not provide any hash for Updates.xml

* docs: update configuration.rst

express default value of hash_algorithm

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* fix: hashlib constructor with usedforsecurity=False

- Python 3.9 and later introduce a keyword argument ``usedforsecurity``
- Set to False because we use hash to check file integrity not for password hash.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Attempt to fix parameter type inconsistency in downloadBinaryFile

---------

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Co-authored-by: Alberto Mardegan <mardy@users.sourceforge.net>
Co-authored-by: Hiroshi Miura <miurahr@linux.com>
2023-11-06 07:29:03 +09:00
Dave Dalcino
5c2c18d96b Fix installation of win64_msvc2019_arm64 arch
This fixes the behavior of the `--autodesktop` flag and the updater,
when installing win64_msvc2019_arm64 for desktop targets.
2023-09-06 18:09:02 -07:00
LuK1337
27fb2b3339 Add support for standalone sdktool installation
This allows us to install sdktool using the following command:
aqt install-tool windows desktop sdktool
2023-05-16 20:55:48 +02:00
Dave Dalcino
d47d99d14b Impl resilience to missing wasm Updates.xml files
Allows MetadataFactory to produce a list of architectures when the
standard Updates.xml file is present, but the expected wasm Updates.xml
file is not.
2023-02-11 14:08:36 -08:00
Dave Dalcino
dc9c1e6798 Add support for qt 6.5.0 wasm 2023-02-06 16:51:16 -08:00
Dave Dalcino
dfa6733a0b Make MetadataFactory.fetch_versions more readable 2022-11-21 07:34:46 +09:00
Hiroshi Miura
1dbd73450a Adjust code scanner warnings
- Replace map+filter and list+filter with list comprehension expression
- Use try/except for next(Iterator)
- Add test case for altlink that cause exception on next() in get_altlink
- Avoid exit but use sys.exit

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2022-11-21 07:34:45 +09:00
Dave Dalcino
452f8d74b2 Fix mypy type errors
- Introduce classes inherit argparse.ArgumentParser to suppress mypy
  errors in Cli class.
- `requests.session.Session.get()` expects that `timeout` is `float | tuple[float, float] | tuple[float, None] | None`
  so use `Tuple[float, float]` for timeout
- Use named tuple for modules_query
- Update test_list.py
2022-11-21 07:34:45 +09:00
Dave Dalcino
81eebde168 Adjust against mypy type errors 2022-11-20 15:20:27 +09:00
Dave Dalcino
c90b262984 remove extensions from ArchiveId 2022-11-16 16:14:55 -08:00
Dave Dalcino
caee04bcb3 Remove extensions 2022-11-16 16:14:54 -08:00
Dave Dalcino
cdf45d4810 Remove NotImplementedError footgun 2022-10-10 22:57:21 -07:00
Dave Dalcino
703f2d2fe3 rework logic for readability 2022-08-20 09:09:23 -07:00
Dave Dalcino
85eee1a938 Refactor: move Qt repo properties to QtRepoProperty
Move default_desktop_arch_dir & dir_for_version to QtRepoProperty
2022-08-20 09:04:52 -07:00
Dave Dalcino
f0a48068ba Add function to select default installed mingw architecture 2022-08-20 07:52:56 -07:00
Dave Dalcino
910159f618 Add function to choose default desktop architecture 2022-08-20 07:52:39 -07:00
Hiroshi Miura
d30618791c Merge pull request #547 from ddalcino/list-qt-desc-modules
Add `aqt list-qt --long-modules`
2022-08-12 22:57:04 +09:00
Dave Dalcino
f407cfe37b Implementation for aqt list-qt --long-modules 2022-08-08 17:49:05 -07:00
Dave Dalcino
9bc8b553ee Refactor ToolData into reusable TableMetadata class 2022-08-08 17:41:11 -07:00
Dave Dalcino
9422b9fc67 Make MetadataFactory respect baseurl set in arguments 2022-08-07 11:27:31 -07:00
mite-user
5cba0178a9 Properly retrieve folder names from html pages of all mirrors
"list-*" command needs to get a list of folder names from the html page.
The original code tries to get those folder names
from the second "<td>" of the first "<table>".
Qt mirrors have different html layouts, so the code doesn't always work.

The new code tries to get folder names
from "href" attribute of "<a>" elements.
2022-07-21 18:37:10 +03:00
Dave Dalcino
e8672f3fbe Allow MetadataFactory to recover from bad HTML files
This change allows MetadataFactory.iterate_folders to recognize when
MetadataFactory has retrieved a malformed HTML file, or an HTML file
that does not contain the table and rows that it expects to see.

If the URL is correct, it should retrieve the right page, but this is
not guaranteed, and MetadataFactory should be able to recover and
generate an appropriate error message.

One possible situation where this kind of error might occur could be
when the user is connected to a public WIFI network, but not logged in.
The router would redirect aqt to the network login page, and aqt would
have no way of knowing that it did not receive the correct page.
Aqt should be resilient to this kind of error.
2022-04-19 18:26:21 -07:00
David Dalcino
dc45839df4 Fix implementation of helper.get_hash
Causes `get_hash` to verify the hash length, and check that the hash can
be unhexlified properly.

Fixes the interface for `get_hash` so that the caller does not have to
run `binascii.unhexlify` or verify its output.
2022-03-20 14:16:24 -07:00
David Dalcino
6bd438bcb1 Use secrets for secure random numbers 2022-03-10 17:35:30 -08:00
David Dalcino
5ad7c1a058 Use defusedxml to parse Updates.xml files
I don't think we can really call the `Updates.xml` files that we are
parsing 'untrusted xml', because we are checking that they match the
sha256 checksum. However, I don't think there's any good reason not to
use a more secure parsing algorithm.
2022-03-10 17:23:58 -08:00
David Dalcino
b62db9ee2a Allow MetadataFactory.fetch_http to skip sha256
`MetadataFactory.fetch_http` must often download HTML pages, not
Updates.xml files. download.qt.io does not store checksums for these
files, so this particular function must be allowed to download these
pages without using a checksum.
2022-03-06 18:16:37 -08:00
David Dalcino
5a7adb60cf Check hashes for xml files 2022-03-06 17:56:26 -08:00
David Dalcino
d6a6f79740 Prevent listing modules <= 40 bytes uncompressed
This prevents `list-*` from printing any module whose uncompressed size
is 40 bytes or less.

I have found a couple of modules that are exactly 40 bytes, and they
include no files, only empty directories. If any user tries to install
these modules, they will think that aqt failed to install the module
without printing any error message. I prefer to avoid this issue
by preventing `aqt list-*` from printing them.

`aqt install-*` is unaffected by this change, and it can still install
modules that contain no files. It is likely that we will need to print
a warning when this occurs.

If any user disagrees with the threshold value of 40 bytes, they are
free to adjust that value to their liking in `settings.ini`.
2021-11-26 14:04:10 -08:00
David Dalcino
e6cd276e20 Add impl of list-src/doc/examples 2021-11-23 11:08:11 -08:00
David Dalcino
a30bab6bc4 Add debug message when fallback url used 2021-10-27 22:28:24 -07:00
David Dalcino
7104dbcdf7 Merge remote-tracking branch 'upstream/master' into add-list-qt-archives 2021-09-20 18:49:46 -07:00
David Dalcino
f78013d361 Improve suggested follow-up for --modules flag 2021-09-17 16:14:49 -07:00
David Dalcino
5b29fec26d black 2021-09-17 15:09:09 -07:00
David Dalcino
64e38deda8 Add passing implementation of fetch_modules 2021-09-17 14:50:13 -07:00