diff --git a/Jenkinsfile.centos7 b/Jenkinsfile.el8 similarity index 85% rename from Jenkinsfile.centos7 rename to Jenkinsfile.el8 index 68cca54..bdd48d9 100644 --- a/Jenkinsfile.centos7 +++ b/Jenkinsfile.el8 @@ -7,16 +7,12 @@ pipeline { ansiColor('xterm') } agent { - label 'rpmbuild' + label 'rpm' } stages { stage('Build') { steps { - sh './build 7 golang' - } - } - stage('Sign') { - steps { + rpmBuild(8, 'golang') rpmSign() } } @@ -28,7 +24,7 @@ pipeline { dir(path: 'SRPMS') { archiveArtifacts(artifacts: '**/*.src.rpm', caseSensitive: true, onlyIfSuccessful: true, allowEmptyArchive: true) } - rpmGithubRelease('centos7') + rpmGithubRelease('el8') } } } diff --git a/Jenkinsfile.centos8 b/Jenkinsfile.el9 similarity index 85% rename from Jenkinsfile.centos8 rename to Jenkinsfile.el9 index 154c3f7..8784b32 100644 --- a/Jenkinsfile.centos8 +++ b/Jenkinsfile.el9 @@ -7,16 +7,12 @@ pipeline { ansiColor('xterm') } agent { - label 'rpmbuild' + label 'rpm' } stages { stage('Build') { steps { - sh './build 8 golang' - } - } - stage('Sign') { - steps { + rpmBuild(9, 'golang') rpmSign() } } @@ -28,7 +24,7 @@ pipeline { dir(path: 'SRPMS') { archiveArtifacts(artifacts: '**/*.src.rpm', caseSensitive: true, onlyIfSuccessful: true, allowEmptyArchive: true) } - rpmGithubRelease('centos8') + rpmGithubRelease('el9') } } } diff --git a/README.md b/README.md index a5a2665..dfd2d0a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # [wtf](https://github.com/wtfutil/wtf) -Builds for Centos 7/8 hosted on [yum.jc21.com](https://yum.jc21.com) +Builds for Enterprise Linux hosted on [yum.jc21.com](https://yum.jc21.com) diff --git a/SPECS/wtf.spec b/SPECS/wtf.spec index 4ebda97..6b0057a 100644 --- a/SPECS/wtf.spec +++ b/SPECS/wtf.spec @@ -2,12 +2,12 @@ %global gh_user wtfutil %global gh_name wtf -%global gh_commit f20465340a7937aa24b73f25fbf36cdccc415790 +%global gh_commit ea7f6ed1ce0e3a96c7ce7aa337bfdae9cfc27a93 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) Name: wtfutil -Version: 0.40.0 -Release: 1 +Version: 0.43.0 +Release: 1%{?dist} Summary: A personal terminal-based dashboard utility, designed for displaying infrequently-needed, but very important, daily data. Group: Applications/System License: GNU @@ -37,6 +37,9 @@ install -Dm0755 bin/wtfutil %{buildroot}%{_bindir}/wtfutil %{_bindir}/%{name} %changelog +* Tue Jun 25 2024 Jamie Curnow 0.43.0-1 +- v0.43.0 + * Wed Nov 3 2021 Jamie Curnow 0.40.0-1 - v0.40.0 diff --git a/build b/build deleted file mode 100755 index e43fbe7..0000000 --- a/build +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash - -################################################## -# -# ./build CENTOS_VERSION [DOCKER_TAG] [SPEC_FILE] -# -# If no docker tag, `latest` is used -# If no Spec file (without .spec), all spec files -# found will be built. -# -# ie: -# ./build 7 golang php-pecl-memcache_php72_php73 -# -################################################## - -CWD=$(pwd) -CYAN='\E[1;36m' -RED='\E[1;31m' -YELLOW='\E[1;33m' -GREEN='\E[1;32m' -BLUE='\E[1;34m' -RESET='\E[0m' - -CENTOS_VERSION=$1 -if [ "$CENTOS_VERSION" == "" ]; then - echo -e "${RED}ERROR: You must specify a Centos version to build for, either 7 or 8" - echo -e "ie: ./build 7${RESET}" - exit 1 -fi - -DOCKER_TAG=$2 -if [ "$DOCKER_TAG" == "" ]; then - DOCKER_TAG=latest -fi - -SPECIFIC_SPEC_FILE=$3 - -# Loop over all Specs in the SPECS folder -for SPECFILE in SPECS/*.spec; do - PACKAGE=${SPECFILE#"SPECS/"} - PACKAGE=${PACKAGE%".spec"} - - if [ "${SPECIFIC_SPEC_FILE}" == "" ] || [ "${SPECIFIC_SPEC_FILE}" == "${PACKAGE}" ]; then - echo -e "${BLUE}❯ ${GREEN}Building ${CYAN}${PACKAGE} ${GREEN}for Centos ${CENTOS_VERSION}${RESET}" - - # Make sure docker exists - if hash docker 2>/dev/null; then - # Generate a Docker image based on env vars and centos version, for use both manually and in CI - eval "DOCKER_IMAGE=\$\{DOCKER_RPMBUILD_EL${CENTOS_VERSION}:-jc21/rpmbuild-centos${CENTOS_VERSION}\}" - eval "DOCKER_IMAGE=${DOCKER_IMAGE}" - - # Folder setup - echo -e "${BLUE}❯ ${YELLOW}Folder setup${RESET}" - rm -rf RPMS/* SRPMS/* - mkdir -p {RPMS,SRPMS,DEPS,SPECS,SOURCES} - chmod -R 777 {RPMS,SRPMS} - - # Pull latest builder image - echo -e "${BLUE}❯ ${YELLOW}Pulling docker image: ${DOCKER_IMAGE}:${DOCKER_TAG}${RESET}" - docker pull "${DOCKER_IMAGE}:${DOCKER_TAG}" - - # Use the build to change the ownership of folders - echo -e "${BLUE}❯ ${YELLOW}Temporarily changing ownership${RESET}" - docker run --rm \ - -v "${CWD}:/home/rpmbuilder/rpmbuild" \ - "${DOCKER_IMAGE}:${DOCKER_TAG}" \ - sudo chown -R rpmbuilder:rpmbuilder /home/rpmbuilder/rpmbuild - - # Do the build - echo -e "${BLUE}❯ ${YELLOW}Building ${PACKAGE}${RESET}" - - DISABLE_MIRROR= - if [ -n "$NOMIRROR" ]; then - DISABLE_MIRROR=-m - fi - - # If centos 8, we want -n option - NOBEST= - if [ "${CENTOS_VERSION}" == "8" ]; then - NOBEST=-n - fi - - # Docker Run - RPMBUILD=/home/rpmbuilder/rpmbuild - docker run --rm \ - --name "rpmbuild-${BUILD_TAG:-centos${CENTOS_VERSION}-${PACKAGE}}" \ - -v "${CWD}/DEPS:${RPMBUILD}/DEPS" \ - -v "${CWD}/RPMS:${RPMBUILD}/RPMS" \ - -v "${CWD}/SRPMS:${RPMBUILD}/SRPMS" \ - -v "${CWD}/SPECS:${RPMBUILD}/SPECS" \ - -v "${CWD}/SOURCES:${RPMBUILD}/SOURCES" \ - -e "GOPROXY=${GOPROXY}" \ - "${DOCKER_IMAGE}:${DOCKER_TAG}" \ - /bin/build-spec ${DISABLE_MIRROR} ${NOBEST} -o -r /home/rpmbuilder/rpmbuild/DEPS/*/*.rpm -- "/home/rpmbuilder/rpmbuild/SPECS/${PACKAGE}.spec" - - BUILD_SUCCESS=$? - - # Change ownership back - echo -e "${BLUE}❯ ${YELLOW}Reverting ownership${RESET}" - docker run --rm \ - -v "${CWD}:/home/rpmbuilder/rpmbuild" \ - "${DOCKER_IMAGE}:${DOCKER_TAG}" \ - sudo chown -R "$(id -u):$(id -g)" /home/rpmbuilder/rpmbuild - - # do we need to exit the loop? - if [ $BUILD_SUCCESS -ne 0 ]; then - echo -e "${BLUE}❯ ${RED}Exiting due to error${RESET}" - exit ${BUILD_SUCCESS} - fi - else - echo -e "${RED}ERROR: Docker command is not available${RESET}" - exit 1 - fi - fi -done diff --git a/rpm.json b/rpm.json index 088cf0f..febd971 100644 --- a/rpm.json +++ b/rpm.json @@ -2,6 +2,6 @@ "publish": { "PACKAGE": "wtf", "GH_USER": "jc21-rpm", - "VERSION": "0.40.0" + "VERSION": "0.43.0" } }