Revision: | 1.88 |
Committed: | Fri Jun 19 09:34:06 2009 UTC (15 years, 10 months ago) by muzaffar |
Branch: | MAIN |
CVS Tags: | CMSSW_3_3_3_onlpatch5_ONLINE, CMSSW_3_3_3_onlpatch4_ONLINE, CMSSW_3_3_3_onlpatch2_ONLINE, CMSSW_3_3_3_onlpatch3_ONLINE, CMSSW_3_3_3_ONLINE, fw20091114b, fw20091114a, fw20091114, apFor333v1-sl4igcc4, apFor333v0_sl4igcc4, pe20091110c-34X-slc4-gcc432, pe20091110c-for33X-slc4-gcc432, pe20091110b-for33X-slc4-gcc432, pe20091110a-for33X-slc4-gcc432, CMSSW_3_3_2_onlpatch2_ONLINE, CMSSW_3_3_2_ONLINE, CMSSW_3_3_2_onlpatch1_ONLINE, pe20091108c-34X-slc4-gcc432, pe20091108b-34X-slc4-gcc432, pe20091108a-34X-slc4-gcc432, pe20091106a-34X-slc4-gcc432, CMSSW_3_4_0_pre5-slc4-gcc432, CMSSW_3_4_0_pre4-slc4-gcc432, CMSSW_3_4_0_pre5-slc4_gcc432, dl091106, pe20091103d-34X-slc4-gcc432, pe20091103c-34X-slc4-gcc432, pe20091103b-slc4-gcc432, pe20091103a-slc4-gcc432, pe20091103a--slc4-gcc432, eskFor340p4, CMSSW_3_3_2-slc4-gcc432, apFor332v0_sl4igcc4, CMSSW_3_4_0_pre3, eskFor340p3, CMSSW_3_3_1-slc4-gcc432, CMSSW_3_3_0_onlpatch2_ONLINE, CMSSW_3_2_7_onlpatch6_ONLINE, for330op2, for327op6, pe20091022a-ports, CMSSW_3_3_0_onlpatch1_ONLINE, pe20091021a-ports, CMSSW_3_2_7_onlpatch5_ONLINE, CMSSW_3_2_7_onlpatch4_ONLINE, CMSSW_3_4_0_pre2-432, CMSSW_3_4_0_pre1-432, sm327op4, CMSSW_3_3_0-432, CMSSW_3_3_0_ONLINE, sm091013a, sm091012c, sm091012b, sm091012a, CMSSW_3_2_7_onlpatch3_ONLINE, pe20091008d-ports, sm091007a, CMSSW_3_3_0_pre6-432, pe20091006a-ports, PerfSuiteDB_20090930, pe20090929a-ports, ge20090929-amd64, ge20090929-ia32, ap20090929a-ports, CMSSW_3_3_0_pre5-432, CMSSW_3_2_7_onlpatch2_ONLINE, sm090928a, pe20090925a-ports, pe20090924a-ports, pe20090923b-ports, CMSSW_3_2_7_onlpatch1_ONLINE, CMSSW_3_2_7_ONLINE, sm090923a, pe20090923a-ports, pe20090922e-ports, pe20090922d-ports, pe20090922c-ports, pe20090922b-ports, pe20090922a-ports, ge20090922-ports, sm090922a, pe20090921d-ports, ge20090921-ports, pe20090921c-ports, PerfSuiteDB_20090916, pe20090912a-ports-xdaq, pe20090911a-ports-xdaq, pe20090910-fromDAS_20090709, pe20090907a-ports, apFor330pre2v0, PerfSuiteDB_20090904_almost_stable, pe20090904a-ports, PerfSuiteDB_20090904, pe20090903b-ports, pe20090903a-ports, PerfSuiteDB_20090901, CMSSW_3_2_1_onlpatch6_ONLINE, sm090829a, forHEARTBEATr04, pe20090827a-ports, CMSSW_3_2_1_onlpatch5_ONLINE, pe20090826a-ports, RPMVERIFY_0_2, sm090826a, forHEARTBEATr01, CMSSW_3_2_1_onlpatch4_ONLINE, sm090818a, CMSSW_3_2_4_ONLINE, sm090813e, sm090813d, sm090813c, sm090813b, sm090813a, CMSSW_3_2_1_onlpatch3_ONLINE, sm090810a, CMSSW_3_2_1_onlpatch2_ONLINE, sm090806a, CMSSW_3_2_1_onlpatch1_ONLINE, apFor321onlp1v1, apFor321onlp1v0, CMSSW_3_2_1-432, pe20090722b-31Xports-432, pe20090722a-31Xports-432, CMSSW_3_2_1_ONLINE, sm090721b, sm090721a, sm090720b, sm090720a, apFor320onlv1, CMSSW_3_1_1_onlpatch3_ONLINE, sm090716a, CMSSW_3_1_1_onlpatch2_ONLINE, sm090715c, sm090715b, sm090715a, CMSSW_3_ONLINE_BOOTSTRAP, sm090709a, CMSSW_3_1_1_onlpatch1_ONLINE, sm090708g, CMSSW_3_1_1_ONLINE, sm090708f, sm090708e, sm090708d, sm090708c, sm090708b, CMSSW_3_1_0_ONLINE2, sm090708a, pe20090707c-31Xports-432, pe20090707b-31Xports-432, pe20090707a-31Xports-432, pe20090706b-31Xports-432, pe20090706a-31Xports-432, CMSSW_3_1_0_onlpatch1_ONLINE, sm090703a, pe20090701a-31Xports-432, CMSSW_3_1_0_ONLINE, sm090701b, sm090701a, CMSSW_3_1_0_pre10_ONLINE, sm090621b, sm090621a, sm090620b, sm090620a, sm090619e, sm090619d, sm090619c, sm090619b |
Changes since 1.87: | +2 -1 lines |
Log Message: | It looks like the ) was not proper recognised. So change the logic of finding the online arch |
# | User | Rev | Content |
---|---|---|---|
1 | elmer | 1.82 | ### RPM external apt 0.5.15lorg3.2-CMS19c |
2 | eulisse | 1.24 | ## INITENV SET APT_CONFIG %{i}/etc/apt.conf |
3 | eulisse | 1.10 | Source: http://apt-rpm.org/releases/%n-%realversion.tar.bz2 |
4 | eulisse | 1.8 | Source1: bootstrap |
5 | muzaffar | 1.88 | %define closingbrace ) |
6 | %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo flase;; esac) | ||
7 | ratnik | 1.69 | |
8 | muzaffar | 1.87 | Requires: libxml2 rpm |
9 | %if "%online" != "true" | ||
10 | Requires: openssl | ||
11 | ratnik | 1.69 | %endif |
12 | |||
13 | eulisse | 1.5 | Patch0: apt-rpm449 |
14 | eulisse | 1.32 | Patch1: apt-rpm446 |
15 | eulisse | 1.45 | Patch2: apt |
16 | eulisse | 1.61 | Patch3: apt-multiarch |
17 | eulisse | 1.85 | Patch4: apt-ansi-headers |
18 | Patch5: apt-fix-parameter-names | ||
19 | |||
20 | eulisse | 1.5 | %if "%(echo %{cmsos} | cut -d_ -f 2 | sed -e 's|.*64.*|64|')" == "64" |
21 | %define libdir lib64 | ||
22 | %else | ||
23 | %define libdir lib | ||
24 | %endif | ||
25 | ratnik | 1.1 | |
26 | eulisse | 1.5 | %prep |
27 | %setup -n %n-%{realversion} | ||
28 | eulisse | 1.32 | case $RPM_VERSION in |
29 | 4.4.9*) | ||
30 | eulisse | 1.5 | %patch0 -p0 |
31 | eulisse | 1.32 | ;; |
32 | 4.4.6*) | ||
33 | %patch1 -p0 | ||
34 | ;; | ||
35 | esac | ||
36 | eulisse | 1.49 | |
37 | # scandir has a different prototype between macosx and linux. | ||
38 | eulisse | 1.72 | case %cmsplatf in |
39 | osx*) | ||
40 | eulisse | 1.45 | %patch2 -p1 |
41 | eulisse | 1.72 | ;; |
42 | esac | ||
43 | eulisse | 1.45 | |
44 | eulisse | 1.61 | %patch3 -p1 |
45 | eulisse | 1.85 | %patch4 -p2 |
46 | %patch5 -p2 | ||
47 | eulisse | 1.61 | |
48 | ratnik | 1.1 | %build |
49 | elmer | 1.79 | #export CFLAGS="-O0 -g" |
50 | eulisse | 1.86 | case %cmsplatf in |
51 | slc*_ia32_*) | ||
52 | export CXXFLAGS="-D_FILE_OFFSET_BITS=64" | ||
53 | ;; | ||
54 | *) | ||
55 | ;; | ||
56 | esac | ||
57 | eulisse | 1.39 | export CPPFLAGS="-I$BZ2LIB_ROOT/include -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include -I$RPM_ROOT/include/rpm" |
58 | export LDFLAGS="-L$BZ2LIB_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}" | ||
59 | eulisse | 1.2 | export LIBDIR="$LIBS" |
60 | export LIBXML2_CFLAGS="-I$LIBXML2_ROOT/include/libxml2 -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include" | ||
61 | eulisse | 1.5 | export LIBXML2_LIBS="-lxml2 -L$LIBXML2_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}" |
62 | ratnik | 1.1 | |
63 | eulisse | 1.2 | ./configure --prefix=%{i} --exec-prefix=%{i} \ |
64 | --disable-nls \ | ||
65 | --disable-dependency-tracking \ | ||
66 | --without-libintl-prefix \ | ||
67 | eulisse | 1.31 | --disable-docs \ |
68 | eulisse | 1.2 | --disable-rpath |
69 | eulisse | 1.6 | make %makeprocesses |
70 | eulisse | 1.7 | |
71 | |||
72 | eulisse | 1.6 | %install |
73 | make install | ||
74 | mkdir -p %{i}/etc/profile.d | ||
75 | eulisse | 1.72 | |
76 | eulisse | 1.6 | (echo "#!/bin/sh"; \ |
77 | echo "source $RPM_ROOT/etc/profile.d/init.sh"; \ | ||
78 | echo "source $LIBXML2_ROOT/etc/profile.d/init.sh" ) > %{i}/etc/profile.d/dependencies-setup.sh | ||
79 | (echo "#!/bin/tcsh"; \ | ||
80 | echo "source $RPM_ROOT/etc/profile.d/init.csh"; \ | ||
81 | echo "source $LIBXML2_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh | ||
82 | eulisse | 1.7 | |
83 | eulisse | 1.72 | cp %_sourcedir/bootstrap %{i}/bin/bootstrap.sh |
84 | eulisse | 1.47 | |
85 | eulisse | 1.25 | mkdir -p %{i}/etc/apt |
86 | eulisse | 1.24 | cat << \EOF_APT_CONF > %{i}/etc/apt.conf |
87 | eulisse | 1.7 | Dir "%{instroot}" |
88 | { | ||
89 | // Location of the state dir | ||
90 | State "%{cmsplatf}/var/lib/apt/" | ||
91 | { | ||
92 | lists "lists/"; | ||
93 | xstatus "xstatus"; | ||
94 | userstatus "status.user"; | ||
95 | status "var/lib/dpkg/status"; | ||
96 | cdroms "cdroms.list"; | ||
97 | }; | ||
98 | |||
99 | // Location of the cache dir | ||
100 | Cache "%{cmsplatf}/var/lib/cache" { | ||
101 | archives "%{cmsplatf}"; | ||
102 | srcpkgcache "srcpkgcache.bin"; | ||
103 | pkgcache "pkgcache.bin"; | ||
104 | }; | ||
105 | |||
106 | // Locations of binaries | ||
107 | Bin { | ||
108 | eulisse | 1.28 | methods "%{i}/lib/apt/methods/"; |
109 | eulisse | 1.7 | gzip "/bin/gzip"; |
110 | dpkg "/usr/bin/dpkg"; | ||
111 | dpkg-source "/usr/bin/dpkg-source"; | ||
112 | dpkg-buildpackage "/usr/bin/dpkg-buildpackage"; | ||
113 | eulisse | 1.25 | apt-get "%{i}/bin/apt-get-wrapper"; |
114 | apt-cache "%{i}/bin/apt-cache-wrapper"; | ||
115 | rpm "%{i}/bin/rpm-wrapper"; | ||
116 | eulisse | 1.7 | }; |
117 | |||
118 | |||
119 | // Config files | ||
120 | eulisse | 1.28 | Etc "%{cmsplatf}/external/apt/%{v}/etc/" { |
121 | eulisse | 1.7 | sourcelist "sources.list"; |
122 | main "apt.conf"; | ||
123 | preferences "preferences"; | ||
124 | }; | ||
125 | }; | ||
126 | |||
127 | Debug::pkgProblemResolver="1"; | ||
128 | |||
129 | RPM | ||
130 | { | ||
131 | PM "external"; | ||
132 | eulisse | 1.43 | Options { }; |
133 | Install-Options { "--force";"--prefix";"%{instroot}";"--ignoreos";"--ignorearch";}; | ||
134 | eulisse | 1.7 | RootDir "%{instroot}"; |
135 | Architecture "%{cmsplatf}"; | ||
136 | }; | ||
137 | dlange | 1.84 | |
138 | APT::Cache-Limit 33554432; | ||
139 | |||
140 | eulisse | 1.7 | EOF_APT_CONF |
141 | |||
142 | eulisse | 1.44 | |
143 | eulisse | 1.25 | cat << \EOF_SOURCES_LIST > %{i}/etc/sources.list |
144 | eulisse | 1.41 | rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external |
145 | eulisse | 1.77 | # rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external |
146 | eulisse | 1.25 | # This are defined to support experimental repositories. The bootstrap file rewrites and uncomments |
147 | # them when passed the appropriate commandline option. | ||
148 | eulisse | 1.75 | #;rpm http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
149 | eulisse | 1.77 | # rpm-src http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
150 | eulisse | 1.25 | EOF_SOURCES_LIST |
151 | |||
152 | cat << \EOF_RPMPRIORITIES > %{i}/etc/rpmpriorities | ||
153 | Essantial: | ||
154 | |||
155 | EOF_RPMPRIORITIES | ||
156 | |||
157 | cat << \EOF_BIN_APT_CACHE_WRAPPER > %{i}/bin/apt-cache-wrapper | ||
158 | #!/bin/sh | ||
159 | eulisse | 1.72 | mkdir -p %{instroot}/var/log/rpm |
160 | touch %{instroot}/var/log/rpm/log.txt | ||
161 | echo $@ >> %{instroot}/var/log/rpm/log.txt | ||
162 | eulisse | 1.25 | apt-cache $@ |
163 | EOF_BIN_APT_CACHE_WRAPPER | ||
164 | eulisse | 1.26 | chmod +x %{i}/bin/apt-cache-wrapper |
165 | eulisse | 1.25 | |
166 | cat << \EOF_BIN_APT_GET_WRAPPER > %{i}/bin/apt-get-wrapper | ||
167 | #!/bin/sh | ||
168 | eulisse | 1.72 | mkdir -p %{instroot}/var/log/rpm |
169 | touch %{instroot}/var/log/rpm/log.txt | ||
170 | echo $@ >> %{instroot}/var/log/rpm/log.txt | ||
171 | eulisse | 1.25 | apt-get $@ |
172 | EOF_BIN_APT_GET_WRAPPER | ||
173 | eulisse | 1.26 | chmod +x %{i}/bin/apt-get-wrapper |
174 | eulisse | 1.25 | |
175 | cat << \EOF_BIN_RPM > %{i}/bin/rpm-wrapper | ||
176 | #!/bin/sh | ||
177 | if [ X"$(id -u)" = X0 ]; then | ||
178 | echo "*** CMS SOFTWARE INSTALLATION ABORTED ***" 1>&2 | ||
179 | echo "CMS software cannot be installed as the super-user." 1>&2 | ||
180 | echo "(We recommend reading any standard unix security guide.)" 1>&2 | ||
181 | exit 1 | ||
182 | fi | ||
183 | eulisse | 1.72 | mkdir -p %{instroot}/var/log/rpm |
184 | touch %{instroot}/var/log/rpm/log.txt | ||
185 | echo rpm ${1+"$@"} >> %{instroot}/var/log/rpm/log.txt | ||
186 | eulisse | 1.25 | exec rpm ${1+"$@"} |
187 | EOF_BIN_RPM | ||
188 | chmod +x %{i}/bin/rpm-wrapper | ||
189 | |||
190 | eulisse | 1.6 | %post |
191 | eulisse | 1.8 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/apt/lists/partial |
192 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/rpm | ||
193 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/cache/%{cmsplatf}/partial | ||
194 | eulisse | 1.24 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc |
195 | eulisse | 1.8 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/rpm |
196 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/lib/apt/methods | ||
197 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/dpkg/status | ||
198 | mkdir -p $RPM_INSTALL_PREFIX/bin | ||
199 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/cache/%{cmsplatf} | ||
200 | eulisse | 1.6 | %{relocateConfig}etc/profile.d/dependencies-setup.sh |
201 | %{relocateConfig}etc/profile.d/dependencies-setup.csh | ||
202 | eulisse | 1.25 | %{relocateConfig}bin/apt-cache-wrapper |
203 | %{relocateConfig}bin/apt-get-wrapper | ||
204 | %{relocateConfig}bin/rpm-wrapper | ||
205 | eulisse | 1.29 | %{relocateConfig}etc/apt.conf |