Syncing and Serving Yum Repos on RHEL 8

My Lab machines do not have direct access to the internet. This mirrors how my customers tend to run their environments. Instead, I run a single bastion host that can connect to the internet, and use that to perform all operations on my lab machines.

While it is great to be able to use the Install media to add packlages to PXE booted systems, after some time, the set of packages available is older than you want. For example, I hit a bug that required an update of Network Manager. So, I want to make a local yum repo from my RHEL 8 subscription. RHEL 8 makes this fairly easy.

Continue reading

Package Management Domain Model

Many years ago, when I first started working at Red Hat, I worked up a package management domain model diagram. I’ve referred to it many times over the years, but have never posted or explained it in detail. Recently, discussions over image building software caused me to refer to it a few times. Here it is, with annotations below.

Continue reading

Converting a RHEL Workstation to a Server

My laptop is my Demo machine.  I need to be able to run the Red Hat cloud Suite of software on it.  I want to install this software the same way a customer would.  However, much of this software is server side software, and my machine was registered as a workstation. This means the Red Hat Content network won’t show me the server yum repositories.  Here is how I converted my machine to be a server.

Continue reading

Installing RPM Build Dependencies

If you ever want to build and RPM, you need to make sure that the things it requires are installed. These are listed in the SPEC file on lines that begin with BuildRequires.  Installing these by hand is time consuming enough that it should be automated.  Here’s a first hack in Python.

 

#!/usr/bin/python
import sys
import re

build_re = re.compile('BuildRequires:.*')
compare_re = re.compile('.*=.*')


def main():
    if (len(sys.argv) > 1):
        spec = open(sys.argv[1])
        for line in spec:
            if build_re.match(line):
                for token in line.rsplit(" "):
                    if build_re.match(token):
                        continue
                    if compare_re.match(token):
                        break
                    token = token.rstrip(" ,\n\r")
                    if len(token) > 0:
                        print token


if __name__ == "__main__":
    main()

To use it, save in a file called buildreqs.py and run:

sudo yum install `./buidreqs.py ~/rpmbuild/SPECS/krb5.spec`

Project Values

When a group forms, one of the things it does, over time, is develop values.  Different development teams have different values, and people that come into the development process have to learn and adopt those values.   One value of the FreeIPA project that is very different from other recent projects of mine is this:  The main code repository is only for “published” code.  Work in progress should happen elsewhere.  The main git repository should be easily readable.

Continue reading