remove packaging directory
[toolchains/setup.git] / packaging / setup.spec
1 Summary: A set of system configuration and setup files
2 Name: setup
3 Version: 0.1
4 Release: 1
5 License: Public Domain
6 Group: System/Base
7 URL: https://fedorahosted.org/setup/
8 Source0: https://fedorahosted.org/releases/s/e/%{name}/%{name}-0.1.tar.bz2
9 BuildArch: noarch
10 BuildRequires: bash
11 Requires: filesystem
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 %prep
18 %setup -q 
19
20 ./shadowconvert.sh
21
22 %build
23
24 %check
25 # Run any sanity checks.
26 #make check
27
28 %install
29 rm -rf %{buildroot}
30 mkdir -p %{buildroot}/etc/profile.d
31 cp -ar * %{buildroot}/etc
32 rm -f %{buildroot}/etc/uidgid
33 rm -f %{buildroot}/etc/COPYING
34 mkdir -p %{buildroot}/var/log
35 touch %{buildroot}/var/log/lastlog
36 touch %{buildroot}/etc/environment
37 chmod 0644 %{buildroot}/etc/environment
38 chmod 0400 %{buildroot}/etc/{shadow,gshadow}
39 chmod 0644 %{buildroot}/var/log/lastlog
40 touch %{buildroot}/etc/fstab
41 touch %{buildroot}/etc/mtab
42
43 # remove unpackaged files from the buildroot
44 rm -f %{buildroot}/etc/Makefile
45 rm -f %{buildroot}/etc/serviceslint
46 rm -f %{buildroot}/etc/uidgidlint
47 rm -f %{buildroot}/etc/shadowconvert.sh
48 rm -f %{buildroot}/etc/setup.spec
49 rm -rf %{buildroot}/etc/packaging
50
51 #mkdir -p %{buildroot}/opt/etc
52 #mv %{buildroot}/etc/{passwd,group,shadow,gshadow} %{buildroot}/opt/etc
53 pushd %{buildroot}/etc
54 rm -f passwd shadow group gshadow
55 #ln -s ../opt/etc/passwd
56 #ln -s ../opt/etc/shadow
57 #ln -s ../opt/etc/group
58 #ln -s ../opt/etc/gshadow
59 popd
60
61 %clean
62 rm -rf %{buildroot}
63
64 #throw away useless and dangerous update stuff until rpm will be able to
65 #handle it ( http://rpm.org/ticket/6 )
66 #%post -p <lua>
67 #for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do
68 #     os.remove("/etc/"..name..".rpmnew")
69 #end
70
71 %files
72 %defattr(-,root,root,-)
73 #/etc/passwd
74 #/etc/group
75 #/etc/shadow
76 #/etc/gshadow
77 #%config(noreplace) /opt/etc/passwd
78 #%config(noreplace) /opt/etc/group
79 #%config(noreplace,missingok) /opt/etc/shadow
80 #%config(noreplace,missingok) /opt/etc/gshadow
81
82 #%verify(not md5 size mtime) %config(noreplace) /opt/etc/passwd
83 #%verify(not md5 size mtime) %config(noreplace) /opt/etc/group
84 #%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /opt/etc/shadow
85 #%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /opt/etc/gshadow
86 %verify(not md5 size mtime) %config(noreplace) /etc/services
87 %verify(not md5 size mtime) %config(noreplace) /etc/exports
88 %config(noreplace) /etc/aliases
89 %config(noreplace) /etc/environment
90 %config(noreplace) /etc/filesystems
91 %config(noreplace) /etc/host.conf
92 %verify(not md5 size mtime) %config(noreplace) /etc/hosts
93 %verify(not md5 size mtime) %config(noreplace) /etc/hosts.allow
94 %verify(not md5 size mtime) %config(noreplace) /etc/hosts.deny
95 %verify(not md5 size mtime) %config(noreplace) /etc/motd
96 %config(noreplace) /etc/printcap
97 %verify(not md5 size mtime) %config(noreplace) /etc/inputrc
98 %config(noreplace) /etc/bashrc
99 %config(noreplace) /etc/profile
100 %verify(not md5 size mtime) %config(noreplace) /etc/protocols
101 %attr(0600,root,root) %config(noreplace,missingok) /etc/securetty
102 %config(noreplace) /etc/csh.login
103 %config(noreplace) /etc/csh.cshrc
104 %dir /etc/profile.d
105 %config(noreplace) %verify(not md5 size mtime) /etc/shells
106 %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
107 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab
108 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab