[packages/ufw] patch to use pld way sysconfig path
glen
glen at pld-linux.org
Mon Sep 16 10:34:34 CEST 2013
commit 33999db360b417c591a06ae9b8d3b4b3684efa77
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Sep 16 11:34:08 2013 +0300
patch to use pld way sysconfig path
sysconfig.patch | 34 ++++++++++++++++++++++++++++++++++
ufw.spec | 11 ++++++++++-
2 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/ufw.spec b/ufw.spec
index 7d078eb..9b043b9 100644
--- a/ufw.spec
+++ b/ufw.spec
@@ -6,11 +6,13 @@ License: GPL v3+
Group: Networking/Admin
Source0: http://launchpad.net/ufw/0.33/%{version}/+download/%{name}-%{version}.tar.gz
# Source0-md5: 3747b453d76709e5a99da209fc0bb5f5
+Patch0: sysconfig.patch
URL: http://launchpad.net/ufw
BuildRequires: iptables >= 1.4
BuildRequires: python-devel >= 1:2.6
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: sed >= 4.0
Requires: iptables >= 1.4
Requires: python-modules
BuildArch: noarch
@@ -24,6 +26,13 @@ manipulating the firewall.
%prep
%setup -q
+%patch0 -p1
+
+# typo
+sed -i -e 's,/etc/defaults/ufw,/etc/sysconfig/ufw,' README
+
+# pldize sysconfig path
+grep -rl /etc/default/ufw . | xargs sed -i -e 's,/etc/default/ufw,/etc/sysconfig/ufw,'
%build
# We skip 'build' and run 'install' directly
@@ -44,7 +53,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc ChangeLog README* TODO AUTHORS
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default/ufw
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ufw
%dir %{_sysconfdir}/ufw
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ufw/*.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ufw/*.rules
diff --git a/sysconfig.patch b/sysconfig.patch
new file mode 100644
index 0000000..84eebb3
--- /dev/null
+++ b/sysconfig.patch
@@ -0,0 +1,34 @@
+--- ufw-0.33.n/setup.py 2012-08-18 00:12:49.000000000 +0300
++++ ufw-0.33/setup.py 2013-09-16 11:29:34.815967366 +0300
+@@ -148,7 +148,7 @@
+ if self.root != None:
+ confdir = self.root + real_confdir
+
+- defaults = os.path.join(confdir, 'default', 'ufw')
++ defaults = os.path.join(confdir, 'sysconfig', 'ufw')
+ ufwconf = os.path.join(confdir, 'ufw', 'ufw.conf')
+ sysctl = os.path.join(confdir, 'ufw', 'sysctl.conf')
+ before_rules = os.path.join(confdir, 'ufw', 'before.rules')
+--- ufw-0.33.n/src/backend.py 2012-08-18 00:12:49.000000000 +0300
++++ ufw-0.33/src/backend.py 2013-09-16 11:29:34.819300854 +0300
+@@ -32,8 +32,8 @@
+ self.dryrun = dryrun
+ self.rules = []
+ self.rules6 = []
+
+- self.files = {'defaults': os.path.join(config_dir, 'default/ufw'),
++ self.files = {'defaults': os.path.join(config_dir, 'sysconfig/ufw'),
+ 'conf': os.path.join(config_dir, 'ufw/ufw.conf'),
+ 'apps': os.path.join(config_dir, 'ufw/applications.d') }
+ if extra_files != None:
+--- ufw-0.33.n/src/ufw-init-functions 2012-08-18 00:12:49.000000000 +0300
++++ ufw-0.33/src/ufw-init-functions 2013-09-16 11:29:34.819300854 +0300
+@@ -20,7 +20,7 @@
+
+ PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+
+-for s in "#CONFIG_PREFIX#/default/ufw" "#CONFIG_PREFIX#/ufw/ufw.conf" ; do
++for s in "#CONFIG_PREFIX#/sysconfig/ufw" "#CONFIG_PREFIX#/ufw/ufw.conf" ; do
+ if [ -s "$s" ]; then
+ . "$s"
+ else
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ufw.git/commitdiff/33999db360b417c591a06ae9b8d3b4b3684efa77
More information about the pld-cvs-commit
mailing list