Revision: | 1.118 |
Committed: | Thu Dec 1 15:52:48 2011 UTC (13 years, 5 months ago) by eulisse |
Branch: | MAIN |
CVS Tags: | davidlt-20120912-1527-osx107_amd64_gcc462, sm120518a-52X-slc6, ge20120508-slc6, davidlt_20120425_1120-52X-slc6, sm20120404-60X-gcc470, davidlt_20120403_1455-60X-gcc470, davidlt_20120327_1112-51X-gcc470, davidlt_1-51X-gcc470, sm20120327-60X-gcc470, CMSSW_6_0_0_pre1_LOOPER, CMSSW_6_0_0_pre1-osx107, CMSSW_6_0_0_pre1-slc6, CMSSW_6_0_0_pre1, sm20120322-60x-slc6, davidlt_20120321_1033-60X-lion, davidlt_20120321_1024-60X, CMSSW_5_1_3, geForCMSSW_5_2_1-osx107_amd64_gcc462, geForCMSSW_5_2_1-osx106_amd64_gcc462, daForCMSSW_5_1_3-osx106_amd64_gcc462, daForCMSSW_5_1_3-slc5_amd64_gcc462, davidlt_20120315_1325-60X-gcc470, davidlt_20120313_1031-60X-lion, davidlt_20120307_0959-60X-slc6, davidlt_20120313_1023-60X, davidlt_20120314_1407-60X-gcc470, BOOTSTRAP_slc5_amd64_gcc470, davidlt_20120314_1059-51X-gcc462, davidlt_20120313_1031-52X-lion, davidlt_20120313_1023-52X, davidlt_20120312_1508-51X-gcc462, davidlt_60X_gcc470_2, davidlt_60X_gcc470, ge20120310-52X, CMSSW_5_1_2_patch1, daForCMSSW_5_1_2_patch1-slc5_amd64_gcc462, geForCMSSW_5_2_0-osx106_amd64_gcc462, geForCMSSW_5_2_0-osx107_amd64_gcc462, CMSSW_5_2_0, davidlt_20120307_1529-51X-gcc462, davidlt_20120307_0959-52X-slc6, geForCMSSW_5_2_0-slc5_amd64_gcc462, CMSSW_5_1_2_ONLINE, ge20120305-52X-lion, fw20120305-cmssw512-gcc462onl, CMSSW_5_1_1_patch2_ONLINE, ge20120305-52X, davidlt_20120304_1754-52X-slc6, CMSSW_5_1_1_patch3, daForCMSSW_5_1_1_patch3-slc5_amd64_gcc462, sm20120302-52X-slc6, sm20120302-52X-lion, sm20120302-52X, fw20120302-cmssw511p2-gcc461onl, davidlt_20120301_1448-52X-gcc462-slc6, ge20120301-52X-lion, ge20120301-52X, davidlt_20120229_1507-52X-gcc462-slc6, da20120229-52X-gcc462-slc6, davidlt_slc6c, davidlt_slc6b, geForCMSSW_5_2_0_pre6_TS117498-slc5_amd64_gcc462, CMSSW_5_2_0_pre5_TS117504, davidlt_slc6a, geForCMSSW_5_2_0_pre5_TS117504-slc5_amd64_gcc462, BOOTSTRAP_slc6_amd64_gcc462, ge20120227-52X, geForCMSSW_5_2_0_pre6-osx106_amd64_gcc462, geForCMSSW_5_2_0_pre6DQM-slc5_amd64_gcc462, CMSSW_5_1_2, daForCMSSW_5_1_2-osx106_amd64_gcc462, daForCMSSW_5_1_2-slc5_amd64_gcc462, geForCMSSW_5_2_0_pre6-osx107_amd64_gcc462, CMSSW_5_2_0_pre6, davidlt_20120224_2132-51X-gcc462, CMSSW_5_1_1_ONLINE, geForCMSSW_5_2_0_pre6-slc5_amd64_gcc462, fw20120222-cmssw511-gcc461onl-3, fw20120222-cmssw511-gcc461onl-2, fw20120222-cmssw511-gcc461onl, ge20120222-52X-gcc462-lion, ge20120222-52X-gcc462, fw20120221-gcc461onl, sm120221, CMSSW_5_1_1_patch2, daForCMSSW_5_1_1_patch2-slc5_amd64_gcc462, ge20120218-52X-gcc462-lion, vs20120218-52X-gcc462-lion, ge20120218-52X-gcc462, ge20120215-52X-gcc462, CMSSW_5_1_1_patch1, daForCMSSW_5_1_1_patch1-slc5_amd64_gcc462, vs20120215-52X-gcc462, vs20120215-52X, vs20120215-52X-gcc462-lion, vs20120215-51X-gcc462, vs20120215-51X, vs20120215-50X-gcc461-ports, CMSSW_5_2_0_pre5, da20120215-52X-gcc462-lion, da20120215-52X-gcc462, da20120214-50X-gcc461-ports, CMSSW_5_1_1, geForCMSSW_5_2_0_pre5-osx106_amd64_gcc462, geForCMSSW_5_2_0_pre5-osx107_amd64_gcc462, geForCMSSW_5_2_0_pre5-slc5_amd64_gcc462, geForCMSSW_5_2_0_pre5-slc5_amd64_gcc461, CMSSW_5_0_1_patch3-gcc461-ports, ge20120213-52X-gcc462, daForCMSSW_5_0_1_patch3b-slc5_amd64_gcc461, daForCMSSW_5_1_1b-osx106_amd64_gcc462, daForCMSSW_5_1_1b-slc5_amd64_gcc462, da20120213-51X-gcc462, ge20120213-52X-gcc462-lion, ge20120212c-52X-gcc462-lion, daForCMSSW_5_1_1-osx106_amd64_gcc462, daForCMSSW_5_1_1-slc5_amd64_gcc462, ge20120212b-52X-gcc462-lion, ge20120212-52X-gcc462-lion, da20120209-52X-gcc462-lion, da20120209-52X-gcc462, da20120209-52X, CMSSW_5_0_1_patch2-gcc461-ports, vs20120207-52X, vs20120207a-51X, da20120207b-51X-gcc462, da20120207-51X-gcc462, daForCMSSW_5_0_1_patch2c-slc5_amd64_gcc461, daForCMSSW_5_0_1_patch2-slc5_amd64_gcc461, CMSSW_5_2_0_pre4, vs20120207-51X, da20120206-50X-gcc461-ports, geForCMSSW_5_2_0_pre4-slc5_amd64_gcc461, geForCMSSW_5_2_0_pre4, da20120205-50X-gcc461-ports, da20120205-51X, fw20120205-cmssw50x-online, CMSSW_5_0_1_ONLINE, ge20120204-51X-gcc462-lion, ge20120204-51X-gcc462, da20120204-52X-gcc462-lion, da20120204-52X, geForCMSSW_5_2_0_pre2_TS113282_TS115242, CMSSW_5_0_1_patch1-gcc461-ports, CMSSW_5_0_0_patch2-gcc461-ports, fw20120202cmssw501online, fw20120201cmssw501online, da20120130-52X, CMSSW_5_0_1-gcc461-ports, da20120129-50X-gcc461-ports, da20120129-52X, CMSSW_5_0_0_ONLINE-cms, fw20120127gcc461cmssw500onl, fw20120126gcc461cmssw500onl, CMSSW_5_2_0_pre2_TS113282, daFor520pre2TS113282, daFor520pre2TS113042, fw20120125gcc461cmssw500onl, da20120124-52X, da20120123-52X, da20120123-51X, da20120123-50X-gcc461-ports, CMSSW_5_0_0_patch1-gcc461-ports, CMSSW_5_2_0_pre2, daFor520pre2, da20120120-52X, CMSSW_5_2_0_pre1, daFor520pre1, CMSSW_5_1_0_pre2, daFor510pre2, da20120116-52X, da20120112b-51X, da20120112b-52X, da20120112-50X-gcc461-ports, da20120112-51X, da20120112-52X, CMSSW_5_0_0_ONLINE, da20120110-50X-gcc461-ports, da20120110-51X, fw20120110gcc461cmssw500onl, da20120110-52X, da20120109b-51X, da20120109b-52X, da20120109-52X, da20120108-52X-gcc461-ports, da20120106-52X-gcc461-ports, sm120105onl500, sm111222a-onlgcc461, sm111222-onlgcc461, da20111220-50X-gcc461-ports, da20111219-50X-gcc461-ports, CMSSW_5_1_0_pre1-gcc461-ports, sjgFor510pre1d-gcc461-ports, sjgFor510pre1c-gcc461-ports, sjgFor510pre1b-gcc461-ports, daFor510pre1c-gcc461-ports, CMSSW_5_0_0-gcc461-ports, sjgFor500-gcc461-ports, daFor510pre1b-gcc461-ports, az20111214-50X-gcc461-ports, daFor510pre1-gcc461-ports, sjgFor510pre1-gcc461-ports, CMSSW_5_0_0_pre7-gcc461-ports, sjgFor500pre7-gcc461-ports, da20111206b-50X-gcc461-ports, da20111206-50X-gcc461-ports, da20111205-50X-gcc461-ports |
Changes since 1.117: | +2 -10 lines |
Log Message: | Drop 32bit support. |
# | User | Rev | Content |
---|---|---|---|
1 | fwyzard | 1.110 | ### RPM external apt 429 |
2 | eulisse | 1.24 | ## INITENV SET APT_CONFIG %{i}/etc/apt.conf |
3 | muzaffar | 1.100 | ## INITENV CMD_SH if [ -f %{instroot}/common/apt-site-env.sh ]; then . %{instroot}/common/apt-site-env.sh; fi |
4 | ## INITENV CMD_CSH if ( -f %{instroot}/common/apt-site-env.csh ) source %{instroot}/common/apt-site-env.csh; endif | ||
5 | fwyzard | 1.110 | Source0: http://cmsrep.cern.ch/cmssw/apt-mirror/apt-rpm-%realversion.tar.gz |
6 | # svn://svn.github.com/ktf/apt-rpm.git?scheme=http&revision=%{realversion}&module=apt-rpm&output=/apt-rpm.tar.gz | ||
7 | eulisse | 1.8 | Source1: bootstrap |
8 | eulisse | 1.89 | Source2: http://search.cpan.org/CPAN/authors/id/T/TL/TLBDK/RPM-Header-PurePerl-1.0.2.tar.gz |
9 | eulisse | 1.111 | Patch0: apt-429-fix-gcc-461 |
10 | eulisse | 1.116 | Patch1: apt-429-fix-gcc-47 |
11 | eulisse | 1.89 | |
12 | eulisse | 1.111 | %define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac) |
13 | ratnik | 1.69 | |
14 | fwyzard | 1.110 | Requires: libxml2 rpm db4 |
15 | muzaffar | 1.87 | %if "%online" != "true" |
16 | Requires: openssl | ||
17 | fwyzard | 1.106 | %endif |
18 | |||
19 | eulisse | 1.5 | %prep |
20 | eulisse | 1.89 | %setup -T -b 2 -n RPM-Header-PurePerl-1.0.2 |
21 | cd .. | ||
22 | fwyzard | 1.110 | %setup -n apt-rpm-%realversion |
23 | eulisse | 1.111 | %patch0 -p1 |
24 | eulisse | 1.116 | %patch1 -p1 |
25 | dsr | 1.91 | |
26 | ratnik | 1.1 | %build |
27 | eulisse | 1.86 | case %cmsplatf in |
28 | eulisse | 1.118 | slc*) |
29 | fwyzard | 1.110 | export USER_CFLAGS="-pthread" |
30 | export USER_CXXFLAGS="-pthread" | ||
31 | export USER_LDFLAGS="-pthread" | ||
32 | export USER_LIBS="-pthread" | ||
33 | ;; | ||
34 | eulisse | 1.118 | *) ;; |
35 | eulisse | 1.86 | esac |
36 | ratnik | 1.1 | |
37 | fwyzard | 1.110 | chmod +x buildlib/install-sh |
38 | eulisse | 1.115 | # Avoid picking up sqlite3 from the system. |
39 | perl -p -i -e 's|sqlite3|sqlite3disabled|' configure | ||
40 | eulisse | 1.2 | ./configure --prefix=%{i} --exec-prefix=%{i} \ |
41 | eulisse | 1.113 | --disable-static \ |
42 | fwyzard | 1.110 | --disable-nls \ |
43 | --disable-dependency-tracking \ | ||
44 | --without-libintl-prefix \ | ||
45 | --disable-docs \ | ||
46 | --disable-selinux \ | ||
47 | --disable-rpath \ | ||
48 | CXXFLAGS="-fPIC $USER_CXXFLAGS" \ | ||
49 | CFLAGS="-fPIC $USER_CFLAGS" \ | ||
50 | CPPFLAGS="-DAPT_DISABLE_MULTIARCH -D_RPM_4_4_COMPAT -I$POPT_ROOT/include -I$DB4_ROOT/include -I$BZ2LIB_ROOT/include -I$LUA_ROOT/include -I$RPM_ROOT/include -I$RPM_ROOT/include/rpm $USER_CPPFLAGS" \ | ||
51 | LDFLAGS="-L$BZ2LIB_ROOT/lib -L$DB4_ROOT/lib -L$LUA_ROOT/lib -L$RPM_ROOT/lib $USER_LDFLAGS" \ | ||
52 | LIBS="-llua $USER_LIBS" \ | ||
53 | LIBXML2_CFLAGS="-I$LIBXML2_ROOT/include/libxml2 -I$DB4_ROOT/include -I$LUA_ROOT/include -I$RPM_ROOT/include" \ | ||
54 | LIBXML2_LIBS="-lxml2 -L$DB4_ROOT/lib -L$LIBXML2_ROOT/lib -L$LUA_ROOT/lib -L$RPM_ROOT/lib" \ | ||
55 | RPM_LIBS="-L$RPM_ROOT/lib -lrpm -lrpmio -lrpmbuild" | ||
56 | |||
57 | chmod +x buildlib/install-sh | ||
58 | eulisse | 1.6 | make %makeprocesses |
59 | eulisse | 1.7 | |
60 | |||
61 | eulisse | 1.6 | %install |
62 | make install | ||
63 | eulisse | 1.113 | case %cmsos in |
64 | eulisse | 1.114 | osx*) SONAME=dylib ;; |
65 | *) SONAME=so ;; | ||
66 | eulisse | 1.113 | esac |
67 | eulisse | 1.114 | # Drop documentation and developer files, since we do not need it. |
68 | %define drop_files %i/{share,include} | ||
69 | # Strip executables and libraries. | ||
70 | %define strip_files %i/lib %i/bin/{apt-config,genpkglist,apt-get,countpkglist,gensrclist,apt-cache,apt-shell} %i/lib/apt/methods/* | ||
71 | lat | 1.112 | # Remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config |
72 | # which we neither need nor use at this time. | ||
73 | fwyzard | 1.110 | rm -rf %i/lib/pkgconfig |
74 | |||
75 | eulisse | 1.6 | mkdir -p %{i}/etc/profile.d |
76 | eulisse | 1.72 | |
77 | eulisse | 1.6 | (echo "#!/bin/sh"; \ |
78 | echo "source $RPM_ROOT/etc/profile.d/init.sh"; \ | ||
79 | echo "source $LIBXML2_ROOT/etc/profile.d/init.sh" ) > %{i}/etc/profile.d/dependencies-setup.sh | ||
80 | (echo "#!/bin/tcsh"; \ | ||
81 | echo "source $RPM_ROOT/etc/profile.d/init.csh"; \ | ||
82 | echo "source $LIBXML2_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh | ||
83 | eulisse | 1.7 | |
84 | eulisse | 1.72 | cp %_sourcedir/bootstrap %{i}/bin/bootstrap.sh |
85 | eulisse | 1.89 | pwd |
86 | perl -p -i -e 'my $s = `cat ../RPM-Header-PurePerl-1.0.2/lib/RPM/Header/PurePerl.pm`;\ | ||
87 | s|\@RPM_HEADER_PUREPERL_PM\@|$s|' %{i}/bin/bootstrap.sh | ||
88 | perl -p -i -e 'my $s = `cat ../RPM-Header-PurePerl-1.0.2/lib/RPM/Header/PurePerl/Tagtable.pm`;\ | ||
89 | s|\@RPM_HEADER_PUREPERL_TAGSTABLE_PM\@|$s|' %{i}/bin/bootstrap.sh | ||
90 | eulisse | 1.47 | |
91 | eulisse | 1.25 | mkdir -p %{i}/etc/apt |
92 | eulisse | 1.24 | cat << \EOF_APT_CONF > %{i}/etc/apt.conf |
93 | eulisse | 1.7 | Dir "%{instroot}" |
94 | { | ||
95 | // Location of the state dir | ||
96 | State "%{cmsplatf}/var/lib/apt/" | ||
97 | { | ||
98 | lists "lists/"; | ||
99 | xstatus "xstatus"; | ||
100 | userstatus "status.user"; | ||
101 | status "var/lib/dpkg/status"; | ||
102 | cdroms "cdroms.list"; | ||
103 | }; | ||
104 | |||
105 | // Location of the cache dir | ||
106 | Cache "%{cmsplatf}/var/lib/cache" { | ||
107 | archives "%{cmsplatf}"; | ||
108 | srcpkgcache "srcpkgcache.bin"; | ||
109 | pkgcache "pkgcache.bin"; | ||
110 | }; | ||
111 | |||
112 | // Locations of binaries | ||
113 | Bin { | ||
114 | eulisse | 1.28 | methods "%{i}/lib/apt/methods/"; |
115 | eulisse | 1.7 | gzip "/bin/gzip"; |
116 | dpkg "/usr/bin/dpkg"; | ||
117 | dpkg-source "/usr/bin/dpkg-source"; | ||
118 | dpkg-buildpackage "/usr/bin/dpkg-buildpackage"; | ||
119 | eulisse | 1.25 | apt-get "%{i}/bin/apt-get-wrapper"; |
120 | apt-cache "%{i}/bin/apt-cache-wrapper"; | ||
121 | rpm "%{i}/bin/rpm-wrapper"; | ||
122 | eulisse | 1.7 | }; |
123 | |||
124 | |||
125 | // Config files | ||
126 | eulisse | 1.28 | Etc "%{cmsplatf}/external/apt/%{v}/etc/" { |
127 | eulisse | 1.7 | sourcelist "sources.list"; |
128 | main "apt.conf"; | ||
129 | preferences "preferences"; | ||
130 | }; | ||
131 | }; | ||
132 | |||
133 | Debug::pkgProblemResolver="1"; | ||
134 | |||
135 | RPM | ||
136 | { | ||
137 | PM "external"; | ||
138 | eulisse | 1.43 | Options { }; |
139 | Install-Options { "--force";"--prefix";"%{instroot}";"--ignoreos";"--ignorearch";}; | ||
140 | eulisse | 1.7 | RootDir "%{instroot}"; |
141 | Architecture "%{cmsplatf}"; | ||
142 | }; | ||
143 | dlange | 1.84 | |
144 | APT::Cache-Limit 33554432; | ||
145 | fwyzard | 1.109 | APT::http::Max-Age 0; |
146 | dlange | 1.84 | |
147 | eulisse | 1.7 | EOF_APT_CONF |
148 | |||
149 | eulisse | 1.44 | |
150 | eulisse | 1.25 | cat << \EOF_SOURCES_LIST > %{i}/etc/sources.list |
151 | eulisse | 1.41 | rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external |
152 | eulisse | 1.77 | # rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external |
153 | eulisse | 1.25 | # This are defined to support experimental repositories. The bootstrap file rewrites and uncomments |
154 | # them when passed the appropriate commandline option. | ||
155 | eulisse | 1.75 | #;rpm http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
156 | eulisse | 1.77 | # rpm-src http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
157 | eulisse | 1.25 | EOF_SOURCES_LIST |
158 | |||
159 | cat << \EOF_RPMPRIORITIES > %{i}/etc/rpmpriorities | ||
160 | Essantial: | ||
161 | |||
162 | EOF_RPMPRIORITIES | ||
163 | |||
164 | cat << \EOF_BIN_APT_CACHE_WRAPPER > %{i}/bin/apt-cache-wrapper | ||
165 | #!/bin/sh | ||
166 | eulisse | 1.72 | mkdir -p %{instroot}/var/log/rpm |
167 | touch %{instroot}/var/log/rpm/log.txt | ||
168 | echo $@ >> %{instroot}/var/log/rpm/log.txt | ||
169 | eulisse | 1.25 | apt-cache $@ |
170 | EOF_BIN_APT_CACHE_WRAPPER | ||
171 | eulisse | 1.26 | chmod +x %{i}/bin/apt-cache-wrapper |
172 | eulisse | 1.25 | |
173 | cat << \EOF_BIN_APT_GET_WRAPPER > %{i}/bin/apt-get-wrapper | ||
174 | #!/bin/sh | ||
175 | eulisse | 1.72 | mkdir -p %{instroot}/var/log/rpm |
176 | touch %{instroot}/var/log/rpm/log.txt | ||
177 | echo $@ >> %{instroot}/var/log/rpm/log.txt | ||
178 | eulisse | 1.25 | apt-get $@ |
179 | EOF_BIN_APT_GET_WRAPPER | ||
180 | eulisse | 1.26 | chmod +x %{i}/bin/apt-get-wrapper |
181 | eulisse | 1.25 | |
182 | cat << \EOF_BIN_RPM > %{i}/bin/rpm-wrapper | ||
183 | #!/bin/sh | ||
184 | if [ X"$(id -u)" = X0 ]; then | ||
185 | echo "*** CMS SOFTWARE INSTALLATION ABORTED ***" 1>&2 | ||
186 | echo "CMS software cannot be installed as the super-user." 1>&2 | ||
187 | echo "(We recommend reading any standard unix security guide.)" 1>&2 | ||
188 | exit 1 | ||
189 | fi | ||
190 | eulisse | 1.72 | mkdir -p %{instroot}/var/log/rpm |
191 | touch %{instroot}/var/log/rpm/log.txt | ||
192 | echo rpm ${1+"$@"} >> %{instroot}/var/log/rpm/log.txt | ||
193 | eulisse | 1.25 | exec rpm ${1+"$@"} |
194 | EOF_BIN_RPM | ||
195 | chmod +x %{i}/bin/rpm-wrapper | ||
196 | muzaffar | 1.117 | mkdir -p %{instroot}/%{cmsplatf}/var/lib/apt/lists/partial |
197 | mkdir -p %{instroot}/%{cmsplatf}/var/lib/rpm | ||
198 | mkdir -p %{instroot}/%{cmsplatf}/var/lib/cache/%{cmsplatf}/partial | ||
199 | mkdir -p %{instroot}/%{cmsplatf}/var/lib/dpkg/status | ||
200 | mkdir -p %{instroot}/%{cmsplatf}/etc/rpm | ||
201 | mkdir -p %{instroot}/%{cmsplatf}/lib/apt/methods | ||
202 | eulisse | 1.25 | |
203 | eulisse | 1.6 | %post |
204 | muzaffar | 1.117 | %{relocateRpmPkg}etc/profile.d/dependencies-setup.* |
205 | %{relocateRpmPkg}bin/apt-cache-wrapper | ||
206 | %{relocateRpmPkg}bin/apt-get-wrapper | ||
207 | %{relocateRpmPkg}bin/rpm-wrapper | ||
208 | %{relocateRpmPkg}etc/apt.conf |