Change-Id: I72074c8c245c3b485af4e6582821d966d245b599
Reviewed-on: http://photon-jenkins.eng.vmware.com/701
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
... | ... |
@@ -13,6 +13,7 @@ Requires: libpipeline |
13 | 13 |
Requires: gdbm |
14 | 14 |
Requires: xz |
15 | 15 |
Requires: groff |
16 |
+Requires: shadow |
|
16 | 17 |
BuildRequires: libpipeline |
17 | 18 |
BuildRequires: gdbm |
18 | 19 |
BuildRequires: xz |
... | ... |
@@ -38,8 +39,25 @@ find %{buildroot}%{_libdir} -name '*.la' -delete |
38 | 38 |
%find_lang %{name} --all-name |
39 | 39 |
%check |
40 | 40 |
make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
41 |
-%post -p /sbin/ldconfig |
|
42 |
-%postun -p /sbin/ldconfig |
|
41 |
+%pre |
|
42 |
+if ! getent group man >/dev/null; then |
|
43 |
+ groupadd -r man |
|
44 |
+fi |
|
45 |
+if ! getent passwd apache >/dev/null; then |
|
46 |
+ useradd -c "man" -d /var/cache/man -g man \ |
|
47 |
+ -s /bin/false -M -r man |
|
48 |
+fi |
|
49 |
+%post -p /sbin/ldconfig |
|
50 |
+ |
|
51 |
+%postun |
|
52 |
+/sbin/ldconfig |
|
53 |
+if getent passwd man >/dev/null; then |
|
54 |
+ userdel man |
|
55 |
+fi |
|
56 |
+if getent group man >/dev/null; then |
|
57 |
+ groupdel man |
|
58 |
+fi |
|
59 |
+ |
|
43 | 60 |
%files -f %{name}.lang |
44 | 61 |
%defattr(-,root,root) |
45 | 62 |
%{_sysconfdir}/man_db.conf |
... | ... |
@@ -17,7 +17,7 @@ class constants(object): |
17 | 17 |
inputRPMSPath="" |
18 | 18 |
rpmCheck=False |
19 | 19 |
sourceRpmPath="" |
20 |
- noDepsPackageList=["texinfo","bzip2","gettext","man-db","nspr","xz","bison","openjdk","go"] |
|
20 |
+ noDepsPackageList=["texinfo","bzip2","gettext","nspr","xz","bison","openjdk","go"] |
|
21 | 21 |
listToolChainPackages=[ |
22 | 22 |
"linux-api-headers", |
23 | 23 |
"glibc", |
... | ... |
@@ -71,7 +71,6 @@ class constants(object): |
71 | 71 |
"python2", |
72 | 72 |
"rpm", |
73 | 73 |
"groff", |
74 |
- "man-db", |
|
75 | 74 |
"man-pages", |
76 | 75 |
"cpio"] |
77 | 76 |
|
... | ... |
@@ -165,7 +164,6 @@ class constants(object): |
165 | 165 |
"autoconf", |
166 | 166 |
"automake", |
167 | 167 |
"groff", |
168 |
- "man-db", |
|
169 | 168 |
"man-pages", |
170 | 169 |
"elfutils", |
171 | 170 |
"cpio"] |
... | ... |
@@ -249,7 +247,6 @@ class constants(object): |
249 | 249 |
"rpm-build", |
250 | 250 |
"rpm-devel", |
251 | 251 |
"groff", |
252 |
- "man-db", |
|
253 | 252 |
"man-pages", |
254 | 253 |
"cpio"] |
255 | 254 |
|