Refactor conflicts between packages (fixes #269)

pull/254/head
Jan Houben 6 years ago
parent c08367e1b2
commit 40e120de90
No known key found for this signature in database
GPG Key ID: 6866AADB974DD983
  1. 5
      build.sh
  2. 20
      lib.sh
  3. 1
      src/kernels/common-git.sh
  4. 4
      src/kernels/common.sh
  5. 5
      src/kernels/dkms.sh
  6. 2
      src/kernels/linux-hardened.sh
  7. 2
      src/kernels/linux-lts.sh
  8. 2
      src/kernels/linux-vfio.sh
  9. 2
      src/kernels/linux-zen.sh
  10. 2
      src/kernels/linux.sh
  11. 4
      src/spl-dkms/PKGBUILD.sh
  12. 2
      src/spl-utils/PKGBUILD.sh
  13. 5
      src/spl/PKGBUILD.sh
  14. 13
      src/zfs-dkms/PKGBUILD.sh
  15. 13
      src/zfs-utils/PKGBUILD.sh
  16. 20
      src/zfs/PKGBUILD.sh

@ -185,10 +185,6 @@ generate_package_files() {
msg2 "Creating zfs-dkms PKGBUILD"
run_cmd_no_output "source ${script_dir}/src/zfs-dkms/PKGBUILD.sh"
else
# remove own headers from conflicts
zfs_headers_conflicts=${zfs_headers_conflicts_all/"'${zfs_pkgname}-headers'"}
spl_headers_conflicts=${spl_headers_conflicts_all/"'${spl_pkgname}-headers'"}
# skip spl for git packages
if [[ ! ${archzfs_package_group} =~ -git$ ]]; then
msg2 "Removing old spl patches (if any)"
@ -346,7 +342,6 @@ for (( i = 0; i < ${#modes[@]}; i++ )); do
mode=${modes[i]}
kernel_name=${kernel_names[i]}
get_conflicts
get_kernel_update_funcs
debug_print_default_vars

@ -679,26 +679,6 @@ get_kernel_update_funcs() {
done
}
get_conflicts() {
zfs_headers_conflicts_all=()
spl_headers_conflicts_all=()
zfs_conflicts_all=()
spl_conflicts_all=()
for kernel in $(ls ${script_dir}/src/kernels); do
# do not conflict with common or dkms packages
if [[ "$kernel" == "common.sh" || "$kernel" == "common-git.sh" || "$kernel" == "dkms.sh" ]]; then
continue;
fi
source_safe "src/kernels/${kernel}"
zfs_headers_conflicts_all+="'zfs-${package_base}-headers' 'zfs-${package_base}-git-headers' "
spl_headers_conflicts_all+="'spl-${package_base}-headers' 'spl-${package_base}-git-headers' "
zfs_conflicts_all+="'zfs-${package_base}' 'zfs-${package_base}-git' "
spl_conflicts_all+="'spl-${package_base}' 'spl-${package_base}-git' "
done
}
check_skip_build() {
# $1: Name of package to check
pkg=${1}

@ -23,7 +23,6 @@ update_common_git_pkgbuilds() {
archzfs_package_group="archzfs-linux-git"
zfs_pkgver="" # Set later by call to git_calc_pkgver
zfs_pkgrel=${pkgrel_git}
zfs_utils_conflicts="'zfs-utils-common' 'spl-utils-common' '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}"

@ -3,7 +3,7 @@ mode_name="common"
mode_desc="Select and use the packages that are common between all kernels"
# version
pkgrel="1"
pkgrel="2"
header="\
# Maintainer: Jan Houben <jan@nexttrex.de>
@ -21,8 +21,6 @@ update_common_pkgbuilds() {
zfs_pkgver=${zol_version}
spl_pkgrel=${pkgrel}
zfs_pkgrel=${pkgrel}
spl_utils_conflicts="'spl-utils-common-git' 'spl-utils-linux-git' 'spl-utils-linux' 'spl-utils-linux-lts' 'spl-utils-linux-lts-git'"
zfs_utils_conflicts="'zfs-utils-common-git' 'zfs-utils-linux-git' 'zfs-utils-linux' 'zfs-utils-linux-lts' 'zfs-utils-linux-lts-git'"
spl_utils_pkgname="spl-utils-common"
zfs_utils_pkgname="zfs-utils-common"
# Paths are relative to build.sh

@ -3,7 +3,7 @@ mode_name="dkms"
mode_desc="Select and use the dkms packages"
# version
pkgrel="1"
pkgrel="2"
# Version for GIT packages
pkgrel_git="1"
@ -30,8 +30,6 @@ update_dkms_pkgbuilds() {
zfs_mod_ver="\${pkgver}"
spl_pkgrel=${pkgrel}
zfs_pkgrel=${pkgrel}
spl_conflicts="'spl-dkms-git'"
zfs_conflicts="'zfs-dkms-git'"
spl_pkgname="spl-dkms"
zfs_pkgname="zfs-dkms"
spl_utils_pkgname="spl-utils-common=\${pkgver}"
@ -50,7 +48,6 @@ update_dkms_git_pkgbuilds() {
archzfs_package_group="archzfs-dkms-git"
zfs_pkgver="" # Set later by call to git_calc_pkgver
zfs_pkgrel=${pkgrel_git}
zfs_conflicts="'zfs-dkms' 'spl-dkms-git'"
spl_pkgname=""
zfs_pkgname="zfs-dkms-git"
zfs_dkms_pkgbuild_path="packages/${kernel_name}/${zfs_pkgname}"

@ -4,7 +4,7 @@ package_base="linux-hardened"
mode_desc="Select and use the packages for the linux-hardened kernel"
# pkgrel for hardened packages
pkgrel="1"
pkgrel="2"
# pkgrel for GIT packages
pkgrel_git="1"

@ -4,7 +4,7 @@ package_base="linux-lts"
mode_desc="Select and use the packages for the linux-lts kernel"
# pkgrel for LTS packages
pkgrel="1"
pkgrel="2"
# pkgrel for GIT packages
pkgrel_git="1"

@ -4,7 +4,7 @@ package_base="linux-vfio"
mode_desc="Select and use the packages for the linux-vfio kernel"
# pkgrel for vfio packages
pkgrel="1"
pkgrel="2"
# pkgrel for GIT packages
pkgrel_git="1"

@ -4,7 +4,7 @@ package_base="linux-zen"
mode_desc="Select and use the packages for the linux-zen kernel"
# pkgrel for ZEN packages
pkgrel="1"
pkgrel="2"
# pkgrel for GIT packages
pkgrel_git="1"

@ -4,7 +4,7 @@ package_base="linux"
mode_desc="Select and use the packages for the default linux kernel"
# pkgrel for default ZFS packages
pkgrel="1"
pkgrel="2"
# pkgrel for GIT packages
pkgrel_git="1"

@ -13,9 +13,9 @@ source=("${spl_src_target}")
sha256sums=("${spl_src_hash}")
license=("GPL")
depends=("${spl_utils_pkgname}" "dkms")
provides=("spl")
provides=("spl" "spl-headers")
groups=("${archzfs_package_group}")
conflicts=(${spl_conflicts} ${spl_conflicts_all} ${spl_headrs_conflicts_all})
conflicts=("spl" "spl-headers")
${spl_replaces}
build() {

@ -14,7 +14,7 @@ groups=("${archzfs_package_group}")
license=("GPL")
provides=("spl-utils")
makedepends=(${spl_makedepends})
conflicts=(${spl_utils_conflicts})
conflicts=("spl-utils")
${spl_utils_replaces}
build() {

@ -33,7 +33,7 @@ package_${spl_pkgname}() {
pkgdesc="Solaris Porting Layer kernel modules."
provides=("spl")
groups=("${archzfs_package_group}")
conflicts=(${spl_conflicts})
conflicts=("spl-dkms" "spl-dkms-git" ${spl_conflicts})
${spl_replaces}
cd "${spl_workdir}"
@ -46,7 +46,8 @@ package_${spl_pkgname}() {
package_${spl_pkgname}-headers() {
pkgdesc="Solaris Porting Layer kernel headers."
conflicts=(${spl_headers_conflicts})
provides=("spl-headers")
conflicts=("spl-dkms" "spl-dkms-git" "spl-headers")
cd "${spl_workdir}"
make DESTDIR="\${pkgdir}" install

@ -1,8 +1,13 @@
#!/bin/bash
# remove spl from git packages workaround
# spl is included in git packages (workaround till zfs 0.8)
spl_dependency=""
if [[ -n "${spl_pkgname}" ]]; then
git_provides=""
git_conflicts=""
if [[ ${archzfs_package_group} =~ -git$ ]]; then
git_provides+=' "spl" "spl-headers"'
git_conflicts+=' "spl" "spl-headers"'
else
spl_dependency="'${spl_pkgname}' "
fi
@ -20,9 +25,9 @@ source=("${zfs_src_target}")
sha256sums=("${zfs_src_hash}")
license=("CDDL")
depends=(${spl_dependency}"${zfs_utils_pkgname}" "lsb-release" "dkms")
provides=("zfs")
provides=("zfs" "zfs-headers"${git_provides})
groups=("${archzfs_package_group}")
conflicts=(${zfs_conflicts} ${zfs_conflicts_all} ${zfs_headers_conflicts_all})
conflicts=("zfs" "zfs-headers"${git_conflicts})
${zfs_replaces}
build() {

@ -1,9 +1,11 @@
#!/bin/bash
zfs_depends=""
# pyzfs in zfs-git depends on python2 (https://github.com/zfsonlinux/zfs/pull/7230)
# spl is included in git packages (workaround till zfs 0.8)
git_provides=""
git_conflicts=""
if [[ ${archzfs_package_group} =~ -git$ ]]; then
zfs_depends+="\"python2\""
git_provides+=' "spl-utils"'
git_conflicts+=' "spl-utils"'
fi
cat << EOF > ${zfs_utils_pkgbuild_path}/PKGBUILD
@ -13,7 +15,6 @@ ${zfs_set_commit}
pkgver=${zfs_pkgver}
pkgrel=${zfs_pkgrel}
pkgdesc="Kernel module support files for the Zettabyte File System."
depends=(${zfs_depends})
makedepends=(${zfs_makedepends})
arch=("x86_64")
url="http://zfsonlinux.org/"
@ -29,9 +30,9 @@ sha256sums=("${zfs_src_hash}"
"29080a84e5d7e36e63c4412b98646043724621245b36e5288f5fed6914da5b68")
license=("CDDL")
groups=("${archzfs_package_group}")
provides=("zfs-utils")
provides=("zfs-utils"${git_provides})
install=zfs-utils.install
conflicts=(${zfs_utils_conflicts})
conflicts=("zfs-utils"${git_conflicts})
${zfs_utils_replaces}
backup=('etc/zfs/zed.d/zed.rc' 'etc/default/zfs')

@ -1,8 +1,17 @@
#!/bin/bash
# remove spl from git packages workaround
# spl is included in git packages (workaround till zfs 0.8)
spl_dependency=""
if [[ -n "${spl_pkgname}" ]]; then
git_provides=""
git_provides_headers=""
git_conflicts=""
git_conflicts_headers=""
if [[ ${archzfs_package_group} =~ -git$ ]]; then
git_provides+=' "spl"'
git_provides_headers+=' "spl-headers"'
git_conflicts+=' "spl-dkms" "spl-dkms-git"'
git_conflicts_headers+=' "spl-dkms" "spl-dkms-git" "spl-headers"'
else
spl_dependency="'${spl_pkgname}' "
fi
@ -40,9 +49,9 @@ build() {
package_${zfs_pkgname}() {
pkgdesc="Kernel modules for the Zettabyte File System."
install=zfs.install
provides=("zfs")
provides=("zfs"${git_provides})
groups=("${archzfs_package_group}")
conflicts=(${zfs_conflicts})
conflicts=("zfs-dkms" "zfs-dkms-git" ${zfs_conflicts}${git_conflicts})
${zfs_replaces}
cd "${zfs_workdir}"
@ -56,7 +65,8 @@ package_${zfs_pkgname}() {
package_${zfs_pkgname}-headers() {
pkgdesc="Kernel headers for the Zettabyte File System."
conflicts=(${zfs_headers_conflicts})
provides=("zfs-headers"${git_provides_headers})
conflicts=("zfs-headers" "zfs-dkms" "zfs-dkms-git"${git_conflicts_headers})
cd "${zfs_workdir}"
make DESTDIR="\${pkgdir}" install

Loading…
Cancel
Save