Commit Graph

89 Commits

Author SHA1 Message Date
Oliver Kurth 4042576fd4 de-duplicate entries in common/config.h and client/defines.h 2023-11-02 15:09:21 -07:00
Shivani Agarwal c3a299e51b tdnf: Add check to identify duplicate repo id 2023-09-30 06:36:28 +00:00
Shivani Agarwal 7429e00b0b Compare checksum for repodata against the downloaded rpm file 2023-08-15 10:15:04 +00:00
Shreenidhi Shedi d3fc112c33 tree-wide: remove out dated author info from source files
These were missed in:
af6609f664

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2023-08-04 17:35:00 +05:30
Oliver Kurth 9d7dc3ba48 check rpm file size with the size that is expected from repo data 2023-05-04 15:39:11 -07:00
Oliver Kurth 6a67425d0c implement new protected feature 2023-03-31 14:53:41 -07:00
Oliver Kurth b637e31b9b fix copyright years 2023-03-31 12:41:34 -07:00
Oliver Kurth cc38df7cc2 make reinstall changed packages on distro-sync optional 2023-03-06 12:33:25 -08:00
Oliver Kurth c3c1ed0692
Merge pull request #404 from mminkus/PSSEPLAT-2038
Add new 'dnf_check_update_compat' config file option. Defaults to disabled.
2023-02-23 11:57:37 -08:00
Martin Minkus f43a37ea03 Add new 'dnf_check_update_compat' config file option. Defaults to disabled.
When enabled, return exit status 100 if there are package updates available.
Updated formatting of check-update to match that of list so that it can be
parsed by puppet correctly.
2023-02-23 08:53:45 -08:00
azaugg 1d936825f0 Ensure tdnf lock file is removed on application exit
On completion of a tdnf run, ensure that lock file is removed from
/var/run.

Insert the PID of the running tdnf process into the lock file.
2023-02-17 21:58:06 -08:00
Oliver Kurth 10b5350f1d make max number of open files configurable 2023-01-31 10:08:13 -08:00
Oliver Kurth ecd007348c make db dir (persistdir) also conf'able at run time 2022-12-19 16:14:16 -08:00
Oliver Kurth 2717a7bcd2 compile time set for db dir 2022-12-13 15:00:30 -08:00
Oliver Kurth 7f6762668c add metalink plugin to spec file and move libxml2 dependency to metalink plugin 2022-10-10 11:02:22 -07:00
Oliver Kurth 80414ac210 metalinker plugin error handling 2022-10-10 11:02:22 -07:00
Oliver Kurth 1d56fd34d6 handle erropr when install root is relative 2022-09-08 14:45:49 -07:00
Preston-Sundar 021bba6e57 Add cache directory out of memory check. 2022-07-11 21:52:58 +00:00
Preston-Sundar 0a98a83483 Add total download size reporting to installs. 2022-07-11 21:49:39 +00:00
Oliver Kurth f1883c9ee4 implement history commands 2022-06-28 22:29:04 +00:00
Shreenidhi Shedi 35c5a28d25 use granular permissions for tdnf commands
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2022-03-11 20:01:54 +05:30
Oliver Kurth b13ffe932b add options to skip metadata parts 2022-02-10 10:26:30 -08:00
Oliver Kurth 38fa1f466b fix copyright years 2022-02-04 18:20:19 -08:00
Oliver Kurth 09a630ae88 clean-reqs: add autoremove feature 2022-01-27 21:53:11 +00:00
Shreenidhi Shedi e42952a39e Move instance running check to TDNFOpenHandle()
This will ensure that any tdnf api usage will create a instance lock file

Implement a new utility for locking.

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2022-01-11 11:54:49 +05:30
Oliver Kurth 3bab1785ee set new error code for ERROR_TDNF_DOWNGRADE_NOT_ALLOWED, was dup of ERROR_TDNF_INVALID_INPUT 2021-12-15 22:14:01 +00:00
Nitesh Kumar 4725d3bc7b Replace existing use of libmetalink library with custom handling. 2021-12-10 10:33:06 +00:00
Oliver Kurth 2d1229f910 add --repoid/--repo and --repofrompath options 2021-11-22 23:42:46 +00:00
Oliver Kurth 2307675fa1 repoquery: add changelogs and source options 2021-10-21 19:52:40 +00:00
Oliver Kurth 76d403e983 repoquery: pull 'other' metadata for changelogs 2021-10-21 19:52:40 +00:00
Oliver Kurth 5f6fe1c648 add minversions config option 2021-10-06 17:20:38 +00:00
Nitesh Kumar 1c133c3b05 ITS issue fixed for tdnf. 2021-09-09 07:27:58 +00:00
Oliver Kurth c70b164dc1 set repo expiry to two days as intended and add macros for other repo defaults 2021-06-25 11:48:03 -07:00
Oliver Kurth 9d2ab6090c read main config from installroot if it exists
cache dir relative to installroot, repo dir if it exists

add reposdir setopt
2021-06-17 13:24:23 -07:00
Oliver Kurth 950121458d add priority option (no effect yet) 2021-03-03 11:19:03 -08:00
Oliver Kurth 8959182aab use BAIL_ON_TDNF_SYSTEM_ERROR_UNCOND when an error has definitely occured 2021-01-21 11:39:11 -08:00
Oliver Kurth 854e8ca0ba fix --cacheonly, add error code 2021-01-05 11:10:58 -08:00
Oliver Kurth 8953f8d65e fix handling error returned by rpmtsRun(), and remove unused error codes 2020-12-11 11:33:03 -08:00
Oliver Kurth b99f39aed6 implement all download options retries, timeout, minrate and throttle 2020-12-07 11:23:20 -08:00
Emre Girgin 39314b40b8
Add SSL options support (#176)
* Add SSL options support
2020-10-23 12:05:59 -07:00
Oliver Kurth f419d79d79 Download gpg keys from remote locations (http, ftp, ..).
The key is first downloaded into the cache area, then used
like a local key. The cached key will be deleted after it
has ben added to the key ring.
2020-09-21 11:36:10 -07:00
Keerthana K 31a577946b
Merge pull request #167 from tapakund/seq_metalink_support
support sequential retry of lesser priority mirrors
2020-09-17 12:44:01 +05:30
Tapas Kundu d4307085c6 print error string with error code
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
2020-09-16 13:53:33 +08:00
Tapas Kundu fadaad452f support sequential retry of lesser priority mirrors
Below are the modifications done with this PR:

1. Add sha512sum support for verifying the repomd file.
2. Cache the baseurl in case of metalink.
3. support sequential retry of lesser priority mirrors
4. Removed hardcoded support of https, http, ftp, ftps, file resource types.
5. With this change, curl will decide on the protocol supported/unsupported.
6. Minor code cleanup and some improvements.

Signed-off-by: Tapas Kundu <tkundu@vmware.com>
2020-09-16 13:52:51 +08:00
Siddharth Chandrasekaran 0226aba48c Add support for excludepkgs option in tdnf.conf
This patch adds the config option "exclude" from tdnf.conf and some
utils to make this possible neatly.

Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-09-15 13:30:51 +05:30
Tapas Kundu 167e8b7d40 print right error for md5 not supported in FIPS mode
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
2020-09-11 14:28:05 +08:00
Siddharth Chandrasekaran bdbf47cad7 Fix unhandled error code message
An RPM error code was being returned as a TDNF error code causing it to
print a debug message. Fix this by calling the right BAIL_*() macro.

Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-08-07 18:21:15 +05:30
sshedi 8265d42017
Remove duplicate code (#136)
Cleaned up redundant macros
Use <tdnf-common-includes.h> everywhere
Fixed few function prototypes
Added few missing validations
Use ARRAY_SIZE, UNUSED from a common header file
Added and rectified few test scripts

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2020-06-05 11:09:43 +05:30
Tapas Kundu e6c10f6f17
Rename metalink file (#140)
- Removed hardcoded name for metalink file. It will depend on user input file.
- Fix some issues related with repomd url which is coming from metalink file.
- Moved check for resource type to TDNFParseAndGetURLFromMetalink before selecting
  the url.

Signed-off-by: Tapas Kundu <tkundu@vmware.com>
2020-05-29 13:24:30 +05:30
Shreenidhi Shedi 68e0082b8c Bug fixes and code improvements
Removed some duplicate code
Use getchar instead of scanf
Fixed a potential buffer overflow in fread

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2020-04-27 23:46:08 +05:30