]> git.pld-linux.org Git - packages/ufw.git/commitdiff
patch to use pld way sysconfig path
authorElan Ruusamäe <glen@delfi.ee>
Mon, 16 Sep 2013 08:34:08 +0000 (11:34 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 16 Sep 2013 08:34:29 +0000 (11:34 +0300)
sysconfig.patch [new file with mode: 0644]
ufw.spec

diff --git a/sysconfig.patch b/sysconfig.patch
new file mode 100644 (file)
index 0000000..84eebb3
--- /dev/null
@@ -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
index 7d078ebb7a57cadf01faaae8cd7a7de95ab85aaf..9b043b9ad8709610a537f9e62123c8d790f6470d 100644 (file)
--- 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
This page took 0.183065 seconds and 4 git commands to generate.