[packages/dnf/DEVEL-2] - partial update to 2.7.5; saving work

qboosh qboosh at pld-linux.org
Wed May 30 09:41:41 CEST 2018


commit 390ec9a3f8415876d68b5e9eea45dcd64c95b91e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed May 30 09:42:28 2018 +0200

    - partial update to 2.7.5; saving work

 dnf-python.patch | 11 +++++++++
 dnf.spec         | 68 ++++++++++++++++++++++++++++++++++----------------------
 rpm5.patch       | 50 +++++++----------------------------------
 3 files changed, 60 insertions(+), 69 deletions(-)
---
diff --git a/dnf.spec b/dnf.spec
index 8ea479f..a63e333 100644
--- a/dnf.spec
+++ b/dnf.spec
@@ -1,4 +1,5 @@
 # TODO
+# - finish, update dependencies, add missing modules to PLD
 # - make -DSYSTEMD_DIR actually to work: https://github.com/rpm-software-management/dnf/pull/213
 #
 # Conditional build:
@@ -6,29 +7,32 @@
 %bcond_without	python2		# CPython 2.x version
 %bcond_with	python3		# CPython 3.x version (dependencies not met currently)
 #
-%define	gitrev	a7e0aa1
-%define	hawkey_ver	0.5.2
-%define	librepo_ver	1.7.5
-%define	libcomps_ver	0.1.6
+%define	hawkey_ver	0.11.1
+%define	librepo_ver	1.8.1
+%define	libcomps_ver	0.1.8
+#define	libmodulemd_ver	1.4.0
+#define	smartcols_ver	0.3.0
 %define	rpm_ver		5.4.0
 
 Summary:	Package manager forked from Yum, using libsolv as a dependency resolver
 Summary(pl.UTF-8):	Zarządca pakietów wywodzący się z Yuma, wykorzystujący libsolv do rozwiązywania zależności
 Name:		dnf
-Version:	0.6.3
-Release:	0.5
+Version:	2.7.5
+%define	subver	modularity-6
+Release:	0.1
 Group:		Base
 # GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING
 License:	GPL v2 (parts on GPL v2+ or GPL)
-#Source0:	http://rpm-software-management.fedorapeople.org/%{name}-%{gitrev}.tar.xz
-Source0:	http://pkgs.fedoraproject.org/repo/pkgs/dnf/%{name}-%{gitrev}.tar.xz/82ff495e445ddc56e70dc91750a421ac/dnf-%{gitrev}.tar.xz
-# Source0-md5:	82ff495e445ddc56e70dc91750a421ac
+#Source0Download: https://github.com/rpm-software-management/dnf/releases
+Source0:	https://github.com/rpm-software-management/dnf/archive/%{version}-%{subver}/%{name}-%{version}-%{subver}.tar.gz
+# Source0-md5:	9f29c69ba7826c9cdacc7d3b811dc163
 Patch0:		rpm5.patch
+Patch1:		%{name}-python.patch
 URL:		https://github.com/rpm-software-management/dnf
 BuildRequires:	cmake >= 2.4
 BuildRequires:	gettext-tools
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.647
+BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	sed >= 4.0
 BuildRequires:	sphinx-pdg
 BuildRequires:	systemd-devel
@@ -36,15 +40,15 @@ BuildRequires:	systemd-devel
 BuildRequires:	python >= 2
 %if %{with tests}
 #BuildRequires:	python-bugzilla
+BuildRequires:	python-gpg
 BuildRequires:	python-hawkey >= %{hawkey_ver}
 BuildRequires:	python-hawkey-test >= %{hawkey_ver}
 BuildRequires:	python-iniparse
 BuildRequires:	python-libcomps >= %{libcomps_ver}
 BuildRequires:	python-librepo >= %{librepo_ver}
-BuildRequires:	python-pygpgme
-BuildRequires:	python-rpm >= %{rpm_ver}
 BuildRequires:	python-nose
 BuildRequires:	python-pyliblzma
+BuildRequires:	python-rpm >= %{rpm_ver}
 %endif
 %endif
 %if %{with python3}
@@ -56,7 +60,8 @@ Requires:	python-hawkey >= %{hawkey_ver}
 Requires:	python-iniparse
 Requires:	python-libcomps >= %{libcomps_ver}
 Requires:	python-librepo >= %{librepo_ver}
-Requires:	python-pygpgme
+Requires:	python-gpg
+Requires:	python-pyliblzma
 Requires:	python-rpm >= %{rpm_ver}
 #Requires:	rpm-plugin-systemd-inhibit
 Requires:	systemd-units >= 0.38
@@ -75,9 +80,7 @@ rozwiązywania zależności.
 Summary:	Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
 Summary(pl.UTF-8):	Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania
 Group:		Base
-Requires(post):	systemd
-Requires(preun):	systemd
-Requires(postun):	systemd
+Requires(post,preun,postun):	systemd
 Requires:	%{name} = %{version}-%{release}
 
 %description automatic
@@ -93,7 +96,7 @@ Summary:	Bash completion for dnf command
 Summary(pl.UTF-8):	Bashowe uzupełnianie parametrów dla polecenia dnf
 Group:		Applications/Shells
 Requires:	%{name} = %{version}-%{release}
-Requires:	bash-completion
+Requires:	bash-completion >= 2.0
 
 %description -n bash-completion-dnf
 Bash completion for dnf command.
@@ -108,13 +111,13 @@ Group:		Libraries/Python
 # for common files (make -common?)
 Requires:	%{name} = %{version}-%{release}
 Requires:	deltarpm
+Requires:	python3-gpg
 Requires:	python3-hawkey >= %{hawkey_ver}
 # XXX: missing in PLD
 #Requires:	python3-iniparse
 Requires:	python3-libcomps >= %{libcomps_ver}
-# XXX: missing in PLD
-#Requires:	python3-librepo >= %{librepo_ver}
-Requires:	python3-pygpgme
+Requires:	python3-librepo >= %{librepo_ver}
+#Requires:	python3-pyliblzma
 # XXX: missing in PLD (is it possible with rpm5?)
 #Requires:	python3-rpm >= %{rpm_ver}
 
@@ -125,8 +128,9 @@ Python 3 version of dnf package manager.
 Wersja zarządcy pakietów dnf dla Pythona 3.
 
 %prep
-%setup -q -n %{name}
+%setup -q -n %{name}-%{version}-%{subver}
 %patch0 -p1
+%patch1 -p1
 
 # the -D doesn't work
 %{__sed} -i -e '/SYSTEMD_DIR/ s#/usr/lib/systemd/system#%{systemdunitdir}#' CMakeLists.txt
@@ -136,6 +140,7 @@ Wersja zarządcy pakietów dnf dla Pythona 3.
 install -d build-py2
 cd build-py2
 %cmake .. \
+	-DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
 	-DCMAKE_CXX_COMPILER="%{__cc}" \
 	-DCMAKE_CXX_COMPILER_WORKS=1 \
 	-DPYTHON_DESIRED=2 \
@@ -155,6 +160,7 @@ cd ..
 install -d build-py3
 cd build-py3
 %cmake .. \
+	-DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
 	-DCMAKE_CXX_COMPILER="%{__cc}" \
 	-DCMAKE_CXX_COMPILER_WORKS=1 \
 	-DPYTHON_DESIRED=3 \
@@ -189,8 +195,6 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}{,-rpm,-plugin}.log
 
 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
-%else
-%{__rm} $RPM_BUILD_ROOT%{_bindir}/dnf-3
 %endif
 
 %clean
@@ -218,7 +222,7 @@ rm -rf $RPM_BUILD_ROOT
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS PACKAGE-LICENSING README.rst
-%attr(755,root,root) %{_bindir}/dnf
+%attr(755,root,root) %{_bindir}/dnf-2
 %dir %{_sysconfdir}/%{name}
 %dir %{_sysconfdir}/%{name}/plugins
 %dir %{_sysconfdir}/%{name}/protected.d
@@ -226,10 +230,14 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
+%{_mandir}/man5/dnf.conf.5*
+%{_mandir}/man5/yum.conf.5*
 %{_mandir}/man8/dnf.8*
-%{_mandir}/man8/dnf.conf.8*
+%{_mandir}/man8/yum.8*
+%{_mandir}/man8/yum2dnf.8*
 %{systemdunitdir}/dnf-makecache.service
 %{systemdunitdir}/dnf-makecache.timer
+%{systemdtmpfilesdir}/dnf.conf
 %{py_sitescriptdir}/dnf
 %exclude %{py_sitescriptdir}/dnf/automatic
 
@@ -239,17 +247,23 @@ rm -rf $RPM_BUILD_ROOT
 
 %files automatic
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/dnf-automatic
+%attr(755,root,root) %{_bindir}/dnf-automatic-2
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
 %{_mandir}/man8/dnf.automatic.8*
 %{systemdunitdir}/dnf-automatic.service
 %{systemdunitdir}/dnf-automatic.timer
+%{systemdunitdir}/dnf-automatic-download.service
+%{systemdunitdir}/dnf-automatic-download.timer
+%{systemdunitdir}/dnf-automatic-install.service
+%{systemdunitdir}/dnf-automatic-install.timer
+%{systemdunitdir}/dnf-automatic-notifyonly.service
+%{systemdunitdir}/dnf-automatic-notifyonly.timer
 %{py_sitescriptdir}/dnf/automatic
 %endif
 
 %files -n bash-completion-dnf
 %defattr(644,root,root,755)
-/etc/bash_completion.d/dnf-completion.bash
+%{bash_compdir}/dnf
 
 %if %{with python3}
 %files -n python3-dnf
diff --git a/dnf-python.patch b/dnf-python.patch
new file mode 100644
index 0000000..cf80e80
--- /dev/null
+++ b/dnf-python.patch
@@ -0,0 +1,11 @@
+--- dnf-2.7.5-modularity-6/CMakeLists.txt.orig	2018-05-27 21:45:19.513286281 +0200
++++ dnf-2.7.5-modularity-6/CMakeLists.txt	2018-05-28 19:40:47.585718398 +0200
+@@ -18,7 +18,7 @@
+ 	FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+ endif()
+ 
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(False, prefix='${CMAKE_INSTALL_PREFIX}'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write('%s.%s' % (sys.version_info.major, sys.version_info.minor))" OUTPUT_VARIABLE PYTHON_MAJOR_DOT_MINOR_VERSION)
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+ 
diff --git a/rpm5.patch b/rpm5.patch
index be117f3..66ea554 100644
--- a/rpm5.patch
+++ b/rpm5.patch
@@ -1,45 +1,11 @@
---- dnf/dnf/base.py~	2014-12-09 13:36:18.000000000 +0200
-+++ dnf/dnf/base.py	2015-01-31 19:34:11.698771194 +0200
-@@ -284,10 +284,9 @@
-                         'nodocs': rpm.RPMTRANS_FLAG_NODOCS,
+--- dnf-2.7.5-modularity-6/dnf/base.py.orig	2018-05-27 21:14:15.773307563 +0200
++++ dnf-2.7.5-modularity-6/dnf/base.py	2018-05-27 21:22:47.703301715 +0200
+@@ -601,7 +601,7 @@
                          'test': rpm.RPMTRANS_FLAG_TEST,
                          'justdb': rpm.RPMTRANS_FLAG_JUSTDB,
--                        'nocontexts': rpm.RPMTRANS_FLAG_NOCONTEXTS,
--                        'nocrypto' : rpm.RPMTRANS_FLAG_NOFILEDIGEST}
--    _TS_VSFLAGS_TO_RPM = {'nocrypto' : rpm._RPMVSF_NOSIGNATURES |
--                          rpm._RPMVSF_NODIGESTS}
-+                        'nocontexts': 0,
-+                        'nocrypto' : 0}
-+    _TS_VSFLAGS_TO_RPM = {'nocrypto' : rpm.RPMVSF_NODSAHEADER }
+                         'nocontexts': rpm.RPMTRANS_FLAG_NOCONTEXTS,
+-                        'nocrypto': rpm.RPMTRANS_FLAG_NOFILEDIGEST}
++                        'nocrypto': rpm.RPMTRANS_FLAG_NOFDIGEST}
+     _TS_VSFLAGS_TO_RPM = {'nocrypto': rpm._RPMVSF_NOSIGNATURES |
+                           rpm._RPMVSF_NODIGESTS}
  
-     @property
-     def ts(self):
-@@ -1254,7 +1253,7 @@
- 
-         installroot = self.conf.installroot
-         myts = dnf.rpm.transaction.initReadOnlyTransaction(root=installroot)
--        myts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-+        myts.pushVSFlags(~rpm.RPMVSF_NODSAHEADER)
-         idx = myts.dbMatch('name', 'gpg-pubkey')
-         keys = len(idx)
-         del idx
---- dnf/dnf/rpm/transaction.py~	2014-12-09 13:36:18.000000000 +0200
-+++ dnf/dnf/rpm/transaction.py	2015-01-31 19:37:26.945547832 +0200
-@@ -119,5 +119,5 @@
- 
- def initReadOnlyTransaction(root='/'):
-     read_ts =  TransactionWrapper(root=root)
--    read_ts.pushVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-+    read_ts.pushVSFlags(rpm.RPMVSF_NODSAHEADER)
-     return read_ts
---- dnf/dnf/rpm/__init__.py~	2014-12-09 13:36:18.000000000 +0200
-+++ dnf/dnf/rpm/__init__.py	2015-01-31 19:36:50.920349099 +0200
-@@ -29,7 +29,7 @@
-     """Calculate the release version for the system. :api"""
- 
-     ts = transaction.initReadOnlyTransaction(root=installroot)
--    ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-+    ts.pushVSFlags(~rpm.RPMVSF_NODSAHEADER)
-     for distroverpkg in dnf.const.DISTROVERPKG:
-         try:
-             idx = ts.dbMatch('provides', distroverpkg)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dnf.git/commitdiff/390ec9a3f8415876d68b5e9eea45dcd64c95b91e



More information about the pld-cvs-commit mailing list