- DNF 3: progress callback constants moved to dnf.transaction (awilliam@redhat.com)

- Include example blueprints in the rpm (bcl@redhat.com)
- Make sure /run/weldr has correct ownership and permissions (bcl@redhat.com)
This commit is contained in:
Brian C. Lane 2018-06-27 16:30:53 -07:00
parent 8c7483b422
commit c5619fd991
4 changed files with 16 additions and 53 deletions

1
.gitignore vendored
View File

@ -133,3 +133,4 @@
/lorax-29.6.tar.gz
/lorax-29.7.tar.gz
/lorax-29.8.tar.gz
/lorax-29.9.tar.gz

View File

@ -1,43 +0,0 @@
From 5b0c4856f50f1a54ca39eb38691655cab43ba143 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 26 Jun 2018 14:02:59 -0700
Subject: [PATCH] DNF 3: progress callback constants moved to dnf.transaction
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
src/pylorax/dnfhelper.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/pylorax/dnfhelper.py b/src/pylorax/dnfhelper.py
index 39aadd56..aa1f9804 100644
--- a/src/pylorax/dnfhelper.py
+++ b/src/pylorax/dnfhelper.py
@@ -23,6 +23,7 @@
import logging
logger = logging.getLogger("pylorax.dnfhelper")
import dnf
+import dnf.transaction
import collections
import time
import pylorax.output as output
@@ -93,7 +94,7 @@ class LoraxRpmCallback(dnf.callback.TransactionProgress):
self._last_ts = None
def progress(self, package, action, ti_done, ti_total, ts_done, ts_total):
- if action == self.PKG_INSTALL:
+ if action == dnf.transaction.PKG_INSTALL:
# do not report same package twice
if self._last_ts == ts_done:
return
@@ -101,7 +102,7 @@ class LoraxRpmCallback(dnf.callback.TransactionProgress):
msg = '(%d/%d) %s' % (ts_done, ts_total, package)
logger.info(msg)
- elif action == self.TRANS_POST:
+ elif action == dnf.transaction.TRANS_POST:
msg = "Performing post-installation setup tasks"
logger.info(msg)
--
2.18.0.rc2

View File

@ -3,8 +3,8 @@
%define debug_package %{nil}
Name: lorax
Version: 29.8
Release: 1%{?dist}.1
Version: 29.9
Release: 1%{?dist}
Summary: Tool for creating the anaconda install images
Group: Applications/System
@ -16,10 +16,6 @@ URL: https://github.com/weldr/lorax
# tito build --tgz
Source0: %{name}-%{version}.tar.gz
# DNF 3 compatibility fix
# https://github.com/weldr/lorax/pull/388
Patch0: 0001-DNF-3-progress-callback-constants-moved-to-dnf.trans.patch
BuildRequires: python3-devel
Requires: lorax-templates
@ -160,7 +156,6 @@ build images, etc. from the command line.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%build
@ -168,6 +163,11 @@ build images, etc. from the command line.
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
# Install example blueprints from the test suite.
# This path MUST match the lorax-composer.service blueprint path.
mkdir -p $RPM_BUILD_ROOT/var/lib/lorax/composer/blueprints/
cp ./tests/pylorax/blueprints/*toml $RPM_BUILD_ROOT/var/lib/lorax/composer/blueprints/
%pre composer
getent group weldr >/dev/null 2>&1 || groupadd -r weldr >/dev/null 2>&1 || :
getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin -c "User for lorax-composer" weldr >/dev/null 2>&1 || :
@ -218,14 +218,19 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin
%dir %{_datadir}/lorax/composer
%{_datadir}/lorax/composer/*
%{_tmpfilesdir}/lorax-composer.conf
%dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/
%dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/blueprints/
%attr(0771, weldr, weldr) %{_sharedstatedir}/lorax/composer/blueprints/*
%files -n composer-cli
%{_bindir}/composer-cli
%{python3_sitelib}/composer/*
%changelog
* Tue Jun 26 2018 Adam Williamson <awilliam@redhat.com> - 29.8-1.fc29.1
- Patch for DNF 3 compatibility
* Wed Jun 27 2018 Brian C. Lane <bcl@redhat.com> 29.9-1
- DNF 3: progress callback constants moved to dnf.transaction (awilliam@redhat.com)
- Include example blueprints in the rpm (bcl@redhat.com)
- Make sure /run/weldr has correct ownership and permissions (bcl@redhat.com)
* Fri Jun 22 2018 Brian C. Lane <bcl@redhat.com> 29.8-1
- Fixing bug where test did not try to import pylorax.version (sophiafondell)

View File

@ -1 +1 @@
SHA512 (lorax-29.8.tar.gz) = b887d455a0a2c4302439b00107da00236663ee9a5d6f9a5c47f718e75f08d6131a9416b70ce77c469abc0b2eabcd7471fc07b79c128de7371c010c7825d84212
SHA512 (lorax-29.9.tar.gz) = e2e3b8420d64794f935fc0c7c745eaf2513e498275f0b185c309c7c4897a1af286f16f84034c1f540f3dfa6078c984f28d214234380c22047da89f628b3127a4