58 Commits

Author SHA1 Message Date
Robert Dower
1083d5cad6 archive repository 2025-08-07 14:07:56 -07:00
William Douglas
7b752b5ff3 Update cert generation process
With the latest urllib3 the CN match is no longer used for hostname
verification and instead the use of subjectAltName is required. With
openssl 3.3.1 this is needed to be handled with both an additional
parameter when generating the cert/request and also some new
configuration for the ssl.cnf. It is also necessary to have extensions
copied so the SAN information is preserved down the cert chain.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-07-11 05:41:37 -07:00
William Douglas
ba5f172421 Update koji schema.sql path 2024-06-20 15:43:52 -07:00
William Douglas
4d70e3030c Sync koji apache configs with upstream
Resolves issues related to https://cryptography.io/en/latest/faq/#starting-cryptography-using-mod-wsgi-produces-an-internalerror-during-a-call-in-register-osrandom-engine

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-10-25 15:01:41 -07:00
William Douglas
7ec609a6d0 Update deploy-koji.sh for koji 1.33
Koji's koji-hub entrypoint has changed so update the deployjment
script to reflect the new entrypoint.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-06-12 11:26:24 -07:00
Matthew Pitterle
6d9964e3ed Merge pull request #30 from phmccarty/remove-kojira-with-src
Remove unused `with_src` kojira option
2021-09-10 10:14:03 -07:00
Patrick McCarty
931e77e67a Remove unused with_src kojira option
In koji 1.21.0, kojira began logging a deprecation warning for this
option, but it appears to have never had a functional use in the
codebase. Avoid the deprecation warning by removing the option from the
default config.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2021-09-10 09:08:11 -07:00
Matthew Pitterle
23b8826019 Merge pull request #29 from phmccarty/remove-ca-option
Remove 'ca' option from configs
2021-09-09 11:45:59 -07:00
Patrick McCarty
87dc8384f9 Remove 'ca' option from configs
This option was officially deprecated in koji 1.22.0 and removed in koji
1.24.0. It was internally deprecated a while before 1.22.0, and I've
confirmed that removing the config for koji 1.21.2 -- the current
version in Clear -- is a no-op.

(Note that removing the 'ca' option from the client config is optional,
since unknown options in that config appear to be ignored. But for
completeness, I removed it there as well.)

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2021-09-09 11:26:59 -07:00
George T Kramer
134135c598 Remove sed-doc from build root
This is a documentation package and is not critical enough to be a part
of every build root.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-12-18 15:34:07 -08:00
George T Kramer
999632937b Supply more sane SSL certificate defaults
Want to enable spinning up a development environment quickly.

Increasing the countryName_max SSL configuration did not allow a country
name of 'Example Country Code' to be used when generating a certificate.

Prefer to revert back to the original value for countryName_max and
supply shorter parameters for certificate generation.

Change challengePassword_max to be consistent with the other limits.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-11-20 16:02:59 -08:00
George T Kramer
a3beebdd8f Update build groups for rpm changes
The rpm package is now autospec'd, which comes with it some name
changes.  Removing rpm-build and adding rpm, also adding file,
elfutils, and cpio to both build groups.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-11-20 16:01:20 -08:00
George T Kramer
a7bf81c0b7 Increase SSL config bounds for certificate generation
Supply more reasonable maximum boundaries for country code and challenge
password length.  This allows users to get going without modifying any
values from parameter.sh for SSL certificate generation.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-11-12 09:23:28 -08:00
George T Kramer
ccabc9d0ee Update README to allow users to get going better
Be more descriptive around the assumptions made, which environments are
unsupported, and what the user needs to do to get going.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-11-12 09:23:11 -08:00
George T Kramer
45123b2018 Decrease time required to import RPMs into koji
When importing RPMs into koji, the RPMs may first be hardlinked to
reduce disk IO.  Then, multiple RPMs may be imported at once with a
single command, rather than calling out to the same command multiple
times.  Finally, RPMs may be tagged in parallel.  These three things
combined significantly decrease the time required to import RPMs into
koji.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-11-12 09:22:56 -08:00
Pitterle, Matthew D
796cf8b064 Systemd override for kojira service
Kojira service will often fail to start upon
boot because postgresql is not running yet
2019-11-08 14:31:40 -08:00
George T Kramer
2db86c73a5 Better group parameters
Want to group FQDNs and master/slave pairs

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-11-07 18:33:26 -08:00
George T Kramer
915e1fc512 Remove duplicated KOJI_MOUNT_DIR parameter
Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-11-07 18:33:24 -08:00
George T Kramer
f79975bc61 Do not set up configurations for mash tool
The mash tool is no longer used.  So not create stateful configurations
for it.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-10-25 19:41:50 -07:00
George T Kramer
f35848b8e0 Reduce disk and CPU usage during mash creation
Because the mash script will always need to run on the kojimaster
server, it has local access to RPMs.  Rather than copying the data,
create a symlink to the data.  This reduces disk usage and allows the
mash hosting location to be flexible.

Because the mash is re-generated every time kojira runs and creates a
new koji repository, by nature, the mash is an iterative process.
Existing repository metadata is always available (excpet for the first
run).  Pass this existing metadata to createrepo_c so that it may more
efficiently diff and recalculate the updated metadata in order to reduce
CPU and disk usage.

By reducing disk and CPU usage, this reduces the impact of running this
process on a kojimaster which is a shared system responsible for hosting
many resources.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-10-24 12:49:33 -07:00
George T Kramer
0b4f6f330d Do not create mash cache directory
The mash tool is no longer used, and this directory is no longer needed.
It was only used by this tool.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-10-03 14:59:16 -07:00
George T Kramer
843439f0eb Conditionally run swupd during setup
swupd should only be run during setup when on an officially released
version of Clear that has an upadate stream.  Development versions are
usually indicated when the VERSION_ID is equal to 1 and do not have an
update stream.  In these cases, the assumption is that all required
software is already installed prior to setup.

However, add checks for only the most critical dependencies before
continuing with the setup so that it more obvious to the user that these
are missing when they are.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-10-03 14:43:43 -07:00
George T Kramer
d848c0d8b3 Host koji with python3
mod_wsgi is built and loaded with python3 by default.  No longer provide
a configuration to load the python2 equivalent, since it is also no
longer included in the koji bundle.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-10-02 11:27:12 -07:00
George T Kramer
8e0085e302 Replace mash utility with bash script
The mash utility has not been ported to python3.  There is also no
comparable replacement utility of a similar scope that can do a similar
job.  There is pungi utility, which is the replacement for mash.
However, pungi is Fedora's build process encapsulated into a single tool
and is doing too much for simply creating repos for distribution.

To avoid this complexity, koji does have a dist-repo subcommand.
However, this takes too long to execute at around 15 minutes on powerful
hardware.

In lieu of not wanting to maintain mash any further, write a small bash
script that performs the same function using artifacts for koji on the
disk.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-09-20 16:36:11 -07:00
George T Kramer
ed3f44ba99 Do not have tracing turned on for production 2019-08-08 15:25:25 -07:00
George T Kramer
c877b0e3e5 Use stronger cryptographic primitives when generating koji CA certs
Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-07-29 15:37:14 -07:00
George T Kramer
ea7f3d0802 Use stronger cryptographic primitives when generating koji certs
Comply with current NSA recommendations

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-07-29 15:32:22 -07:00
George T Kramer
de2c38561d Add tar.xz snapshot for cgit
Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-07-29 14:34:03 -07:00
George T Kramer
9fcd5a9be6 Quote systemd environment variables for proxy
Allow values for proxy variables to contain spaces

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-07-15 16:51:35 -07:00
George T Kramer
2bc57c7a44 Fix up koji NFS server deployment
Only install nfs-utils bundle.  This package was previously broken and
relied on a dependency in storage-utils, but this has since been fixed.

Add no_root_squash option for exporting a NFS mount to increase the read
performance.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-06-25 16:48:00 -07:00
George T Kramer
093e9bf862 Update RPM build group with current RPM list
Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-06-25 16:47:19 -07:00
George T Kramer
4cbb9d7e59 Add missing assumption for host setup
Koji will not work well if network and time
are not configured properly.  All basic
configurations need performed on the host
first prior to attempting to install and
configure koji.
2019-03-12 17:40:32 -07:00
George T Kramer
101b9b72c8 Allow SSH access for gitolite user
Need to allow developers to do work
2019-03-05 19:16:37 -08:00
George T Kramer
067db867a2 Fix incorrect build group dependency 2019-03-04 19:25:48 -08:00
George T Kramer
7aec646ade Update mash.sh script
Do not bother using DNF to get the NVR of packages.  Call out to RPM
directly instead.

More completely parameterize script to allow for sourcing of variables
from parameters.sh sometime in the future.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-03-04 19:13:19 -08:00
George T Kramer
fc26fcf467 Add missing build group dependency 2019-03-04 18:47:08 -08:00
Pitterle, Matthew D
9706c8611c Implement finds for koji imports 2019-03-04 18:00:48 -08:00
Pitterle, Matthew D
9a0c4f250e Revise git daemon startup command 2019-03-04 17:48:03 -08:00
George T Kramer
4968243eca Fix README presentation
Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-03-04 17:43:14 -08:00
George T Kramer
a4c68e462d Update README
Explain how to get going and the order in which scripts need run.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-03-04 17:39:12 -08:00
George T Kramer
85452e2af4 Make setup for koji NFS mounting easier
When koji builder and koji master are hosted on different machines, NFS
mounting is needed to connect the services.  Make this process more
smooth to minimize manual editing of files.  Namely, change the top
directory that koji looks at.  If on the master, this is on the local
file system.  If on the builder not on the master, this is also on the
local file system, but is backed by a NFS mount in a different location.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-03-04 17:36:19 -08:00
George T Kramer
d33200af07 Update copyright for 2019 2019-03-04 17:00:20 -08:00
George T Kramer
66d8fff4b4 Isolate user-facing parameters 2019-03-04 17:00:20 -08:00
George T Kramer
9fcbf230a4 Deploy all DevOps services for development
A deployment of a "koji" server consists of additional services that
support development beyond koji itself.  These include
git/cgit/gitolite, a mash containing the current snapshot of the
packages in koji, and an upstreams package sources cache.

Because these are required for integration with a DevOps workflow, they
are not included by default in the ansible playbook.
2019-03-04 17:00:20 -08:00
George T Kramer
17ac27a687 Quote all subshell usage
Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2018-11-14 12:19:51 -08:00
George T Kramer
3da7b00bbd Ensure RANDFILE exists prior to usage
OpenSSL complains if the RANDFILE does not exist when it is generating
certificates.  Create an initial seed for this file from urandom.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2018-11-14 12:17:08 -08:00
George T Kramer
bdee352232 Add proxy variables if defined by environment
kojid will not be able to merge repos and mock will not be able to build
a chroot in an environment where proxy variables are used unless they
are defined in configuration files.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2018-11-13 11:44:42 -08:00
George T Kramer
d79ad7d8ca Quote all parameter dollar signs
Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2018-11-13 10:30:45 -08:00
William Douglas
66d652e20d Use external koji repo
Expect most uses to be downstream so add an external koji repo by
default.
2018-11-07 17:59:03 -08:00
William Douglas
e815252e2f Use dnf for mock's package_manager
Configure the dist tag to use dnf rather than yum as Clear Linux
doesn't use yum for the package manager.
2018-11-07 17:48:57 -08:00