]> git.ipfire.org Git - people/jschlag/pbs.git/blob - src/buildservice/constants.py.in
d62a9c9d7f8cb93314ba769465671720825e0cd2
[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 = "/pub/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 FILE_EXTENSIONS_VIEWABLE = (
28 ".c",
29 ".cc",
30 ".cfg",
31 ".conf",
32 ".config",
33 ".cpp",
34 ".diff",
35 ".h",
36 ".nm",
37 ".patch",
38 ".patch0",
39 ".patch1",
40 ".patch2",
41 ".patch3",
42 ".patch4",
43 ".patch5",
44 ".patch6",
45 ".patch7",
46 ".patch8",
47 ".patch9",
48 ".pl",
49 ".pm",
50 ".py",
51 ".S",
52 ".s",
53 ".sh",
54 ".txt",
55 "Kconfig",
56 "Makefile",
57 )
58
59 N_ = lambda x: x
60
61 MSG_BUILD_FAILED_SUBJECT = N_("[%(build_name)s] Build job failed.")
62 MSG_BUILD_FAILED = N_("""\
63 The build job "%(build_name)s" has failed.
64
65 This could have a couple of reasons and needs to be investigated by you.
66
67 Here is more information about the incident:
68
69 Build name: %(build_name)s
70 Build host: %(build_host)s
71
72 Click on this link to get all details about the build:
73 https://pakfire.ipfire.org/job/%(build_uuid)s
74
75 Sincerely,
76 The Pakfire Build Service""")
77
78
79 MSG_BUILD_FINISHED_SUBJECT = N_("[%(build_name)s] Build job finished.")
80 MSG_BUILD_FINISHED = N_("""\
81 The build job "%(build_name)s" has finished.
82
83 If you are the maintainer, it is up to you to push it to one or more repositories.
84
85 Click on this link to get all details about the build:
86 https://pakfire.ipfire.org/job/%(build_uuid)s
87
88 Sincerely,
89 The Pakfire Build Service""")
90
91 # Bug update messages.
92 BUG_TESTING_MSG = """\
93 %(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository.
94
95 You can provide feedback for this build here:
96 %(build_url)s"""
97
98 BUG_UNSTABLE_MSG = """\
99 %(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository.
100
101 You can provide feedback for this build here:
102 %(build_url)s"""
103
104 BUG_STABLE_MSG = """\
105 %(package_name)s has been pushed to the %(distro_name)s %(repo_name)s repository.
106
107 If problems still persist, please make note of it in this bug report."""
108
109 BUG_MESSAGES = {
110 "testing" : {
111 "status" : "MODIFIED",
112 "comment" : BUG_TESTING_MSG,
113 },
114
115 "unstable" : {
116 "status" : "ON_QA",
117 "comment" : BUG_UNSTABLE_MSG,
118 },
119
120 "stable" : {
121 "status" : "CLOSED", "resolution" : "FIXED",
122 "comment" : BUG_STABLE_MSG,
123 },
124 }