~ubuntu-branches/ubuntu/oneiric/gnupg2/oneiric-updates

« back to all changes in this revision

Viewing changes to checks/defs.inc

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# definitions for the check scripts
2
 
 
3
 
#--------------------------------
4
 
#------ constants ---------------
5
 
#--------------------------------
6
 
 
7
 
# Note that usrpass1 is also used in Makefile.am
8
 
usrname1="one"
9
 
usrpass1="def"
10
 
usrname2="two"
11
 
usrpass2=""
12
 
usrname3="three"
13
 
usrpass3="abc"
14
 
 
15
 
 
16
 
dsa_usrname1="pgp5"
17
 
# we use the sub key because we do not yet have the logic to
18
 
# to derive the first encryption key from a keyblock (I guess)
19
 
dsa_usrname2="0xCB879DE9"
20
 
 
21
 
dsa_keyrings="--keyring ./pubring.pkr --secret-keyring ./secring.skr"
22
 
 
23
 
 
24
 
plain_files="plain-1 plain-2 plain-3"
25
 
data_files="data-500 data-9000 data-32000 data-80000"
26
 
exp_files=""
27
 
 
28
 
# The testscripts expect the original language
29
 
LANG=
30
 
LANGUAGE=
31
 
LC_ALL=
32
 
LC_MESSAGES=
33
 
 
34
 
#--------------------------------
35
 
#------ utility functions -------
36
 
#--------------------------------
37
 
 
38
 
fatal () {
39
 
    echo "$pgmname: fatal:" $* >&2
40
 
    exit 1;
41
 
}
42
 
 
43
 
error () {
44
 
    echo "$pgmname:" $* >&2
45
 
    exit 1
46
 
}
47
 
 
48
 
info () {
49
 
    echo "$pgmname:" $* >&2
50
 
}
51
 
 
52
 
 
53
 
echo_n_init=no
54
 
echo_n () {
55
 
  if test "$echo_n_init" = "no"; then
56
 
    if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
57
 
      if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
58
 
        echo_n_n=
59
 
        echo_n_c='
60
 
'
61
 
      else
62
 
        echo_n_n='-n'
63
 
        echo_n_c=
64
 
      fi
65
 
    else
66
 
      echo_n_n=
67
 
      echo_n_c='\c'
68
 
    fi
69
 
    echo_n_init=yes
70
 
  fi
71
 
  echo $echo_n_n "${1}$echo_n_c"
72
 
}
73
 
 
74
 
 
75
 
#cleanup () {
76
 
#    rm $cleanup_files 2>/dev/null || true
77
 
#    echo "#empty" >./options
78
 
#}
79
 
 
80
 
 
81
 
#add_cleanup () {
82
 
#    cleanup_files="$cleanup_files $*"
83
 
#}
84
 
 
85
 
 
86
 
have_hash_algo () {
87
 
  if  ../g10/gpg --homedir .  --version | grep "Hash:.*$1" >/dev/null
88
 
  then
89
 
        true
90
 
  else
91
 
        false
92
 
  fi
93
 
}
94
 
 
95
 
set -e
96
 
pgmname=`basename $0`
97
 
#trap cleanup SIGHUP SIGINT SIGQUIT
98
 
 
99
 
[ -z "$srcdir" ] && fatal "not called from make"
100
 
 
101
 
GPG="../g10/gpg --homedir . "
102
 
 
103
 
exec 2> ${pgmname}.log
104
 
 
105
 
:
106
 
# end
 
 
b'\\ No newline at end of file'