Browse code

Use tar --no-same-owner in chroot during building

Unpriveleged contain can not handle non root id:gid
Release numbers is not bumped up because it does not affect
on resulting RPMs.

Change-Id: I2a8cab007749a06d8b97b0698afb94e2c3b60351
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1727
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: suezzelur <anishs@vmware.com>

Alexey Makhalov authored on 2016/11/22 00:27:56
Showing 13 changed files
... ...
@@ -27,8 +27,8 @@ The Ant package contains binaries for a build system
27 27
 %prep
28 28
 
29 29
 %setup -q
30
-tar xf %{SOURCE1}
31
-tar xf %{SOURCE2}
30
+tar xf %{SOURCE1} --no-same-owner
31
+tar xf %{SOURCE2} --no-same-owner
32 32
 %build
33 33
 ANT_DIST_DIR=/var/opt/apache-ant-%{version}
34 34
 
... ...
@@ -28,7 +28,7 @@ rpm packages
28 28
 
29 29
 %prep
30 30
 %setup -q
31
-tar xf %{SOURCE1}
31
+tar xf %{SOURCE1} --no-same-owner
32 32
 %install
33 33
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
34 34
 make DESTDIR=$RPM_BUILD_ROOT install
... ...
@@ -28,7 +28,7 @@ The package contains the DB doc files
28 28
 
29 29
 %prep
30 30
 %setup -q
31
-tar xf %{SOURCE1}
31
+tar xf %{SOURCE1} --no-same-owner
32 32
 %build
33 33
 cd build_unix
34 34
 ../dist/configure \
... ...
@@ -46,7 +46,7 @@ This package contains tools to assemble the local initrd and host configuration.
46 46
 %prep
47 47
 %setup -q -n %{name}-%{version}
48 48
 cp %{PATCH0} .
49
-tar xf %{SOURCE1}
49
+tar xf %{SOURCE1} --no-same-owner
50 50
 
51 51
 %build
52 52
 %configure --systemdsystemunitdir=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
... ...
@@ -47,7 +47,7 @@ Sysdig falco is an open source, behavioral activity monitor designed to detect a
47 47
 %setup -T -D -a 1
48 48
 chmod +x %{SOURCE2}
49 49
 cp %{SOURCE2} /usr/bin
50
-tar xf %{SOURCE3}
50
+tar xf %{SOURCE3} --no-same-owner
51 51
 
52 52
 %build
53 53
 mv sysdig-0.10.1 ../sysdig
... ...
@@ -28,9 +28,9 @@ GDB, the GNU Project debugger, allows you to see what is going on
28 28
 another program was doing at the moment it crashed. 
29 29
 %prep
30 30
 %setup -q
31
-tar xf %{SOURCE1}
32
-tar xf %{SOURCE2}
33
-tar xf %{SOURCE3}
31
+tar xf %{SOURCE1} --no-same-owner
32
+tar xf %{SOURCE2} --no-same-owner
33
+tar xf %{SOURCE3} --no-same-owner
34 34
 
35 35
 %build
36 36
 ./configure \
... ...
@@ -21,7 +21,7 @@ firewall tool for Linux is Iptables. You will need to install
21 21
 Iptables if you intend on using any form of a firewall.
22 22
 %prep
23 23
 %setup -q
24
-tar xf %{SOURCE1}
24
+tar xf %{SOURCE1} --no-same-owner
25 25
 cp %{SOURCE2} .
26 26
 %patch1 -p0
27 27
 %build
... ...
@@ -19,7 +19,7 @@ Kubernetes is an open source implementation of container cluster management.
19 19
 
20 20
 %prep -p exit
21 21
 %setup -qn %{name}
22
-tar xf %{SOURCE1}
22
+tar xf %{SOURCE1} --no-same-owner
23 23
 sed -i -e 's|127.0.0.1:4001|127.0.0.1:2379|g' contrib-0.7.0/init/systemd/environ/apiserver
24 24
 
25 25
 %build
... ...
@@ -108,4 +108,4 @@ fi
108 108
 *   Thu Jul 23 2015 Vinay Kulkarni <kulkarniv@vmware.com> 1.0.1-1
109 109
 -   Upgrade to kubernetes v1.0.1
110 110
 *   Tue Mar 10 2015 Divya Thaluru <dthaluru@vmware.com> 0.12.1-1
111
--   Initial build. First version
112 111
\ No newline at end of file
112
+-   Initial build. First version
... ...
@@ -22,9 +22,9 @@ to various calling conventions. This allows a programmer to call any
22 22
 function specified by a call interface description at run time.
23 23
 %prep
24 24
 %setup -q
25
-tar xf %{SOURCE1}
26
-tar xf %{SOURCE2}
27
-tar xf %{SOURCE3}
25
+tar xf %{SOURCE1} --no-same-owner
26
+tar xf %{SOURCE2} --no-same-owner
27
+tar xf %{SOURCE3} --no-same-owner
28 28
 %build
29 29
 sed -e '/^includesdir/ s:$(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include:$(includedir):' \
30 30
     -i include/Makefile.in &&
... ...
@@ -46,7 +46,7 @@ Package config and headers for librepo.
46 46
 
47 47
 %prep
48 48
 %setup -q -n %{librepo_name}-%{version}
49
-tar xf %{SOURCE1}
49
+tar xf %{SOURCE1} --no-same-owner
50 50
 
51 51
 %build
52 52
 mkdir build
... ...
@@ -42,7 +42,7 @@ needed for developing applications that manipulate binary policies.
42 42
 %prep
43 43
 %setup -qn %{name}-%{version}-rc1
44 44
 sed  -i 's/int rc;/int rc = SEPOL_OK;/' ./cil/src/cil_binary.c
45
-tar xf %{SOURCE1}
45
+tar xf %{SOURCE1} --no-same-owner
46 46
 
47 47
 %build
48 48
 make clean
... ...
@@ -42,7 +42,7 @@ This provides the ssh server daemons, utilities, configuration and service files
42 42
 
43 43
 %prep
44 44
 %setup -q
45
-tar xf %{SOURCE1}
45
+tar xf %{SOURCE1} --no-same-owner
46 46
 %patch1 -p0
47 47
 %patch2 -p1
48 48
 %build
... ...
@@ -18,7 +18,7 @@ Sources for time zone and daylight saving time data
18 18
 rm -rf %{blddir}
19 19
 install -vdm 755 %{blddir}
20 20
 cd %{blddir}
21
-tar xf %{SOURCE0}
21
+tar xf %{SOURCE0} --no-same-owner
22 22
 %build
23 23
 %install
24 24
 cd %{blddir}