diff --git a/packages/tdnf/SOURCES/cli-termios.sgifixes.patch b/packages/tdnf/SOURCES/cli-termios.sgifixes.patch new file mode 100644 index 000000000..a4808eec6 --- /dev/null +++ b/packages/tdnf/SOURCES/cli-termios.sgifixes.patch @@ -0,0 +1,20 @@ +--- tdnf-3.1.5-orig/tools/cli/lib/output.c 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/tools/cli/lib/output.c 2021-11-21 21:47:50.156623360 +0000 +@@ -21,6 +21,17 @@ + + #include "includes.h" + ++#ifdef __sgi ++struct winsize { ++ unsigned short ws_row; /* rows, in characters*/ ++ unsigned short ws_col; /* columns, in character */ ++ unsigned short ws_xpixel; /* horizontal size, pixels */ ++ unsigned short ws_ypixel; /* vertical size, pixels */ ++}; ++ ++#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ ++#endif ++ + void + ShowConsoleProps( + void diff --git a/packages/tdnf/SOURCES/client-defines.sgifixes.patch b/packages/tdnf/SOURCES/client-defines.sgifixes.patch index 622b121a5..1ef26ea7e 100644 --- a/packages/tdnf/SOURCES/client-defines.sgifixes.patch +++ b/packages/tdnf/SOURCES/client-defines.sgifixes.patch @@ -1,5 +1,5 @@ ---- tdnf-3.0.0-beta-orig/client/defines.h 2020-10-27 01:14:06.000000000 +0000 -+++ tdnf-3.0.0/client/defines.h 2020-12-19 20:43:27.407203760 +0000 +--- tdnf-3.1.5-orig/client/defines.h 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/client/defines.h 2021-11-17 20:39:21.042920320 +0000 @@ -59,7 +59,7 @@ //Repo defines @@ -9,10 +9,10 @@ #define TDNF_CONF_GROUP "main" //Conf file key names #define TDNF_CONF_KEY_GPGCHECK "gpgcheck" -@@ -103,10 +103,10 @@ - #define TDNF_REPO_METALINK_FILE_NAME "metalink" +@@ -110,10 +110,10 @@ #define TDNF_REPO_BASEURL_FILE_NAME "baseurl" - //Repo defaults + + // repo defaults -#define TDNF_DEFAULT_REPO_LOCATION "/etc/yum.repos.d" -#define TDNF_DEFAULT_CACHE_LOCATION "/var/cache/tdnf" -#define TDNF_DEFAULT_DISTROVERPKG "system-release" @@ -24,7 +24,7 @@ #define TDNF_RPM_CACHE_DIR_NAME "rpms" #define TDNF_REPODATA_DIR_NAME "repodata" #define TDNF_SOLVCACHE_DIR_NAME "solvcache" -@@ -121,7 +121,7 @@ +@@ -140,7 +140,7 @@ /* plugin defines */ #define TDNF_DEFAULT_PLUGINS_ENABLED 0 #define TDNF_DEFAULT_PLUGIN_PATH SYSTEM_LIBDIR"/tdnf-plugins" diff --git a/packages/tdnf/SOURCES/cmakelist-paths.sgifixes.patch b/packages/tdnf/SOURCES/cmakelist-paths.sgifixes.patch index 7b08687c1..34649bca7 100644 --- a/packages/tdnf/SOURCES/cmakelist-paths.sgifixes.patch +++ b/packages/tdnf/SOURCES/cmakelist-paths.sgifixes.patch @@ -1,18 +1,19 @@ ---- tdnf-3.0.0-beta-orig/CMakeLists.txt 2020-12-03 17:02:43.241228240 +0000 -+++ tdnf-3.0.0-beta/CMakeLists.txt 2020-12-03 17:03:26.043551840 +0000 -@@ -29,11 +29,11 @@ +--- tdnf-3.1.5-orig/CMakeLists.txt 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/CMakeLists.txt 2021-11-17 20:33:17.954842960 +0000 +@@ -29,13 +29,13 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # Ensure that we don't accidentally install into /usr/etc -set(CMAKE_INSTALL_FULL_SYSCONDIR "/etc") -set(SYSCONFDIR /etc) +- +-set(MOTGEN_DIR /etc/motdgen.d) +set(CMAKE_INSTALL_FULL_SYSCONDIR "/usr/sgug/etc") +set(SYSCONFDIR /usr/sgug/etc) --set(MOTGEN_DIR /etc/motdgen.d) --set(SYSTEMD_DIR /lib/systemd/system) +set(MOTGEN_DIR /usr/sgug/etc/motdgen.d) -+set(SYSTEMD_DIR /usr/sgug/lib/systemd/system) - - ## - ## C Flags ++ + if(NOT SYSTEMD_DIR) +- set(SYSTEMD_DIR /lib/systemd/system) ++ set(SYSTEMD_DIR /usr/sgug/lib/systemd/system) + endif() diff --git a/packages/tdnf/SOURCES/tdnf-no-dlclose-plugins.patch b/packages/tdnf/SOURCES/tdnf-no-dlclose-plugins.patch index 37d0dbde2..5a62b0164 100644 --- a/packages/tdnf/SOURCES/tdnf-no-dlclose-plugins.patch +++ b/packages/tdnf/SOURCES/tdnf-no-dlclose-plugins.patch @@ -1,11 +1,20 @@ ---- tdnf-3.0.0-beta/client/plugins.c.orig 2021-11-19 14:57:30.307988836 +0000 -+++ tdnf-3.0.0-beta/client/plugins.c 2021-11-19 14:57:15.299176437 +0000 +--- tdnf-3.1.5-orig/client/plugins.c 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/client/plugins.c 2021-11-21 22:02:46.471605920 +0000 @@ -197,7 +197,7 @@ } if (pPlugin->pModule) { - dlclose(pPlugin->pModule); -+ //dlclose(pPlugin->pModule); ++ // dlclose(pPlugin->pModule); } } +@@ -519,7 +519,7 @@ + { + if (pPlugin->pModule) + { +- dlclose(pPlugin->pModule); ++ // dlclose(pPlugin->pModule); + pPlugin->pModule = NULL; + } + pPlugin->nEnabled = 0; diff --git a/packages/tdnf/SPECS/tdnf.spec b/packages/tdnf/SPECS/tdnf.spec index dc6d0aa2b..a8dae9f1c 100644 --- a/packages/tdnf/SPECS/tdnf.spec +++ b/packages/tdnf/SPECS/tdnf.spec @@ -1,50 +1,58 @@ %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} -# -# tdnf spec file -# + Summary: dnf/yum equivalent using C libs Name: tdnf -Version: 3.0.0 -Release: 6%{?dist} +Version: 3.1.5 +Release: 3%{?dist} Vendor: VMware, Inc. Distribution: Photon License: LGPLv2.1,GPLv2 -URL: http://www.vmware.com +URL: https://github.com/vmware/%{name} Group: Applications/RPM +Source0: %{name}-%{version}.tar.gz +%define sha1 %{name}=48bc98b57a50a580a56d00988bf3955be5d749a4 + +# Patch0: pool_flag_noinstalledobsoletes.patch +Patch100: cmakelist-paths.sgifixes.patch +Patch101: client-defines.sgifixes.patch +Patch102: tdnf-conf.sgifixes.patch +Patch103: tdnf-pool.sgifixes.patch +Patch104: tdnf-client.sgifixes.patch +Patch105: tdnf-common-utils.sgifixes.patch +Patch106: cli-termios.sgifixes.patch +# mach's crappy interpolation patch +# Patch106: tdnf-client-rpmtrans.sgifixes.patch +# Patch107: tdnf-printfprecision.sgifixes.patch +Patch108: tdnf-no-dlclose-plugins.patch + Requires: rpm-libs -Requires: curl +Requires: libcurl Requires: tdnf-cli-libs = %{version}-%{release} Requires: libsolv Requires: libmetalink + BuildRequires: popt-devel BuildRequires: rpm-devel BuildRequires: openssl-devel >= 1.1.1 -BuildRequires: libsolv-devel +BuildRequires: libsolv-devel >= 0.7.14 +# this definitely won't do anything bad at all +# BuildRequires: libsolv-devel >= 0.7.19 BuildRequires: curl-devel BuildRequires: libmetalink-devel +# BuildRequires: systemd #plugin repogpgcheck BuildRequires: gpgme-devel BuildRequires: cmake BuildRequires: python3-devel -#%if %{with_check} -#BuildRequires: createrepo_c -#BuildRequires: glib -#BuildRequires: libxml2 -#%endif -#Obsoletes: yum + +# %if %{with_check} +# BuildRequires: createrepo_c +# BuildRequires: glib +# BuildRequires: libxml2 +# %endif + +# Obsoletes: yum Provides: yum -Source0: %{name}-%{version}-beta.tar.gz -%define sha1 tdnf=ccde34eb3c75afcd1d672fae05a0dd2aae7feaa1 -Patch0: fix-coverity-issues.patch -Patch100: cmakelist-paths.sgifixes.patch -Patch101: client-defines.sgifixes.patch -Patch102: tdnf-conf.sgifixes.patch -Patch103: tdnf-pool.sgifixes.patch -Patch104: tdnf-client.sgifixes.patch -Patch105: tdnf-common-utils.sgifixes.patch -Patch106: tdnf-client-rpmtrans.sgifixes.patch -Patch107: tdnf-printfprecision.sgifixes.patch -Patch108: tdnf-no-dlclose-plugins.patch %description tdnf is a yum/dnf equivalent which uses libsolv and libcurl @@ -67,18 +75,18 @@ Group: Development/Libraries %description cli-libs Library providing cli libs for tdnf like clients. -%package plugin-repogpgcheck -Summary: tdnf plugin providign gpg verification for repository metadata -Group: Development/Libraries -Requires: gpgme +%package plugin-repogpgcheck +Summary: tdnf plugin providign gpg verification for repository metadata +Group: Development/Libraries +Requires: gpgme %description plugin-repogpgcheck tdnf plugin providign gpg verification for repository metadata -%package python -Summary: python bindings for tdnf -Group: Development/Libraries -Requires: python3 +%package python +Summary: python bindings for tdnf +Group: Development/Libraries +Requires: python3 %description python python bindings for tdnf @@ -87,12 +95,13 @@ python bindings for tdnf 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 -n %{name}-%{version}-beta -p1 +%autosetup -p1 -n %{name}-%{version} # Rewrite some hardcoded paths (just in case used in tests etc) perl -pi -e "s|/var/cache/tdnf|%{_prefix}/var/cache/tdnf|g" etc/motdgen.d/02-tdnf-updateinfo.sh @@ -108,7 +117,7 @@ rm cmake/FindOpenSSL.cmake %build mkdir build && cd build -export CFLAGS="-I%{_includedir}/libdicl-0.1 -DLIBDICL_NEED_GETOPT $RPM_OPT_FLAGS" +export CFLAGS="-I%{_includedir}/libdicl-0.1 -DLIBDICL_NEED_GETOPT $RPM_OPT_FLAGS -g" export LDFLAGS="-ldicl-0.1 $RPM_LD_FLAGS" cmake \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ @@ -129,82 +138,18 @@ cd build && make %{?_smp_mflags} check cd build && make DESTDIR=%{buildroot} install find %{buildroot} -name '*.a' -delete mkdir -p %{buildroot}%{_prefix}/var/cache/tdnf +mkdir -p %{buildroot}/%{_libdir}/systemd/system/ ln -sf %{_bindir}/tdnf %{buildroot}%{_bindir}/tyum ln -sf %{_bindir}/tdnf %{buildroot}%{_bindir}/yum mv %{buildroot}%{_libdir}/pkgconfig/tdnfcli.pc %{buildroot}%{_libdir}/pkgconfig/tdnf-cli-libs.pc mkdir -p %{buildroot}/%{_tdnfpluginsdir}/tdnfrepogpgcheck mv %{buildroot}/%{_tdnfpluginsdir}/libtdnfrepogpgcheck.so %{buildroot}/%{_tdnfpluginsdir}/tdnfrepogpgcheck/libtdnfrepogpgcheck.so +rm -rf %{buildroot}%{_prefix}/lib/systemd/system/ + cd python python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} cd .. find %{buildroot} -name '*.pyc' -delete -rm -rf %{buildroot}%{_prefix}/lib/systemd - -## Pre-install -#%pre -# -# # First argument is 1 => New Installation -# # First argument is 2 => Upgrade -# -## Post-install -#%post -# -# # First argument is 1 => New Installation -# # First argument is 2 => Upgrade -# -# /sbin/ldconfig -# -#%triggerin -- motd -#[ $2 -eq 1 ] || exit 0 -#if [ $1 -eq 1 ]; then -# echo "detected install of tdnf/motd, enabling tdnf-cache-updateinfo.timer" >&2 -# systemctl enable tdnf-cache-updateinfo.timer >/dev/null 2>&1 || : -# systemctl start tdnf-cache-updateinfo.timer >/dev/null 2>&1 || : -#elif [ $1 -eq 2 ]; then -# echo "detected upgrade of tdnf, daemon-reload" >&2 -# systemctl daemon-reload >/dev/null 2>&1 || : -#fi -# -# -## Pre-uninstall -#%preun -# -# # First argument is 0 => Uninstall -# # First argument is 1 => Upgrade -# -#%triggerun -- motd -#[ $1 -eq 1 ] && [ $2 -eq 1 ] && exit 0 -#echo "detected uninstall of tdnf/motd, disabling tdnf-cache-updateinfo.timer" >&2 -#systemctl --no-reload disable tdnf-cache-updateinfo.timer >/dev/null 2>&1 || : -#systemctl stop tdnf-cache-updateinfo.timer >/dev/null 2>&1 || : -#rm -rf /var/cache/tdnf/cached-updateinfo.txt -# -## Post-uninstall -#%postun -# -# /sbin/ldconfig -# -# # First argument is 0 => Uninstall -# # First argument is 1 => Upgrade -# -#%triggerpostun -- motd -#[ $1 -eq 1 ] && [ $2 -eq 1 ] || exit 0 -#echo "detected upgrade of tdnf/motd, restarting tdnf-cache-updateinfo.timer" >&2 -#systemctl try-restart tdnf-cache-updateinfo.timer >/dev/null 2>&1 || : -# -#%post cli-libs -# -# # First argument is 1 => New Installation -# # First argument is 2 => Upgrade -# -# /sbin/ldconfig -# -#%postun cli-libs -# -# /sbin/ldconfig -# -# # First argument is 0 => Uninstall -# # First argument is 1 => Upgrade %files %defattr(-,root,root,0755) @@ -223,7 +168,6 @@ rm -rf %{buildroot}%{_prefix}/lib/systemd %{_includedir}/tdnf/*.h %{_libdir}/libtdnf.so %{_libdir}/libtdnfcli.so - %exclude %{_libdir}/debug %{_libdir}/pkgconfig/tdnf.pc %{_libdir}/pkgconfig/tdnf-cli-libs.pc @@ -247,13 +191,34 @@ rm -rf %{buildroot}%{_prefix}/lib/systemd %config(noreplace) %{_sysconfdir}/%{name}/automatic.conf %changelog -* Sun Dec 20 2020 Daniel Hams 3.0.0-5 -- Little cleanups (paths, RPATH, printf precision, bad SSL discovery, use RSE OPT flags) -* Sat Dec 19 2020 David Stancu 3.0.0-4 -- Make TDNFNormalizePath a no-op (since it is only used with the cache dir, which is already normalized) +* Wed Nov 17 2021 David Stancu - 3.1.5-3 +- rse update to 3.1.5 +* 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 +* Sun Dec 20 2020 Daniel Hams 3.0.0-5 +- Little cleanups (paths, RPATH, printf precision, bad SSL discovery, use RSE OPT flags) +* Sat Dec 19 2020 David Stancu 3.0.0-4 +- Make TDNFNormalizePath a no-op (since it is only used with the cache dir, which is already normalized) - Expand $releasever and $basearch in GPG urls * Thu Dec 03 2020 David Stancu 3.0.0-3 -- Built for sgug-rse! +- Built for sgug-rse! * 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 @@ -363,4 +328,3 @@ rm -rf %{buildroot}%{_prefix}/lib/systemd - Proxy support, keepcache fix, valgrind leaks fix * Fri Jan 23 2015 Priyesh Padmavilasom 1.0 - Initial build. First version -