Add system users
[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 touch %{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 %license COPYING
55 %manifest setup.manifest
56 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/passwd
57 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/group
58 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/shadow
59 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/gshadow
60 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/services
61 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/exports
62 %config(noreplace) %{_sysconfdir}/aliases
63 %config(noreplace) %{_sysconfdir}/environment
64 %config(noreplace) %{_sysconfdir}/host.conf
65 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts
66 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.allow
67 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.deny
68 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/motd
69 %config(noreplace) %{_sysconfdir}/printcap
70 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/inputrc
71 %config(noreplace) %{_sysconfdir}/bashrc
72 %config(noreplace) %{_sysconfdir}/profile
73 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/protocols
74 %attr(0600,root,root) %config(noreplace,missingok) %{_sysconfdir}/securetty
75 %dir %{_sysconfdir}/profile.d
76 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/shells
77 %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
78 %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/log/faillog
79 %ghost %attr(0664,root,utmp) %verify(not md5 size mtime) /var/log/wtmp
80 %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/log/btmp
81 %ghost %attr(0664,root,utmp) %verify(not md5 size mtime) /run/utmp
82 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/fstab
83 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/mtab
84 /run/*
85 /etc/profile.d/*
86
87 %files misc
88 %{_bindir}/*
89 %{_sbindir}/*
90 %docs_package