ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/apt.spec
(Generate patch)

Comparing COMP/CMSDIST/apt.spec (file contents):
Revision 1.7 by eulisse, Mon Jun 18 17:00:21 2007 UTC vs.
Revision 1.44 by eulisse, Thu Jul 5 15:32:55 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines