From af35099435a72d5c1175cf3ee9d5b1096e7b11d5 Mon Sep 17 00:00:00 2001 From: Jan Houben Date: Wed, 7 Nov 2018 21:50:38 -0500 Subject: [PATCH] Rename zfs/spl-utils-common to spl/zfs-utils --- build.sh | 8 ++--- lib.sh | 1 + src/kernels/_utils.sh | 63 +++++++++++++++++++++++++++++++++++ src/kernels/archiso.sh | 4 +-- src/kernels/common-git.sh | 41 ----------------------- src/kernels/common.sh | 35 ------------------- src/kernels/dkms.sh | 6 ++-- src/kernels/linux-hardened.sh | 6 ++-- src/kernels/linux-lts.sh | 6 ++-- src/kernels/linux-vfio.sh | 6 ++-- src/kernels/linux-zen.sh | 6 ++-- src/kernels/linux.sh | 6 ++-- 12 files changed, 88 insertions(+), 100 deletions(-) create mode 100644 src/kernels/_utils.sh delete mode 100644 src/kernels/common-git.sh delete mode 100644 src/kernels/common.sh diff --git a/build.sh b/build.sh index d9bedd4..c700448 100755 --- a/build.sh +++ b/build.sh @@ -126,7 +126,7 @@ generate_package_files() { debug "zfs_initcpio_hook_hash: ${zfs_initcpio_hook_hash}" # Make sure our target directory exists - if [[ "${kernel_name}" == "common" ]] || [[ "${kernel_name}" == "common-git" ]]; then + if [[ "${kernel_name}" == "_utils" ]]; then run_cmd_no_output "[[ -d "${spl_utils_pkgbuild_path}" ]] || mkdir -p ${spl_utils_pkgbuild_path}" run_cmd_no_output "[[ -d "${zfs_utils_pkgbuild_path}" ]] || mkdir -p ${zfs_utils_pkgbuild_path}" elif [[ "${kernel_name}" == "dkms" ]]; then @@ -139,8 +139,8 @@ generate_package_files() { # Finally, generate the update packages ... - # skip spl for common-git - if [[ "${kernel_name}" == "common" ]]; then + # skip spl for git utils + if [[ "${kernel_name}" == "_utils" ]] && [[ ! ${archzfs_package_group} =~ -git$ ]]; then msg2 "Removing old spl-utils patches (if any)" run_cmd_no_output "rm -f ${spl_utils_pkgbuild_path}/*.patch" msg2 "Copying spl-utils patches (if any)" @@ -149,7 +149,7 @@ generate_package_files() { run_cmd_no_output "source ${script_dir}/src/spl-utils/PKGBUILD.sh" fi - if [[ "${kernel_name}" == "common" ]] || [[ "${kernel_name}" == "common-git" ]]; then + if [[ "${kernel_name}" == "_utils" ]]; then msg2 "Removing old zfs-utils patches (if any)" run_cmd_no_output "rm -f ${zfs_utils_pkgbuild_path}/*.patch" msg2 "Copying zfs-utils patches (if any)" diff --git a/lib.sh b/lib.sh index a0dda75..cac37d6 100644 --- a/lib.sh +++ b/lib.sh @@ -417,6 +417,7 @@ source_safe() { zfs_utils_pkgname="" spl_pkgbuild_path="" zfs_pkgbuild_path="" + zfs_dkms_pkgbuild_path="" spl_src_target="" zfs_src_target="" spl_workdir="" diff --git a/src/kernels/_utils.sh b/src/kernels/_utils.sh new file mode 100644 index 0000000..7c89b29 --- /dev/null +++ b/src/kernels/_utils.sh @@ -0,0 +1,63 @@ +# For build.sh +mode_name="utils" +mode_desc="Select and use the utils packages" + +# version +pkgrel="1" + +# Version for GIT packages +pkgrel_git="1" +zfs_git_commit="" +spl_git_commit="" +zfs_git_url="https://github.com/zfsonlinux/zfs.git" +spl_git_url="https://github.com/zfsonlinux/spl.git" + +header="\ +# Maintainer: Jan Houben +# Contributor: Jesus Alvarez +# +# This PKGBUILD was generated by the archzfs build scripts located at +# +# http://github.com/archzfs/archzfs +#" + +update_utils_pkgbuilds() { + pkg_list=("spl-utils" "zfs-utils") + archzfs_package_group="archzfs-linux" + spl_pkgver=${zol_version} + zfs_pkgver=${zol_version} + spl_pkgrel=${pkgrel} + zfs_pkgrel=${pkgrel} + spl_utils_pkgname="spl-utils" + zfs_utils_pkgname="zfs-utils" + # Paths are relative to build.sh + spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" + zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" + spl_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-\${pkgver}/spl-\${pkgver}.tar.gz" + zfs_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-\${pkgver}/zfs-\${pkgver}.tar.gz" + spl_workdir="\${srcdir}/spl-\${pkgver}" + zfs_workdir="\${srcdir}/zfs-\${pkgver}" + spl_utils_replaces='replaces=("spl-utils-linux", "spl-utils-linux-lts" "spl-utils-common")' + zfs_utils_replaces='replaces=("zfs-utils-linux", "zfs-utils-linux-lts" "zfs-utils-common")' +} + +update_utils_git_pkgbuilds() { + pkg_list=("zfs-utils-git") + archzfs_package_group="archzfs-linux-git" + zfs_pkgver="" # Set later by call to git_calc_pkgver + zfs_pkgrel=${pkgrel_git} + zfs_utils_pkgname="zfs-utils-git" + zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" + zfs_src_hash="SKIP" + zfs_makedepends="\"git\"" + zfs_workdir="\${srcdir}/zfs" + + zfs_utils_replaces='replaces=("spl-utils-common-git" "zfs-utils-common-git")' + + if have_command "update"; then + git_check_repo + git_calc_pkgver + fi + zfs_set_commit="_commit='${latest_zfs_git_commit}'" + zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" +} diff --git a/src/kernels/archiso.sh b/src/kernels/archiso.sh index 2598714..cded555 100644 --- a/src/kernels/archiso.sh +++ b/src/kernels/archiso.sh @@ -42,9 +42,9 @@ update_archiso_linux_pkgbuilds() { zfs_pkgver=${zol_version}_${kernel_version_full_pkgver} spl_pkgrel=${pkgrel} zfs_pkgrel=${pkgrel} - spl_utils_pkgname="spl-utils-common=${zol_version}" + spl_utils_pkgname="spl-utils=${zol_version}" spl_pkgname="spl-archiso-linux" - zfs_utils_pkgname="zfs-utils-common=${zol_version}" + zfs_utils_pkgname="zfs-utils=${zol_version}" zfs_pkgname="zfs-archiso-linux" spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" diff --git a/src/kernels/common-git.sh b/src/kernels/common-git.sh deleted file mode 100644 index a37cce1..0000000 --- a/src/kernels/common-git.sh +++ /dev/null @@ -1,41 +0,0 @@ -# For build.sh -mode_name="common-git" -mode_desc="Select and use the packages that are common between all kernels (git version)" - -# Version for GIT packages -pkgrel_git="1" -zfs_git_commit="" -spl_git_commit="" -zfs_git_url="https://github.com/zfsonlinux/zfs.git" -spl_git_url="https://github.com/zfsonlinux/spl.git" - -header="\ -# Maintainer: Jan Houben -# Contributor: Jesus Alvarez -# -# This PKGBUILD was generated by the archzfs build scripts located at -# -# http://github.com/archzfs/archzfs -#" - -update_common_git_pkgbuilds() { - pkg_list=("zfs-utils-common-git") - archzfs_package_group="archzfs-linux-git" - zfs_pkgver="" # Set later by call to git_calc_pkgver - zfs_pkgrel=${pkgrel_git} - zfs_utils_pkgname="zfs-utils-common-git" - spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" - zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" - zfs_src_hash="SKIP" - zfs_makedepends="\"git\"" - zfs_workdir="\${srcdir}/zfs" - - zfs_utils_replaces='replaces=("spl-utils-common-git")' - - if have_command "update"; then - git_check_repo - git_calc_pkgver - fi - zfs_set_commit="_commit='${latest_zfs_git_commit}'" - zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" -} diff --git a/src/kernels/common.sh b/src/kernels/common.sh deleted file mode 100644 index 3e77893..0000000 --- a/src/kernels/common.sh +++ /dev/null @@ -1,35 +0,0 @@ -# For build.sh -mode_name="common" -mode_desc="Select and use the packages that are common between all kernels" - -# version -pkgrel="2" - -header="\ -# Maintainer: Jan Houben -# Contributor: Jesus Alvarez -# -# This PKGBUILD was generated by the archzfs build scripts located at -# -# http://github.com/archzfs/archzfs -#" - -update_common_pkgbuilds() { - pkg_list=("spl-utils-common" "zfs-utils-common") - archzfs_package_group="archzfs-linux" - spl_pkgver=${zol_version} - zfs_pkgver=${zol_version} - spl_pkgrel=${pkgrel} - zfs_pkgrel=${pkgrel} - spl_utils_pkgname="spl-utils-common" - zfs_utils_pkgname="zfs-utils-common" - # Paths are relative to build.sh - spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" - zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" - spl_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-\${pkgver}/spl-\${pkgver}.tar.gz" - zfs_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-\${pkgver}/zfs-\${pkgver}.tar.gz" - spl_workdir="\${srcdir}/spl-\${pkgver}" - zfs_workdir="\${srcdir}/zfs-\${pkgver}" - spl_utils_replaces='replaces=("spl-utils-linux", "spl-utils-linux-lts")' - zfs_utils_replaces='replaces=("zfs-utils-linux", "zfs-utils-linux-lts")' -} diff --git a/src/kernels/dkms.sh b/src/kernels/dkms.sh index 74aae7f..003fa52 100644 --- a/src/kernels/dkms.sh +++ b/src/kernels/dkms.sh @@ -32,8 +32,8 @@ update_dkms_pkgbuilds() { zfs_pkgrel=${pkgrel} spl_pkgname="spl-dkms" zfs_pkgname="zfs-dkms" - spl_utils_pkgname="spl-utils-common=\${pkgver}" - zfs_utils_pkgname="zfs-utils-common=\${pkgver}" + spl_utils_pkgname="spl-utils=\${pkgver}" + zfs_utils_pkgname="zfs-utils=\${pkgver}" # Paths are relative to build.sh spl_dkms_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" zfs_dkms_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" @@ -61,7 +61,7 @@ update_dkms_git_pkgbuilds() { git_check_repo git_calc_pkgver fi - zfs_utils_pkgname="zfs-utils-common-git=\${pkgver}" + zfs_utils_pkgname="zfs-utils-git=\${pkgver}" zfs_mod_ver="git" zfs_set_commit="_commit='${latest_zfs_git_commit}'" zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" diff --git a/src/kernels/linux-hardened.sh b/src/kernels/linux-hardened.sh index eade960..9751512 100644 --- a/src/kernels/linux-hardened.sh +++ b/src/kernels/linux-hardened.sh @@ -57,9 +57,9 @@ update_linux_hardened_pkgbuilds() { spl_conflicts="'spl-linux-hardened-git'" zfs_conflicts="'zfs-linux-hardened-git'" spl_pkgname="spl-linux-hardened" - spl_utils_pkgname="spl-utils-common=\${_splver}" + spl_utils_pkgname="spl-utils=\${_splver}" zfs_pkgname="zfs-linux-hardened" - zfs_utils_pkgname="zfs-utils-common=\${_zfsver}" + zfs_utils_pkgname="zfs-utils=\${_zfsver}" # Paths are relative to build.sh spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" @@ -88,7 +88,7 @@ update_linux_hardened_git_pkgbuilds() { git_check_repo git_calc_pkgver fi - zfs_utils_pkgname="zfs-utils-common-git=\${_zfsver}" + zfs_utils_pkgname="zfs-utils-git=\${_zfsver}" zfs_set_commit="_commit='${latest_zfs_git_commit}'" zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" } diff --git a/src/kernels/linux-lts.sh b/src/kernels/linux-lts.sh index 5bffa6d..f4d3224 100644 --- a/src/kernels/linux-lts.sh +++ b/src/kernels/linux-lts.sh @@ -57,9 +57,9 @@ update_linux_lts_pkgbuilds() { spl_conflicts="'spl-linux-lts-git'" zfs_conflicts="'zfs-linux-lts-git'" spl_pkgname="spl-linux-lts" - spl_utils_pkgname="spl-utils-common=\${_splver}" + spl_utils_pkgname="spl-utils=\${_splver}" zfs_pkgname="zfs-linux-lts" - zfs_utils_pkgname="zfs-utils-common=\${_zfsver}" + zfs_utils_pkgname="zfs-utils=\${_zfsver}" # Paths are relative to build.sh spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" @@ -88,7 +88,7 @@ update_linux_lts_git_pkgbuilds() { git_check_repo git_calc_pkgver fi - zfs_utils_pkgname="zfs-utils-common-git=\${_zfsver}" + zfs_utils_pkgname="zfs-utils-git=\${_zfsver}" zfs_set_commit="_commit='${latest_zfs_git_commit}'" zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" } diff --git a/src/kernels/linux-vfio.sh b/src/kernels/linux-vfio.sh index f74afa1..12d0b1f 100644 --- a/src/kernels/linux-vfio.sh +++ b/src/kernels/linux-vfio.sh @@ -57,9 +57,9 @@ update_linux_vfio_pkgbuilds() { spl_conflicts="'spl-linux-vfio-git'" zfs_conflicts="'zfs-linux-vfio-git'" spl_pkgname="spl-linux-vfio" - spl_utils_pkgname="spl-utils-common=\${_splver}" + spl_utils_pkgname="spl-utils=\${_splver}" zfs_pkgname="zfs-linux-vfio" - zfs_utils_pkgname="zfs-utils-common=\${_zfsver}" + zfs_utils_pkgname="zfs-utils=\${_zfsver}" # Paths are relative to build.sh spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" @@ -88,7 +88,7 @@ update_linux_vfio_git_pkgbuilds() { git_check_repo git_calc_pkgver fi - zfs_utils_pkgname="zfs-utils-common-git=\${_zfsver}" + zfs_utils_pkgname="zfs-utils-git=\${_zfsver}" zfs_set_commit="_commit='${latest_zfs_git_commit}'" zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" } diff --git a/src/kernels/linux-zen.sh b/src/kernels/linux-zen.sh index 1190824..ad25a71 100644 --- a/src/kernels/linux-zen.sh +++ b/src/kernels/linux-zen.sh @@ -57,9 +57,9 @@ update_linux_zen_pkgbuilds() { spl_conflicts="'spl-linux-zen-git'" zfs_conflicts="'zfs-linux-zen-git'" spl_pkgname="spl-linux-zen" - spl_utils_pkgname="spl-utils-common=\${_splver}" + spl_utils_pkgname="spl-utils=\${_splver}" zfs_pkgname="zfs-linux-zen" - zfs_utils_pkgname="zfs-utils-common=\${_zfsver}" + zfs_utils_pkgname="zfs-utils=\${_zfsver}" # Paths are relative to build.sh spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" @@ -88,7 +88,7 @@ update_linux_zen_git_pkgbuilds() { git_check_repo git_calc_pkgver fi - zfs_utils_pkgname="zfs-utils-common-git=\${_zfsver}" + zfs_utils_pkgname="zfs-utils-git=\${_zfsver}" zfs_set_commit="_commit='${latest_zfs_git_commit}'" zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" } diff --git a/src/kernels/linux.sh b/src/kernels/linux.sh index 408a21f..6373b9c 100644 --- a/src/kernels/linux.sh +++ b/src/kernels/linux.sh @@ -57,9 +57,9 @@ update_linux_pkgbuilds() { spl_conflicts="'spl-linux-git'" zfs_conflicts="'zfs-linux-git'" spl_pkgname="spl-linux" - spl_utils_pkgname="spl-utils-common=\${_splver}" + spl_utils_pkgname="spl-utils=\${_splver}" zfs_pkgname="zfs-linux" - zfs_utils_pkgname="zfs-utils-common=\${_zfsver}" + zfs_utils_pkgname="zfs-utils=\${_zfsver}" # Paths are relative to build.sh spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" @@ -90,7 +90,7 @@ update_linux_git_pkgbuilds() { git_check_repo git_calc_pkgver fi - zfs_utils_pkgname="zfs-utils-common-git=\${_zfsver}" + zfs_utils_pkgname="zfs-utils-git=\${_zfsver}" zfs_set_commit="_commit='${latest_zfs_git_commit}'" zfs_src_target="git+${zfs_git_url}#commit=\${_commit}" }