summaryrefslogtreecommitdiff
path: root/tests/data/SPECS/attrtest.spec
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-06-28 10:34:13 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-06-28 10:34:50 +0300
commitb11647214853dbc877972a91ebee116aa32d5bfc (patch)
tree00390f328d88a69f440cc8a6332a440a9b684714 /tests/data/SPECS/attrtest.spec
parent5cd1e56cd28ee18ab863951bc242e99e42d85a1a (diff)
downloadlibrpm-tizen-b11647214853dbc877972a91ebee116aa32d5bfc.tar.gz
librpm-tizen-b11647214853dbc877972a91ebee116aa32d5bfc.tar.bz2
librpm-tizen-b11647214853dbc877972a91ebee116aa32d5bfc.zip
Add a test-case for various %attr and %defattr combinations
- Currently this fails expectedly due to RhBug:681540 on the last directory of the test rpm.
Diffstat (limited to 'tests/data/SPECS/attrtest.spec')
-rw-r--r--tests/data/SPECS/attrtest.spec58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/data/SPECS/attrtest.spec b/tests/data/SPECS/attrtest.spec
new file mode 100644
index 000000000..6f787b19e
--- /dev/null
+++ b/tests/data/SPECS/attrtest.spec
@@ -0,0 +1,58 @@
+Name: attrtest
+Version: 1.0
+Release: 1
+Summary: Testing file attr behavior
+Group: Testing
+License: GPL
+BuildArch: noarch
+
+%description
+%{summary}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+for x in a b c d e f g h i j; do
+ mkdir -p $RPM_BUILD_ROOT/${x}
+ mkdir -p $RPM_BUILD_ROOT/${x}/dir
+ echo "${x}" > $RPM_BUILD_ROOT/${x}/file
+ chmod 700 $RPM_BUILD_ROOT/${x}/dir
+ chmod 400 $RPM_BUILD_ROOT/${x}/file
+done
+
+%files
+/a/dir
+/a/file
+
+%attr(-,daemon,adm) /b/dir
+%attr(-,daemon,adm) /b/file
+
+%attr(750,-,adm) /c/dir
+%attr(640,daemon,-) /c/file
+
+%attr(751,daemon,bin) /d/dir
+%attr(644,bin,daemon) /d/file
+
+%defattr(-,foo,bar)
+/e/dir
+/e/file
+
+%defattr(-,bar,foo)
+%attr(770,-,-) /f/dir
+%attr(660,-,-) /f/file
+
+%defattr(-,bar,foo)
+%attr(-,adm,-) /g/dir
+%attr(-,-,adm) /g/file
+
+%defattr(644,foo,bar,755)
+/h/dir
+/h/file
+
+%defattr(4755,root,root,750)
+%attr(-,adm,-) /i/dir
+%attr(-,-,adm) /i/file
+
+%defattr(640,zoot,zoot,750)
+%attr(777,-,-) /j/dir
+%attr(222,-,-) /j/file