]> git.ipfire.org Git - people/jschlag/pbs.git/blame - src/buildservice/constants.py.in
Generate paths in constants.py by configure
[people/jschlag/pbs.git] / src / buildservice / constants.py.in
CommitLineData
9137135a
MT
1#!/usr/bin/python
2
f6e6ff79 3import os.path
9137135a 4
f6e6ff79
MT
5# Import all constants from the pakfire module.
6from pakfire.constants import *
7
56cba8c7
MT
8CONFIGSDIR = "@configsdir@"
9DATADIR = "@datadir@"
d3e7a9fb 10
f6e6ff79
MT
11PAKFIRE_DIR = "/pakfire"
12PACKAGES_DIR = os.path.join(PAKFIRE_DIR, "packages")
13BUILD_RELEASE_DIR = os.path.join(PACKAGES_DIR, "release")
14BUILD_SCRATCH_DIR = os.path.join(PACKAGES_DIR, "scratch")
15REPOS_DIR = os.path.join(PAKFIRE_DIR, "repositories")
16SOURCES_DIR = os.path.join(PAKFIRE_DIR, "sources")
17
18UPLOADS_DIR = "/var/tmp/pakfire/uploads"
9137135a 19
f6e6ff79
MT
20BUFFER_SIZE = 1024 * 100 # 100kb
21
c764ce43
MT
22BUGZILLA_PATTERN = r"(bug\s?|#)(\d+)"
23CVE_PATTERN = r"(CVE)(\s|\-)(\d{4}\-\d{4})"
24
01197c1d
MT
25FILE_EXTENSIONS_VIEWABLE = (
26 ".c",
3e4fdb40 27 ".cc",
01197c1d
MT
28 ".cfg",
29 ".conf",
30 ".config",
3e4fdb40 31 ".cpp",
349aa78b 32 ".diff",
01197c1d
MT
33 ".h",
34 ".nm",
35 ".patch",
3e4fdb40
MT
36 ".patch0",
37 ".patch1",
38 ".patch2",
39 ".patch3",
40 ".patch4",
41 ".patch5",
42 ".patch6",
43 ".patch7",
44 ".patch8",
45 ".patch9",
01197c1d
MT
46 ".pl",
47 ".pm",
48 ".py",
49 ".S",
50 ".s",
51 ".sh",
52 ".txt",
53 "Kconfig",
54 "Makefile",
55)
56
f6e6ff79 57N_ = lambda x: x
9137135a
MT
58
59MSG_BUILD_FAILED_SUBJECT = N_("[%(build_name)s] Build job failed.")
60MSG_BUILD_FAILED = N_("""\
61The build job "%(build_name)s" has failed.
62
63This could have a couple of reasons and needs to be investigated by you.
64
65Here is more information about the incident:
66
67 Build name: %(build_name)s
68 Build host: %(build_host)s
69
70Click on this link to get all details about the build:
f6e6ff79 71 https://pakfire.ipfire.org/job/%(build_uuid)s
9137135a
MT
72
73Sincerely,
74 The Pakfire Build Service""")
75
76
77MSG_BUILD_FINISHED_SUBJECT = N_("[%(build_name)s] Build job finished.")
78MSG_BUILD_FINISHED = N_("""\
79The build job "%(build_name)s" has finished.
80
81If you are the maintainer, it is up to you to push it to one or more repositories.
82
83Click on this link to get all details about the build:
f6e6ff79 84 https://pakfire.ipfire.org/job/%(build_uuid)s
9137135a
MT
85
86Sincerely,
87 The Pakfire Build Service""")
f6e6ff79
MT
88
89# Bug update messages.
90BUG_TESTING_MSG = """\
91%(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository.
92
93You can provide feedback for this build here:
94 %(build_url)s"""
95
96BUG_UNSTABLE_MSG = """\
97%(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository.
98
99You can provide feedback for this build here:
100 %(build_url)s"""
101
102BUG_STABLE_MSG = """\
103%(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository.
104
105If problems still persist, please make note of it in this bug report."""
106
107BUG_MESSAGES = {
108 "testing" : {
109 "status" : "MODIFIED",
110 "comment" : BUG_TESTING_MSG,
111 },
112
113 "unstable" : {
114 "status" : "ON_QA",
115 "comment" : BUG_UNSTABLE_MSG,
116 },
117
118 "stable" : {
119 "status" : "CLOSED", "resolution" : "FIXED",
120 "comment" : BUG_STABLE_MSG,
121 },
122}