summaryrefslogtreecommitdiff
path: root/tests/data/SPECS/updpolicy.spec
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data/SPECS/updpolicy.spec')
-rw-r--r--tests/data/SPECS/updpolicy.spec38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/data/SPECS/updpolicy.spec b/tests/data/SPECS/updpolicy.spec
new file mode 100644
index 000000000..4310e8c23
--- /dev/null
+++ b/tests/data/SPECS/updpolicy.spec
@@ -0,0 +1,38 @@
+# avoid depending on rpm configuration
+%define _sysconfdir /etc
+
+%{!?filetype: %global filetype file}
+
+Name: update-policy-test%{?sub:-%{sub}}
+Version: %{ver}
+Release: 1
+Summary: Testing update policy
+
+Group: Testing
+License: GPL
+BuildArch: noarch
+
+%description
+%{summary}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
+case %{filetype} in
+file)
+ echo "%{filedata}" > $RPM_BUILD_ROOT/%{_sysconfdir}/policy.conf
+ ;;
+link)
+ ln -s "%{filedata}" $RPM_BUILD_ROOT/%{_sysconfdir}/policy.conf
+ ;;
+dir)
+ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/policy.conf
+ ;;
+esac
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{?fileattr} %{_sysconfdir}/policy.conf