[Libreoffice-commits] dev-tools.git: 5 commits - ciabot/.gitignore ciabot/libreoffice-bugzilla2.py ciabot/projmap.json ciabot/run-libreoffice-ciabot.pl
Guilhem Moulin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 22 04:08:11 UTC 2020
ciabot/.gitignore | 1 +
ciabot/libreoffice-bugzilla2.py | 8 ++++----
ciabot/projmap.json | 2 +-
ciabot/run-libreoffice-ciabot.pl | 21 ++++++++++-----------
4 files changed, 16 insertions(+), 16 deletions(-)
New commits:
commit 7342d7a30914e80b3f120083e255b1038fa205ae
Author: Guilhem Moulin <guilhem at libreoffice.org>
AuthorDate: Sat Feb 22 05:05:59 2020 +0100
Commit: Guilhem Moulin <guilhem at libreoffice.org>
CommitDate: Sat Feb 22 05:05:59 2020 +0100
ciabot: bugzilla: bump target release
diff --git a/ciabot/libreoffice-bugzilla2.py b/ciabot/libreoffice-bugzilla2.py
index 95b8801..0e58419 100644
--- a/ciabot/libreoffice-bugzilla2.py
+++ b/ciabot/libreoffice-bugzilla2.py
@@ -37,7 +37,7 @@ import bugzilla
from bugzilla import Bugzilla
from bugzilla.base import _BugzillaToken
-master_target = "6.4.0"
+master_target = "7.0.0"
bug_regex = "\\b(?:bug|fdo|tdf|lo)[#:]?(\\d+)\\b"
dry_run = False
@@ -142,7 +142,7 @@ def find_target_version(repo, branch):
return base + ".0." + str(int(max(rc_list)) + 1)
# we have not yet tagged an RC, check which betas have been tagged
- search_string = "libreoffice-" + base + ".0.0.beta(\d+)"
+ search_string = "libreoffice-" + base + ".0.0.beta(\d+)"
beta_list = [m.group(1) for m in [re.search(search_string, str(tag)) for tag in tags] if m is not None]
print(beta_list)
if len(beta_list) == 0:
commit 1dd67f8c2e0d4ab32a61c86c2d1c5544eb6037fd
Author: Guilhem Moulin <guilhem at libreoffice.org>
AuthorDate: Sat Feb 22 04:53:23 2020 +0100
Commit: Guilhem Moulin <guilhem at libreoffice.org>
CommitDate: Sat Feb 22 05:02:33 2020 +0100
ciabot: store repositories into a dedicated directory
(Hardcoded to ‘/path/to/../repositories’, where ‘/path/to/run-libreoffice-ciabot.pl’
is the full path to the daemon.)
This is useful to harden the the service file: ciabot needs write access
to repositories, but neither to its homedir nor to its codebase.
Other scripts such as libreoffice-bugzilla2.py are now expected to be
found under ‘/path/to’ as well. Previously they were looked up in the
current directory.
diff --git a/ciabot/.gitignore b/ciabot/.gitignore
new file mode 100644
index 0000000..3e9cb72
--- /dev/null
+++ b/ciabot/.gitignore
@@ -0,0 +1 @@
+/repositories
diff --git a/ciabot/run-libreoffice-ciabot.pl b/ciabot/run-libreoffice-ciabot.pl
index a0a58d8..4fd1d7a 100755
--- a/ciabot/run-libreoffice-ciabot.pl
+++ b/ciabot/run-libreoffice-ciabot.pl
@@ -7,16 +7,14 @@ open STDOUT, '>>', "/var/log/ciabot/ciabot.out";
open STDERR, '>>', "/var/log/ciabot/ciabot.err";
my $suffix = "";
-my $cwd;
+my $cwd = dirname($0);
+my $repodir = "$cwd/../repositories";
-$cwd = `pwd`;
-chomp $cwd;
-
-if ( ! -d 'core' && ! -d 'core.git' ) {
+if ( ! -d "$repodir/core" && ! -d "$repodir/core.git" ) {
print STDERR "Not a directory with libreoffice repos!\n";
exit 1;
}
-if ( -d 'core.git' ) {
+if ( -d "$repodir/core.git" ) {
$suffix=".git"
}
sub error($) {
@@ -193,7 +191,8 @@ if ($test) {
my %old_ref;
foreach $repo (@all_repos) {
- chdir "$cwd/$repo$suffix";
+ chdir "$repodir/$repo$suffix";
+ # skip any commits received before we started
qx(git fetch origin);
qx(git fetch --tags origin);
$old_ref{$repo} = get_branches();
@@ -201,7 +200,7 @@ foreach $repo (@all_repos) {
while ( 1 ) {
foreach $repo (@all_repos) {
- chdir "$cwd/$repo$suffix";
+ chdir "$repodir/$repo$suffix";
# update
qx(git fetch origin);
commit 0ed798dc645c6bcb3e2210ceb212ab7df5d64827
Author: Guilhem Moulin <guilhem at libreoffice.org>
AuthorDate: Sat Feb 22 04:31:57 2020 +0100
Commit: Guilhem Moulin <guilhem at libreoffice.org>
CommitDate: Sat Feb 22 05:00:29 2020 +0100
ciabot: log to /var/log/ciabot not ~ciabot
This is useful to harden the the service file: ciabot needs write access
to the logdir, but neither to its homedir not to its codebase.
diff --git a/ciabot/run-libreoffice-ciabot.pl b/ciabot/run-libreoffice-ciabot.pl
index 668c6b7..a0a58d8 100755
--- a/ciabot/run-libreoffice-ciabot.pl
+++ b/ciabot/run-libreoffice-ciabot.pl
@@ -3,8 +3,8 @@
use POSIX;
use File::Basename;
-open STDOUT, '>', dirname($0) . "/ciabot.out";
-open STDERR, '>', dirname($0) . "/ciabot.err";
+open STDOUT, '>>', "/var/log/ciabot/ciabot.out";
+open STDERR, '>>', "/var/log/ciabot/ciabot.err";
my $suffix = "";
my $cwd;
@@ -123,7 +123,7 @@ sub report($$$) {
my $branch = $branch_name;
$branch = 'master' if ($branch eq '');
print "reporting to bugzilla: $_ and branch $branch";
- qx(python $cwd/libreoffice-bugzilla2.py -r $repo -c $_ -b $branch >> /srv/home/ciabot/bugzilla.log);
+ qx(python $cwd/libreoffice-bugzilla2.py -r $repo -c $_ -b $branch >>/var/log/ciabot/bugzilla.log);
}
qx($ciabot $repo $_ $branch_name $ciaproxy);
}
commit 10d1e4f0cb4552176850b2f02b5c2d8058deba91
Author: Guilhem Moulin <guilhem at libreoffice.org>
AuthorDate: Sat Feb 22 04:50:10 2020 +0100
Commit: Guilhem Moulin <guilhem at libreoffice.org>
CommitDate: Sat Feb 22 04:59:41 2020 +0100
ciabot: upgrade IRC connection to TLS
This was done in production a while back, but unfortunately never pushed
upstream.
diff --git a/ciabot/projmap.json b/ciabot/projmap.json
index 272df0d..d99351f 100644
--- a/ciabot/projmap.json
+++ b/ciabot/projmap.json
@@ -2,6 +2,6 @@
"LibreOffice": {
"template": "%(project)s (%(module)s) [%(branch)s] %(author)s * %(files)s: %(log)s",
"template-None": "%(project)s (%(module)s) %(author)s * %(files)s: %(log)s",
- "to": "irc://irc.freenode.net/libreoffice-dev"
+ "to": "ircs://irc.freenode.net/libreoffice-dev"
}
}
commit 387c5cdc2cb8fbf3945ae3312f9fd7ebbf9d2ab3
Author: Guilhem Moulin <guilhem at libreoffice.org>
AuthorDate: Sat Feb 22 04:48:50 2020 +0100
Commit: Guilhem Moulin <guilhem at libreoffice.org>
CommitDate: Sat Feb 22 04:59:37 2020 +0100
ciabot: don't hardcode the installation path
diff --git a/ciabot/libreoffice-bugzilla2.py b/ciabot/libreoffice-bugzilla2.py
index 5717e9a..95b8801 100644
--- a/ciabot/libreoffice-bugzilla2.py
+++ b/ciabot/libreoffice-bugzilla2.py
@@ -48,7 +48,7 @@ class FreedesktopBZ:
def connect(self):
config = ConfigParser.ConfigParser()
- config.read('/srv/home/ciabot/prod/config.cfg')
+ config.read(os.path.dirname(os.path.abspath(__file__)) + '/config.cfg')
url = config.get('bugzilla', 'url')
user = config.get('bugzilla', 'user')
password = config.get('bugzilla', 'password')
@@ -178,7 +178,7 @@ def find_bugid(repo, commit_id):
def read_repo(repo_name):
config = ConfigParser.ConfigParser()
- config.read('/srv/home/ciabot/prod/config.cfg')
+ config.read(os.path.dirname(os.path.abspath(__file__)) + '/config.cfg')
path = config.get(repo_name, 'location')
repo = git.repo.base.Repo(path)
return repo
More information about the Libreoffice-commits
mailing list