]>
Commit | Line | Data |
---|---|---|
9137135a MT |
1 | #!/usr/bin/python |
2 | ||
f6e6ff79 | 3 | import os.path |
9137135a | 4 | |
f6e6ff79 MT |
5 | # Import all constants from the pakfire module. |
6 | from pakfire.constants import * | |
7 | ||
56cba8c7 MT |
8 | CONFIGSDIR = "@configsdir@" |
9 | DATADIR = "@datadir@" | |
d3e7a9fb | 10 | |
f6e6ff79 MT |
11 | PAKFIRE_DIR = "/pakfire" |
12 | PACKAGES_DIR = os.path.join(PAKFIRE_DIR, "packages") | |
13 | BUILD_RELEASE_DIR = os.path.join(PACKAGES_DIR, "release") | |
14 | BUILD_SCRATCH_DIR = os.path.join(PACKAGES_DIR, "scratch") | |
15 | REPOS_DIR = os.path.join(PAKFIRE_DIR, "repositories") | |
16 | SOURCES_DIR = os.path.join(PAKFIRE_DIR, "sources") | |
17 | ||
18 | UPLOADS_DIR = "/var/tmp/pakfire/uploads" | |
9137135a | 19 | |
f6e6ff79 MT |
20 | BUFFER_SIZE = 1024 * 100 # 100kb |
21 | ||
c764ce43 MT |
22 | BUGZILLA_PATTERN = r"(bug\s?|#)(\d+)" |
23 | CVE_PATTERN = r"(CVE)(\s|\-)(\d{4}\-\d{4})" | |
24 | ||
01197c1d MT |
25 | FILE_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 | 57 | N_ = lambda x: x |
9137135a MT |
58 | |
59 | MSG_BUILD_FAILED_SUBJECT = N_("[%(build_name)s] Build job failed.") | |
60 | MSG_BUILD_FAILED = N_("""\ | |
61 | The build job "%(build_name)s" has failed. | |
62 | ||
63 | This could have a couple of reasons and needs to be investigated by you. | |
64 | ||
65 | Here is more information about the incident: | |
66 | ||
67 | Build name: %(build_name)s | |
68 | Build host: %(build_host)s | |
69 | ||
70 | Click on this link to get all details about the build: | |
f6e6ff79 | 71 | https://pakfire.ipfire.org/job/%(build_uuid)s |
9137135a MT |
72 | |
73 | Sincerely, | |
74 | The Pakfire Build Service""") | |
75 | ||
76 | ||
77 | MSG_BUILD_FINISHED_SUBJECT = N_("[%(build_name)s] Build job finished.") | |
78 | MSG_BUILD_FINISHED = N_("""\ | |
79 | The build job "%(build_name)s" has finished. | |
80 | ||
81 | If you are the maintainer, it is up to you to push it to one or more repositories. | |
82 | ||
83 | Click on this link to get all details about the build: | |
f6e6ff79 | 84 | https://pakfire.ipfire.org/job/%(build_uuid)s |
9137135a MT |
85 | |
86 | Sincerely, | |
87 | The Pakfire Build Service""") | |
f6e6ff79 MT |
88 | |
89 | # Bug update messages. | |
90 | BUG_TESTING_MSG = """\ | |
91 | %(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository. | |
92 | ||
93 | You can provide feedback for this build here: | |
94 | %(build_url)s""" | |
95 | ||
96 | BUG_UNSTABLE_MSG = """\ | |
97 | %(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository. | |
98 | ||
99 | You can provide feedback for this build here: | |
100 | %(build_url)s""" | |
101 | ||
102 | BUG_STABLE_MSG = """\ | |
103 | %(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository. | |
104 | ||
105 | If problems still persist, please make note of it in this bug report.""" | |
106 | ||
107 | BUG_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 | } |