Commit 38a689e2deae4d94c0ad81b3a4f3ebf95929a02c

Authored by Silvan Calarco
1 parent 08bfa59a98
Exists in master

libnetwork.lib.in: git sources: simple support for checking out at a specific co…

…mmit by supporting the syntax: --git-branch branch[@commit_id]

Showing 3 changed files with 18 additions and 4 deletions Inline Diff

lib/libnetwork.lib.in
1 #!/bin/bash 1 #!/bin/bash
2 # libnetwork.lib -- @package@ library to get info from internet repositories 2 # libnetwork.lib -- @package@ library to get info from internet repositories
3 # Copyright (C) 2008,2010,2012,2014 Davide Madrisan <davide.madrisan@gmail.com> 3 # Copyright (C) 2008,2010,2012,2014 Davide Madrisan <davide.madrisan@gmail.com>
4 4
5 [ "$libnetwork_is_loaded" = 1 ] || { 5 [ "$libnetwork_is_loaded" = 1 ] || {
6 libnetwork_is_loaded=1 6 libnetwork_is_loaded=1
7 7
8 [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] && 8 [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
9 { echo $"this script requires bash version 3 or better" >&2 && exit 1; } 9 { echo $"this script requires bash version 3 or better" >&2 && exit 1; }
10 10
11 [ -r @libdir@/libmsgmng.lib ] || 11 [ -r @libdir@/libmsgmng.lib ] ||
12 { echo "\ 12 { echo "\
13 libnetwork.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2 13 libnetwork.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
14 exit 1; } 14 exit 1; }
15 . @libdir@/libmsgmng.lib 15 . @libdir@/libmsgmng.lib
16 16
17 [ -r @libdir@/libtranslate.lib ] || 17 [ -r @libdir@/libtranslate.lib ] ||
18 { echo "\ 18 { echo "\
19 libnetwork.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2 19 libnetwork.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
20 exit 1; } 20 exit 1; }
21 . @libdir@/libtranslate.lib 21 . @libdir@/libtranslate.lib
22 22
23 notify.debug $"loading"": \`libnetwork.lib'..." 23 notify.debug $"loading"": \`libnetwork.lib'..."
24 24
25 # check if all the needed tools are available 25 # check if all the needed tools are available
26 # note: 'host' has been removed from this list because the package 26 # note: 'host' has been removed from this list because the package
27 # bind-utils is not available in early stage platform development 27 # bind-utils is not available in early stage platform development
28 for tool in curl mktemp; do 28 for tool in curl mktemp; do
29 [ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'" 29 [ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'"
30 done 30 done
31 31
32 # function repository.is_reachable() 32 # function repository.is_reachable()
33 # check if the server '$1' is reachable (test = DNS lookup query) 33 # check if the server '$1' is reachable (test = DNS lookup query)
34 # args: 34 # args:
35 # $1 : server name 35 # $1 : server name
36 function repository.is_reachable() { 36 function repository.is_reachable() {
37 local ftpserver="${1/[a-z]*\:\/\//}" 37 local ftpserver="${1/[a-z]*\:\/\//}"
38 [ "$ftpserver" ] || notify.error $"\ 38 [ "$ftpserver" ] || notify.error $"\
39 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 39 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
40 40
41 if [ "$(type -p host)" ]; then 41 if [ "$(type -p host)" ]; then
42 host -W3 $ftpserver >&/dev/null 42 host -W3 $ftpserver >&/dev/null
43 else 43 else
44 notify.warning $"utility not found"": \`host'" 44 notify.warning $"utility not found"": \`host'"
45 fi 45 fi
46 return $? 46 return $?
47 } 47 }
48 48
49 # function repository.get_srpm_pckname_from_site() 49 # function repository.get_srpm_pckname_from_site()
50 # get the list of SRPM packages by looking at the curl dump of the 50 # get the list of SRPM packages by looking at the curl dump of the
51 # ftp or html site 51 # ftp or html site
52 # args: 52 # args:
53 # --ftp | --html 53 # --ftp | --html
54 # $1 : package name or regexpr to look for 54 # $1 : package name or regexpr to look for
55 # $2 : a (temporary) file containing the curl dump 55 # $2 : a (temporary) file containing the curl dump
56 # return value: 56 # return value:
57 # the list of srpm files 57 # the list of srpm files
58 function repository.get_srpm_pckname_from_site() { 58 function repository.get_srpm_pckname_from_site() {
59 local ARGS 59 local ARGS
60 ARGS=`LC_ALL=C getopt \ 60 ARGS=`LC_ALL=C getopt \
61 -o fh --long ftp,html \ 61 -o fh --long ftp,html \
62 -n "$FUNCNAME" -- "$@"` 62 -n "$FUNCNAME" -- "$@"`
63 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 63 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
64 64
65 local is_html="0" is_ftp="0" 65 local is_html="0" is_ftp="0"
66 66
67 eval set -- "$ARGS" 67 eval set -- "$ARGS"
68 while :; do 68 while :; do
69 case "$1" in 69 case "$1" in
70 -f|--ftp) 70 -f|--ftp)
71 is_ftp="1" 71 is_ftp="1"
72 ;; 72 ;;
73 -h|--html) 73 -h|--html)
74 is_html="1" 74 is_html="1"
75 ;; 75 ;;
76 --) shift; break ;; 76 --) shift; break ;;
77 *) notify.error $"\ 77 *) notify.error $"\
78 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; 78 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
79 esac 79 esac
80 shift 80 shift
81 done 81 done
82 82
83 [ "$is_ftp" != "$is_html" ] || notify.error $"\ 83 [ "$is_ftp" != "$is_html" ] || notify.error $"\
84 (bug)"" -- $FUNCNAME: "$"usage error (--ftp/--html)" 84 (bug)"" -- $FUNCNAME: "$"usage error (--ftp/--html)"
85 85
86 local pck_name="$1" 86 local pck_name="$1"
87 local infile="$2" 87 local infile="$2"
88 88
89 [ "$pck_name" ] || notify.error $"\ 89 [ "$pck_name" ] || notify.error $"\
90 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 90 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
91 [ "$infile" ] || notify.error $"\ 91 [ "$infile" ] || notify.error $"\
92 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#2)" 92 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#2)"
93 93
94 notify.debug "$FUNCNAME: pck_name = \"$pck_name\"" 94 notify.debug "$FUNCNAME: pck_name = \"$pck_name\""
95 case "$pck_name" in */*) notify.error $"\ 95 case "$pck_name" in */*) notify.error $"\
96 (bug)"" -- $FUNCNAME: "$"'\\' characters detected in \$pck_name" ;; esac 96 (bug)"" -- $FUNCNAME: "$"'\\' characters detected in \$pck_name" ;; esac
97 97
98 notify.debug "$FUNCNAME: infile = \"$infile\"" 98 notify.debug "$FUNCNAME: infile = \"$infile\""
99 99
100 local regexpr 100 local regexpr
101 [[ "$pck_name" =~ ^[a-zA-Z0-9_-]+$ ]] && \ 101 [[ "$pck_name" =~ ^[a-zA-Z0-9_-]+$ ]] && \
102 regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name" 102 regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
103 notify.debug "$FUNCNAME: regexpr = \"$regexpr\"" 103 notify.debug "$FUNCNAME: regexpr = \"$regexpr\""
104 104
105 if [ "$is_html" = "1" ]; then 105 if [ "$is_html" = "1" ]; then
106 notify.debug "$FUNCNAME: parsing HTML dump..." 106 notify.debug "$FUNCNAME: parsing HTML dump..."
107 local pckname_from_HTML=($(sed -n "\ 107 local pckname_from_HTML=($(sed -n "\
108 # remove HTML tags --> get a better input 108 # remove HTML tags --> get a better input
109 /<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\".*\.src\.rpm\"/{ 109 /<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\".*\.src\.rpm\"/{
110 s|.*<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\"\([^\"]*\)\".*|\1| 110 s|.*<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\"\([^\"]*\)\".*|\1|
111 {/$regexpr/Ip}}" $infile)) 111 {/$regexpr/Ip}}" $infile))
112 echo "${pckname_from_HTML[*]}" 112 echo "${pckname_from_HTML[*]}"
113 elif [ "$is_ftp" = "1" ]; then 113 elif [ "$is_ftp" = "1" ]; then
114 notify.debug "$FUNCNAME: parsing FTP dump..." 114 notify.debug "$FUNCNAME: parsing FTP dump..."
115 local pckname_from_FTP=($(sed -n "s,.*\ ,,;{/$regexpr/p}" $infile)) 115 local pckname_from_FTP=($(sed -n "s,.*\ ,,;{/$regexpr/p}" $infile))
116 echo "${pckname_from_FTP[*]}" 116 echo "${pckname_from_FTP[*]}"
117 fi 117 fi
118 } 118 }
119 119
120 # function repository.resolveURL() 120 # function repository.resolveURL()
121 # expand the given url according to the given arch 121 # expand the given url according to the given arch
122 # args: 122 # args:
123 # $1 : url to expand 123 # $1 : url to expand
124 # $2 : current architecture 124 # $2 : current architecture
125 # return value: 125 # return value:
126 # the expanded url 126 # the expanded url
127 function repository.resolveURL() { 127 function repository.resolveURL() {
128 local ftpurl="$1" curr_arch="$2" resurl 128 local ftpurl="$1" curr_arch="$2" resurl
129 129
130 [ "$ftpurl" ] || notify.error $"\ 130 [ "$ftpurl" ] || notify.error $"\
131 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 131 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
132 [ "$curr_arch" ] || notify.error $"\ 132 [ "$curr_arch" ] || notify.error $"\
133 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#2)" 133 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#2)"
134 134
135 case "$ftpurl" in 135 case "$ftpurl" in
136 *@arch@*) 136 *@arch@*)
137 echo -n "$(echo $ftpurl | sed "s,@arch@,$curr_arch,g")" ;; 137 echo -n "$(echo $ftpurl | sed "s,@arch@,$curr_arch,g")" ;;
138 *) #echo -n "$ftpurl/$curr_arch/" 138 *) #echo -n "$ftpurl/$curr_arch/"
139 echo -n "$ftpurl/" ;; 139 echo -n "$ftpurl/" ;;
140 esac 140 esac
141 } 141 }
142 142
143 # function repository.get_SRPMS_name() 143 # function repository.get_SRPMS_name()
144 # get the full name of the first SRPMS package found using as 144 # get the full name of the first SRPMS package found using as
145 # package name '$@' and looking in the given list of repositories. 145 # package name '$@' and looking in the given list of repositories.
146 # The full names are saved in the vector 'got_SPEC_FILENAME[]'. 146 # The full names are saved in the vector 'got_SPEC_FILENAME[]'.
147 # The URL where the files have been found is saved in the variables 147 # The URL where the files have been found is saved in the variables
148 # 'got_SPEC_FILENAME_URL', and the index corresponding to this URL 148 # 'got_SPEC_FILENAME_URL', and the index corresponding to this URL
149 # is saved in 'got_SPEC_FILENAME_URL_LEVEL' (eventually set via the 149 # is saved in 'got_SPEC_FILENAME_URL_LEVEL' (eventually set via the
150 # '--urlnum' option) 150 # '--urlnum' option)
151 # args: 151 # args:
152 # -r,--urllist : list of urls where to check for packages 152 # -r,--urllist : list of urls where to check for packages
153 # -n,--urlnum : the url number where to look at 153 # -n,--urlnum : the url number where to look at
154 # -p,--proxy : proxy server 154 # -p,--proxy : proxy server
155 # -u,--proxy-user : proxy user 155 # -u,--proxy-user : proxy user
156 # -l,--user : login user (for repositories that require authentication) 156 # -l,--user : login user (for repositories that require authentication)
157 # $@ : list of package names to find for 157 # $@ : list of package names to find for
158 # return value: 158 # return value:
159 # 0 on success, 1 otherwise 159 # 0 on success, 1 otherwise
160 function repository.get_SRPMS_name() { 160 function repository.get_SRPMS_name() {
161 local ARGS 161 local ARGS
162 ARGS=`LC_ALL=C getopt \ 162 ARGS=`LC_ALL=C getopt \
163 -o n:r:p:u: \ 163 -o n:r:p:u: \
164 --long urlnum:,urllist:,proxy:,proxy-user:,user: \ 164 --long urlnum:,urllist:,proxy:,proxy-user:,user: \
165 -n "$FUNCNAME" -- "$@"` 165 -n "$FUNCNAME" -- "$@"`
166 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 166 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
167 167
168 local i urlnum urllist proxy proxy_user user 168 local i urlnum urllist proxy proxy_user user
169 169
170 eval set -- "$ARGS" 170 eval set -- "$ARGS"
171 while :; do 171 while :; do
172 case "$1" in 172 case "$1" in
173 -n|--urlnum) 173 -n|--urlnum)
174 urlnum="$2"; shift 174 urlnum="$2"; shift
175 notify.debug "$FUNCNAME: urlnum = \"$urlnum\"" 175 notify.debug "$FUNCNAME: urlnum = \"$urlnum\""
176 ;; 176 ;;
177 -r|--urllist) 177 -r|--urllist)
178 urllist=($2); shift 178 urllist=($2); shift
179 for i in `seq 1 1 ${#urllist[*]}`; do 179 for i in `seq 1 1 ${#urllist[*]}`; do
180 notify.debug "$FUNCNAME: urllist[$(($i-1))] = ${urllist[$i-1]}" 180 notify.debug "$FUNCNAME: urllist[$(($i-1))] = ${urllist[$i-1]}"
181 done 181 done
182 ;; 182 ;;
183 -p|--proxy) 183 -p|--proxy)
184 proxy="$2"; shift 184 proxy="$2"; shift
185 notify.debug "$FUNCNAME: proxy = \"$proxy\"" 185 notify.debug "$FUNCNAME: proxy = \"$proxy\""
186 ;; 186 ;;
187 -u|--proxy-user) 187 -u|--proxy-user)
188 proxy_user="$2"; shift 188 proxy_user="$2"; shift
189 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" 189 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
190 ;; 190 ;;
191 -l|--user) 191 -l|--user)
192 user="$2"; shift 192 user="$2"; shift
193 notify.debug "$FUNCNAME: user = \"$user\"" 193 notify.debug "$FUNCNAME: user = \"$user\""
194 ;; 194 ;;
195 --) shift; break ;; 195 --) shift; break ;;
196 *) notify.error $"\ 196 *) notify.error $"\
197 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; 197 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
198 esac 198 esac
199 shift 199 shift
200 done 200 done
201 201
202 if [ "$urlnum" ]; then 202 if [ "$urlnum" ]; then
203 [[ "$urlnum" =~ ^[0-9]+$ ]] || notify.error $"\ 203 [[ "$urlnum" =~ ^[0-9]+$ ]] || notify.error $"\
204 (bug)"" -- $FUNCNAME: urlnum: "$"not a number" 204 (bug)"" -- $FUNCNAME: urlnum: "$"not a number"
205 fi 205 fi
206 206
207 # this can be the result of a buggy configuration file 207 # this can be the result of a buggy configuration file
208 # [ "$urllist" ] || notify.error $"\ 208 # [ "$urllist" ] || notify.error $"\
209 #(bug)"" -- $FUNCNAME: urllist: "$"unset" 209 #(bug)"" -- $FUNCNAME: urllist: "$"unset"
210 210
211 local pck_names="$@" 211 local pck_names="$@"
212 notify.debug "$FUNCNAME: pck_names = \"${pck_names[@]}\"" 212 notify.debug "$FUNCNAME: pck_names = \"${pck_names[@]}\""
213 [ "$pck_names" ] || notify.error $"\ 213 [ "$pck_names" ] || notify.error $"\
214 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 214 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
215 215
216 # FIXME: 'curl_opts_netlink' is an external variable 216 # FIXME: 'curl_opts_netlink' is an external variable
217 local curlopts="\ 217 local curlopts="\
218 -L --silent --list-only $curl_opts_netlink\ 218 -L --silent --list-only $curl_opts_netlink\
219 ${user:+ --user $user}\ 219 ${user:+ --user $user}\
220 ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}" 220 ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}"
221 221
222 local curlopts_debug="\ 222 local curlopts_debug="\
223 -L --silent --list-only $curl_opts_netlink\ 223 -L --silent --list-only $curl_opts_netlink\
224 ${user:+ --user ***}\ 224 ${user:+ --user ***}\
225 ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}" 225 ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
226 226
227 local flist currflist currurl 227 local flist currflist currurl
228 local errors=0 228 local errors=0
229 let "i = 0" 229 let "i = 0"
230 for currurl in ${urllist[*]}; do 230 for currurl in ${urllist[*]}; do
231 # get the list of files from the repository 231 # get the list of files from the repository
232 notify.note $"\ 232 notify.note $"\
233 getting list of files from"" \`${NOTE}$currurl/${NORM}'..." 233 getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
234 234
235 case $currurl in 235 case $currurl in
236 ftp://*|http://*) ;; 236 ftp://*|http://*) ;;
237 *) notify.warning $"unsupported query type for this protocol" 237 *) notify.warning $"unsupported query type for this protocol"
238 let "errors += 1" 238 let "errors += 1"
239 continue ;; 239 continue ;;
240 esac 240 esac
241 241
242 currflist="$(mktemp -q -t flist.XXXXXXXX)" || 242 currflist="$(mktemp -q -t flist.XXXXXXXX)" ||
243 notify.error $"can't create temporary files" 243 notify.error $"can't create temporary files"
244 notify.debug "$FUNCNAME: currflist = $currflist" 244 notify.debug "$FUNCNAME: currflist = $currflist"
245 245
246 # NOTE: the trailing slash is necessary, do not remove it 246 # NOTE: the trailing slash is necessary, do not remove it
247 notify.debug "$FUNCNAME: curl $curlopts_debug --url $currurl/ -o $currflist" 247 notify.debug "$FUNCNAME: curl $curlopts_debug --url $currurl/ -o $currflist"
248 curl $curlopts --url $currurl/ -o $currflist 248 curl $curlopts --url $currurl/ -o $currflist
249 let "retval = $?" 249 let "retval = $?"
250 notify.debug "$FUNCNAME: curl return code: $retval" 250 notify.debug "$FUNCNAME: curl return code: $retval"
251 251
252 case "$retval" in 252 case "$retval" in
253 0) sed -i 's/\x0D$//' $currflist 253 0) sed -i 's/\x0D$//' $currflist
254 flist[$i]="$currflist" ;; 254 flist[$i]="$currflist" ;;
255 6) notify.warning $"couldn't resolve host" 255 6) notify.warning $"couldn't resolve host"
256 let "errors += 1" ;; 256 let "errors += 1" ;;
257 7) notify.warning $"failed to connect to host" 257 7) notify.warning $"failed to connect to host"
258 let "errors += 1" ;; 258 let "errors += 1" ;;
259 56) notify.warning $"failure in receiving network data" 259 56) notify.warning $"failure in receiving network data"
260 let "errors += 1" ;; 260 let "errors += 1" ;;
261 *) notify.warning $"curl error (exit code: $retval)" 261 *) notify.warning $"curl error (exit code: $retval)"
262 let "errors += 1" ;; 262 let "errors += 1" ;;
263 esac 263 esac
264 264
265 [ -s "$currflist" ] || notify.warning $"cannot get the list of files" 265 [ -s "$currflist" ] || notify.warning $"cannot get the list of files"
266 266
267 let "i += 1" 267 let "i += 1"
268 done 268 done
269 [ "$errors" = "${#urllist[@]}" ] && return 1 269 [ "$errors" = "${#urllist[@]}" ] && return 1
270 270
271 local pck_name level 271 local pck_name level
272 for pck_name in ${pck_names[@]}; do 272 for pck_name in ${pck_names[@]}; do
273 let "level = ${urlnum:-0}" 273 let "level = ${urlnum:-0}"
274 let "i = 0" 274 let "i = 0"
275 for currurl in ${urllist[*]}; do 275 for currurl in ${urllist[*]}; do
276 notify.debug "$FUNCNAME: pck_name = $pck_name" 276 notify.debug "$FUNCNAME: pck_name = $pck_name"
277 277
278 if [ -s "${flist[$i]}" ]; then 278 if [ -s "${flist[$i]}" ]; then
279 case $currurl in 279 case $currurl in
280 ftp://*) 280 ftp://*)
281 got_SPEC_FILENAME=($(\ 281 got_SPEC_FILENAME=($(\
282 repository.get_srpm_pckname_from_site --ftp "$pck_name" "${flist[$i]}")) 282 repository.get_srpm_pckname_from_site --ftp "$pck_name" "${flist[$i]}"))
283 ;; 283 ;;
284 http://*) 284 http://*)
285 got_SPEC_FILENAME=($(\ 285 got_SPEC_FILENAME=($(\
286 repository.get_srpm_pckname_from_site --html "$pck_name" "${flist[$i]}")) 286 repository.get_srpm_pckname_from_site --html "$pck_name" "${flist[$i]}"))
287 ;; 287 ;;
288 esac 288 esac
289 289
290 [ "$got_SPEC_FILENAME" ] && 290 [ "$got_SPEC_FILENAME" ] &&
291 { notify.debug "\ 291 { notify.debug "\
292 $FUNCNAME: got_SPEC_FILENAME = ${got_SPEC_FILENAME[*]}" 292 $FUNCNAME: got_SPEC_FILENAME = ${got_SPEC_FILENAME[*]}"
293 got_SPEC_FILENAME_URL_LEVEL="$level" 293 got_SPEC_FILENAME_URL_LEVEL="$level"
294 got_SPEC_FILENAME_URL="$currurl" 294 got_SPEC_FILENAME_URL="$currurl"
295 break 2; } 295 break 2; }
296 fi 296 fi
297 let "level += 1" 297 let "level += 1"
298 let "i += 1" 298 let "i += 1"
299 done 299 done
300 done 300 done
301 301
302 for i in ${!flist[@]}; do 302 for i in ${!flist[@]}; do
303 notify.debug "$FUNCNAME: removing temporary file '${flist[$i]}'" 303 notify.debug "$FUNCNAME: removing temporary file '${flist[$i]}'"
304 rm -f ${flist[$i]} 304 rm -f ${flist[$i]}
305 done 305 done
306 306
307 return 0 307 return 0
308 } 308 }
309 309
310 # function repository.get_RPMS_name() 310 # function repository.get_RPMS_name()
311 # get the full name of the RPMS package '$1' looking at the 311 # get the full name of the RPMS package '$1' looking at the
312 # repository '$1'. 312 # repository '$1'.
313 # The full names are saved in the vector 'got_RPM_FILENAME[]'. 313 # The full names are saved in the vector 'got_RPM_FILENAME[]'.
314 # args: 314 # args:
315 # $1 : URL where to check 315 # $1 : URL where to check
316 # $2 .. $n : package names to look at 316 # $2 .. $n : package names to look at
317 # -a,--archlist : list of supported architectures in the specified url 317 # -a,--archlist : list of supported architectures in the specified url
318 # -x,--exclude : exclude packages that match a given regexpr 318 # -x,--exclude : exclude packages that match a given regexpr
319 # -c,--target-cpu : set the build architecture 319 # -c,--target-cpu : set the build architecture
320 # -p,--proxy : proxy server 320 # -p,--proxy : proxy server
321 # -u,--proxy-user : proxy user 321 # -u,--proxy-user : proxy user
322 # -l,--user : login user (for repositories that require authentication) 322 # -l,--user : login user (for repositories that require authentication)
323 # return value: 323 # return value:
324 # 0 on success, >0 otherwise 324 # 0 on success, >0 otherwise
325 # example of output: 325 # example of output:
326 # got_RPM_FILENAME = ( 326 # got_RPM_FILENAME = (
327 # i586:mbrowse-0.3.1-1qilnx.i586.rpm 327 # i586:mbrowse-0.3.1-1qilnx.i586.rpm
328 # i586:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm 328 # i586:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm
329 # ppc:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm ) 329 # ppc:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm )
330 function repository.get_RPMS_name() { 330 function repository.get_RPMS_name() {
331 ARGS=`LC_ALL=C getopt \ 331 ARGS=`LC_ALL=C getopt \
332 -o a:x:c:p:u: \ 332 -o a:x:c:p:u: \
333 --long archlist:,exclude:,target-cpu:,proxy:,proxy-user:,user: \ 333 --long archlist:,exclude:,target-cpu:,proxy:,proxy-user:,user: \
334 -n "$FUNCNAME" -- "$@"` 334 -n "$FUNCNAME" -- "$@"`
335 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 335 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
336 336
337 eval set -- "$ARGS" 337 eval set -- "$ARGS"
338 338
339 local archlist excludeopt proxy proxy_user user target_cpu 339 local archlist excludeopt proxy proxy_user user target_cpu
340 while :; do 340 while :; do
341 case $1 in 341 case $1 in
342 -a|--archlist) 342 -a|--archlist)
343 archlist="$2"; shift 343 archlist="$2"; shift
344 notify.debug "$FUNCNAME: archlist = \"$archlist\"" 344 notify.debug "$FUNCNAME: archlist = \"$archlist\""
345 ;; 345 ;;
346 -x|--exclude) 346 -x|--exclude)
347 excludeopt="$2"; shift 347 excludeopt="$2"; shift
348 notify.debug "$FUNCNAME: excludeopt = \"$excludeopt\"" 348 notify.debug "$FUNCNAME: excludeopt = \"$excludeopt\""
349 ;; 349 ;;
350 -c|--target-cpu) 350 -c|--target-cpu)
351 target_cpu="$2"; shift 351 target_cpu="$2"; shift
352 notify.debug "$FUNCNAME: target_cpu = \"$target_cpu\"" 352 notify.debug "$FUNCNAME: target_cpu = \"$target_cpu\""
353 ;; 353 ;;
354 -p|--proxy) 354 -p|--proxy)
355 proxy="$2"; shift 355 proxy="$2"; shift
356 notify.debug "$FUNCNAME: proxy = \"$proxy\"" 356 notify.debug "$FUNCNAME: proxy = \"$proxy\""
357 ;; 357 ;;
358 -u|--proxy-user) 358 -u|--proxy-user)
359 proxy_user="$2"; shift 359 proxy_user="$2"; shift
360 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" 360 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
361 ;; 361 ;;
362 -l|--user) 362 -l|--user)
363 user="$2"; shift 363 user="$2"; shift
364 notify.debug "$FUNCNAME: user = \"$user\"" 364 notify.debug "$FUNCNAME: user = \"$user\""
365 ;; 365 ;;
366 --) shift; break ;; 366 --) shift; break ;;
367 *) notify.error $"\ 367 *) notify.error $"\
368 (bug)"" -- $FUNCNAME: "$"\`getopt' error" ;; 368 (bug)"" -- $FUNCNAME: "$"\`getopt' error" ;;
369 esac 369 esac
370 shift 370 shift
371 done 371 done
372 372
373 local scanurl="$1" 373 local scanurl="$1"
374 [ "$scanurl" ] || notify.error $"\ 374 [ "$scanurl" ] || notify.error $"\
375 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 375 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
376 shift 376 shift
377 377
378 local pck_names="$@" 378 local pck_names="$@"
379 notify.debug "$FUNCNAME: pck_names = \"${pck_names[@]}\"" 379 notify.debug "$FUNCNAME: pck_names = \"${pck_names[@]}\""
380 [ "$pck_names" ] || notify.error $"\ 380 [ "$pck_names" ] || notify.error $"\
381 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#2)" 381 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#2)"
382 382
383 [ "$archlist" ] || notify.error $"\ 383 [ "$archlist" ] || notify.error $"\
384 (bug)"" -- $FUNCNAME: "$"no list of architectures set"" (\$archlist)" 384 (bug)"" -- $FUNCNAME: "$"no list of architectures set"" (\$archlist)"
385 385
386 local flist=`mktemp -q -t flist.XXXXXXXX` || 386 local flist=`mktemp -q -t flist.XXXXXXXX` ||
387 notify.error $"can't create temporary files" 387 notify.error $"can't create temporary files"
388 388
389 local curr_arch errors pck_name curr_match 389 local curr_arch errors pck_name curr_match
390 let "errors = 0" 390 let "errors = 0"
391 391
392 local curr_arch_list 392 local curr_arch_list
393 case "$target_cpu" in 393 case "$target_cpu" in
394 "") curr_arch_list=( $archlist ) ;; 394 "") curr_arch_list=( $archlist ) ;;
395 "noarch") 395 "noarch")
396 #curr_arch_list=( ${arch_noarch_upload[*]} ) 396 #curr_arch_list=( ${arch_noarch_upload[*]} )
397 # FIXME : if the noarch directory cannot be found a warning 397 # FIXME : if the noarch directory cannot be found a warning
398 # message is displayed 398 # message is displayed
399 curr_arch_list=( $archlist noarch ) 399 curr_arch_list=( $archlist noarch )
400 ;; 400 ;;
401 *) # if the architecture is set by the user do ignore packages 401 *) # if the architecture is set by the user do ignore packages
402 # built for other architectures (aka: please do not remove 402 # built for other architectures (aka: please do not remove
403 # packages built for other architectures!) 403 # packages built for other architectures!)
404 curr_arch_list="$target_cpu" 404 curr_arch_list="$target_cpu"
405 ;; 405 ;;
406 esac 406 esac
407 notify.debug "\ 407 notify.debug "\
408 $FUNCNAME: curr_arch_list = ( ${curr_arch_list[*]} )" 408 $FUNCNAME: curr_arch_list = ( ${curr_arch_list[*]} )"
409 409
410 # FIXME: 'curl_opts_netlink' is an external variable 410 # FIXME: 'curl_opts_netlink' is an external variable
411 local curlopts="\ 411 local curlopts="\
412 -L --silent --list-only $curl_opts_netlink -o $flist\ 412 -L --silent --list-only $curl_opts_netlink -o $flist\
413 ${user:+ --user $user}\ 413 ${user:+ --user $user}\
414 ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}" 414 ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}"
415 415
416 local curlopts_debug="\ 416 local curlopts_debug="\
417 -L --silent --list-only $curl_opts_netlink -o $flist\ 417 -L --silent --list-only $curl_opts_netlink -o $flist\
418 ${user:+ --user ***}\ 418 ${user:+ --user ***}\
419 ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}" 419 ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
420 420
421 got_RPM_FILENAME= 421 got_RPM_FILENAME=
422 for curr_arch in ${curr_arch_list[*]}; do 422 for curr_arch in ${curr_arch_list[*]}; do
423 currurl="$(repository.resolveURL "$scanurl" "$curr_arch")" 423 currurl="$(repository.resolveURL "$scanurl" "$curr_arch")"
424 #[ "$currurl" ] || notify.error $"(bug)"" -- $FUNCNAME: currurl = \"\"" 424 #[ "$currurl" ] || notify.error $"(bug)"" -- $FUNCNAME: currurl = \"\""
425 425
426 # get the list of files from the repository 426 # get the list of files from the repository
427 notify.note $"getting list of files from"" \`${NOTE}$currurl/${NORM}'..." 427 notify.note $"getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
428 428
429 > $flist 429 > $flist
430 430
431 # NOTE: the trailing slash is necessary, do not remote it 431 # NOTE: the trailing slash is necessary, do not remote it
432 notify.debug "$FUNCNAME: curl $curlopts_debug --url $currurl/" 432 notify.debug "$FUNCNAME: curl $curlopts_debug --url $currurl/"
433 curl $curlopts --url $currurl/ 433 curl $curlopts --url $currurl/
434 let "retval = $?" 434 let "retval = $?"
435 notify.debug "$FUNCNAME: curl return code: $retval" 435 notify.debug "$FUNCNAME: curl return code: $retval"
436 case "$retval" in 436 case "$retval" in
437 0) ;; 437 0) ;;
438 6) notify.warning $"couldn't resolve host" ;; 438 6) notify.warning $"couldn't resolve host" ;;
439 7) notify.warning $"failed to connect to host" ;; 439 7) notify.warning $"failed to connect to host" ;;
440 56) notify.warning $"failure in receiving network data" ;; 440 56) notify.warning $"failure in receiving network data" ;;
441 *) notify.warning $"curl error (exit code: $retval)" ;; 441 *) notify.warning $"curl error (exit code: $retval)" ;;
442 esac 442 esac
443 443
444 if [ -s "$flist" ]; then 444 if [ -s "$flist" ]; then
445 sed -i 's/\x0D$//' $flist 445 sed -i 's/\x0D$//' $flist
446 case $currurl in 446 case $currurl in
447 ftp://*|http://*) 447 ftp://*|http://*)
448 for pck_name in ${pck_names[@]}; do 448 for pck_name in ${pck_names[@]}; do
449 got_RPM_FILENAME=( ${got_RPM_FILENAME[@]} $(\ 449 got_RPM_FILENAME=( ${got_RPM_FILENAME[@]} $(\
450 if [ -n "$excludeopt" ]; then 450 if [ -n "$excludeopt" ]; then
451 sed -n "\ 451 sed -n "\
452 /<a href=\"/{s|.*<a href=\"\([^\"]*\)\".*|\1|;bm;}; 452 /<a href=\"/{s|.*<a href=\"\([^\"]*\)\".*|\1|;bm;};
453 /<A HREF=\"/{s|.*<A HREF=\"\([^\"]*\)\".*|\1|;bm;}; 453 /<A HREF=\"/{s|.*<A HREF=\"\([^\"]*\)\".*|\1|;bm;};
454 /^$pck_name-[^-]*-[^-]*\.rpm/bm;be; 454 /^$pck_name-[^-]*-[^-]*\.rpm/bm;be;
455 :m;/^$pck_name-[^-]*-[^-]*\.rpm/{s,.*,$curr_arch:&,p} 455 :m;/^$pck_name-[^-]*-[^-]*\.rpm/{s,.*,$curr_arch:&,p}
456 :e" $flist | grep -v -- "$excludeopt" 456 :e" $flist | grep -v -- "$excludeopt"
457 else 457 else
458 sed -n "\ 458 sed -n "\
459 /<a href=\"/{s|.*<a href=\"\([^\"]*\)\".*|\1|;bm;}; 459 /<a href=\"/{s|.*<a href=\"\([^\"]*\)\".*|\1|;bm;};
460 /<A HREF=\"/{s|.*<A HREF=\"\([^\"]*\)\".*|\1|;bm;}; 460 /<A HREF=\"/{s|.*<A HREF=\"\([^\"]*\)\".*|\1|;bm;};
461 /^$pck_name-[^-]*-[^-]*\.rpm/bm;be; 461 /^$pck_name-[^-]*-[^-]*\.rpm/bm;be;
462 :m;/^$pck_name-[^-]*-[^-]*\.rpm/{s,.*,$curr_arch:&,p} 462 :m;/^$pck_name-[^-]*-[^-]*\.rpm/{s,.*,$curr_arch:&,p}
463 :e" $flist 463 :e" $flist
464 fi )) 464 fi ))
465 done 465 done
466 ;; 466 ;;
467 *) notify.warning $"unsupported query type for this protocol" ;; 467 *) notify.warning $"unsupported query type for this protocol" ;;
468 esac 468 esac
469 else 469 else
470 notify.warning $"cannot get the list of files"" ($curr_arch)" 470 notify.warning $"cannot get the list of files"" ($curr_arch)"
471 let "errors += 1" 471 let "errors += 1"
472 fi 472 fi
473 done 473 done
474 474
475 rm -f $flist 475 rm -f $flist
476 476
477 notify.debug "$FUNCNAME: got_RPM_FILENAME = ( ""$( 477 notify.debug "$FUNCNAME: got_RPM_FILENAME = ( ""$(
478 for pck_name in ${got_RPM_FILENAME[@]}; do 478 for pck_name in ${got_RPM_FILENAME[@]}; do
479 echo -en "\n $pck_name" 479 echo -en "\n $pck_name"
480 done ) )" 480 done ) )"
481 481
482 return $errors 482 return $errors
483 } 483 }
484 484
485 # function curl.download 485 # function curl.download
486 # download a file from an internet address using curl 486 # download a file from an internet address using curl
487 # 487 #
488 # args: 488 # args:
489 # -d,--destdir : target directory 489 # -d,--destdir : target directory
490 # -f,--force : force download (optional, default: false) 490 # -f,--force : force download (optional, default: false)
491 # -n,--filenum : number to display when executing this functions several times 491 # -n,--filenum : number to display when executing this functions several times
492 # -o,--options : extra options to pass to curl 492 # -o,--options : extra options to pass to curl
493 # -x,--exit-on-err : terminate the script if the download fails 493 # -x,--exit-on-err : terminate the script if the download fails
494 # -p,--proxy : proxy 494 # -p,--proxy : proxy
495 # -u,--proxy-user : proxy user 495 # -u,--proxy-user : proxy user
496 # --debug-unsecure : print private informations in debug mode 496 # --debug-unsecure : print private informations in debug mode
497 # $@ : list of files to be downloaded 497 # $@ : list of files to be downloaded
498 # return value: 498 # return value:
499 # 0 on success, 1 otherwise 499 # 0 on success, 1 otherwise
500 500
501 function curl.download() { 501 function curl.download() {
502 local ARGS 502 local ARGS
503 ARGS=`LC_ALL=C getopt \ 503 ARGS=`LC_ALL=C getopt \
504 -o d:fn:o:xp:u: \ 504 -o d:fn:o:xp:u: \
505 --long destdir:,force,filenum:,options:,exit-on-err,proxy:,proxy-user: \ 505 --long destdir:,force,filenum:,options:,exit-on-err,proxy:,proxy-user: \
506 -n "$FUNCNAME" -- "$@"` 506 -n "$FUNCNAME" -- "$@"`
507 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 507 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
508 508
509 local destdir 509 local destdir
510 local curl_opts 510 local curl_opts
511 local exitonerror="0" 511 local exitonerror="0"
512 local force_download="0" 512 local force_download="0"
513 local proxy proxy_user 513 local proxy proxy_user
514 local filenum="1" 514 local filenum="1"
515 local is_a_localfile 515 local is_a_localfile
516 516
517 eval set -- "$ARGS" 517 eval set -- "$ARGS"
518 while :; do 518 while :; do
519 case "$1" in 519 case "$1" in
520 -d|--destdir) 520 -d|--destdir)
521 destdir="$2"; shift 521 destdir="$2"; shift
522 notify.debug "$FUNCNAME: destdir = \"$destdir\"" 522 notify.debug "$FUNCNAME: destdir = \"$destdir\""
523 ;; 523 ;;
524 -f|--force) 524 -f|--force)
525 force_download=1 525 force_download=1
526 notify.debug "$FUNCNAME: force download is enabled" 526 notify.debug "$FUNCNAME: force download is enabled"
527 ;; 527 ;;
528 -n|--filenum) 528 -n|--filenum)
529 filenum="$2"; shift 529 filenum="$2"; shift
530 notify.debug "$FUNCNAME: filenum = \"$filenum\"" 530 notify.debug "$FUNCNAME: filenum = \"$filenum\""
531 ;; 531 ;;
532 -o|--options) 532 -o|--options)
533 curl_opts="$2"; shift 533 curl_opts="$2"; shift
534 notify.debug "$FUNCNAME: curl_opts = \"$curl_opts\"" 534 notify.debug "$FUNCNAME: curl_opts = \"$curl_opts\""
535 ;; 535 ;;
536 -x|--exit-on-err) 536 -x|--exit-on-err)
537 exitonerror="1" 537 exitonerror="1"
538 notify.debug "$FUNCNAME: exitonerror = \"$exitonerror\"" 538 notify.debug "$FUNCNAME: exitonerror = \"$exitonerror\""
539 ;; 539 ;;
540 -p|--proxy) 540 -p|--proxy)
541 proxy="$2"; shift 541 proxy="$2"; shift
542 notify.debug "$FUNCNAME: proxy = \"$proxy\"" 542 notify.debug "$FUNCNAME: proxy = \"$proxy\""
543 ;; 543 ;;
544 -u|--proxy-user) 544 -u|--proxy-user)
545 proxy_user="$2"; shift 545 proxy_user="$2"; shift
546 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" 546 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
547 ;; 547 ;;
548 --) shift; break;; 548 --) shift; break;;
549 *) notify.error $"\ 549 *) notify.error $"\
550 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; 550 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
551 esac 551 esac
552 shift 552 shift
553 done 553 done
554 554
555 # FIXME: add support for list of files 555 # FIXME: add support for list of files
556 local file_url="$1" 556 local file_url="$1"
557 notify.debug "$FUNCNAME: file_url = \"$file_url\"" 557 notify.debug "$FUNCNAME: file_url = \"$file_url\""
558 [ "$file_url" ] || notify.error $"\ 558 [ "$file_url" ] || notify.error $"\
559 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 559 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
560 560
561 [ "$destdir" ] || notify.error $"\ 561 [ "$destdir" ] || notify.error $"\
562 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)" 562 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
563 563
564 local file_name 564 local file_name
565 case "$file_url" in 565 case "$file_url" in
566 http://*|https://*|ftp://*) 566 http://*|https://*|ftp://*)
567 file_name="${file_url##*/}" 567 file_name="${file_url##*/}"
568 is_a_localfile="0" ;; 568 is_a_localfile="0" ;;
569 *://*) 569 *://*)
570 notify.error $"unsupported protocol"": \`${file_url//\:*}'" 570 notify.error $"unsupported protocol"": \`${file_url//\:*}'"
571 ;; 571 ;;
572 *) #notify.error $"not an internet address"": \`$file_url'" 572 *) #notify.error $"not an internet address"": \`$file_url'"
573 # it's a local file 573 # it's a local file
574 [ -e "$destdir/$file_url" ] || 574 [ -e "$destdir/$file_url" ] ||
575 notify.error $"file not found"": \`$destdir/$file_url'" 575 notify.error $"file not found"": \`$destdir/$file_url'"
576 notify.note "[${filenum:-*}] $NOTE$file_url$NORM ... "$"skipped" 576 notify.note "[${filenum:-*}] $NOTE$file_url$NORM ... "$"skipped"
577 return 0 577 return 0
578 ;; 578 ;;
579 esac 579 esac
580 580
581 if [ -e $destdir/$file_name ]; then 581 if [ -e $destdir/$file_name ]; then
582 if [ "$force_download" = "0" ]; then 582 if [ "$force_download" = "0" ]; then
583 notify.note "[${filenum:-*}] $NOTE$file_url$NORM ... "$"skipped" 583 notify.note "[${filenum:-*}] $NOTE$file_url$NORM ... "$"skipped"
584 return 0 584 return 0
585 else 585 else
586 rm -f $destdir/$file_name 586 rm -f $destdir/$file_name
587 fi 587 fi
588 fi 588 fi
589 589
590 notify.note $"downloading"" ${NOTE}$file_name${NORM} ..." 590 notify.note $"downloading"" ${NOTE}$file_name${NORM} ..."
591 591
592 [ -d "$destdir" ] || 592 [ -d "$destdir" ] ||
593 if [ "$exitonerror" = 1 ]; then 593 if [ "$exitonerror" = 1 ]; then
594 notify.warning $"\ 594 notify.warning $"\
595 (bug)"" -- $FUNCNAME: "$"no such directory"": \`$destdir'" 595 (bug)"" -- $FUNCNAME: "$"no such directory"": \`$destdir'"
596 return 1 596 return 1
597 else 597 else
598 notify.error $"\ 598 notify.error $"\
599 (bug)"" -- $FUNCNAME: "$"no such directory"": \`$destdir'" 599 (bug)"" -- $FUNCNAME: "$"no such directory"": \`$destdir'"
600 fi 600 fi
601 601
602 notify.note "\ 602 notify.note "\
603 [${filenum:-*}] $NOTE$file_url$NORM 603 [${filenum:-*}] $NOTE$file_url$NORM
604 --> $destdir/$file_name" 604 --> $destdir/$file_name"
605 605
606 pushd $destdir >/dev/null 606 pushd $destdir >/dev/null
607 607
608 local retval 608 local retval
609 notify.debug "curl $curl_opts\ 609 notify.debug "curl $curl_opts\
610 ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} $file_url" 610 ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} $file_url"
611 611
612 curl $curl_opts \ 612 curl $curl_opts \
613 ${proxy:+ --proxy $proxy} ${proxyuser:+ --proxy-user $proxy_user} \ 613 ${proxy:+ --proxy $proxy} ${proxyuser:+ --proxy-user $proxy_user} \
614 "$file_url" 614 "$file_url"
615 retval=$? 615 retval=$?
616 616
617 notify.debug "$FUNCNAME: curl return code: $retval" 617 notify.debug "$FUNCNAME: curl return code: $retval"
618 case "$retval" in 618 case "$retval" in
619 0) ;; 619 0) ;;
620 6) notify.warning $"couldn't resolve host" ;; 620 6) notify.warning $"couldn't resolve host" ;;
621 7) notify.warning $"failed to connect to host" ;; 621 7) notify.warning $"failed to connect to host" ;;
622 56) notify.warning $"failure in receiving network data" ;; 622 56) notify.warning $"failure in receiving network data" ;;
623 *) notify.warning $"curl error (exit code: $retval)" ;; 623 *) notify.warning $"curl error (exit code: $retval)" ;;
624 esac 624 esac
625 625
626 [ -e $destdir/$file_name ] || 626 [ -e $destdir/$file_name ] ||
627 if [ "$exitonerror" = 1 ]; then 627 if [ "$exitonerror" = 1 ]; then
628 notify.error $"cannot download"": \`$file_name'" 628 notify.error $"cannot download"": \`$file_name'"
629 else 629 else
630 popd >/dev/null 630 popd >/dev/null
631 notify.warning $"cannot download"": \`$file_name'" 631 notify.warning $"cannot download"": \`$file_name'"
632 return 1 632 return 1
633 fi 633 fi
634 634
635 popd >/dev/null 635 popd >/dev/null
636 } 636 }
637 637
638 # function curl.upload 638 # function curl.upload
639 # upload a file using curl 639 # upload a file using curl
640 # 640 #
641 function curl.upload() { 641 function curl.upload() {
642 local ARGS 642 local ARGS
643 ARGS=`LC_ALL=C getopt \ 643 ARGS=`LC_ALL=C getopt \
644 -o f:l:o:p:u:x \ 644 -o f:l:o:p:u:x \
645 --long upload-file:,user:,options:,proxy:,proxy-user:,\ 645 --long upload-file:,user:,options:,proxy:,proxy-user:,\
646 repository-alias:,exit-on-err,debug-unsecure \ 646 repository-alias:,exit-on-err,debug-unsecure \
647 -n "$FUNCNAME" -- "$@"` 647 -n "$FUNCNAME" -- "$@"`
648 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 648 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
649 649
650 local upfile user options proxy proxy_user 650 local upfile user options proxy proxy_user
651 local exitonerror=0 651 local exitonerror=0
652 local debug_unsecure=0 652 local debug_unsecure=0
653 653
654 eval set -- "$ARGS" 654 eval set -- "$ARGS"
655 while :; do 655 while :; do
656 case "$1" in 656 case "$1" in
657 -f|--upload-file) 657 -f|--upload-file)
658 upfile="$2"; shift 658 upfile="$2"; shift
659 ;; 659 ;;
660 -l|--user) 660 -l|--user)
661 user="$2"; shift 661 user="$2"; shift
662 #notify.debug "$FUNCNAME: user = \"$user\"" 662 #notify.debug "$FUNCNAME: user = \"$user\""
663 ;; 663 ;;
664 -o|--options) 664 -o|--options)
665 options="$2"; shift 665 options="$2"; shift
666 #notify.debug "$FUNCNAME: options = \"$options\"" 666 #notify.debug "$FUNCNAME: options = \"$options\""
667 ;; 667 ;;
668 -p|--proxy) 668 -p|--proxy)
669 proxy="$2"; shift 669 proxy="$2"; shift
670 #notify.debug "$FUNCNAME: proxy = \"$proxy\"" 670 #notify.debug "$FUNCNAME: proxy = \"$proxy\""
671 ;; 671 ;;
672 -u|--proxy-user) 672 -u|--proxy-user)
673 proxy_user="$2"; shift 673 proxy_user="$2"; shift
674 #notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" 674 #notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
675 ;; 675 ;;
676 -x|--exit-on-err) 676 -x|--exit-on-err)
677 exitonerror="1" 677 exitonerror="1"
678 #notify.debug "$FUNCNAME: exitonerror = \"$exitonerror\"" 678 #notify.debug "$FUNCNAME: exitonerror = \"$exitonerror\""
679 ;; 679 ;;
680 --debug-unsecure) 680 --debug-unsecure)
681 debug_unsecure="1" 681 debug_unsecure="1"
682 ;; 682 ;;
683 --) shift; break;; 683 --) shift; break;;
684 *) notify.error $"\ 684 *) notify.error $"\
685 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; 685 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
686 esac 686 esac
687 shift 687 shift
688 done 688 done
689 689
690 #notify.debug "$FUNCNAME: debug_unsecure = \"$debug_unsecure\"" 690 #notify.debug "$FUNCNAME: debug_unsecure = \"$debug_unsecure\""
691 691
692 local destfile="$1" 692 local destfile="$1"
693 [ "$destfile" ] || notify.error $"\ 693 [ "$destfile" ] || notify.error $"\
694 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 694 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
695 695
696 [ -e "$upfile" ] || notify.error $"package not found"": \`$upfile'" 696 [ -e "$upfile" ] || notify.error $"package not found"": \`$upfile'"
697 697
698 # FIXED: add an extra newline to workaroung a bug in curl 698 # FIXED: add an extra newline to workaroung a bug in curl
699 notify.note "\ 699 notify.note "\
700 * ${NOTE}$upfile${NORM} 700 * ${NOTE}$upfile${NORM}
701 --> $destfile" 701 --> $destfile"
702 702
703 # option: --write-out [%{url_effective}]\\n 703 # option: --write-out [%{url_effective}]\\n
704 # the option '--progress-bar' is currently buggy in curl 704 # the option '--progress-bar' is currently buggy in curl
705 local curr_curl_cmd="$options --progress-bar --fail -o /dev/null \ 705 local curr_curl_cmd="$options --progress-bar --fail -o /dev/null \
706 ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} \ 706 ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} \
707 --upload-file $upfile $destfile" 707 --upload-file $upfile $destfile"
708 708
709 if [ "$debug_unsecure" = "1" ]; then 709 if [ "$debug_unsecure" = "1" ]; then
710 notify.debug "curl --user $user $curr_curl_cmd" 710 notify.debug "curl --user $user $curr_curl_cmd"
711 else 711 else
712 notify.debug "curl --user ***:*** $curr_curl_cmd" 712 notify.debug "curl --user ***:*** $curr_curl_cmd"
713 fi 713 fi
714 714
715 curl --user $user $curr_curl_cmd 715 curl --user $user $curr_curl_cmd
716 [ $? -eq 0 ] || { [ "$exitonerror" = 1 ] && exit 1 || return 1; } 716 [ $? -eq 0 ] || { [ "$exitonerror" = 1 ] && exit 1 || return 1; }
717 } 717 }
718 718
719 # function curl.ftp_command 719 # function curl.ftp_command
720 # execute an ftp command (creating a directory, renamig a file, 720 # execute an ftp command (creating a directory, renamig a file,
721 # deleting) using curl 721 # deleting) using curl
722 # 722 #
723 function curl.ftp_command() { 723 function curl.ftp_command() {
724 local ARGS 724 local ARGS
725 ARGS=`LC_ALL=C getopt \ 725 ARGS=`LC_ALL=C getopt \
726 -o l:o:p:u:a: \ 726 -o l:o:p:u:a: \
727 --long user:,options:,proxy:,proxy-user:,debug-unsecure,\ 727 --long user:,options:,proxy:,proxy-user:,debug-unsecure,\
728 action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \ 728 action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \
729 -n "$FUNCNAME" -- "$@"` 729 -n "$FUNCNAME" -- "$@"`
730 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 730 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
731 731
732 local user options proxy proxy_user ftp_passive 732 local user options proxy proxy_user ftp_passive
733 local action directory fromfile tofile deletefile 733 local action directory fromfile tofile deletefile
734 local exitonerror=0 734 local exitonerror=0
735 735
736 eval set -- "$ARGS" 736 eval set -- "$ARGS"
737 while :; do 737 while :; do
738 case "$1" in 738 case "$1" in
739 -l|--user) 739 -l|--user)
740 user="$2"; shift 740 user="$2"; shift
741 #notify.debug "$FUNCNAME: user = \"$user\"" 741 #notify.debug "$FUNCNAME: user = \"$user\""
742 ;; 742 ;;
743 -o|--options) 743 -o|--options)
744 options="$2"; shift 744 options="$2"; shift
745 #notify.debug "$FUNCNAME: options = \"$options\"" 745 #notify.debug "$FUNCNAME: options = \"$options\""
746 ;; 746 ;;
747 -p|--proxy) 747 -p|--proxy)
748 proxy="$2"; shift 748 proxy="$2"; shift
749 #notify.debug "$FUNCNAME: proxy = \"$proxy\"" 749 #notify.debug "$FUNCNAME: proxy = \"$proxy\""
750 ;; 750 ;;
751 -u|--proxy-user) 751 -u|--proxy-user)
752 proxy_user="$2"; shift 752 proxy_user="$2"; shift
753 #notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" 753 #notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
754 ;; 754 ;;
755 --debug-unsecure) 755 --debug-unsecure)
756 debug_unsecure="1" 756 debug_unsecure="1"
757 ;; 757 ;;
758 -a|--action) 758 -a|--action)
759 action="$2"; shift 759 action="$2"; shift
760 ;; 760 ;;
761 --directory) 761 --directory)
762 directory="$2"; shift 762 directory="$2"; shift
763 ;; 763 ;;
764 --rename-from) 764 --rename-from)
765 fromfile="$2"; shift 765 fromfile="$2"; shift
766 ;; 766 ;;
767 --rename-to) 767 --rename-to)
768 tofile="$2"; shift 768 tofile="$2"; shift
769 ;; 769 ;;
770 --delete) 770 --delete)
771 deletefile="$2"; shift 771 deletefile="$2"; shift
772 ;; 772 ;;
773 --ftp-passive) 773 --ftp-passive)
774 ftp_passive="--ftp-pasv" 774 ftp_passive="--ftp-pasv"
775 ;; 775 ;;
776 -x|--exit-on-err) 776 -x|--exit-on-err)
777 exitonerror="1" 777 exitonerror="1"
778 ;; 778 ;;
779 --) shift; break;; 779 --) shift; break;;
780 *) notify.error $"\ 780 *) notify.error $"\
781 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; 781 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
782 esac 782 esac
783 shift 783 shift
784 done 784 done
785 785
786 local backup_ftp_server="$1" 786 local backup_ftp_server="$1"
787 [ "$backup_ftp_server" ] || notify.error $"\ 787 [ "$backup_ftp_server" ] || notify.error $"\
788 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 788 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
789 789
790 [ "$ftp_passive" ] && options="$options $ftp_passive" 790 [ "$ftp_passive" ] && options="$options $ftp_passive"
791 791
792 # NOTE: see RFC959 for the sintax of the 'quote' commands 792 # NOTE: see RFC959 for the sintax of the 'quote' commands
793 # curl --ftp-pasv --user user:password \ 793 # curl --ftp-pasv --user user:password \
794 # -Q "MKD /devel/old/prova.dir" \ 794 # -Q "MKD /devel/old/prova.dir" \
795 # -Q "RNFR /devel/old/prova.tmp" \ 795 # -Q "RNFR /devel/old/prova.tmp" \
796 # -Q "RNTO /devel/old/prova.dir/prova.tmp" ftp.linuxdistro.org 796 # -Q "RNTO /devel/old/prova.dir/prova.tmp" ftp.linuxdistro.org
797 case "$action" in 797 case "$action" in
798 mkdir) 798 mkdir)
799 [ "$directory" ] || notify.error $"\ 799 [ "$directory" ] || notify.error $"\
800 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--directory)" 800 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--directory)"
801 notify.debug "\ 801 notify.debug "\
802 curl $options --user \"***:***\" --quote \"MKD $directory\" $1" 802 curl $options --user \"***:***\" --quote \"MKD $directory\" $1"
803 803
804 curl $options --user "$user" --quote "MKD $directory" $1 &>/dev/null 804 curl $options --user "$user" --quote "MKD $directory" $1 &>/dev/null
805 ;; 805 ;;
806 rename-file) 806 rename-file)
807 [ "$fromfile" ] || notify.error $"\ 807 [ "$fromfile" ] || notify.error $"\
808 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-from)" 808 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-from)"
809 [ "$tofile" ] || notify.error $"\ 809 [ "$tofile" ] || notify.error $"\
810 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-to)" 810 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-to)"
811 notify.debug "curl $options --user \"***:***\"\ 811 notify.debug "curl $options --user \"***:***\"\
812 --quote \"RNFR $fromfile\" --quote \"RNTO $tofile\" $1" 812 --quote \"RNFR $fromfile\" --quote \"RNTO $tofile\" $1"
813 813
814 curl $options --user "$user" \ 814 curl $options --user "$user" \
815 --quote "RNFR $fromfile" --quote "RNTO $tofile" $1 &>/dev/null 815 --quote "RNFR $fromfile" --quote "RNTO $tofile" $1 &>/dev/null
816 ;; 816 ;;
817 delete) 817 delete)
818 [ "$deletefile" ] || notify.error $"\ 818 [ "$deletefile" ] || notify.error $"\
819 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--delete)" 819 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--delete)"
820 820
821 # example: 821 # example:
822 # curl -v --ftp-pasv --user "$user" \ 822 # curl -v --ftp-pasv --user "$user" \
823 # --quote "CWD SRPMS.base" \ 823 # --quote "CWD SRPMS.base" \
824 # --quote "DELE filename-0.0.1-1distro.src.rpm" \ 824 # --quote "DELE filename-0.0.1-1distro.src.rpm" \
825 # ftp://ftpaccounts.openmamba.org 825 # ftp://ftpaccounts.openmamba.org
826 # -or- 826 # -or-
827 # curl -v --ftp-pasv --user "$user" \ 827 # curl -v --ftp-pasv --user "$user" \
828 # --quote "DELE SRPMS.base/filename-0.0.1-1distro.src.rpm" \ 828 # --quote "DELE SRPMS.base/filename-0.0.1-1distro.src.rpm" \
829 # ftp://ftpaccounts.openmamba.org 829 # ftp://ftpaccounts.openmamba.org
830 notify.debug "\ 830 notify.debug "\
831 curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1" 831 curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
832 curl $options --user "$user" --quote "DELE $deletefile" $1 &>/dev/null 832 curl $options --user "$user" --quote "DELE $deletefile" $1 &>/dev/null
833 ;; 833 ;;
834 *) notify.error $"\ 834 *) notify.error $"\
835 (bug)"" -- $FUNCNAME: "$"unknown action"": ($action)" 835 (bug)"" -- $FUNCNAME: "$"unknown action"": ($action)"
836 esac 836 esac
837 retval=$? 837 retval=$?
838 838
839 case "$retval" in 839 case "$retval" in
840 0) ;; 840 0) ;;
841 6) notify.warning $"couldn't resolve host" ;; 841 6) notify.warning $"couldn't resolve host" ;;
842 7) notify.warning $"failed to connect to host" ;; 842 7) notify.warning $"failed to connect to host" ;;
843 *) notify.warning $"curl error (exit code: $retval)" ;; 843 *) notify.warning $"curl error (exit code: $retval)" ;;
844 esac 844 esac
845 845
846 [[ "$retval" != "0" && "$exitonerror" = 1 ]] && exit 1 846 [[ "$retval" != "0" && "$exitonerror" = 1 ]] && exit 1
847 } 847 }
848 848
849 # function git.download 849 # function git.download
850 # helper for creating a tarball from a git repository 850 # helper for creating a tarball from a git repository
851 # args: 851 # args:
852 # -d, --destdir : target directory 852 # -d, --destdir : target directory
853 # -p, --proxy : proxy server 853 # -p, --proxy : proxy server
854 # -u, --proxy-user : proxy user 854 # -u, --proxy-user : proxy user
855 # $@ : git repository 855 # $@ : git repository
856 # 856 #
857 # return value: 857 # return value:
858 # 0 858 # 0
859 859
860 function git.download() { 860 function git.download() {
861 local ARGS 861 local ARGS
862 ARGS=`LC_ALL=C getopt \ 862 ARGS=`LC_ALL=C getopt \
863 -o d:v:p:u: \ 863 -o d:v:p:u: \
864 --long destdir:,pck-version:,proxy:,proxy-user: \ 864 --long destdir:,pck-version:,proxy:,proxy-user: \
865 -n "$FUNCNAME" -- "$@"` 865 -n "$FUNCNAME" -- "$@"`
866 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 866 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
867 867
868 local destdir 868 local destdir
869 local proxy proxy_user 869 local proxy proxy_user
870 local pck_version 870 local pck_version
871 871
872 eval set -- "$ARGS" 872 eval set -- "$ARGS"
873 while :; do 873 while :; do
874 case "$1" in 874 case "$1" in
875 -d|--destdir) 875 -d|--destdir)
876 destdir="$2"; shift 876 destdir="$2"; shift
877 notify.debug "$FUNCNAME: destdir = \"$destdir\"" 877 notify.debug "$FUNCNAME: destdir = \"$destdir\""
878 ;; 878 ;;
879 -v|--pck-version) 879 -v|--pck-version)
880 pck_version="$2"; shift 880 pck_version="$2"; shift
881 notify.debug "$FUNCNAME: pck_version = \"$pck_version\"" 881 notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
882 ;; 882 ;;
883 -p|--proxy) 883 -p|--proxy)
884 proxy="$2"; shift 884 proxy="$2"; shift
885 notify.debug "$FUNCNAME: proxy = \"$proxy\"" 885 notify.debug "$FUNCNAME: proxy = \"$proxy\""
886 ;; 886 ;;
887 -u|--proxy-user) 887 -u|--proxy-user)
888 proxy_user="$2"; shift 888 proxy_user="$2"; shift
889 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" 889 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
890 ;; 890 ;;
891 --) shift; break;; 891 --) shift; break;;
892 *) notify.error $"\ 892 *) notify.error $"\
893 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; 893 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
894 esac 894 esac
895 shift 895 shift
896 done 896 done
897 897
898 local giturl_and_branch="$1" 898 local giturl_and_branch="$1"
899 899
900 notify.debug "$FUNCNAME: giturl_and_branch = \"$giturl_and_branch\"" 900 notify.debug "$FUNCNAME: giturl_and_branch = \"$giturl_and_branch\""
901 [ "$giturl_and_branch" ] || notify.error $"\ 901 [ "$giturl_and_branch" ] || notify.error $"\
902 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 902 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
903 903
904 [ "$destdir" ] || notify.error $"\ 904 [ "$destdir" ] || notify.error $"\
905 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)" 905 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
906 906
907 local token_dirname="${giturl_and_branch%/*}" 907 local token_dirname="${giturl_and_branch%/*}"
908 local token_basename="${giturl_and_branch##*/}" 908 local token_basename="${giturl_and_branch##*/}"
909 notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\"" 909 notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\""
910 notify.debug "$FUNCNAME: token_basename = \"$token_basename\"" 910 notify.debug "$FUNCNAME: token_basename = \"$token_basename\""
911 911
912 local git_branch="${token_dirname/*\/}" 912 local git_branch="${token_dirname/*\/}"
913 notify.debug "$FUNCNAME: git_branch = \"$git_branch\"" 913 notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
914 914
915 git.create_tarball \ 915 git.create_tarball \
916 --pck-version "$pck_version" \ 916 --pck-version "$pck_version" \
917 --destdir "$destdir" \ 917 --destdir "$destdir" \
918 --preserve-dot-git "0" --git-branch "$git_branch" \ 918 --preserve-dot-git "0" --git-branch "$git_branch" \
919 "${token_dirname/\/$git_branch*}" 919 "${token_dirname/\/$git_branch*}"
920 } 920 }
921 921
922 # function git.create_tarball 922 # function git.create_tarball
923 # clone a git repository and convert is into a tarball file 923 # clone a git repository and convert is into a tarball file
924 # 924 #
925 # args: 925 # args:
926 # -d,--destdir : target directory 926 # -d,--destdir : target directory
927 # -v,--pck-version : package version 927 # -v,--pck-version : package version
928 # --git-branch : git branch 928 # --git-branch : git branch
929 # --preserve-dot-git : do not remove .git files 929 # --preserve-dot-git : do not remove .git files
930 # $@ : git repository 930 # $@ : git repository
931 # 931 #
932 # return value: 932 # return value:
933 # 0 933 # 0
934 # 934 #
935 # set: spec_source, spec_source_comment, pck_tarball 935 # set: spec_source, spec_source_comment, pck_tarball
936 936
937 function git.create_tarball() { 937 function git.create_tarball() {
938 local ARGS 938 local ARGS
939 ARGS=`LC_ALL=C getopt -o d:v:p:u: \ 939 ARGS=`LC_ALL=C getopt -o d:v:p:u: \
940 --long destdir:,pck-version:,git-branch:,preserve-dot-git:,proxy:,proxy-user:\ 940 --long destdir:,pck-version:,git-branch:,preserve-dot-git:,proxy:,proxy-user:\
941 -n "$FUNCNAME" -- "$@"` 941 -n "$FUNCNAME" -- "$@"`
942 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" 942 [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
943 943
944 local destdir 944 local destdir
945 # FIXME: add support for proxy 945 # FIXME: add support for proxy
946 # HINT: git config --global http.proxy http://user:pwd@proxy.srv.com:port 946 # HINT: git config --global http.proxy http://user:pwd@proxy.srv.com:port
947 # see: http://bardofschool.blogspot.fr/2008/11/use-git-behind-proxy.html 947 # see: http://bardofschool.blogspot.fr/2008/11/use-git-behind-proxy.html
948 local proxy proxy_user 948 local proxy proxy_user
949 local git_branch 949 local git_branch
950 local git_commit
950 local preserve_dot_git=0 951 local preserve_dot_git=0
951 local pck_version 952 local pck_version
952 953
953 eval set -- "$ARGS" 954 eval set -- "$ARGS"
954 while :; do 955 while :; do
955 case "$1" in 956 case "$1" in
956 -d|--destdir) 957 -d|--destdir)
957 destdir="$2"; shift 958 destdir="$2"; shift
958 notify.debug "$FUNCNAME: destdir = \"$destdir\"" 959 notify.debug "$FUNCNAME: destdir = \"$destdir\""
959 ;; 960 ;;
960 -v|--pck-version) 961 -v|--pck-version)
961 pck_version="$2"; shift 962 pck_version="$2"; shift
962 notify.debug "$FUNCNAME: pck_version = \"$pck_version\"" 963 notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
963 ;; 964 ;;
964 --git-branch) 965 --git-branch)
965 git_branch="$2"; shift 966 git_branch="$2"; shift
967 if [ "${git_branch/@*}" != "${git_branch}" ]; then
968 git_commit="${git_branch/*@}"
969 git_branch="${git_branch/@*}"
970 fi
966 notify.debug "$FUNCNAME: git_branch = \"$git_branch\"" 971 notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
972 if [ "${git_commit}" ]; then
973 notify.debug "$FUNCNAME: git_commit = \"$git_commit\""
974 fi
967 ;; 975 ;;
968 --preserve-dot-git) 976 --preserve-dot-git)
969 preserve_dot_git="$2"; shift 977 preserve_dot_git="$2"; shift
970 notify.debug "$FUNCNAME: preserve_dot_git = \"$preserve_dot_git\"" 978 notify.debug "$FUNCNAME: preserve_dot_git = \"$preserve_dot_git\""
971 ;; 979 ;;
972 -p|--proxy) 980 -p|--proxy)
973 proxy="$2"; shift 981 proxy="$2"; shift
974 notify.debug "$FUNCNAME: proxy = \"$proxy\"" 982 notify.debug "$FUNCNAME: proxy = \"$proxy\""
975 ;; 983 ;;
976 -u|--proxy-user) 984 -u|--proxy-user)
977 proxy_user="$2"; shift 985 proxy_user="$2"; shift
978 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" 986 notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
979 ;; 987 ;;
980 --) shift; break;; 988 --) shift; break;;
981 *) notify.error $"\ 989 *) notify.error $"\
982 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; 990 (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
983 esac 991 esac
984 shift 992 shift
985 done 993 done
986 994
987 local git_repository="$1" 995 local git_repository="$1"
988 notify.debug "$FUNCNAME: git_repository = \"$git_repository\"" 996 notify.debug "$FUNCNAME: git_repository = \"$git_repository\""
989 [ "$git_repository" ] || notify.error $"\ 997 [ "$git_repository" ] || notify.error $"\
990 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)" 998 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
991 999
992 [ "$destdir" ] || notify.error $"\ 1000 [ "$destdir" ] || notify.error $"\
993 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)" 1001 (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
994 1002
995 local today="$(date "+%Y%m%d")" 1003 local today="$(date "+%Y%m%d")"
996 if [ "$pck_version" ]; then 1004 if [ "$pck_version" ]; then
997 [ "$pck_version" = "${today}git" ] || notify.warning "\ 1005 [ "$pck_version" = "${today}git" ] || notify.warning "\
998 ${NOTE}${pck_version}${NORM}: "$"\ 1006 ${NOTE}${pck_version}${NORM}: "$"\
999 not the expected package version"" (${NOTE}${today}git${NORM})..." 1007 not the expected package version"" (${NOTE}${today}git${NORM})..."
1000 else 1008 else
1001 pck_version="${today}git" 1009 pck_version="${today}git"
1002 notify.debug "$FUNCNAME: pck_version = \"$pck_version\"" 1010 notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
1003 fi 1011 fi
1004 1012
1005 type -p git &>/dev/null || 1013 type -p git &>/dev/null ||
1006 notify.error $"utility not found"": \`git'" 1014 notify.error $"utility not found"": \`git'"
1007 1015
1008 local tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX) 1016 local tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
1009 [ $? -eq 0 ] || 1017 [ $? -eq 0 ] ||
1010 notify.error $"can't create temporary files" 1018 notify.error $"can't create temporary files"
1011 notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir" 1019 notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir"
1012 1020
1013 pushd $tmpgitdir &>/dev/null 1021 pushd $tmpgitdir &>/dev/null
1014 1022
1015 # create a tarball by cloning the git repository 1023 # create a tarball by cloning the git repository
1016 notify.note \ 1024 notify.note \
1017 "${NOTE}"$"cloning git repository""\ 1025 "${NOTE}"$"cloning git repository""\
1018 <$git_repository> ${git_branch:+($git_branch)}${NORM}""..." 1026 <$git_repository> ${git_branch:+($git_branch)}${NORM}""..."
1019 if [ "$preserve_dot_git" = "0" -a "${git_repository:0:4}" != "http" ]; then 1027 if [ "$preserve_dot_git" = "0" -a "${git_repository:0:4}" != "http" -a ! "${git_commit}" ]; then
1020 notify.debug "$FUNCNAME: git clone --recursive --depth=1 ${git_branch:+-b $git_branch} \"$git_repository\"" 1028 notify.debug "$FUNCNAME: git clone --recursive --depth=1 ${git_branch:+-b $git_branch} \"$git_repository\""
1021 git clone --recursive --depth=1 ${git_branch:+-b $git_branch} "$git_repository" 1029 git clone --recursive --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
1022 else 1030 else
1023 notify.debug "$FUNCNAME: git clone --recursive ${git_branch:+-b $git_branch} \"$git_repository\"" 1031 notify.debug "$FUNCNAME: git clone --recursive ${git_branch:+-b $git_branch} \"$git_repository\""
1024 git clone --recursive ${git_branch:+-b $git_branch} "$git_repository" 1032 git clone --recursive ${git_branch:+-b $git_branch} "$git_repository"
1025 fi 1033 fi
1026 [ $? -eq 0 ] || 1034 [ $? -eq 0 ] ||
1027 { popd &>/dev/null 1035 { popd &>/dev/null
1028 rm -fr $tmpgitdir 1036 rm -fr $tmpgitdir
1029 notify.error $"cannot clone git repository"; } 1037 notify.error $"cannot clone git repository"; }
1030 1038
1031 pck_tarball="$(find -mindepth 1 -maxdepth 1 -type d -printf "%f")" 1039 pck_tarball="$(find -mindepth 1 -maxdepth 1 -type d -printf "%f")"
1040
1041 if [ "${git_commit}" ]; then
1042 cd ${pck_tarball}
1043 git checkout ${git_commit}
1044 cd ..
1045 fi
1032 1046
1033 if [ "$preserve_dot_git" = "0" ]; then 1047 if [ "$preserve_dot_git" = "0" ]; then
1034 # remove git files 1048 # remove git files
1035 rm -fr $pck_tarball/.git 1049 rm -fr $pck_tarball/.git
1036 rm -f $pck_tarball/.gitignore 1050 rm -f $pck_tarball/.gitignore
1037 rm -f $pck_tarball/.gitmodules 1051 rm -f $pck_tarball/.gitmodules
1038 fi 1052 fi
1039 1053
1040 mv $pck_tarball ${pck_tarball}-${pck_version} 1054 mv $pck_tarball ${pck_tarball}-${pck_version}
1041 pck_tarball="${pck_tarball}-${pck_version}" 1055 pck_tarball="${pck_tarball}-${pck_version}"
1042 1056
1043 # create a compressed tarball 1057 # create a compressed tarball
1044 # FIXME: why bzip2? The compression tool used here should be configurable 1058 # FIXME: why bzip2? The compression tool used here should be configurable
1045 notify.note "${NOTE}"$"creating the compressed source tarball""${NORM}..." 1059 notify.note "${NOTE}"$"creating the compressed source tarball""${NORM}..."
1046 tar -cvf ${pck_tarball}.tar $pck_tarball/ >/dev/null && 1060 tar -cvf ${pck_tarball}.tar $pck_tarball/ >/dev/null &&
1047 bzip2 ${pck_tarball}.tar && 1061 bzip2 ${pck_tarball}.tar &&
1048 mv ${pck_tarball}.tar.bz2 $destdir/ 1062 mv ${pck_tarball}.tar.bz2 $destdir/
1049 if [ $? -eq 0 ]; then 1063 if [ $? -eq 0 ]; then
1050 notify.note "\ 1064 notify.note "\
1051 ...${NOTE}"$"done""${NORM}: \`${NOTE}${pck_tarball}.tar.bz2${NORM}'" 1065 ...${NOTE}"$"done""${NORM}: \`${NOTE}${pck_tarball}.tar.bz2${NORM}'"
1052 else 1066 else
1053 popd &>/dev/null 1067 popd &>/dev/null
1054 rm -fr $tmpgitdir 1068 rm -fr $tmpgitdir
1055 notify.error $"\ 1069 notify.error $"\
1056 an error occurred while creating"": ${pck_tarball}.tar.bz2" 1070 an error occurred while creating"": ${pck_tarball}.tar.bz2"
1057 fi 1071 fi
1058 1072
1059 spec_source="${pck_tarball}.tar.bz2" 1073 spec_source="${pck_tarball}.tar.bz2"
1060 notify.debug "$FUNCNAME: spec_source = $spec_source" 1074 notify.debug "$FUNCNAME: spec_source = $spec_source"
1061 spec_source_comment="\ 1075 spec_source_comment="\
1062 ## GITSOURCE $git_repository${git_branch:+ $git_branch}" 1076 ## GITSOURCE $git_repository${git_branch:+ $git_branch}"
1063 notify.debug "$FUNCNAME: spec_source_comment = \"$spec_source_comment\"" 1077 notify.debug "$FUNCNAME: spec_source_comment = \"$spec_source_comment\""
1064 pck_tarball="$destdir/${spec_source}" 1078 pck_tarball="$destdir/${spec_source}"
1065 notify.debug "$FUNCNAME: pck_tarball = $pck_tarball" 1079 notify.debug "$FUNCNAME: pck_tarball = $pck_tarball"
1066 1080
1067 popd &>/dev/null 1081 popd &>/dev/null
1068 rm -fr $tmpgitdir 1082 rm -fr $tmpgitdir
1069 1083
1070 return 0 1084 return 0
1071 } 1085 }
1072 1086
1073 } # endif $libnetwork_is_loaded 1087 } # endif $libnetwork_is_loaded
1074 1088
plugins/spec-create.in
1 #!/bin/bash 1 #!/bin/bash
2 # pck-create -- plugin for @package@ 2 # pck-create -- plugin for @package@
3 # Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com> 3 # Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
4 4
5 [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] && 5 [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
6 { echo $"this script requires bash version 3 or better" >&2 && exit 1; } 6 { echo $"this script requires bash version 3 or better" >&2 && exit 1; }
7 7
8 me=(${0##*/} "@version@" "@date@") 8 me=(${0##*/} "@version@" "@date@")
9 9
10 [ -r @libdir@/libmsgmng.lib ] || 10 [ -r @libdir@/libmsgmng.lib ] ||
11 { echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2 11 { echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
12 exit 1; } 12 exit 1; }
13 . @libdir@/libmsgmng.lib 13 . @libdir@/libmsgmng.lib
14 14
15 [ -r @libdir@/libnetwork.lib ] || 15 [ -r @libdir@/libnetwork.lib ] ||
16 { echo "$me: "$"library not found"": @libdir@/libnetwork.lib" 1>&2 16 { echo "$me: "$"library not found"": @libdir@/libnetwork.lib" 1>&2
17 exit 1; } 17 exit 1; }
18 . @libdir@/libnetwork.lib 18 . @libdir@/libnetwork.lib
19 19
20 # set default variables 20 # set default variables
21 # output verbosity 21 # output verbosity
22 let "verbose = 1" 22 let "verbose = 1"
23 23
24 spec_type=standard 24 spec_type=standard
25 spec_first_release=1 25 spec_first_release=1
26 spec_run_ldconfig="/sbin/ldconfig" 26 spec_run_ldconfig="/sbin/ldconfig"
27 spec_changelog_date="$(LC_ALL="C" date "+%a %b %d %Y")" 27 spec_changelog_date="$(LC_ALL="C" date "+%a %b %d %Y")"
28 spec_changelog_comment="package created by @package@" 28 spec_changelog_comment="package created by @package@"
29 29
30 spec_default_summary="..." 30 spec_default_summary="..."
31 spec_default_group="..." 31 spec_default_group="..."
32 spec_default_url="..." 32 spec_default_url="..."
33 spec_default_license="..." 33 spec_default_license="..."
34 spec_default_source="..." 34 spec_default_source="..."
35 spec_default_description="..." 35 spec_default_description="..."
36 spec_default_description_devel="..." 36 spec_default_description_devel="..."
37 spec_setup_macro= 37 spec_setup_macro=
38 38
39 spec_cmd_configure_autotools="%configure" 39 spec_cmd_configure_autotools="%configure"
40 spec_cmd_make_autotools="%make" 40 spec_cmd_make_autotools="%make"
41 spec_cmd_makeinstall_autotools="%makeinstall" 41 spec_cmd_makeinstall_autotools="%makeinstall"
42 42
43 spec_cmd_configure_autogen="./autogen.sh\n%configure" 43 spec_cmd_configure_autogen="./autogen.sh\n%configure"
44 spec_cmd_make_autogen="%make" 44 spec_cmd_make_autogen="%make"
45 spec_cmd_makeinstall_autogen="%makeinstall" 45 spec_cmd_makeinstall_autogen="%makeinstall"
46 46
47 spec_cmd_configure_cmake="%cmake -d build" 47 spec_cmd_configure_cmake="%cmake -d build"
48 spec_cmd_make_cmake="%make" 48 spec_cmd_make_cmake="%make"
49 spec_cmd_makeinstall_cmake="%makeinstall -C build" 49 spec_cmd_makeinstall_cmake="%makeinstall -C build"
50 50
51 spec_cmd_configure_scons="" 51 spec_cmd_configure_scons=""
52 spec_cmd_make_scons="scons" 52 spec_cmd_make_scons="scons"
53 spec_cmd_makeinstall_scons="scons install DESTDIR=%{buildroot}/<ADDME>" 53 spec_cmd_makeinstall_scons="scons install DESTDIR=%{buildroot}/<ADDME>"
54 54
55 spec_cmd_configure_makefileonly="" 55 spec_cmd_configure_makefileonly=""
56 spec_cmd_make_makefileonly="%make" 56 spec_cmd_make_makefileonly="%make"
57 spec_cmd_makeinstall_makefileonly="%makeinstall" 57 spec_cmd_makeinstall_makefileonly="%makeinstall"
58 58
59 spec_cmd_configure_default="" 59 spec_cmd_configure_default=""
60 spec_cmd_make_default="" 60 spec_cmd_make_default=""
61 spec_cmd_makeinstall_default="" 61 spec_cmd_makeinstall_default=""
62 62
63 [ "$perl_Makefile_generator" ] || perl_Makefile_generator="Makefile.PL" 63 [ "$perl_Makefile_generator" ] || perl_Makefile_generator="Makefile.PL"
64 64
65 preserve_dot_git=0 65 preserve_dot_git=0
66 66
67 # load the configuration file(s) 67 # load the configuration file(s)
68 [ -r @libdir@/libcfg.lib ] || 68 [ -r @libdir@/libcfg.lib ] ||
69 { echo "$me: "$"library not found"": @libdir@/libcfg.lib" 1>&2 69 { echo "$me: "$"library not found"": @libdir@/libcfg.lib" 1>&2
70 exit 1; } 70 exit 1; }
71 . @libdir@/libcfg.lib 71 . @libdir@/libcfg.lib
72 72
73 [ -r @libdir@/libtranslate.lib ] || 73 [ -r @libdir@/libtranslate.lib ] ||
74 { echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2 74 { echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
75 exit 1; } 75 exit 1; }
76 . @libdir@/libtranslate.lib 76 . @libdir@/libtranslate.lib
77 77
78 function copying() { 78 function copying() {
79 echo "\ 79 echo "\
80 "$"This program is free software; you can redistribute it and/or modify it under 80 "$"This program is free software; you can redistribute it and/or modify it under
81 the terms of the GNU General Public License version 2 as published by the 81 the terms of the GNU General Public License version 2 as published by the
82 Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY 82 Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY
83 or FITNESS FOR A PARTICULAR PURPOSE." 83 or FITNESS FOR A PARTICULAR PURPOSE."
84 } 84 }
85 85
86 function version() { 86 function version() {
87 echo "\ 87 echo "\
88 ${me[0]} ${me[1]} 88 ${me[0]} ${me[1]}
89 Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>" 89 Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>"
90 } 90 }
91 91
92 # $1: optional exit code (default is '1') 92 # $1: optional exit code (default is '1')
93 function usage() { 93 function usage() {
94 version 94 version
95 echo "\ 95 echo "\
96 "$"Try to create a specfile for the specified source archive"". 96 "$"Try to create a specfile for the specified source archive"".
97 97
98 "$"Usage"": 98 "$"Usage"":
99 @frontend@ -s <source-archive> [-n <name>] [-v <ver>] [-t <type>] \\ 99 @frontend@ -s <source-archive> [-n <name>] [-v <ver>] [-t <type>] \\
100 [-o <outfile>] [--changelog \""$"message""\"] [<"$"git-opts"">] \\ 100 [-o <outfile>] [--changelog \""$"message""\"] [<"$"git-opts"">] \\
101 [--packager-fullname \"Full Name\" ] [--packager-email \"email@domain\" ] \\ 101 [--packager-fullname \"Full Name\" ] [--packager-email \"email@domain\" ] \\
102 [-C <conf_file>] 102 [-C <conf_file>]
103 103
104 "$"where the above options mean"": 104 "$"where the above options mean"":
105 -s, --source "$"Try to create a specfile for the specified source archive"" 105 -s, --source "$"Try to create a specfile for the specified source archive""
106 -n, --pck-name "$"Name of the package (default: taken from <source-archive> name)"" 106 -n, --pck-name "$"Name of the package (default: taken from <source-archive> name)""
107 -v, --pck-version "$"Version of the package (default: taken from <source-archive> name)"" 107 -v, --pck-version "$"Version of the package (default: taken from <source-archive> name)""
108 -t, --type "$"Typology of the specfile to be created"" 108 -t, --type "$"Typology of the specfile to be created""
109 standard : "$"standard specfile (default)"" 109 standard : "$"standard specfile (default)""
110 ghc : "$"specfile for ghc packages"" 110 ghc : "$"specfile for ghc packages""
111 gnome : "$"specfile for gnome packages"" 111 gnome : "$"specfile for gnome packages""
112 kde3 : "$"specfile for kde3 packages"" 112 kde3 : "$"specfile for kde3 packages""
113 kde4 : "$"specfile for kde4 packages"" 113 kde4 : "$"specfile for kde4 packages""
114 kde5 : "$"specfile for kde5 packages"" 114 kde5 : "$"specfile for kde5 packages""
115 library : "$"specfile for common library packages"" 115 library : "$"specfile for common library packages""
116 ocaml-libs : "$"specfile for OCaml library packages"" 116 ocaml-libs : "$"specfile for OCaml library packages""
117 perl : "$"specfile for single-package perl modules"" 117 perl : "$"specfile for single-package perl modules""
118 python : "$"specfile for python modules"" 118 python : "$"specfile for python modules""
119 standard-daemon : "$"standard specfile for system/network services"" 119 standard-daemon : "$"standard specfile for system/network services""
120 web : "$"specfile for web packages"" 120 web : "$"specfile for web packages""
121 -o, --output "$"Redirect the output to the file <outfile>"" 121 -o, --output "$"Redirect the output to the file <outfile>""
122 --changelog "$"Set change information for the package"" 122 --changelog "$"Set change information for the package""
123 --packager-fullname 123 --packager-fullname
124 "$"Override packager full name"" 124 "$"Override packager full name""
125 --packager-email 125 --packager-email
126 "$"Override packager email"" 126 "$"Override packager email""
127 --git-branch "$"Specify a git branch"" 127 --git-branch "$"Specify a git branch or tag and (optionally) a commit by appending @commit_id""
128 --preserve-dot-git "$"Do not remove git files"" 128 --preserve-dot-git "$"Do not remove git files""
129 --colors "$"Select the theme to be used for the colorized output"" 129 --colors "$"Select the theme to be used for the colorized output""
130 -C, --config "$"Use an alternate user configuration file"" <conf_file>"" 130 -C, --config "$"Use an alternate user configuration file"" <conf_file>""
131 "$"Default files:"" $default_cfg_strlist"" 131 "$"Default files:"" $default_cfg_strlist""
132 "$"Default user files:"" $default_cfg_user_strlist"" 132 "$"Default user files:"" $default_cfg_user_strlist""
133 133
134 "$"Operation modes"": 134 "$"Operation modes"":
135 -h, --help "$"Print this help, then exit"" 135 -h, --help "$"Print this help, then exit""
136 -V, --version "$"Print version number, then exit"" 136 -V, --version "$"Print version number, then exit""
137 -q, --quiet "$"Run in quiet mode"" 137 -q, --quiet "$"Run in quiet mode""
138 -D, --debug "$"Run in debugging mode (very verbose output)"" 138 -D, --debug "$"Run in debugging mode (very verbose output)""
139 139
140 "$"Samples"": 140 "$"Samples"":
141 @frontend@ -s ~/software/@package@-@version@.tar.bz2 -t standard -o @package@.spec 141 @frontend@ -s ~/software/@package@-@version@.tar.bz2 -t standard -o @package@.spec
142 @frontend@ -s http://ftp.qilinux.it/devel/tools/@package@/@package@-@version@.tar.bz2 142 @frontend@ -s http://ftp.qilinux.it/devel/tools/@package@/@package@-@version@.tar.bz2
143 @frontend@ -s @package@-@version@.tar.bz2 --changelog \"First build\" 143 @frontend@ -s @package@-@version@.tar.bz2 --changelog \"First build\"
144 @frontend@ -s git://anongit.freedesktop.org/gstreamer/gst-omx \\ 144 @frontend@ -s git://anongit.freedesktop.org/gstreamer/gst-omx \\
145 --git-branch=\"raspberry\" --preserve-dot-git -o gst-omx.spec 145 --git-branch=\"raspberry\" --preserve-dot-git -o gst-omx.spec
146 146
147 "$"Report bugs to <davide.madrisan@gmail.com>." 147 "$"Report bugs to <davide.madrisan@gmail.com>."
148 148
149 exit ${1:-1} 149 exit ${1:-1}
150 } 150 }
151 151
152 case $1 in 152 case $1 in
153 --autospec-args-file*) 153 --autospec-args-file*)
154 if [[ "$1" =~ = ]]; then 154 if [[ "$1" =~ = ]]; then
155 argsfile=`echo $1 | sed 's/^--autospec-args-file=//'` 155 argsfile=`echo $1 | sed 's/^--autospec-args-file=//'`
156 else 156 else
157 argsfile=$2 157 argsfile=$2
158 fi 158 fi
159 [ -r "$argsfile" ] || notify.error $"cannot read"": \`$argsfile'" 159 [ -r "$argsfile" ] || notify.error $"cannot read"": \`$argsfile'"
160 . $argsfile && rm -f $argsfile 160 . $argsfile && rm -f $argsfile
161 ;; 161 ;;
162 esac 162 esac
163 163
164 for arg in $@; do 164 for arg in $@; do
165 case $arg in 165 case $arg in
166 -h|--help) usage 0 ;; 166 -h|--help) usage 0 ;;
167 -V|--version) version; echo; copying; exit 0 ;; 167 -V|--version) version; echo; copying; exit 0 ;;
168 esac 168 esac
169 done 169 done
170 170
171 # the user configuration file for @package@ is required 171 # the user configuration file for @package@ is required
172 config.check4user 172 config.check4user
173 173
174 exec_options=`LC_ALL=C getopt \ 174 exec_options=`LC_ALL=C getopt \
175 -o s:n:v:t:o:C:DqrhV \ 175 -o s:n:v:t:o:C:DqrhV \
176 --long \ 176 --long \
177 source:,pck-name:,pck-version:,type:,output:,changelog:,\ 177 source:,pck-name:,pck-version:,type:,output:,changelog:,\
178 packager-fullname:,packager-email:,\ 178 packager-fullname:,packager-email:,\
179 git-branch:,preserve-dot-git,\ 179 git-branch:,preserve-dot-git,\
180 colors:,config:,debug,quiet,help,version,\ 180 colors:,config:,debug,quiet,help,version,\
181 frontend_opts: \ 181 frontend_opts: \
182 -n "$me" -- "$@"` 182 -n "$me" -- "$@"`
183 [ $? = 0 ] || exit 1 183 [ $? = 0 ] || exit 1
184 184
185 notify.debug "[ ${0} ${exec_options} ]\n" 185 notify.debug "[ ${0} ${exec_options} ]\n"
186 eval set -- "$exec_options" 186 eval set -- "$exec_options"
187 187
188 cmdline_vars=() 188 cmdline_vars=()
189 189
190 while :; do 190 while :; do
191 case $1 in 191 case $1 in
192 -s|--source) 192 -s|--source)
193 [ "$2" = "--help" ] && usage 0 193 [ "$2" = "--help" ] && usage 0
194 [ "$2" = "-h" ] && usage 0 194 [ "$2" = "-h" ] && usage 0
195 pck_tarball=$2; shift 195 pck_tarball=$2; shift
196 ;; 196 ;;
197 -n|--pck-name) 197 -n|--pck-name)
198 pck_name=$2; shift ;; 198 pck_name=$2; shift ;;
199 -v|--pck-version) 199 -v|--pck-version)
200 shift; pck_version=$1 ;; 200 shift; pck_version=$1 ;;
201 -t|--type) 201 -t|--type)
202 spec_type=$2; shift ;; 202 spec_type=$2; shift ;;
203 -o|--output) 203 -o|--output)
204 outfile=$2; shift ;; 204 outfile=$2; shift ;;
205 --changelog) 205 --changelog)
206 spec_changelog_comment="$2"; shift ;; 206 spec_changelog_comment="$2"; shift ;;
207 --packager-fullname) 207 --packager-fullname)
208 packager_fullname="$2"; shift 208 packager_fullname="$2"; shift
209 cmdline_vars[${#cmdline_vars[*]}]="packager_fullname=\"$packager_fullname\"" ;; 209 cmdline_vars[${#cmdline_vars[*]}]="packager_fullname=\"$packager_fullname\"" ;;
210 --packager-email) 210 --packager-email)
211 packager_email="$2"; shift 211 packager_email="$2"; shift
212 cmdline_vars[${#cmdline_vars[*]}]="packager_email=\"$packager_email\"" ;; 212 cmdline_vars[${#cmdline_vars[*]}]="packager_email=\"$packager_email\"" ;;
213 --git-branch) 213 --git-branch)
214 git_branch=$2; shift ;; 214 git_branch=$2; shift ;;
215 --preserve-dot-git) 215 --preserve-dot-git)
216 preserve_dot_git=1 ;; 216 preserve_dot_git=1 ;;
217 -D|--debug) 217 -D|--debug)
218 let "verbose = 2" ;; 218 let "verbose = 2" ;;
219 -q|--quiet) 219 -q|--quiet)
220 let "verbose = 0" ;; 220 let "verbose = 0" ;;
221 --colors) 221 --colors)
222 color_scheme="$2"; shift 222 color_scheme="$2"; shift
223 notify.debug "color_scheme = \"$color_scheme\"" 223 notify.debug "color_scheme = \"$color_scheme\""
224 cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\"" 224 cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\""
225 ;; 225 ;;
226 -C|--config) 226 -C|--config)
227 cfgfile_list_cmdline="$2"; shift 227 cfgfile_list_cmdline="$2"; shift
228 notify.debug "cfgfile_list_cmdline = \"$cfgfile_list_cmdline\"" 228 notify.debug "cfgfile_list_cmdline = \"$cfgfile_list_cmdline\""
229 cmdline_vars[${#cmdline_vars[*]}]="\ 229 cmdline_vars[${#cmdline_vars[*]}]="\
230 cfgfile_list_cmdline=\"$cfgfile_list_cmdline\"" 230 cfgfile_list_cmdline=\"$cfgfile_list_cmdline\""
231 ;; 231 ;;
232 -h|--help) 232 -h|--help)
233 usage 0 ;; 233 usage 0 ;;
234 -V|--version) 234 -V|--version)
235 version; echo; copying; exit 0 ;; 235 version; echo; copying; exit 0 ;;
236 --) shift; break ;; 236 --) shift; break ;;
237 *) notify.error $"unrecognized option"" -- \`$1'" ;; 237 *) notify.error $"unrecognized option"" -- \`$1'" ;;
238 esac 238 esac
239 shift 239 shift
240 done 240 done
241 241
242 for arg in $@; do 242 for arg in $@; do
243 notify.error $"unrecognized option"" -- \`$arg'" 243 notify.error $"unrecognized option"" -- \`$arg'"
244 done 244 done
245 245
246 cfg_load_files "$cfgfile_list_cmdline" 246 cfg_load_files "$cfgfile_list_cmdline"
247 247
248 # otherwrite the configuration variables by set them again using 248 # otherwrite the configuration variables by set them again using
249 # the values defined via the commanline options 249 # the values defined via the commanline options
250 for i in ${!cmdline_vars[@]}; do 250 for i in ${!cmdline_vars[@]}; do
251 notify.debug "eval \"${cmdline_vars[i]}\"" 251 notify.debug "eval \"${cmdline_vars[i]}\""
252 eval "${cmdline_vars[i]}" 252 eval "${cmdline_vars[i]}"
253 done 253 done
254 254
255 notify.enable_colors "$color_scheme" 255 notify.enable_colors "$color_scheme"
256 256
257 function specfile.ckeck_defvalues() { 257 function specfile.ckeck_defvalues() {
258 # $1: name of the specfile 258 # $1: name of the specfile
259 local specfile="$1" currvalue 259 local specfile="$1" currvalue
260 260
261 check_values=( 261 check_values=(
262 "Summary" spec_default_summary 262 "Summary" spec_default_summary
263 "Group" spec_default_group 263 "Group" spec_default_group
264 "URL" spec_default_url 264 "URL" spec_default_url
265 "Source" spec_default_source 265 "Source" spec_default_source
266 "License" spec_default_license 266 "License" spec_default_license
267 "%description" spec_default_description 267 "%description" spec_default_description
268 "%description devel" spec_default_description_devel 268 "%description devel" spec_default_description_devel
269 ) 269 )
270 270
271 for i in `seq 1 1 $(( ${#check_values[@]} / 2 ))`; do 271 for i in `seq 1 1 $(( ${#check_values[@]} / 2 ))`; do
272 id="${check_values[($i-1)*2]}" 272 id="${check_values[($i-1)*2]}"
273 value="${check_values[($i-1)*2+1]}" 273 value="${check_values[($i-1)*2+1]}"
274 case "$id" in 274 case "$id" in
275 # when id begins by a '%' character, the two lines below the id must 275 # when id begins by a '%' character, the two lines below the id must
276 # be taken into account (three lines: the line containing the id, the 276 # be taken into account (three lines: the line containing the id, the
277 # following one and the following (blank) line) 277 # following one and the following (blank) line)
278 %*) sed -n "/^$id$/,/^$/p" $specfile | sed 3q | grep -q "${!value}" 278 %*) sed -n "/^$id$/,/^$/p" $specfile | sed 3q | grep -q "${!value}"
279 [ $? -eq 0 ] && notify.warning $"\ 279 [ $? -eq 0 ] && notify.warning $"\
280 remember to modify the value for \`${NOTE}$id${NORM}'" ;; 280 remember to modify the value for \`${NOTE}$id${NORM}'" ;;
281 *) currvalue="\ 281 *) currvalue="\
282 $(sed -n "/%description/q;{/^[ \t]*$id[ \t]*:[ \t]*/{s,.*:[ \t]*,,p}}" $specfile)" 282 $(sed -n "/%description/q;{/^[ \t]*$id[ \t]*:[ \t]*/{s,.*:[ \t]*,,p}}" $specfile)"
283 notify.debug "[[ \"$currvalue\" =~ \"${!value}\" ]]" 283 notify.debug "[[ \"$currvalue\" =~ \"${!value}\" ]]"
284 [[ "$currvalue" =~ "${!value}" ]] && notify.warning $"\ 284 [[ "$currvalue" =~ "${!value}" ]] && notify.warning $"\
285 remember to modify the value for \`${NOTE}$id${NORM}'" ;; 285 remember to modify the value for \`${NOTE}$id${NORM}'" ;;
286 esac 286 esac
287 done 287 done
288 } 288 }
289 289
290 function template.expand() { 290 function template.expand() {
291 local OPTIONS=`LC_ALL=C getopt \ 291 local OPTIONS=`LC_ALL=C getopt \
292 -o t:T:n:v:s:l:S:b: \ 292 -o t:T:n:v:s:l:S:b: \
293 --long template:,type:,pckname:,pckversion:,setupmacro:,summary:,license:,\ 293 --long template:,type:,pckname:,pckversion:,setupmacro:,summary:,license:,\
294 source:,source-comment:,standard-docs:,standard-docs-devel:,\ 294 source:,source-comment:,standard-docs:,standard-docs-devel:,\
295 build-technology:,i18n:,icons-mimetypes:,infopages:,manpages:,\ 295 build-technology:,i18n:,icons-mimetypes:,infopages:,manpages:,\
296 pck-devel:,pck-library:,pck-apidocs:,pck-tools:,\ 296 pck-devel:,pck-library:,pck-apidocs:,pck-tools:,\
297 shared-libraries:,debug-package:,\ 297 shared-libraries:,debug-package:,\
298 -n "${0}" -- "$@"` 298 -n "${0}" -- "$@"`
299 [ $? = 0 ] || exit 1 299 [ $? = 0 ] || exit 1
300 300
301 notify.debug "$FUNCNAME: ${OPTIONS}" 301 notify.debug "$FUNCNAME: ${OPTIONS}"
302 eval set -- "${OPTIONS}" 302 eval set -- "${OPTIONS}"
303 303
304 local templatefile spec_type 304 local templatefile spec_type
305 local pck_name pck_version 305 local pck_name pck_version
306 local pck_name_devel 306 local pck_name_devel
307 local pck_name_tools 307 local pck_name_tools
308 local pck_name_apidocs 308 local pck_name_apidocs
309 local spec_setup_macro 309 local spec_setup_macro
310 local spec_summary="$spec_default_summary" 310 local spec_summary="$spec_default_summary"
311 local spec_license="$spec_default_license" 311 local spec_license="$spec_default_license"
312 local spec_source 312 local spec_source
313 local spec_source_comment 313 local spec_source_comment
314 local standard_docs 314 local standard_docs
315 local standard_docs_devel 315 local standard_docs_devel
316 local build_technology 316 local build_technology
317 local buildrequires_buildtool 317 local buildrequires_buildtool
318 318
319 local i18n="0" 319 local i18n="0"
320 local icons_mimetypes="0" 320 local icons_mimetypes="0"
321 local infopages="0" 321 local infopages="0"
322 local manpages="0" 322 local manpages="0"
323 local pck_devel="0" 323 local pck_devel="0"
324 local pck_library="0" 324 local pck_library="0"
325 local pck_apidocs="0" 325 local pck_apidocs="0"
326 local pck_tools="0" 326 local pck_tools="0"
327 local shared_libraries="0" 327 local shared_libraries="0"
328 local debug_package="0" 328 local debug_package="0"
329 329
330 while :; do 330 while :; do
331 case $1 in 331 case $1 in
332 -t|--template) 332 -t|--template)
333 templatefile=$2; shift ;; 333 templatefile=$2; shift ;;
334 -T|--type) 334 -T|--type)
335 spec_type=$2; shift ;; 335 spec_type=$2; shift ;;
336 -n|--pckname) 336 -n|--pckname)
337 pck_name=$2; shift ;; 337 pck_name=$2; shift ;;
338 -v|--pckversion) 338 -v|--pckversion)
339 pck_version=$2; shift ;; 339 pck_version=$2; shift ;;
340 -s|--setupmacro) 340 -s|--setupmacro)
341 spec_setup_macro="$2"; shift ;; 341 spec_setup_macro="$2"; shift ;;
342 --summary) 342 --summary)
343 spec_summary="$2"; shift ;; 343 spec_summary="$2"; shift ;;
344 -l|--license) 344 -l|--license)
345 spec_license="$2"; shift ;; 345 spec_license="$2"; shift ;;
346 -S|--source) 346 -S|--source)
347 spec_source="$2"; shift ;; 347 spec_source="$2"; shift ;;
348 --source-comment) 348 --source-comment)
349 spec_source_comment="$2"; shift ;; 349 spec_source_comment="$2"; shift ;;
350 --standard-docs) 350 --standard-docs)
351 standard_docs="$2"; shift ;; 351 standard_docs="$2"; shift ;;
352 --standard-docs-devel) 352 --standard-docs-devel)
353 standard_docs_devel="$2"; shift ;; 353 standard_docs_devel="$2"; shift ;;
354 -b|--build-technology) 354 -b|--build-technology)
355 build_technology="$2"; shift ;; 355 build_technology="$2"; shift ;;
356 --i18n) 356 --i18n)
357 i18n="$2"; shift ;; 357 i18n="$2"; shift ;;
358 --icons-mimetypes) 358 --icons-mimetypes)
359 icons_mimetypes="$2"; shift ;; 359 icons_mimetypes="$2"; shift ;;
360 --infopages) 360 --infopages)
361 infopages="$2"; shift ;; 361 infopages="$2"; shift ;;
362 --manpages) 362 --manpages)
363 manpages="$2"; shift ;; 363 manpages="$2"; shift ;;
364 --pck-devel) 364 --pck-devel)
365 pck_devel="$2"; shift ;; 365 pck_devel="$2"; shift ;;
366 --pck-library) 366 --pck-library)
367 pck_library="$2"; shift ;; 367 pck_library="$2"; shift ;;
368 --pck-apidocs) 368 --pck-apidocs)
369 pck_apidocs="$2"; shift ;; 369 pck_apidocs="$2"; shift ;;
370 --pck-tools) 370 --pck-tools)
371 pck_tools="$2"; shift ;; 371 pck_tools="$2"; shift ;;
372 --shared-libraries) 372 --shared-libraries)
373 shared_libraries="$2"; shift ;; 373 shared_libraries="$2"; shift ;;
374 --debug-package) 374 --debug-package)
375 debug_package="$2"; shift ;; 375 debug_package="$2"; shift ;;
376 --) shift; break ;; 376 --) shift; break ;;
377 *) notify.error $"unrecognized option"" -- \`$1'" ;; 377 *) notify.error $"unrecognized option"" -- \`$1'" ;;
378 esac 378 esac
379 shift 379 shift
380 done 380 done
381 381
382 notify.debug "$FUNCNAME: build_technology = $build_technology" 382 notify.debug "$FUNCNAME: build_technology = $build_technology"
383 383
384 local spec_cmd_configure 384 local spec_cmd_configure
385 local spec_cmd_make 385 local spec_cmd_make
386 local spec_cmd_makeinstall 386 local spec_cmd_makeinstall
387 387
388 case "$build_technology" in 388 case "$build_technology" in
389 cmake) 389 cmake)
390 spec_cmd_configure="$spec_cmd_configure_cmake" 390 spec_cmd_configure="$spec_cmd_configure_cmake"
391 spec_cmd_make="$spec_cmd_make_cmake" 391 spec_cmd_make="$spec_cmd_make_cmake"
392 spec_cmd_makeinstall="$spec_cmd_makeinstall_cmake" 392 spec_cmd_makeinstall="$spec_cmd_makeinstall_cmake"
393 buildrequires_buildtool="cmake" 393 buildrequires_buildtool="cmake"
394 ;; 394 ;;
395 autotools) 395 autotools)
396 spec_cmd_configure="$spec_cmd_configure_autotools" 396 spec_cmd_configure="$spec_cmd_configure_autotools"
397 spec_cmd_make="$spec_cmd_make_autotools" 397 spec_cmd_make="$spec_cmd_make_autotools"
398 spec_cmd_makeinstall="$spec_cmd_makeinstall_autotools" 398 spec_cmd_makeinstall="$spec_cmd_makeinstall_autotools"
399 ;; 399 ;;
400 autogen) 400 autogen)
401 spec_cmd_configure="$spec_cmd_configure_autogen" 401 spec_cmd_configure="$spec_cmd_configure_autogen"
402 spec_cmd_make="$spec_cmd_make_autogen" 402 spec_cmd_make="$spec_cmd_make_autogen"
403 spec_cmd_makeinstall="$spec_cmd_makeinstall_autogen" 403 spec_cmd_makeinstall="$spec_cmd_makeinstall_autogen"
404 ;; 404 ;;
405 makefile) 405 makefile)
406 spec_cmd_configure="$spec_cmd_configure_makefileonly" 406 spec_cmd_configure="$spec_cmd_configure_makefileonly"
407 spec_cmd_make="$spec_cmd_make_makefileonly" 407 spec_cmd_make="$spec_cmd_make_makefileonly"
408 spec_cmd_makeinstall="$spec_cmd_makeinstall_makefileonly" 408 spec_cmd_makeinstall="$spec_cmd_makeinstall_makefileonly"
409 ;; 409 ;;
410 scons) 410 scons)
411 spec_cmd_configure="$spec_cmd_configure_scons" 411 spec_cmd_configure="$spec_cmd_configure_scons"
412 spec_cmd_make="$spec_cmd_make_scons" 412 spec_cmd_make="$spec_cmd_make_scons"
413 spec_cmd_makeinstall="$spec_cmd_makeinstall_scons" 413 spec_cmd_makeinstall="$spec_cmd_makeinstall_scons"
414 buildrequires_buildtool="scons" 414 buildrequires_buildtool="scons"
415 ;; 415 ;;
416 unknown) 416 unknown)
417 notify.warning $"unknown build techonology" 417 notify.warning $"unknown build techonology"
418 spec_cmd_configure="$spec_cmd_configure_default" 418 spec_cmd_configure="$spec_cmd_configure_default"
419 spec_cmd_make="$spec_cmd_make_default" 419 spec_cmd_make="$spec_cmd_make_default"
420 spec_cmd_makeinstall="$spec_cmd_makeinstall_default" 420 spec_cmd_makeinstall="$spec_cmd_makeinstall_default"
421 ;; 421 ;;
422 esac 422 esac
423 notify.debug "$FUNCNAME: spec_cmd_configure = \"$spec_cmd_configure\"" 423 notify.debug "$FUNCNAME: spec_cmd_configure = \"$spec_cmd_configure\""
424 notify.debug "$FUNCNAME: spec_cmd_make = \"$spec_cmd_make\"" 424 notify.debug "$FUNCNAME: spec_cmd_make = \"$spec_cmd_make\""
425 notify.debug "$FUNCNAME: spec_cmd_makeinstall = \"$spec_cmd_makeinstall\"" 425 notify.debug "$FUNCNAME: spec_cmd_makeinstall = \"$spec_cmd_makeinstall\""
426 notify.debug "\ 426 notify.debug "\
427 $FUNCNAME: buildrequires_buildtool = \"$buildrequires_buildtool\"" 427 $FUNCNAME: buildrequires_buildtool = \"$buildrequires_buildtool\""
428 428
429 [ -r "$templatefile" ] || notify.error $"file not found"": $templatefile" 429 [ -r "$templatefile" ] || notify.error $"file not found"": $templatefile"
430 430
431 local pck_name_tail="<FIXME>" 431 local pck_name_tail="<FIXME>"
432 case "$pck_name" in *-*) pck_name_tail="${pck_name#*-}" ;; esac 432 case "$pck_name" in *-*) pck_name_tail="${pck_name#*-}" ;; esac
433 notify.debug "$FUNCNAME: pck_name_tail = \"$pck_name_tail\"" 433 notify.debug "$FUNCNAME: pck_name_tail = \"$pck_name_tail\""
434 434
435 local currvar line if_value if_level=0 435 local currvar line if_value if_level=0
436 # FIXME: at most two nested @if statements are supported 436 # FIXME: at most two nested @if statements are supported
437 if_value[0]='N/A'; if_value[1]='1'; if_value[2]='1'; 437 if_value[0]='N/A'; if_value[1]='1'; if_value[2]='1';
438 local template_linenum=0 438 local template_linenum=0
439 while read line; do 439 while read line; do
440 template_linenum=$(($template_linenum + 1)) 440 template_linenum=$(($template_linenum + 1))
441 case "$line" in 441 case "$line" in
442 @if:*) 442 @if:*)
443 [ $if_level -ge 2 ] && notify.error "\ 443 [ $if_level -ge 2 ] && notify.error "\
444 $spec_type ("$"line""#$template_linenum): "$"too many nested @if blocks" 444 $spec_type ("$"line""#$template_linenum): "$"too many nested @if blocks"
445 if_level=$(($if_level + 1)) 445 if_level=$(($if_level + 1))
446 currvar="$(echo "$line" | sed "s,@if:\([^ \t]*\).*,\1,")" 446 currvar="$(echo "$line" | sed "s,@if:\([^ \t]*\).*,\1,")"
447 [[ "${!currvar}" = 1 || \ 447 [[ "${!currvar}" = 1 || \
448 ( -n "${!currvar}" && "${!currvar}" != 0 ) ]] || \ 448 ( -n "${!currvar}" && "${!currvar}" != 0 ) ]] || \
449 if_value[$if_level]='0' 449 if_value[$if_level]='0'
450 notify.debug "\ 450 notify.debug "\
451 $FUNCNAME: @if:$currvar lev:$if_level val:${if_value[$if_level]})" 451 $FUNCNAME: @if:$currvar lev:$if_level val:${if_value[$if_level]})"
452 continue 452 continue
453 ;; 453 ;;
454 @else:*) 454 @else:*)
455 [ "$if_level" = '0' ] && notify.error "\ 455 [ "$if_level" = '0' ] && notify.error "\
456 $spec_type ("$"line""#$template_linenum): "$"@else without @if statement" 456 $spec_type ("$"line""#$template_linenum): "$"@else without @if statement"
457 if_value[$if_level]=$(( ! ${if_value[$if_level]} )) 457 if_value[$if_level]=$(( ! ${if_value[$if_level]} ))
458 notify.debug "\ 458 notify.debug "\
459 $FUNCNAME: @else:$currvar lev:$if_level val:${if_value[$if_level]})" 459 $FUNCNAME: @else:$currvar lev:$if_level val:${if_value[$if_level]})"
460 continue 460 continue
461 ;; 461 ;;
462 @fi:*) 462 @fi:*)
463 [ "$if_level" = '0' ] && notify.error "\ 463 [ "$if_level" = '0' ] && notify.error "\
464 $spec_type ("$"line""#$template_linenum): "$"@fi without @if statement" 464 $spec_type ("$"line""#$template_linenum): "$"@fi without @if statement"
465 if_value[$if_level]='1' 465 if_value[$if_level]='1'
466 if_level=$(($if_level - 1)) 466 if_level=$(($if_level - 1))
467 notify.debug "\ 467 notify.debug "\
468 $FUNCNAME: @fi:$currvar lev:$if_level val:${if_value[$if_level]})" 468 $FUNCNAME: @fi:$currvar lev:$if_level val:${if_value[$if_level]})"
469 continue 469 continue
470 ;; 470 ;;
471 @configure@*) 471 @configure@*)
472 [ "${if_value[1]}" = '1' -a ${if_value[2]} = '1' ] || continue 472 [ "${if_value[1]}" = '1' -a ${if_value[2]} = '1' ] || continue
473 [ "$spec_cmd_configure" ] && echo "$line" | \ 473 [ "$spec_cmd_configure" ] && echo "$line" | \
474 sed "s,@configure@,$spec_cmd_configure," 474 sed "s,@configure@,$spec_cmd_configure,"
475 ;; 475 ;;
476 *) [ "${if_value[1]}" = '1' -a ${if_value[2]} = '1' ] && 476 *) [ "${if_value[1]}" = '1' -a ${if_value[2]} = '1' ] &&
477 echo "$line" | sed "\ 477 echo "$line" | sed "\
478 s,@DISTRO@,${DISTRO:-?DISTRO?}, 478 s,@DISTRO@,${DISTRO:-?DISTRO?},
479 s,@DISTRO_rpm@,${DISTRO_rpm:-?DISTRO_rpm?}, 479 s,@DISTRO_rpm@,${DISTRO_rpm:-?DISTRO_rpm?},
480 s,@VENDOR@,${VENDOR:-?VENDOR?}, 480 s,@VENDOR@,${VENDOR:-?VENDOR?},
481 s,@packager_fullname@,${packager_fullname:-?packager_fullname?}, 481 s,@packager_fullname@,${packager_fullname:-?packager_fullname?},
482 s,@packager_email@,${packager_email:-?packager_email?}, 482 s,@packager_email@,${packager_email:-?packager_email?},
483 s,@rpm_default_buildroot@,${rpm_default_buildroot:-?rpm_default_buildroot?}, 483 s,@rpm_default_buildroot@,${rpm_default_buildroot:-?rpm_default_buildroot?},
484 s,@pck_name@,$pck_name, 484 s,@pck_name@,$pck_name,
485 s,@pck_name_tail@,$pck_name_tail, 485 s,@pck_name_tail@,$pck_name_tail,
486 s,@pck_version@,$pck_version, 486 s,@pck_version@,$pck_version,
487 s,@spec_first_release@,${spec_first_release:-1}, 487 s,@spec_first_release@,${spec_first_release:-1},
488 s,@spec_run_ldconfig@,$spec_run_ldconfig, 488 s,@spec_run_ldconfig@,$spec_run_ldconfig,
489 s,^\(%setup.*\),${spec_setup_macro}, 489 s,^\(%setup.*\),${spec_setup_macro},
490 /^[ \t]*Summary[ \t]*:[ \t]*\.\.\..*$/{ 490 /^[ \t]*Summary[ \t]*:[ \t]*\.\.\..*$/{
491 s,\(^[ \t]*Summary[ \t]*:[ \t]*\).*,\1${spec_summary},} 491 s,\(^[ \t]*Summary[ \t]*:[ \t]*\).*,\1${spec_summary},}
492 /^[ \t]*License[ \t]*:[ \t]*\.\.\.$/{ 492 /^[ \t]*License[ \t]*:[ \t]*\.\.\.$/{
493 s,\(^[ \t]*License[ \t]*:[ \t]*\).*,\1${spec_license},} 493 s,\(^[ \t]*License[ \t]*:[ \t]*\).*,\1${spec_license},}
494 s,^\([ \t]*Source[ \t]*:[ \t]*\).*,\ 494 s,^\([ \t]*Source[ \t]*:[ \t]*\).*,\
495 ${spec_source_comment:+$spec_source_comment\n}\1${spec_source}, 495 ${spec_source_comment:+$spec_source_comment\n}\1${spec_source},
496 s,@make@,$spec_cmd_make, 496 s,@make@,$spec_cmd_make,
497 s,@makeinstall@,$spec_cmd_makeinstall, 497 s,@makeinstall@,$spec_cmd_makeinstall,
498 s,@build_tool@,$buildrequires_buildtool, 498 s,@build_tool@,$buildrequires_buildtool,
499 s,@standard_docs@,${standard_docs:+%doc $standard_docs}, 499 s,@standard_docs@,${standard_docs:+%doc $standard_docs},
500 s,@standard_docs_devel@,${standard_docs_devel:+%doc $standard_docs_devel}, 500 s,@standard_docs_devel@,${standard_docs_devel:+%doc $standard_docs_devel},
501 s,@spec_changelog_date@,$spec_changelog_date, 501 s,@spec_changelog_date@,$spec_changelog_date,
502 s,@spec_changelog_comment@,$spec_changelog_comment, 502 s,@spec_changelog_comment@,$spec_changelog_comment,
503 " 503 "
504 #/$spec_i18n/{ # if spec_i18n 504 #/$spec_i18n/{ # if spec_i18n
505 # s,@i18n@\([^@]*\)@.*,\1,;be;} #select 1st arg 505 # s,@i18n@\([^@]*\)@.*,\1,;be;} #select 1st arg
506 #:e s,@i18n@[^@]*@\([^@]*\)[@]*,\1, #select 2nd arg 506 #:e s,@i18n@[^@]*@\([^@]*\)[@]*,\1, #select 2nd arg
507 ;; 507 ;;
508 esac 508 esac
509 done < $templatefile | \ 509 done < $templatefile | \
510 sed '/^$/{n;/^$/d}' # remove duplicate blank lines 510 sed '/^$/{n;/^$/d}' # remove duplicate blank lines
511 } 511 }
512 512
513 # specfile.create() 513 # specfile.create()
514 # Parameters: 514 # Parameters:
515 # $1 : try to create a specfile from this tarball 515 # $1 : try to create a specfile from this tarball
516 # $2 : source (with or without path; can be a remote url) 516 # $2 : source (with or without path; can be a remote url)
517 # $3 : package name 517 # $3 : package name
518 # $4 : package version 518 # $4 : package version
519 # $5 : output file 519 # $5 : output file
520 # Description: 520 # Description:
521 # Create an initial specfile to help packaging activities 521 # Create an initial specfile to help packaging activities
522 # 522 #
523 523
524 function specfile.create() { 524 function specfile.create() {
525 notify.debug "[ ${0}${exec_options} ]\n" 525 notify.debug "[ ${0}${exec_options} ]\n"
526 526
527 # check if all the needed tools are available 527 # check if all the needed tools are available
528 # note: uncompress has been removed from the mandatory list 528 # note: uncompress has been removed from the mandatory list
529 for tool in chmod find grep mktemp sed bunzip2 gunzip unzip; do 529 for tool in chmod find grep mktemp sed bunzip2 gunzip unzip; do
530 [ "$(type -p $tool)" ] || 530 [ "$(type -p $tool)" ] ||
531 notify.error $"utility not found"": \`$tool'" 531 notify.error $"utility not found"": \`$tool'"
532 done 532 done
533 533
534 local spec_type="$1" 534 local spec_type="$1"
535 535
536 # collect informations from the tarball name and the source files 536 # collect informations from the tarball name and the source files
537 # 1. pck_tarball, pck_name , pck_version 537 # 1. pck_tarball, pck_name , pck_version
538 # 2. pck_rootdir (where the package has been decompressed) --> pck_rootdir_4spec 538 # 2. pck_rootdir (where the package has been decompressed) --> pck_rootdir_4spec
539 539
540 # 'pck_tarball' = absolute path of '$1' 540 # 'pck_tarball' = absolute path of '$1'
541 local pck_tarball 541 local pck_tarball
542 local pck_name 542 local pck_name
543 local pck_version="$4" 543 local pck_version="$4"
544 544
545 case "$2" in 545 case "$2" in
546 git://*|http://*.git|https://*.git) 546 git://*|http://*.git|https://*.git)
547 git.create_tarball \ 547 git.create_tarball \
548 --pck-version="$pck_version" \ 548 --pck-version="$pck_version" \
549 --git-branch="$git_branch" \ 549 --git-branch="$git_branch" \
550 --preserve-dot-git="$preserve_dot_git" \ 550 --preserve-dot-git="$preserve_dot_git" \
551 --destdir="$source_dir" "$2" 551 --destdir="$source_dir" "$2"
552 552
553 spec_source="$2/${git_branch:-master}/$spec_source" 553 spec_source="$2/${git_branch:-master}/$spec_source"
554 pck_tarball="$source_dir/${spec_source##*/}" 554 pck_tarball="$source_dir/${spec_source##*/}"
555 ;; 555 ;;
556 http://*|https://*|ftp://*) 556 http://*|https://*|ftp://*)
557 pck_tarball="${2##*/}" 557 pck_tarball="${2##*/}"
558 spec_source="$2" 558 spec_source="$2"
559 559
560 curl.download \ 560 curl.download \
561 --options "$curl_options" \ 561 --options "$curl_options" \
562 ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \ 562 ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
563 --exit-on-err --destdir="$source_dir" "$spec_source" 563 --exit-on-err --destdir="$source_dir" "$spec_source"
564 564
565 pck_tarball=$source_dir/$pck_tarball 565 pck_tarball=$source_dir/$pck_tarball
566 ;; 566 ;;
567 *://*) 567 *://*)
568 notify.error $"unsupported protocol"": \`${2//\:*}'" 568 notify.error $"unsupported protocol"": \`${2//\:*}'"
569 ;; 569 ;;
570 /*) pck_tarball="$2" ;; 570 /*) pck_tarball="$2" ;;
571 *) pck_tarball="$(pwd)/$2" ;; 571 *) pck_tarball="$(pwd)/$2" ;;
572 esac 572 esac
573 notify.debug "$FUNCNAME: pck_tarball = $pck_tarball" 573 notify.debug "$FUNCNAME: pck_tarball = $pck_tarball"
574 notify.debug "$FUNCNAME: spec_source = $spec_source" 574 notify.debug "$FUNCNAME: spec_source = $spec_source"
575 notify.debug "$FUNCNAME: spec_source_comment = $spec_source_comment" 575 notify.debug "$FUNCNAME: spec_source_comment = $spec_source_comment"
576 576
577 [ "$pck_tarball" ] || notify.error $"missing tarball name" 577 [ "$pck_tarball" ] || notify.error $"missing tarball name"
578 578
579 [ -e $pck_tarball ] || 579 [ -e $pck_tarball ] ||
580 notify.error $"cannot find the package $pck_tarball" 580 notify.error $"cannot find the package $pck_tarball"
581 581
582 # get the package name from the tarball name 582 # get the package name from the tarball name
583 [ "$pck_name" ] || pck_name=${3:-`echo $pck_tarball | sed -n "\ 583 [ "$pck_name" ] || pck_name=${3:-`echo $pck_tarball | sed -n "\
584 s/.*\/// # remove directory name, if any 584 s/.*\/// # remove directory name, if any
585 s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...) 585 s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...)
586 /-[0-9]*/{s/-[0-9].*//p;q} # <pck_name>-<pck_ver> 586 /-[0-9]*/{s/-[0-9].*//p;q} # <pck_name>-<pck_ver>
587 /[^-\.][0-9]\./{s/\(.*[^-\.]\)[0-9]\..*/\1/p;q} # <pck_name><pck_ver> 587 /[^-\.][0-9]\./{s/\(.*[^-\.]\)[0-9]\..*/\1/p;q} # <pck_name><pck_ver>
588 # <pck_name> (no version, but <pck_name> can end with numbers) 588 # <pck_name> (no version, but <pck_name> can end with numbers)
589 /^[^0-9]*[0-9]*$/p"`} 589 /^[^0-9]*[0-9]*$/p"`}
590 notify.debug "pck_name = \"$pck_name\"" 590 notify.debug "pck_name = \"$pck_name\""
591 [ "$pck_name" ] || 591 [ "$pck_name" ] ||
592 notify.error $"cannot get the package name, use the \`-n' option" 592 notify.error $"cannot get the package name, use the \`-n' option"
593 593
594 [ "$pck_version" ] || pck_version=${4:-`echo $pck_tarball | sed -n "\ 594 [ "$pck_version" ] || pck_version=${4:-`echo $pck_tarball | sed -n "\
595 /[0-9]/!q # return nothing if no number is found in the package name 595 /[0-9]/!q # return nothing if no number is found in the package name
596 s,.*/,, # remove directory name, if any 596 s,.*/,, # remove directory name, if any
597 s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...) 597 s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...)
598 /-[0-9]*/{s/.*-\([0-9]*.*\)/\1/p;q} # <pck_name>-<pck_ver> 598 /-[0-9]*/{s/.*-\([0-9]*.*\)/\1/p;q} # <pck_name>-<pck_ver>
599 /[^-\.][0-9]\./{s/.*[^-\.]\([0-9]\..*\)/\1/p;q} # <pck_name><pck_ver> 599 /[^-\.][0-9]\./{s/.*[^-\.]\([0-9]\..*\)/\1/p;q} # <pck_name><pck_ver>
600 # <pck_name> (no version, but <pck_name> can end with numbers) 600 # <pck_name> (no version, but <pck_name> can end with numbers)
601 /^[^0-9]*[0-9]*$/q"`} 601 /^[^0-9]*[0-9]*$/q"`}
602 notify.debug "$FUNCNAME: pck_version = \"$pck_version\"" 602 notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
603 [ "$pck_version" ] || 603 [ "$pck_version" ] ||
604 notify.error $"cannot get the package version, use the \`-v' option" 604 notify.error $"cannot get the package version, use the \`-v' option"
605 605
606 local outfile="$5" 606 local outfile="$5"
607 if [ "$outfile" ]; then 607 if [ "$outfile" ]; then
608 notify.debug "$FUNCNAME: output file"": ${NOTE}$outfile${NORM}" 608 notify.debug "$FUNCNAME: output file"": ${NOTE}$outfile${NORM}"
609 > $outfile || notify.error $"can't create output file"" $outfile" 609 > $outfile || notify.error $"can't create output file"" $outfile"
610 # do not chmod a non-regular file (for instance /dev/null) 610 # do not chmod a non-regular file (for instance /dev/null)
611 [ -f "$outfile" ] && chmod ${rpm_specfile_mode:-644} $outfile 611 [ -f "$outfile" ] && chmod ${rpm_specfile_mode:-644} $outfile
612 fi 612 fi
613 613
614 notify.note "${NOTE}"$"generating specfile""${NORM}""..."" 614 notify.note "${NOTE}"$"generating specfile""${NORM}""...""
615 * "$"source"": ${NOTE}$pck_tarball${NORM}"" 615 * "$"source"": ${NOTE}$pck_tarball${NORM}""
616 * "$"mode"": ${NOTE}$spec_type${NORM}" 616 * "$"mode"": ${NOTE}$spec_type${NORM}"
617 617
618 case "$spec_type" in 618 case "$spec_type" in
619 ghc) 619 ghc)
620 [[ "$pck_name" =~ $ghc_module_name_structure ]] || notify.error $"\ 620 [[ "$pck_name" =~ $ghc_module_name_structure ]] || notify.error $"\
621 ghc modules must have this name structure (use \`-n'):"" \ 621 ghc modules must have this name structure (use \`-n'):"" \
622 \`$ghc_module_name_structure'" 622 \`$ghc_module_name_structure'"
623 ;; 623 ;;
624 library) 624 library)
625 [[ "$pck_name" =~ $library_name_structure ]] || notify.error $"\ 625 [[ "$pck_name" =~ $library_name_structure ]] || notify.error $"\
626 libraries must have this name structure (use \`-n'):"" \ 626 libraries must have this name structure (use \`-n'):"" \
627 \`$library_name_structure'" 627 \`$library_name_structure'"
628 ;; 628 ;;
629 ocaml-libs) 629 ocaml-libs)
630 [[ "$pck_name" =~ $ocaml_module_name_structure ]] || notify.error $"\ 630 [[ "$pck_name" =~ $ocaml_module_name_structure ]] || notify.error $"\
631 ocaml modules must have this name structure (use \`-n'):"" \ 631 ocaml modules must have this name structure (use \`-n'):"" \
632 \`$ocaml_module_name_structure'" 632 \`$ocaml_module_name_structure'"
633 ;; 633 ;;
634 perl) 634 perl)
635 [[ "$pck_name" =~ $perl_module_name_structure ]] || notify.error $"\ 635 [[ "$pck_name" =~ $perl_module_name_structure ]] || notify.error $"\
636 perl modules must have this name structure (use \`-n'):"" \ 636 perl modules must have this name structure (use \`-n'):"" \
637 \`$perl_module_name_structure'" 637 \`$perl_module_name_structure'"
638 ;; 638 ;;
639 python) 639 python)
640 [[ "$pck_name" =~ $python_module_name_structure ]] || notify.error $"\ 640 [[ "$pck_name" =~ $python_module_name_structure ]] || notify.error $"\
641 python modules must have this name structure (use \`-n'):"" \ 641 python modules must have this name structure (use \`-n'):"" \
642 \`$python_module_name_structure'" 642 \`$python_module_name_structure'"
643 ;; 643 ;;
644 esac 644 esac
645 645
646 # link fd#3 with stdout and redirect stdout to the log file 646 # link fd#3 with stdout and redirect stdout to the log file
647 [ "$outfile" ] && { exec 3<&1; exec 1>>$outfile; } 647 [ "$outfile" ] && { exec 3<&1; exec 1>>$outfile; }
648 648
649 local tmpdir=`mktemp -q -d -t $me.XXXXXXXX` 649 local tmpdir=`mktemp -q -d -t $me.XXXXXXXX`
650 [ $? -eq 0 ] || 650 [ $? -eq 0 ] ||
651 notify.error $"can't create temporary directory" 651 notify.error $"can't create temporary directory"
652 652
653 # decompress the tarball in the 'tmpdir' directory 653 # decompress the tarball in the 'tmpdir' directory
654 cp -f $pck_tarball $tmpdir 654 cp -f $pck_tarball $tmpdir
655 pushd $tmpdir >/dev/null 655 pushd $tmpdir >/dev/null
656 case $pck_tarball in 656 case $pck_tarball in
657 *.tar.gz|*.tgz) 657 *.tar.gz|*.tgz)
658 gunzip -c $pck_tarball | tar xf - ;; 658 gunzip -c $pck_tarball | tar xf - ;;
659 *.tar.bz2|*.tbz2) 659 *.tar.bz2|*.tbz2)
660 bunzip2 -c $pck_tarball | tar xf - ;; 660 bunzip2 -c $pck_tarball | tar xf - ;;
661 *.tar.Z) 661 *.tar.Z)
662 [ "$(type -p uncompress)" ] || 662 [ "$(type -p uncompress)" ] ||
663 notify.error $"utility not found"": \`uncompress'" 663 notify.error $"utility not found"": \`uncompress'"
664 uncompress -c $pck_tarball | tar xf - ;; 664 uncompress -c $pck_tarball | tar xf - ;;
665 *.shar.gz) 665 *.shar.gz)
666 gunzip -c $pck_tarball | unshar ;; 666 gunzip -c $pck_tarball | unshar ;;
667 *.zip) 667 *.zip)
668 unzip -q $pck_tarball ;; 668 unzip -q $pck_tarball ;;
669 *.tar.xz|*.tar.lzma) 669 *.tar.xz|*.tar.lzma)
670 [ "$(type -p xz)" ] || 670 [ "$(type -p xz)" ] ||
671 notify.error $"utility not found"": \`xz'" 671 notify.error $"utility not found"": \`xz'"
672 xz -d --stdout $pck_tarball | tar xf - ;; 672 xz -d --stdout $pck_tarball | tar xf - ;;
673 *.tar.lz) 673 *.tar.lz)
674 [ "$(type -p lzip)" ] || 674 [ "$(type -p lzip)" ] ||
675 notify.error $"utility not found"": \`lzip'" 675 notify.error $"utility not found"": \`lzip'"
676 lzip -cd $pck_tarball | tar -xf - ;; 676 lzip -cd $pck_tarball | tar -xf - ;;
677 *.tar.7z) 677 *.tar.7z)
678 [ "$(type -p 7za)" ] || 678 [ "$(type -p 7za)" ] ||
679 notify.error $"utility not found"": \`7za'" 679 notify.error $"utility not found"": \`7za'"
680 7za x -bd $pck_tarball >/dev/null | tar xf - ;; 680 7za x -bd $pck_tarball >/dev/null | tar xf - ;;
681 *.7z) 681 *.7z)
682 [ "$(type -p 7za)" ] || 682 [ "$(type -p 7za)" ] ||
683 notify.error $"utility not found"": \`7za'" 683 notify.error $"utility not found"": \`7za'"
684 7za x -bd $pck_tarball >/dev/null ;; 684 7za x -bd $pck_tarball >/dev/null ;;
685 *.jar) 685 *.jar)
686 [ "$(type -p jar)" ] || 686 [ "$(type -p jar)" ] ||
687 notify.error $"utility not found"": \`jar'" 687 notify.error $"utility not found"": \`jar'"
688 jar -xf $pck_tarball >/dev/null ;; 688 jar -xf $pck_tarball >/dev/null ;;
689 *) notify.warning $"unsupported package compression method" ;; 689 *) notify.warning $"unsupported package compression method" ;;
690 esac 690 esac
691 popd >/dev/null 691 popd >/dev/null
692 rm -f $tmpdir/${pck_tarball##*/} 692 rm -f $tmpdir/${pck_tarball##*/}
693 693
694 local pck_rootdir_dirs=(`\ 694 local pck_rootdir_dirs=(`\
695 LC_ALL=C find $tmpdir -mindepth 1 -maxdepth 1 -type d -printf "%f "`) 695 LC_ALL=C find $tmpdir -mindepth 1 -maxdepth 1 -type d -printf "%f "`)
696 notify.debug "$FUNCNAME: pck_rootdir_dirs = \"$pck_rootdir_dirs\"" 696 notify.debug "$FUNCNAME: pck_rootdir_dirs = \"$pck_rootdir_dirs\""
697 local pck_rootdir_files=(`\ 697 local pck_rootdir_files=(`\
698 LC_ALL=C find $tmpdir -mindepth 1 -maxdepth 1 -type f -printf "%f "`) 698 LC_ALL=C find $tmpdir -mindepth 1 -maxdepth 1 -type f -printf "%f "`)
699 notify.debug "$FUNCNAME: pck_rootdir_files = \"$pck_rootdir_files\"" 699 notify.debug "$FUNCNAME: pck_rootdir_files = \"$pck_rootdir_files\""
700 700
701 # 0. set 'spec_setup_macro' 701 # 0. set 'spec_setup_macro'
702 702
703 local pck_rootdir local pck_rootdir_4spec spec_setup_macro 703 local pck_rootdir local pck_rootdir_4spec spec_setup_macro
704 704
705 if [[ -n "$pck_rootdir_files" || \ 705 if [[ -n "$pck_rootdir_files" || \
706 ( -z "$pck_rootdir_dirs" && -z "$pck_rootdir_files" ) ]]; then 706 ( -z "$pck_rootdir_dirs" && -z "$pck_rootdir_files" ) ]]; then
707 # detected a package without a root directory 707 # detected a package without a root directory
708 pck_rootdir="" 708 pck_rootdir=""
709 pck_rootdir_4spec="-c %{name}-%{version}" 709 pck_rootdir_4spec="-c %{name}-%{version}"
710 spec_setup_macro="%setup -q $pck_rootdir_4spec" 710 spec_setup_macro="%setup -q $pck_rootdir_4spec"
711 else 711 else
712 pck_rootdir="$pck_rootdir_dirs" 712 pck_rootdir="$pck_rootdir_dirs"
713 pck_rootdir_4spec=`echo $pck_rootdir | \ 713 pck_rootdir_4spec=`echo $pck_rootdir | \
714 sed "s/$pck_name/%{name}/;s/$pck_version/%{version}/"` 714 sed "s/$pck_name/%{name}/;s/$pck_version/%{version}/"`
715 if [ "$pck_rootdir_4spec" = "%{name}-%{version}" ]; then 715 if [ "$pck_rootdir_4spec" = "%{name}-%{version}" ]; then
716 spec_setup_macro="%setup -q" 716 spec_setup_macro="%setup -q"
717 elif [ "$pck_rootdir_4spec" = "-c %{name}-%{version}" ]; then 717 elif [ "$pck_rootdir_4spec" = "-c %{name}-%{version}" ]; then
718 spec_setup_macro="%setup -q $pck_rootdir_4spec" 718 spec_setup_macro="%setup -q $pck_rootdir_4spec"
719 else 719 else
720 spec_setup_macro="%setup -q -n $pck_rootdir_4spec" 720 spec_setup_macro="%setup -q -n $pck_rootdir_4spec"
721 fi 721 fi
722 fi 722 fi
723 723
724 notify.debug "$FUNCNAME: pck_rootdir = \"$pck_rootdir\"" 724 notify.debug "$FUNCNAME: pck_rootdir = \"$pck_rootdir\""
725 notify.debug "$FUNCNAME: pck_rootdir_4spec = \"$pck_rootdir_4spec\"" 725 notify.debug "$FUNCNAME: pck_rootdir_4spec = \"$pck_rootdir_4spec\""
726 notify.debug "$FUNCNAME: spec_setup_macro = \"$spec_setup_macro\"" 726 notify.debug "$FUNCNAME: spec_setup_macro = \"$spec_setup_macro\""
727 727
728 # 1. preliminaries checks 728 # 1. preliminaries checks
729 729
730 case "$spec_type" in perl) ;; 730 case "$spec_type" in perl) ;;
731 *) [[ -e $tmpdir/$pck_rootdir/$perl_Makefile_generator || 731 *) [[ -e $tmpdir/$pck_rootdir/$perl_Makefile_generator ||
732 -e $tmpdir/$pck_rootdir/Build.PL ]] && notify.warning $"\ 732 -e $tmpdir/$pck_rootdir/Build.PL ]] && notify.warning $"\
733 looks like a perl package (use \`-t perl' if this is true)" ;; 733 looks like a perl package (use \`-t perl' if this is true)" ;;
734 esac 734 esac
735 case "$spec_type" in python) ;; 735 case "$spec_type" in python) ;;
736 *) [[ -e $tmpdir/$pck_rootdir/setup.py ]] && notify.warning $"\ 736 *) [[ -e $tmpdir/$pck_rootdir/setup.py ]] && notify.warning $"\
737 looks like a python module (use \`-t python' if this is true)" ;; 737 looks like a python module (use \`-t python' if this is true)" ;;
738 esac 738 esac
739 739
740 # 2. set 'spec_summary' 740 # 2. set 'spec_summary'
741 local spec_summary="$spec_default_summary" 741 local spec_summary="$spec_default_summary"
742 local perl_pckname_from_makefile="" 742 local perl_pckname_from_makefile=""
743 case "$spec_type" in 743 case "$spec_type" in
744 perl) 744 perl)
745 if [ -e $tmpdir/$pck_rootdir/Makefile.PL ]; then 745 if [ -e $tmpdir/$pck_rootdir/Makefile.PL ]; then
746 # look for the variable `NAME' in Makefile.PL inside the 746 # look for the variable `NAME' in Makefile.PL inside the
747 # 'WriteMakefile(' ... ')' block 747 # 'WriteMakefile(' ... ')' block
748 perl_pckname_from_makefile=$(sed -n "\ 748 perl_pckname_from_makefile=$(sed -n "\
749 /^[ \t]*WriteMakefile(/,/^)/{# 749 /^[ \t]*WriteMakefile(/,/^)/{#
750 /^[ \t]*[']NAME['][ \t]*=>/{# 750 /^[ \t]*[']NAME['][ \t]*=>/{#
751 s|.*=>[ \t]*['\"]\(.*\)['\"].*|\1|;p}}" \ 751 s|.*=>[ \t]*['\"]\(.*\)['\"].*|\1|;p}}" \
752 $tmpdir/$pck_rootdir/Makefile.PL) 752 $tmpdir/$pck_rootdir/Makefile.PL)
753 # [ "$perl_pckname_from_makefile" ] || 753 # [ "$perl_pckname_from_makefile" ] ||
754 # perl_pckname_from_makefile=$(sed -n "\ 754 # perl_pckname_from_makefile=$(sed -n "\
755 #/name/{s,^[ \t]*name[ \t]*['\"]*\([a-zA-Z]*\)['\"]*.*,\1,p}" \ 755 #/name/{s,^[ \t]*name[ \t]*['\"]*\([a-zA-Z]*\)['\"]*.*,\1,p}" \
756 # $tmpdir/$pck_rootdir/Makefile.PL) 756 # $tmpdir/$pck_rootdir/Makefile.PL)
757 fi 757 fi
758 [ -n "$perl_pckname_from_makefile" ] && 758 [ -n "$perl_pckname_from_makefile" ] &&
759 spec_summary="$perl_pckname_from_makefile - ..." 759 spec_summary="$perl_pckname_from_makefile - ..."
760 ;; 760 ;;
761 ocaml-libs) 761 ocaml-libs)
762 local metafile 762 local metafile
763 metafile=$(find $tmpdir/$pck_rootdir/ -type f -name "META" 2>/dev/null) 763 metafile=$(find $tmpdir/$pck_rootdir/ -type f -name "META" 2>/dev/null)
764 [ "$metafile" ] || metafile="$(\ 764 [ "$metafile" ] || metafile="$(\
765 find $tmpdir/$pck_rootdir/ -type f -name "META.in" 2>/dev/null)" 765 find $tmpdir/$pck_rootdir/ -type f -name "META.in" 2>/dev/null)"
766 if [ "$metafile" ]; then 766 if [ "$metafile" ]; then
767 #notify.debug "$FUNCNAME: OCaml META file found" 767 #notify.debug "$FUNCNAME: OCaml META file found"
768 while read line; do 768 while read line; do
769 if [[ "$line" =~ ^description[\ \t]*=[\ \t]*\".*\"$ ]]; then 769 if [[ "$line" =~ ^description[\ \t]*=[\ \t]*\".*\"$ ]]; then
770 spec_summary="... $(\ 770 spec_summary="... $(\
771 echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a " 771 echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a "
772 notify.debug "$FUNCNAME: spec_summary = \"$spec_summary\"" 772 notify.debug "$FUNCNAME: spec_summary = \"$spec_summary\""
773 break 773 break
774 fi 774 fi
775 #if [[ "$line" =~ ^description[\ \t]*=[\ \t]*$ ]]; then 775 #if [[ "$line" =~ ^description[\ \t]*=[\ \t]*$ ]]; then
776 # ... FIXME 776 # ... FIXME
777 done < $metafile 777 done < $metafile
778 fi 778 fi
779 ;; 779 ;;
780 esac 780 esac
781 781
782 # 3. set 'spec_license' 782 # 3. set 'spec_license'
783 case "$spec_type" in perl) 783 case "$spec_type" in perl)
784 spec_license="${perl_License_default:-$spec_default_license}" 784 spec_license="${perl_License_default:-$spec_default_license}"
785 esac 785 esac
786 786
787 # find for package license info 787 # find for package license info
788 # FIXME: currently GNU GPL, LGPL, and W3C licenses are supported 788 # FIXME: currently GNU GPL, LGPL, and W3C licenses are supported
789 local spec_license="$spec_default_license" 789 local spec_license="$spec_default_license"
790 790
791 if [[ -e $tmpdir/$pck_rootdir/COPYING ]]; then 791 if [[ -e $tmpdir/$pck_rootdir/COPYING ]]; then
792 [[ `grep -c "[ ]*GNU GENERAL PUBLIC LICENSE[ ]*" \ 792 [[ `grep -c "[ ]*GNU GENERAL PUBLIC LICENSE[ ]*" \
793 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="GPL" 793 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="GPL"
794 [[ `grep -c "[ ]*GNU LIBRARY GENERAL PUBLIC LICENSE[ ]*" \ 794 [[ `grep -c "[ ]*GNU LIBRARY GENERAL PUBLIC LICENSE[ ]*" \
795 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="LGPL" 795 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="LGPL"
796 [[ `grep -c "[ ]*GNU LESSER GENERAL PUBLIC LICENSE[ ]*" \ 796 [[ `grep -c "[ ]*GNU LESSER GENERAL PUBLIC LICENSE[ ]*" \
797 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="LGPL" 797 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="LGPL"
798 [[ `grep -c "Copyright .* World Wide Web Consortium" \ 798 [[ `grep -c "Copyright .* World Wide Web Consortium" \
799 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="W3C" 799 $tmpdir/$pck_rootdir/COPYING` -eq 0 ]] || spec_license="W3C"
800 fi 800 fi
801 801
802 notify.debug "$FUNCNAME: spec_license (1) = \"$spec_license\"" 802 notify.debug "$FUNCNAME: spec_license (1) = \"$spec_license\""
803 803
804 # 4. set 'spec_source' 804 # 4. set 'spec_source'
805 805
806 local spec_preamble_tarball=`echo "${pck_tarball##*/}" | 806 local spec_preamble_tarball=`echo "${pck_tarball##*/}" |
807 sed "s,$pck_version,%{version},g"` 807 sed "s,$pck_version,%{version},g"`
808 local spec_preamble_source=`echo "$spec_source" | 808 local spec_preamble_source=`echo "$spec_source" |
809 sed "s,$pck_version,%{version},g"` 809 sed "s,$pck_version,%{version},g"`
810 810
811 [ "$spec_source" ] || 811 [ "$spec_source" ] ||
812 spec_preamble_tarball="http://.../$spec_preamble_tarball" 812 spec_preamble_tarball="http://.../$spec_preamble_tarball"
813 813
814 notify.debug "$FUNCNAME: spec_preamble_tarball = \"$spec_preamble_tarball\"" 814 notify.debug "$FUNCNAME: spec_preamble_tarball = \"$spec_preamble_tarball\""
815 notify.debug "$FUNCNAME: spec_preamble_source = \"$spec_preamble_source\"" 815 notify.debug "$FUNCNAME: spec_preamble_source = \"$spec_preamble_source\""
816 816
817 # 5. discover basic documentation and set 'spec_basic_docs' 817 # 5. discover basic documentation and set 'spec_basic_docs'
818 818
819 # standard text documentation files (see 'automake --help') 819 # standard text documentation files (see 'automake --help')
820 # + some other documentation files commonly found in several packages 820 # + some other documentation files commonly found in several packages
821 local standard_docs_list=' 821 local standard_docs_list='
822 AUTHORS 822 AUTHORS
823 COPYING 823 COPYING
824 COPYING.DOC 824 COPYING.DOC
825 COPYING.LESSER 825 COPYING.LESSER
826 COPYING.LIB 826 COPYING.LIB
827 CREDITS 827 CREDITS
828 LICENCE 828 LICENCE
829 LICENSE 829 LICENSE
830 MANUAL 830 MANUAL
831 THANKS' 831 THANKS'
832 832
833 local standard_docs_devel_list=' 833 local standard_docs_devel_list='
834 BACKLOG 834 BACKLOG
835 BUGS 835 BUGS
836 CHANGES 836 CHANGES
837 ChangeLog* 837 ChangeLog*
838 NEWS 838 NEWS
839 README* 839 README*
840 TODO 840 TODO
841 WHATSNEW 841 WHATSNEW
842 WHERE' 842 WHERE'
843 843
844 local standard_docs doc currdocs currdoc 844 local standard_docs doc currdocs currdoc
845 for doc in $standard_docs_list; do 845 for doc in $standard_docs_list; do
846 # `ls' if used to support strings like `ChangeLog*' 846 # `ls' if used to support strings like `ChangeLog*'
847 currdocs=$(cd $tmpdir/$pck_rootdir && ls $doc 2>/dev/null) 847 currdocs=$(cd $tmpdir/$pck_rootdir && ls $doc 2>/dev/null)
848 for currdoc in $currdocs; do 848 for currdoc in $currdocs; do
849 # ignore empty documentation files 849 # ignore empty documentation files
850 [ -s $tmpdir/$pck_rootdir/$currdoc ] && 850 [ -s $tmpdir/$pck_rootdir/$currdoc ] &&
851 standard_docs="\ 851 standard_docs="\
852 ${standard_docs:+$standard_docs }$currdoc" 852 ${standard_docs:+$standard_docs }$currdoc"
853 done 853 done
854 done 854 done
855 for doc in $standard_docs_devel_list; do 855 for doc in $standard_docs_devel_list; do
856 currdocs=$(cd $tmpdir/$pck_rootdir && ls $doc 2>/dev/null) 856 currdocs=$(cd $tmpdir/$pck_rootdir && ls $doc 2>/dev/null)
857 for currdoc in $currdocs; do 857 for currdoc in $currdocs; do
858 [ -s $tmpdir/$pck_rootdir/$currdoc ] && 858 [ -s $tmpdir/$pck_rootdir/$currdoc ] &&
859 standard_docs_devel="\ 859 standard_docs_devel="\
860 ${standard_docs_devel:+$standard_docs_devel }$currdoc" 860 ${standard_docs_devel:+$standard_docs_devel }$currdoc"
861 done 861 done
862 done 862 done
863 863
864 # split the list of docs into multiple lines if necessary 864 # split the list of docs into multiple lines if necessary
865 #[ "$docs" ] && docs=`echo $docs | fmt -u -w 77 | sed 's,.*,%doc &,'` 865 #[ "$docs" ] && docs=`echo $docs | fmt -u -w 77 | sed 's,.*,%doc &,'`
866 866
867 # 6. discover build technology 867 # 6. discover build technology
868 868
869 local build_techology="unknown" 869 local build_techology="unknown"
870 case "$spec_type" in 870 case "$spec_type" in
871 kde3|kde4|perl|python) 871 kde3|kde4|perl|python)
872 build_techology="$spec_type" 872 build_techology="$spec_type"
873 ;; 873 ;;
874 *) if [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then 874 *) if [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then
875 build_techology="cmake" 875 build_techology="cmake"
876 elif [ -x $tmpdir/$pck_rootdir/configure ]; then 876 elif [ -x $tmpdir/$pck_rootdir/configure ]; then
877 build_techology="autotools" 877 build_techology="autotools"
878 elif [ -e $tmpdir/$pck_rootdir/Makefile -o \ 878 elif [ -e $tmpdir/$pck_rootdir/Makefile -o \
879 -e $tmpdir/$pck_rootdir/makefile -o \ 879 -e $tmpdir/$pck_rootdir/makefile -o \
880 -e $tmpdir/$pck_rootdir/GNUmakefile ]; then 880 -e $tmpdir/$pck_rootdir/GNUmakefile ]; then
881 build_techology="makefile" 881 build_techology="makefile"
882 elif [ -x $tmpdir/$pck_rootdir/autogen.sh ]; then 882 elif [ -x $tmpdir/$pck_rootdir/autogen.sh ]; then
883 build_techology="autogen" 883 build_techology="autogen"
884 elif [ -e $tmpdir/$pck_rootdir/SConstruct -o \ 884 elif [ -e $tmpdir/$pck_rootdir/SConstruct -o \
885 -e $tmpdir/$pck_rootdir/Sconstruct -o \ 885 -e $tmpdir/$pck_rootdir/Sconstruct -o \
886 -e $tmpdir/$pck_rootdir/sconstruct ]; then 886 -e $tmpdir/$pck_rootdir/sconstruct ]; then
887 build_techology="scons" 887 build_techology="scons"
888 fi 888 fi
889 ;; 889 ;;
890 esac 890 esac
891 891
892 # 7. check for internationalization files 892 # 7. check for internationalization files
893 893
894 local spec_i18n="0" 894 local spec_i18n="0"
895 # note: in the 'tar' tarball there is no 'intl' folder, so we use 'po' 895 # note: in the 'tar' tarball there is no 'intl' folder, so we use 'po'
896 [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -type d -name po 2>/dev/null)" ] && 896 [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -type d -name po 2>/dev/null)" ] &&
897 spec_i18n="1" 897 spec_i18n="1"
898 898
899 # 8. check for manpages 899 # 8. check for manpages
900 900
901 local spec_manpages="0" 901 local spec_manpages="0"
902 [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -name Makefile.am \ 902 [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -name Makefile.am \
903 -exec grep "MANS[ ]*=" {} \; 2>/dev/null)" ] && spec_manpages="1" 903 -exec grep "MANS[ ]*=" {} \; 2>/dev/null)" ] && spec_manpages="1"
904 904
905 [ "$spec_manpages" = 0 ] && 905 [ "$spec_manpages" = 0 ] &&
906 { [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ \ 906 { [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ \
907 -type f -name "*.[0-9]" 2>/dev/null)" ] && spec_manpages="1"; } 907 -type f -name "*.[0-9]" 2>/dev/null)" ] && spec_manpages="1"; }
908 908
909 # 9. check for infopages 909 # 9. check for infopages
910 910
911 local spec_infopages="0" 911 local spec_infopages="0"
912 [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -name Makefile.am \ 912 [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -name Makefile.am \
913 -exec grep "info_TEXINFOS[ ]*=" {} \; 2>/dev/null)" ] && spec_infopages="1" 913 -exec grep "info_TEXINFOS[ ]*=" {} \; 2>/dev/null)" ] && spec_infopages="1"
914 notify.debug "$FUNCNAME: spec_infopages = $spec_infopages" 914 notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
915 915
916 [ "$spec_infopages" = 0 ] && 916 [ "$spec_infopages" = 0 ] &&
917 { [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ \ 917 { [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ \
918 -type f -name "*.info" 2>/dev/null)" ] && spec_infopages="1"; } 918 -type f -name "*.info" 2>/dev/null)" ] && spec_infopages="1"; }
919 notify.debug "$FUNCNAME: spec_infopages = $spec_infopages" 919 notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
920 920
921 # 10. check for gtk-doc documentation 921 # 10. check for gtk-doc documentation
922 922
923 local spec_gtk_doc="0" 923 local spec_gtk_doc="0"
924 [ "$(LC_ALL=C $tmpdir/$pck_rootdir/configure --help 2>/dev/null | \ 924 [ "$(LC_ALL=C $tmpdir/$pck_rootdir/configure --help 2>/dev/null | \
925 grep -e "enable-gtk-doc")" ] && { 925 grep -e "enable-gtk-doc")" ] && {
926 spec_gtk_doc="1" 926 spec_gtk_doc="1"
927 [ "$build_techology" = "autotools" ] && spec_cmd_configure="\ 927 [ "$build_techology" = "autotools" ] && spec_cmd_configure="\
928 $spec_cmd_configure_autotools --enable-gtk-doc" 928 $spec_cmd_configure_autotools --enable-gtk-doc"
929 } 929 }
930 930
931 # 11. check for library packages 931 # 11. check for library packages
932 local pck_library="0" 932 local pck_library="0"
933 local pck_tools="1" 933 local pck_tools="1"
934 case "$spec_type" in library) 934 case "$spec_type" in library)
935 [[ "$pck_name" =~ ^lib.* ]] || 935 [[ "$pck_name" =~ ^lib.* ]] ||
936 { pck_library="1"; pck_tools="0"; } 936 { pck_library="1"; pck_tools="0"; }
937 esac 937 esac
938 938
939 # 12. debug package 939 # 12. debug package
940 local debug_package="0" 940 local debug_package="0"
941 [ -n "$rpm_macro_debug_package" ] && debug_package="1" 941 [ -n "$rpm_macro_debug_package" ] && debug_package="1"
942 942
943 # FIXME: missing support for: 943 # FIXME: missing support for:
944 # pkgconfig files 944 # pkgconfig files
945 # includedir files 945 # includedir files
946 946
947 template.expand \ 947 template.expand \
948 --template "$templatedir/${spec_type}" \ 948 --template "$templatedir/${spec_type}" \
949 --type "$spec_type" \ 949 --type "$spec_type" \
950 --pckname "$pck_name" \ 950 --pckname "$pck_name" \
951 --pckversion "$pck_version" \ 951 --pckversion "$pck_version" \
952 --setupmacro "$spec_setup_macro" \ 952 --setupmacro "$spec_setup_macro" \
953 --summary="$spec_summary" \ 953 --summary="$spec_summary" \
954 --license "$spec_license" \ 954 --license "$spec_license" \
955 --source "${spec_preamble_source:-$spec_preamble_tarball}" \ 955 --source "${spec_preamble_source:-$spec_preamble_tarball}" \
956 --source-comment "$spec_source_comment" \ 956 --source-comment "$spec_source_comment" \
957 --standard-docs "$standard_docs" \ 957 --standard-docs "$standard_docs" \
958 --standard-docs-devel "$standard_docs_devel" \ 958 --standard-docs-devel "$standard_docs_devel" \
959 --build-technology "$build_techology" \ 959 --build-technology "$build_techology" \
960 --i18n "$spec_i18n" \ 960 --i18n "$spec_i18n" \
961 --icons-mimetypes "1" \ 961 --icons-mimetypes "1" \
962 --infopages "$spec_infopages" \ 962 --infopages "$spec_infopages" \
963 --manpages "$spec_manpages" \ 963 --manpages "$spec_manpages" \
964 --pck-apidocs "$spec_gtk_doc" \ 964 --pck-apidocs "$spec_gtk_doc" \
965 --pck-devel "1" \ 965 --pck-devel "1" \
966 --pck-library "$pck_library" \ 966 --pck-library "$pck_library" \
967 --pck-tools "$pck_tools" \ 967 --pck-tools "$pck_tools" \
968 --shared-libraries "1" \ 968 --shared-libraries "1" \
969 --debug-package "1" 969 --debug-package "1"
970 970
971 [ "$outfile" ] && specfile.ckeck_defvalues "$outfile" 971 [ "$outfile" ] && specfile.ckeck_defvalues "$outfile"
972 972
973 rm -fr $tmpdir 973 rm -fr $tmpdir
974 if [ "$outfile" ]; then 974 if [ "$outfile" ]; then
975 exec 1<&3 3<&- # restore stdout and close fd#3 975 exec 1<&3 3<&- # restore stdout and close fd#3
976 [ -f "$outfile" ] && 976 [ -f "$outfile" ] &&
977 notify.note $"created specfile"": \`${NOTE}$outfile${NORM}'" 977 notify.note $"created specfile"": \`${NOTE}$outfile${NORM}'"
978 fi 978 fi
979 } 979 }
980 980
981 specfile.create \ 981 specfile.create \
982 "$spec_type" "$pck_tarball" "$pck_name" "$pck_version" "$outfile" 982 "$spec_type" "$pck_tarball" "$pck_name" "$pck_version" "$outfile"
983 983
1 # Italian translation. 1 # Italian translation.
2 # Copyright (C) 2004-2013 Davide Madrisan 2 # Copyright (C) 2004-2013 Davide Madrisan
3 # This file is distributed under the same license as the autospec package. 3 # This file is distributed under the same license as the autospec package.
4 # Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013. 4 # Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013.
5 # 5 #
6 6
7 msgid "" 7 msgid ""
8 msgstr "Project-Id-Version: autospec 1.16.4\n" 8 msgstr "Project-Id-Version: autospec 1.16.4\n"
9 "Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n" 9 "Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
10 "POT-Creation-Date: 2013-07-13 19:30+0100\n" 10 "POT-Creation-Date: 2013-07-13 19:30+0100\n"
11 "PO-Revision-Date: 2013-07-13 19:30+0100\n" 11 "PO-Revision-Date: 2013-07-13 19:30+0100\n"
12 "Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n" 12 "Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
13 "Language-Team: \n" 13 "Language-Team: \n"
14 "Language: Italian \n" 14 "Language: Italian \n"
15 "MIME-Version: 1.0\n" 15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n" 16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n" 17 "Content-Transfer-Encoding: 8bit\n"
18 18
19 msgid "this script requires bash version 2 or better" 19 msgid "this script requires bash version 2 or better"
20 msgstr "questo script richiede bash versione 2 o superiore" 20 msgstr "questo script richiede bash versione 2 o superiore"
21 21
22 msgid "library not found" 22 msgid "library not found"
23 msgstr "libreria non trovata" 23 msgstr "libreria non trovata"
24 24
25 msgid "This program is free software; you can redistribute it and/or modify " 25 msgid "This program is free software; you can redistribute it and/or modify "
26 "it under\n" 26 "it under\n"
27 "the terms of the GNU General Public License version 2 as published " 27 "the terms of the GNU General Public License version 2 as published "
28 "by the\n" 28 "by the\n"
29 "Free Software Foundation. There is NO warranty; not even for " 29 "Free Software Foundation. There is NO warranty; not even for "
30 "MERCHANTABILITY\n" 30 "MERCHANTABILITY\n"
31 "or FITNESS FOR A PARTICULAR PURPOSE." 31 "or FITNESS FOR A PARTICULAR PURPOSE."
32 msgstr "Questo è software libero; è possibile redistribuirlo e/o modificarlo " 32 msgstr "Questo è software libero; è possibile redistribuirlo e/o modificarlo "
33 "nei termini\n" 33 "nei termini\n"
34 "della GNU General Public License versione 2 così come pubblicata " 34 "della GNU General Public License versione 2 così come pubblicata "
35 "dalla\n" 35 "dalla\n"
36 "Free Software Foundation. Non è fornita ALCUNA garanzia; neppure di " 36 "Free Software Foundation. Non è fornita ALCUNA garanzia; neppure di "
37 "NEGOZIABILITA'\n" 37 "NEGOZIABILITA'\n"
38 "o di APPLICABILITA' PER UN PARTICOLARE SCOPO." 38 "o di APPLICABILITA' PER UN PARTICOLARE SCOPO."
39 39
40 msgid "Automatically update rpm packages and help creating new specfiles." 40 msgid "Automatically update rpm packages and help creating new specfiles."
41 msgstr "Aggiorna automaticamente pacchetti rpm ed assiste nella creazione di " 41 msgstr "Aggiorna automaticamente pacchetti rpm ed assiste nella creazione di "
42 "specfile." 42 "specfile."
43 43
44 msgid "Operation modes" 44 msgid "Operation modes"
45 msgstr "Modalità operative" 45 msgstr "Modalità operative"
46 46
47 msgid "Update the given package to a specified version and release" 47 msgid "Update the given package to a specified version and release"
48 msgstr "Aggiorna il pacchetto indicato ad una specifica versione e release" 48 msgstr "Aggiorna il pacchetto indicato ad una specifica versione e release"
49 49
50 msgid "Try to create a specfile for the specified tarball" 50 msgid "Try to create a specfile for the specified tarball"
51 msgstr "Cerca di creare uno specfile per il tarball indicato" 51 msgstr "Cerca di creare uno specfile per il tarball indicato"
52 52
53 msgid "Extract a given file or list of files from a srpm archive" 53 msgid "Extract a given file or list of files from a srpm archive"
54 msgstr "Estrae da un archivio srpm un file o una lista di file indicati" 54 msgstr "Estrae da un archivio srpm un file o una lista di file indicati"
55 55
56 msgid "Print the value of the given configuration variable" 56 msgid "Print the value of the given configuration variable"
57 msgstr "Stampa il valore che la variabile indicata ha nei file di " 57 msgstr "Stampa il valore che la variabile indicata ha nei file di "
58 "configurazione" 58 "configurazione"
59 59
60 msgid "Print this help, then exit" 60 msgid "Print this help, then exit"
61 msgstr "Stampa questa schermata di aiuto e termina il programma" 61 msgstr "Stampa questa schermata di aiuto e termina il programma"
62 62
63 msgid "Print version number, then exit" 63 msgid "Print version number, then exit"
64 msgstr "Stampa il numero di versione e termina il programma" 64 msgstr "Stampa il numero di versione e termina il programma"
65 65
66 msgid "Run in quiet mode" 66 msgid "Run in quiet mode"
67 msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione" 67 msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
68 68
69 msgid "Run in debugging mode (very verbose output)" 69 msgid "Run in debugging mode (very verbose output)"
70 msgstr "Attiva la modalità di debugging (output prolisso)" 70 msgstr "Attiva la modalità di debugging (output prolisso)"
71 71
72 msgid "Common options" 72 msgid "Common options"
73 msgstr "Opzioni comuni" 73 msgstr "Opzioni comuni"
74 74
75 msgid "Select the theme to be used for the colorized output" 75 msgid "Select the theme to be used for the colorized output"
76 msgstr "Seleziona il tema da usare per generare l'output colorato" 76 msgstr "Seleziona il tema da usare per generare l'output colorato"
77 77
78 msgid "Use an alternate user configuration file" 78 msgid "Use an alternate user configuration file"
79 msgstr "Definisce uno o più file di configurazione utente alternativi" 79 msgstr "Definisce uno o più file di configurazione utente alternativi"
80 80
81 msgid "Usage" 81 msgid "Usage"
82 msgstr "Utilizzo" 82 msgstr "Utilizzo"
83 83
84 msgid "Use '-u -h', '-s -h', '-x -h', and '--eval -h' to display specific " 84 msgid "Use '-u -h', '-s -h', '-x -h', and '--eval -h' to display specific "
85 "command line options." 85 "command line options."
86 msgstr "Usa '-u -h', '-s -h', '-x -h', '--eval -h' per avere le opzioni a " 86 msgstr "Usa '-u -h', '-s -h', '-x -h', '--eval -h' per avere le opzioni a "
87 "linea di comando specifiche." 87 "linea di comando specifiche."
88 88
89 msgid "Report bugs to <davide.madrisan@gmail.com>." 89 msgid "Report bugs to <davide.madrisan@gmail.com>."
90 msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>." 90 msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>."
91 91
92 msgid "version" 92 msgid "version"
93 msgstr "versione" 93 msgstr "versione"
94 94
95 msgid "unset in the configuration files" 95 msgid "unset in the configuration files"
96 msgstr "non configurato nei file di configurazione" 96 msgstr "non configurato nei file di configurazione"
97 97
98 msgid "plugin not found" 98 msgid "plugin not found"
99 msgstr "plugin non trovato" 99 msgstr "plugin non trovato"
100 100
101 msgid "can't create temporary files" 101 msgid "can't create temporary files"
102 msgstr "impossibile creare file temporanei" 102 msgstr "impossibile creare file temporanei"
103 103
104 msgid "this script requires bash version 3 or better" 104 msgid "this script requires bash version 3 or better"
105 msgstr "questo script richiede bash versione 3 o superiore" 105 msgstr "questo script richiede bash versione 3 o superiore"
106 106
107 msgid "Print the value of a given configuration variable" 107 msgid "Print the value of a given configuration variable"
108 msgstr "Stampa il valore che una data variabile assume nei file di " 108 msgstr "Stampa il valore che una data variabile assume nei file di "
109 "configurazione" 109 "configurazione"
110 110
111 msgid "where the above options mean" 111 msgid "where the above options mean"
112 msgstr "dove le precedenti opzioni significano" 112 msgstr "dove le precedenti opzioni significano"
113 113
114 msgid "Print the value of the configuration variable <var>" 114 msgid "Print the value of the configuration variable <var>"
115 msgstr "Stampa il valore che <var> assume nei file di configurazione" 115 msgstr "Stampa il valore che <var> assume nei file di configurazione"
116 116
117 msgid "Default files:" 117 msgid "Default files:"
118 msgstr "File di default:" 118 msgstr "File di default:"
119 119
120 msgid "Default user files:" 120 msgid "Default user files:"
121 msgstr "File di default utente:" 121 msgstr "File di default utente:"
122 122
123 msgid "Samples" 123 msgid "Samples"
124 msgstr "Alcuni esempi" 124 msgstr "Alcuni esempi"
125 125
126 msgid "cannot read" 126 msgid "cannot read"
127 msgstr "impossibile leggere" 127 msgstr "impossibile leggere"
128 128
129 msgid "unrecognized option" 129 msgid "unrecognized option"
130 msgstr "opzione non conosciuta" 130 msgstr "opzione non conosciuta"
131 131
132 msgid "configuration file not found" 132 msgid "configuration file not found"
133 msgstr "file di configurazione non trovato" 133 msgstr "file di configurazione non trovato"
134 134
135 msgid "(bug)" 135 msgid "(bug)"
136 msgstr "(bug)" 136 msgstr "(bug)"
137 137
138 msgid "unknown variable type" 138 msgid "unknown variable type"
139 msgstr "tipo di variabile sconosciuto" 139 msgstr "tipo di variabile sconosciuto"
140 140
141 msgid "loading" 141 msgid "loading"
142 msgstr "caricamento di" 142 msgstr "caricamento di"
143 143
144 msgid "Find for updates scanning the web." 144 msgid "Find for updates scanning the web."
145 msgstr "Ricerca aggiornamenti cercando nel web." 145 msgstr "Ricerca aggiornamenti cercando nel web."
146 146
147 msgid "Name of the package" 147 msgid "Name of the package"
148 msgstr "Nome del pacchetto" 148 msgstr "Nome del pacchetto"
149 149
150 msgid "Name of the spec file" 150 msgid "Name of the spec file"
151 msgstr "Nome dello specfile" 151 msgstr "Nome dello specfile"
152 152
153 msgid "URL of the project home page" 153 msgid "URL of the project home page"
154 msgstr "Indirizzo internet dell'homepage del progetto" 154 msgstr "Indirizzo internet dell'homepage del progetto"
155 155
156 msgid "URL with no variable expansion" 156 msgid "URL with no variable expansion"
157 msgstr "Indirizzo internet senza espansione delle variabili" 157 msgstr "Indirizzo internet senza espansione delle variabili"
158 158
159 msgid "Proxy" 159 msgid "Proxy"
160 msgstr "Proxy" 160 msgstr "Proxy"
161 161
162 msgid "Proxy user" 162 msgid "Proxy user"
163 msgstr "Utenza proxy" 163 msgstr "Utenza proxy"
164 164
165 msgid "Indexes of apse sources to disable" 165 msgid "Indexes of apse sources to disable"
166 msgstr "Indici delle sorgenti apse da disabilitare" 166 msgstr "Indici delle sorgenti apse da disabilitare"
167 167
168 msgid "Report bugs to <stefano.cotta@openmamba.org>." 168 msgid "Report bugs to <stefano.cotta@openmamba.org>."
169 msgstr "Segnalare eventuali bug a <stefano.cotta@openmamba.org>." 169 msgstr "Segnalare eventuali bug a <stefano.cotta@openmamba.org>."
170 170
171 msgid "\\`getopt' error" 171 msgid "\\`getopt' error"
172 msgstr "errore in \\`getopt'" 172 msgstr "errore in \\`getopt'"
173 173
174 msgid "\\`getopt' error: bad command \\`$1'" 174 msgid "\\`getopt' error: bad command \\`$1'"
175 msgstr "errore in \\`getopt': comando errato \\`$1'" 175 msgstr "errore in \\`getopt': comando errato \\`$1'"
176 176
177 msgid "looking at" 177 msgid "looking at"
178 msgstr "cerco in" 178 msgstr "cerco in"
179 179
180 msgid "couldn't resolve host" 180 msgid "couldn't resolve host"
181 msgstr "impossibile risolvere il nome dell'host" 181 msgstr "impossibile risolvere il nome dell'host"
182 182
183 msgid "failed to connect to host" 183 msgid "failed to connect to host"
184 msgstr "impossibile connettersi all'host" 184 msgstr "impossibile connettersi all'host"
185 185
186 msgid "curl error (exit code: $retval)" 186 msgid "curl error (exit code: $retval)"
187 msgstr "errore curl (codice di errore: $retval)" 187 msgstr "errore curl (codice di errore: $retval)"
188 188
189 msgid "not parametric source0 name; cannot update" 189 msgid "not parametric source0 name; cannot update"
190 msgstr "source0 in formato non parametrico: impossibile aggiornare" 190 msgstr "source0 in formato non parametrico: impossibile aggiornare"
191 191
192 msgid "found version:" 192 msgid "found version:"
193 msgstr "versione trovata:" 193 msgstr "versione trovata:"
194 194
195 msgid "last version of \\`${NOTE}$specname${NORM}' found:" 195 msgid "last version of \\`${NOTE}$specname${NORM}' found:"
196 msgstr "ultima versione di \\`${NOTE}$specname${NORM}' trovata:" 196 msgstr "ultima versione di \\`${NOTE}$specname${NORM}' trovata:"
197 197
198 msgid "package \\`${NOTE}$specname${NORM}' is already the latest version" 198 msgid "package \\`${NOTE}$specname${NORM}' is already the latest version"
199 msgstr "il pacchetto \\`${NOTE}$specname${NORM}' è già aggiornato all'ultima " 199 msgstr "il pacchetto \\`${NOTE}$specname${NORM}' è già aggiornato all'ultima "
200 "versione" 200 "versione"
201 201
202 msgid "a new version of \\`${NOTE}$specname${NORM}' is available!" 202 msgid "a new version of \\`${NOTE}$specname${NORM}' is available!"
203 msgstr "è disponibile una nuova versione di \\`${NOTE}$specname${NORM}'!" 203 msgstr "è disponibile una nuova versione di \\`${NOTE}$specname${NORM}'!"
204 204
205 msgid "a newer version of \\`${NOTE}$specname${NORM}' is already installed" 205 msgid "a newer version of \\`${NOTE}$specname${NORM}' is already installed"
206 msgstr "è già installata una versione successiva di \\`${NOTE}$specname" 206 msgstr "è già installata una versione successiva di \\`${NOTE}$specname"
207 "${NORM}'" 207 "${NORM}'"
208 208
209 msgid "cannot find a new version of \\`$specname'" 209 msgid "cannot find a new version of \\`$specname'"
210 msgstr "impossibile trovare una nuova versione per \\`$specname'" 210 msgstr "impossibile trovare una nuova versione per \\`$specname'"
211 211
212 msgid "Hint" 212 msgid "Hint"
213 msgstr "Suggerimento" 213 msgstr "Suggerimento"
214 214
215 msgid "user \\`$(id -nu)' does not belong to group \\`$packager_group'" 215 msgid "user \\`$(id -nu)' does not belong to group \\`$packager_group'"
216 msgstr "l'utente \\`$(id -nu)' non appartiene al gruppo \\`$packager_group'" 216 msgstr "l'utente \\`$(id -nu)' non appartiene al gruppo \\`$packager_group'"
217 217
218 msgid "missing variable in the configuration file" 218 msgid "missing variable in the configuration file"
219 msgstr "variabile non inizializzata nel file di configurazione" 219 msgstr "variabile non inizializzata nel file di configurazione"
220 220
221 msgid "no message" 221 msgid "no message"
222 msgstr "nessun messaggio" 222 msgstr "nessun messaggio"
223 223
224 msgid "DEBUG" 224 msgid "DEBUG"
225 msgstr "DEBUG" 225 msgstr "DEBUG"
226 226
227 msgid "WARNING" 227 msgid "WARNING"
228 msgstr "ATTENZIONE" 228 msgstr "ATTENZIONE"
229 229
230 msgid "ERROR" 230 msgid "ERROR"
231 msgstr "ERRORE" 231 msgstr "ERRORE"
232 232
233 msgid "unknown color theme \\`$color_scheme': colors will be disabled" 233 msgid "unknown color theme \\`$color_scheme': colors will be disabled"
234 msgstr "tema di colori sconosciuto \\`$color_scheme': output con colori " 234 msgstr "tema di colori sconosciuto \\`$color_scheme': output con colori "
235 "disabilitato" 235 "disabilitato"
236 236
237 msgid "utility not found" 237 msgid "utility not found"
238 msgstr "programma non trovato" 238 msgstr "programma non trovato"
239 239
240 msgid "missing mandatory arg" 240 msgid "missing mandatory arg"
241 msgstr "parametro mancante" 241 msgstr "parametro mancante"
242 242
243 msgid "usage error (--ftp/--html)" 243 msgid "usage error (--ftp/--html)"
244 msgstr "errato utilizzo (--ftp/--html)" 244 msgstr "errato utilizzo (--ftp/--html)"
245 245
246 msgid "'\\\\' characters detected in \\$pck_name" 246 msgid "'\\\\' characters detected in \\$pck_name"
247 msgstr "trovato carattere '\\\\' in \\$pck_name" 247 msgstr "trovato carattere '\\\\' in \\$pck_name"
248 248
249 msgid "not a number" 249 msgid "not a number"
250 msgstr "non è un numero" 250 msgstr "non è un numero"
251 251
252 msgid "getting list of files from" 252 msgid "getting list of files from"
253 msgstr "ricavo l'elenco dei file da" 253 msgstr "ricavo l'elenco dei file da"
254 254
255 msgid "unsupported query type for this protocol" 255 msgid "unsupported query type for this protocol"
256 msgstr "ricerca non supportata in questo protocollo" 256 msgstr "ricerca non supportata in questo protocollo"
257 257
258 msgid "failure in receiving network data" 258 msgid "failure in receiving network data"
259 msgstr "impossibile recevere dati via rete" 259 msgstr "impossibile recevere dati via rete"
260 260
261 msgid "cannot get the list of files" 261 msgid "cannot get the list of files"
262 msgstr "impossibile ottenere la lista dei file" 262 msgstr "impossibile ottenere la lista dei file"
263 263
264 msgid "no list of architectures set" 264 msgid "no list of architectures set"
265 msgstr "nessuna lista di architetture specificata" 265 msgstr "nessuna lista di architetture specificata"
266 266
267 msgid "unsupported protocol" 267 msgid "unsupported protocol"
268 msgstr "protocollo non supportato" 268 msgstr "protocollo non supportato"
269 269
270 msgid "file not found" 270 msgid "file not found"
271 msgstr "file non trovato" 271 msgstr "file non trovato"
272 272
273 msgid "skipped" 273 msgid "skipped"
274 msgstr "ignorato" 274 msgstr "ignorato"
275 275
276 msgid "downloading" 276 msgid "downloading"
277 msgstr "download di" 277 msgstr "download di"
278 278
279 msgid "no such directory" 279 msgid "no such directory"
280 msgstr "cartella non trovata" 280 msgstr "cartella non trovata"
281 281
282 msgid "cannot download" 282 msgid "cannot download"
283 msgstr "impossibile scaricare" 283 msgstr "impossibile scaricare"
284 284
285 msgid "package not found" 285 msgid "package not found"
286 msgstr "pacchetto non trovato" 286 msgstr "pacchetto non trovato"
287 287
288 msgid "unknown action" 288 msgid "unknown action"
289 msgstr "azione sconosciuta" 289 msgstr "azione sconosciuta"
290 290
291 msgid "not the expected package version" 291 msgid "not the expected package version"
292 msgstr "non è la versione di pacchetto prevista" 292 msgstr "non è la versione di pacchetto prevista"
293 293
294 msgid "cloning git repository" 294 msgid "cloning git repository"
295 msgstr "clonazione del repository" 295 msgstr "clonazione del repository"
296 296
297 msgid "cannot clone git repository" 297 msgid "cannot clone git repository"
298 msgstr "impossibile clonare il repository git" 298 msgstr "impossibile clonare il repository git"
299 299
300 msgid "creating the compressed source tarball" 300 msgid "creating the compressed source tarball"
301 msgstr "creazione del file sorgente compresso" 301 msgstr "creazione del file sorgente compresso"
302 302
303 msgid "done" 303 msgid "done"
304 msgstr "fatto" 304 msgstr "fatto"
305 305
306 msgid "an error occurred while creating" 306 msgid "an error occurred while creating"
307 msgstr "si è verificato un errore durante la creazione di" 307 msgstr "si è verificato un errore durante la creazione di"
308 308
309 msgid "detected a specfile with unsupported syntax:" 309 msgid "detected a specfile with unsupported syntax:"
310 msgstr "lo specfile usa una sintassi non supportata:" 310 msgstr "lo specfile usa una sintassi non supportata:"
311 311
312 msgid "specfile not found" 312 msgid "specfile not found"
313 msgstr "specfile non trovato" 313 msgstr "specfile non trovato"
314 314
315 msgid "FIXME: sorry, not implemented yet..." 315 msgid "FIXME: sorry, not implemented yet..."
316 msgstr "FIXME: spiacente, implementazione mancante..." 316 msgstr "FIXME: spiacente, implementazione mancante..."
317 317
318 msgid "\\`%end' found; should perhaps be \\`%endif'" 318 msgid "\\`%end' found; should perhaps be \\`%endif'"
319 msgstr "\\`%end' utilizzata; forse si intendeva \\`%endif'" 319 msgstr "\\`%end' utilizzata; forse si intendeva \\`%endif'"
320 320
321 msgid "cannot evaluate:" 321 msgid "cannot evaluate:"
322 msgstr "impossibile valutare:" 322 msgstr "impossibile valutare:"
323 323
324 msgid "assertion failed:" 324 msgid "assertion failed:"
325 msgstr "asserzione fallita:" 325 msgstr "asserzione fallita:"
326 326
327 msgid "the specfile has some syntax errors" 327 msgid "the specfile has some syntax errors"
328 msgstr "lo specfile ha degli errori di sintassi" 328 msgstr "lo specfile ha degli errori di sintassi"
329 329
330 msgid "rpm output" 330 msgid "rpm output"
331 msgstr "output rpm" 331 msgstr "output rpm"
332 332
333 msgid "the error should be here!" 333 msgid "the error should be here!"
334 msgstr "l'errore dovrebbe essere qui!" 334 msgstr "l'errore dovrebbe essere qui!"
335 335
336 msgid "Get informations from a given specfile." 336 msgid "Get informations from a given specfile."
337 msgstr "Ricava informazioni da un specfile dato." 337 msgstr "Ricava informazioni da un specfile dato."
338 338
339 msgid "name (and patch) of the specfile" 339 msgid "name (and patch) of the specfile"
340 msgstr "nome (e percorso) dello specfile" 340 msgstr "nome (e percorso) dello specfile"
341 341
342 msgid "do not try to expand variables" 342 msgid "do not try to expand variables"
343 msgstr "non cercare di espandere le variabili" 343 msgstr "non cercare di espandere le variabili"
344 344
345 msgid "and <query> belongs to the following list" 345 msgid "and <query> belongs to the following list"
346 msgstr "e <query> appartiene alla lista seguente" 346 msgstr "e <query> appartiene alla lista seguente"
347 347
348 msgid "list of package groups" 348 msgid "list of package groups"
349 msgstr "lista dei gruppi utilizzati" 349 msgstr "lista dei gruppi utilizzati"
350 350
351 msgid "full name of the srpm package" 351 msgid "full name of the srpm package"
352 msgstr "nome completo del pacchetto srpm" 352 msgstr "nome completo del pacchetto srpm"
353 353
354 msgid "list of patches" 354 msgid "list of patches"
355 msgstr "lista delle patch" 355 msgstr "lista delle patch"
356 356
357 msgid "name of the source0 file" 357 msgid "name of the source0 file"
358 msgstr "name del file indicato da source0" 358 msgstr "name del file indicato da source0"
359 359
360 msgid "list of source files" 360 msgid "list of source files"
361 msgstr "lista dei source file" 361 msgstr "lista dei source file"
362 362
363 msgid "list of all the generated rpm packages" 363 msgid "list of all the generated rpm packages"
364 msgstr "lista dei pacchetti rpm generati" 364 msgstr "lista dei pacchetti rpm generati"
365 365
366 msgid "list of the obsoleted packages" 366 msgid "list of the obsoleted packages"
367 msgstr "lista dei pacchetti resi obsoleti" 367 msgstr "lista dei pacchetti resi obsoleti"
368 368
369 msgid "list of the declared build requirements" 369 msgid "list of the declared build requirements"
370 msgstr "lista dei \\`build requirements' dichiarati" 370 msgstr "lista dei \\`build requirements' dichiarati"
371 371
372 msgid "bad specfile preamble" 372 msgid "bad specfile preamble"
373 msgstr "preambolo dello specfile non conforme" 373 msgstr "preambolo dello specfile non conforme"
374 374
375 msgid "bad arg \\`$var'" 375 msgid "bad arg \\`$var'"
376 msgstr "argomento errato \\`$var'" 376 msgstr "argomento errato \\`$var'"
377 377
378 msgid "cannot initialize \\`$var' from specfile data" 378 msgid "cannot initialize \\`$var' from specfile data"
379 msgstr "impossibile assegnare un valore a \\`$var' usando i dati dello " 379 msgstr "impossibile assegnare un valore a \\`$var' usando i dati dello "
380 "specfile" 380 "specfile"
381 381
382 msgid "no such file or directory" 382 msgid "no such file or directory"
383 msgstr "file o cartella non trovata" 383 msgstr "file o cartella non trovata"
384 384
385 msgid "can't create temporary directory" 385 msgid "can't create temporary directory"
386 msgstr "impossibile creare la cartella temporanea" 386 msgstr "impossibile creare la cartella temporanea"
387 387
388 msgid "cannot extract files from rpm archive" 388 msgid "cannot extract files from rpm archive"
389 msgstr "impossibile estrarre i file dall'archivio rpm" 389 msgstr "impossibile estrarre i file dall'archivio rpm"
390 390
391 msgid "cannot extract files from cpio archive" 391 msgid "cannot extract files from cpio archive"
392 msgstr "impossibile estrarre i file dall'archivio cpio" 392 msgstr "impossibile estrarre i file dall'archivio cpio"
393 393
394 msgid "Extract from the srpm package <srpm_pck>..." 394 msgid "Extract from the srpm package <srpm_pck>..."
395 msgstr "Estrae dal pacchetto srpm <srpm_pck>..." 395 msgstr "Estrae dal pacchetto srpm <srpm_pck>..."
396 396
397 msgid "...the specified file or list of files <file(s)>" 397 msgid "...the specified file or list of files <file(s)>"
398 msgstr "...il file o la lista di file <file(s)>" 398 msgstr "...il file o la lista di file <file(s)>"
399 399
400 msgid "Save extracted files in the directory <dir>" 400 msgid "Save extracted files in the directory <dir>"
401 msgstr "Salva i file estratti nella cartella <dir>" 401 msgstr "Salva i file estratti nella cartella <dir>"
402 402
403 msgid "cannot find:" 403 msgid "cannot find:"
404 msgstr "impossibile trovare:" 404 msgstr "impossibile trovare:"
405 405
406 msgid "not a srpm package" 406 msgid "not a srpm package"
407 msgstr "non è un pacchetto srpm" 407 msgstr "non è un pacchetto srpm"
408 408
409 msgid "cannot create \\`$destdir'" 409 msgid "cannot create \\`$destdir'"
410 msgstr "impossibile creare \\`$destdir'" 410 msgstr "impossibile creare \\`$destdir'"
411 411
412 msgid "can't save extracted files to \\`$destdir'" 412 msgid "can't save extracted files to \\`$destdir'"
413 msgstr "impossibile salvare i file estratti in \\`$destdir'" 413 msgstr "impossibile salvare i file estratti in \\`$destdir'"
414 414
415 msgid "can't decompress the file" 415 msgid "can't decompress the file"
416 msgstr "impossibile decomprimere il file" 416 msgstr "impossibile decomprimere il file"
417 417
418 msgid "can't save files to \\`$destdir'" 418 msgid "can't save files to \\`$destdir'"
419 msgstr "impossibile salvare i file in \\`$destdir'" 419 msgstr "impossibile salvare i file in \\`$destdir'"
420 420
421 msgid "you're running $me as root" 421 msgid "you're running $me as root"
422 msgstr "stai eseguendo $me come root" 422 msgstr "stai eseguendo $me come root"
423 423
424 msgid "Update the package <pck> to version <ver> and release <rel>" 424 msgid "Update the package <pck> to version <ver> and release <rel>"
425 msgstr "Aggiorna il pacchetto <pck> a versione <ver> e release <rel>" 425 msgstr "Aggiorna il pacchetto <pck> a versione <ver> e release <rel>"
426 426
427 msgid "Do the actions specified in the comma separated list <lst>" 427 msgid "Do the actions specified in the comma separated list <lst>"
428 msgstr "Esegue la lista di azioni separate da virgole <lst>" 428 msgstr "Esegue la lista di azioni separate da virgole <lst>"
429 429
430 msgid "check for available versions in the $DISTRO repositories" 430 msgid "check for available versions in the $DISTRO repositories"
431 msgstr "cerca se il pacchetto è disponibile nei repository $DISTRO" 431 msgstr "cerca se il pacchetto è disponibile nei repository $DISTRO"
432 432
433 msgid "download and install the srpm package" 433 msgid "download and install the srpm package"
434 msgstr "download ed installazione del pacchetto srpm" 434 msgstr "download ed installazione del pacchetto srpm"
435 435
436 msgid "check if a new version is available" 436 msgid "check if a new version is available"
437 msgstr "controlla se è disponibile un aggiornamento" 437 msgstr "controlla se è disponibile un aggiornamento"
438 438
439 msgid "download new source files" 439 msgid "download new source files"
440 msgstr "download dei nuovi file sorgente" 440 msgstr "download dei nuovi file sorgente"
441 441
442 msgid "update and check the specfile" 442 msgid "update and check the specfile"
443 msgstr "aggiornamento e controllo dello specfile" 443 msgstr "aggiornamento e controllo dello specfile"
444 444
445 msgid "build the rpm(s) and srpm packages" 445 msgid "build the rpm(s) and srpm packages"
446 msgstr "creazione dei pacchetti rpm e srpm" 446 msgstr "creazione dei pacchetti rpm e srpm"
447 447
448 msgid "build the list of the build requirements" 448 msgid "build the list of the build requirements"
449 msgstr "creazione della lista dei build requirement" 449 msgstr "creazione della lista dei build requirement"
450 450
451 msgid "simulate the installation of the rpm package(s)" 451 msgid "simulate the installation of the rpm package(s)"
452 msgstr "simulazione dell'installazione dei pacchetti rpm" 452 msgstr "simulazione dell'installazione dei pacchetti rpm"
453 453
454 msgid "perform some quality and security checks" 454 msgid "perform some quality and security checks"
455 msgstr "esecuzione dei test di qualità e sicurezza" 455 msgstr "esecuzione dei test di qualità e sicurezza"
456 456
457 msgid "calculate the md5/sha1 hashing values" 457 msgid "calculate the md5/sha1 hashing values"
458 msgstr "calcolo dei valori di hashing md5 e sha1" 458 msgstr "calcolo dei valori di hashing md5 e sha1"
459 459
460 msgid "upload the new packages to the ftp repository" 460 msgid "upload the new packages to the ftp repository"
461 msgstr "upload dei nuovi pacchetti sul sito ftp" 461 msgstr "upload dei nuovi pacchetti sul sito ftp"
462 462
463 msgid "*remove* old packages from the ftp repository" 463 msgid "*remove* old packages from the ftp repository"
464 msgstr "*rimozione* dei vecchi pacchetti dal sito ftp" 464 msgstr "*rimozione* dei vecchi pacchetti dal sito ftp"
465 465
466 msgid "(move packages to \\`\\$ftp_rw_old_dir', if set)" 466 msgid "(move packages to \\`\\$ftp_rw_old_dir', if set)"
467 msgstr "(backup in \\`\\$ftp_rw_old_dir', se definita)" 467 msgstr "(backup in \\`\\$ftp_rw_old_dir', se definita)"
468 468
469 msgid "install the new rpm packages" 469 msgid "install the new rpm packages"
470 msgstr "installazione dei nuovi pacchetti rpm" 470 msgstr "installazione dei nuovi pacchetti rpm"
471 471
472 msgid "Force the update of the rpm(s) and srpm packages" 472 msgid "Force the update of the rpm(s) and srpm packages"
473 msgstr "Forza l'aggiornamento dei pacchetti rpm e srpm" 473 msgstr "Forza l'aggiornamento dei pacchetti rpm e srpm"
474 474
475 msgid "Force the rebuild of the rpm(s) and srpm packages" 475 msgid "Force the rebuild of the rpm(s) and srpm packages"
476 msgstr "Ricrea comunque i pacchetti rpm e srpm" 476 msgstr "Ricrea comunque i pacchetti rpm e srpm"
477 477
478 msgid "Install the new packages even if rpm complains for errors" 478 msgid "Install the new packages even if rpm complains for errors"
479 msgstr "Installa i nuovi pacchetti anche in caso di errori rpm" 479 msgstr "Installa i nuovi pacchetti anche in caso di errori rpm"
480 480
481 msgid "Download the source files even if found in SOURCE" 481 msgid "Download the source files even if found in SOURCE"
482 msgstr "Scarica i file sorgente anche se presenti in SOURCE" 482 msgstr "Scarica i file sorgente anche se presenti in SOURCE"
483 483
484 msgid "Try to execute the given action(s) bypassing errors" 484 msgid "Try to execute the given action(s) bypassing errors"
485 msgstr "Cerca di eseguire comunque le azioni specificate" 485 msgstr "Cerca di eseguire comunque le azioni specificate"
486 486
487 msgid "Skip the given test number(s)" 487 msgid "Skip the given test number(s)"
488 msgstr "Non esegue i test indicati" 488 msgstr "Non esegue i test indicati"
489 489
490 msgid "Define variables <v1>,<v2>,... with values <r1>,<r2>,..." 490 msgid "Define variables <v1>,<v2>,... with values <r1>,<r2>,..."
491 msgstr "Assegna alle variabili v1,v2,... i valori r1,r2,..." 491 msgstr "Assegna alle variabili v1,v2,... i valori r1,r2,..."
492 492
493 msgid "Select a server from where to download srpm packages" 493 msgid "Select a server from where to download srpm packages"
494 msgstr "Server da utilizzare nel download dei pacchetti" 494 msgstr "Server da utilizzare nel download dei pacchetti"
495 495
496 msgid "Select a server where to upload packages" 496 msgid "Select a server where to upload packages"
497 msgstr "Server dove effettuare l'upload dei pacchetti" 497 msgstr "Server dove effettuare l'upload dei pacchetti"
498 498
499 msgid "Select a server to be used for both download and upload" 499 msgid "Select a server to be used for both download and upload"
500 msgstr "Server per l'upload e il download dei pacchetti" 500 msgstr "Server per l'upload e il download dei pacchetti"
501 501
502 msgid "FTP user (usr) and password (pswd) for packages upload" 502 msgid "FTP user (usr) and password (pswd) for packages upload"
503 msgstr "User (usr) e password (pswd) per l'upload sul sito FTP" 503 msgstr "User (usr) e password (pswd) per l'upload sul sito FTP"
504 504
505 msgid "Name of the specfile (default: <name>.spec)" 505 msgid "Name of the specfile (default: <name>.spec)"
506 msgstr "Nome dello specfile (default: <name>.spec)" 506 msgstr "Nome dello specfile (default: <name>.spec)"
507 507
508 msgid "Force the architecture to a given value" 508 msgid "Force the architecture to a given value"
509 msgstr "Forza un valore per l'architettura" 509 msgstr "Forza un valore per l'architettura"
510 510
511 msgid "Set change information for the package" 511 msgid "Set change information for the package"
512 msgstr "Scrive il messaggio indicato nel changelog del pacchetto" 512 msgstr "Scrive il messaggio indicato nel changelog del pacchetto"
513 513
514 msgid "Override packager full name" 514 msgid "Override packager full name"
515 msgstr "Sostituisce il nome completo del packager" 515 msgstr "Sostituisce il nome completo del packager"
516 516
517 msgid "Override packager email" 517 msgid "Override packager email"
518 msgstr "Ridefinisce l'indirizzo mail del packager" 518 msgstr "Ridefinisce l'indirizzo mail del packager"
519 519
520 msgid "action" 520 msgid "action"
521 msgstr "azione" 521 msgstr "azione"
522 522
523 msgid "Only build the rpm packages" 523 msgid "Only build the rpm packages"
524 msgstr "Crea soltanto i pacchetti rpm" 524 msgstr "Crea soltanto i pacchetti rpm"
525 525
526 msgid "Do not upload the srpm package" 526 msgid "Do not upload the srpm package"
527 msgstr "Non effettua l'upload del pacchetto srpm" 527 msgstr "Non effettua l'upload del pacchetto srpm"
528 528
529 msgid "Only build the srpm package" 529 msgid "Only build the srpm package"
530 msgstr "Crea soltanto il pacchetto srpm" 530 msgstr "Crea soltanto il pacchetto srpm"
531 531
532 msgid "Do not upload the rpm packages" 532 msgid "Do not upload the rpm packages"
533 msgstr "Non effettua l'upload dei pacchetti rpm" 533 msgstr "Non effettua l'upload dei pacchetti rpm"
534 534
535 msgid "Do a \\`list check'" 535 msgid "Do a \\`list check'"
536 msgstr "Cerca i file non pacchettizzati" 536 msgstr "Cerca i file non pacchettizzati"
537 537
538 msgid "Replace the block AUTOBUILDREQ" 538 msgid "Replace the block AUTOBUILDREQ"
539 msgstr "Aggiorna il blocco AUTOBUILDREQ" 539 msgstr "Aggiorna il blocco AUTOBUILDREQ"
540 540
541 msgid "Remove all the temporary files except (s)rpm packages" 541 msgid "Remove all the temporary files except (s)rpm packages"
542 msgstr "Rimuove tutti i file temporanei" 542 msgstr "Rimuove tutti i file temporanei"
543 543
544 msgid "Enable specfile autoformatting" 544 msgid "Enable specfile autoformatting"
545 msgstr "Abilita la riformattazione dello specfile" 545 msgstr "Abilita la riformattazione dello specfile"
546 546
547 msgid "Unable logging to file (logging dir: \\`\\$logging_dir')" 547 msgid "Unable logging to file (logging dir: \\`\\$logging_dir')"
548 msgstr "Abilita il log su file (nella directory: \\`\\$logging_dir'" 548 msgstr "Abilita il log su file (nella directory: \\`\\$logging_dir'"
549 549
550 msgid "Enable rebuilding mode and settings (action 4 only)" 550 msgid "Enable rebuilding mode and settings (action 4 only)"
551 msgstr "Attiva modalità ed impostazioni di rebuild (azione 4)" 551 msgstr "Attiva modalità ed impostazioni di rebuild (azione 4)"
552 552
553 msgid "Specify an alternative root directory to rpm" 553 msgid "Specify an alternative root directory to rpm"
554 msgstr "Definisce una root directory alternativa per rpm" 554 msgstr "Definisce una root directory alternativa per rpm"
555 555
556 msgid "changelog entry" 556 msgid "changelog entry"
557 msgstr "stringa di changelog" 557 msgstr "stringa di changelog"
558 558
559 msgid "must be set in the configuration file" 559 msgid "must be set in the configuration file"
560 msgstr "non inizializzato nei file di configurazione" 560 msgstr "non inizializzato nei file di configurazione"
561 561
562 msgid "must have the same size" 562 msgid "must have the same size"
563 msgstr "devono avere la stessa dimensione" 563 msgstr "devono avere la stessa dimensione"
564 564
565 msgid "illegal value" 565 msgid "illegal value"
566 msgstr "valore non valido" 566 msgstr "valore non valido"
567 567
568 msgid "assuming as specfile" 568 msgid "assuming as specfile"
569 msgstr "assumo che lo specfile sia" 569 msgstr "assumo che lo specfile sia"
570 570
571 msgid "unsupported path for specfile" 571 msgid "unsupported path for specfile"
572 msgstr "persorso dello specfile non supportato" 572 msgstr "persorso dello specfile non supportato"
573 573
574 msgid "specfile with CRLF line terminators" 574 msgid "specfile with CRLF line terminators"
575 msgstr "specfile con fine linea CRLF" 575 msgstr "specfile con fine linea CRLF"
576 576
577 msgid "specfile with CR line terminators" 577 msgid "specfile with CR line terminators"
578 msgstr "specfile con fine linea CR" 578 msgstr "specfile con fine linea CR"
579 579
580 msgid "specfile with an unsupported format" 580 msgid "specfile with an unsupported format"
581 msgstr "specfile in formato non supportato" 581 msgstr "specfile in formato non supportato"
582 582
583 msgid "release number: unsupported format" 583 msgid "release number: unsupported format"
584 msgstr "numero di release: formato non supportato" 584 msgstr "numero di release: formato non supportato"
585 585
586 msgid "new release \\`$pck_newrel' must be greater than current one \\`" 586 msgid "new release \\`$pck_newrel' must be greater than current one \\`"
587 "$SPEC_RELEASE'" 587 "$SPEC_RELEASE'"
588 msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella " 588 msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella "
589 "corrente \\`$SPEC_RELEASE'" 589 "corrente \\`$SPEC_RELEASE'"
590 590
591 msgid "making a ${NOTE}backup copy${NORM} of the current specfile" 591 msgid "making a ${NOTE}backup copy${NORM} of the current specfile"
592 msgstr "creazione di una ${NOTE}copia di backup${NORM} dello specfile " 592 msgstr "creazione di una ${NOTE}copia di backup${NORM} dello specfile "
593 "corrente" 593 "corrente"
594 594
595 msgid "unsupported architecture" 595 msgid "unsupported architecture"
596 msgstr "architettura non supportata" 596 msgstr "architettura non supportata"
597 597
598 msgid "missing package name" 598 msgid "missing package name"
599 msgstr "nome del pacchetto mancante" 599 msgstr "nome del pacchetto mancante"
600 600
601 msgid "cannot create logging directory" 601 msgid "cannot create logging directory"
602 msgstr "impossibile creare la directory di logging" 602 msgstr "impossibile creare la directory di logging"
603 603
604 msgid "logging file" 604 msgid "logging file"
605 msgstr "file di log" 605 msgstr "file di log"
606 606
607 msgid "no action specified: set with \\`--action'" 607 msgid "no action specified: set with \\`--action'"
608 msgstr "nessuna azione specificata: utilizzare \\`--action'" 608 msgstr "nessuna azione specificata: utilizzare \\`--action'"
609 609
610 msgid "sintax error in --action \\`$4'" 610 msgid "sintax error in --action \\`$4'"
611 msgstr "errore di instassi in --action \\`$4'" 611 msgstr "errore di instassi in --action \\`$4'"
612 612
613 msgid "sintax error in the command" 613 msgid "sintax error in the command"
614 msgstr "errore di sintassi nel comando" 614 msgstr "errore di sintassi nel comando"
615 615
616 msgid "illegal value for arg" 616 msgid "illegal value for arg"
617 msgstr "valore non valido per l'argomento" 617 msgstr "valore non valido per l'argomento"
618 618
619 msgid "updating package ${NOTE}${pck_name##*/}${NORM} to version " 619 msgid "updating package ${NOTE}${pck_name##*/}${NORM} to version "
620 "${NOTE}${pck_newver}${NORM}" 620 "${NOTE}${pck_newver}${NORM}"
621 msgstr "aggiornamento del pacchetto ${NOTE}${pck_name##*/}${NORM} alla " 621 msgstr "aggiornamento del pacchetto ${NOTE}${pck_name##*/}${NORM} alla "
622 "versione ${NOTE}${pck_newver}${NORM}" 622 "versione ${NOTE}${pck_newver}${NORM}"
623 623
624 msgid "updating package" 624 msgid "updating package"
625 msgstr "aggiornamento del pacchetto" 625 msgstr "aggiornamento del pacchetto"
626 626
627 msgid "multiple package update (regexp: ${NOTE}$pck_name${NORM}) to version " 627 msgid "multiple package update (regexp: ${NOTE}$pck_name${NORM}) to version "
628 "${NOTE}${pck_newver}${NORM}" 628 "${NOTE}${pck_newver}${NORM}"
629 msgstr "aggiornamento multiplo di pacchetti (${NOTE}$pck_name${NORM}) alla " 629 msgstr "aggiornamento multiplo di pacchetti (${NOTE}$pck_name${NORM}) alla "
630 "versione ${NOTE}${pck_newver}${NORM}" 630 "versione ${NOTE}${pck_newver}${NORM}"
631 631
632 msgid "multiple package update (regexp: ${NOTE}$pck_name${NORM})" 632 msgid "multiple package update (regexp: ${NOTE}$pck_name${NORM})"
633 msgstr "aggiornamento multiplo di pacchetti (${NOTE}$pck_name${NORM})" 633 msgstr "aggiornamento multiplo di pacchetti (${NOTE}$pck_name${NORM})"
634 634
635 msgid "several occurrences found" 635 msgid "several occurrences found"
636 msgstr "trovati diversi pacchetti candidati" 636 msgstr "trovati diversi pacchetti candidati"
637 637
638 msgid "Repository" 638 msgid "Repository"
639 msgstr "Archivio" 639 msgstr "Archivio"
640 640
641 msgid "Package" 641 msgid "Package"
642 msgstr "Pacchetto" 642 msgstr "Pacchetto"
643 643
644 msgid "cannot find a matching SRPM package in the given repositories" 644 msgid "cannot find a matching SRPM package in the given repositories"
645 msgstr "impossibile trovare il pacchetto SRPM nei repository indicati" 645 msgstr "impossibile trovare il pacchetto SRPM nei repository indicati"
646 646
647 msgid "too many packages found" 647 msgid "too many packages found"
648 msgstr "trovati troppi pacchetti candidati" 648 msgstr "trovati troppi pacchetti candidati"
649 649
650 msgid "installing" 650 msgid "installing"
651 msgstr "installazione di" 651 msgstr "installazione di"
652 652
653 msgid "an error occurred while installing \\`$got_SPEC_FILENAME'" 653 msgid "an error occurred while installing \\`$got_SPEC_FILENAME'"
654 msgstr "si è verificato un errore installando \\`$got_SPEC_FILENAME'" 654 msgstr "si è verificato un errore installando \\`$got_SPEC_FILENAME'"
655 655
656 msgid "unknown retcode for apse.scrapeversion()" 656 msgid "unknown retcode for apse.scrapeversion()"
657 msgstr "codice di ritorno sconosciuto per apse.scrapeversion()" 657 msgstr "codice di ritorno sconosciuto per apse.scrapeversion()"
658 658
659 msgid "version for new package required" 659 msgid "version for new package required"
660 msgstr "versione del nuovo pacchetto non indicata" 660 msgstr "versione del nuovo pacchetto non indicata"
661 661
662 msgid "${NOTE}updating${NORM} the new specfile \\`${NOTE}$spec_dir/" 662 msgid "${NOTE}updating${NORM} the new specfile \\`${NOTE}$spec_dir/"
663 "$SRPM_SPECFILE${NORM}'" 663 "$SRPM_SPECFILE${NORM}'"
664 msgstr "${NOTE}aggiornamento${NORM} del nuovo specfile \\`${NOTE}$spec_dir/" 664 msgstr "${NOTE}aggiornamento${NORM} del nuovo specfile \\`${NOTE}$spec_dir/"
665 "$SRPM_SPECFILE${NORM}'" 665 "$SRPM_SPECFILE${NORM}'"
666 666
667 msgid "specfile autoformattig enabled" 667 msgid "specfile autoformattig enabled"
668 msgstr "formattazione automatica dello specfile abilitata" 668 msgstr "formattazione automatica dello specfile abilitata"
669 669
670 msgid "illegal \\`format_extra_rules' (see configuration file(s))" 670 msgid "illegal \\`format_extra_rules' (see configuration file(s))"
671 msgstr "\\`format_extra_rules' non corretta (vedi file di configurazione)" 671 msgstr "\\`format_extra_rules' non corretta (vedi file di configurazione)"
672 672
673 msgid "missing entry forced" 673 msgid "missing entry forced"
674 msgstr "aggiunta voce mancante" 674 msgstr "aggiunta voce mancante"
675 675
676 msgid "missing entry in the specfile:" 676 msgid "missing entry in the specfile:"
677 msgstr "voce mancante nello specfile:" 677 msgstr "voce mancante nello specfile:"
678 678
679 msgid "\\`%description' has empty body" 679 msgid "\\`%description' has empty body"
680 msgstr "trovata \\`%description' senza testo" 680 msgstr "trovata \\`%description' senza testo"
681 681
682 msgid "parsing the \\`%package' block" 682 msgid "parsing the \\`%package' block"
683 msgstr "parsing del blocco \\`%package'" 683 msgstr "parsing del blocco \\`%package'"
684 684
685 msgid "cannot create \\`$SRPM_SPECFILE_WITH_PATH'" 685 msgid "cannot create \\`$SRPM_SPECFILE_WITH_PATH'"
686 msgstr "impossibile creare \\`$SRPM_SPECFILE_WITH_PATH'" 686 msgstr "impossibile creare \\`$SRPM_SPECFILE_WITH_PATH'"
687 687
688 msgid "build the srpm package" 688 msgid "build the srpm package"
689 msgstr "creazione del pacchetto srpm" 689 msgstr "creazione del pacchetto srpm"
690 690
691 msgid "the version entered at command line doesn't match the version set in " 691 msgid "the version entered at command line doesn't match the version set in "
692 "the specfile" 692 "the specfile"
693 msgstr "versione specificata a linea di comando differente da quanto " 693 msgstr "versione specificata a linea di comando differente da quanto "
694 "indicato nello specfile" 694 "indicato nello specfile"
695 695
696 msgid "the release entered at command line doesn't match the version set in " 696 msgid "the release entered at command line doesn't match the version set in "
697 "the specfile" 697 "the specfile"
698 msgstr "release specificata a linea di comando differente da quanto indicato " 698 msgstr "release specificata a linea di comando differente da quanto indicato "
699 "nello specfile" 699 "nello specfile"
700 700
701 msgid "building the rpm packages" 701 msgid "building the rpm packages"
702 msgstr "creazione dei pacchetti rpm" 702 msgstr "creazione dei pacchetti rpm"
703 703
704 msgid "specfile is newer than rpm package(s) (according to modification " 704 msgid "specfile is newer than rpm package(s) (according to modification "
705 "date)" 705 "date)"
706 msgstr "lo specfile è stato modificato dopo la creazione dei pacchetti rpm" 706 msgstr "lo specfile è stato modificato dopo la creazione dei pacchetti rpm"
707 707
708 msgid "building the srpm package" 708 msgid "building the srpm package"
709 msgstr "creazione del pacchetto srpm" 709 msgstr "creazione del pacchetto srpm"
710 710
711 msgid "specfile is newer than srpm (according to modification date)" 711 msgid "specfile is newer than srpm (according to modification date)"
712 msgstr "lo specfile è più recente del file srpm" 712 msgstr "lo specfile è più recente del file srpm"
713 713
714 msgid "build requirement found" 714 msgid "build requirement found"
715 msgstr "trovato build requirement" 715 msgstr "trovato build requirement"
716 716
717 msgid "installing missing build requirement" 717 msgid "installing missing build requirement"
718 msgstr "installazione del \"build requirement\"" 718 msgstr "installazione del \"build requirement\""
719 719
720 msgid "cannot install the needed build requirements" 720 msgid "cannot install the needed build requirements"
721 msgstr "impossibile installare i \"build requirement\" necessari" 721 msgstr "impossibile installare i \"build requirement\" necessari"
722 722
723 msgid "found ${NOTE}missing BuildRequirement${NORM} \\`${NOTE}$f${NORM}'" 723 msgid "found ${NOTE}missing BuildRequirement${NORM} \\`${NOTE}$f${NORM}'"
724 msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} \\`${NOTE}$f" 724 msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} \\`${NOTE}$f"
725 "${NORM}'" 725 "${NORM}'"
726 726
727 msgid "testing out specfile" 727 msgid "testing out specfile"
728 msgstr "esecuzione dei test sullo specfile" 728 msgstr "esecuzione dei test sullo specfile"
729 729
730 msgid "rpmbuild exited with error code" 730 msgid "rpmbuild exited with error code"
731 msgstr "rpmbuild è terminato con il codice d'errore" 731 msgstr "rpmbuild è terminato con il codice d'errore"
732 732
733 msgid "checking for unpackaged files" 733 msgid "checking for unpackaged files"
734 msgstr "ricerca di file non inseriti nei blocchi %files" 734 msgstr "ricerca di file non inseriti nei blocchi %files"
735 735
736 msgid "building rpm and srpm packages" 736 msgid "building rpm and srpm packages"
737 msgstr "creazione dei pacchetti rpm e srpm" 737 msgstr "creazione dei pacchetti rpm e srpm"
738 738
739 msgid "It seems good but do not forget to run quality and security tests" 739 msgid "It seems good but do not forget to run quality and security tests"
740 msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e " 740 msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e "
741 "sicurezza" 741 "sicurezza"
742 742
743 msgid "no arch-specific pattern translations for unpackaged files" 743 msgid "no arch-specific pattern translations for unpackaged files"
744 msgstr "nessuna corrispondenza di pattern legati all'architettura per i file non pacchetizzati" 744 msgstr "nessuna corrispondenza di pattern legati all'architettura per i file non pacchetizzati"
745 745
746 msgid "Add the following files in the right %files blocks" 746 msgid "Add the following files in the right %files blocks"
747 msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti" 747 msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti"
748 748
749 msgid "release for new package required" 749 msgid "release for new package required"
750 msgstr "release del nuovo pacchetto non indicata" 750 msgstr "release del nuovo pacchetto non indicata"
751 751
752 msgid "ignoring requirement" 752 msgid "ignoring requirement"
753 msgstr "requirement ignorato" 753 msgstr "requirement ignorato"
754 754
755 msgid "replacing the AUTOBUILDREQ block by:" 755 msgid "replacing the AUTOBUILDREQ block by:"
756 msgstr "sostituzione del blocco AUTOBUILDREQ con:" 756 msgstr "sostituzione del blocco AUTOBUILDREQ con:"
757 757
758 msgid "rpm exited with error code:" 758 msgid "rpm exited with error code:"
759 msgstr "rpm è terminato con il codice di errore:" 759 msgstr "rpm è terminato con il codice di errore:"
760 760
761 msgid "checking the specfile for common mistakes" 761 msgid "checking the specfile for common mistakes"
762 msgstr "controllo dello specfile alla ricerca di comuni errori" 762 msgstr "controllo dello specfile alla ricerca di comuni errori"
763 763
764 msgid "checking packages for common mistakes" 764 msgid "checking packages for common mistakes"
765 msgstr "controllo dei pacchetti alla ricerca di comuni errori" 765 msgstr "controllo dei pacchetti alla ricerca di comuni errori"
766 766
767 msgid "server unreachable" 767 msgid "server unreachable"
768 msgstr "server non raggiungibile" 768 msgstr "server non raggiungibile"
769 769
770 msgid "you have no read write access to url#$ftp_server_upload_num" 770 msgid "you have no read write access to url#$ftp_server_upload_num"
771 msgstr "accesso in scrittura alla url#$ftp_server_upload_num vietato" 771 msgstr "accesso in scrittura alla url#$ftp_server_upload_num vietato"
772 772
773 msgid "ftp upload has been disabled" 773 msgid "ftp upload has been disabled"
774 msgstr "l'upload dei pacchetti via ftp è stato disabilitato" 774 msgstr "l'upload dei pacchetti via ftp è stato disabilitato"
775 775
776 msgid "trying with the ${NOTE}anonymous login${NORM}" 776 msgid "trying with the ${NOTE}anonymous login${NORM}"
777 msgstr "provo ad utilizzare un ${NOTE}login anonimo${NORM}" 777 msgstr "provo ad utilizzare un ${NOTE}login anonimo${NORM}"
778 778
779 msgid "no old packages have been found." 779 msgid "no old packages have been found."
780 msgstr "non sono stati trovati vecchi pacchetti." 780 msgstr "non sono stati trovati vecchi pacchetti."
781 781
782 msgid "moving old packages to the remote backup folder" 782 msgid "moving old packages to the remote backup folder"
783 msgstr "sposto i vecchi pacchetti nella directory di backup del repository" 783 msgstr "sposto i vecchi pacchetti nella directory di backup del repository"
784 784
785 msgid "removing old packages from the repository" 785 msgid "removing old packages from the repository"
786 msgstr "rimozione dei vecchi pacchetti dal sito" 786 msgstr "rimozione dei vecchi pacchetti dal sito"
787 787
788 msgid "force enabled" 788 msgid "force enabled"
789 msgstr "forzata" 789 msgstr "forzata"
790 790
791 msgid "cannot install the new rpm packages" 791 msgid "cannot install the new rpm packages"
792 msgstr "impossibile installare i pacchetti rpm" 792 msgstr "impossibile installare i pacchetti rpm"
793 793
794 msgid "unknown step \\`$step'" 794 msgid "unknown step \\`$step'"
795 msgstr "lo step \\`$step' non esiste" 795 msgstr "lo step \\`$step' non esiste"
796 796
797 msgid "cleaning up temporary files" 797 msgid "cleaning up temporary files"
798 msgstr "eliminazione dei file temporanei" 798 msgstr "eliminazione dei file temporanei"
799 799
800 msgid "removing source packages and patches, if any" 800 msgid "removing source packages and patches, if any"
801 msgstr "rimozione dei pacchetti sorgente e delle patch, se presenti" 801 msgstr "rimozione dei pacchetti sorgente e delle patch, se presenti"
802 802
803 msgid "removing" 803 msgid "removing"
804 msgstr "rimozione di" 804 msgstr "rimozione di"
805 805
806 msgid "Try to create a specfile for the specified source archive" 806 msgid "Try to create a specfile for the specified source archive"
807 msgstr "Cerca di creare uno specfile per l'archivio sorgente indicato" 807 msgstr "Cerca di creare uno specfile per l'archivio sorgente indicato"
808 808
809 msgid "message" 809 msgid "message"
810 msgstr "messaggio" 810 msgstr "messaggio"
811 811
812 msgid "git-opts" 812 msgid "git-opts"
813 msgstr "opzioni-git" 813 msgstr "opzioni-git"
814 814
815 msgid "Name of the package (default: taken from <source-archive> name)" 815 msgid "Name of the package (default: taken from <source-archive> name)"
816 msgstr "Nome del pacchetto (default: ricavato dal nome dell'archivio " 816 msgstr "Nome del pacchetto (default: ricavato dal nome dell'archivio "
817 "sorgente)" 817 "sorgente)"
818 818
819 msgid "Version of the package (default: taken from <source-archive> name)" 819 msgid "Version of the package (default: taken from <source-archive> name)"
820 msgstr "Versione del pacchetto (default: ricavato dal nome dell'archivio " 820 msgstr "Versione del pacchetto (default: ricavato dal nome dell'archivio "
821 "sorgente)" 821 "sorgente)"
822 822
823 msgid "Typology of the specfile to be created" 823 msgid "Typology of the specfile to be created"
824 msgstr "Categoria dello specfile da generare" 824 msgstr "Categoria dello specfile da generare"
825 825
826 msgid "standard specfile (default)" 826 msgid "standard specfile (default)"
827 msgstr "specfile standard (default)" 827 msgstr "specfile standard (default)"
828 828
829 msgid "specfile for ghc packages" 829 msgid "specfile for ghc packages"
830 msgstr "specfile per pacchetti ghc" 830 msgstr "specfile per pacchetti ghc"
831 831
832 msgid "specfile for gnome packages" 832 msgid "specfile for gnome packages"
833 msgstr "specfile per pacchetti gnome" 833 msgstr "specfile per pacchetti gnome"
834 834
835 msgid "specfile for kde3 packages" 835 msgid "specfile for kde3 packages"
836 msgstr "specfile per pacchetti kde3" 836 msgstr "specfile per pacchetti kde3"
837 837
838 msgid "specfile for kde4 packages" 838 msgid "specfile for kde4 packages"
839 msgstr "specfile per pacchetti kde4" 839 msgstr "specfile per pacchetti kde4"
840 840
841 msgid "specfile for kde5 packages" 841 msgid "specfile for kde5 packages"
842 msgstr "specfile per pacchetti kde5" 842 msgstr "specfile per pacchetti kde5"
843 843
844 msgid "specfile for common library packages" 844 msgid "specfile for common library packages"
845 msgstr "specfile per librerie" 845 msgstr "specfile per librerie"
846 846
847 msgid "specfile for OCaml library packages" 847 msgid "specfile for OCaml library packages"
848 msgstr "specfile per pacchetti librerie OCaml" 848 msgstr "specfile per pacchetti librerie OCaml"
849 849
850 msgid "specfile for single-package perl modules" 850 msgid "specfile for single-package perl modules"
851 msgstr "specfile per singoli moduli perl" 851 msgstr "specfile per singoli moduli perl"
852 852
853 msgid "specfile for python modules" 853 msgid "specfile for python modules"
854 msgstr "specfile per moduli python" 854 msgstr "specfile per moduli python"
855 855
856 msgid "standard specfile for system/network services" 856 msgid "standard specfile for system/network services"
857 msgstr "specfile per servizi di sistema/rete" 857 msgstr "specfile per servizi di sistema/rete"
858 858
859 msgid "specfile for web packages" 859 msgid "specfile for web packages"
860 msgstr "specfile per applicazioni web" 860 msgstr "specfile per applicazioni web"
861 861
862 msgid "Redirect the output to the file <outfile>" 862 msgid "Redirect the output to the file <outfile>"
863 msgstr "Redirige lo standard output sul file <outfile>" 863 msgstr "Redirige lo standard output sul file <outfile>"
864 864
865 msgid "Specify a git branch" 865 msgid "Specify a git branch or tag and (optionally) a commit by appending @commit_id"
866 msgstr "Specifica un branch git" 866 msgstr "Specifica un branch o un tag git e (opzionalmente) un commit aggiungendo @commit_id"
867 867
868 msgid "Do not remove git files" 868 msgid "Do not remove git files"
869 msgstr "Non rimuove i file git" 869 msgstr "Non rimuove i file git"
870 870
871 msgid "remember to modify the value for \\`${NOTE}$id${NORM}'" 871 msgid "remember to modify the value for \\`${NOTE}$id${NORM}'"
872 msgstr "ricordarsi di modificare il valore di \\`${NOTE}$id${NORM}'" 872 msgstr "ricordarsi di modificare il valore di \\`${NOTE}$id${NORM}'"
873 873
874 msgid "unknown build techonology" 874 msgid "unknown build techonology"
875 msgstr "tecnologia di build sconosciuta" 875 msgstr "tecnologia di build sconosciuta"
876 876
877 msgid "line" 877 msgid "line"
878 msgstr "linea" 878 msgstr "linea"
879 879
880 msgid "too many nested @if blocks" 880 msgid "too many nested @if blocks"
881 msgstr "troppi livelli di blocchi @if" 881 msgstr "troppi livelli di blocchi @if"
882 882
883 msgid "@else without @if statement" 883 msgid "@else without @if statement"
884 msgstr "@else senza un corrispondente @if" 884 msgstr "@else senza un corrispondente @if"
885 885
886 msgid "@fi without @if statement" 886 msgid "@fi without @if statement"
887 msgstr "@fi senza un corrispondente @if" 887 msgstr "@fi senza un corrispondente @if"
888 888
889 msgid "missing tarball name" 889 msgid "missing tarball name"
890 msgstr "manca il nome del tarball" 890 msgstr "manca il nome del tarball"
891 891
892 msgid "cannot find the package $pck_tarball" 892 msgid "cannot find the package $pck_tarball"
893 msgstr "impossibile trovare il pacchetto $pck_tarball" 893 msgstr "impossibile trovare il pacchetto $pck_tarball"
894 894
895 msgid "cannot get the package name, use the \\`-n' option" 895 msgid "cannot get the package name, use the \\`-n' option"
896 msgstr "impossibile ricavare il nome del pacchetto, usa l'opzione \\`-n'" 896 msgstr "impossibile ricavare il nome del pacchetto, usa l'opzione \\`-n'"
897 897
898 msgid "invalid version number" 898 msgid "invalid version number"
899 msgstr "numero di versione non valido" 899 msgstr "numero di versione non valido"
900 900
901 msgid "cannot get the package version, use the \\`-v' option" 901 msgid "cannot get the package version, use the \\`-v' option"
902 msgstr "impossibile ricavare la versione del pacchetto, usa l'opzione \\`-v'" 902 msgstr "impossibile ricavare la versione del pacchetto, usa l'opzione \\`-v'"
903 903
904 msgid "can't create output file" 904 msgid "can't create output file"
905 msgstr "impossibile creare il file di output" 905 msgstr "impossibile creare il file di output"
906 906
907 msgid "generating specfile" 907 msgid "generating specfile"
908 msgstr "generazione dello specfile" 908 msgstr "generazione dello specfile"
909 909
910 msgid "source" 910 msgid "source"
911 msgstr "sorgente" 911 msgstr "sorgente"
912 912
913 msgid "mode" 913 msgid "mode"
914 msgstr "modo" 914 msgstr "modo"
915 915
916 msgid "ghc modules must have this name structure (use \\`-n'):" 916 msgid "ghc modules must have this name structure (use \\`-n'):"
917 msgstr "i moduli ghc devono avere questa struttura (usare \\`-n'):" 917 msgstr "i moduli ghc devono avere questa struttura (usare \\`-n'):"
918 918
919 msgid "libraries must have this name structure (use \\`-n'):" 919 msgid "libraries must have this name structure (use \\`-n'):"
920 msgstr "i nomi delle librerie devono avere questa struttura (usare \\`-n'):" 920 msgstr "i nomi delle librerie devono avere questa struttura (usare \\`-n'):"
921 921
922 msgid "ocaml modules must have this name structure (use \\`-n'):" 922 msgid "ocaml modules must have this name structure (use \\`-n'):"
923 msgstr "i nomi dei moduli ocaml devono avere questa struttura (usare \\`-n'):" 923 msgstr "i nomi dei moduli ocaml devono avere questa struttura (usare \\`-n'):"
924 924
925 msgid "perl modules must have this name structure (use \\`-n'):" 925 msgid "perl modules must have this name structure (use \\`-n'):"
926 msgstr "i nomi dei moduli perl devono avere questa struttura (usare \\`-n'):" 926 msgstr "i nomi dei moduli perl devono avere questa struttura (usare \\`-n'):"
927 927
928 msgid "python modules must have this name structure (use \\`-n'):" 928 msgid "python modules must have this name structure (use \\`-n'):"
929 msgstr "i nomi dei moduli python devono avere questa struttura (usare \\`-" 929 msgstr "i nomi dei moduli python devono avere questa struttura (usare \\`-"
930 "n'):" 930 "n'):"
931 931
932 msgid "unsupported package compression method" 932 msgid "unsupported package compression method"
933 msgstr "metodo di compressione del pacchetto non supportato" 933 msgstr "metodo di compressione del pacchetto non supportato"
934 934
935 msgid "looks like a perl package (use \\`-t perl' if this is true)" 935 msgid "looks like a perl package (use \\`-t perl' if this is true)"
936 msgstr "sembra un pacchetto perl (in questo caso usa \\`-t perl')" 936 msgstr "sembra un pacchetto perl (in questo caso usa \\`-t perl')"
937 937
938 msgid "looks like a python module (use \\`-t python' if this is true)" 938 msgid "looks like a python module (use \\`-t python' if this is true)"
939 msgstr "sembra un modulo python (in questo caso usa \\`-t python')" 939 msgstr "sembra un modulo python (in questo caso usa \\`-t python')"
940 940
941 msgid "created specfile" 941 msgid "created specfile"
942 msgstr "creato specfile" 942 msgstr "creato specfile"
943 943
944 msgid "does not point to a valid internet address" 944 msgid "does not point to a valid internet address"
945 msgstr "non fa riferimento ad un indirizzo internet" 945 msgstr "non fa riferimento ad un indirizzo internet"
946 946
947 msgid "patch" 947 msgid "patch"
948 msgstr "patch" 948 msgstr "patch"
949 949
950 msgid "not a standard structure (see config file)" 950 msgid "not a standard structure (see config file)"
951 msgstr "nome con struttura non standard (vedi configurazione)" 951 msgstr "nome con struttura non standard (vedi configurazione)"
952 952
953 msgid "found \\`-D' and/or \\`-T' option(s) in the \\`%setup' directive" 953 msgid "found \\`-D' and/or \\`-T' option(s) in the \\`%setup' directive"
954 msgstr "sospetta opzione \\`-D' e/o \\`-T' nella direttiva \\`%setup'" 954 msgstr "sospetta opzione \\`-D' e/o \\`-T' nella direttiva \\`%setup'"
955 955
956 msgid "missing at least one \\`%defattr' directive" 956 msgid "missing at least one \\`%defattr' directive"
957 msgstr "manca almeno una direttiva \\`%defattr'" 957 msgstr "manca almeno una direttiva \\`%defattr'"
958 958
959 msgid "use rpm macros if possible:" 959 msgid "use rpm macros if possible:"
960 msgstr "utilizzare le macro rpm quando possibile:" 960 msgstr "utilizzare le macro rpm quando possibile:"
961 961
962 962
963 msgid "localization files must be packaged via \\`%find_lang'" 963 msgid "localization files must be packaged via \\`%find_lang'"
964 msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'" 964 msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'"
965 965
966 msgid "package Groups" 966 msgid "package Groups"
967 msgstr "campi Group dei pacchetti" 967 msgstr "campi Group dei pacchetti"
968 968
969 msgid "invalid \\`Group'" 969 msgid "invalid \\`Group'"
970 msgstr "\\`Group' non valido" 970 msgstr "\\`Group' non valido"
971 971
972 msgid "see configuration files" 972 msgid "see configuration files"
973 msgstr "guarda nei file di configurazione" 973 msgstr "guarda nei file di configurazione"
974 974
975 msgid "or enter the command" 975 msgid "or enter the command"
976 msgstr "oppure esegui il comando" 976 msgstr "oppure esegui il comando"
977 977
978 msgid "approved License" 978 msgid "approved License"
979 msgstr "Licenza valida" 979 msgstr "Licenza valida"
980 980
981 msgid "not approved \\`License'" 981 msgid "not approved \\`License'"
982 msgstr "\\`License' non approvata" 982 msgstr "\\`License' non approvata"
983 983
984 msgid "${NOTE}Specfile checks: ${NORM}${WARN}$total_issues${NORM} ${NOTE}" 984 msgid "${NOTE}Specfile checks: ${NORM}${WARN}$total_issues${NORM} ${NOTE}"
985 "warnings.${NORM}" 985 "warnings.${NORM}"
986 msgstr "${NOTE}Controllo dello specfile: problemi riscontrati: " 986 msgstr "${NOTE}Controllo dello specfile: problemi riscontrati: "
987 "${NORM}${WARN}$total_issues${NORM}" 987 "${NORM}${WARN}$total_issues${NORM}"
988 988
989 msgid "performing quality checks" 989 msgid "performing quality checks"
990 msgstr "esecuzione dei test di qualità" 990 msgstr "esecuzione dei test di qualità"
991 991
992 msgid "checking for wrong symbolic links" 992 msgid "checking for wrong symbolic links"
993 msgstr "ricerca di link simbolici errati" 993 msgstr "ricerca di link simbolici errati"
994 994
995 msgid "wrong symlink" 995 msgid "wrong symlink"
996 msgstr "link simbolico incorretto" 996 msgstr "link simbolico incorretto"
997 997
998 msgid "checking for \\`$SPEC_BUILDROOT' (%buildroot) strings" 998 msgid "checking for \\`$SPEC_BUILDROOT' (%buildroot) strings"
999 msgstr "ricerca della stringa \\`$SPEC_BUILDROOT' (%buildroot)" 999 msgstr "ricerca della stringa \\`$SPEC_BUILDROOT' (%buildroot)"
1000 1000
1001 msgid "checking for %buildroot strings" 1001 msgid "checking for %buildroot strings"
1002 msgstr "ricerca delle stringhe %buildroot" 1002 msgstr "ricerca delle stringhe %buildroot"
1003 1003
1004 msgid "N/A" 1004 msgid "N/A"
1005 msgstr "N/A" 1005 msgstr "N/A"
1006 1006
1007 msgid "mime type: " 1007 msgid "mime type: "
1008 msgstr "tipo mime: " 1008 msgstr "tipo mime: "
1009 1009
1010 msgid "checking for \\`$BUILDDIR' (%_builddir) strings" 1010 msgid "checking for \\`$BUILDDIR' (%_builddir) strings"
1011 msgstr "ricerca della stringa \\`$BUILDDIR' (%_builddir)" 1011 msgstr "ricerca della stringa \\`$BUILDDIR' (%_builddir)"
1012 1012
1013 msgid "checking for suspicious plugins in devel packages" 1013 msgid "checking for suspicious plugins in devel packages"
1014 msgstr "controllo di plugin sospetti nei pacchetti devel" 1014 msgstr "controllo di plugin sospetti nei pacchetti devel"
1015 1015
1016 msgid "found suspect plugin \\`${NOTE}$f${NORM}'" 1016 msgid "found suspect plugin \\`${NOTE}$f${NORM}'"
1017 msgstr "trovato sospetto plugin \\`${NOTE}$f${NORM}'" 1017 msgstr "trovato sospetto plugin \\`${NOTE}$f${NORM}'"
1018 1018
1019 msgid "checking for wrong file attributes in bin and lib directories" 1019 msgid "checking for wrong file attributes in bin and lib directories"
1020 msgstr "ricerca di file binari e librerie con permessi errati" 1020 msgstr "ricerca di file binari e librerie con permessi errati"
1021 1021
1022 msgid "found suspect file" 1022 msgid "found suspect file"
1023 msgstr "file sospetto" 1023 msgstr "file sospetto"
1024 1024
1025 msgid "checking for libraries with undefined symbols after relocation" 1025 msgid "checking for libraries with undefined symbols after relocation"
1026 msgstr "ricerca di librerie con simboli indefiniti dopo rilocazione" 1026 msgstr "ricerca di librerie con simboli indefiniti dopo rilocazione"
1027 1027
1028 msgid "checking for binary files installed in /etc (see FHS)" 1028 msgid "checking for binary files installed in /etc (see FHS)"
1029 msgstr "ricerca di file binari installati in /etc (vedi FHS)" 1029 msgstr "ricerca di file binari installati in /etc (vedi FHS)"
1030 1030
1031 msgid "checking if the info catalog is updated when necessary" 1031 msgid "checking if the info catalog is updated when necessary"
1032 msgstr "controllo se il registro delle pagine info viene aggiornato" 1032 msgstr "controllo se il registro delle pagine info viene aggiornato"
1033 1033
1034 msgid "info pages should be installed/uninstalled" 1034 msgid "info pages should be installed/uninstalled"
1035 msgstr "le pagine info dovrebbero essere installate/disinstallate" 1035 msgstr "le pagine info dovrebbero essere installate/disinstallate"
1036 1036
1037 msgid "checking packages for wrong user and/or group ownerships" 1037 msgid "checking packages for wrong user and/or group ownerships"
1038 msgstr "ricerca di pacchetti contenenti file con errato utente e/o gruppo" 1038 msgstr "ricerca di pacchetti contenenti file con errato utente e/o gruppo"
1039 1039
1040 msgid "checking packages for desktop files installed in the applnk dir" 1040 msgid "checking packages for desktop files installed in the applnk dir"
1041 msgstr "ricerca di pacchetti con file desktop installati in applnk" 1041 msgstr "ricerca di pacchetti con file desktop installati in applnk"
1042 1042
1043 msgid "create desktop files for:" 1043 msgid "create desktop files for:"
1044 msgstr "creare file desktop per:" 1044 msgstr "creare file desktop per:"
1045 1045
1046 msgid "see:" 1046 msgid "see:"
1047 msgstr "vedere:" 1047 msgstr "vedere:"
1048 1048
1049 msgid "checking for packages with bad BuildArch tag" 1049 msgid "checking for packages with bad BuildArch tag"
1050 msgstr "ricerca di pacchetti con errato tag BuildArch" 1050 msgstr "ricerca di pacchetti con errato tag BuildArch"
1051 1051
1052 msgid "this package should be tagged \\`noarch'" 1052 msgid "this package should be tagged \\`noarch'"
1053 msgstr "questo pacchetto dovrebbe essere di tipo \\`noarch'" 1053 msgstr "questo pacchetto dovrebbe essere di tipo \\`noarch'"
1054 1054
1055 msgid "${NOTE}Quality checks: ${#rpmpkg_name[@]} package(s) checked: " 1055 msgid "${NOTE}Quality checks: ${#rpmpkg_name[@]} package(s) checked: "
1056 "${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}" 1056 "${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
1057 msgstr "${NOTE}Controlli di qualità: pacchetti rpm: ${#rpmpkg_name[@]}; " 1057 msgstr "${NOTE}Controlli di qualità: pacchetti rpm: ${#rpmpkg_name[@]}; "
1058 "problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}" 1058 "problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"
1059 1059
1060 msgid "performing security checks" 1060 msgid "performing security checks"
1061 msgstr "esecuzione dei test di sicurezza" 1061 msgstr "esecuzione dei test di sicurezza"
1062 1062
1063 msgid "checking for RPATH vulnerabilities" 1063 msgid "checking for RPATH vulnerabilities"
1064 msgstr "ricerca di vulnerabilità di tipo RPATH" 1064 msgstr "ricerca di vulnerabilità di tipo RPATH"
1065 1065
1066 msgid "checking for setuid binaries" 1066 msgid "checking for setuid binaries"
1067 msgstr "ricerca di binari setuid" 1067 msgstr "ricerca di binari setuid"
1068 1068
1069 msgid "checking for setgid directories" 1069 msgid "checking for setgid directories"
1070 msgstr "ricerca di directory setgid" 1070 msgstr "ricerca di directory setgid"
1071 1071
1072 msgid "checking for unsecure use of \\`\\$\\$' in shell and perl scripts" 1072 msgid "checking for unsecure use of \\`\\$\\$' in shell and perl scripts"
1073 msgstr "ricerca di script shell e perl che utilizzano \\`\\$\\$' in modo " 1073 msgstr "ricerca di script shell e perl che utilizzano \\`\\$\\$' in modo "
1074 "insicuro" 1074 "insicuro"
1075 1075
1076 msgid "seems to be affected" 1076 msgid "seems to be affected"
1077 msgstr "sembra affetto" 1077 msgstr "sembra affetto"
1078 1078
1079 msgid "Hint for bash scripts (\\`mktemp' required)" 1079 msgid "Hint for bash scripts (\\`mktemp' required)"
1080 msgstr "Suggerimento per script bash (richiede \\`mktemp')" 1080 msgstr "Suggerimento per script bash (richiede \\`mktemp')"
1081 1081
1082 msgid "Hint for perl scripts" 1082 msgid "Hint for perl scripts"
1083 msgstr "Suggerimento per script perl" 1083 msgstr "Suggerimento per script perl"
1084 1084
1085 msgid "${NOTE}Security checks: ${#rpmpkg_name[@]} package(s) checked: " 1085 msgid "${NOTE}Security checks: ${#rpmpkg_name[@]} package(s) checked: "
1086 "${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}" 1086 "${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
1087 msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; " 1087 msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; "
1088 "problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}" 1088 "problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"
1089 1089