]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-macros-th.patch
optcppflags with -D_FORTIFY_SOURCE=2 setting
[packages/rpm.git] / rpm-macros-th.patch
1 diff -ur rpm-4.4.9.org/macros.in rpm-4.4.9/macros.in
2 --- rpm-4.4.9.org/macros.in     2008-07-24 08:52:35.205363000 +0200
3 +++ rpm-4.4.9/macros.in 2008-07-24 09:01:00.351355186 +0200
4 @@ -275,6 +275,9 @@
5  #
6  #%distribution
7  
8 +# PLD Linux Release
9 +%pld_release    th
10 +
11  #      Configurable distribution URL, same as DistURL: tag in a specfile.
12  #      The URL will be used to supply reliable information to tools like
13  #      rpmfind.
14 @@ -1468,6 +1471,8 @@
15  # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
16  
17  %debugcflags   -O0 -g -Wall
18 +%optldflags    -Wl,--as-needed -Wl,-z,relro -Wl,-z,-combreloc
19 +%optcppflags   -D_FORTIFY_SOURCE=2
20  
21  # Warning: those macros are overwritten by macros.build,
22  #          left here for compatibility
23 Tylko w rpm-4.4.9: macros.in~
24 diff -ur rpm-4.4.9.org/macros.in.orig rpm-4.4.9/macros.in.orig
25 --- rpm-4.4.9.org/macros.in.orig        2008-07-24 08:52:35.195363000 +0200
26 +++ rpm-4.4.9/macros.in.orig    2008-07-24 08:52:35.205363788 +0200
27 @@ -109,6 +109,10 @@
28  %__automake            automake
29  %__autoconf            autoconf
30  
31 +# compiler used to build kernel and kernel modules
32 +%kgcc          %{__cc}
33 +%kgcc_package  gcc
34 +
35  #==============================================================================
36  # Conditional build stuff.
37  
38 @@ -207,7 +211,7 @@
39  %endif\
40  %{nil}
41  
42 -%_defaultdocdir                %{_usr}/doc
43 +%_defaultdocdir                %{_usr}/share/doc
44  
45  #      The path to the pgp executable (legacy, use %{__pgp} instead).
46  %_pgpbin               %{__pgp}
47 @@ -236,12 +240,12 @@
48  #      The directory where newly built source packages will be written.
49  %_srcrpmdir            %{_topdir}/SRPMS
50  
51 -#      Directory where temporaray files can be created.
52 -%_tmppath              %{_var}/tmp
53 +#      Directory where temporary files can be created.
54 +%_tmppath              %(echo "${TMPDIR:-/tmp}")
55  %tmpdir                        %{_tmppath}
56  
57  #      Path to top of build area.
58 -%_topdir               %{_usrsrc}/rpm
59 +%_topdir               %(echo $HOME)/rpm
60  
61  #==============================================================================
62  # ---- Optional rpmrc macros.
63 @@ -251,7 +255,7 @@
64  #      Configurable build root path, same as BuildRoot: in a specfile.
65  #      (Note: the configured macro value will override the spec file value).
66  #
67 -%buildroot             %{_tmppath}/%{name}-root
68 +%buildroot             %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
69  
70  #      The sub-directory (relative to %{_builddir}) where sources are compiled.
71  #      This macro is set after processing %setup, either explicitly from the
72 @@ -350,8 +354,8 @@
73  #              "w9.bzdio"      bzip2 level 9.
74  #              "w9.lzdio"      lzma level 9.
75  #
76 -#%_source_payload      w9.gzdio
77 -#%_binary_payload      w9.gzdio
78 +%_source_payload       w9.gzdio
79 +%_binary_payload       w9.lzdio
80  
81  #      Archive formats to use for source/binary package payloads.
82  #              "cpio"          cpio archive (default)
83 @@ -498,7 +502,7 @@
84  
85  #
86  # Path to magic file used for file classification.
87 -%_rpmfc_magic_path     %{_usr}/lib/rpm/magic
88 +%_rpmfc_magic_path     /usr/share/file/magic
89  
90  #==============================================================================
91  # ---- Database configuration macros.
92 @@ -992,9 +996,12 @@
93    %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
94    export CLASSPATH}\
95    unset PERL_MM_OPT || :\
96 -  LANG=C\
97 -  export LANG\
98 -  unset DISPLAY || :\
99 +  export LC_ALL=C\
100 +  export LANG=C\
101 +  unset LINGUAS ||:\
102 +  unset LANGUAGE ||:\
103 +  unset LC_MESSAGES ||:\
104 +  unset DISPLAY ||:\
105    \
106    %{verbose:set -x}%{!verbose:exec > /dev/null}\
107    umask 022\
108 @@ -1145,17 +1152,17 @@
109  %_exec_prefix          %{_prefix}
110  %_bindir               %{_exec_prefix}/bin
111  %_sbindir              %{_exec_prefix}/sbin
112 -%_libexecdir           %{_exec_prefix}/libexec
113 +%_libexecdir           %{_exec_prefix}/lib
114  %_datadir              %{_prefix}/share
115 -%_sysconfdir           %{_prefix}/etc
116 -%_sharedstatedir       %{_prefix}/com
117 -%_localstatedir                %{_prefix}/var
118 +%_sysconfdir           /etc
119 +%_sharedstatedir       /var/lib
120 +%_localstatedir                /var
121  %_lib                  lib
122  %_libdir               %{_exec_prefix}/%{_lib}
123  %_includedir           %{_prefix}/include
124  %_oldincludedir                /usr/include
125 -%_infodir              %{_prefix}/info
126 -%_mandir               %{_prefix}/man
127 +%_infodir              %{_prefix}/share/info
128 +%_mandir               %{_prefix}/share/man
129  %_localedir            %{_datadir}/locale
130  
131  #==============================================================================
132 @@ -1449,7 +1456,24 @@
133  # helpers are also used by %{_usrlibrpm}/rpmdeps {--provides|--requires}.
134  #%__executable_provides        %{_usrlibrpm}/executabledeps.sh --provides
135  #%__executable_requires        %{_usrlibrpm}/executabledeps.sh --requires
136 -%__scriptlet_requires  /bin/bash --rpm-requires
137 +#%__scriptlet_requires /bin/bash --rpm-requires
138 +
139 +# PLD rpm macros
140 +%_enable_debug_packages 1
141 +
142 +#-----------------------------------------------------------------
143 +# CFLAGS and LDFLAGS used to build
144 +
145 +%debuginfocflags       %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-2 -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
146 +# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
147 +
148 +%debugcflags   -O0 -g -Wall
149  
150 +# Warning: those macros are overwritten by macros.build,
151 +#          left here for compatibility
152 +%rpmcflags     %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}
153 +%rpmcxxflags   %{rpmcflags}
154 +%rpmldflags    %{!?no_build_with_as_needed:-Wl,--as-needed}
155 +  
156  # \endverbatim
157  #*/
This page took 0.036324 seconds and 4 git commands to generate.