Compare commits
10 Commits
d39414517d
...
00cd494600
Author | SHA1 | Date |
---|---|---|
Brian C. Lane | 00cd494600 | |
Brian C. Lane | 7c7a07ce37 | |
Brian C. Lane | b1efe2d576 | |
Brian C. Lane | 9f73f60a21 | |
Brian C. Lane | 8bec248824 | |
Brian C. Lane | 63d7f7ca04 | |
Brian C. Lane | 1f69df73fa | |
Brian C. Lane | b4555e602e | |
Brian C. Lane | cd974309fa | |
Brian C. Lane | 490edc4033 |
|
@ -1,59 +1,6 @@
|
|||
/lorax-templates-rhel-8.0-0.tar.gz
|
||||
/lorax-templates-rhel-8.0-3.tar.gz
|
||||
/lorax-templates-rhel-8.0-4.tar.gz
|
||||
/lorax-templates-rhel-8.0-5.tar.gz
|
||||
/lorax-templates-rhel-8.0-6.tar.gz
|
||||
/lorax-templates-rhel-8.0-7.tar.gz
|
||||
/lorax-templates-rhel-8.0-8.tar.gz
|
||||
/lorax-templates-rhel-8.0-9.tar.gz
|
||||
/lorax-templates-rhel-8.0-10.tar.gz
|
||||
/lorax-templates-rhel-8.0-11.tar.gz
|
||||
/lorax-templates-rhel-8.0-12.tar.gz
|
||||
/lorax-templates-rhel-8.0-13.tar.gz
|
||||
/lorax-templates-rhel-8.0-14.tar.gz
|
||||
/lorax-templates-rhel-8.0-15.tar.gz
|
||||
/lorax-templates-rhel-8.0-16.tar.gz
|
||||
/lorax-templates-rhel-8.0-17.tar.gz
|
||||
/lorax-templates-rhel-8.0-18.tar.gz
|
||||
/lorax-templates-rhel-8.0-19.tar.gz
|
||||
/lorax-templates-rhel-8.1-1.tar.gz
|
||||
/lorax-templates-rhel-8.1-2.tar.gz
|
||||
/lorax-templates-rhel-8.1-3.tar.gz
|
||||
/lorax-templates-rhel-8.2-1.tar.gz
|
||||
/lorax-templates-rhel-8.2-2.tar.gz
|
||||
/lorax-templates-rhel-8.2-3.tar.gz
|
||||
/lorax-templates-rhel-8.2-4.tar.gz
|
||||
/lorax-templates-rhel-8.2-5.tar.gz
|
||||
/lorax-templates-rhel-8.2-6.tar.gz
|
||||
/lorax-templates-rhel-8.3-1.tar.gz
|
||||
/lorax-templates-rhel-8.3-2.tar.gz
|
||||
/lorax-templates-rhel-8.3-3.tar.gz
|
||||
/lorax-templates-rhel-8.3-4.tar.gz
|
||||
/lorax-templates-rhel-9.0-1.tar.gz
|
||||
/lorax-templates-rhel-9.0-4.tar.gz
|
||||
/lorax-templates-rhel-9.0-5.tar.gz
|
||||
/lorax-templates-rhel-9.0-6.tar.gz
|
||||
/lorax-templates-rhel-9.0-7.tar.gz
|
||||
/lorax-templates-rhel-9.0-8.tar.gz
|
||||
/lorax-templates-rhel-9.0-9.tar.gz
|
||||
/lorax-templates-rhel-9.0-10.tar.gz
|
||||
/lorax-templates-rhel-9.0-11.tar.gz
|
||||
/lorax-templates-rhel-9.0-12.tar.gz
|
||||
/lorax-templates-rhel-9.0-14.tar.gz
|
||||
/lorax-templates-rhel-9.0-15.tar.gz
|
||||
/lorax-templates-rhel-9.0-16.tar.gz
|
||||
/lorax-templates-rhel-9.0-17.tar.gz
|
||||
/lorax-templates-rhel-9.0-18.tar.gz
|
||||
/lorax-templates-rhel-9.0-19.tar.gz
|
||||
/lorax-templates-rhel-9.0-20.tar.gz
|
||||
/lorax-templates-rhel-9.0-21.tar.gz
|
||||
/lorax-templates-rhel-9.0-22.tar.gz
|
||||
/lorax-templates-rhel-9.0-24.tar.gz
|
||||
/lorax-templates-rhel-9.0-25.tar.gz
|
||||
/lorax-templates-rhel-9.0-26.tar.gz
|
||||
/lorax-templates-rhel-9.0-27.tar.gz
|
||||
/lorax-templates-rhel-9.0-28.tar.gz
|
||||
/lorax-templates-rhel-9.0-29.tar.gz
|
||||
/lorax-templates-rhel-9.0-30.tar.gz
|
||||
/lorax-templates-rhel-9.0-31.tar.gz
|
||||
/lorax-templates-rhel-9.0-32.tar.gz
|
||||
clog-spec
|
||||
clog
|
||||
/lorax-templates-rhel-9.0-34.tar.gz
|
||||
/lorax-templates-rhel-9.0-35.tar.gz
|
||||
/lorax-templates-rhel-9.0-36.tar.gz
|
||||
/lorax-templates-rhel-9.0-37.tar.gz
|
||||
|
|
|
@ -39,7 +39,7 @@ $InputRunFileMonitor
|
|||
#### GLOBAL DIRECTIVES ####
|
||||
|
||||
# Where to place auxiliary files
|
||||
#$WorkDirectory /var/lib/rsyslog
|
||||
$WorkDirectory /var/lib/rsyslog
|
||||
|
||||
# Use default timestamp format
|
||||
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||
|
@ -70,7 +70,7 @@ $template virtio_ForwardFormat, "<%PRI%>%TIMESTAMP:::date-rfc3339% localhost %sy
|
|||
# directly into files via python logging)
|
||||
|
||||
# discard messages from dracut regenerating initrd
|
||||
:programname,isequal,"dracut" ~
|
||||
:programname,isequal,"dracut" stop
|
||||
|
||||
*.*;\
|
||||
authpriv.none;\
|
||||
|
|
|
@ -36,9 +36,7 @@ mkdir ${BOOTDIR}
|
|||
install ${configdir}/bootinfo.txt ${BOOTDIR}
|
||||
|
||||
mkdir ${GRUBDIR}/powerpc-ieee1275
|
||||
## "()" means the current device to grub2
|
||||
runcmd grub2-mkimage --format=powerpc-ieee1275 --directory=/usr/lib/grub/powerpc-ieee1275 --prefix="()/"${GRUBDIR} \
|
||||
--output=${outroot}/${GRUBDIR}/powerpc-ieee1275/core.elf iso9660 ext2 ofnet net tftp http
|
||||
install /usr/lib/grub/powerpc-ieee1275/core.elf ${GRUBDIR}/powerpc-ieee1275
|
||||
install /usr/lib/grub/powerpc-ieee1275/*.mod ${GRUBDIR}/powerpc-ieee1275
|
||||
install /usr/lib/grub/powerpc-ieee1275/*.lst ${GRUBDIR}/powerpc-ieee1275
|
||||
|
||||
|
|
|
@ -36,9 +36,7 @@ mkdir ${BOOTDIR}
|
|||
install ${configdir}/bootinfo.txt ${BOOTDIR}
|
||||
|
||||
mkdir ${GRUBDIR}/powerpc-ieee1275
|
||||
## "()" means the current device to grub2
|
||||
runcmd grub2-mkimage --format=powerpc-ieee1275 --directory=/usr/lib/grub/powerpc-ieee1275 --prefix="()/"${GRUBDIR} \
|
||||
--output=${outroot}/${GRUBDIR}/powerpc-ieee1275/core.elf iso9660 ext2 ofnet net tftp http
|
||||
install /usr/lib/grub/powerpc-ieee1275/core.elf ${GRUBDIR}/powerpc-ieee1275
|
||||
install /usr/lib/grub/powerpc-ieee1275/*.mod ${GRUBDIR}/powerpc-ieee1275
|
||||
install /usr/lib/grub/powerpc-ieee1275/*.lst ${GRUBDIR}/powerpc-ieee1275
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
## anaconda package
|
||||
installpkg anaconda anaconda-widgets kexec-tools-anaconda-addon anaconda-install-img-deps
|
||||
installpkg oscap-anaconda-addon
|
||||
# installpkg redhat-release-eula
|
||||
installpkg redhat-release-eula
|
||||
|
||||
## FIXME Pull in device-mapper-multipath
|
||||
## This *should* be pulled in by libblockdev-plugins-all and libblockdev-mpath but it is not
|
||||
|
@ -116,8 +116,7 @@ installpkg ethtool openssh-server nfs-utils openssh-clients
|
|||
installpkg tigervnc-server-minimal
|
||||
installpkg tigervnc-server-module
|
||||
installpkg net-tools
|
||||
# TODO: uncomment
|
||||
# installpkg nmap-ncat
|
||||
installpkg nmap-ncat
|
||||
installpkg prefixdevname
|
||||
installpkg ipcalc
|
||||
|
||||
|
@ -164,7 +163,7 @@ installpkg google-noto-sans-cjk-ttc-fonts
|
|||
## debugging/bug reporting tools
|
||||
installpkg gdb-gdbserver
|
||||
installpkg libreport-plugin-bugzilla libreport-plugin-reportuploader
|
||||
# installpkg libreport-rhel-anaconda-bugzilla
|
||||
installpkg libreport-rhel-anaconda-bugzilla
|
||||
installpkg python3-pyatspi
|
||||
|
||||
## extra tools not required by anaconda
|
||||
|
|
|
@ -112,6 +112,10 @@ remove etc/lvm/cache
|
|||
remove etc/lvm/lvm.conf
|
||||
append etc/lvm/lvm.conf "global {\n\tuse_lvmetad = 1\n}\n"
|
||||
|
||||
## Remove machine specific nvme-cli files
|
||||
remove etc/nvme/hostid
|
||||
remove etc/nvme/hostnqn
|
||||
|
||||
## Record the package versions used to create the image
|
||||
## rpm initializes nss, which requires /dev/urandom to be present, hence the mknod
|
||||
runcmd chroot ${root} /usr/bin/mknod -m 666 /dev/random c 1 8
|
||||
|
|
25
Makefile
25
Makefile
|
@ -1,6 +1,12 @@
|
|||
NAME=lorax-templates-rhel
|
||||
# RHEL version these templates are designed for
|
||||
RHELVER=9.0
|
||||
RHPKG=centpkg --release=c9s
|
||||
|
||||
# git user.email and user.name must be setup
|
||||
GITEMAIL := $(shell git config user.email)
|
||||
GITNAME := $(shell git config user.name)
|
||||
|
||||
# Serial number for this release
|
||||
SERIAL=$(shell [ -f SERIAL ] && cat SERIAL || echo 0)
|
||||
|
||||
|
@ -18,13 +24,26 @@ bump-serial:
|
|||
echo $$((${SERIAL}+1)) > SERIAL
|
||||
git add SERIAL
|
||||
|
||||
update-spec:
|
||||
update-spec: clog
|
||||
sed -r -i \
|
||||
-e 's/^(Release:\s+)[^%]+(%.*)$$/\1${SERIAL}\2/' \
|
||||
-e 's/^(Version:\s+).*$$/\1${RHELVER}/' \
|
||||
-e 's/^(Source0:\s+).*$$/\1${TARBALL}/' \
|
||||
-e '/%changelog/ r clog-spec' \
|
||||
${SPEC}
|
||||
|
||||
release: tar update-spec
|
||||
clog:
|
||||
@echo "* $(shell date '+%a %b %d %Y') ${GITNAME} <${GITEMAIL}> - ${RHELVER}-${SERIAL}" > clog-spec
|
||||
./tools/git-changelog -t origin/c9s > clog
|
||||
cat clog >> clog-spec
|
||||
|
||||
.PHONY: tar ${TARBALL} bump-serial update-spec release
|
||||
# These need to rerun make to pick up the bumped serial number
|
||||
release:
|
||||
$(MAKE) bump-serial && $(MAKE) tar && $(MAKE) update-spec && $(MAKE) commit
|
||||
|
||||
commit:
|
||||
$(RHPKG) new-sources ${TARBALL}
|
||||
git add -u
|
||||
git commit -F clog
|
||||
|
||||
.PHONY: tar ${TARBALL} bump-serial update-spec release clog commit
|
||||
|
|
21
README
21
README
|
@ -1,16 +1,11 @@
|
|||
Hi there! If you're trying to fix something here, do the following:
|
||||
|
||||
1. Make whatever edits you need to in 80-rhel/
|
||||
2. `git commit` the changes
|
||||
3. `make bump` to bump SERIAL
|
||||
4. `make tar` to make a new tarball
|
||||
5. `make update-spec` to update specfile
|
||||
6. Add changelog entry to .spec
|
||||
7. `rhpkg-sha512 new-sources` the new tarball
|
||||
8. `git add lorax-templates-rhel.spec SERIAL`
|
||||
9. `git commit`
|
||||
|
||||
Steps 8 and 9 can be combined as:
|
||||
`rhpkg-sha512 clog && rhpkg-sha512 ci -F clog`
|
||||
|
||||
You're now ready to do a new build. Isn't spec wonderful?
|
||||
2. `git commit` the changes with the relevant 'Resolves/Related' bug reference
|
||||
3. `make release`
|
||||
This will bump the release, update the spec with changes in this branch,
|
||||
create a new tarball, upload it, and commit the changes.
|
||||
4. Examine the changes with 'git show' and make sure they look ok.
|
||||
5. Push the changes to your fork of the project with:
|
||||
'git push REMOTE BRANCHNAME' and follow the instructions to
|
||||
create a merge request in gitlab.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
Name: lorax-templates-rhel
|
||||
Version: 9.0
|
||||
Release: 32%{?dist}
|
||||
Release: 37%{?dist}
|
||||
Summary: RHEL8 build templates for lorax and livemedia-creator
|
||||
|
||||
License: GPLv2+
|
||||
URL: https://github.com/weldr/lorax
|
||||
BuildArch: noarch
|
||||
Source0: lorax-templates-rhel-9.0-32.tar.gz
|
||||
Source0: lorax-templates-rhel-9.0-37.tar.gz
|
||||
|
||||
# Required for the template branding support
|
||||
Requires: lorax >= 34.9.1
|
||||
|
@ -34,6 +34,28 @@ cp -a 80-rhel/* $RPM_BUILD_ROOT/%{templatedir}
|
|||
%{templatedir}/*
|
||||
|
||||
%changelog
|
||||
* Wed Jan 11 2023 Brian C. Lane <bcl@redhat.com> - 9.0-37
|
||||
- rsyslog.conf: Set WorkDirectory to /var/lib/rsyslog (bcl)
|
||||
Resolves: rhbz#2160070
|
||||
|
||||
* Mon Nov 28 2022 Brian C. Lane <bcl@redhat.com> - 9.0-36
|
||||
- On ppc64le Use core.elf from grub2 package (bcl)
|
||||
Resolves: rhbz#2143422
|
||||
|
||||
* Tue Apr 05 2022 Brian C. Lane <bcl@redhat.com> - 9.0-35
|
||||
- Makefile: Making it easier to create releases (bcl)
|
||||
Related: rhbz#2071074
|
||||
- runtime-postinstall: Remove machine specific nvme files (bcl)
|
||||
Resolves: rhbz#2071074
|
||||
|
||||
* Thu Feb 24 2022 Brian C. Lane <bcl@redhat.com> - 9.0-34
|
||||
- Restore missing packages (bcl)
|
||||
Resolves: rhbz#2056086
|
||||
|
||||
* Fri Feb 04 2022 Brian C. Lane <bcl@redhat.com> - 9.0-33
|
||||
- Keep nvram kernel module (bcl)
|
||||
Resolves: rhbz#2050878
|
||||
|
||||
* Tue Jan 25 2022 Brian C. Lane <bcl@redhat.com> - 9.0-32
|
||||
- Fix missing generic.ins on s390x (bcl)
|
||||
Resolves: rhbz#2044448
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (lorax-templates-rhel-9.0-32.tar.gz) = 52b5b55c696ca52a42af1ea045ecc59f889ad188581b803f8562154ebc40d9809f1b8b8aa3bbee0c8efaa36c1fa44701d70e806ece1b9aa9bf1e43cdf48412b4
|
||||
SHA512 (lorax-templates-rhel-9.0-37.tar.gz) = 96d642b6d6ba13021863bef2df27c6644b3af93840f1356287cad8814953e85cdedb649ebbb6e6d2b67dc31bfd323926404344d165eb85645cf0117c6f7b1fa4
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
#!/usr/bin/python3
|
||||
#
|
||||
# git-changelog - Output a rpm changelog
|
||||
#
|
||||
# Copyright (C) 2009 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published
|
||||
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: David Cantrell <dcantrell@redhat.com>
|
||||
# Author: Brian C. Lane <bcl@redhat.com>
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import textwrap
|
||||
from argparse import ArgumentParser
|
||||
|
||||
|
||||
|
||||
class ChangeLog:
|
||||
def __init__(self, tag):
|
||||
self.tag = tag
|
||||
self.ignore = None
|
||||
|
||||
def _getCommitDetail(self, commit, field, long=False):
|
||||
proc = subprocess.Popen(['git', 'log', '-1',
|
||||
"--pretty=format:%s" % field, commit],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE).communicate()
|
||||
|
||||
ret = proc[0].decode("utf8").strip("\n").split('\n')
|
||||
|
||||
if long:
|
||||
return ret
|
||||
|
||||
if len(ret) == 1 and ret[0].find('@') != -1:
|
||||
ret = ret[0].split('@')[0]
|
||||
elif len(ret) == 1:
|
||||
ret = ret[0]
|
||||
else:
|
||||
ret = filter(lambda x: x != '', ret)
|
||||
|
||||
return ret
|
||||
|
||||
def getBugs(self, msg):
|
||||
"""Get the Resolves/Related bugs from the commit.
|
||||
Bug in first line is considered Resolves
|
||||
"""
|
||||
bugs = []
|
||||
if not msg:
|
||||
return []
|
||||
|
||||
# summary line format is ^.*#([0-9]+).*
|
||||
# Make sure the bz# isn't likely to be a github issue
|
||||
for line in msg:
|
||||
m = re.match(r"^(Resolves|Related|Conflicts):\ +rhbz#(\d+)", line)
|
||||
if m and m.group(1) and m.group(2):
|
||||
bugs.append((m.group(1), m.group(2)))
|
||||
else:
|
||||
m = re.match(r"^.*#(\d+).*", line)
|
||||
if m and m.group(1) and int(m.group(1)) > 100000:
|
||||
bugs.append(("Resolves", m.group(1)))
|
||||
|
||||
return bugs
|
||||
|
||||
def getLog(self):
|
||||
rev_range = "%s.." % (self.tag)
|
||||
proc = subprocess.Popen(['git', 'log', '--pretty=oneline', rev_range],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE).communicate()
|
||||
lines = filter(lambda x: x.find('l10n: ') != 41 and \
|
||||
x.find('Merge commit') != 41 and \
|
||||
x.find('Merge branch') != 41,
|
||||
proc[0].decode("utf8").strip('\n').split('\n'))
|
||||
|
||||
if self.ignore and self.ignore != '':
|
||||
for commit in self.ignore.split(','):
|
||||
lines = filter(lambda x: not x.startswith(commit), lines)
|
||||
|
||||
log = []
|
||||
for line in lines:
|
||||
fields = line.split(' ')
|
||||
commit = fields[0]
|
||||
|
||||
summary = self._getCommitDetail(commit, "%s")
|
||||
long = self._getCommitDetail(commit, "%b", True)
|
||||
author = self._getCommitDetail(commit, "%aE")
|
||||
|
||||
msg = ["%s (%s)" % (summary.strip(), author)]
|
||||
for r, bz in self.getBugs(long):
|
||||
msg.append("%s: rhbz#%s" % (r, bz))
|
||||
log.append(msg)
|
||||
|
||||
return log
|
||||
|
||||
def formatLog(self):
|
||||
s = ""
|
||||
for msg in self.getLog():
|
||||
sublines = textwrap.wrap(msg[0], 77)
|
||||
|
||||
s = s + "- %s\n" % sublines[0]
|
||||
for line in sublines[1:] + msg[1:]:
|
||||
s = s + " %s\n" % line
|
||||
|
||||
return s
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser(description="Generate changelog entries from git commits")
|
||||
parser.add_argument("-t", "--tag", dest="tag",
|
||||
help="Last tag, changelog is commits after this tag")
|
||||
args = parser.parse_args()
|
||||
|
||||
cl = ChangeLog(args.tag)
|
||||
print(cl.formatLog())
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue