ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/apt.spec
Revision: 1.116
Committed: Tue Oct 4 14:21:24 2011 UTC (13 years, 6 months ago) by eulisse
Branch: MAIN
CVS Tags: bld_1366393047_das_slc5_amd64_gcc461, bld_1366387004_das_slc5_amd64_gcc461, bld_1366383107_das_slc5_amd64_gcc461, bld_1366320846_das_slc5_amd64_gcc461, bld_1366318481_das_slc5_amd64_gcc461, bld_1366310647_das_slc5_amd64_gcc461, bld_1366297091_das_slc5_amd64_gcc461, bld_1366294257_wmagent-dev_slc5_amd64_gcc461, bld_1366231053_das_slc5_amd64_gcc461, bld_1366227545_das_slc5_amd64_gcc461, bld_1366220453_wmagent-dev_slc5_amd64_gcc461, bld_1366217887_das_slc5_amd64_gcc461, bld_1366212554_das_slc5_amd64_gcc461, bld_1366142291_das_slc5_amd64_gcc461, bld_1366137469_das_slc5_amd64_gcc461, bld_1366136287_das_slc5_amd64_gcc461, bld_1366133845_das_slc5_amd64_gcc461, bld_1366130037_das_slc5_amd64_gcc461, bld_1365873495_das_slc5_amd64_gcc461, bld_1365864253_das_slc5_amd64_gcc461, bld_1365813474_das_slc5_amd64_gcc461, bld_1365801108_wmagent-dev_slc5_amd64_gcc461, bld_1365798254_das_slc5_amd64_gcc461, bld_1365756543_cmsweb_slc5_amd64_gcc461, bld_1365755645_cmsweb_slc5_amd64_gcc461, bld_1365754910_das_slc5_amd64_gcc461, HG1304e, bld_1365639925_das_slc5_amd64_gcc461, bld_1365189699_wmagent-dev_slc5_amd64_gcc461, bld_1365145423_cmsweb_slc5_amd64_gcc461, bld_1365144485_cmsweb_slc5_amd64_gcc461, HG1304d, bld_1365103387_wmagent-dev_osx106_amd64_gcc461, bld_1365103080_wmagent-dev_slc5_amd64_gcc461, bld_1365093891_cmsweb_slc5_amd64_gcc461, bld_1365092930_cmsweb_slc5_amd64_gcc461, HG1304c, bld_1365018384_wmagent-dev_slc5_amd64_gcc461, bld_1365016270_reqmon_slc5_amd64_gcc461, bld_1364985624_wmagent-dev_slc5_amd64_gcc461, bld_1364978618_wmagent-dev_slc5_amd64_gcc461, bld_1364915341_reqmgr_slc5_amd64_gcc461, bld_1364898638_wmagent-dev_slc5_amd64_gcc461, bld_1364871746_workqueue_slc5_amd64_gcc461, bld_1364871746_reqmon_slc5_amd64_gcc461, bld_1364855420_wmagent-dev_slc5_amd64_gcc461, bld_1364477498_cmsweb_slc6_amd64_gcc461, bld_1364477047_CmsTC_slc5_amd64_gcc434, bld_1364476037_cmsweb_slc5_amd64_gcc461, HG1304b, bld_1363878515_cmsfomon_slc5_amd64_gcc461, bld_1363813148_das_slc5_amd64_gcc461, bld_1363704737_wmagent-dev_slc5_amd64_gcc461, bld_1363641809_das_slc5_amd64_gcc461, bld_1363625610_cmsweb_slc6_amd64_gcc461, bld_1363624908_wmagent-dev_osx106_amd64_gcc461, bld_1363624533_cmsweb_slc5_amd64_gcc461, HG1304a, bld_1363597235_CmsTC_slc5_amd64_gcc434, bld_1363270485_cmsweb_slc5_amd64_gcc461, bld_1363269753_cmsweb_slc6_amd64_gcc461, bld_1363269703_cmsweb_slc5_amd64_gcc461, HG1303g, bld_1363186195_das_slc5_amd64_gcc461, HG1304a-rc2, HG1304a-rc, bld_1363027772_wmagent-dev_slc5_amd64_gcc461, bld_1362998090_cmsweb_slc5_amd64_gcc461, bld_1362996978_cmsweb_slc5_amd64_gcc461, bld_1362996936_cmsweb_slc6_amd64_gcc461, HG1303f, bld_1362587917_t0_slc5_amd64_gcc461, bld_1362587831_cmsweb_slc5_amd64_gcc461, bld_1362587049_cmsweb_slc6_amd64_gcc461, bld_1362586958_cmsweb_slc5_amd64_gcc461, HG1303e, bld_1362581633_cmsfomon_slc5_amd64_gcc461, bld_1362435765_wmagent-dev_slc5_amd64_gcc461, bld_1362396410_cmsfomon_slc5_amd64_gcc461, bld_1362396027_cmsweb_slc5_amd64_gcc461, bld_1362395773_cmsweb_slc6_amd64_gcc461, bld_1362395102_cmsweb_slc5_amd64_gcc461, bld_1362394999_cmsweb_slc6_amd64_gcc461, HG1303d, bld_1362152615_cmsweb_slc6_amd64_gcc461, bld_1362145756_cmsweb_slc5_amd64_gcc461, bld_1362144996_cmsweb_slc6_amd64_gcc461, bld_1362144848_cmsweb_slc5_amd64_gcc461, HG1303c, bld_1362086646_wmagent-dev_slc5_amd64_gcc461, bld_1362086247_reqmgr_slc5_amd64_gcc461, bld_1362086050_reqmon_slc5_amd64_gcc461, bld_1362084017_reqmgr_slc5_amd64_gcc461, bld_1362083830_reqmon_slc5_amd64_gcc461, bld_1362083383_wmagent-dev_slc5_amd64_gcc461, bld_1362024059_reqmon_slc5_amd64_gcc461, bld_1362024059_reqmgr_slc5_amd64_gcc461, bld_1362004165_wmagent-dev_slc5_amd64_gcc461, TW20130226a, bld_1361806174_wmagent-dev_slc5_amd64_gcc461, bld_1361804419_das_slc5_amd64_gcc461, bld_1361717845_cmsweb_slc6_amd64_gcc461, bld_1361549332_cmsweb_slc5_amd64_gcc461, bld_1361547565_cmsweb_slc6_amd64_gcc461, bld_1361547434_cmsweb_slc5_amd64_gcc461, HG1303b, bld_1361397493_wmagent-dev_slc5_amd64_gcc461, bld_1361396969_reqmon_slc5_amd64_gcc461, bld_1361371766_wmagent-dev_slc5_amd64_gcc461, bld_1361358843_CmsTC_slc5_amd64_gcc434, bld_1361357725_dbs3-combined_slc5_amd64_gcc461, bld_1361302144_wmagent-dev_slc5_amd64_gcc461, bld_1361299482_das_slc5_amd64_gcc461, TW20130219c, bld_1361287535_das_slc5_amd64_gcc461, TW20130219a, bld_1361214804_filemover_slc5_amd64_gcc461, bld_1361213027_filemover_slc5_amd64_gcc461, bld_1361206184_das_slc5_amd64_gcc461, bld_1361127238_das_slc5_amd64_gcc461, bld_1361126134_cmsweb_slc6_amd64_gcc461, bld_1361059173_das_slc5_amd64_gcc461, bld_1360935597_CmsTC_slc5_amd64_gcc434, bld_1360871999_das_slc5_amd64_gcc461, TW20130214a, TW20120214a, TW20130213a, bld_1360761050_cmsweb_slc6_amd64_gcc461, bld_1360754590_cmsweb_slc5_amd64_gcc461, HG1303a, bld_1360703803_das_slc5_amd64_gcc461, bld_1360687341_das_slc5_amd64_gcc461, bld_1360615563_reqmon_slc5_amd64_gcc461, bld_1360609706_das_slc5_amd64_gcc461, bld_1360363549_das_slc5_amd64_gcc461, bld_1360363450_couchskel_slc5_amd64_gcc461, bld_1360360484_das_slc5_amd64_gcc461, bld_1360063178_wmagent-dev_slc5_amd64_gcc461, bld_1359544500_cmsweb_slc5_amd64_gcc461, bld_1359543827_cmsweb_slc5_amd64_gcc461, HG1302c, bld_1359499778_reqmgr_slc5_amd64_gcc461, bld_1359499619_t0_reqmon_slc5_amd64_gcc461, bld_1359499209_wmagent-dev_slc5_amd64_gcc461, bld_1359365022_wmagent-dev_osx106_amd64_gcc461, bld_1359155636_workqueue_slc5_amd64_gcc461, bld_1359155118_workqueue_slc5_amd64_gcc461, bld_1359153985_reqmgr_slc5_amd64_gcc461, bld_1359151331_reqmon_slc5_amd64_gcc461, bld_1359151331_workqueue_slc5_amd64_gcc461, bld_1359151315_t0_reqmon_slc5_amd64_gcc461, bld_1359150370_wmagent-dev_slc5_amd64_gcc461, bld_1359148765_wmagent-dev_slc5_amd64_gcc461, bld_1359023285_cmsweb_slc5_amd64_gcc461, bld_1359021253_cmsweb_slc5_amd64_gcc461, HG1302b, bld_1358971407_t0_reqmon_slc5_amd64_gcc461, bld_1358958881_das_slc5_amd64_gcc461, bld_1358954381_wmagent-dev_slc5_amd64_gcc461, bld_1358942699_CmsTC_slc5_amd64_gcc434, bld_1358853292_CmsTC_slc5_amd64_gcc434, bld_1358742470_t0wmstats_slc5_amd64_gcc461, bld_1355848536_PHEDEX-combined-agents_slc5_amd64_gcc461, bld_1355846563_PHEDEX-combined-agents_slc5_amd64_gcc461, HG1302a, HG1212d, HG1212c, HG1212b, TW20121226a, HG1212a, bld_1352811218_cmsfomon_slc5_amd64_gcc461, HG1211g, bld_1351773793_cmsweb_osx106_amd64_gcc461, bld_1351772993_cmsweb_osx106_amd64_gcc461, HG1211f, HG1211e, TW20121025a, TW20121024a, HG1211d, HG1211c, bld_1350485088_PHEDEX-lifecycle_slc5_amd64_gcc461, TW20121015a, bld_1350043664_T0DataSvc_slc5_amd64_gcc461, HG1211b, HG1211a, HG1210f, HG1210e, HG1210d, HG1211diego, HG1210c, HG1210b, TW20120914a, TW20120913b, TW20120913a, TW20120829b, TW20120829a, HG1210a, T020120827, HG1208e, HG1208d, HG1208c, HG1207d, TW20120727a, TW20120726a, TW20120725a, HG1208a, TW20120724c, TW20120724b, TW20120724a, TW20120720a, TW20120719a, TW20120718a, HG1207c, TW20120704c, TW20120704b, TW20120704a, TW20120702c, TW20120702b, TW20120702a, TW20120621c, TW20120621a, TW20120620a, HG1207b, HG1207a, HG1206d, TW20120607a, TW20120606a, HG1206c, HG1206b, bld_1337784158_cmsweb-analytics_slc5_amd64_gcc461, bld_1337783687_cmsweb-analytics_slc5_amd64_gcc461, HG1206a, HG1205g, HG1205f, HG1205e, HG1205d, bld_1335521675_crabhb_slc5_amd64_gcc461, HG1205c, TW20120428p, TW20120421b, TW20120421a, bld_1334854417_PHEDEX-combined-agents_slc5_amd64_gcc461, HG1205b, bld_1334681121_PHEDEX-combined-agents_slc5_amd64_gcc461, TW20120417a, TW20120416a, HG1205a, TW20120410b, TW20120410a, HG1204h, HG1204g, TW20120327b, TW20120327a, TW20120326a, HG1204f, TW20120322a, HG1203i, HG1204e, TW20120321c, TW20120321b, TW20120321a, HG1204d, TW20120320b, TW20120320a, dieHG1204d, TW20120319k, TW20120319j, TW20120319i, TW20120319h, TW20120319g, TW20120319f, TW20120319e, TW20120319d, TW20120319c, TW20120319b, TW20120319a, HG1204c, TW20120313a, HG1204b, TW20120309h, TW20120309g, TW20120309f, TW20120309e, TW20120309d, TW20120309c, TW20120309b, TW20120309a, HG1204a, TW20120308b, TW20120308a, TW20120307a, HG1203h, TW20120305b, TW20120305a, HG1203g, HG1203f, HG1203e, HG1203d, HG1203c, HG1203b, TW20120217a, TW20120216b, TW20120216a, HG1201d, HG1203a, TW20120210a, TW20120209a, TW20120207b, TW20120207a, HG1201c, bld_1328198772_crab_slc5_amd64_gcc461, TW20120130b, TW20120130a, TW20120127b, TW20120127a, TW20120125a, bld_1327424666_crab-client3_slc5_amd64_gcc461, HG1201b, bld_1327416353_crab-server3_slc5_amd64_gcc461, bld_1327397075_cmsbuilder_slc5_amd64_gcc461, TW20120123a, TW20120120a, TW20120119b, TW20120119a, bld_1326980038_cmsbuild_slc5_amd64_gcc461, TW20120118a, bld_1326280382_cmsBuilder_slc5_amd64_gcc461, bld_1326274893_cmsBuilder_slc5_amd64_gcc461, bld_1326273864_asyncstageout_slc5_amd64_gcc461, bld_1324281658_cmsweb_osx106_amd64_gcc461, HG1201a, HG1112d, bld_1323333807_CmsTC_slc5_amd64_gcc461, HG1112c, TW20111129e, TW20111129d, TW20111129c, TW20111129a, TW20111128c, TW20111128b, TW20111128a, HG1112b, TW20111122a, TW20111120a, TW20111118c, TW20111118b, TW20111118a, HG1111e, bld_1321455789_happyface_slc5_amd64_gcc461, bld_1321454935_happyface_slc5_amd64_gcc461, TW20111115d, TW20111115c, TW20111115b, TW20111115a, HG1112a, TW20111103a, TW20111101e, TW20111101d, TW20111101c, TW20111101b, TW20111101a, TW20111028a, bld_1319551575_PHEDEX-combined-agents_slc5_amd64_gcc461, HG1111d, TW20111017d, TW20111017c, TW20111017b, TW20111017a, TW20111016a, TW20111015a, TW20111014a, bld_1318523430_cmsweb_slc5_amd64_gcc434, HG1111c-gcc434, HG1111c, HG1111c-bootstrap-gcc461, HG1111c-bootstrap-gcc434, LT20111012a-434, LT20111012a-461, LT20111012a, HG1111b, HG1111b-bootstrap-gcc461
Changes since 1.115: +2 -0 lines
Log Message:
Fix apt to build with with gcc 4.7.x snapshots.

* Missing unistd.h inclusion when using off_t.

File Contents

# 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     slc*_ia32_*)
29 fwyzard 1.110 export USER_CPPFLAGS="-D_FILE_OFFSET_BITS=64"
30     export USER_CFLAGS="-pthread"
31     export USER_CXXFLAGS="-pthread"
32     export USER_LDFLAGS="-pthread"
33     export USER_LIBS="-pthread"
34     ;;
35     slc*_amd64_*)
36     export USER_CFLAGS="-pthread"
37     export USER_CXXFLAGS="-pthread"
38     export USER_LDFLAGS="-pthread"
39     export USER_LIBS="-pthread"
40 eulisse 1.86 ;;
41     *)
42     ;;
43     esac
44 ratnik 1.1
45 fwyzard 1.110 chmod +x buildlib/install-sh
46 eulisse 1.115 # Avoid picking up sqlite3 from the system.
47     perl -p -i -e 's|sqlite3|sqlite3disabled|' configure
48 eulisse 1.2 ./configure --prefix=%{i} --exec-prefix=%{i} \
49 eulisse 1.113 --disable-static \
50 fwyzard 1.110 --disable-nls \
51     --disable-dependency-tracking \
52     --without-libintl-prefix \
53     --disable-docs \
54     --disable-selinux \
55     --disable-rpath \
56     CXXFLAGS="-fPIC $USER_CXXFLAGS" \
57     CFLAGS="-fPIC $USER_CFLAGS" \
58     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" \
59     LDFLAGS="-L$BZ2LIB_ROOT/lib -L$DB4_ROOT/lib -L$LUA_ROOT/lib -L$RPM_ROOT/lib $USER_LDFLAGS" \
60     LIBS="-llua $USER_LIBS" \
61     LIBXML2_CFLAGS="-I$LIBXML2_ROOT/include/libxml2 -I$DB4_ROOT/include -I$LUA_ROOT/include -I$RPM_ROOT/include" \
62     LIBXML2_LIBS="-lxml2 -L$DB4_ROOT/lib -L$LIBXML2_ROOT/lib -L$LUA_ROOT/lib -L$RPM_ROOT/lib" \
63     RPM_LIBS="-L$RPM_ROOT/lib -lrpm -lrpmio -lrpmbuild"
64    
65     chmod +x buildlib/install-sh
66 eulisse 1.6 make %makeprocesses
67 eulisse 1.7
68    
69 eulisse 1.6 %install
70     make install
71 eulisse 1.113 case %cmsos in
72 eulisse 1.114 osx*) SONAME=dylib ;;
73     *) SONAME=so ;;
74 eulisse 1.113 esac
75 eulisse 1.114 # Drop documentation and developer files, since we do not need it.
76     %define drop_files %i/{share,include}
77     # Strip executables and libraries.
78     %define strip_files %i/lib %i/bin/{apt-config,genpkglist,apt-get,countpkglist,gensrclist,apt-cache,apt-shell} %i/lib/apt/methods/*
79 lat 1.112 # Remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config
80     # which we neither need nor use at this time.
81 fwyzard 1.110 rm -rf %i/lib/pkgconfig
82    
83 eulisse 1.6 mkdir -p %{i}/etc/profile.d
84 eulisse 1.72
85 eulisse 1.6 (echo "#!/bin/sh"; \
86     echo "source $RPM_ROOT/etc/profile.d/init.sh"; \
87     echo "source $LIBXML2_ROOT/etc/profile.d/init.sh" ) > %{i}/etc/profile.d/dependencies-setup.sh
88     (echo "#!/bin/tcsh"; \
89     echo "source $RPM_ROOT/etc/profile.d/init.csh"; \
90     echo "source $LIBXML2_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh
91 eulisse 1.7
92 eulisse 1.72 cp %_sourcedir/bootstrap %{i}/bin/bootstrap.sh
93 eulisse 1.89 pwd
94     perl -p -i -e 'my $s = `cat ../RPM-Header-PurePerl-1.0.2/lib/RPM/Header/PurePerl.pm`;\
95     s|\@RPM_HEADER_PUREPERL_PM\@|$s|' %{i}/bin/bootstrap.sh
96     perl -p -i -e 'my $s = `cat ../RPM-Header-PurePerl-1.0.2/lib/RPM/Header/PurePerl/Tagtable.pm`;\
97     s|\@RPM_HEADER_PUREPERL_TAGSTABLE_PM\@|$s|' %{i}/bin/bootstrap.sh
98 eulisse 1.47
99 eulisse 1.25 mkdir -p %{i}/etc/apt
100 eulisse 1.24 cat << \EOF_APT_CONF > %{i}/etc/apt.conf
101 eulisse 1.7 Dir "%{instroot}"
102     {
103     // Location of the state dir
104     State "%{cmsplatf}/var/lib/apt/"
105     {
106     lists "lists/";
107     xstatus "xstatus";
108     userstatus "status.user";
109     status "var/lib/dpkg/status";
110     cdroms "cdroms.list";
111     };
112    
113     // Location of the cache dir
114     Cache "%{cmsplatf}/var/lib/cache" {
115     archives "%{cmsplatf}";
116     srcpkgcache "srcpkgcache.bin";
117     pkgcache "pkgcache.bin";
118     };
119    
120     // Locations of binaries
121     Bin {
122 eulisse 1.28 methods "%{i}/lib/apt/methods/";
123 eulisse 1.7 gzip "/bin/gzip";
124     dpkg "/usr/bin/dpkg";
125     dpkg-source "/usr/bin/dpkg-source";
126     dpkg-buildpackage "/usr/bin/dpkg-buildpackage";
127 eulisse 1.25 apt-get "%{i}/bin/apt-get-wrapper";
128     apt-cache "%{i}/bin/apt-cache-wrapper";
129     rpm "%{i}/bin/rpm-wrapper";
130 eulisse 1.7 };
131    
132    
133     // Config files
134 eulisse 1.28 Etc "%{cmsplatf}/external/apt/%{v}/etc/" {
135 eulisse 1.7 sourcelist "sources.list";
136     main "apt.conf";
137     preferences "preferences";
138     };
139     };
140    
141     Debug::pkgProblemResolver="1";
142    
143     RPM
144     {
145     PM "external";
146 eulisse 1.43 Options { };
147     Install-Options { "--force";"--prefix";"%{instroot}";"--ignoreos";"--ignorearch";};
148 eulisse 1.7 RootDir "%{instroot}";
149     Architecture "%{cmsplatf}";
150     };
151 dlange 1.84
152     APT::Cache-Limit 33554432;
153 fwyzard 1.109 APT::http::Max-Age 0;
154 dlange 1.84
155 eulisse 1.7 EOF_APT_CONF
156    
157 eulisse 1.44
158 eulisse 1.25 cat << \EOF_SOURCES_LIST > %{i}/etc/sources.list
159 eulisse 1.41 rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external
160 eulisse 1.77 # rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external
161 eulisse 1.25 # This are defined to support experimental repositories. The bootstrap file rewrites and uncomments
162     # them when passed the appropriate commandline option.
163 eulisse 1.75 #;rpm http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
164 eulisse 1.77 # rpm-src http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
165 eulisse 1.25 EOF_SOURCES_LIST
166    
167     cat << \EOF_RPMPRIORITIES > %{i}/etc/rpmpriorities
168     Essantial:
169    
170     EOF_RPMPRIORITIES
171    
172     cat << \EOF_BIN_APT_CACHE_WRAPPER > %{i}/bin/apt-cache-wrapper
173     #!/bin/sh
174 eulisse 1.72 mkdir -p %{instroot}/var/log/rpm
175     touch %{instroot}/var/log/rpm/log.txt
176     echo $@ >> %{instroot}/var/log/rpm/log.txt
177 eulisse 1.25 apt-cache $@
178     EOF_BIN_APT_CACHE_WRAPPER
179 eulisse 1.26 chmod +x %{i}/bin/apt-cache-wrapper
180 eulisse 1.25
181     cat << \EOF_BIN_APT_GET_WRAPPER > %{i}/bin/apt-get-wrapper
182     #!/bin/sh
183 eulisse 1.72 mkdir -p %{instroot}/var/log/rpm
184     touch %{instroot}/var/log/rpm/log.txt
185     echo $@ >> %{instroot}/var/log/rpm/log.txt
186 eulisse 1.25 apt-get $@
187     EOF_BIN_APT_GET_WRAPPER
188 eulisse 1.26 chmod +x %{i}/bin/apt-get-wrapper
189 eulisse 1.25
190     cat << \EOF_BIN_RPM > %{i}/bin/rpm-wrapper
191     #!/bin/sh
192     if [ X"$(id -u)" = X0 ]; then
193     echo "*** CMS SOFTWARE INSTALLATION ABORTED ***" 1>&2
194     echo "CMS software cannot be installed as the super-user." 1>&2
195     echo "(We recommend reading any standard unix security guide.)" 1>&2
196     exit 1
197     fi
198 eulisse 1.72 mkdir -p %{instroot}/var/log/rpm
199     touch %{instroot}/var/log/rpm/log.txt
200     echo rpm ${1+"$@"} >> %{instroot}/var/log/rpm/log.txt
201 eulisse 1.25 exec rpm ${1+"$@"}
202     EOF_BIN_RPM
203     chmod +x %{i}/bin/rpm-wrapper
204    
205 eulisse 1.6 %post
206 eulisse 1.8 mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/apt/lists/partial
207     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/rpm
208     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/cache/%{cmsplatf}/partial
209 eulisse 1.24 mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
210 eulisse 1.8 mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/rpm
211     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/lib/apt/methods
212     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/dpkg/status
213     mkdir -p $RPM_INSTALL_PREFIX/bin
214     mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/cache/%{cmsplatf}
215 eulisse 1.6 %{relocateConfig}etc/profile.d/dependencies-setup.sh
216     %{relocateConfig}etc/profile.d/dependencies-setup.csh
217 eulisse 1.25 %{relocateConfig}bin/apt-cache-wrapper
218     %{relocateConfig}bin/apt-get-wrapper
219     %{relocateConfig}bin/rpm-wrapper
220 eulisse 1.29 %{relocateConfig}etc/apt.conf