Skip to content

Commit

Permalink
Hotfix: Fix downloading RPMs from Github in yum-repo pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeeq committed Nov 3, 2022
1 parent 0d180d7 commit 45567ed
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.git
kernel
patches
output_zip
patches.zip
tempdir
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ KERNEL_VERSION="6.0.5-f36" UPDATE_SCRIPT_BRANCH="v6.0-f36" update_kernel_mbp
GitHub Actions kernel build status:
[![Build Status](https://github.com/mikeeq/mbp-fedora-kernel/actions/workflows/build-kernel.yml/badge.svg)](https://github.com/mikeeq/mbp-fedora-kernel/actions/workflows/build-kernel.yml)

Github Actions kernel publish status - <http://fedora-mbp-repo.herokuapp.com/> :
Github Actions kernel publish status - <https://fedora-mbp-repo.herokuapp.com/> :
[![Publish Status](https://github.com/mikeeq/mbp-fedora-kernel/actions/workflows/yum-repo.yml/badge.svg)](https://github.com/mikeeq/mbp-fedora-kernel/actions/workflows/yum-repo.yml)

### Known issues
Expand Down Expand Up @@ -82,7 +82,9 @@ Github Actions kernel publish status - <http://fedora-mbp-repo.herokuapp.com/> :

1. Make sure that Docker is installed and running correctly on your machine
2. Clone repo
3. Run `./build_in_docker.sh`
3. Generate GPG key: `gpg --full-generate-key`, choose `RSA and RSA` and `Real name: mbp-fedora`
4. Change version in `build.sh`, <https://bodhi.fedoraproject.org/updates/?search=&packages=kernel>
5. Run `./build_in_docker.sh`

## Docs

Expand Down
2 changes: 1 addition & 1 deletion publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eu -o pipefail

# export HEROKU_API_KEY=
LATEST_RELEASE=$(curl -Is https://github.com/mikeeq/mbp-fedora-kernel/releases/latest | grep -i 'location:' | cut -f2 -d'v' | cut -f1 -d'"' | tr '\r' '\n')
LATEST_RELEASE=$(curl -sI https://github.com/mikeeq/mbp-fedora-kernel/releases/latest | grep -i "location:" | cut -d'v' -f2 | tr -d '\r')

echo "Release: ${LATEST_RELEASE}"

Expand Down
2 changes: 1 addition & 1 deletion yum-repo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM fedora:36

ARG RELEASE_VERSION=6.0-f36
ARG RELEASE_VERSION=6.0.5-f36

WORKDIR /var/repo

Expand Down
10 changes: 5 additions & 5 deletions yum-repo/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ cd /var/repo
### Download older version of shim
## shim 15.4-4 or -5 is not working on MBP 16,2
# https://koji.fedoraproject.org/koji/packageinfo?packageID=14502
curl -Ls https://kojipkgs.fedoraproject.org//packages/shim/15/8/x86_64/shim-ia32-15-8.x86_64.rpm -O
curl -Ls https://kojipkgs.fedoraproject.org//packages/shim/15/8/x86_64/shim-x64-15-8.x86_64.rpm -O
curl -Ls https://kojipkgs.fedoraproject.org/packages/shim/15/8/x86_64/shim-ia32-15-8.x86_64.rpm -O
curl -Ls https://kojipkgs.fedoraproject.org/packages/shim/15/8/x86_64/shim-x64-15-8.x86_64.rpm -O

### Download RELEASE_VERSION of kernel
for rpm in $(curl -Ls https://github.com/mikeeq/mbp-fedora-kernel/releases/v"${RELEASE_VERSION}" | grep rpm | grep span | cut -d'>' -f2 | cut -d'<' -f1); do
wget --backups=1 https://github.com/mikeeq/mbp-fedora-kernel/releases/download/v"${RELEASE_VERSION}"/"$rpm";
done \
for rpm in $(curl -sL "https://github.com/mikeeq/mbp-fedora-kernel/releases/expanded_assets/v${RELEASE_VERSION}" | grep rpm | grep span | cut -d'>' -f2 | cut -d'<' -f1); do
curl -Ls "https://github.com/mikeeq/mbp-fedora-kernel/releases/download/v${RELEASE_VERSION}/${rpm}" -O
done

### Remove caches and fix permissions
rm -rfv ./*.1
Expand Down

0 comments on commit 45567ed

Please sign in to comment.