commit a9c1da6924e2e3ce3de3c3ac3a460dce02673197 Author: zhuchunyi Date: Wed Nov 6 19:33:41 2019 +0800 update code diff --git a/icfg-0.9.tbz2 b/icfg-0.9.tbz2 new file mode 100644 index 0000000..3798c1c Binary files /dev/null and b/icfg-0.9.tbz2 differ diff --git a/icfg-python.patch b/icfg-python.patch new file mode 100644 index 0000000..b2584e3 --- /dev/null +++ b/icfg-python.patch @@ -0,0 +1,9 @@ +diff -up ./src/icfg.orig ./src/icfg +--- ./src/icfg.orig 2015-07-17 17:22:04.794083444 -0400 ++++ ./src/icfg 2015-07-17 17:22:14.282355420 -0400 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python + import os + import sys + import string diff --git a/icfg-python3.patch b/icfg-python3.patch new file mode 100644 index 0000000..c1c2837 --- /dev/null +++ b/icfg-python3.patch @@ -0,0 +1,36 @@ +diff -up ./src/icfg.orig ./src/icfg +--- ./src/icfg.orig 2018-02-20 10:00:47.738647996 -0500 ++++ ./src/icfg 2018-02-20 10:07:48.203054651 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + import os + import sys + import string +@@ -133,7 +133,7 @@ class iface(object): + + def dump(self): + for i in self.config.keys(): +- print i+"="+"\""+self.config[i]+"\"" ++ print(i,"=","\"",self.config[i],"\"", sep="") + + def removeKey(self, key): + try: +@@ -299,7 +299,7 @@ def createNewConfig(ifname, iftype): + + def log(msg): + if (goptions.quiet == False): +- print msg ++ print(msg) + + def main(): + global goptions +@@ -427,7 +427,7 @@ def main(): + if (goptions.listslaves == True): + try: + for slave in ifdev.slaves: +- print slave.name ++ print(slave.name) + except AttributeError: + log("Only bond master devices have slaves") + sys.exit(6) diff --git a/icfg.spec b/icfg.spec new file mode 100644 index 0000000..a6ba05e --- /dev/null +++ b/icfg.spec @@ -0,0 +1,51 @@ +Name: icfg +Version: 0.9 +Release: 18 +Summary: A Command line tool used to edit network configuration files +License: GPLv2 +URL: https://fedorahosted.org/icfg +Source0: https://fedorahosted.org/releases/i/c/icfg/%{name}-%{version}.tbz2 +Requires: python3 +BuildArch: noarch + +Patch0: icfg-python.patch +Patch1: icfg-python3.patch + +%description +Icfg is a command line tool used to handle SysV network interface configuration files. +It solved the problems of manual editing during the process of editing network interface +configuration files, and creates a scriptable interface which allows administrators to +configure (system network interface) during installation without having to roll back +using a series of sed and awk commands. + +%package_help + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build + +%install +install -d %{buildroot}/usr/bin +install -d %{buildroot}/usr/share/man/man1 +install -m755 -p src/icfg %{buildroot}/usr/bin/icfg +install -m644 -p doc/icfg.1 %{buildroot}/usr/share/man/man1/icfg.1 + +%files +%defattr(-,root,root) +%license COPYING +%{_bindir}/icfg + +%files help +%defattr(-,root,root) +%{_mandir}/man1/icfg.1.* + +%changelog +* Fri Oct 25 2019 openEuler Buildteam - 0.9-18 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:change the directory of the license file + +* Fri Oct 11 2019 openEuler Buildteam - 0.9-17 +- Package init