Commit Graph

237 Commits

Author SHA1 Message Date
Priyesh b7f1ee013b
Merge pull request #120 from ppadmavilasom/topic/ppadmavilasom/fix_distroverpkg_lookup
fix error in distroverpkg lookup
2020-03-24 10:32:22 -07:00
Priyesh Padmavilasom c11e98954b fix error in distroverpkg lookup
- change RPMTAG_NAME to RPMTAG_PROVIDES
- required as system-release is provided by photon-release
2020-03-23 23:42:04 +00:00
Priyesh 2ddda29bf1
Merge pull request #119 from keerthanakalyan/topic/keerthanak/fix-tdnf-clean-rpms
tdnf clean all command updates
2020-03-20 10:16:00 -07:00
Keerthana K 1da45e068b tdnf clean all command updates
tdnf clean all does not delete cache rpms. Fix to delete
the cached rpms if keepcache is not set.
Fixes https://github.com/vmware/photon/issues/832

Signed-off-by: Keerthana K <keerthanak@vmware.com>
2020-03-20 09:28:34 +00:00
Priyesh 7772869395
Merge pull request #116 from Conan-Kudo/fix-plugin-installpath
Install plugins into the correct architecture-specific library directory
2020-03-11 10:34:21 -07:00
Neal Gompa a90f609cb6 Install plugins into the correct architecture-specific library directory
Most Linux distributions following the FHS have 64-bit binaries in
/usr/lib64 and 32-bit binaries in /usr/lib. This change adjusts
plugins to be installed and detected in the correct directory for
libraries.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-03-10 20:12:59 -04:00
Priyesh e38f745052
Merge pull request #101 from Conan-Kudo/distroverpkg-system-release
client: Search for distroverpkg providing 'system-release'
2020-03-10 15:54:42 -07:00
Priyesh 6d2ee4f70d
Merge pull request #115 from cbsiddharth/cmake_pytest_subdir_new
cmake: Move pytests build rules into it's subdirectory
2020-03-10 10:02:08 -07:00
Siddharth Chandrasekaran 5e550ea9ad cmake: Move pytests build rules into it's subdirectory
As a continuation to PR #112, this patch moves the pytest build rules
into pytests/CMakeLists.txt for consistency. While at it, also move
the --build-dir option passed to pytests into config.json.in.

Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-03-10 07:20:17 +00:00
Priyesh 5029928d00
Merge pull request #114 from sshedi/sshedi-wip
Handle already installed packages faster.
2020-03-02 21:47:55 -08:00
Shreenidhi Shedi 390a829234 Handle already installed packages faster.
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2020-03-02 22:24:51 +05:30
Priyesh 81bc2fcce6
Merge pull request #112 from ppadmavilasom/topic/ppadmavilasom/refactor_cmake
refactor cmake for v2.1.0
2020-02-24 22:03:45 -08:00
Priyesh Padmavilasom 4615657144 refactor cmake
- fix issues while packaging for photon
 - fix library installs
2020-02-22 01:35:13 +00:00
Priyesh 2f5b85e5c9
Merge pull request #110 from keerthanakalyan/topic/keerthanak/fix-error-string-on-faulty-repodir
Fix Error string when repodir is invalid
2020-02-13 10:59:27 -08:00
Priyesh d980418809
Merge pull request #108 from ppadmavilasom/topic/ppadmavilasom/repogpgcheck_plugin
plugin headers and initial repogpgcheck plugin implementation
2020-02-13 10:44:35 -08:00
Priyesh 5042bf4874
Merge branch 'dev' into topic/ppadmavilasom/repogpgcheck_plugin 2020-02-13 10:27:26 -08:00
Priyesh 4c21dd9435
Merge pull request #111 from ppadmavilasom/topic/ppadmavilasom/interactive_alter
return non zero error when interactive alter is aborted
2020-02-13 10:20:57 -08:00
Priyesh Padmavilasom 57bb42f3ff return non zero error when interactive alter is aborted
- when --assumeno is provided in command line
- when user aborts interactive alter with input other than 'y'
- error message "Operation aborted"
- previously tdnf did not return an error. returns non-zero error now.
2020-02-12 22:23:00 +00:00
Priyesh Padmavilasom d6a0e74723 plugin headers and initial repogpgcheck plugin implementation
- plugin event map for guidance to event items
 - plugin events init, repo, repomd
 - tests for plugin conf
 - tests with a repomd sign and verify via plugin
2020-02-12 18:50:26 +00:00
Keerthana K 8232bd4177 Fix Error string when repodir is not present
Fix error when repo directory provided is not present. Currently
tdnf displays "Error(2605) : Unknown error 1005" when the repodir
configured is invalid. Correct Error should be
"Error(1005) : Error opening repo dir. Check if the repodir configured
in tdnf.conf exists (usually /etc/yum.repos.d)"
2020-02-11 04:49:11 +00:00
Priyesh 3f7d820c77
Merge pull request #106 from ppadmavilasom/topic/ppadmavilasom/plugin_support
plugin support
2020-01-29 22:14:03 -08:00
Priyesh Padmavilasom 6a6b9987fe plugin support
- read conf file, read cmdline params.
- read plugins (default to 0. this means plugins are disabled by default)
- read pluginpath (default to /usr/lib/tdnf-plugins)
- read pluginconfpath (default to /etc/tdnf/pluginconf.d)
2020-01-29 23:37:42 +00:00
Priyesh 5c4ea58318
Merge pull request #107 from ppadmavilasom/topic/ppadmavilasom/valgrind_memcheck
setup ci to do valgrind memcheck
2020-01-28 15:28:18 -08:00
Priyesh Padmavilasom ccc22d80a1 setup ci to do valgrind memcheck 2020-01-23 00:14:16 +00:00
Priyesh 438dab474f
Merge pull request #105 from cbsiddharth/topic/cmake_build
Switch to local repo for pytests. Fix broken fedora builds
2020-01-18 19:09:10 -08:00
Siddharth Chandrasekaran 03638d97c5 pytest: switch to local repo; enable fedora tests
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-19 02:56:40 +00:00
Priyesh e3e4d47ffe
Merge pull request #104 from cbsiddharth/dev
Fix cpack source tarball that included build directory
2020-01-17 09:59:52 -08:00
Siddharth Chandrasekaran 46d6c80eb9 pytest: add update, version, search, and whatprovides tests
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:40:23 +05:30
Siddharth Chandrasekaran 279fa54639 pytest: Add work around for issue #94
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:35:42 +05:30
Siddharth Chandrasekaran ac02cb60dc pytest: promote (install|erase)_package() into TestUtils
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:35:42 +05:30
Siddharth Chandrasekaran bf4ecd7f04 pytests: Add list and repolist tests
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:35:42 +05:30
Siddharth Chandrasekaran 849f929b7c pytests: Add install and erase tests
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:35:42 +05:30
Siddharth Chandrasekaran a86cb86cee pytest: fix skipped multiversion test
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:35:42 +05:30
Siddharth Chandrasekaran 8a31aefcbc Add script and specs to create the photon-test repo
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:35:42 +05:30
Siddharth Chandrasekaran dd5f8ffd29 pytest: parse return code from stdout for errors
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-16 11:35:42 +05:30
Siddharth Chandrasekaran 591ff8c619 Fix cpack source tarball that included build directory
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-01-14 06:47:24 +00:00
Priyesh b031597fa7
Merge pull request #102 from ppadmavilasom/fix_cmake_version
fix version getting overwritten as empty
2020-01-08 11:11:27 -08:00
Priyesh Padmavilasom 58ed019bed fix version getting overwritten as empty
- add code to generate config.h
- config.h contains just package name and version
- cmake will generate config.h from config.h.in
- add version tests which was missing
2020-01-08 18:30:27 +00:00
Neal Gompa 02f49a2114 client: Search for distroverpkg providing 'system-release'
fedora-release and mageia-release offer generic 'system-release' Provides
that can be used to determine the release version of the distribution.
Derivatives of Fedora (including RHEL) also offer this generic capability
in their distribution release packages.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-01-04 15:17:46 -05:00
Priyesh fe04cff275
Merge pull request #96 from ppadmavilasom/topic/ppadmavilasom/print_rpm_name_when_bad_file
print rpm file name and path on rpm read errors
2020-01-03 14:31:52 -08:00
Priyesh 88db9f9137
Merge pull request #98 from ppadmavilasom/topic/ppadmavilasom/issue_95
Fix issue: https://github.com/vmware/tdnf/issues/95
2020-01-03 09:45:00 -08:00
Priyesh d1f627aeed
Merge pull request #99 from Conan-Kudo/fix-cmake-build
Fix CMake build of TDNF
2020-01-02 16:57:31 -08:00
Neal Gompa bf1ed6b271 Update README to reflect change to CMake and new location of Dockerfile
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-01-02 19:27:11 -05:00
Neal Gompa efbe460512 ci: Refactor CI setup to add Fedora build in addition to Photon build
In order to (hopefully) prevent future breakage, the CI has been refactored
so that TDNF is now built on both Fedora and Photon. This ensures
that TDNF remains buildable and somewhat usable on Fedora and other
similar RPM-based distributions. CI now builds the Python module to
verify that builds properly, too.

As the tests only work properly on Photon OS for now, the CI is configured
to only execute them for the Photon environment.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-01-02 18:47:11 -05:00
Neal Gompa 4670d24687 python: Fix includes so that Python bindings build properly
Compilation was failing because /usr/include/tdnf/tdnf.h does not
exist during the build and tdnfbase.h was not being included
by its corresponding source file.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-01-02 17:14:12 -05:00
Neal Gompa 1090667fc1 cmake: Set up project and library versioning and install pkgconfig files
Since we're using a modern version of CMake (version 3.0+), we can
set the version as part of the project properties.

As part of doing so, the new project version setting is propagated
down to the TDNF library build targets, so that the version and
soversion are based on the project version.

Additionally, we can now have a useful fallback value for the
BuildMetaData CMake function so that builds from release tarballs
will not have broken version information.

Finally, we use these changes as part of restoring the pkgconfig
files so that they are configured and installed properly with the
correct values.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-01-02 17:14:12 -05:00
Neal Gompa b46b8491b9 cmake: Install headers and use GNUInstallDirs for correct install paths
The TDNF libraries were getting installed, but they were unusable because
the header files were not being installed along with the libraries.

Additionally, the installation paths were wrong for 64-bit Linux systems
because it forced the usage of /lib where /lib64 was required. Switching
to having the installation paths defined by GNUInstallDirs by default
(included in CMake since 2.8.5) fixes this problem.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-01-02 17:07:13 -05:00
Priyesh Padmavilasom dd33e38f83 Add checks for file before open
- https://github.com/vmware/tdnf/issues/95
2019-12-20 17:27:18 +00:00
Priyesh Padmavilasom 6330194be1 print rpm file name and path on rpm read errors
- better error message
- hint bad/corrupt rpm with generic error message
2019-12-14 01:15:54 +00:00
Priyesh 59293d015e
Merge pull request #92 from cbsiddharth/topic/cmake_build
Switch to cmake builds and fix a bunch of other stuffs
2019-12-06 15:38:17 -08:00