diff options
author | Sergey Shatunov | 2020-02-06 07:50:34 +0800 |
---|---|---|
committer | Sergey Shatunov | 2020-02-06 07:50:34 +0800 |
commit | 08e9e39c1ad4856f603719dd5791d0973f58e154 (patch) | |
tree | 66d02fa0d81ffd9912266d50183d9a790023e006 | |
parent | 71d4e345a6bb7333c066836763097014b49b899c (diff) | |
download | aur-08e9e39c1ad4856f603719dd5791d0973f58e154.tar.gz |
Use VERSION instead of VERSION_ID in osrel.
Rename 'add' action to 'install'
-rw-r--r-- | .SRCINFO | 10 | ||||
-rwxr-xr-x | 50-generate-efistub.install | 13 | ||||
-rwxr-xr-x[-rw-r--r--] | 75-sign-for-secure-boot.install | 2 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rwxr-xr-x | uak | 4 | ||||
-rwxr-xr-x | uak-script | 2 |
6 files changed, 28 insertions, 27 deletions
@@ -1,6 +1,6 @@ pkgbase = unifed-arch-kernel pkgdesc = Generates unifed archlinux images using pacman power - pkgver = 0.0.5 + pkgver = 0.0.6 pkgrel = 1 url = https://aur.archlinux.org/packages/unifed-arch-kernel/ arch = x86_64 @@ -12,12 +12,12 @@ pkgbase = unifed-arch-kernel source = 55-unifed-arch-kernel-remove.hook source = 75-sign-for-secure-boot.install source = 95-unifed-arch-kernel-install.hook - md5sums = 3c73ba36f7238f359d5dc43fc6d95623 - md5sums = 15d02966c33006a8f9dc6456953e3a47 + md5sums = aa4f4f6300e708d6ee67b86414a6ede1 + md5sums = 3f5756050aaf4c0a13a11167682565a1 md5sums = cf19112a5294756657e8e2e3ebf6226d - md5sums = 5b263fc13f06b08b3714337e28f44424 + md5sums = c07998165fc01a2f5e7d453b51a7a024 md5sums = 9105de5ff7f384b1e48bdd4972b87917 - md5sums = 6759b0a4b35dff92e8bde49dd8bbe2e1 + md5sums = 2cad8b6d2879e7c6f1ee6957d3b69f97 md5sums = 9752535dff10105c003f9108528bd50a pkgname = unifed-arch-kernel diff --git a/50-generate-efistub.install b/50-generate-efistub.install index 6b50cf24fbc7..b7b46107fefb 100755 --- a/50-generate-efistub.install +++ b/50-generate-efistub.install @@ -12,7 +12,7 @@ function osrel() { fi } -if [[ "$COMMAND" == "add" ]]; then +if [[ "$COMMAND" == "install" ]]; then declare -a BOOT_OPTIONS if [[ -f /etc/uak/cmdline ]]; then @@ -26,6 +26,11 @@ if [[ "$COMMAND" == "add" ]]; then elif [[ -f /usr/lib/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline || true else + if ! (( ${#BOOT_OPTIONS[@]} )) && [[ "$UAK_WARN_EMPTY_BOOT_OPTIONS" != "false" ]]; then + warning "Creating image with current boot options, most highly it's not what do you want to do" + warning "Please put boot options to the /etc/uak/cmdline and run 'uak regenerate' to regenerate all boot images" + fi + read -r -d '' -a boot_option_line < /proc/cmdline || true for boot_option in "${boot_option_line[@]}"; do [[ "${boot_option#initrd=*}" != "$boot_option" ]] && continue @@ -33,10 +38,6 @@ if [[ "$COMMAND" == "add" ]]; then done fi - if ! (( ${#BOOT_OPTIONS[@]} )) && [[ "$UAK_WARN_EMPTY_BOOT_OPTIONS" != "false" ]]; then - warning "Creating image with empty boot options, most highly it's not what do you want to do" - warning "Please put boot options to the /etc/uak/cmdline and run 'uak regenerate' to regenerate all boot images" - fi objcopy_args=() @@ -45,7 +46,7 @@ if [[ "$COMMAND" == "add" ]]; then fi /usr/bin/objcopy \ - --add-section .osrel=<(osrel VERSION_ID "$KERNEL_VERSION") --change-section-vma '.osrel=0x20000' \ + --add-section .osrel=<(osrel VERSION "$KERNEL_VERSION") --change-section-vma '.osrel=0x20000' \ --add-section .cmdline=<(echo "${BOOT_OPTIONS[@]}") --change-section-vma '.cmdline=0x30000' \ --add-section .linux="$KERNEL_IMAGE" --change-section-vma '.linux=0x2000000' \ --add-section .initrd=<(/usr/bin/cat "${INITRDS[@]}") --change-section-vma '.initrd=0x3000000' \ diff --git a/75-sign-for-secure-boot.install b/75-sign-for-secure-boot.install index 973467abc93c..153487117c77 100644..100755 --- a/75-sign-for-secure-boot.install +++ b/75-sign-for-secure-boot.install @@ -6,7 +6,7 @@ if [[ ! "$UAK_EFI_KEYS_PATH" ]]; then UAK_EFI_KEYS_PATH=/etc/efi-keys fi -if [[ "$COMMAND" == "add" ]]; then +if [[ "$COMMAND" == "install" ]]; then sign=1 if [[ ! -f "$UAK_EFI_KEYS_PATH/db.crt" ]]; then @@ -2,7 +2,7 @@ pkgname=('unifed-arch-kernel' 'unifed-arch-kernel-secure-boot') pkgbase=unifed-arch-kernel -pkgver=0.0.5 +pkgver=0.0.6 pkgrel=1 pkgdesc='Generates unifed archlinux images using pacman power' arch=(x86_64) @@ -15,12 +15,12 @@ source=('uak-script' '55-unifed-arch-kernel-remove.hook' '75-sign-for-secure-boot.install' '95-unifed-arch-kernel-install.hook') -md5sums=('3c73ba36f7238f359d5dc43fc6d95623' - '15d02966c33006a8f9dc6456953e3a47' +md5sums=('aa4f4f6300e708d6ee67b86414a6ede1' + '3f5756050aaf4c0a13a11167682565a1' 'cf19112a5294756657e8e2e3ebf6226d' - '5b263fc13f06b08b3714337e28f44424' + 'c07998165fc01a2f5e7d453b51a7a024' '9105de5ff7f384b1e48bdd4972b87917' - '6759b0a4b35dff92e8bde49dd8bbe2e1' + '2cad8b6d2879e7c6f1ee6957d3b69f97' '9752535dff10105c003f9108528bd50a') package_unifed-arch-kernel() { @@ -30,17 +30,17 @@ package_unifed-arch-kernel() { install -d "$pkgdir/etc/uak/install.d" install -d "$pkgdir/usr/lib/uak/install.d" - install -D "$srcdir/uak" "$pkgdir/usr/bin/uak" - install -D "$srcdir/uak-script" "$pkgdir/usr/share/libalpm/scripts/uak-script" - install -D "$srcdir/config" "$pkgdir/etc/uak/config" - install -D "$srcdir/50-generate-efistub.install" "$pkgdir/usr/lib/uak/install.d/50-generate-efistub.install" - install -D "$srcdir/95-unifed-arch-kernel-install.hook" "$pkgdir/usr/share/libalpm/hooks/95-unifed-arch-kernel-install.hook" - install -D "$srcdir/55-unifed-arch-kernel-remove.hook" "$pkgdir/usr/share/libalpm/hooks/55-unifed-arch-kernel-remove.hook" + install -Dm755 "$srcdir/uak" "$pkgdir/usr/bin/uak" + install -Dm755 "$srcdir/uak-script" "$pkgdir/usr/share/libalpm/scripts/uak-script" + install -Dm644 "$srcdir/config" "$pkgdir/etc/uak/config" + install -Dm755 "$srcdir/50-generate-efistub.install" "$pkgdir/usr/lib/uak/install.d/50-generate-efistub.install" + install -Dm644 "$srcdir/95-unifed-arch-kernel-install.hook" "$pkgdir/usr/share/libalpm/hooks/95-unifed-arch-kernel-install.hook" + install -Dm644 "$srcdir/55-unifed-arch-kernel-remove.hook" "$pkgdir/usr/share/libalpm/hooks/55-unifed-arch-kernel-remove.hook" } package_unifed-arch-kernel-secure-boot() { depends=('unifed-arch-kernel' 'sbsigntools') install -d "$pkgdir/usr/lib/uak/install.d" - install -D "$srcdir/75-sign-for-secure-boot.install" "$pkgdir/usr/lib/uak/install.d/75-sign-for-secure-boot.install" + install -Dm755 "$srcdir/75-sign-for-secure-boot.install" "$pkgdir/usr/lib/uak/install.d/75-sign-for-secure-boot.install" } @@ -47,7 +47,7 @@ function die() { function usage() { echo "Usage:" - echo " $0 add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE ...]" + echo " $0 install KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE ...]" echo " $0 remove KERNEL-VERSION" echo " $0 regenerate" } @@ -92,7 +92,7 @@ export UAK_ESP_TARGET="$UAK_ESP_PATH/EFI/Linux" COMMAND="$1" case "$COMMAND" in - add) + install) check_root KERNEL_VERSION="$2" diff --git a/uak-script b/uak-script index 2950d4a1a450..f144c1c3f400 100755 --- a/uak-script +++ b/uak-script @@ -54,7 +54,7 @@ if [[ $ACTION == "install-preset" ]]; then continue fi - do_uak add "$preset_kernel_version" "$kernel" $(echo /boot/*-ucode.img) "${!preset_initrd}" + do_uak install "$preset_kernel_version" "$kernel" $(echo /boot/*-ucode.img) "${!preset_initrd}" done exit 0 |