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