~ubuntu-branches/ubuntu/precise/nss-pam-ldapd/precise-security

« back to all changes in this revision

Viewing changes to py-compile

  • Committer: Package Import Robot
  • Author(s): Arthur de Jong
  • Date: 2011-09-04 21:00:00 UTC
  • mfrom: (14.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20110904210000-pe3u91iga88vtr16
Tags: 0.8.4
* Upload to unstable
* switch to using the member attribute by default instead of
  uniqueMember (backwards incompatible change)
* only return "x" as a password hash when the object has the shadowAccount
  objectClass and nsswitch.conf is configured to do shadow lookups using
  LDAP (this avoids some problems with pam_unix)
* fix problem with partial attribute name matches in DN (thanks Timothy
  White)
* fix a problem with objectSid mappings with recent versions of OpenLDAP
  (patch by Wesley Mason)
* set the socket timeout in a connection callback to avoid timeout
  issues during the SSL handshake (patch by Stefan Völkel)
* check for unknown variables in pam_authz_search
* only check password expiration when authenticating, only check account
  expiration when doing authorisation
* make buffer sizes consistent and grow all buffers holding string
  representations of numbers to be able to hold 64-bit numbers
* update AX_PTHREAD from autoconf-archive
* support querying DNS SRV records from a different domain than the current
  one (based on a patch by James M. Leddy)
* fix a problem with uninitialised memory while parsing the tls_ciphers
  option (closes: #638872) (but doesn't work yet due to #640384)
* implement bounds checking of numeric values read from LDAP (patch by
  Jakub Hrozek)
* correctly support large uid and gid values from LDAP (patch by Jakub
  Hrozek)
* improvements to the configure script (patch by Jakub Hrozek)
* switch to dh for debian/rules and bump debhelper compatibility to 8
* build Debian packages with multiarch support
* ship shlibs (but still no symbol files) for libnss-ldapd since that was
  the easiest way to support multiarch
* fix output in init script when restarting nslcd (closes: #637132)
* correctly handle leading and trailing spaces in preseeded debconf uri
  option (patch by Andreas B. Mundt) (closes: #637863)
* support spaces around database names in /etc/nsswitch.conf while
  configuring package (closes: #640185)
* updated Russian debconf translation by Yuri Kozlov (closes: #637751)
* updated French debconf translation by Christian Perrier (closes: #637756)
* added Slovak debconf translation by Slavko (closes: #637759)
* updated Danish debconf translation by Joe Hansen (closes :#637763)
* updated Brazilian Portuguese debconf translation by Denis Doria
* updated Portuguese debconf translation by Américo Monteiro
* updated Japanese debconf translation by Kenshi Muto (closes: #638195)
* updated Czech debconf translation by Miroslav Kure (closes: #639026)
* updated German debconf translation by Chris Leick (closes: #639107)
* updated Spanish debconf translation by Francisco Javier Cuadrado
  (closes: #639236)
* updated Dutch debconf translation by Arthur de Jong with help from Paul
  Gevers and Jeroen Schot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# py-compile - Compile a Python program
 
3
 
 
4
scriptversion=2009-04-28.21; # UTC
 
5
 
 
6
# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
 
7
# Foundation, Inc.
 
8
 
 
9
# This program is free software; you can redistribute it and/or modify
 
10
# it under the terms of the GNU General Public License as published by
 
11
# the Free Software Foundation; either version 2, or (at your option)
 
12
# any later version.
 
13
 
 
14
# This program is distributed in the hope that it will be useful,
 
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
# GNU General Public License for more details.
 
18
 
 
19
# You should have received a copy of the GNU General Public License
 
20
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
 
 
22
# As a special exception to the GNU General Public License, if you
 
23
# distribute this file as part of a program that contains a
 
24
# configuration script generated by Autoconf, you may include it under
 
25
# the same distribution terms that you use for the rest of that program.
 
26
 
 
27
# This file is maintained in Automake, please report
 
28
# bugs to <bug-automake@gnu.org> or send patches to
 
29
# <automake-patches@gnu.org>.
 
30
 
 
31
if [ -z "$PYTHON" ]; then
 
32
  PYTHON=python
 
33
fi
 
34
 
 
35
basedir=
 
36
destdir=
 
37
files=
 
38
while test $# -ne 0; do
 
39
  case "$1" in
 
40
    --basedir)
 
41
      basedir=$2
 
42
      if test -z "$basedir"; then
 
43
        echo "$0: Missing argument to --basedir." 1>&2
 
44
        exit 1
 
45
      fi
 
46
      shift
 
47
      ;;
 
48
    --destdir)
 
49
      destdir=$2
 
50
      if test -z "$destdir"; then
 
51
        echo "$0: Missing argument to --destdir." 1>&2
 
52
        exit 1
 
53
      fi
 
54
      shift
 
55
      ;;
 
56
    -h|--h*)
 
57
      cat <<\EOF
 
58
Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
 
59
 
 
60
Byte compile some python scripts FILES.  Use --destdir to specify any
 
61
leading directory path to the FILES that you don't want to include in the
 
62
byte compiled file.  Specify --basedir for any additional path information you
 
63
do want to be shown in the byte compiled file.
 
64
 
 
65
Example:
 
66
  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
 
67
 
 
68
Report bugs to <bug-automake@gnu.org>.
 
69
EOF
 
70
      exit $?
 
71
      ;;
 
72
    -v|--v*)
 
73
      echo "py-compile $scriptversion"
 
74
      exit $?
 
75
      ;;
 
76
    *)
 
77
      files="$files $1"
 
78
      ;;
 
79
  esac
 
80
  shift
 
81
done
 
82
 
 
83
if test -z "$files"; then
 
84
    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
 
85
    exit 1
 
86
fi
 
87
 
 
88
# if basedir was given, then it should be prepended to filenames before
 
89
# byte compilation.
 
90
if [ -z "$basedir" ]; then
 
91
    pathtrans="path = file"
 
92
else
 
93
    pathtrans="path = os.path.join('$basedir', file)"
 
94
fi
 
95
 
 
96
# if destdir was given, then it needs to be prepended to the filename to
 
97
# byte compile but not go into the compiled file.
 
98
if [ -z "$destdir" ]; then
 
99
    filetrans="filepath = path"
 
100
else
 
101
    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
 
102
fi
 
103
 
 
104
$PYTHON -c "
 
105
import sys, os, py_compile
 
106
 
 
107
files = '''$files'''
 
108
 
 
109
sys.stdout.write('Byte-compiling python modules...\n')
 
110
for file in files.split():
 
111
    $pathtrans
 
112
    $filetrans
 
113
    if not os.path.exists(filepath) or not (len(filepath) >= 3
 
114
                                            and filepath[-3:] == '.py'):
 
115
            continue
 
116
    sys.stdout.write(file)
 
117
    sys.stdout.flush()
 
118
    py_compile.compile(filepath, filepath + 'c', path)
 
119
sys.stdout.write('\n')" || exit $?
 
120
 
 
121
# this will fail for python < 1.5, but that doesn't matter ...
 
122
$PYTHON -O -c "
 
123
import sys, os, py_compile
 
124
 
 
125
files = '''$files'''
 
126
sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
 
127
for file in files.split():
 
128
    $pathtrans
 
129
    $filetrans
 
130
    if not os.path.exists(filepath) or not (len(filepath) >= 3
 
131
                                            and filepath[-3:] == '.py'):
 
132
            continue
 
133
    sys.stdout.write(file)
 
134
    sys.stdout.flush()
 
135
    py_compile.compile(filepath, filepath + 'o', path)
 
136
sys.stdout.write('\n')" 2>/dev/null || :
 
137
 
 
138
# Local Variables:
 
139
# mode: shell-script
 
140
# sh-indentation: 2
 
141
# eval: (add-hook 'write-file-hooks 'time-stamp)
 
142
# time-stamp-start: "scriptversion="
 
143
# time-stamp-format: "%:y-%02m-%02d.%02H"
 
144
# time-stamp-time-zone: "UTC"
 
145
# time-stamp-end: "; # UTC"
 
146
# End: