Add a user for avahi daemon
[platform/upstream/setup.git] / packaging / setup.spec
1 Name:           setup
2 Version:        0.9
3 Release:        1
4 License:        Public Domain
5 Summary:        A set of system configuration and setup files
6 Url:            https://fedorahosted.org/setup/
7 Group:          Base/Configuration
8 Source0:        %{name}-%{version}.tar.bz2
9 Source1001:     setup.manifest
10 BuildRequires:  bash
11 BuildArch:      noarch
12
13 %description
14 The setup package contains a set of important system configuration and
15 setup files, such as passwd, group, and profile.
16
17 %package misc
18 Summary:    Misc. basic tools and scripts
19 Requires:   setup
20 %description misc
21 Misc. basic tools and scripts.
22
23
24 %prep
25 %setup -q
26
27 cp %{SOURCE1001} .
28 ./shadowconvert.sh
29
30 %build
31
32 %check
33 # Run any sanity checks.
34 make check
35
36 %install
37 cp -ar files/* %{buildroot}
38 touch %{buildroot}%{_sysconfdir}/environment
39 chmod 0644 %{buildroot}%{_sysconfdir}/environment
40 chmod 0400 %{buildroot}%{_sysconfdir}/{shadow,gshadow}
41 touch %{buildroot}%{_sysconfdir}/fstab
42 ln -nsf /proc/self/mounts %{buildroot}%{_sysconfdir}/mtab
43
44
45 rm %{buildroot}/%{_sysconfdir}/filesystems
46
47 #throw away useless and dangerous update stuff until rpm will be able to
48 #handle it ( http://rpm.org/ticket/6 )
49 %post -p <lua>
50 for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do
51      os.remove("/etc/"..name..".rpmnew")
52 end
53 %files
54 %manifest %{name}.manifest
55 %license COPYING
56 %manifest setup.manifest
57 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/passwd
58 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/group
59 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/shadow
60 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/gshadow
61 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/services
62 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/exports
63 %config(noreplace) %{_sysconfdir}/aliases
64 %config(noreplace) %{_sysconfdir}/environment
65 %config(noreplace) %{_sysconfdir}/host.conf
66 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts
67 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.allow
68 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.deny
69 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/motd
70 %config(noreplace) %{_sysconfdir}/printcap
71 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/inputrc
72 %config(noreplace) %{_sysconfdir}/bashrc
73 %config(noreplace) %{_sysconfdir}/profile
74 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/protocols
75 %attr(0600,root,root) %config(noreplace,missingok) %{_sysconfdir}/securetty
76 %dir %{_sysconfdir}/profile.d
77 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/shells
78 %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
79 %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/log/faillog
80 %ghost %attr(0664,root,utmp) %verify(not md5 size mtime) /var/log/wtmp
81 %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/log/btmp
82 %ghost %attr(0664,root,utmp) %verify(not md5 size mtime) /run/utmp
83 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/fstab
84 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/mtab
85 /run/*
86 /etc/profile.d/*
87
88 %files misc
89 %manifest %{name}.manifest
90 %{_bindir}/*
91 %{_sbindir}/*
92 %docs_package