ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/apt.spec
Revision: 1.40
Committed: Mon Jul 2 14:31:48 2007 UTC (17 years, 9 months ago) by elmer
Branch: MAIN
CVS Tags: nr080626_for1612flt, CMSSW_1_6_12, apFor1612v0, apFor1612p3v0, CMSSW_1_6_12_pre2, apFor1612p2v1, apFor1612p2v0, CMSSW_1_6_12_pre1, apFor1612p1v1, apFor1612p1v0, CMSSW_1_6_11, apFor1611v0, apFor1611p1v1, apFor1611p1v0, CMSSW_1_6_10, apFor1610v0, CMSSW_1_6_10_pre2, CMSSW_1_6_10_pre1, apFor1610p2v0, apFor1610p1v2, CMSSW_1_6_8_FWLITE-root51800, apFor1610p1v1, CMSSW_1_6_9, apFor169v1, CMSSW_1_6_9_pre2, nr080124fwl168a, apFor169p2v2, apFor169p2v1, apFor169p2v0, ap20080116d, ap20080116c, ap20080116b, ap20080116a, ap20080115d, ap20080115c, ap20080115b, ap20080115a, ap20080114b, ap20080114a, CMSSW_1_6_9_pre1, apFor169p1, apFor169p1v5, apFor169p1v4, apFor169p1v3, apFor169p1v2, apFor169p1v1, apFor169p1v0, apFor169v0, CMSSW_1_6_8, CMSSW_1_6_8_pre2_FWLITE-root51706, apFor168, CMSSW_1_6_8_pre2, apFor168p2, CMSSW_1_6_8_pre1, apFor168p1, CMSSW_1_6_7_FWLITE, nr071026_fwlite167, nr071025_fwlite167, CMSSW_1_6_7, pe20071019a-for167, CMSSW_1_6_6, pe20071013a-for166p2, pe20071011a-for166, pe20071009a-for166p1, CMSSW_1_6_5, pe20071006a-for165, CMSSW_1_6_5_pre2, pe20071005a-for165p2, CMSSW_1_6_5_pre1, pe20070930b-for165p1, pe20070930a-for165p1, CMSSW_1_6_4, pe20070929a-for164, CMSSW_1_6_3, pe20070928a-for16Xdpm, pe20070926a-for163, CMSSW_1_6_2, pe20070925a-for162, CMSSW_1_6_2_pre1, pe20070922a-for162p1, CMSSW_1_6_1, pe20070922g-for161p2, pe20070922f-for161p2, pe20070922e-for161p2, pe20070922d-for161p2, pe20070922c-for161p2, pe20070922b-for161p2, pe20070922a-for161p2, CMSSW_1_6_1_pre1, CMSSW_1_6_0, CMSSW_1_6_0_pre14, pe20070831d-160p14, pe20070831c-160p14, pe20070831b-160p14, pe20070831a-160p14, pe20070830a-160p14, CMSSW_1_6_0_DAQ3, CMSSW_1_6_0_pre13, dl070828t2, dl070828, dl070826, pe20070826a-160p13, CMSSW_1_6_0_pre12, dl070824, pe20070824b-160p12, pe20070824-160p12, pe20070823-160p12, CMSSW_1_6_0_pre11, CMSSW_1_6_0_pre10, ge20070810-ptc, CMSSW_1_6_0_pre9, CMSSW_1_6_0_pre8, CMSSW_1_6_0_pre7, dl070730, cms160daq1_zhen2, cms160daq1_zhen1, CMSSW_1_6_0_pre6, pe20070727-160p6, CMSSW_1_6_0_DAQ1, nr20070723_fwlite160p5, CMSSW_1_6_0_pre5, dl070721, dl070720_160daq1_1, pe20070720-160daq1, pe20070720-160p5, CMSSW_1_6_0_pre4, ge20070706-macosx, CMSSW_1_6_0_pre3, pe20070705a-160p3, CMSSW_1_6_0_pre2, pe20070702b-160p3, pe20070702b-160p2
Changes since 1.39: +1 -1 lines
Log Message:
For consistency with the rest, these are all now labeled -CMS3.

File Contents

# User Rev Content
1 elmer 1.40 ### RPM external apt 0.5.15lorg3.2-CMS3
2 eulisse 1.24 ## INITENV SET APT_CONFIG %{i}/etc/apt.conf
3 eulisse 1.7
4 eulisse 1.10 Source: http://apt-rpm.org/releases/%n-%realversion.tar.bz2
5 eulisse 1.8 Source1: bootstrap
6 eulisse 1.32 Requires: libxml2 beecrypt rpm zlib bz2lib openssl
7 eulisse 1.5 Patch0: apt-rpm449
8 eulisse 1.32 Patch1: apt-rpm446
9 eulisse 1.5 %if "%(echo %{cmsos} | cut -d_ -f 2 | sed -e 's|.*64.*|64|')" == "64"
10     %define libdir lib64
11     %else
12     %define libdir lib
13     %endif
14 ratnik 1.1
15 eulisse 1.5 %prep
16     %setup -n %n-%{realversion}
17 eulisse 1.32 case $RPM_VERSION in
18     4.4.9*)
19 eulisse 1.5 %patch0 -p0
20 eulisse 1.32 ;;
21     4.4.6*)
22     %patch1 -p0
23     ;;
24     esac
25 ratnik 1.1 %build
26 eulisse 1.34 export CFLAGS="-O0 -g"
27     export CXXFLAGS="-O0 -g"
28 eulisse 1.39 export CPPFLAGS="-I$BZ2LIB_ROOT/include -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include -I$RPM_ROOT/include/rpm"
29     export LDFLAGS="-L$BZ2LIB_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}"
30 eulisse 1.2 export LIBDIR="$LIBS"
31     export LIBXML2_CFLAGS="-I$LIBXML2_ROOT/include/libxml2 -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include"
32 eulisse 1.5 export LIBXML2_LIBS="-lxml2 -L$LIBXML2_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}"
33 ratnik 1.1
34 eulisse 1.2 ./configure --prefix=%{i} --exec-prefix=%{i} \
35     --disable-nls \
36     --disable-dependency-tracking \
37     --without-libintl-prefix \
38 eulisse 1.31 --disable-docs \
39 eulisse 1.2 --disable-rpath
40 eulisse 1.6 make %makeprocesses
41 eulisse 1.7
42    
43 eulisse 1.6 %install
44     make install
45     mkdir -p %{i}/etc/profile.d
46     (echo "#!/bin/sh"; \
47     echo "source $RPM_ROOT/etc/profile.d/init.sh"; \
48     echo "source $LIBXML2_ROOT/etc/profile.d/init.sh" ) > %{i}/etc/profile.d/dependencies-setup.sh
49     (echo "#!/bin/tcsh"; \
50     echo "source $RPM_ROOT/etc/profile.d/init.csh"; \
51     echo "source $LIBXML2_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh
52 eulisse 1.7
53 eulisse 1.25 mkdir -p %{i}/etc/apt
54 eulisse 1.24 cat << \EOF_APT_CONF > %{i}/etc/apt.conf
55 eulisse 1.7 Dir "%{instroot}"
56     {
57     // Location of the state dir
58     State "%{cmsplatf}/var/lib/apt/"
59     {
60     lists "lists/";
61     xstatus "xstatus";
62     userstatus "status.user";
63     status "var/lib/dpkg/status";
64     cdroms "cdroms.list";
65     };
66    
67     // Location of the cache dir
68     Cache "%{cmsplatf}/var/lib/cache" {
69     archives "%{cmsplatf}";
70     srcpkgcache "srcpkgcache.bin";
71     pkgcache "pkgcache.bin";
72     };
73    
74     // Locations of binaries
75     Bin {
76 eulisse 1.28 methods "%{i}/lib/apt/methods/";
77 eulisse 1.7 gzip "/bin/gzip";
78     dpkg "/usr/bin/dpkg";
79     dpkg-source "/usr/bin/dpkg-source";
80     dpkg-buildpackage "/usr/bin/dpkg-buildpackage";
81 eulisse 1.25 apt-get "%{i}/bin/apt-get-wrapper";
82     apt-cache "%{i}/bin/apt-cache-wrapper";
83     rpm "%{i}/bin/rpm-wrapper";
84 eulisse 1.7 };
85    
86    
87     // Config files
88 eulisse 1.28 Etc "%{cmsplatf}/external/apt/%{v}/etc/" {
89 eulisse 1.7 sourcelist "sources.list";
90     main "apt.conf";
91     preferences "preferences";
92     };
93     };
94    
95     Debug::pkgProblemResolver="1";
96    
97     RPM
98     {
99     PM "external";
100     Options { "--define";"_rpmlock_path %{instroot}/%{cmsplatf}/var/lib/rpm/lock";"--dbpath";"%{instroot}/var/lib/rpm";"--nodeps";};
101     Install-Options { "--define";"_rpmlock_path %{instroot}/%{cmsplatf}/var/lib/rpm/lock";"--nodeps";"--force";"--dbpath";"%{instroot}/%{cmsplatf}/var/lib/rpm";"--prefix";"%{instroot}";};
102     RootDir "%{instroot}";
103     Architecture "%{cmsplatf}";
104     };
105     EOF_APT_CONF
106    
107 eulisse 1.25 cat << \EOF_SOURCES_LIST > %{i}/etc/sources.list
108     rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms.eulisse/apt/%{cmsplatf} cms lcg external
109     rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms.eulisse/apt/%{cmsplatf} cms lcg external
110     # This are defined to support experimental repositories. The bootstrap file rewrites and uncomments
111     # them when passed the appropriate commandline option.
112     ## rpm @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
113     ## rpm-src @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
114     EOF_SOURCES_LIST
115    
116     cat << \EOF_RPMPRIORITIES > %{i}/etc/rpmpriorities
117     Essantial:
118    
119     EOF_RPMPRIORITIES
120    
121     cat << \EOF_BIN_APT_CACHE_WRAPPER > %{i}/bin/apt-cache-wrapper
122     #!/bin/sh
123     touch %{instroot}/log.txt
124     echo $@ >> %{instroot}/log.txt
125     apt-cache $@
126     EOF_BIN_APT_CACHE_WRAPPER
127 eulisse 1.26 chmod +x %{i}/bin/apt-cache-wrapper
128 eulisse 1.25
129     cat << \EOF_BIN_APT_GET_WRAPPER > %{i}/bin/apt-get-wrapper
130     #!/bin/sh
131     touch %{instroot}/log.txt
132     echo $@ >> %{instroot}/log.txt
133     apt-get $@
134     EOF_BIN_APT_GET_WRAPPER
135 eulisse 1.26 chmod +x %{i}/bin/apt-get-wrapper
136 eulisse 1.25
137     cat << \EOF_BIN_RPM > %{i}/bin/rpm-wrapper
138     #!/bin/sh
139     if [ X"$(id -u)" = X0 ]; then
140     echo "*** CMS SOFTWARE INSTALLATION ABORTED ***" 1>&2
141     echo "CMS software cannot be installed as the super-user." 1>&2
142     echo "(We recommend reading any standard unix security guide.)" 1>&2
143     exit 1
144     fi
145     touch %{instroot}/log.txt
146     echo rpm ${1+"$@"} >> %{instroot}/log.txt
147     exec rpm ${1+"$@"}
148     EOF_BIN_RPM
149     chmod +x %{i}/bin/rpm-wrapper
150    
151 eulisse 1.16 cat %_sourcedir/bootstrap | perl -p -e "s!\@CMSPLATF\@!%{cmsplatf}!g;
152 eulisse 1.15 s!\@GCC_VERSION\@!$GCC_VERSION!g;
153     s!\@RPM_VERSION\@!$RPM_VERSION!g;
154     s!\@DB4_VERSION\@!$DB4_VERSION!g;
155     s!\@LIBXML2_VERSION\@!$LIBXML2_VERSION!g;
156     s!\@OPENSSL_VERSION\@!$OPENSSL_VERSION!g;
157     s!\@BEECRYPT_VERSION\@!$BEECRYPT_VERSION!g;
158     s!\@BZ2LIB_VERSION\@!$BZ2LIB_VERSION!g;
159     s!\@ZLIB_VERSION\@!$ZLIB_VERSION!g;
160     s!\@EXPAT_VERSION\@!$EXPAT_VERSION!g;
161     s!\@ELFUTILS_VERSION\@!$ELFUTILS_VERSION!g;
162     s!\@NEON_VERSION\@!$NEON_VERSION!g;
163     s!\@GCC_REVISION\@!$GCC_REVISION!g;
164     s!\@BEECRYPT_REVISION\@!$BEECRYPT_REVISION!g;
165     s!\@RPM_REVISION\@!$RPM_REVISION!g;
166     s!\@OPENSSL_REVISION\@!$OPENSSL_REVISION!g;
167     s!\@DB4_REVISION\@!$DB4_REVISION!g;
168     s!\@LIBXML2_REVISION\@!$LIBXML2_REVISION!g;
169     s!\@BZ2LIB_REVISION\@!$BZ2LIB_REVISION!g;
170     s!\@ZLIB_REVISION\@!$ZLIB_REVISION!g;
171     s!\@EXPAT_REVISION\@!$EXPAT_REVISION!g;
172     s!\@NEON_REVISION\@!$NEON_REVISION!g;
173     s!\@ELFUTILS_REVISION\@!$ELFUTILS_REVISION!g;
174     s!\@APT_VERSION\@!%{v}!g;
175     s!\@APT_REVISION\@!%{pkgrevision}!g;
176     s!\@INSTROOT\@!%{instroot}!g;
177 eulisse 1.26 " > %{i}/bin/bootstrap-%{cmsplatf}.sh
178 eulisse 1.8
179 eulisse 1.6 %post
180 eulisse 1.8 mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/apt/lists/partial
181     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/rpm
182     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/cache/%{cmsplatf}/partial
183 eulisse 1.24 mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
184 eulisse 1.8 mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/rpm
185     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/lib/apt/methods
186     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/dpkg/status
187     mkdir -p $RPM_INSTALL_PREFIX/bin
188     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/cache/%{cmsplatf}
189 eulisse 1.6 %{relocateConfig}etc/profile.d/dependencies-setup.sh
190     %{relocateConfig}etc/profile.d/dependencies-setup.csh
191 eulisse 1.25 %{relocateConfig}bin/apt-cache-wrapper
192     %{relocateConfig}bin/apt-get-wrapper
193     %{relocateConfig}bin/rpm-wrapper
194 eulisse 1.29 %{relocateConfig}etc/apt.conf
195 eulisse 1.30
196 eulisse 1.38