Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
602
Issues
602
List
Boards
Labels
Service Desk
Milestones
Merge Requests
109
Merge Requests
109
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
470af54b
Commit
470af54b
authored
Apr 29, 2016
by
Evan Hunt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[master] more python2/3 compatibility fixes; use setup.py to install
parent
304d16f0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
48 deletions
+43
-48
bin/python/Makefile.in
bin/python/Makefile.in
+2
-0
bin/python/isc/Makefile.in
bin/python/isc/Makefile.in
+3
-25
bin/python/isc/__init__.py
bin/python/isc/__init__.py
+4
-2
bin/python/isc/checkds.py
bin/python/isc/checkds.py
+3
-2
bin/python/isc/coverage.py
bin/python/isc/coverage.py
+3
-4
bin/python/isc/dnskey.py
bin/python/isc/dnskey.py
+3
-3
bin/python/isc/keymgr.py
bin/python/isc/keymgr.py
+3
-4
bin/python/isc/policy.py
bin/python/isc/policy.py
+5
-1
bin/python/setup.py
bin/python/setup.py
+8
-0
configure
configure
+5
-4
configure.in
configure.in
+4
-3
No files found.
bin/python/Makefile.in
View file @
470af54b
...
...
@@ -59,9 +59,11 @@ install:: ${TARGETS} installdirs
${INSTALL_DATA}
${srcdir}
/dnssec-checkds.8
${DESTDIR}${mandir}
/man8
${INSTALL_DATA}
${srcdir}
/dnssec-coverage.8
${DESTDIR}${mandir}
/man8
${INSTALL_DATA}
${srcdir}
/dnssec-keymgr.8
${DESTDIR}${mandir}
/man8
test
-z
"
${PYTHON}
"
||
${PYTHON}
setup.py
install
--prefix
=
${DESTDIR}${prefix}
clean distclean
::
rm
-f
${TARGETS}
rm
-rf
build
distclean
::
rm
-f
dnssec-checkds.py dnssec-coverage.py dnssec-keymgr.py
bin/python/isc/Makefile.in
View file @
470af54b
...
...
@@ -24,9 +24,7 @@ PYTHON = @PYTHON@
PYSRCS
=
__init__.py dnskey.py eventlist.py keydict.py
\
keyevent.py keyzone.py policy.py
TARGETS
=
parsetab.py parsetab.pyc
\
__init__.pyc dnskey.pyc eventlist.py keydict.py
\
keyevent.pyc keyzone.pyc policy.pyc
TARGETS
=
parsetab.py
@BIND9_MAKE_RULES@
...
...
@@ -34,35 +32,15 @@ TARGETS = parsetab.py parsetab.pyc \
.py.pyc
:
$(PYTHON)
-m
compileall .
parsetab.py
parsetab.pyc
:
policy.py
parsetab.py
:
policy.py
$(PYTHON)
policy.py parse /dev/null
>
/dev/null
$(PYTHON)
-m
parsetab
installdirs
:
$(SHELL)
${top_srcdir}
/mkinstalldirs
${DESTDIR}${libdir}
/isc
install
::
${PYSRCS} installdirs
${INSTALL_SCRIPT}
__init__.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
__init__.pyc
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
dnskey.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
dnskey.pyc
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
eventlist.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
eventlist.pyc
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
keydict.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
keydict.pyc
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
keyevent.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
keyevent.pyc
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
keyzone.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
keyzone.pyc
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
policy.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
policy.pyc
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
parsetab.py
${DESTDIR}${libdir}
${INSTALL_SCRIPT}
parsetab.pyc
${DESTDIR}${libdir}
check test
:
subdirs
clean distclean
::
rm
-f
*
.pyc parser.out parsetab.py
rm
-rf
__pycache__ build
distclean
::
rm
-Rf
utils.py
bin/python/isc/__init__.py
View file @
470af54b
...
...
@@ -14,8 +14,10 @@
# PERFORMANCE OF THIS SOFTWARE.
############################################################################
__all__
=
[
'dnskey'
,
'eventlist'
,
'keydict'
,
'keyevent'
,
'keyseries'
,
'keyzone'
,
'policy'
,
'parsetab'
,
'utils'
]
__all__
=
[
'checkds'
,
'coverage'
,
'keymgr'
,
'dnskey'
,
'eventlist'
,
'keydict'
,
'keyevent'
,
'keyseries'
,
'keyzone'
,
'policy'
,
'parsetab'
,
'utils'
]
from
isc.dnskey
import
*
from
isc.eventlist
import
*
from
isc.keydict
import
*
...
...
bin/python/isc/checkds.py
View file @
470af54b
...
...
@@ -42,7 +42,7 @@ class SECRR:
if
not
rrtext
:
raise
Exception
fields
=
rrtext
.
split
()
fields
=
rrtext
.
decode
(
'ascii'
).
split
()
if
len
(
fields
)
<
7
:
raise
Exception
...
...
@@ -75,7 +75,8 @@ class SECRR:
fields
=
fields
[
2
:]
if
fields
[
0
].
upper
()
!=
self
.
rrtype
:
raise
Exception
raise
Exception
(
'%s does not match %s'
%
(
fields
[
0
].
upper
(),
self
.
rrtype
))
self
.
keyid
,
self
.
keyalg
,
self
.
hashalg
=
map
(
int
,
fields
[
1
:
4
])
self
.
digest
=
''
.
join
(
fields
[
4
:]).
upper
()
...
...
bin/python/isc/coverage.py
View file @
470af54b
...
...
@@ -27,9 +27,7 @@ from collections import defaultdict
prog
=
'dnssec-coverage'
from
isc
import
*
from
isc.utils
import
prefix
from
isc
import
dnskey
,
eventlist
,
keydict
,
keyevent
,
keyzone
,
utils
############################################################################
# print a fatal error and exit
...
...
@@ -139,7 +137,8 @@ def set_path(command, default=None):
def
parse_args
():
"""Read command line arguments, set global 'args' structure"""
compilezone
=
set_path
(
'named-compilezone'
,
os
.
path
.
join
(
prefix
(
'sbin'
),
'named-compilezone'
))
os
.
path
.
join
(
utils
.
prefix
(
'sbin'
),
'named-compilezone'
))
parser
=
argparse
.
ArgumentParser
(
description
=
prog
+
': checks future '
+
'DNSKEY coverage for a zone'
)
...
...
bin/python/isc/dnskey.py
View file @
470af54b
...
...
@@ -48,7 +48,7 @@ class dnskey:
self
.
fromtuple
(
name
,
alg
,
keyid
,
keyttl
)
self
.
_dir
=
directory
or
os
.
path
.
dirname
(
key
)
or
'.'
key
=
os
.
path
.
basename
(
key
)
.
decode
(
'ascii'
)
key
=
os
.
path
.
basename
(
key
)
(
name
,
alg
,
keyid
)
=
key
.
split
(
'+'
)
name
=
name
[
1
:
-
1
]
alg
=
int
(
alg
)
...
...
@@ -204,11 +204,11 @@ class dnskey:
raise
Exception
(
'unable to generate key: '
+
str
(
stderr
))
try
:
keystr
=
stdout
.
splitlines
()[
0
]
keystr
=
stdout
.
splitlines
()[
0
]
.
decode
(
'ascii'
)
newkey
=
dnskey
(
keystr
,
keys_dir
,
ttl
)
return
newkey
except
Exception
as
e
:
raise
Exception
(
'unable to
generate
key: %s'
%
str
(
e
))
raise
Exception
(
'unable to
parse generated
key: %s'
%
str
(
e
))
def
generate_successor
(
self
,
keygen_bin
,
**
kwargs
):
quiet
=
kwargs
.
get
(
'quiet'
,
False
)
...
...
bin/python/isc/keymgr.py
View file @
470af54b
...
...
@@ -20,8 +20,7 @@ from collections import defaultdict
prog
=
'dnssec-keymgr'
from
isc
import
*
from
isc.utils
import
prefix
from
isc
import
dnskey
,
keydict
,
keyseries
,
policy
,
parsetab
,
utils
############################################################################
# print a fatal error and exit
...
...
@@ -63,9 +62,9 @@ def parse_args():
"""
keygen
=
set_path
(
'dnssec-keygen'
,
os
.
path
.
join
(
prefix
(
'sbin'
),
'dnssec-keygen'
))
os
.
path
.
join
(
utils
.
prefix
(
'sbin'
),
'dnssec-keygen'
))
settime
=
set_path
(
'dnssec-settime'
,
os
.
path
.
join
(
prefix
(
'sbin'
),
'dnssec-settime'
))
os
.
path
.
join
(
utils
.
prefix
(
'sbin'
),
'dnssec-settime'
))
parser
=
argparse
.
ArgumentParser
(
description
=
prog
+
': schedule '
'DNSSEC key rollovers according to a '
...
...
bin/python/isc/policy.py
View file @
470af54b
...
...
@@ -101,8 +101,12 @@ class PolicyLex:
t
.
lexer
.
skip
(
1
)
def
__init__
(
self
,
**
kwargs
):
if
'maketrans'
in
dir
(
str
):
trans
=
str
.
maketrans
(
'_'
,
'-'
)
else
:
trans
=
maketrans
(
'_'
,
'-'
)
for
r
in
self
.
reserved
:
self
.
reserved_map
[
r
.
lower
().
translate
(
str
.
maketrans
(
'_'
,
'-'
)
)]
=
r
self
.
reserved_map
[
r
.
lower
().
translate
(
trans
)]
=
r
self
.
lexer
=
lex
.
lex
(
object
=
self
,
**
kwargs
)
def
test
(
self
,
text
):
...
...
bin/python/setup.py
0 → 100644
View file @
470af54b
from
distutils.core
import
setup
setup
(
name
=
'isc'
,
version
=
'2.0'
,
description
=
'Python functions to support BIND utilities'
,
url
=
'https://www.isc.org/bind'
,
author
=
'Internet Systems Consortium, Inc'
,
license
=
'ISC'
,
packages
=
[
'isc'
])
configure
View file @
470af54b
...
...
@@ -11893,11 +11893,12 @@ $as_echo_n "checking python module 'ply'... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
$as_echo "found" >&6; }
break
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
unset ac_cv_path_PYTHON
unset PYTHON
unset ac_cv_path_PYTHON
unset PYTHON
fi
done
if test "X$PYTHON" = "X"
then
...
...
configure.in
View file @
470af54b
...
...
@@ -258,10 +258,11 @@ case "$use_python" in
if ${PYTHON:-false} -c "$testply"; then
AC_MSG_RESULT([found])
break
else
AC_MSG_RESULT([not found])
unset ac_cv_path_PYTHON
unset PYTHON
fi
AC_MSG_RESULT([not found])
unset ac_cv_path_PYTHON
unset PYTHON
done
if test "X$PYTHON" = "X"
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment