From 45140a4a1cab8956e91d8af311b4b91e4eaef5a2 Mon Sep 17 00:00:00 2001 From: Jan Houben Date: Tue, 11 Jul 2017 20:15:33 +0200 Subject: [PATCH] make utilities independent of kernel, to allow simultaneous installations --- .gitmodules | 27 ------- lib.sh | 19 ++++- .../linux-hardened/spl-utils-linux-hardened | 1 - .../linux-hardened/zfs-utils-linux-hardened | 1 - packages/linux-lts/spl-utils-linux-lts | 1 - packages/linux-lts/spl-utils-linux-lts-git | 1 - packages/linux-lts/zfs-utils-linux-lts | 1 - packages/linux-lts/zfs-utils-linux-lts-git | 1 - packages/linux/spl-utils-linux | 1 - packages/linux/spl-utils-linux-git | 1 - packages/linux/zfs-utils-linux | 1 - packages/linux/zfs-utils-linux-git | 1 - src/kernels/common.sh | 81 +++++++++++++++++++ src/kernels/linux-hardened.sh | 31 +++---- src/kernels/linux-lts.sh | 28 +++---- src/kernels/linux.sh | 30 +++---- src/spl-utils/PKGBUILD.sh | 2 +- src/zfs-utils/PKGBUILD.sh | 4 +- 18 files changed, 132 insertions(+), 100 deletions(-) delete mode 160000 packages/linux-hardened/spl-utils-linux-hardened delete mode 160000 packages/linux-hardened/zfs-utils-linux-hardened delete mode 160000 packages/linux-lts/spl-utils-linux-lts delete mode 160000 packages/linux-lts/spl-utils-linux-lts-git delete mode 160000 packages/linux-lts/zfs-utils-linux-lts delete mode 160000 packages/linux-lts/zfs-utils-linux-lts-git delete mode 160000 packages/linux/spl-utils-linux delete mode 160000 packages/linux/spl-utils-linux-git delete mode 160000 packages/linux/zfs-utils-linux delete mode 160000 packages/linux/zfs-utils-linux-git create mode 100644 src/kernels/common.sh diff --git a/.gitmodules b/.gitmodules index d0d5592..ece4a29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,25 +6,10 @@ path = packages/linux-lts/zfs-linux-lts url = ssh+git://aur@aur.archlinux.org/zfs-linux-lts.git branch = master -[submodule "zfs-utils-linux-lts"] - path = packages/linux-lts/zfs-utils-linux-lts - url = ssh+git://aur@aur.archlinux.org/zfs-utils-linux-lts.git - branch = master -[submodule "zfs-utils-linux-git"] - path = packages/linux/zfs-utils-linux-git - url = ssh+git://aur@aur.archlinux.org/zfs-utils-linux-git.git - branch = master [submodule "spl-linux-git"] path = packages/linux/spl-linux-git url = ssh+git://aur@aur.archlinux.org/spl-linux-git.git branch = master -[submodule "spl-utils-linux-git"] - path = packages/linux/spl-utils-linux-git - url = ssh+git://aur@aur.archlinux.org/spl-utils-linux-git.git - branch = master -[submodule "spl-utils-linux-lts"] - path = packages/linux-lts/spl-utils-linux-lts - url = ssh+git://aur@aur.archlinux.org/spl-utils-linux-lts.git branch = master [submodule "spl-linux-lts"] path = packages/linux-lts/spl-linux-lts @@ -33,12 +18,6 @@ [submodule "zfs-linux"] path = packages/linux/zfs-linux url = ssh+git://aur@aur.archlinux.org/zfs-linux.git -[submodule "zfs-utils-linux"] - path = packages/linux/zfs-utils-linux - url = ssh+git://aur@aur.archlinux.org/zfs-utils-linux.git -[submodule "spl-utils-linux"] - path = packages/linux/spl-utils-linux - url = ssh+git://aur@aur.archlinux.org/spl-utils-linux.git [submodule "spl-linux"] path = packages/linux/spl-linux url = ssh+git://aur@aur.archlinux.org/spl-linux.git @@ -57,12 +36,6 @@ [submodule "packages/linux-hardened/spl-linux-hardened"] path = packages/linux-hardened/spl-linux-hardened url = ssh+git://aur@aur.archlinux.org/spl-linux-hardened.git -[submodule "packages/linux-hardened/spl-utils-linux-hardened"] - path = packages/linux-hardened/spl-utils-linux-hardened - url = ssh+git://aur@aur.archlinux.org/spl-utils-linux-hardened.git -[submodule "packages/linux-hardened/zfs-utils-linux-hardened"] - path = packages/linux-hardened/zfs-utils-linux-hardened - url = ssh+git://aur@aur.archlinux.org/zfs-utils-linux-hardened.git [submodule "packages/linux-hardened/zfs-linux-hardened"] path = packages/linux-hardened/zfs-linux-hardened url = ssh+git://aur@aur.archlinux.org/zfs-linux-hardened.git diff --git a/lib.sh b/lib.sh index bb99f2d..841ad41 100644 --- a/lib.sh +++ b/lib.sh @@ -744,8 +744,14 @@ git_calc_pkgver() { if [[ ${repo} =~ ^zfs ]]; then sha=${zfs_git_commit} fi - - pkg=$(eval "echo \${${repo}_pkgname}") + + # use utils package, if no kernel version is set + if [ -z "${kernvers}" ]; then + pkg=$(eval "echo \${${repo}_utils_pkgname}") + else + pkg=$(eval "echo \${${repo}_pkgname}") + fi + debug "Using package '${pkg}'" # Checkout the git repo to a work directory @@ -760,7 +766,14 @@ git_calc_pkgver() { # Get the version number past the last tag msg2 "Calculating PKGVER" cmd="cd temp/${repo} && " - cmd+="echo \$(git describe --long | sed -r 's/^${repo}-//;s/([^-]*-g)/r\1/;s/-/_/g')_${kernvers}" + + # append kernel version if set + if [ ! -z "${kernvers}" ]; then + cmd+="echo \$(git describe --long | sed -r 's/^${repo}-//;s/([^-]*-g)/r\1/;s/-/_/g')_${kernvers}" + else + cmd+="echo \$(git describe --long | sed -r 's/^${repo}-//;s/([^-]*-g)/r\1/;s/-/_/g')" + fi + run_cmd_no_output_no_dry_run "${cmd}" if [[ ${repo} =~ ^spl ]]; then diff --git a/packages/linux-hardened/spl-utils-linux-hardened b/packages/linux-hardened/spl-utils-linux-hardened deleted file mode 160000 index c5e532b..0000000 --- a/packages/linux-hardened/spl-utils-linux-hardened +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c5e532ba76ade631a57c932bd23d3c79707b1bb4 diff --git a/packages/linux-hardened/zfs-utils-linux-hardened b/packages/linux-hardened/zfs-utils-linux-hardened deleted file mode 160000 index 8a75fcf..0000000 --- a/packages/linux-hardened/zfs-utils-linux-hardened +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8a75fcf3ee1fe67b6ccf8f6532bda7879f1337dd diff --git a/packages/linux-lts/spl-utils-linux-lts b/packages/linux-lts/spl-utils-linux-lts deleted file mode 160000 index 9d71972..0000000 --- a/packages/linux-lts/spl-utils-linux-lts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9d71972efe42974b9b3c636c87d83aa93e78ced8 diff --git a/packages/linux-lts/spl-utils-linux-lts-git b/packages/linux-lts/spl-utils-linux-lts-git deleted file mode 160000 index b0356a2..0000000 --- a/packages/linux-lts/spl-utils-linux-lts-git +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b0356a20ea0a6c7fb70be264d353a9450576ec95 diff --git a/packages/linux-lts/zfs-utils-linux-lts b/packages/linux-lts/zfs-utils-linux-lts deleted file mode 160000 index dbb2c06..0000000 --- a/packages/linux-lts/zfs-utils-linux-lts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dbb2c066cdd513c5059891707e254806d436c11a diff --git a/packages/linux-lts/zfs-utils-linux-lts-git b/packages/linux-lts/zfs-utils-linux-lts-git deleted file mode 160000 index c756f82..0000000 --- a/packages/linux-lts/zfs-utils-linux-lts-git +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c756f821bead31af8796cda52368417eedf40a4e diff --git a/packages/linux/spl-utils-linux b/packages/linux/spl-utils-linux deleted file mode 160000 index a5f6c29..0000000 --- a/packages/linux/spl-utils-linux +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a5f6c29c29c4f4ff17f8ad10c1c00bb338fc7357 diff --git a/packages/linux/spl-utils-linux-git b/packages/linux/spl-utils-linux-git deleted file mode 160000 index 79906f7..0000000 --- a/packages/linux/spl-utils-linux-git +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 79906f7ede7727705e3f6d812e660ab81171825e diff --git a/packages/linux/zfs-utils-linux b/packages/linux/zfs-utils-linux deleted file mode 160000 index 26e6309..0000000 --- a/packages/linux/zfs-utils-linux +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 26e6309fa4537c6dd1bd6001d25f31452de89827 diff --git a/packages/linux/zfs-utils-linux-git b/packages/linux/zfs-utils-linux-git deleted file mode 160000 index d2923c8..0000000 --- a/packages/linux/zfs-utils-linux-git +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d2923c84dce4a540df35d460d434f40b4ca334d1 diff --git a/src/kernels/common.sh b/src/kernels/common.sh new file mode 100644 index 0000000..ce74a67 --- /dev/null +++ b/src/kernels/common.sh @@ -0,0 +1,81 @@ +# For build.sh +mode_name="common" +mode_desc="Select and use the packages that are common between all kernels" + +# version +pkgrel="1" + +# Version for GIT packages +pkgrel_git="${pkgrel}" +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: 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_conflicts="'spl-utils-common-git'" + zfs_utils_conflicts="'zfs-utils-common-git'" + 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-${zol_version}/spl-${zol_version}.tar.gz" + zfs_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-${zol_version}/zfs-${zol_version}.tar.gz" + spl_workdir="\${srcdir}/spl-${zol_version}" + zfs_workdir="\${srcdir}/zfs-${zol_version}" + spl_utils_replaces='replaces=("spl-utils-linux", "spl-utils-linux-lts")' + zfs_utils_replaces='replaces=("zfs-utils-linux", "zfs-utils-linux-lts")' +} + +update_common_git_pkgbuilds() { + pkg_list=("spl-utils-common-git" "zfs-utils-common-git") + archzfs_package_group="archzfs-linux-git" + spl_pkgver="" # Set later by call to git_calc_pkgver + zfs_pkgver="" # Set later by call to git_calc_pkgver + spl_pkgrel=${pkgrel_git} + zfs_pkgrel=${pkgrel_git} + spl_utils_conflicts="'spl-utils-common'" + zfs_utils_conflicts="'zfs-utils-common'" + spl_utils_pkgname="spl-utils-common-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}" + spl_src_target="git+${spl_git_url}" + if [[ ${spl_git_commit} != "" ]]; then + spl_src_target="git+${spl_git_url}#commit=${spl_git_commit}" + fi + spl_src_hash="SKIP" + spl_makedepends="\"git\"" + zfs_src_target="git+${zfs_git_url}" + if [[ ${zfs_git_commit} != "" ]]; then + zfs_src_target="git+${zfs_git_url}#commit=${zfs_git_commit}" + fi + zfs_src_hash="SKIP" + zfs_makedepends="\"git\"" + spl_workdir="\${srcdir}/spl" + zfs_workdir="\${srcdir}/zfs" + + spl_utils_replaces='replaces=("spl-utils-linux", "spl-utils-linux-lts")' + zfs_utils_replaces='replaces=("zfs-utils-linux", "zfs-utils-linux-lts")' + + if have_command "update"; then + git_check_repo + git_calc_pkgver + fi +} diff --git a/src/kernels/linux-hardened.sh b/src/kernels/linux-hardened.sh index 8028d34..e70f59c 100644 --- a/src/kernels/linux-hardened.sh +++ b/src/kernels/linux-hardened.sh @@ -35,7 +35,7 @@ header="\ #" update_linux_hardened_pkgbuilds() { - pkg_list=("spl-utils-linux-hardened" "spl-linux-hardened" "zfs-utils-linux-hardened" "zfs-linux-hardened") + pkg_list=("spl-linux-hardened" "zfs-linux-hardened") kernel_version_full=$(kernel_version_full ${kernel_version}) kernel_version_full_pkgver=$(kernel_version_full_no_hyphen ${kernel_version}) kernel_version_major=${kernel_version%-*} @@ -45,17 +45,13 @@ update_linux_hardened_pkgbuilds() { zfs_pkgver=${zol_version}_${kernel_version_full_pkgver} spl_pkgrel=${pkgrel} zfs_pkgrel=${pkgrel} - spl_utils_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-utils-linux-lts' 'spl-utils-linux-lts-git' 'spl-utils-linux-hardened-git'" - spl_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-utils-linux-lts' 'spl-utils-linux-lts-git' 'spl-linux-hardened-git'" - zfs_utils_conflicts="'zfs-utils-linux' 'zfs-utils-linux-git' 'zfs-utils-linux-lts' 'zfs-utils-linux-lts-git' 'zfs-utils-linux-hardened-git'" - zfs_conflicts="'zfs-linux' 'zfs-linux-git' 'zfs-linux-lts' 'zfs-linux-lts-git' 'zfs-linux-hardened-git'" - spl_utils_pkgname="spl-utils-linux-hardened" + spl_conflicts="'spl-linux-hardened-git'" + zfs_conflicts="'zfs-linux-hardened-git'" + spl_utils_pkgname="spl-utils-common" spl_pkgname="spl-linux-hardened" - zfs_utils_pkgname="zfs-utils-linux-hardened" + zfs_utils_pkgname="zfs-utils-common" zfs_pkgname="zfs-linux-hardened" - spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" - zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" spl_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-${zol_version}/spl-${zol_version}.tar.gz" zfs_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-${zol_version}/zfs-${zol_version}.tar.gz" @@ -63,10 +59,11 @@ update_linux_hardened_pkgbuilds() { zfs_workdir="\${srcdir}/zfs-${zol_version}" linux_depends="\"linux-hardened=${kernel_version}\"" linux_headers_depends="\"linux-hardened-headers=${kernel_version}\"" + zfs_makedepends="\"${spl_pkgname}-headers\"" } # update_linux_hardened_git_pkgbuilds() { -# pkg_list=("spl-utils-linux-hardened-git" "spl-linux-hardened-git" "zfs-utils-linux-hardened-git" "zfs-linux-hardened-git") +# pkg_list=("spl-linux-hardened-git" "zfs-linux-hardened-git") # kernel_version=${kernel_version_git} # kernel_version_full=$(kernel_version_full ${kernel_version_git}) # kernel_version_full_pkgver=$(kernel_version_full_no_hyphen ${kernel_version_git}) @@ -77,17 +74,13 @@ update_linux_hardened_pkgbuilds() { # zfs_pkgver="" # Set later by call to git_calc_pkgver # spl_pkgrel=${pkgrel_git} # zfs_pkgrel=${pkgrel_git} -# spl_utils_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-utils-linux-lts' 'spl-utils-linux-lts-git' 'spl-utils-linux-hardened'" -# spl_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-utils-linux-lts' 'spl-utils-linux-lts-git' 'spl-utils-linux-hardened'" -# zfs_utils_conflicts="'zfs-utils-linux' 'zfs-utils-linux-git' 'zfs-utils-linux-lts' 'zfs-utils-linux-lts-git' 'zfs-utils-linux-hardened'" -# zfs_conflicts="'zfs-linux' 'zfs-linux-git' 'zfs-linux-lts' 'zfs-linux-lts-git' 'zfs-git' 'zfs-linux-hardened'" -# spl_utils_pkgname="spl-utils-linux-hardened-git" +# spl_conflicts="'spl-linux-hardened'" +# zfs_conflicts="'zfs-linux-hardened'" +# spl_utils_pkgname="spl-utils-common-git" # spl_pkgname="spl-linux-hardened-git" -# zfs_utils_pkgname="zfs-utils-linux-hardened-git" +# zfs_utils_pkgname="zfs-utils-common-git" # zfs_pkgname="zfs-linux-hardened-git" -# spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" # spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" -# zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" # zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" # spl_src_target="git+${spl_git_url}" # if [[ ${spl_git_commit} != "" ]]; then @@ -102,7 +95,7 @@ update_linux_hardened_pkgbuilds() { # zfs_src_target="git+${zfs_git_url}#commit=${zfs_git_commit}" # fi # zfs_src_hash="SKIP" -# zfs_makedepends="\"git\"" +# zfs_makedepends="\"git\" \"${spl_pkgname}-headers\"" # spl_workdir="\${srcdir}/spl" # zfs_workdir="\${srcdir}/zfs" # if have_command "update"; then diff --git a/src/kernels/linux-lts.sh b/src/kernels/linux-lts.sh index b02f857..08611cd 100644 --- a/src/kernels/linux-lts.sh +++ b/src/kernels/linux-lts.sh @@ -34,7 +34,7 @@ header="\ #" update_linux_lts_pkgbuilds() { - pkg_list=("spl-utils-linux-lts" "spl-linux-lts" "zfs-utils-linux-lts" "zfs-linux-lts") + pkg_list=("spl-linux-lts" "zfs-linux-lts") kernel_version_full=$(kernel_version_full ${kernel_version}) kernel_version_full_pkgver=$(kernel_version_full_no_hyphen ${kernel_version}) kernel_version_major=${kernel_version%-*} @@ -44,17 +44,13 @@ update_linux_lts_pkgbuilds() { zfs_pkgver=${zol_version}_${kernel_version_full_pkgver} spl_pkgrel=${pkgrel} zfs_pkgrel=${pkgrel} - spl_utils_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-utils-linux-lts-git'" - spl_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-linux-lts-git'" - zfs_utils_conflicts="'zfs-utils-linux' 'zfs-utils-linux-git' 'zfs-utils-linux-lts-git'" - zfs_conflicts="'zfs-linux' 'zfs-linux-git' 'zfs-linux-lts-git'" - spl_utils_pkgname="spl-utils-linux-lts" + spl_conflicts="'spl-linux-lts-git'" + zfs_conflicts="'zfs-linux-lts-git'" + spl_utils_pkgname="spl-utils-common" spl_pkgname="spl-linux-lts" - zfs_utils_pkgname="zfs-utils-linux-lts" + zfs_utils_pkgname="zfs-utils-common" zfs_pkgname="zfs-linux-lts" - spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" - zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" spl_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-${zol_version}/spl-${zol_version}.tar.gz" zfs_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-${zol_version}/zfs-${zol_version}.tar.gz" @@ -65,7 +61,7 @@ update_linux_lts_pkgbuilds() { } update_linux_lts_git_pkgbuilds() { - pkg_list=("spl-utils-linux-lts-git" "spl-linux-lts-git" "zfs-utils-linux-lts-git" "zfs-linux-lts-git") + pkg_list=("spl-linux-lts-git" "zfs-linux-lts-git") kernel_version=${kernel_version_git} kernel_version_full=$(kernel_version_full ${kernel_version_git}) kernel_version_full_pkgver=$(kernel_version_full_no_hyphen ${kernel_version_git}) @@ -76,17 +72,13 @@ update_linux_lts_git_pkgbuilds() { zfs_pkgver="" # Set later by call to git_calc_pkgver spl_pkgrel=${pkgrel_git} zfs_pkgrel=${pkgrel_git} - spl_utils_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-utils-linux-lts'" - spl_conflicts="'spl-utils-linux' 'spl-utils-linux-git' 'spl-utils-linux-lts'" - zfs_utils_conflicts="'zfs-utils-linux' 'zfs-utils-linux-git' 'zfs-utils-linux-lts'" - zfs_conflicts="'zfs-linux' 'zfs-linux' 'zfs-git' 'zfs-linux-lts'" - spl_utils_pkgname="spl-utils-linux-lts-git" + spl_conflicts="'spl-linux-lts'" + zfs_conflicts="'zfs-linux-lts'" + spl_utils_pkgname="spl-utils-common-git" spl_pkgname="spl-linux-lts-git" - zfs_utils_pkgname="zfs-utils-linux-lts-git" + zfs_utils_pkgname="zfs-utils-common-git" zfs_pkgname="zfs-linux-lts-git" - spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" - zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" spl_src_target="git+${spl_git_url}" if [[ ${spl_git_commit} != "" ]]; then diff --git a/src/kernels/linux.sh b/src/kernels/linux.sh index f72ad1b..2f2b0cc 100644 --- a/src/kernels/linux.sh +++ b/src/kernels/linux.sh @@ -33,7 +33,7 @@ header="\ #" update_linux_pkgbuilds() { - pkg_list=("spl-utils-linux" "spl-linux" "zfs-utils-linux" "zfs-linux") + pkg_list=("spl-linux" "zfs-linux") kernel_version_full=$(kernel_version_full ${kernel_version}) kernel_version_full_pkgver=$(kernel_version_full_no_hyphen ${kernel_version}) kernel_version_major=${kernel_version%-*} @@ -43,18 +43,14 @@ update_linux_pkgbuilds() { zfs_pkgver=${zol_version}_${kernel_version_full_pkgver} spl_pkgrel=${pkgrel} zfs_pkgrel=${pkgrel} - spl_utils_conflicts="'spl-utils-linux-git' 'spl-utils-linux-lts'" - spl_conflicts="'spl-utils-linux-git' 'spl-utils-linux-lts'" - zfs_utils_conflicts="'zfs-utils-linux-git' 'zfs-utils-linux-lts'" - zfs_conflicts="'zfs-linux-git' 'zfs-linux-lts'" - spl_utils_pkgname="spl-utils-linux" + spl_conflicts="'spl-linux-lts-git'" + zfs_conflicts="'zfs-linux-lts-git'" spl_pkgname="spl-linux" - zfs_utils_pkgname="zfs-utils-linux" + spl_utils_pkgname="spl-utils-common" zfs_pkgname="zfs-linux" + zfs_utils_pkgname="zfs-utils-common" # Paths are relative to build.sh - spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" - zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" spl_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-${zol_version}/spl-${zol_version}.tar.gz" zfs_src_target="https://github.com/zfsonlinux/zfs/releases/download/zfs-${zol_version}/zfs-${zol_version}.tar.gz" @@ -63,13 +59,11 @@ update_linux_pkgbuilds() { linux_depends="\"linux=${kernel_version_full}\"" linux_headers_depends="\"linux-headers=${kernel_version_full}\"" spl_replaces='replaces=("spl-git")' - spl_utils_replaces='replaces=("spl-utils-git")' zfs_replaces='replaces=("zfs-git")' - zfs_utils_replaces='replaces=("zfs-utils-git")' } update_linux_git_pkgbuilds() { - pkg_list=("spl-utils-linux-git" "spl-linux-git" "zfs-utils-linux-git" "zfs-linux-git") + pkg_list=("spl-linux-git" "zfs-linux-git") kernel_version=${kernel_version_git} kernel_version_full=$(kernel_version_full ${kernel_version_git}) kernel_version_full_pkgver=$(kernel_version_full_no_hyphen ${kernel_version_git}) @@ -80,17 +74,13 @@ update_linux_git_pkgbuilds() { zfs_pkgver="" # Set later by call to git_calc_pkgver spl_pkgrel=${pkgrel_git} zfs_pkgrel=${pkgrel_git} - spl_utils_conflicts="'spl-utils-linux' 'spl-utils-linux-lts' 'spl-utils-linux-lts-git'" - spl_conflicts="'spl-utils-linux' 'spl-utils-linux-lts' 'spl-utils-linux-lts-git'" - zfs_utils_conflicts="'zfs-utils-linux' 'zfs-utils-linux-lts' 'zfs-utils-linux-lts-git'" - zfs_conflicts="'zfs-linux' 'zfs-linux-lts' 'zfs-linux-lts-git'" - spl_utils_pkgname="spl-utils-linux-git" + spl_conflicts="'spl-linux'" + zfs_conflicts="'zfs-linux'" spl_pkgname="spl-linux-git" - zfs_utils_pkgname="zfs-utils-linux-git" + spl_utils_pkgname="spl-utils-common-git" zfs_pkgname="zfs-linux-git" - spl_utils_pkgbuild_path="packages/${kernel_name}/${spl_utils_pkgname}" + zfs_utils_pkgname="zfs-utils-common-git" spl_pkgbuild_path="packages/${kernel_name}/${spl_pkgname}" - zfs_utils_pkgbuild_path="packages/${kernel_name}/${zfs_utils_pkgname}" zfs_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}" spl_src_target="git+${spl_git_url}" if [[ ${spl_git_commit} != "" ]]; then diff --git a/src/spl-utils/PKGBUILD.sh b/src/spl-utils/PKGBUILD.sh index 27cdd87..3db70b7 100755 --- a/src/spl-utils/PKGBUILD.sh +++ b/src/spl-utils/PKGBUILD.sh @@ -13,7 +13,7 @@ sha256sums=("${spl_src_hash}") groups=("${archzfs_package_group}") license=("GPL") provides=("spl-utils") -makedepends=(${linux_headers_depends} ${spl_makedepends}) +makedepends=(${spl_makedepends}) conflicts=(${spl_utils_conflicts}) ${spl_utils_replaces} diff --git a/src/zfs-utils/PKGBUILD.sh b/src/zfs-utils/PKGBUILD.sh index f6721a9..95a661d 100755 --- a/src/zfs-utils/PKGBUILD.sh +++ b/src/zfs-utils/PKGBUILD.sh @@ -6,8 +6,8 @@ pkgname="${zfs_utils_pkgname}" pkgver=${zfs_pkgver} pkgrel=${zfs_pkgrel} pkgdesc="Kernel module support files for the Zettabyte File System." -depends=("${spl_pkgname}" ${linux_depends}) -makedepends=(${linux_headers_depends} ${zfs_makedepends}) +depends=("${spl_pkgname}") +makedepends=(${zfs_makedepends}) arch=("x86_64") url="http://zfsonlinux.org/" source=("${zfs_src_target}"