Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Update kernel file links
Browse files Browse the repository at this point in the history
  • Loading branch information
Apacelus committed Nov 22, 2023
1 parent 8497449 commit cd59dca
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/update-chromeos-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: check-shas
run: |
# Download remote sha
latest_tag=$(curl -s https://api.github.com/repos/eupnea-project/linux-kernels/releases/latest | jq -r '.tag_name')
latest_tag=$(curl -s https://api.github.com/repos/eupnea-project/linux-kernels/releases/tags/latest-chromeos | jq -r '.id')
# fail if curl result is empty
if [[ "$latest_tag" = "null" ]]; then
echo "latest_tag is empty"
Expand Down Expand Up @@ -80,8 +80,8 @@ jobs:
- name: Add kernel version to spec files
run: |
# download bzImage
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/chromeos-bzImage
KERNEL_VERSION=$(file -bL ./chromeos-bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-chromeos/bzImage
KERNEL_VERSION=$(file -bL ./bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
sed -i "s/insert_version/$KERNEL_VERSION/g" spec-files/eupnea-chromeos-kernel-headers.spec # replace version in spec file
sed -i "s/insert_version/$KERNEL_VERSION/g" spec-files/eupnea-chromeos-kernel-modules.spec # replace version in spec file
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

- name: Remove kernel version from spec files
run: |
KERNEL_VERSION=$(file -bL ./chromeos-bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
KERNEL_VERSION=$(file -bL ./bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
sed -i "s/$KERNEL_VERSION/insert_version/g" spec-files/eupnea-chromeos-kernel-headers.spec # replace version in spec file
sed -i "s/$KERNEL_VERSION/insert_version/g" spec-files/eupnea-chromeos-kernel-modules.spec # replace version in spec file
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-mainline-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: check-shas
run: |
# Download remote sha
latest_tag=$(curl -s https://api.github.com/repos/eupnea-project/linux-kernels/releases/latest | jq -r '.tag_name')
latest_tag=$(curl -s https://api.github.com/repos/eupnea-project/linux-kernels/releases/tags/latest-mainline | jq -r '.id')
# fail if curl result is empty
if [[ "$latest_tag" = "null" ]]; then
echo "latest_tag is empty"
Expand Down Expand Up @@ -80,8 +80,8 @@ jobs:
- name: Add kernel version to spec files
run: |
# download bzImage
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/mainline-bzImage
KERNEL_VERSION=$(file -bL ./mainline-bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-mainline/bzImage
KERNEL_VERSION=$(file -bL ./bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
sed -i "s/insert_version/$KERNEL_VERSION/g" spec-files/eupnea-mainline-kernel-headers.spec # replace version in spec file
sed -i "s/insert_version/$KERNEL_VERSION/g" spec-files/eupnea-mainline-kernel-modules.spec # replace version in spec file
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

- name: Remove kernel version from spec files
run: |
KERNEL_VERSION=$(file -bL ./mainline-bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
KERNEL_VERSION=$(file -bL ./bzImage | grep -o 'version [^ ]*' | cut -d ' ' -f 2) # get kernel version from bzImage
sed -i "s/$KERNEL_VERSION/insert_version/g" spec-files/eupnea-mainline-kernel-headers.spec # replace version in spec file
sed -i "s/$KERNEL_VERSION/insert_version/g" spec-files/eupnea-mainline-kernel-modules.spec # replace version in spec file
Expand Down
4 changes: 2 additions & 2 deletions spec-files/eupnea-chromeos-kernel-headers.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Requires: eupnea-chromeos-kernel-modules
This package contains the Eupnea ChromeOS kernel headers. It is only compatible with Eupnea ChromeOS kernels.

%prep
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/chromeos-headers.tar.xz
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-chromeos/headers.tar.xz

%install
# Make dirs
mkdir -p %{buildroot}/usr/src

# Unpack tar
tar xfpJ chromeos-headers.tar.xz -C %{buildroot}/usr/src
tar xfpJ headers.tar.xz -C %{buildroot}/usr/src

%files
/usr/src/linux-headers-insert_version
Expand Down
4 changes: 2 additions & 2 deletions spec-files/eupnea-chromeos-kernel-modules.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ ExclusiveArch: x86_64
This package contains the Eupnea ChromeOS kernel modules. It is only compatible with Eupnea ChromeOS kernels.

%prep
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/chromeos-modules.tar.xz
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-chromeos/modules.tar.xz

%install
# Make dirs
mkdir -p %{buildroot}/lib/modules

# Unpack tars
tar xfpJ chromeos-modules.tar.xz -C %{buildroot}/lib/modules
tar xfpJ modules.tar.xz -C %{buildroot}/lib/modules

%files
/lib/modules/insert_version
4 changes: 2 additions & 2 deletions spec-files/eupnea-chromeos-kernel.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Only use it on Chromebooks running Eupnea systems!
This package contains the Eupnea ChromeOS kernel. It is only compatible with x86_64 Chromebooks.

%prep
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/chromeos-bzImage
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-chromeos/bzImage
git clone --depth=1 --branch=main https://github.com/eupnea-project/rpm-repo.git

%install
Expand All @@ -27,7 +27,7 @@ mkdir -p %{buildroot}/usr/lib/systemd/system/
mkdir -p %{buildroot}/usr/lib/eupnea

# Copy kernel to /boot
cp chromeos-bzImage %{buildroot}/boot/vmlinuz-eupnea-chromeos
cp bzImage %{buildroot}/boot/vmlinuz-eupnea-chromeos

# Add kernel autoremove script
cp rpm-repo/configs/kernel-autoremove/autoremove-kernels.sh %{buildroot}/usr/lib/eupnea/autoremove-kernels.sh
Expand Down
4 changes: 2 additions & 2 deletions spec-files/eupnea-mainline-kernel-headers.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Requires: eupnea-mainline-kernel-modules
This package contains the Eupnea Mainline kernel headers. It is only compatible with Eupnea Mainline kernels.

%prep
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/mainline-headers.tar.xz
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-mainline/headers.tar.xz

%install
# Make dirs
mkdir -p %{buildroot}/usr/src

# Unpack tar
tar xfpJ mainline-headers.tar.xz -C %{buildroot}/usr/src
tar xfpJ headers.tar.xz -C %{buildroot}/usr/src

%files
/usr/src/linux-headers-insert_version
Expand Down
4 changes: 2 additions & 2 deletions spec-files/eupnea-mainline-kernel-modules.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ ExclusiveArch: x86_64
This package contains the Eupnea Mainline kernel modules. It is only compatible with Eupnea Mainline kernels.

%prep
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/mainline-modules.tar.xz
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-mainline/modules.tar.xz

%install
# Make dirs
mkdir -p %{buildroot}/lib/modules

# Unpack tars
tar xfpJ mainline-modules.tar.xz -C %{buildroot}/lib/modules
tar xfpJ modules.tar.xz -C %{buildroot}/lib/modules

%files
/lib/modules/insert_version
4 changes: 2 additions & 2 deletions spec-files/eupnea-mainline-kernel.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Only use it on Chromebooks running Eupnea systems!
This package contains the Eupnea Mainline kernel. It is only compatible with x86_64 Chromebooks.

%prep
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/latest/download/mainline-bzImage
curl --silent -LO https://github.com/eupnea-project/linux-kernels/releases/download/latest-mainline/bzImage
git clone --depth=1 --branch=main https://github.com/eupnea-project/rpm-repo.git

%install
Expand All @@ -27,7 +27,7 @@ mkdir -p %{buildroot}/usr/lib/systemd/system/
mkdir -p %{buildroot}/usr/lib/eupnea

# Copy kernel to /boot
cp mainline-bzImage %{buildroot}/boot/vmlinuz-eupnea-mainline
cp bzImage %{buildroot}/boot/vmlinuz-eupnea-mainline

# Add kernel autoremove script
cp rpm-repo/configs/kernel-autoremove/autoremove-kernels.sh %{buildroot}/usr/lib/eupnea/autoremove-kernels.sh
Expand Down

0 comments on commit cd59dca

Please sign in to comment.