Summary: dnf/yum equivalent using C libs Name: tdnf Version: 3.6.0 Release: 0%{?buildtag}%{?dist} Vendor: VMware, Inc. Distribution: Photon License: LGPLv2.1,GPLv2 URL: https://github.com/vmware/%{name} Group: Applications/RPM Source0: %{name}-%{version}.tar.gz %define sha512 %{name}=4c6756aa1778464e3d8eefe69271809f9b9b29ba4ab7756f6c230352f9bcc40eabc541f21f385adfc8d78420101411038e49cf56409ec889beac062571c21d5f Requires: rpm-libs >= 4.16.1.3-1 %if %{defined rhel} || %{defined fedora} Requires: libcurl Requires: expat %else Requires: curl-libs Requires: expat-libs %endif Requires: %{name}-cli-libs = %{version}-%{release} Requires: libsolv >= 0.7.19 Requires: zlib BuildRequires: popt-devel BuildRequires: rpm-devel BuildRequires: openssl-devel >= 1.1.1 BuildRequires: libsolv-devel >= 0.7.19 BuildRequires: curl-devel BuildRequires: expat-devel BuildRequires: sqlite-devel BuildRequires: zlib-devel BuildRequires: systemd BuildRequires: systemd-rpm-macros #metalink plugin BuildRequires: expat-devel #repogpgcheck plugin BuildRequires: gpgme-devel BuildRequires: gcc BuildRequires: make BuildRequires: cmake BuildRequires: python3-devel BuildRequires: python3-setuptools %if 0%{?with_check} BuildRequires: createrepo_c BuildRequires: glib BuildRequires: python3-pip BuildRequires: photon-release BuildRequires: photon-repos BuildRequires: python3-requests BuildRequires: python3-urllib3 BuildRequires: python3-pyOpenSSL BuildRequires: python3-pytest %endif Obsoletes: yum Provides: yum %description %{name} is a yum/dnf equivalent which uses libsolv and libcurl %define _tdnfpluginsdir %{_libdir}/%{name}-plugins %package devel Summary: A Library providing a C API for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libsolv-devel %description devel Development files for %{name} %package pytests Summary: Test suite for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: %{name}-automatic = %{version}-%{release} Requires: %{name}-plugin-repogpgcheck = %{version}-%{release} Requires: %{name}-plugin-metalink = %{version}-%{release} Requires: %{name}-python = %{version}-%{release} Requires: python3-pytest Requires: python3-requests Requires: rpm-build Requires: build-essential Requires: createrepo Requires: shadow Requires: sudo Requires: e2fsprogs Requires: util-linux Requires: findutils %description pytests Test suite for %{name} %package cli-libs Summary: Library providing cli libs for %{name} like clients Group: Development/Libraries %description cli-libs Library providing cli libs for %{name} like clients. %package plugin-metalink Summary: tdnf plugin providing metalink functionality for repo configurations Group: Development/Libraries Requires: gpgme %description plugin-metalink tdnf plugin providing metalink functionality for repo configurations %package plugin-repogpgcheck Summary: %{name} plugin providing gpg verification for repository metadata Group: Development/Libraries Requires: gpgme %description plugin-repogpgcheck %{name} plugin providing gpg verification for repository metadata %package python Summary: python bindings for %{name} Group: Development/Libraries Requires: python3 %description python python bindings for %{name} %package automatic Summary: %{name} - automated upgrades Group: Development/Libraries Requires: %{name} = %{version}-%{release} %{?systemd_requires} %description automatic Systemd units that can periodically download package upgrades and apply them. %prep %autosetup -p1 -n %{name}-%{version} %build mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DSYSTEMD_DIR=%{_unitdir} \ .. %make_build %make_build python %if 0%{?with_check} %check pip3 install flake8 cd build && make %{?_smp_mflags} check %endif %install pushd build %make_install popd find %{buildroot} -name '*.a' -delete mkdir -p %{buildroot}/var/cache/%{name} %{buildroot}%{_unitdir} ln -sfv %{name} %{buildroot}%{_bindir}/tyum ln -sfv %{name} %{buildroot}%{_bindir}/yum ln -sfv %{name} %{buildroot}%{_bindir}/tdnfj pushd build/python python3 setup.py install --skip-build --prefix=%{_prefix} --install-lib=%{python3_sitelib} --root=%{buildroot} popd find %{buildroot} -name '*.pyc' -delete %pre %post /sbin/ldconfig %posttrans # must be postrans because we read the rpm db # cannot use tdnf because that is still running even in postrans [ -d /var/lib/tdnf ] || mkdir -p /var/lib/tdnf [ -f /var/lib/tdnf/history.db ] || %{_libdir}/tdnf/tdnf-history-util init if [ -f /var/lib/tdnf/autoinstalled ] ; then %{_libdir}/tdnf/tdnf-history-util mark remove $(cat /var/lib/tdnf/autoinstalled) && \ rm /var/lib/tdnf/autoinstalled fi %triggerin -- motd [ $2 -eq 1 ] || exit 0 if [ $1 -eq 1 ]; then echo "detected install of %{name}/motd, enabling %{name}-cache-updateinfo.timer" >&2 systemctl enable %{name}-cache-updateinfo.timer >/dev/null 2>&1 || : systemctl start %{name}-cache-updateinfo.timer >/dev/null 2>&1 || : elif [ $1 -eq 2 ]; then echo "detected upgrade of %{name}, daemon-reload" >&2 systemctl daemon-reload >/dev/null 2>&1 || : fi # transition old autoinstalled file to db if [ -f /var/lib/tdnf/autoinstalled ] ; then tdnf mark remove $(cat /var/lib/tdnf/autoinstalled) mv /var/lib/tdnf/autoinstalled /var/lib/tdnf/autoinstalled.backup fi %triggerun -- motd [ $1 -eq 1 ] && [ $2 -eq 1 ] && exit 0 echo "detected uninstall of %{name}/motd, disabling %{name}-cache-updateinfo.timer" >&2 systemctl --no-reload disable %{name}-cache-updateinfo.timer >/dev/null 2>&1 || : systemctl stop %{name}-cache-updateinfo.timer >/dev/null 2>&1 || : rm -f /var/cache/%{name}/cached-updateinfo.txt %postun /sbin/ldconfig %triggerpostun -- motd [ $1 -eq 1 ] && [ $2 -eq 1 ] || exit 0 echo "detected upgrade of %{name}/motd, restarting %{name}-cache-updateinfo.timer" >&2 systemctl try-restart %{name}-cache-updateinfo.timer >/dev/null 2>&1 || : %post cli-libs /sbin/ldconfig %postun cli-libs /sbin/ldconfig %global automatic_services %{name}-automatic.timer %{name}-automatic-notifyonly.timer %{name}-automatic-install.timer %post automatic %systemd_post %{automatic_services} %preun automatic %systemd_preun %{automatic_services} %postun automatic %systemd_postun_with_restart %{automatic_services} %files %defattr(-,root,root,0755) %{_bindir}/%{name} %{_bindir}/tyum %{_bindir}/yum %{_bindir}/tdnfj %{_bindir}/tdnf-config %{_bindir}/tdnf-cache-updateinfo %{_libdir}/libtdnf.so.* %{_libdir}/tdnf/tdnf-history-util %config(noreplace) %{_sysconfdir}/tdnf/tdnf.conf %config %{_unitdir}/tdnf-cache-updateinfo.service %config(noreplace) %{_unitdir}/tdnf-cache-updateinfo.timer %config %{_sysconfdir}/motdgen.d/02-tdnf-updateinfo.sh %dir /var/cache/tdnf %{_datadir}/bash-completion/completions/tdnf %files pytests %defattr(-,root,root) %{_datadir}/tdnf/pytests/ %{_bindir}/jsondumptest %files devel %defattr(-,root,root) %{_includedir}/%{name}/*.h %{_libdir}/libtdnf.so %{_libdir}/libtdnfcli.so %exclude %dir %{_libdir}/debug %{_libdir}/pkgconfig/tdnf.pc %{_libdir}/pkgconfig/tdnf-cli-libs.pc %files cli-libs %defattr(-,root,root) %{_libdir}/libtdnfcli.so.* %files plugin-metalink %defattr(-,root,root) %dir %{_sysconfdir}/tdnf/pluginconf.d %config(noreplace) %{_sysconfdir}/tdnf/pluginconf.d/tdnfmetalink.conf %{_tdnfpluginsdir}/libtdnfmetalink.so %files plugin-repogpgcheck %defattr(-,root,root) %dir %{_sysconfdir}/%{name}/pluginconf.d %config(noreplace) %{_sysconfdir}/%{name}/pluginconf.d/tdnfrepogpgcheck.conf %{_tdnfpluginsdir}/libtdnfrepogpgcheck.so %files python %defattr(-,root,root) %{python3_sitelib}/* %files automatic %defattr(-,root,root,0755) %{_bindir}/%{name}-automatic %config(noreplace) %{_sysconfdir}/%{name}/automatic.conf %{_unitdir}/%{name}-automatic.timer %{_unitdir}/%{name}-automatic.service %{_unitdir}/%{name}-automatic-install.timer %{_unitdir}/%{name}-automatic-install.service %{_unitdir}/%{name}-automatic-notifyonly.timer %{_unitdir}/%{name}-automatic-notifyonly.service %changelog * Fri Jun 09 2023 Shivani Agarwal 3.3.1-4 - Remove libxml2 dependency and add expat dependency * Mon Jun 27 2022 Shreenidhi Shedi 3.3.1-3 - Exclude debug symbols properly * Fri Jun 17 2022 Shreenidhi Shedi 3.3.1-2 - Spec improvements * Tue May 10 2022 Oliver Kurth 3.3.1-1 - update to 3.3.1 * Mon Feb 21 2022 Oliver Kurth 3.2.5-1 - update to 3.2.5 * Thu Feb 03 2022 Oliver Kurth 3.2.4-1 - update to 3.2.4 * Wed Dec 22 2021 Oliver Kurth 3.2.3-1 - update to 3.2.3 * Fri Dec 10 2021 Oliver Kurth 3.2.2-1 - update to 3.2.2 * Thu Dec 09 2021 Prashant S Chauhan 3.1.5-4 - Bump up to compile with python 3.10 * Mon Nov 15 2021 Shreenidhi Shedi 3.1.5-3 - Bump version as a part of rpm upgrade * Mon Nov 08 2021 Satya Naga Vasamsetty 3.1.5-2 - openssl 3.0.0 compatibility * Wed Oct 06 2021 Oliver Kurth 3.1.5-1 - update to 3.1.5 - add minversions config option - make pytests arch independent (does not affect functionality) * Mon Aug 2 2021 Oliver Kurth 3.1.4-1 - update to 3.1.4 - fix configreader key reading logic * Tue Jun 29 2021 Oliver Kurth 3.1.3-1 - update to 3.1.3 * Wed Jun 23 2021 Oliver Kurth 3.1.2-1 - update to 3.1.2 * Fri Jun 11 2021 Oliver Kurth 3.1.0-3 - rebuild with libsolv 0.7.19 * Thu Jun 03 2021 Shreenidhi Shedi 3.1.0-2 - fix segfaulting when gpgcheck is enabled & no key configured * Tue Jun 01 2021 Oliver Kurth 3.1.0-1 - update to 3.1.0 * Tue Apr 06 2021 Oliver Kurth 3.0.2-1 - update to 3.0.2 * Thu Feb 18 2021 Oliver Kurth 3.0.0-5 - update to v3.0.0 (GA) - depend on curl-libs instead of curl * Wed Feb 10 2021 Shreenidhi Shedi 3.0.0-4 - bump version as a part of rpm upgrade * Wed Jan 20 2021 Oliver Kurth 3.0.0-3 - update to v3.0.0-rc2 * Thu Oct 29 2020 Keerthana K 3.0.0-2 - Fix coverity scan issues and fedora pytest issue. * Tue Oct 27 2020 Keerthana K 3.0.0-1 - Update to v3.0.0-beta * Sun Sep 06 2020 Satya Naga Vasamsetty 2.1.1-3 - Rebuild with openssl 1.1.1 * Sat Aug 15 2020 Shreenidhi Shedi 2.1.1-2 - Cherry-pick some critical fixes from vmware/tdnf:dev * Thu Jun 04 2020 Tapas Kundu 2.1.1-1 - Update to 2.1.1 * Tue Mar 24 2020 Priyesh Padmavilasom 2.1.0-2 - Fix distroverpkg search to look for provides instead of name * Thu Feb 20 2020 Priyesh Padmavilasom 2.1.0-1 - Update to 2.1.0 * Sun Sep 08 2019 Ankit Jain 2.0.0-11 - Added more rules for skipconflicts and skipobsoletes to check command. * Fri Mar 15 2019 Ankit Jain 2.0.0-10 - Added skipconflicts and skipobsoletes to check command. * Thu Mar 14 2019 Keerthana K 2.0.0-9 - GPGCheck fix on RPM version 4.14.2 * Mon Mar 04 2019 Keerthana K 2.0.0-8 - makecache and refresh command updates. * Thu Feb 14 2019 Keerthana K 2.0.0-7 - Fix to address issues when no repos are enabled. * Wed Jan 23 2019 Keerthana K 2.0.0-6 - Fix Memory leak and curl status type. * Wed Jan 02 2019 Keerthana K 2.0.0-5 - Added make check. * Tue Dec 04 2018 Keerthana K 2.0.0-4 - Add support for libsolv caching. - Fix bug in tdnf updateinfo command. - Fix bug on list available command. * Wed Nov 21 2018 Keerthana K 2.0.0-3 - Update to 2.0.0 beta release. * Mon Oct 08 2018 Keerthana K 2.0.0-2 - Fix bug on tdnf crash when photon-iso repo only enabled without mounting cdrom. * Fri Feb 09 2018 Priyesh Padmavilasom 2.0.0-1 - update to 2.0.0 * Tue Jan 30 2018 Priyesh Padmavilasom 1.2.2-3 - patch to error out early for permission issues. * Tue Oct 10 2017 Priyesh Padmavilasom 1.2.2-2 - Fix bug in obsolete protected packages. * Wed Oct 4 2017 Priyesh Padmavilasom 1.2.2-1 - update to v1.2.2 * Sat Sep 30 2017 Priyesh Padmavilasom 1.2.1-5 - Output problems while resolving to stderr (instead of stdout) * Wed Sep 27 2017 Bo Gan 1.2.1-4 - Improve suggestion in motd message * Thu Sep 14 2017 Bo Gan 1.2.1-3 - Add suggestion in motd message * Fri Jul 21 2017 Priyesh Padmavilasom 1.2.1-2 - Modify quiet patch. * Tue Jul 18 2017 Priyesh Padmavilasom 1.2.1-1 - Update to v1.2.1 * Tue May 30 2017 Bo Gan 1.2.0-5 - Fix cache-updateinfo script again * Fri May 12 2017 Priyesh Padmavilasom 1.2.0-4 - Patch repo refresh to allow quiet flags * Wed May 10 2017 Bo Gan 1.2.0-3 - Fix cache-updateinfo script * Fri May 05 2017 Priyesh Padmavilasom 1.2.0-2 - Fix Requires for cli-libs * Wed May 03 2017 Priyesh Padmavilasom 1.2.0-1 - update to v1.2.0 * Sun Apr 30 2017 Bo Gan 1.1.0-5 - Do not write to stdout in motd triggers * Thu Apr 20 2017 Bo Gan 1.1.0-4 - motd hooks/triggers for updateinfo notification * Fri Apr 14 2017 Dheerajs Shetty 1.1.0-3 - Adding a patch to compile with latest hawkey version * Mon Dec 19 2016 Xiaolin Li 1.1.0-2 - BuildRequires libsolv-devel. * Thu Dec 08 2016 Priyesh Padmavilasom 1.1.0-1 - update to v1.1.0 * Thu Nov 17 2016 Alexey Makhalov 1.0.9-3 - Use rpm-libs at runtime * Tue May 24 2016 Priyesh Padmavilasom 1.0.9-2 - GA - Bump release of all rpms * Fri May 20 2016 Priyesh Padmavilasom 1.0.9-1 - Update to 1.0.9. Contains fixes for updateinfo. * Wed May 4 2016 Priyesh Padmavilasom 1.0.8-3 - Fix link installs, fix devel header dir * Fri Apr 1 2016 Priyesh Padmavilasom 1.0.8-2 - Update version which was missed with 1.0.8-1, apply string limits * Fri Apr 1 2016 Priyesh Padmavilasom 1.0.8-1 - Code scan fixes, autotest path fix, support --releasever * Thu Jan 14 2016 Priyesh Padmavilasom 1.0.7 - Fix return codes on install and check-update - Add tests for install existing and update * Wed Jan 13 2016 Priyesh Padmavilasom 1.0.6 - Support distroverpkg and add tests to work with make check * Mon Dec 14 2015 Priyesh Padmavilasom 1.0.5 - Support for multiple packages in alter commands - Support url vars for releasever and basearch * Fri Oct 2 2015 Priyesh Padmavilasom 1.0.4 - Fix upgrade to work without args, Engage distro-sync - Fix install to resolve to latest available - Fix formats, fix refresh on download output * Tue Sep 8 2015 Priyesh Padmavilasom 1.0.3 - Fix metadata creation issues. Engage refresh flag. - Do not check gpgkey when gpgcheck is turned off in repo. * Thu Jul 23 2015 Priyesh Padmavilasom 1.0.2 - Support reinstalls in transaction. Handle non-existent packages correctly. * Mon Jul 13 2015 Alexey Makhalov 1.0.1-2 - Create -debuginfo package. Use parallel make. * Tue Jun 30 2015 Priyesh Padmavilasom 1.0.1 - Proxy support, keepcache fix, valgrind leaks fix * Fri Jan 23 2015 Priyesh Padmavilasom 1.0 - Initial build. First version