mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
merged RainCT's branch (with changes from bigon) to fix #144224 (requestsync: make smtp server customizable)
This commit is contained in:
commit
3f12f44b69
6
README
6
README
@ -23,7 +23,7 @@ mk-sbuild-lv
|
||||
... will create LVM snapshot chroots via schroot and sbuild. It assumes that
|
||||
sbuild has not be installed and configured before.
|
||||
|
||||
pbuilder-dist [create|update|build|clean|login|execute]
|
||||
pbuilder-dist [withlog] [create|update|build|clean|login|execute]
|
||||
... is a wrapper to use pbuilder with many different distributions / versions.
|
||||
It has to be renamed to something like pbuilder-feisty, pbuilder-gutsy, etc.
|
||||
|
||||
@ -37,6 +37,10 @@ pull-debian-debdiff <package> <version>
|
||||
... will attempt to find and download a specific version of a Debian package
|
||||
and its immediate parent to generate a debdiff.
|
||||
|
||||
requestsync [-n|-s] <source package> <target release> [base version]
|
||||
... will fill a sync for a package from Debian by sending a bug report to
|
||||
Launchpad.
|
||||
|
||||
suspicious-source
|
||||
... will output a list of files which are not common source files. This should be
|
||||
run in the root of a source tree to find files which might not be the "prefered
|
||||
|
5
debian/changelog
vendored
5
debian/changelog
vendored
@ -1,7 +1,12 @@
|
||||
ubuntu-dev-tools (0.19) UNRELEASED; urgency=low
|
||||
|
||||
[ Siegfried-Angel Gevatter Pujals (RainCT) ]
|
||||
* requestsync: allow to customize the SMTP server (LP: #144244)
|
||||
* Add a short description for requestsync to the README file.
|
||||
|
||||
[ Laurent Bigonville ]
|
||||
* pbuilder-dist: Fix error on chroot creation (LP: #146475)
|
||||
* requestsync: allow to customize the SMTP port
|
||||
|
||||
-- Adrien Cunin <adri2000@ubuntu.com> Sun, 07 Oct 2007 00:03:57 +0200
|
||||
|
||||
|
33
requestsync
33
requestsync
@ -192,8 +192,39 @@ Subject: Please sync %s %s (%s) from Debian unstable (%s)
|
||||
print mail
|
||||
|
||||
print 'Press enter to file this bug, Control-C to abort'
|
||||
|
||||
sys.stdin.readline()
|
||||
|
||||
s = smtplib.SMTP('fiordland.ubuntu.com')
|
||||
# get server address
|
||||
mailserver = os.getenv('DEBSMTP')
|
||||
if mailserver:
|
||||
print 'Using custom SMTP server:', mailserver
|
||||
else :
|
||||
mailserver = 'fiordland.ubuntu.com'
|
||||
|
||||
# get server port
|
||||
mailserver_port = os.getenv('DEBSMTP_PORT')
|
||||
if mailserver_port:
|
||||
print 'Using custom SMTP port:', mailserver_port
|
||||
else:
|
||||
mailserver_port = 25
|
||||
|
||||
# connect to the server
|
||||
s = smtplib.SMTP(mailserver, mailserver_port)
|
||||
|
||||
# authenticate to the server
|
||||
mailserver_user = os.getenv('DEBSMTP_USER')
|
||||
mailserver_pass = os.getenv('DEBSMTP_PASS')
|
||||
if mailserver_user and mailserver_pass:
|
||||
try:
|
||||
s.login(mailserver_user, mailserver_pass)
|
||||
except smtplib.SMTPAuthenticationError:
|
||||
print 'Error authenticating to the server: invalid username and password.'
|
||||
s.quit(); sys.exit(1)
|
||||
except:
|
||||
print 'Unknown SMTP error.'
|
||||
s.quit(); sys.exit(1)
|
||||
|
||||
|
||||
s.sendmail(myemailaddr, to, mail)
|
||||
s.quit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user