Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
df2a04bb
D
Dak
项目概览
喜羊羊3508
/
Dak
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dak
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
df2a04bb
编写于
4月 24, 2008
作者:
T
Thomas Viehmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
check keyring uids for uploader address before adding presumed sponsor to recipient
上级
b295c903
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
32 addition
and
4 deletion
+32
-4
ChangeLog
ChangeLog
+7
-3
dak/process_unchecked.py
dak/process_unchecked.py
+4
-1
daklib/utils.py
daklib/utils.py
+21
-0
未找到文件。
ChangeLog
浏览文件 @
df2a04bb
2008
-
04
-
23
Thomas
Viehmann
<
tviehmann
@
ries
.
debian
.
org
>
2008
-
04
-
23
Thomas
Viehmann
<
tviehmann
@
debian
.
org
>
*
dak
/
process_unchecked
.
py
:
add
changes
[
"sponsoremail"
]
for
sponsored
uploads
if
desired
*
daklib
/
queue
.
py
:
add
changes
[
"sponsoremail"
]
to
Subst
[
"__MAINTAINER_TO__"
]
if
present
*
daklib
/
utils
.
py
:
add
functions
is_email_alias
to
check
which
accounts
allow
email
forwarding
and
which_alias_file
to
find
the
alias
file
is_email_alias
to
check
which
accounts
allow
email
forwarding
,
which_alias_file
to
find
the
alias
file
,
and
gpg_get_key_addresses
to
find
uid
addresses
for
a
given
fingerprint
2008
-
04
-
22
Joerg
Jaspert
<
joerg
@
debian
.
org
>
...
...
dak/process_unchecked.py
浏览文件 @
df2a04bb
...
...
@@ -1073,6 +1073,9 @@ def check_signed_by_key():
else
:
sponsored
=
1
if
daklib
.
utils
.
is_email_alias
(
uid_email
):
sponsor_addresses
=
daklib
.
utils
.
gpg_get_key_addresses
(
changes
[
"fingerprint"
])
if
(
changes
[
"maintaineremail"
]
not
in
sponsor_addresses
and
changes
[
"changedbyemail"
]
not
in
sponsor_addresses
):
changes
[
"sponsoremail"
]
=
uid_email
if
sponsored
and
not
may_sponsor
:
...
...
daklib/utils.py
浏览文件 @
df2a04bb
...
...
@@ -41,6 +41,7 @@ re_multi_line_field = re.compile(r"^\s(.*)")
re_taint_free
=
re
.
compile
(
r
"^[-+~/\.\w]+$"
)
re_parse_maintainer
=
re
.
compile
(
r
"^\s*(\S.*\S)\s*\<([^\>]+)\>"
)
re_gpg_uid
=
re
.
compile
(
'^uid.*<([^>]*)>'
)
re_srchasver
=
re
.
compile
(
r
"^(\S+)\s+\((\S+)\)$"
)
re_verwithext
=
re
.
compile
(
r
"^(\d+)(?:\.(\d+))(?:\s+\((\S+)\))?$"
)
...
...
@@ -60,6 +61,7 @@ default_config = "/etc/dak/dak.conf"
default_apt_config
=
"/etc/dak/apt.conf"
alias_cache
=
None
key_uid_email_cache
=
{}
################################################################################
...
...
@@ -1091,6 +1093,25 @@ used."""
################################################################################
def
gpg_get_key_addresses
(
fingerprint
):
"""retreive email addresses from gpg key uids for a given fingerprint"""
addresses
=
key_uid_email_cache
.
get
(
fingerprint
)
if
addresses
!=
None
:
return
addresses
addresses
=
set
()
cmd
=
"gpg --no-default-keyring %s --fingerprint %s"
\
%
(
gpg_keyring_args
(),
fingerprint
)
(
result
,
output
)
=
commands
.
getstatusoutput
(
cmd
)
if
result
==
0
:
for
l
in
output
.
split
(
'
\n
'
):
m
=
re_gpg_uid
.
match
(
l
)
if
m
:
addresses
.
add
(
m
.
group
(
1
))
key_uid_email_cache
[
fingerprint
]
=
addresses
return
addresses
################################################################################
# Inspired(tm) by http://www.zopelabs.com/cookbook/1022242603
def
wrap
(
paragraph
,
max_length
,
prefix
=
""
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录