From 701f7beca0f08c698e2260b8e7cedd47fd4524e2 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 17 Jan 2024 12:03:25 -0500 Subject: [PATCH] Finish the certmule -> certwrapper rename. This renames the files and uses in them from certmule to certwrapper. Signed-off-by: Peter Jones --- Makefile | 26 +++++++++++++------------- README.md | 2 +- certmule.c => certwrapper.c | 2 +- data/sbat.csv | 2 +- make-archive | 28 ++++++++++++++-------------- 5 files changed, 30 insertions(+), 30 deletions(-) rename certmule.c => certwrapper.c (92%) diff --git a/Makefile b/Makefile index 628c7cf..ecb7e49 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ INSTALLROOT ?= $(DESTDIR) dbsize = \ $(if $(filter-out undefined,$(origin VENDOR_DB_FILE)),$(shell /usr/bin/stat --printf="%s" $(VENDOR_DB_FILE)),0) -DB_ADDRESSES=$(shell objdump -h certmule.so | $(TOPDIR)/find-addresses dbsz=$(call dbsize)) +DB_ADDRESSES=$(shell objdump -h certwrapper.so | $(TOPDIR)/find-addresses dbsz=$(call dbsize)) DB_ADDRESS=$(word $(2), $(call DB_ADDRESSES, $(1))) DB_SECTION_ALIGN = 512 @@ -84,15 +84,15 @@ ifeq ($(ARCH),arm) BUILDFLAGS += -ffreestanding -I$(shell $(CC) -print-file-name=include) endif -all : certmule.efi +all : certwrapper.efi -certmule.so : sbat_data.o certmule.o -certmule.so : SOLIBS= -certmule.so : SOFLAGS= -certmule.so : BUILDFLAGS+=-DVENDOR_DB -certmule.efi : OBJFLAGS = --strip-unneeded $(call VENDOR_DB, $<) -certmule.efi : SECTIONS=.text .reloc .db .sbat -certmule.efi : VENDOR_DB_FILE?=db.esl +certwrapper.so : sbat_data.o certwrapper.o +certwrapper.so : SOLIBS= +certwrapper.so : SOFLAGS= +certwrapper.so : BUILDFLAGS+=-DVENDOR_DB +certwrapper.efi : OBJFLAGS = --strip-unneeded $(call VENDOR_DB, $<) +certwrapper.efi : SECTIONS=.text .reloc .db .sbat +certwrapper.efi : VENDOR_DB_FILE?=db.esl %.efi : %.so ifneq ($(OBJCOPY_GTE224),1) @@ -126,17 +126,17 @@ update : git submodule update --init --recursive install : - install -D -d -m 0755 $(INSTALLROOT)/$(DATADIR)/certmule-$(VERSION) - install -m 0644 certmule.efi $(INSTALLROOT)/$(DATADIR)/certmule-$(VERSION)/certmule.efi + install -D -d -m 0755 $(INSTALLROOT)/$(DATADIR)/certwrapper-$(VERSION) + install -m 0644 certwrapper.efi $(INSTALLROOT)/$(DATADIR)/certwrapper-$(VERSION)/certwrapper.efi GITTAG = $(VERSION) test-archive: - @./make-archive $(if $(call get-config,certmule.origin),--origin "$(call get-config,certmule.origin)") --test "$(VERSION)" + @./make-archive $(if $(call get-config,certwrapper.origin),--origin "$(call get-config,certwrapper.origin)") --test "$(VERSION)" tag: git tag --sign $(GITTAG) refs/heads/main git tag -f latest-release $(GITTAG) archive: tag - @./make-archive $(if $(call get-config,certmule.origin),--origin "$(call get-config,certmule.origin)") --release "$(VERSION)" "$(GITTAG)" "certmule-$(GITTAG)" + @./make-archive $(if $(call get-config,certwrapper.origin),--origin "$(call get-config,certwrapper.origin)") --release "$(VERSION)" "$(GITTAG)" "certwrapper-$(GITTAG)" diff --git a/README.md b/README.md index a9f6081..a547ed7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -certmule +certwrapper ======== This is an x509 certificate wrapper in the form of an EFI binary. It is diff --git a/certmule.c b/certwrapper.c similarity index 92% rename from certmule.c rename to certwrapper.c index eda3e77..244c861 100644 --- a/certmule.c +++ b/certwrapper.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BSD-2-Clause-Patent /* - * certmule.c - a certificate wrapper for EFI security databases + * certwrapper.c - a certificate wrapper for EFI security databases * * Author(s): Peter Jones */ diff --git a/data/sbat.csv b/data/sbat.csv index d40938d..e01f9c2 100755 --- a/data/sbat.csv +++ b/data/sbat.csv @@ -1,2 +1,2 @@ sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md -certmule,1,UEFI certmule,certmule,1,https://github.com/rhboot/certmule +certwrapper,1,UEFI certwrapper,certwrapper,1,https://github.com/rhboot/certwrapper diff --git a/make-archive b/make-archive index a3c1177..049306b 100755 --- a/make-archive +++ b/make-archive @@ -11,14 +11,14 @@ usage() { { echo "usage: make-archive [--origin ORIGIN] \\" echo " [--test VERSION [GNUEFI_GIT_TAG]" - echo " |--release VERSION CERTMULE_GIT_TAG GNUEFI_GIT_TAG]" + echo " |--release VERSION CERTWRAPPER_GIT_TAG GNUEFI_GIT_TAG]" } >>"${out}" exit "${status}" } main() { VERSION="" - CERTMULE_GIT_TAG="" + CERTWRAPPER_GIT_TAG="" GNUEFI_GIT_TAG="" ORIGIN="origin" while [ $# -ne 0 ] ; do @@ -52,7 +52,7 @@ main() { usage 1 fi if [ $# -lt 3 ] ; then - echo "error: missing certmule git tag" >>/dev/stderr + echo "error: missing certwrapper git tag" >>/dev/stderr usage 1 fi if [ $# -lt 4 ] ; then @@ -60,7 +60,7 @@ main() { usage 1 fi VERSION="${2}" - CERTMULE_GIT_TAG="${3}" + CERTWRAPPER_GIT_TAG="${3}" GNUEFI_GIT_TAG="${4}" shift shift @@ -75,27 +75,27 @@ main() { done ARCHIVE_DIR="$(mktemp -d)" - rm -rf "${ARCHIVE_DIR}/certmule-${VERSION}" "${ARCHIVE_DIR}/certmule-${VERSION}" - mkdir -p "${ARCHIVE_DIR}/certmule-${VERSION}/gnu-efi" + rm -rf "${ARCHIVE_DIR}/certwrapper-${VERSION}" "${ARCHIVE_DIR}/certwrapper-${VERSION}" + mkdir -p "${ARCHIVE_DIR}/certwrapper-${VERSION}/gnu-efi" cd gnu-efi || exit 1 if [ "x" = "x${GNUEFI_GIT_TAG}" ] ; then - git archive --format=tar "$(git log -1 --pretty=format:%h)" | ( cd "${ARCHIVE_DIR}/certmule-${VERSION}/gnu-efi" ; tar x ) + git archive --format=tar "$(git log -1 --pretty=format:%h)" | ( cd "${ARCHIVE_DIR}/certwrapper-${VERSION}/gnu-efi" ; tar x ) else - git archive --format=tar "${ORIGIN}/${GNUEFI_GIT_TAG}" | ( cd "${ARCHIVE_DIR}/certmule-${VERSION}/gnu-efi" ; tar x ) + git archive --format=tar "${ORIGIN}/${GNUEFI_GIT_TAG}" | ( cd "${ARCHIVE_DIR}/certwrapper-${VERSION}/gnu-efi" ; tar x ) fi cd .. - if [ "x" = "x${CERTMULE_GIT_TAG}" ] ; then - git archive --format=tar "$(git log -1 --pretty=format:%h)" | ( cd "${ARCHIVE_DIR}/certmule-${VERSION}" ; tar x ) + if [ "x" = "x${CERTWRAPPER_GIT_TAG}" ] ; then + git archive --format=tar "$(git log -1 --pretty=format:%h)" | ( cd "${ARCHIVE_DIR}/certwrapper-${VERSION}" ; tar x ) else # ORIGIN doesn't yet have this tag - git archive --format=tar "${CERTMULE_GIT_TAG}" | ( cd "${ARCHIVE_DIR}/certmule-${VERSION}" ; tar x ) + git archive --format=tar "${CERTWRAPPER_GIT_TAG}" | ( cd "${ARCHIVE_DIR}/certwrapper-${VERSION}" ; tar x ) fi - git log -1 --pretty=format:%H > "${ARCHIVE_DIR}/certmule-${VERSION}/commit" + git log -1 --pretty=format:%H > "${ARCHIVE_DIR}/certwrapper-${VERSION}/commit" DIR="$PWD" cd "${ARCHIVE_DIR}" - tar -c --bzip2 -f "${DIR}/certmule-${VERSION}.tar.bz2" "certmule-${VERSION}" + tar -c --bzip2 -f "${DIR}/certwrapper-${VERSION}.tar.bz2" "certwrapper-${VERSION}" rm -rf "${ARCHIVE_DIR}" - echo "The archive is in certmule-${VERSION}.tar.bz2" + echo "The archive is in certwrapper-${VERSION}.tar.bz2" exit 0 }