Commit graph

201 commits

Author SHA1 Message Date
Tomas Kopecek
25cf5f78e1 remove unused code 2022-01-19 15:26:32 +01:00
Igor Raits
5c8f9c3e09 kiwi: Collect all files from bundle directory
Bundle directory has slightly different files (compressed, etc.) and
does not contain any JSON files so let's just collect all files from
there.

Signed-off-by: Igor Raits <igor.raits@gmail.com>
2022-01-19 15:26:32 +01:00
Tomas Kopecek
dfc5b01c9c fix packaging 2022-01-19 15:26:32 +01:00
Tomas Kopecek
565f59459e kiwi: use separate --release 2022-01-19 15:26:32 +01:00
Tomas Kopecek
e423263f51 kiwi: Implant releasever into the kiwi description
Related: https://pagure.io/koji/issue/3194
2022-01-19 15:26:32 +01:00
Igor Raits
d737bb4597 Store disk_image type of kiwi files
For example, it is used by .raw (OEM) images.

Signed-off-by: Igor Raits <igor.raits@gmail.com>
2022-01-19 15:26:32 +01:00
Igor Raits
74c414ee1c Add support for kiwi.result.json
Signed-off-by: Igor Raits <igor.raits@gmail.com>
2022-01-19 15:26:32 +01:00
Ken Dreyer
dbacf1f985 protonmsg: allow users to specify router-specific topic prefixes
Prior to this change, Koji would always send messages with a hard-coded
topic:// prefix.

This works fine for ActiveMQ 5 and Artemis, but RabbitMQ does not
support that syntax. Instead, RabbitMQ brokers expect clients to use
topic addresses with a "/topic/" prefix.

The RFE for RabbitMQ to support "topic://" prefixes is
https://github.com/rabbitmq/rabbitmq-server/issues/2583

In the meantime, allow users to specify "topic://" or "/topic/"
explicitly in their configuration.

For backwards-compatibility, if the user chose neither "topic://" nor
"/topic/", prepend the "topic://" string, preserving the plugin's
existing behavior.

(Note: ActiveMQ 5 advertises its expected topic:// prefix in the initial
connection properties, so we could read that value dynamically, but
RabbitMQ and Artemis do not send an expected topic prefix connection
properties, so we just make the user choose explicitly here.)
2021-12-20 08:44:27 +01:00
Tomas Kopecek
f0f227f0ab fix flake8 2021-11-18 11:12:48 +01:00
Tomas Kopecek
79e1841c96 fix bandit 2021-11-18 11:12:48 +01:00
Tomas Kopecek
2d6a14845f alter name by selected profile 2021-11-18 11:12:48 +01:00
Tomas Kopecek
2d6b03eeba fix signature 2021-11-18 11:12:48 +01:00
Tomas Kopecek
336573c0fd code simplification 2021-11-18 11:12:48 +01:00
Tomas Kopecek
86c8fdc177 use json results 2021-11-18 11:12:48 +01:00
Tomas Kopecek
946a24cca8 remove translation 2021-11-18 11:12:48 +01:00
Tomas Kopecek
8c1a7337ab kiwi: check include directive 2021-11-18 11:12:48 +01:00
Tomas Kopecek
86ee135dd1 json results 2021-11-18 11:12:48 +01:00
Tomas Kopecek
d31306e2f6 basic kiwi support 2021-11-18 11:12:48 +01:00
Tomas Kopecek
5f9fbf660e runroot: use --chroot instead of chroot mock command
Former is no officially supported anymore

Fixes: https://pagure.io/koji/issue/3133
2021-11-18 11:05:34 +01:00
Jana Cupova
32b5377392 Remove translation stub functions
Fixes: https://pagure.io/koji/issue/3072
2021-10-21 13:25:16 +02:00
Tomas Kopecek
ba2e1e520b basic security checks with bandit
Fixes: https://pagure.io/koji/issue/3042
2021-10-20 15:20:14 +02:00
Tomas Kopecek
0e2ebb4e25 Revert "PR#2944: decode protonmsg props field when loading from db"
This reverts commit 34d1c8eb9e, reversing
changes made to fdccd38148.

Proper solution was part of https://pagure.io/koji/pull-request/2955, so
this merge was a mistake. Reverting.
2021-10-20 13:00:04 +02:00
Mike McLean
b4b83c8251 decode protonmsg props field when loading from db 2021-10-19 13:11:20 +02:00
Tomas Kopecek
c41559f1e9 move btypes from headers to body of proton message
Fixes: https://pagure.io/koji/issue/3017
2021-09-14 09:28:21 +02:00
Yu Ming Zhu
243e114b1f protonmsg: cast body to text 2021-08-06 09:48:47 +02:00
Jana Cupova
e689602be5 Add btype to protonmsg
Fixes: https://pagure.io/koji/issue/1217
2021-07-20 10:36:53 +02:00
Tomas Kopecek
990fa73d27 remove debug 2021-06-03 15:23:56 +02:00
Tomas Kopecek
4892b4e922 use format for name_template 2021-06-03 15:23:56 +02:00
Tomas Kopecek
ac4fb76b22 sidetags: configurable naming template
Fixes: https://pagure.io/koji/issue/2893
2021-06-03 15:23:56 +02:00
Mike McLean
5045f96bb4 protonmsg: actually remove messages from db queue
Fixes: https://pagure.io/koji/issue/2846
2021-05-10 09:51:03 +02:00
Mike McLean
bd00cddc2b protonmsg: drop bad key reference
This is a relic of an earlier version of the db work.
At this point in the code, there is never an id field.
We don't re-store messages from the db. We only delete them
after confirmed send.
2021-05-10 09:51:03 +02:00
Mike McLean
158232ab81 protonmsg: avoid calling _send_msgs on empty list 2021-05-10 09:51:03 +02:00
Mike McLean
1c633dd37b protonmsg: use consistent type for messages
Previously messages were represented as either tuples or
dictionaries. Now they are always dictionaries.

Fixes: https://pagure.io/koji/issue/2841
2021-05-10 09:51:03 +02:00
Jana Cupova
fa774f0a9b Add default task ID to prep_repo_init/done
Fixes: https://pagure.io/koji/issue/888
2021-04-28 13:33:22 +02:00
Jana Cupova
6a2c6e7586 Repo info with task id
Fixes: https://pagure.io/koji/issue/888
2021-04-19 15:15:10 +02:00
Tomas Kopecek
7f808b2658 plugins: fix typo
Related: https://pagure.io/koji/issue/2729
2021-03-04 16:08:11 +01:00
Tomas Kopecek
350086df4e cli: sidetag --suffix option 2021-03-03 15:09:55 +01:00
Tomas Kopecek
21a454f14c hub: sidetag suffixes
Fixes: https://pagure.io/koji/issue/2729
2021-03-03 15:09:55 +01:00
Tomas Kopecek
c6e69b4f8b backport py27 compatible file open with encoding
client and builder needs to run on py27 which doesn't support
open(encoding='utf-8')

Related: https://pagure.io/koji/issue/2641
2021-02-16 14:13:03 +01:00
Tomas Kopecek
96ae0ecef5 explicit encoding for text file operations
Fixes: https://pagure.io/koji/issue/2641
2021-01-26 13:36:25 +01:00
Michal Privoznik
66ba134859 Install into /usr/lib rather than /usr/lib64/
In koji-1.22.0-129-g0ef3c751 I've changed the way how
site-packages directory is obtained. What I did not realize back
then is there can be multilib systems which will not search for
packages in /usr/lib64. But 64bit systems do look into /usr/lib.
Therefore, let's pick the location where both systems work.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894261
Fixes: #2578
https://pagure.io/koji/issue/2578
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-27 10:00:52 +01:00
Tomas Kopecek
4b81f559da sidetag: remove double "usage"
Fixes: https://pagure.io/koji/issue/2489
2020-10-22 11:46:30 +02:00
Tomas Kopecek
bc478c2d68 cli: show log urls for failed tasks
Fixes: https://pagure.io/koji/issue/2188
2020-10-02 12:44:07 -04:00
Mike McLean
4ddc48e72a avoid message re-insertion, extend test mode, schema and docs updates
include new table in main schema, since this plugin is part of Koji itself

clean up and expand the docs for this plugin

refactor query_from_db() into handle_db_msgs()
* fix lock error cases
* only delete messages from queue if we successfully send them
* handle test_mode

allow test_mode to exercise db queue via test_mode_fail setting
2020-09-30 10:14:49 +02:00
Tomas Kopecek
aff74c4b3a proton: handling of lock failure 2020-09-30 10:14:49 +02:00
Tomas Kopecek
99c21690c2 delete too old messages 2020-09-30 10:14:49 +02:00
Tomas Kopecek
8c253396e8 proton: persistent message queue
Fixes: https://pagure.io/koji/issue/2230
2020-09-30 10:14:49 +02:00
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
0457065312 proton: short-circuit extra_limit = 0
Fixes: https://pagure.io/koji/issue/2455
2020-09-01 15:09:49 +02:00
Tomas Kopecek
af311184fc dropping six from hub/web 2020-06-18 15:41:35 +02:00