From fd3e33fb277c86ea1d49d2bcf535f586f3685ace Mon Sep 17 00:00:00 2001 From: David Stancu Date: Wed, 17 Nov 2021 21:32:35 -0500 Subject: [PATCH 1/4] try 3.1.5 --- .../tdnf/SOURCES/cli-termios.sgifixes.patch | 10 + .../SOURCES/client-defines.sgifixes.patch | 12 +- .../SOURCES/cmakelist-paths.sgifixes.patch | 19 +- packages/tdnf/SPECS/tdnf.spec | 277 +++++++++++------- 4 files changed, 191 insertions(+), 127 deletions(-) create mode 100644 packages/tdnf/SOURCES/cli-termios.sgifixes.patch diff --git a/packages/tdnf/SOURCES/cli-termios.sgifixes.patch b/packages/tdnf/SOURCES/cli-termios.sgifixes.patch new file mode 100644 index 000000000..f965a5e47 --- /dev/null +++ b/packages/tdnf/SOURCES/cli-termios.sgifixes.patch @@ -0,0 +1,10 @@ +--- 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-17 21:14:29.710175680 +0000 +@@ -20,6 +20,7 @@ + */ + + #include "includes.h" ++#include + + void + ShowConsoleProps( 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/SPECS/tdnf.spec b/packages/tdnf/SPECS/tdnf.spec index 4b89f1239..9bfadc926 100644 --- a/packages/tdnf/SPECS/tdnf.spec +++ b/packages/tdnf/SPECS/tdnf.spec @@ -1,49 +1,57 @@ %{!?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: 5%{?dist} +Version: 3.1.5 +Release: 2%{?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 + Requires: rpm-libs -Requires: curl +Requires: curl-libs 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 %description tdnf is a yum/dnf equivalent which uses libsolv and libcurl @@ -66,18 +74,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 @@ -86,12 +94,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 @@ -127,83 +136,99 @@ cd build && make %{?_smp_mflags} check %install cd build && make DESTDIR=%{buildroot} install find %{buildroot} -name '*.a' -delete -mkdir -p %{buildroot}%{_prefix}/var/cache/tdnf +mkdir -p %{buildroot}/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 +mv %{buildroot}/usr/lib/pkgconfig/tdnfcli.pc %{buildroot}/usr/lib/pkgconfig/tdnf-cli-libs.pc mkdir -p %{buildroot}/%{_tdnfpluginsdir}/tdnfrepogpgcheck mv %{buildroot}/%{_tdnfpluginsdir}/libtdnfrepogpgcheck.so %{buildroot}/%{_tdnfpluginsdir}/tdnfrepogpgcheck/libtdnfrepogpgcheck.so -cd python +mv %{buildroot}/lib/systemd/system/ %{buildroot}/%{_libdir}/systemd/ + +pushd python python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} -cd .. +popd 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 + +# 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 + +# %post automatic +# %systemd_post %{name}-automatic.timer +# %systemd_post %{name}-automatic-notifyonly.timer +# %systemd_post %{name}-automatic-install.timer + +# %preun automatic +# %systemd_preun %{name}-automatic.timer +# %systemd_preun %{name}-automatic-notifyonly.timer +# %systemd_preun %{name}-automatic-install.timer + +# %postun automatic +# %systemd_postun_with_restart %{name}-automatic.timer +# %systemd_postun_with_restart %{name}-automatic-notifyonly.timer +# %systemd_postun_with_restart %{name}-automatic-install.timer %files %defattr(-,root,root,0755) @@ -213,8 +238,10 @@ rm -rf %{buildroot}%{_prefix}/lib/systemd %{_bindir}/tdnf-cache-updateinfo %{_libdir}/libtdnf.so.* %config(noreplace) %{_sysconfdir}/tdnf/tdnf.conf + %config %{_libdir}/systemd/system/tdnf-cache-updateinfo.service + %config(noreplace) %{_libdir}/systemd/system/tdnf-cache-updateinfo.timer %config %{_sysconfdir}/motdgen.d/02-tdnf-updateinfo.sh - %dir %{_prefix}/var/cache/tdnf + %dir /var/cache/tdnf %{_datadir}/bash-completion/completions/tdnf %files devel @@ -244,15 +271,42 @@ rm -rf %{buildroot}%{_prefix}/lib/systemd %defattr(-,root,root,0755) %{_bindir}/%{name}-automatic %config(noreplace) %{_sysconfdir}/%{name}/automatic.conf + %{_libdir}/systemd/system/%{name}-automatic.timer + %{_libdir}/systemd/system/%{name}-automatic.service + %{_libdir}/systemd/system/%{name}-automatic-install.timer + %{_libdir}/systemd/system/%{name}-automatic-install.service + %{_libdir}/systemd/system/%{name}-automatic-notifyonly.timer + %{_libdir}/systemd/system/%{name}-automatic-notifyonly.service %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-2 +- 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 @@ -362,4 +416,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 - From 672a5863b7646eeb79c5c446126c31cbf88fc20f Mon Sep 17 00:00:00 2001 From: David Stancu Date: Wed, 17 Nov 2021 21:43:52 -0500 Subject: [PATCH 2/4] oops / cache dir --- packages/tdnf/SPECS/tdnf.spec | 64 +++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/tdnf/SPECS/tdnf.spec b/packages/tdnf/SPECS/tdnf.spec index 9bfadc926..67a4c7848 100644 --- a/packages/tdnf/SPECS/tdnf.spec +++ b/packages/tdnf/SPECS/tdnf.spec @@ -136,11 +136,11 @@ cd build && make %{?_smp_mflags} check %install cd build && make DESTDIR=%{buildroot} install find %{buildroot} -name '*.a' -delete -mkdir -p %{buildroot}/var/cache/tdnf +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}/usr/lib/pkgconfig/tdnfcli.pc %{buildroot}/usr/lib/pkgconfig/tdnf-cli-libs.pc +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 mv %{buildroot}/lib/systemd/system/ %{buildroot}/%{_libdir}/systemd/ @@ -150,43 +150,43 @@ python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} popd find %{buildroot} -name '*.pyc' -delete -# Pre-install -%pre +# # Pre-install +# %pre - # First argument is 1 => New Installation - # First argument is 2 => Upgrade +# # First argument is 1 => New Installation +# # First argument is 2 => Upgrade -# Post-install -%post +# # Post-install +# %post - # First argument is 1 => New Installation - # First argument is 2 => Upgrade +# # First argument is 1 => New Installation +# # First argument is 2 => Upgrade - /sbin/ldconfig +# /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 +# %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 +# # Pre-uninstall +# %preun - # First argument is 0 => Uninstall - # First argument is 1 => Upgrade +# # 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 +# %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 @@ -241,7 +241,7 @@ rm -rf /var/cache/tdnf/cached-updateinfo.txt %config %{_libdir}/systemd/system/tdnf-cache-updateinfo.service %config(noreplace) %{_libdir}/systemd/system/tdnf-cache-updateinfo.timer %config %{_sysconfdir}/motdgen.d/02-tdnf-updateinfo.sh - %dir /var/cache/tdnf + %dir %{_prefix}/var/cache/tdnf %{_datadir}/bash-completion/completions/tdnf %files devel From 71c012ffaafc5b685c310928c36c8a5558b37edd Mon Sep 17 00:00:00 2001 From: David Stancu Date: Sun, 21 Nov 2021 22:00:08 -0500 Subject: [PATCH 3/4] rm systemd files from buildroot before packaging, give up on figuring out correct termios defines --- .../tdnf/SOURCES/cli-termios.sgifixes.patch | 18 +- packages/tdnf/SOURCES/latest.patch | 201 ++++++++++++++++++ packages/tdnf/SPECS/tdnf.spec | 99 +-------- 3 files changed, 220 insertions(+), 98 deletions(-) create mode 100644 packages/tdnf/SOURCES/latest.patch diff --git a/packages/tdnf/SOURCES/cli-termios.sgifixes.patch b/packages/tdnf/SOURCES/cli-termios.sgifixes.patch index f965a5e47..a4808eec6 100644 --- a/packages/tdnf/SOURCES/cli-termios.sgifixes.patch +++ b/packages/tdnf/SOURCES/cli-termios.sgifixes.patch @@ -1,10 +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-17 21:14:29.710175680 +0000 -@@ -20,6 +20,7 @@ - */ ++++ tdnf-3.1.5/tools/cli/lib/output.c 2021-11-21 21:47:50.156623360 +0000 +@@ -21,6 +21,17 @@ #include "includes.h" -+#include ++#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/latest.patch b/packages/tdnf/SOURCES/latest.patch new file mode 100644 index 000000000..d802cc764 --- /dev/null +++ b/packages/tdnf/SOURCES/latest.patch @@ -0,0 +1,201 @@ +diff -Nur tdnf-3.1.5-orig/CMakeLists.txt tdnf-3.1.5/CMakeLists.txt +--- tdnf-3.1.5-orig/CMakeLists.txt 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/CMakeLists.txt 2021-11-21 21:46:20.081393280 +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 /usr/sgug/etc/motdgen.d) ++ + if(NOT SYSTEMD_DIR) +- set(SYSTEMD_DIR /lib/systemd/system) ++ set(SYSTEMD_DIR /usr/sgug/lib/systemd/system) + endif() + + +diff -Nur tdnf-3.1.5-orig/CMakeLists.txt.rej tdnf-3.1.5/CMakeLists.txt.rej +--- tdnf-3.1.5-orig/CMakeLists.txt.rej 2021-11-17 20:25:37.163415120 +0000 ++++ tdnf-3.1.5/CMakeLists.txt.rej 1969-12-31 19:00:00.000000000 +0000 +@@ -1,20 +0,0 @@ +---- CMakeLists.txt 2021-10-06 18:39:26.000000000 +0000 +-+++ CMakeLists.txt 2021-11-17 20:24:04.261990240 +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(CMAKE_INSTALL_FULL_SYSCONDIR "/usr/sgug/etc") +-+set(SYSCONFDIR /usr/sgug/etc) +- +--set(MOTGEN_DIR /etc/motdgen.d) +-+set(MOTGEN_DIR /usr/sgug/etc/motdgen.d) +- +- if(NOT SYSTEMD_DIR) +-- set(SYSTEMD_DIR /lib/systemd/system) +-+ set(SYSTEMD_DIR /usr/sgug/lib/systemd/system) +- +- +- +diff -Nur tdnf-3.1.5-orig/client/defines.h tdnf-3.1.5/client/defines.h +--- 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-21 21:46:20.122920800 +0000 +@@ -59,7 +59,7 @@ + + //Repo defines + #define TDNF_REPO_EXT ".repo" +-#define TDNF_CONF_FILE "/etc/tdnf/tdnf.conf" ++#define TDNF_CONF_FILE "/usr/sgug/etc/tdnf/tdnf.conf" + #define TDNF_CONF_GROUP "main" + //Conf file key names + #define TDNF_CONF_KEY_GPGCHECK "gpgcheck" +@@ -110,10 +110,10 @@ + #define TDNF_REPO_BASEURL_FILE_NAME "baseurl" + + // 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" +-#define TDNF_DEFAULT_DISTROARCHPKG "x86_64" ++#define TDNF_DEFAULT_REPO_LOCATION "/usr/sgug/etc/yum.repos.d" ++#define TDNF_DEFAULT_CACHE_LOCATION "/usr/sgug/var/cache/tdnf" ++#define TDNF_DEFAULT_DISTROVERPKG "sgugrse-release" ++#define TDNF_DEFAULT_DISTROARCHPKG "mips" + #define TDNF_RPM_CACHE_DIR_NAME "rpms" + #define TDNF_REPODATA_DIR_NAME "repodata" + #define TDNF_SOLVCACHE_DIR_NAME "solvcache" +@@ -140,7 +140,7 @@ + /* plugin defines */ + #define TDNF_DEFAULT_PLUGINS_ENABLED 0 + #define TDNF_DEFAULT_PLUGIN_PATH SYSTEM_LIBDIR"/tdnf-plugins" +-#define TDNF_DEFAULT_PLUGIN_CONF_PATH "/etc/tdnf/pluginconf.d" ++#define TDNF_DEFAULT_PLUGIN_CONF_PATH "/usr/sgug/etc/tdnf/pluginconf.d" + #define TDNF_PLUGIN_CONF_EXT ".conf" + #define TDNF_PLUGIN_CONF_EXT_LEN 5 + #define TDNF_PLUGIN_CONF_MAIN_SECTION "main" +diff -Nur tdnf-3.1.5-orig/client/utils.c tdnf-3.1.5/client/utils.c +--- tdnf-3.1.5-orig/client/utils.c 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/client/utils.c 2021-11-21 21:46:20.229391920 +0000 +@@ -509,24 +509,7 @@ + ) + { + uint32_t dwError = 0; +- char* pszArch = NULL; +- struct utsname stUtsName; +- +- if(!ppszArch) +- { +- dwError = ERROR_TDNF_INVALID_PARAMETER; +- BAIL_ON_TDNF_ERROR(dwError); +- } +- if(uname(&stUtsName) != 0) +- { +- dwError = errno; +- } +- BAIL_ON_TDNF_SYSTEM_ERROR(dwError); +- +- dwError = TDNFAllocateString(stUtsName.machine, &pszArch); +- BAIL_ON_TDNF_ERROR(dwError); +- +- *ppszArch = pszArch; ++ *ppszArch = strdup("mips"); + + cleanup: + return dwError; +@@ -536,7 +519,6 @@ + { + *ppszArch = NULL; + } +- TDNF_SAFE_FREE_MEMORY(pszArch); + goto cleanup; + } + +diff -Nur tdnf-3.1.5-orig/common/utils.c tdnf-3.1.5/common/utils.c +--- tdnf-3.1.5-orig/common/utils.c 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/common/utils.c 2021-11-21 21:46:20.263560000 +0000 +@@ -586,6 +586,10 @@ + dwError = TDNFAllocateMemory(1, strlen(pszPath) + 1, (void **)&pszNormalPath); + BAIL_ON_TDNF_ERROR(dwError); + ++#if defined(__sgi) ++ *ppszNormalPath = strdup(pszPath); ++ return dwError; ++#endif + q = pszNormalPath; + + while(*p) +diff -Nur tdnf-3.1.5-orig/etc/tdnf/tdnf.conf tdnf-3.1.5/etc/tdnf/tdnf.conf +--- tdnf-3.1.5-orig/etc/tdnf/tdnf.conf 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/etc/tdnf/tdnf.conf 2021-11-21 21:46:20.160430560 +0000 +@@ -2,5 +2,5 @@ + gpgcheck=1 + installonly_limit=3 + clean_requirements_on_remove=true +-repodir=/etc/yum.repos.d +-cachedir=/var/cache/tdnf ++repodir=/usr/sgug/etc/yum.repos.d ++cachedir=/usr/sgug/var/cache/tdnf +diff -Nur tdnf-3.1.5-orig/solv/tdnfpool.c tdnf-3.1.5/solv/tdnfpool.c +--- tdnf-3.1.5-orig/solv/tdnfpool.c 2021-10-06 18:39:26.000000000 +0000 ++++ tdnf-3.1.5/solv/tdnfpool.c 2021-11-21 21:46:20.190429680 +0000 +@@ -106,7 +106,7 @@ + BAIL_ON_TDNF_LIBSOLV_ERROR(dwError); + } + +- pool_setarch(pPool, systemInfo.machine); ++ pool_setarch(pPool, strdup("mips")); + pool_set_flag(pPool, POOL_FLAG_ADDFILEPROVIDESFILTERED, 1); + + dwError = SolvReadInstalledRpms(pPool, &pRepo, pszCacheDir); +diff -Nur tdnf-3.1.5-orig/tools/cli/lib/output.c tdnf-3.1.5/tools/cli/lib/output.c +--- 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:48:05.330564560 +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 -Nur tdnf-3.1.5-orig/tools/cli/lib/output.c.rej tdnf-3.1.5/tools/cli/lib/output.c.rej +--- tdnf-3.1.5-orig/tools/cli/lib/output.c.rej 1969-12-31 19:00:00.000000000 +0000 ++++ tdnf-3.1.5/tools/cli/lib/output.c.rej 2021-11-21 21:46:20.303872400 +0000 +@@ -0,0 +1,20 @@ ++--- tools/cli/lib/output.c 2021-10-06 18:39:26.000000000 +0000 +++++ tools/cli/lib/output.c 2021-11-21 21:45:37.803940800 +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( ++ diff --git a/packages/tdnf/SPECS/tdnf.spec b/packages/tdnf/SPECS/tdnf.spec index 67a4c7848..aea2d40bb 100644 --- a/packages/tdnf/SPECS/tdnf.spec +++ b/packages/tdnf/SPECS/tdnf.spec @@ -25,7 +25,7 @@ Patch106: cli-termios.sgifixes.patch # Patch107: tdnf-printfprecision.sgifixes.patch Requires: rpm-libs -Requires: curl-libs +Requires: libcurl Requires: tdnf-cli-libs = %{version}-%{release} Requires: libsolv Requires: libmetalink @@ -50,7 +50,7 @@ BuildRequires: python3-devel # BuildRequires: libxml2 # %endif -Obsoletes: yum +# Obsoletes: yum Provides: yum %description @@ -143,93 +143,13 @@ 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 -mv %{buildroot}/lib/systemd/system/ %{buildroot}/%{_libdir}/systemd/ +rm -rf %{buildroot}%{_prefix}/lib/systemd/system/ -pushd python +cd python python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} -popd +cd .. find %{buildroot} -name '*.pyc' -delete -# # 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 - -# %post automatic -# %systemd_post %{name}-automatic.timer -# %systemd_post %{name}-automatic-notifyonly.timer -# %systemd_post %{name}-automatic-install.timer - -# %preun automatic -# %systemd_preun %{name}-automatic.timer -# %systemd_preun %{name}-automatic-notifyonly.timer -# %systemd_preun %{name}-automatic-install.timer - -# %postun automatic -# %systemd_postun_with_restart %{name}-automatic.timer -# %systemd_postun_with_restart %{name}-automatic-notifyonly.timer -# %systemd_postun_with_restart %{name}-automatic-install.timer - %files %defattr(-,root,root,0755) %{_bindir}/tdnf @@ -238,8 +158,6 @@ find %{buildroot} -name '*.pyc' -delete %{_bindir}/tdnf-cache-updateinfo %{_libdir}/libtdnf.so.* %config(noreplace) %{_sysconfdir}/tdnf/tdnf.conf - %config %{_libdir}/systemd/system/tdnf-cache-updateinfo.service - %config(noreplace) %{_libdir}/systemd/system/tdnf-cache-updateinfo.timer %config %{_sysconfdir}/motdgen.d/02-tdnf-updateinfo.sh %dir %{_prefix}/var/cache/tdnf %{_datadir}/bash-completion/completions/tdnf @@ -249,7 +167,6 @@ find %{buildroot} -name '*.pyc' -delete %{_includedir}/tdnf/*.h %{_libdir}/libtdnf.so %{_libdir}/libtdnfcli.so - %exclude %{_libdir}/debug %{_libdir}/pkgconfig/tdnf.pc %{_libdir}/pkgconfig/tdnf-cli-libs.pc @@ -271,12 +188,6 @@ find %{buildroot} -name '*.pyc' -delete %defattr(-,root,root,0755) %{_bindir}/%{name}-automatic %config(noreplace) %{_sysconfdir}/%{name}/automatic.conf - %{_libdir}/systemd/system/%{name}-automatic.timer - %{_libdir}/systemd/system/%{name}-automatic.service - %{_libdir}/systemd/system/%{name}-automatic-install.timer - %{_libdir}/systemd/system/%{name}-automatic-install.service - %{_libdir}/systemd/system/%{name}-automatic-notifyonly.timer - %{_libdir}/systemd/system/%{name}-automatic-notifyonly.service %changelog * Wed Nov 17 2021 David Stancu - 3.1.5-2 From 3e7a8c93e585e82a100f567657392afd082afdea Mon Sep 17 00:00:00 2001 From: David Stancu Date: Sun, 21 Nov 2021 22:21:12 -0500 Subject: [PATCH 4/4] update for 3.1.5 --- packages/tdnf/SOURCES/latest.patch | 201 ------------------ .../SOURCES/tdnf-no-dlclose-plugins.patch | 15 +- 2 files changed, 12 insertions(+), 204 deletions(-) delete mode 100644 packages/tdnf/SOURCES/latest.patch diff --git a/packages/tdnf/SOURCES/latest.patch b/packages/tdnf/SOURCES/latest.patch deleted file mode 100644 index d802cc764..000000000 --- a/packages/tdnf/SOURCES/latest.patch +++ /dev/null @@ -1,201 +0,0 @@ -diff -Nur tdnf-3.1.5-orig/CMakeLists.txt tdnf-3.1.5/CMakeLists.txt ---- tdnf-3.1.5-orig/CMakeLists.txt 2021-10-06 18:39:26.000000000 +0000 -+++ tdnf-3.1.5/CMakeLists.txt 2021-11-21 21:46:20.081393280 +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 /usr/sgug/etc/motdgen.d) -+ - if(NOT SYSTEMD_DIR) -- set(SYSTEMD_DIR /lib/systemd/system) -+ set(SYSTEMD_DIR /usr/sgug/lib/systemd/system) - endif() - - -diff -Nur tdnf-3.1.5-orig/CMakeLists.txt.rej tdnf-3.1.5/CMakeLists.txt.rej ---- tdnf-3.1.5-orig/CMakeLists.txt.rej 2021-11-17 20:25:37.163415120 +0000 -+++ tdnf-3.1.5/CMakeLists.txt.rej 1969-12-31 19:00:00.000000000 +0000 -@@ -1,20 +0,0 @@ ----- CMakeLists.txt 2021-10-06 18:39:26.000000000 +0000 --+++ CMakeLists.txt 2021-11-17 20:24:04.261990240 +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(CMAKE_INSTALL_FULL_SYSCONDIR "/usr/sgug/etc") --+set(SYSCONFDIR /usr/sgug/etc) -- ---set(MOTGEN_DIR /etc/motdgen.d) --+set(MOTGEN_DIR /usr/sgug/etc/motdgen.d) -- -- if(NOT SYSTEMD_DIR) --- set(SYSTEMD_DIR /lib/systemd/system) --+ set(SYSTEMD_DIR /usr/sgug/lib/systemd/system) -- -- -- -diff -Nur tdnf-3.1.5-orig/client/defines.h tdnf-3.1.5/client/defines.h ---- 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-21 21:46:20.122920800 +0000 -@@ -59,7 +59,7 @@ - - //Repo defines - #define TDNF_REPO_EXT ".repo" --#define TDNF_CONF_FILE "/etc/tdnf/tdnf.conf" -+#define TDNF_CONF_FILE "/usr/sgug/etc/tdnf/tdnf.conf" - #define TDNF_CONF_GROUP "main" - //Conf file key names - #define TDNF_CONF_KEY_GPGCHECK "gpgcheck" -@@ -110,10 +110,10 @@ - #define TDNF_REPO_BASEURL_FILE_NAME "baseurl" - - // 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" --#define TDNF_DEFAULT_DISTROARCHPKG "x86_64" -+#define TDNF_DEFAULT_REPO_LOCATION "/usr/sgug/etc/yum.repos.d" -+#define TDNF_DEFAULT_CACHE_LOCATION "/usr/sgug/var/cache/tdnf" -+#define TDNF_DEFAULT_DISTROVERPKG "sgugrse-release" -+#define TDNF_DEFAULT_DISTROARCHPKG "mips" - #define TDNF_RPM_CACHE_DIR_NAME "rpms" - #define TDNF_REPODATA_DIR_NAME "repodata" - #define TDNF_SOLVCACHE_DIR_NAME "solvcache" -@@ -140,7 +140,7 @@ - /* plugin defines */ - #define TDNF_DEFAULT_PLUGINS_ENABLED 0 - #define TDNF_DEFAULT_PLUGIN_PATH SYSTEM_LIBDIR"/tdnf-plugins" --#define TDNF_DEFAULT_PLUGIN_CONF_PATH "/etc/tdnf/pluginconf.d" -+#define TDNF_DEFAULT_PLUGIN_CONF_PATH "/usr/sgug/etc/tdnf/pluginconf.d" - #define TDNF_PLUGIN_CONF_EXT ".conf" - #define TDNF_PLUGIN_CONF_EXT_LEN 5 - #define TDNF_PLUGIN_CONF_MAIN_SECTION "main" -diff -Nur tdnf-3.1.5-orig/client/utils.c tdnf-3.1.5/client/utils.c ---- tdnf-3.1.5-orig/client/utils.c 2021-10-06 18:39:26.000000000 +0000 -+++ tdnf-3.1.5/client/utils.c 2021-11-21 21:46:20.229391920 +0000 -@@ -509,24 +509,7 @@ - ) - { - uint32_t dwError = 0; -- char* pszArch = NULL; -- struct utsname stUtsName; -- -- if(!ppszArch) -- { -- dwError = ERROR_TDNF_INVALID_PARAMETER; -- BAIL_ON_TDNF_ERROR(dwError); -- } -- if(uname(&stUtsName) != 0) -- { -- dwError = errno; -- } -- BAIL_ON_TDNF_SYSTEM_ERROR(dwError); -- -- dwError = TDNFAllocateString(stUtsName.machine, &pszArch); -- BAIL_ON_TDNF_ERROR(dwError); -- -- *ppszArch = pszArch; -+ *ppszArch = strdup("mips"); - - cleanup: - return dwError; -@@ -536,7 +519,6 @@ - { - *ppszArch = NULL; - } -- TDNF_SAFE_FREE_MEMORY(pszArch); - goto cleanup; - } - -diff -Nur tdnf-3.1.5-orig/common/utils.c tdnf-3.1.5/common/utils.c ---- tdnf-3.1.5-orig/common/utils.c 2021-10-06 18:39:26.000000000 +0000 -+++ tdnf-3.1.5/common/utils.c 2021-11-21 21:46:20.263560000 +0000 -@@ -586,6 +586,10 @@ - dwError = TDNFAllocateMemory(1, strlen(pszPath) + 1, (void **)&pszNormalPath); - BAIL_ON_TDNF_ERROR(dwError); - -+#if defined(__sgi) -+ *ppszNormalPath = strdup(pszPath); -+ return dwError; -+#endif - q = pszNormalPath; - - while(*p) -diff -Nur tdnf-3.1.5-orig/etc/tdnf/tdnf.conf tdnf-3.1.5/etc/tdnf/tdnf.conf ---- tdnf-3.1.5-orig/etc/tdnf/tdnf.conf 2021-10-06 18:39:26.000000000 +0000 -+++ tdnf-3.1.5/etc/tdnf/tdnf.conf 2021-11-21 21:46:20.160430560 +0000 -@@ -2,5 +2,5 @@ - gpgcheck=1 - installonly_limit=3 - clean_requirements_on_remove=true --repodir=/etc/yum.repos.d --cachedir=/var/cache/tdnf -+repodir=/usr/sgug/etc/yum.repos.d -+cachedir=/usr/sgug/var/cache/tdnf -diff -Nur tdnf-3.1.5-orig/solv/tdnfpool.c tdnf-3.1.5/solv/tdnfpool.c ---- tdnf-3.1.5-orig/solv/tdnfpool.c 2021-10-06 18:39:26.000000000 +0000 -+++ tdnf-3.1.5/solv/tdnfpool.c 2021-11-21 21:46:20.190429680 +0000 -@@ -106,7 +106,7 @@ - BAIL_ON_TDNF_LIBSOLV_ERROR(dwError); - } - -- pool_setarch(pPool, systemInfo.machine); -+ pool_setarch(pPool, strdup("mips")); - pool_set_flag(pPool, POOL_FLAG_ADDFILEPROVIDESFILTERED, 1); - - dwError = SolvReadInstalledRpms(pPool, &pRepo, pszCacheDir); -diff -Nur tdnf-3.1.5-orig/tools/cli/lib/output.c tdnf-3.1.5/tools/cli/lib/output.c ---- 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:48:05.330564560 +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 -Nur tdnf-3.1.5-orig/tools/cli/lib/output.c.rej tdnf-3.1.5/tools/cli/lib/output.c.rej ---- tdnf-3.1.5-orig/tools/cli/lib/output.c.rej 1969-12-31 19:00:00.000000000 +0000 -+++ tdnf-3.1.5/tools/cli/lib/output.c.rej 2021-11-21 21:46:20.303872400 +0000 -@@ -0,0 +1,20 @@ -+--- tools/cli/lib/output.c 2021-10-06 18:39:26.000000000 +0000 -++++ tools/cli/lib/output.c 2021-11-21 21:45:37.803940800 +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( -+ 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;