Hello community, here is the log from the commit of package firewalld-rpcbind-helper for openSUSE:Factory checked in at 2018-05-13 16:05:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/firewalld-rpcbind-helper (Old) and /work/SRC/openSUSE:Factory/.firewalld-rpcbind-helper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "firewalld-rpcbind-helper" Sun May 13 16:05:24 2018 rev:3 rq:606428 version:0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/firewalld-rpcbind-helper/firewalld-rpcbind-helper.changes 2018-04-19 15:30:36.084318330 +0200 +++ /work/SRC/openSUSE:Factory/.firewalld-rpcbind-helper.new/firewalld-rpcbind-helper.changes 2018-05-13 16:05:26.709499870 +0200 @@ -1,0 +2,14 @@ +Fri May 11 11:17:32 UTC 2018 - matthias.gerst...@suse.com + +- update to new minor release that fixes bugs: + * error in some cases when running with python3 because of a missing decode + * error when sysconfig files have not been existing, because packages have + not been installed yet +- dropped shebang.patch: is now covered by new release tarball + +------------------------------------------------------------------- +Mon Apr 23 09:29:36 UTC 2018 - matthias.gerst...@suse.com + +- use %doc and %license macros in a cleaner way + +------------------------------------------------------------------- Old: ---- shebang.patch v0.1.tar.gz New: ---- v0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ firewalld-rpcbind-helper.spec ++++++ --- /var/tmp/diff_new_pack.MCzC52/_old 2018-05-13 16:05:27.325477399 +0200 +++ /var/tmp/diff_new_pack.MCzC52/_new 2018-05-13 16:05:27.329477253 +0200 @@ -18,14 +18,13 @@ %define main_script firewall-rpc-helper.py Name: firewalld-rpcbind-helper -Version: 0.1 +Version: 0.2 Release: 0 Summary: Tool for static port assignment of NFSv3, ypserv, ypbind services License: GPL-2.0-or-later Group: Productivity/Networking/Security -URL: https://github.com/mgerstner/firewalld-rpcbind-helper -Source0: https://github.com/mgerstner/firewalld-rpcbind-helper/archive/v0.1.tar.gz -Patch0: shebang.patch +Url: https://github.com/mgerstner/firewalld-rpcbind-helper +Source0: https://github.com/mgerstner/firewalld-rpcbind-helper/archive/v%{version}.tar.gz Requires: python3 Recommends: firewalld BuildArch: noarch @@ -36,7 +35,6 @@ %prep %setup -q -%patch0 -p1 %build # nothing @@ -44,11 +42,11 @@ %install mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_docdir}/%{name} -cp LICENSE README.md %{buildroot}/%{_docdir}/%{name} cp %{main_script} %{buildroot}/%{_bindir}/%{main_script} %files -%doc %{_docdir}/%{name} +%doc README.md +%license LICENSE %{_bindir}/%{main_script} %changelog ++++++ v0.1.tar.gz -> v0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/firewalld-rpcbind-helper-0.1/README.md new/firewalld-rpcbind-helper-0.2/README.md --- old/firewalld-rpcbind-helper-0.1/README.md 2018-04-11 14:31:15.000000000 +0200 +++ new/firewalld-rpcbind-helper-0.2/README.md 2018-05-11 13:06:49.000000000 +0200 @@ -1,7 +1,7 @@ # Helper for use of rpcbind Based Protocols with firewalld -With the new majors openSUSE Leap 15.0 and SUSE Linux Enterprise 15 the -*SuSEfirewall2* default firewall is replaced by +With the new major releases openSUSE Leap 15.0 and SUSE Linux Enterprise 15 +the *SuSEfirewall2* default firewall is replaced by [firewalld](https://www.firewalld.org/). While most features of *SuSEfirewall2* have an equivalent in *firewalld* there diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/firewalld-rpcbind-helper-0.1/firewall-rpc-helper.py new/firewalld-rpcbind-helper-0.2/firewall-rpc-helper.py --- old/firewalld-rpcbind-helper-0.1/firewall-rpc-helper.py 2018-04-11 14:31:15.000000000 +0200 +++ new/firewalld-rpcbind-helper-0.2/firewall-rpc-helper.py 2018-05-11 13:06:49.000000000 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/python -s +#!/usr/bin/python3 -s # vim: noet ts=8 sw=8 sts=8 : # Author: @@ -29,6 +29,7 @@ import subprocess import random import textwrap +import errno def error(*args, **kwargs): kwargs["file"] = sys.stderr @@ -89,6 +90,9 @@ ) self.m_rpcbind_services = list(self.m_rpcbind_services) + def isInstalled(self): + return os.path.exists(self.m_sysconfig_file) + def __init__(self): self.m_used_ports = set() @@ -165,7 +169,7 @@ output will be a space separated list of tuples of the form <PORT>/<PROTO>, where <PROTO> is one of tcp or udp. This format is compatible with firewall-cmd -syntax. Example input: "-s ypbind rquotad" """), +syntax. Example input: "-s ypbind rquotad"."""), nargs = '+', metavar = "SERVICE" ) @@ -400,7 +404,7 @@ stderr = subprocess.STDOUT ) - output = proc.stdout.read() + output = proc.stdout.read().decode() res = proc.wait() @@ -490,7 +494,10 @@ print('-' * len(pattern.m_label)) print() print("Static port configuration file:", - pattern.m_sysconfig_file) + pattern.m_sysconfig_file, end = '') + if not pattern.isInstalled(): + print(" (package not installed)", end = '') + print() print() table_rows = [] @@ -557,14 +564,21 @@ print("Reading current configuration from {}.".format(cfg)) print() - with open(cfg, 'r') as cfg_fd: - for line in cfg_fd.readlines(): - line = self.processCfgLine( - line, - item_handler = - self.processCfgItemForChange - ) - lines.append(line) + try: + with open(cfg, 'r') as cfg_fd: + for line in cfg_fd.readlines(): + line = self.processCfgLine( + line, + item_handler = + self.processCfgItemForChange + ) + lines.append(line) + except OSError as e: + if e.errno == errno.ENOENT: + print("Error: The package necessary for this pattern does not seem to be installed") + sys.exit(1) + else: + raise print("Writing updated configuration to {}.".format(cfg)) with open(cfg, 'w') as cfg_fd: @@ -789,12 +803,17 @@ self.m_static_ports = {} cfg = pattern.m_sysconfig_file - with open(cfg, 'r') as cfg_fd: - for line in cfg_fd.readlines(): - self.processCfgLine( - line, - self.processCfgItemForParsing - ) + try: + with open(cfg, 'r') as cfg_fd: + for line in cfg_fd.readlines(): + self.processCfgLine( + line, + self.processCfgItemForParsing + ) + except OSError as e: + if e.errno == errno.ENOENT: + # probably not installed + pass def processCfgItemForParsing(self, key, val):