NOW() is time of transaction start. For long transaction, there could be
race and some other transactions which ended earlier can have newer
events. clock_timestamp returns real time (changes during transaction),
so it should be better for this case.
Fixes: https://pagure.io/koji/issue/1747
Set a uniqueness constraint on the content generator name in the
database.
Prior to this change, we were only enforcing this in the hub application
layer. Configure this in postgres for safety.
Changing owner is triggering repo regeneration in kojira. As it is
something which doesn't have any effect on repodata, let's put it to
separate table and let kojira ignore these changes.
Fixes: https://pagure.io/koji/issue/956
This patch adds support to build squashfs images which are compatible to
anaconda's liveimg directive and dracuts liveimg feature.
The feature is pretty simple, as it just reuses the raw diskimage, and
strips the disklabel, to retrieve the plain filesystem image.
Two open issues:
- Stripping the disk label is a pretty hack
- Database schema upgrade is missing
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
At the time of first initialization of Koji database tables and
functions don't exist. This isn't really a problem as SQL commands later
in the script create them.
For non-existent tables or functions psql prints NOTICE instead of an
ERROR. Therefore one can check if database was initialized correctly
with ON_ERROR_STOP set (see psql(1)):
psql returns 3 if an error occurred in a script and the variable
ON_ERROR_STOP was set.