Commit Graph

80 Commits

Author SHA1 Message Date
5a02867d44 Added more URLs to account as good Classic repos 2024-11-07 12:58:38 +03:00
a6f5fd8c24 (ALT) Better parsing host from uri 2024-11-06 19:26:44 +03:00
bbceaa13d7 Test fixed according to correct suite check 2024-11-06 15:34:33 +03:00
284c483b6b Adapted repo file suite check for ALT 2024-11-06 15:27:38 +03:00
f5ef96d506 (ALT) Now files with .sisyphus (corresponds to README.sisyphus), .rpmnew and .rpmsave ignored during repo lists parsing 2024-11-01 12:40:58 +03:00
b945c8f6b7 Fix(tests): upstream tests after a merge request 2024-10-29 15:47:06 +03:00
35b1de18d0 Changed .toml deps to depend on Alt's crates with alt's feature 2024-10-28 15:37:45 +03:00
314e563210 Altlinux tests fixed according to changed API 2024-10-28 14:58:42 +03:00
c1ec0a7ee0 Some Traits and usings fixed 2024-10-28 13:57:45 +03:00
59d0e20da9 Applied "alt-linux" feature to cache api and proxmox-apt-api-types crate 2024-10-28 13:50:10 +03:00
f559a28390 Adapted supplementary structures (taken from Alexander Burmatov commits at git://git.altlinux.org/people/thatman/packages/proxmox.new.git) 2024-10-28 13:42:54 +03:00
235ed36f10 Initial merge with Alt's proxmox 2024-10-28 12:50:49 +03:00
56d7012996 Merge remote-tracking branch 'proxmox.new/altlinux' 2024-10-28 12:37:10 +03:00
Wolfgang Bumiller
d6e86d670b tree-wide: unify workspace inherited attributes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-20 08:42:45 +02:00
Maximiliano Sandoval
e60a53d80b apt: sources_parser: remove needless borrow
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-08-28 13:09:15 +02:00
Maximiliano Sandoval
f8f57540c6 apt: cache_api: simplify match with unwrap_or_default
Fixes:

warning: match can be simplified with `.unwrap_or_default()`
  --> proxmox-apt/src/cache_api.rs:77:28
   |
77 |           let mut notified = match cache.notified {
   |  ____________________________^
78 | |             Some(notified) => notified,
79 | |             None => std::collections::HashMap::new(),
80 | |         };
   | |_________^ help: replace it with: `cache.notified.unwrap_or_default()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
   = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-08-28 13:09:15 +02:00
Alexander Burmatov
4f4b172c71 Disable Deb-822 format for ALT
There is no need for the deb822-style format.
2024-08-21 17:56:31 +03:00
Alexander Burmatov
30de6a59f5 Add tests for ALT
1. New tests for ALT Linux.
2. Move test files for Debian to a separate directory.
2024-08-21 17:56:31 +03:00
Alexander Burmatov
5a53078041 Set correct filename for cached file 2024-08-21 17:56:31 +03:00
Alexander Burmatov
3891685a18 Change Repository option to Vendor option
Apt uses vendor ID (alt, p10 etc) in square brackets of the source lists.
2024-08-21 17:56:31 +03:00
Alexander Burmatov
b99a6ccd0b New APTRepositoryHandles
ALT Linux uses checkinstall, classic, debuginfo and gostcrypto.
2024-08-21 17:56:31 +03:00
Alexander Burmatov
89ace6a311 Add RPM package type 2024-08-21 17:37:25 +03:00
Alexander Burmatov
6d4d707935 Release like in ALT
Refactoring the code for correct /etc/os-release processing.
2024-08-16 19:14:11 +03:00
Alexander Burmatov
661c1e14af New feature alt-linux
A new feature that adds support for ALT Linux.
2024-08-15 21:09:34 +03:00
Wolfgang Bumiller
11e6173097 apt: bump to 0.11.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-14 11:48:32 +02:00
Maximiliano Sandoval
b01230f70c apt: remove unused dependencies
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-08-14 11:38:48 +02:00
Maximiliano Sandoval
7052972212 apt: clippy: don't clone types implementing Copy
Fixes the clippy warnings:

warning: `proxmox-apt` (lib) generated 1 warning
warning: using `clone` on type `Option<[u8; 32]>` which implements the `Copy` trait
   --> proxmox-apt/tests/repositories.rs:117:22
    |
117 |     let old_digest = file.digest.clone().unwrap();
    |                      ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `file.digest`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
    = note: `#[warn(clippy::clone_on_copy)]` on by default

warning: using `clone` on type `[u8; 32]` which implements the `Copy` trait
   --> proxmox-apt/tests/repositories.rs:135:24
    |
135 |     file.digest = Some(old_digest.clone());
    |                        ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `old_digest`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-08-07 20:58:04 +02:00
Maximiliano Sandoval
72ab48eb55 fix typos in rust api documentation
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-07-22 08:49:42 +02:00
Thomas Lamprecht
d1aa14eb71 apt: bump version to 0.11.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-07-17 11:39:46 +02:00
Thomas Lamprecht
f41664e087 workspace: bump dependency for apt-api-types to 1.0.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-07-17 10:07:43 +02:00
Dietmar Maurer
79f2b89d29 apt: updates for changed api (digest as array)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-17 09:50:29 +02:00
Wolfgang Bumiller
24210a3a86 apt: bump 0.11.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-11 14:50:54 +02:00
Wolfgang Bumiller
3479a9afe4 apt: bump version to 0.11.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-08 15:21:49 +02:00
Dietmar Maurer
75c62574c6 apt: avoid global apt config
Because it was only used for the test setup. Instead, we simply
add an apt_lists_dir parameter where we need it.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:17:10 +02:00
Dietmar Maurer
f451a643ae apt: add cache feature
Save/read package state from a file, and add the api functions to manipulate
that state.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:17:10 +02:00
Dietmar Maurer
f536a91b2f apt: use api types from apt-api-types crate
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:17:10 +02:00
Dietmar Maurer
e56e39185a apt: avoid direct impl on api types (use traits instead)
So that we can use api types from expternal crate proxmox-apt-api-types.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:17:10 +02:00
Wolfgang Bumiller
0652d81977 tree-wide: enable doc_cfg and doc_auto_cfg for docs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-02 11:59:53 +02:00
Fabian Grünbichler
f7a22604ae apt: update d/control
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Fabian Grünbichler
818ddf1283 bump proxmox-apt to 0.10.10-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Fabian Grünbichler
4126a83e05 apt: fix test output dir
under autopkgtest, the rundir is not writable, but cargo gives us a tmpdir that
we can use in all cases.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Fabian Grünbichler
6f532dfb7d various clippy fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Fiona Ebner
2c2497e5be fix #5513: apt: do not assume that sources.list file exists
Some users might want to switch to using only the newer .sources files
already, which Debian is going to switch to in the long run.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-06-06 11:06:41 +02:00
Fabian Grünbichler
42fb9ed26b fix #5249: apt: allow parsing Packages without Priority field
it seems there are repositories out there that don't (always) include
it, and while it is required for the .deb packages themselves in Debian,
the repository "spec" doesn't make it mandatory.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-19 08:47:34 +02:00
Fabian Grünbichler
f03f16d643 fix #5249: apt: allow parsing Packages without Priority field
it seems there are repositories out there that don't (always) include
it, and while it is required for the .deb packages themselves in Debian,
the repository "spec" doesn't make it mandatory.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-19 08:43:54 +02:00
Alexander Burmatov
279142df30 Fix warning
Variable does not need to be mutable
2024-03-02 02:59:35 +03:00
Wolfgang Bumiller
d7876b1837 bump proxmox-apt to 0.10.8-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:01 +01:00
Wolfgang Bumiller
1d6174d36d bump proxmox-apt to 0.10.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 15:59:59 +01:00
Dietmar Maurer
b57e1fb347 proxmox-apt: fix digest api type in APTRepositoryFile
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-12-04 09:39:54 +01:00
Dietmar Maurer
1859be3588 proxmox-apt: fix serde attributes for API types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-12-02 14:45:57 +01:00