Change-Id: I89a5f7cf0f330aa9544b21a274be1e312b55a33a
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1329
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: suezzelur <anishs@vmware.com>
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,19 @@ |
0 |
+#!/bin/sh |
|
1 |
+# If using normal root, avoid changing anything. |
|
2 |
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then |
|
3 |
+ exit 0 |
|
4 |
+fi |
|
5 |
+ |
|
6 |
+STRIP=${1:-strip} |
|
7 |
+ |
|
8 |
+case `uname -a` in |
|
9 |
+Darwin*) exit 0 ;; |
|
10 |
+*) ;; |
|
11 |
+esac |
|
12 |
+ |
|
13 |
+# Strip ELF binaries |
|
14 |
+for f in `find "$RPM_BUILD_ROOT" -type f -exec file {} \; | \ |
|
15 |
+ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ |
|
16 |
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do |
|
17 |
+ $STRIP --strip-debug -g "$f" || : |
|
18 |
+done |
0 | 19 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,19 @@ |
0 |
+#!/bin/sh |
|
1 |
+# If using normal root, avoid changing anything. |
|
2 |
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then |
|
3 |
+ exit 0 |
|
4 |
+fi |
|
5 |
+ |
|
6 |
+STRIP=${1:-strip} |
|
7 |
+ |
|
8 |
+case `uname -a` in |
|
9 |
+Darwin*) exit 0 ;; |
|
10 |
+*) ;; |
|
11 |
+esac |
|
12 |
+ |
|
13 |
+# Strip ELF binaries |
|
14 |
+for f in `find "$RPM_BUILD_ROOT" -type f -exec file {} \; | \ |
|
15 |
+ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ |
|
16 |
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do |
|
17 |
+ $STRIP --strip-unneeded -g "$f" || : |
|
18 |
+done |
0 | 19 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,16 @@ |
0 |
+diff -Naur a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh |
|
1 |
+--- a/scripts/find-debuginfo.sh 2012-11-07 04:55:24.000000000 -0800 |
|
2 |
+@@ -217,8 +217,10 @@ |
|
3 |
+ eval linked=\$linked_$inum |
|
4 |
+ if [ -n "$linked" ]; then |
|
5 |
+ eval id=\$linkedid_$inum |
|
6 |
+- make_id_dup_link "$id" "$dn/$(basename $f)" |
|
7 |
+- make_id_dup_link "$id" "/usr/lib/debug$dn/$bn" .debug |
|
8 |
++ if [ -n "$id" ]; then |
|
9 |
++ make_id_dup_link "$id" "$dn/$(basename $f)" |
|
10 |
++ make_id_dup_link "$id" "/usr/lib/debug$dn/$bn" .debug |
|
11 |
++ fi |
|
12 |
+ link=$debugfn |
|
13 |
+ get_debugfn "$linked" |
|
14 |
+ echo "hard linked $link to $debugfn" |
0 | 15 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
0 |
+# |
|
1 |
+# System settings |
|
2 |
+# |
|
3 |
+%_topdir /usr/src/photon |
|
4 |
+# |
|
5 |
+# Build flags |
|
6 |
+# |
|
7 |
+#%_optflags_i686 -march=i486 -mtune=i686 -O2 -pipe |
|
8 |
+#%_optflags_x86_64 -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing |
|
9 |
+# |
|
10 |
+# Some standard locations |
|
11 |
+# |
|
12 |
+%_sysconfdir /etc |
|
13 |
+%_lib /usr/lib |
|
14 |
+%_lib64 /usr/lib64 |
|
15 |
+%_prefix /usr |
|
16 |
+%_exec_prefix /usr |
|
17 |
+%_bindir /usr/bin |
|
18 |
+%_sbindir /usr/sbin |
|
19 |
+%_libdir /usr/lib |
|
20 |
+%_lib64dir /usr/lib64 |
|
21 |
+%_libexecdir /usr/libexec |
|
22 |
+%_datadir /usr/share |
|
23 |
+%_docdir /usr/share/doc |
|
24 |
+%_includedir /usr/include |
|
25 |
+%_infodir /usr/share/info |
|
26 |
+%_mandir /usr/share/man |
|
27 |
+%_oldincludedir /usr/include |
|
28 |
+%_sharedstatedir /var/lib |
|
29 |
+%_var /var |
|
30 |
+%_localstatedir /var |
|
31 |
+ |
|
32 |
+%__tar /bin/tar --no-same-owner |
|
33 |
+ |
|
34 |
+%_enable_debug_packages 1 |
|
35 |
+%_include_minidebuginfo 1 |
|
36 |
+%_use_internal_dependency_generator 1 |
|
37 |
+ |
|
38 |
+%__os_install_post \ |
|
39 |
+ %{_rpmconfigdir}/brp-compress \ |
|
40 |
+ %{_rpmconfigdir}/brp-strip %{__strip} \ |
|
41 |
+ %{_rpmconfigdir}/brp-strip-debug-symbols %{__strip} \ |
|
42 |
+ %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \ |
|
43 |
+ %{_rpmconfigdir}/brp-strip-unneeded %{__strip} \ |
|
44 |
+ %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \ |
|
45 |
+%{nil} |
|
46 |
+ |
|
47 |
+%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ |
|
48 |
+%%install\ |
|
49 |
+%{nil} |
0 | 50 |
deleted file mode 100644 |
... | ... |
@@ -1,11 +0,0 @@ |
1 |
-+++ b/macros.in 2016-05-25 22:58:23.639372839 +0000 |
|
2 |
-@@ -197,6 +197,8 @@ |
|
3 |
- package or when debugging this package.\ |
|
4 |
- %files debuginfo -f debugfiles.list\ |
|
5 |
- %defattr(-,root,root)\ |
|
6 |
-+%exclude %{_libdir}/debug/.build-id/.1\ |
|
7 |
-+%exclude %{_libdir}/debug/.build-id/.1.debug\ |
|
8 |
- %endif\ |
|
9 |
- %{nil} |
|
10 |
- |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Package manager |
2 | 2 |
Name: rpm |
3 | 3 |
Version: 4.11.2 |
4 |
-Release: 10%{?dist} |
|
4 |
+Release: 11%{?dist} |
|
5 | 5 |
License: GPLv2+ |
6 | 6 |
URL: http://rpm.org |
7 | 7 |
Group: Applications/System |
... | ... |
@@ -11,9 +11,10 @@ Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{version}.tar.bz2 |
11 | 11 |
%define sha1 rpm-4.11.2=ceef44bd180d48d4004c437bc31a3ea038f54e3e |
12 | 12 |
Source1: http://download.oracle.com/berkeley-db/db-5.3.28.tar.gz |
13 | 13 |
%define sha1 db=fa3f8a41ad5101f43d08bc0efb6241c9b6fc1ae9 |
14 |
-Source2: rpm-system-configuring-scripts-2.2.tar.gz |
|
15 |
-%define sha1 rpm-system-configuring-scripts=9461cdc0b65f7ecc244bfa09886b4123e55ab5a8 |
|
16 |
-Patch0: rpm-debuginfo-exclude.1.patch |
|
14 |
+Source2: macros |
|
15 |
+Source3: brp-strip-debug-symbols |
|
16 |
+Source4: brp-strip-unneeded |
|
17 |
+Patch0: find-debuginfo-do-not-generate-non-existing-build-id.patch |
|
17 | 18 |
#Requires: nspr |
18 | 19 |
Requires: nss |
19 | 20 |
Requires: popt |
... | ... |
@@ -54,10 +55,9 @@ Binaries, libraries and scripts to build rpms. |
54 | 54 |
|
55 | 55 |
%prep |
56 | 56 |
%setup -q |
57 |
+%patch0 -p1 |
|
57 | 58 |
%setup -q -T -D -a 1 |
58 |
-%setup -q -T -D -a 2 |
|
59 | 59 |
mv db-5.3.28 db |
60 |
-%patch0 -p1 |
|
61 | 60 |
%build |
62 | 61 |
./autogen.sh --noconfigure |
63 | 62 |
./configure \ |
... | ... |
@@ -89,11 +89,9 @@ find %{buildroot} -name '*.la' -delete |
89 | 89 |
%find_lang %{name} |
90 | 90 |
# System macros and prefix |
91 | 91 |
install -dm 755 %{buildroot}%{_sysconfdir}/rpm |
92 |
-pushd rpm-system-configuring-scripts |
|
93 |
-install -vm644 macros %{buildroot}%{_sysconfdir}/rpm/ |
|
94 |
-install -vm755 brp-strip-debug-symbols %{buildroot}%{_libdir}/rpm/ |
|
95 |
-install -vm755 brp-strip-unneeded %{buildroot}%{_libdir}/rpm/ |
|
96 |
-popd |
|
92 |
+install -vm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm/ |
|
93 |
+install -vm755 %{SOURCE3} %{buildroot}%{_libdir}/rpm/ |
|
94 |
+install -vm755 %{SOURCE4} %{buildroot}%{_libdir}/rpm/ |
|
97 | 95 |
%post -p /sbin/ldconfig |
98 | 96 |
%postun -p /sbin/ldconfig |
99 | 97 |
%clean |
... | ... |
@@ -199,10 +197,13 @@ rm -rf %{buildroot} |
199 | 199 |
%{_libdir}/librpmsign.so.* |
200 | 200 |
|
201 | 201 |
%changelog |
202 |
+* Fri Aug 26 2016 Alexey Makhalov <amakhalov@vmware.com> 4.11.2-11 |
|
203 |
+- find-debuginfo...patch: exclude non existing .build-id from packaging |
|
204 |
+- Move all files from rpm-system-configuring-scripts tarball to here |
|
202 | 205 |
* Wed May 25 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.11.2-10 |
203 | 206 |
- Exclude .build-id/.1 and .build-id/.1.debug from debuginfo pkg |
204 |
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.11.2-9 |
|
205 |
-- GA - Bump release of all rpms |
|
207 |
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.11.2-9 |
|
208 |
+- GA - Bump release of all rpms |
|
206 | 209 |
* Thu May 05 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.11.2-8 |
207 | 210 |
- Update rpm version in lock-step with lua update to 5.3.2 |
208 | 211 |
* Fri Apr 08 2016 Mahmoud Bassiouny <mbassiouny@vmware.com> 4.11.2-7 |