1Name:           attrtest
2Version:        1.0
3Release:        1
4Summary:        Testing file attr behavior
5Group:          Testing
6License:        GPL
7BuildArch:	noarch
8
9%description
10%{summary}
11
12%install
13rm -rf $RPM_BUILD_ROOT
14
15for x in a b c d e f g h i j; do
16    mkdir -p $RPM_BUILD_ROOT/${x}
17    mkdir -p $RPM_BUILD_ROOT/${x}/dir
18    echo "${x}" > $RPM_BUILD_ROOT/${x}/file
19    chmod 700 $RPM_BUILD_ROOT/${x}/dir
20    chmod 400 $RPM_BUILD_ROOT/${x}/file
21done
22
23%files -n %{name}
24/a/dir
25/a/file
26
27%attr(-,daemon,adm) /b/dir
28%attr(-,daemon,adm) /b/file
29
30%attr(750,-,adm) /c/dir
31%attr(640,daemon,-) /c/file
32
33%attr(751,daemon,bin) /d/dir
34%attr(644,bin,daemon) /d/file
35
36%defattr(-,foo,bar)
37/e/dir
38/e/file
39
40%defattr(-,bar,foo)
41%attr(770,-,-) /f/dir
42%attr(660,-,-) /f/file
43
44%defattr(-,bar,foo)
45%attr(-,adm,-) /g/dir
46%attr(-,-,adm) /g/file
47
48%defattr(644,foo,bar,755)
49/h/dir
50/h/file
51
52%defattr(4755,root,root,750)
53%attr(-,adm,-) /i/dir
54%attr(-,-,adm) /i/file
55
56%defattr(640,zoot,zoot,750)
57%attr(777,-,-) /j/dir
58%attr(222,-,-) /j/file
59
60%changelog
61* Tue Jun 28 2011 Panu Matilainen <pmatilai@redhat.com>
62- Initial package
63