Browse code

Move bindutils to packages_extra, add group man and user man. ( bug 1637781)

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>

xiaolin-vmware authored on 2016/04/12 09:01:35
Showing 5 changed files
... ...
@@ -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
... ...
@@ -44,7 +44,7 @@ tar xf %{SOURCE1}
44 44
     	--with-pam \
45 45
 	--with-maintype=man \
46 46
 	--with-kerberos5=/usr
47
-make %{?_smp_mflags}
47
+make
48 48
 %install
49 49
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
50 50
 make DESTDIR=%{buildroot} install
... ...
@@ -116,6 +116,7 @@
116 116
         "paramiko",
117 117
         "ecdsa",
118 118
         "kexec-tools",
119
-        "traceroute"
119
+        "traceroute",
120
+        "bindutils"
120 121
             ]
121 122
 }
... ...
@@ -113,7 +113,6 @@
113 113
         "wget",
114 114
         "Linux-PAM-lang",
115 115
         "make",
116
-        "bindutils",
117 116
         "gperf",
118 117
         "lua-devel",
119 118
         "less",
... ...
@@ -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