7f9cbc3ba27223b097454480b24248f833922f3b
[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 ln -nsf /proc/self/mounts %{buildroot}%{_sysconfdir}/mtab
42
43 rm %{buildroot}/%{_sysconfdir}/filesystems
44
45 #throw away useless and dangerous update stuff until rpm will be able to
46 #handle it ( http://rpm.org/ticket/6 )
47 %post -p <lua>
48 for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do
49      os.remove("/etc/"..name..".rpmnew")
50 end
51 %files
52 %manifest %{name}.manifest
53 %license COPYING
54 %manifest setup.manifest
55 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/passwd
56 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/group
57 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/shadow
58 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/gshadow
59 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/services
60 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/exports
61 %config(noreplace) %{_sysconfdir}/aliases
62 %config(noreplace) %{_sysconfdir}/environment
63 %config(noreplace) %{_sysconfdir}/host.conf
64 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts
65 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.allow
66 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.deny
67 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/motd
68 %config(noreplace) %{_sysconfdir}/printcap
69 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/inputrc
70 %config(noreplace) %{_sysconfdir}/bashrc
71 %config(noreplace) %{_sysconfdir}/profile
72 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/protocols
73 %attr(0600,root,root) %config(noreplace,missingok) %{_sysconfdir}/securetty
74 %dir %{_sysconfdir}/profile.d
75 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/shells
76 %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
77 %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/log/faillog
78 %ghost %attr(0664,root,utmp) %verify(not md5 size mtime) /var/log/wtmp
79 %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/log/btmp
80 %ghost %attr(0664,root,utmp) %verify(not md5 size mtime) /run/utmp
81 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/mtab
82 /run/*
83 /etc/profile.d/*
84
85 %files misc
86 %manifest %{name}.manifest
87 %{_bindir}/*
88 %{_sbindir}/*
89 %docs_package