[packages/dnf] up to 0.6.3

glen glen at pld-linux.org
Sat Jan 31 20:04:36 CET 2015


commit 70e5df64fa2ac1d56ff3ab361d7723879502ecbc
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Jan 31 20:48:14 2015 +0200

    up to 0.6.3
    
    sync up to fedora 1e2260e

 dnf.spec   | 69 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
 rpm5.patch | 38 +++++++++++++++++-----------------
 2 files changed, 73 insertions(+), 34 deletions(-)
---
diff --git a/dnf.spec b/dnf.spec
index d409066..95f88c8 100644
--- a/dnf.spec
+++ b/dnf.spec
@@ -1,22 +1,24 @@
 # TODO
 # - bash-completion subpackage
 # - make -DSYSTEMD_DIR actually to work
-%define	gitrev c44cc44
-%define	hawkey_version 0.4.14
-%define	librepo_version 1.7.0
+%define	gitrev a7e0aa1
+%define	hawkey_version 0.5.2
+%define	librepo_version 1.7.5
 %define	libcomps_version 0.1.6
+%define	rpm_version 5.4.0
+
 Summary:	Package manager forked from Yum, using libsolv as a dependency resolver
 Name:		dnf
-Version:	0.5.1
+Version:	0.6.3
 Release:	0.5
 Group:		Base
 # For a breakdown of the licensing, see PACKAGE-LICENSING
 License:	GPL v2+ and GPL v2 and GPL
-#Source0:	http://akozumpl.fedorapeople.org/%{name}-%{gitrev}.tar.xz
-Source0:	http://pkgs.fedoraproject.org/repo/pkgs/dnf/%{name}-%{gitrev}.tar.xz/fdf85937f979702e1968150e8e150666/dnf-%{gitrev}.tar.xz
-# Source0-md5:	fdf85937f979702e1968150e8e150666
+#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
 Patch0:		rpm5.patch
-URL:		https://github.com/akozumpl/dnf
+URL:		https://github.com/rpm-software-management/dnf
 BuildRequires:	cmake
 BuildRequires:	gettext
 BuildRequires:	python
@@ -27,7 +29,8 @@ BuildRequires:	python-iniparse
 BuildRequires:	python-libcomps >= %{libcomps_version}
 BuildRequires:	python-librepo >= %{librepo_version}
 BuildRequires:	python-nose
-BuildRequires:	python-rpm
+BuildRequires:	python-pygpgme
+BuildRequires:	python-rpm >= %{rpm_version}
 BuildRequires:	rpmbuild(macros) >= 1.647
 BuildRequires:	sed >= 4.0
 BuildRequires:	sphinx-pdg
@@ -38,7 +41,9 @@ Requires:	python-hawkey >= %{hawkey_version}
 Requires:	python-iniparse
 Requires:	python-libcomps >= %{libcomps_version}
 Requires:	python-librepo >= %{librepo_version}
-Requires:	python-rpm
+Requires:	python-pygpgme
+Requires:	python-rpm >= %{rpm_version}
+#Requires:	rpm-plugin-systemd-inhibit
 Requires:	systemd-units >= 0.38
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -47,6 +52,18 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Package manager forked from Yum, using libsolv as a dependency
 resolver.
 
+%package automatic
+Summary:	Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
+Group:		Base
+Requires:	%{name} = %{version}-%{release}
+Requires(post):	systemd
+Requires(preun):	systemd
+Requires(postun):	systemd
+
+%description automatic
+Alternative CLI to "dnf upgrade" suitable for automatic, regular
+execution.
+
 %prep
 %setup -q -n %{name}
 %patch0 -p1
@@ -56,6 +73,7 @@ resolver.
 
 %build
 %cmake \
+	-DPYTHON_DESIRED=2 \
 	-DSYSTEMD_DIR=%{systemdunitdir} \
 	.
 
@@ -75,12 +93,10 @@ rm -rf $RPM_BUILD_ROOT
 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
 %py_postclean
 
-mv $RPM_BUILD_ROOT%{_localedir}/lt{_LT,}
-rm -r $RPM_BUILD_ROOT%{_localedir}/id_ID
 %find_lang %{name}
 
-install -d $RPM_BUILD_ROOT{%{py_sitescriptdir}/dnf-plugins,%{_localstatedir}/log}
-touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}/plugins,%{py_sitescriptdir}/dnf-plugins,%{_localstatedir}/log}
+touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}{,-rpm,-plugin}.log
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -94,12 +110,24 @@ rm -rf $RPM_BUILD_ROOT
 %postun
 %systemd_reload
 
+%post automatic
+%systemd_post dnf-automatic.timer
+
+%preun automatic
+%systemd_preun dnf-automatic.timer
+
+%postun automatic
+%systemd_reload
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS README.rst COPYING PACKAGE-LICENSING
 %attr(755,root,root) %{_bindir}/dnf
 %dir %{_sysconfdir}/%{name}
+%dir %{_sysconfdir}/%{name}/plugins
+%dir %{_sysconfdir}/%{name}/protected.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
+%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}/man8/dnf.8*
@@ -107,7 +135,18 @@ rm -rf $RPM_BUILD_ROOT
 %{systemdunitdir}/dnf-makecache.service
 %{systemdunitdir}/dnf-makecache.timer
 %{py_sitescriptdir}/dnf
-%{py_sitescriptdir}/dnf-plugins
+%exclude %{py_sitescriptdir}/dnf/automatic
 
 %ghost %{_localstatedir}/log/%{name}.log
+%ghost %{_localstatedir}/log/%{name}-rpm.log
+%ghost %{_localstatedir}/log/%{name}-plugin.log
 /etc/bash_completion.d/dnf-completion.bash
+
+%files automatic
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/dnf-automatic
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
+%{_mandir}/man8/dnf.automatic.8*
+%{systemdunitdir}/dnf-automatic.service
+%{systemdunitdir}/dnf-automatic.timer
+%{py_sitescriptdir}/dnf/automatic
diff --git a/rpm5.patch b/rpm5.patch
index 595db1a..be117f3 100644
--- a/rpm5.patch
+++ b/rpm5.patch
@@ -1,45 +1,45 @@
---- dnf/dnf/base.py	2014-06-15 20:38:11.739642641 +0300
-+++ ./dnf/base.py	2014-06-15 23:42:32.536552554 +0300
-@@ -345,10 +345,9 @@
+--- 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,
                          '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 }
+-                          rpm._RPMVSF_NODIGESTS}
 +                        'nocontexts': 0,
 +                        'nocrypto' : 0}
 +    _TS_VSFLAGS_TO_RPM = {'nocrypto' : rpm.RPMVSF_NODSAHEADER }
  
      @property
      def ts(self):
-@@ -1455,7 +1454,7 @@
-             return 1
+@@ -1254,7 +1253,7 @@
  
-         myts = dnf.rpmUtils.transaction.initReadOnlyTransaction(root=self.conf.installroot)
+         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/rpmUtils/transaction.py~	2014-05-02 11:00:42.000000000 +0300
-+++ dnf/dnf/rpmUtils/transaction.py	2014-06-15 20:38:31.170535603 +0300
-@@ -118,5 +118,5 @@
+--- 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/yum/config.py~	2014-05-02 11:00:42.000000000 +0300
-+++ dnf/dnf/yum/config.py	2014-06-15 20:38:49.048023852 +0300
-@@ -1036,7 +1036,7 @@
-     @return: The release version as a string (eg. '4' for FC4)
-     '''
-     ts = dnf.rpmUtils.transaction.initReadOnlyTransaction(root=installroot)
+--- 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)
-     try:
-         idx = ts.dbMatch('provides', distroverpkg)
-     except TypeError as e:
+     for distroverpkg in dnf.const.DISTROVERPKG:
+         try:
+             idx = ts.dbMatch('provides', distroverpkg)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dnf.git/commitdiff/70e5df64fa2ac1d56ff3ab361d7723879502ecbc



More information about the pld-cvs-commit mailing list