Michal Privoznik
0ef3c75185
Simplify obtaining of PKGDIR
...
So far, in all Makefiles we have a complicated way to construct
PKGDIR path which is used to install python modules into.
Firstly, python version is obtained, and then system prefix and
these are then used to construct the PKGDIR path. Well, we can do
better. We can use 'site.getsitepackages()[0]' to obtain exactly
the path we are after.
This also fixes the problem on distributions which have split
/usr/lib and /usr/lib64 directories, because with the way we are
constructing the PKGDIR path we assume that the directories are
the same (or one is a symlink to another). Well, that is not
always the case.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2020-09-22 13:45:48 +02:00
Tomas Kopecek
50bcb6f3bc
replace md5 with sha256
2020-06-24 14:42:01 +02:00
Yu Ming Zhu
0a61104280
web: use sha1 for token generation instead of md5(disabled by FIPS)
...
fixes : #2291
2020-06-24 14:42:00 +02:00
Tomas Kopecek
af311184fc
dropping six from hub/web
2020-06-18 15:41:35 +02:00
Tomas Kopecek
b84be525c0
www: repoinfo page
...
Fixes: https://pagure.io/koji/issue/2181
2020-05-25 10:39:34 +02:00
Tomas Kopecek
758f0a0311
don't break on invalid task
...
Fixes: https://pagure.io/koji/issue/2112
2020-03-30 15:03:34 +02:00
Yuming Zhu
cf34706f04
use Exception instead of BaseException for bare expection
2020-03-03 21:38:22 +08:00
Yuming Zhu
c5db34a8e1
flake8: apply E501 with max-line-length=99
2020-03-03 21:38:22 +08:00
Yuming Zhu
f1ba6cefd7
flake8: apply all rest E7 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
6ed30954b2
flake8: apply E71x rule
2020-03-03 21:38:22 +08:00
Yuming Zhu
fa69c4904e
flake8: apply E70x rule
2020-03-03 21:38:22 +08:00
Yuming Zhu
0f727a2ab4
flake8: apply E3 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
05340b146b
flake8: apply E2 rules except E266
2020-03-03 21:38:21 +08:00
Yuming Zhu
ce1f9928af
flake8: apply E1 rules
2020-03-03 21:38:21 +08:00
Yuming Zhu
97cfaa4fcf
flake8: follow E265 rule
2020-03-03 21:35:08 +08:00
Tomas Kopecek
96d3cff5f2
remove usage of deprecated cgi.escape function
...
Fixes: https://pagure.io/koji/issue/1887
2020-02-13 14:44:50 +01:00
Yu Ming Zhu
5b83c682e4
remove unused imports
2019-12-12 11:00:58 +00:00
Yu Ming Zhu
b8653736dd
sort imports in www
2019-12-12 11:00:56 +00:00
Tomas Kopecek
a803f0a0f3
[web] human-friendly file sizes in taskinfo page
...
Fixes: https://pagure.io/koji/issue/1819
2019-12-12 13:23:26 +01:00
Yuming Zhu
7a6ebc851f
improve test and clean targets in Makefiles
2019-11-27 15:42:30 +01:00
Tomas Kopecek
dfbe322222
deprecate sha1/md5_constructor from koji.util
...
These functions are now fully provided by hashlib. Commit removes their
usage from koji's codebase and leaves deprecation message in lib.
Final removal from lib is scheduled to 1.21.
Fixes: https://pagure.io/koji/issue/1487
2019-08-12 16:07:55 -04:00
Tomas Kopecek
15e4d07763
encode to bytes only under py3
...
Related: https://pagure.io/koji/pull-request/1498
2019-06-24 18:09:10 -04:00
Mengjing Shi
2d88836a4b
Pass bytes to md5_constructor
...
Fixes login TypeError on koji-web
2019-06-24 18:07:23 -04:00
Tomas Kopecek
7a5c9130bc
retain form values in search page
2019-06-14 15:23:49 -04:00
Tomas Kopecek
e5b0a3ac6e
display task durations in webui
...
Fixes: https://pagure.io/koji/issue/1382
2019-05-06 10:33:06 -04:00
Tomas Kopecek
eeeeb3ab78
skip fixEncoding for py3
2019-03-04 10:13:51 -05:00
Tomas Kopecek
ee673d4b66
Web UI python3 changes
...
Fixes: https://pagure.io/koji/issue/890
2019-02-12 15:01:37 -05:00
Tomas Kopecek
ccdb8ac34c
Use python2/3 instead of python in Makefile/spec
...
Fixes: https://pagure.io/koji/issue/1018
2019-01-28 06:06:50 -05:00
Tomas Kopecek
8e61dc7c56
python-modernize -f libmodernize.fixes.fix_classic_division
2018-07-11 17:37:40 -04:00
Tomas Kopecek
be535c2854
python-modernize -f libmodernize.fixes.fix_imports_six
2018-07-11 17:37:39 -04:00
Tomas Kopecek
b96092334d
python-modernize -f libmodernize.fixes.fix_xrange_six
2018-07-11 17:37:39 -04:00
Tomas Kopecek
5ac2a6b8f0
display suid bit in web ui
...
Related: https://pagure.io/koji/issue/616
2017-10-05 10:38:48 -04:00
Mike McLean
9f3568dcb7
handle buildroots with state=None
...
If content generators are in use, they will create buildroots that have no
state. This change prevents this function from erroring in that case.
2017-04-06 14:07:11 -04:00
Tomas Kopecek
70224c42c1
remove obsoleted StandardError
2017-03-17 11:35:53 -04:00
Tomas Kopecek
cc9fff9840
remove has_key (not working in python3)
2017-03-07 08:15:20 -05:00
Tomas Kopecek
1494301465
use new exception syntax
2017-03-02 10:52:30 -05:00
Tomas Kopecek
c143d0b88f
print statement -> print function
2017-02-28 10:55:56 -05:00
Xibo Ning
fe8c5964ca
fix method names to listPackagesSimple and countAndFilterResults.
...
1. replace listPackages call by listPackagesSimple.
2. replace filterResults by countAndFilterResults.
2017-01-17 15:08:26 -05:00
Xibo Ning
fbc8314d13
fix the link to full results
2016-12-13 21:45:41 -05:00
Xibo Ning
408f5a816a
low the limits to 4 line and 400 chars
2016-12-13 21:45:41 -05:00
Xibo Ning
b82d804d02
lower the length limits and put the expansion link at the postscript end
2016-12-13 21:45:41 -05:00
Xibo Ning
4785d2cb3d
remove the escaped instance variable and let TaskResultLine to add postscript
2016-12-13 21:45:41 -05:00
Xibo Ning
8501c7599d
fix hence the abbreviated result always with the postscript
2016-12-13 21:45:41 -05:00
Xibo Ning
abcf99bf4b
add docstring and replace func name by a good one.
...
1. follow PEP-257 add docstring.
2. change func naem "task_result_to_html_or_string" to "task_result_to_html".
3. add postfix instance attribute for TaskResultLine.
4. add empty_str_placeholder instance attribute for TaskResultFragment.
5. recover class NoSuchException.
6. honoring line limit for dictionaries.
2016-12-13 21:45:41 -05:00
Xibo Ning
584c5bb20f
Fix as mikem review result.
...
replace reduce func by sum func
max lines is honored for dictionary results
follow PEP8 style
do not require HTMLParser
from url args remove maxAbbrResultLines/maxAbbrResultLen
2016-12-13 21:45:41 -05:00
Xibo Ning
5aa4fc1b3b
fix issue 222: Don't hide results in kojiweb
...
The same with patch1 except add two paramerters hence we can ajust
abbr result lines and length from taskinfo page
2016-12-13 21:45:41 -05:00
Tomas Kopecek
921258749a
removed unused imports
2016-10-04 15:48:54 +02:00
Dennis Gilmore
e35d2b4cef
allow kojiweb login to be disabled
...
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-05-25 09:56:37 -05:00
Mike McLean
e50b5e04d7
move buildroot label display code into util function
2015-10-21 12:04:05 -04:00
Dennis Gilmore
4d296f11be
Check task method before trying to determine "scratch" status.
...
reabsed patch from https://lists.fedoraproject.org/pipermail/buildsys/2015-May/004685.html
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-07-23 21:43:01 -05:00