1 |
pacho 14/07/05 15:03:29 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: tsm-7.1.0.0-r1.ebuild |
5 |
Removed: tsm-7.1.0.0.ebuild |
6 |
Log: |
7 |
Bug 508052: directories used to be too restrictive, have to widen perms (thanks to Martin von Gagern) |
8 |
|
9 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4) |
10 |
|
11 |
Revision Changes Path |
12 |
1.22 app-backup/tsm/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/tsm/ChangeLog?rev=1.22&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/tsm/ChangeLog?rev=1.22&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/tsm/ChangeLog?r1=1.21&r2=1.22 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-backup/tsm/ChangeLog,v |
21 |
retrieving revision 1.21 |
22 |
retrieving revision 1.22 |
23 |
diff -u -r1.21 -r1.22 |
24 |
--- ChangeLog 17 Feb 2014 21:15:20 -0000 1.21 |
25 |
+++ ChangeLog 5 Jul 2014 15:03:29 -0000 1.22 |
26 |
@@ -1,6 +1,13 @@ |
27 |
# ChangeLog for app-backup/tsm |
28 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-backup/tsm/ChangeLog,v 1.21 2014/02/17 21:15:20 pacho Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-backup/tsm/ChangeLog,v 1.22 2014/07/05 15:03:29 pacho Exp $ |
31 |
+ |
32 |
+*tsm-7.1.0.0-r1 (05 Jul 2014) |
33 |
+ |
34 |
+ 05 Jul 2014; Pacho Ramos <pacho@g.o> +tsm-7.1.0.0-r1.ebuild, |
35 |
+ -tsm-7.1.0.0.ebuild: |
36 |
+ Bug 508052: directories used to be too restrictive, have to widen perms |
37 |
+ (thanks to Martin von Gagern) |
38 |
|
39 |
*tsm-7.1.0.0 (17 Feb 2014) |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
1.1 app-backup/tsm/tsm-7.1.0.0-r1.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/tsm/tsm-7.1.0.0-r1.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/tsm/tsm-7.1.0.0-r1.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: tsm-7.1.0.0-r1.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2014 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/app-backup/tsm/tsm-7.1.0.0-r1.ebuild,v 1.1 2014/07/05 15:03:29 pacho Exp $ |
54 |
|
55 |
EAPI=5 |
56 |
|
57 |
inherit versionator multilib eutils readme.gentoo rpm systemd user |
58 |
|
59 |
DESCRIPTION="Tivoli Storage Manager (TSM) Backup/Archive (B/A) Client and API" |
60 |
HOMEPAGE="http://www.tivoli.com/" |
61 |
|
62 |
MY_PV_MAJOR=$(get_major_version) |
63 |
MY_PV_MINOR=$(get_version_component_range 2) |
64 |
MY_PV_TINY=$(get_version_component_range 3) |
65 |
MY_PV_PATCH=$(get_version_component_range 4) |
66 |
|
67 |
MY_PV_NODOTS="${MY_PV_MAJOR}${MY_PV_MINOR}${MY_PV_TINY}" |
68 |
MY_PVR_ALLDOTS=${PV} |
69 |
|
70 |
if [[ ${MY_PV_PATCH} == 0 ]]; then |
71 |
MY_RELEASE_PATH=maintenance |
72 |
else |
73 |
MY_RELEASE_PATH=patches |
74 |
fi |
75 |
BASE_URI="ftp://ftp.software.ibm.com/storage/tivoli-storage-management/" |
76 |
BASE_URI+="${MY_RELEASE_PATH}/client/v${MY_PV_MAJOR}r${MY_PV_MINOR}/" |
77 |
BASE_URI+="Linux/LinuxX86/BA/v${MY_PV_NODOTS}/" |
78 |
SRC_TAR="${MY_PVR_ALLDOTS}-TIV-TSMBAC-LinuxX86.tar" |
79 |
SRC_URI="${BASE_URI}${SRC_TAR}" |
80 |
|
81 |
RESTRICT="strip" # Breaks libPiIMG.so and libPiSNAP.so |
82 |
LICENSE="Apache-1.1 Apache-2.0 JDOM BSD-2 CC-PD Boost-1.0 MIT CPL-1.0 HPND Exolab |
83 |
dom4j EPL-1.0 FTL icu unicode IBM Info-ZIP LGPL-2 LGPL-2.1 openafs-krb5-a |
84 |
ZLIB MPL-1.0 MPL-1.1 NPL-1.1 openssl OPENLDAP RSA public-domain W3C |
85 |
|| ( BSD GPL-2+ ) gSOAP libpng tsm" |
86 |
|
87 |
SLOT="0" |
88 |
KEYWORDS="~amd64" |
89 |
IUSE="acl java +tsm_cit +tsm_hw" |
90 |
QA_PREBUILT="*" |
91 |
|
92 |
MY_LANGS="cs:CS_CZ de:DE_DE es:ES_ES fr:FR_FR hu:HU_HU it:IT_IT |
93 |
ja:JA_JP ko:KO_KR pl:PL_PL pt:PT_BR ru:RU_RU zh:ZH_CN zh_TW:ZH_TW" |
94 |
MY_LANG_PV="${MY_PVR_ALLDOTS}-" |
95 |
for lang in ${MY_LANGS}; do |
96 |
IUSE="${IUSE} linguas_${lang%:*}" |
97 |
SRC_URI="${SRC_URI} linguas_${lang%:*}? ( \ |
98 |
${BASE_URI}TIVsm-msg.${lang#*:}.x86_64.rpm -> \ |
99 |
${MY_LANG_PV}TIVsm-msg.${lang#*:}.x86_64.rpm )" |
100 |
done |
101 |
unset lang |
102 |
|
103 |
DEPEND="" |
104 |
RDEPEND=" |
105 |
dev-libs/expat |
106 |
dev-libs/libxml2 |
107 |
=sys-fs/fuse-2* |
108 |
acl? ( sys-apps/acl ) |
109 |
java? ( virtual/jre:1.6 ) |
110 |
" |
111 |
|
112 |
S="${WORKDIR}" |
113 |
|
114 |
pkg_setup() { |
115 |
enewgroup tsm |
116 |
DOC_CONTENTS=" |
117 |
Note that you have to be either root or member of the group tsm to |
118 |
be able to use the Tivoli Storage Manager client." |
119 |
} |
120 |
|
121 |
src_unpack() { |
122 |
local rpm rpms lang |
123 |
unpack ${SRC_TAR} |
124 |
|
125 |
for rpm in *.rpm; do |
126 |
case ${rpm} in |
127 |
TIVsm-APIcit.*|TIVsm-BAcit.*) |
128 |
use tsm_cit && rpms="${rpms} ./${rpm}" |
129 |
;; |
130 |
TIVsm-BAhdw.*) |
131 |
use tsm_hw && rpms="${rpms} ./${rpm}" |
132 |
;; |
133 |
TIVsm-JBB.*|*-filepath-*) |
134 |
# "journal based backup" for all filesystems |
135 |
# requires a kernel module. |
136 |
# "Linux Filepath source code" available |
137 |
# by request from vendor |
138 |
;; |
139 |
*) |
140 |
rpms="${rpms} ./${rpm}" |
141 |
;; |
142 |
esac |
143 |
done |
144 |
for rpm in ${A}; do |
145 |
case ${rpm} in |
146 |
*.rpm) |
147 |
rpms="${rpms} ${rpm}" |
148 |
;; |
149 |
esac |
150 |
done |
151 |
|
152 |
rpm_unpack ${rpms} |
153 |
|
154 |
# Avoid strange error messages caused by read-only files |
155 |
chmod -R u+w "${S}" || die |
156 |
} |
157 |
|
158 |
src_prepare() { |
159 |
# Avoid unnecessary dependency on ksh |
160 |
sed -i 's:^#!/usr/bin/ksh:#!/bin/bash:' \ |
161 |
opt/tivoli/tsm/client/ba/bin/dsmj || die |
162 |
} |
163 |
|
164 |
src_install() { |
165 |
cp -a opt "${D}" || die |
166 |
cp -a usr "${D}" || die |
167 |
|
168 |
# The RPM files contain postinstall scripts which can be extracted |
169 |
# e.g. using https://bugs.gentoo.org/attachment.cgi?id=234663 . |
170 |
# Below we try to mimic the behaviour of these scripts. |
171 |
# We don't deal with SELinux compliance (yet), though. |
172 |
local RPM_INSTALL_PREFIX CLIENTDIR i |
173 |
RPM_INSTALL_PREFIX=/opt |
174 |
CLIENTDIR=$RPM_INSTALL_PREFIX/tivoli/tsm/client |
175 |
|
176 |
# We don't bother setting timestamps to build dates. |
177 |
# But we should delete the corresponding files. |
178 |
rm -f "${D}"$CLIENTDIR/api/bin*/.buildDate || die |
179 |
rm -f "${D}"$CLIENTDIR/ba/bin*/.buildDate || die |
180 |
rm -f "${D}"$CLIENTDIR/lang/.buildDate || die |
181 |
|
182 |
# Create links for messages; this is spread over several postin scripts. |
183 |
for i in $(cd "${D}"${CLIENTDIR}/lang; ls -1d ??_??); do |
184 |
dosym ../../lang/${i} $CLIENTDIR/ba/bin/${i} |
185 |
dosym ../../lang/${i} $CLIENTDIR/api/bin64/${i} |
186 |
done |
187 |
|
188 |
# Mimic TIVsm-API64 postinstall script |
189 |
for i in libgpfs.so libdmapi.so; do |
190 |
dosym ../..$CLIENTDIR/api/bin64/${i} /usr/lib64/${i} |
191 |
done |
192 |
|
193 |
# The TIVsm-BA postinstall script only does messages and ancient upgrades |
194 |
|
195 |
# The gscrypt64 postinstall script only deals with s390[x] SELinux |
196 |
# and the symlink for the iccs library which we handle in the loop below. |
197 |
|
198 |
# Move stuff from /usr/local to /opt, #452332 |
199 |
mv "${D}"/usr/local/ibm "${D}"/opt/ || die |
200 |
rmdir "${D}"/usr/local || die |
201 |
|
202 |
# Mimic gskssl64 postinstall script |
203 |
for i in sys p11 km ssl drld kicc ldap cms acmeidup valn dbfl iccs; do |
204 |
dosym ../../opt/ibm/gsk8_64/lib64/libgsk8${i}_64.so \ |
205 |
/usr/lib64/libgsk8${i}_64.so |
206 |
done |
207 |
for i in capicmd ver; do |
208 |
dosym ../../opt/ibm/gsk8_64/bin/gsk8${i}_64 /usr/bin/gsk${i}_64 |
209 |
done |
210 |
|
211 |
# Done with the postinstall scripts as the RPMs contain them. |
212 |
# Now on to some more Gentoo-specific installation. |
213 |
|
214 |
[[ -d "${D}usr/lib" ]] && die "Using 32bit lib dir in 64bit only system" |
215 |
|
216 |
# Avoid "QA Notice: Found an absolute symlink in a library directory" |
217 |
local target |
218 |
find "${D}"usr/lib* -lname '/*' | while read i; do |
219 |
target=$(readlink "${i}") |
220 |
rm -v "${i}" || die |
221 |
dosym "../..${target}" "${i#${D}}" |
222 |
done |
223 |
|
224 |
# Install symlinks for sonames of libraries, bug #416503 |
225 |
dosym libvixMntapi.so.1.1.0 $CLIENTDIR/ba/bin/libvixMntapi.so.1 |
226 |
dosym libvixDiskLibVim.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLibVim.so.5 |
227 |
dosym libvixDiskLib.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLib.so.5 |
228 |
|
229 |
fowners :tsm /opt/tivoli/tsm/client/ba/bin/dsmtca |
230 |
fperms 4710 /opt/tivoli/tsm/client/ba/bin/dsmtca |
231 |
|
232 |
keepdir /var/log/tsm |
233 |
insinto /etc/logrotate.d |
234 |
newins "${FILESDIR}/tsm.logrotate" tsm |
235 |
|
236 |
keepdir /etc/tivoli |
237 |
|
238 |
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.sys.smp" "${D}/etc/tivoli/dsm.sys" || die |
239 |
echo ' PasswordDir "/etc/tivoli/"' >> ${D}/etc/tivoli/dsm.sys |
240 |
echo ' PasswordAccess generate' >> ${D}/etc/tivoli/dsm.sys |
241 |
|
242 |
# Added the hostname to be more friendly, the admin will need to edit this file anyway |
243 |
echo ' NodeName' `hostname` >> ${D}/etc/tivoli/dsm.sys |
244 |
echo ' ErrorLogName "/var/log/tsm/dsmerror.log"' >> ${D}/etc/tivoli/dsm.sys |
245 |
echo ' SchedLogName "/var/log/tsm/dsmsched.log"' >> ${D}/etc/tivoli/dsm.sys |
246 |
dosym ../../../../../../etc/tivoli/dsm.sys /opt/tivoli/tsm/client/ba/bin/dsm.sys |
247 |
|
248 |
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.opt.smp" "${D}/etc/tivoli/dsm.opt" |
249 |
dosym ../../../../../../etc/tivoli/dsm.opt /opt/tivoli/tsm/client/ba/bin/dsm.opt |
250 |
|
251 |
# Setup the env |
252 |
dodir /etc/env.d |
253 |
ENV_FILE="${D}/etc/env.d/80tivoli" |
254 |
echo 'DSM_CONFIG="/etc/tivoli/dsm.opt"' >> ${ENV_FILE} |
255 |
echo 'DSM_DIR="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE} |
256 |
echo 'DSM_LOG="/var/log/tsm"' >> ${ENV_FILE} |
257 |
echo 'ROOTPATH="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE} |
258 |
|
259 |
newconfd "${FILESDIR}/dsmc.conf.d" dsmc |
260 |
newinitd "${FILESDIR}/dsmc.init.d" dsmc |
261 |
newinitd "${FILESDIR}/dsmcad.init.d-r1" dsmcad |
262 |
|
263 |
systemd_dounit "${FILESDIR}/dsmc.service" |
264 |
systemd_dounit "${FILESDIR}/dsmcad.service" |
265 |
|
266 |
readme.gentoo_create_doc |
267 |
} |
268 |
|
269 |
pkg_postinst() { |
270 |
local i dirs |
271 |
for i in /var/log/tsm/dsm{error,sched,j,webcl}.log; do |
272 |
if [[ ! -e $i ]]; then |
273 |
touch $i || die |
274 |
chown :tsm $i || die |
275 |
chmod 0660 $i || die |
276 |
fi |
277 |
done |
278 |
|
279 |
# Bug #375041: the log directory itself should not be world writable. |
280 |
# Have to do this in postinst due to bug #141619 |
281 |
chown root:tsm /var/log/tsm || die |
282 |
chmod 0750 /var/log/tsm || die |
283 |
|
284 |
# Bug 508052: directories used to be too restrictive, have to widen perms. |
285 |
dirs=( /opt/tivoli $(find /opt/tivoli/tsm -type d) ) |
286 |
chown root:root "${dirs[@]}" || die |
287 |
chmod 0755 "${dirs[@]}" || die |
288 |
|
289 |
readme.gentoo_print_elog |
290 |
} |