@@ -698,6 +698,40 @@ func (g *PigstyConfigGenerator) getFuncMap() template.FuncMap {
698698 }
699699 return basePkgs + " flamegraph chkconfig"
700700 },
701+ "getNodePackage2" : func () string {
702+ // Handle OS-specific package differences
703+ if g .isRPM () {
704+ // RPM systems use bind-utils
705+ return g .constants .RPMCommonPkg [4 ]
706+ }
707+ // DEB systems - check for Debian 13 special case
708+ if g .osCode == "d13" {
709+ // Debian 13 renamed dnsutils to bind9-dnsutils
710+ return strings .ReplaceAll (g .constants .DEBCommonPkg [4 ], "dnsutils" , "bind9-dnsutils" )
711+ }
712+ // Other DEB systems use standard dnsutils
713+ return g .constants .DEBCommonPkg [4 ]
714+ },
715+ "getDNSPackage" : func () string {
716+ // Return the appropriate DNS utilities package name
717+ if g .isRPM () {
718+ return "bind-utils"
719+ }
720+ if g .osCode == "d13" {
721+ // Debian 13 renamed dnsutils to bind9-dnsutils
722+ return "bind9-dnsutils"
723+ }
724+ // Other DEB systems use dnsutils
725+ return "dnsutils"
726+ },
727+ "getDockerRepo" : func () string {
728+ // For el10, use RHEL repositories instead of CentOS
729+ if g .osCode == "el10" {
730+ return "- { name: docker-ce ,description: 'Docker CE' ,module: infra ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.docker.com/linux/rhel/$releasever/$basearch/stable' ,china: 'https://mirrors.aliyun.com/docker-ce/linux/rhel/$releasever/$basearch/stable' ,europe: 'https://mirrors.xtom.de/docker-ce/linux/rhel/$releasever/$basearch/stable' }}"
731+ }
732+ // For other EL versions, use CentOS repositories
733+ return "- { name: docker-ce ,description: 'Docker CE' ,module: infra ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.docker.com/linux/centos/$releasever/$basearch/stable' ,china: 'https://mirrors.aliyun.com/docker-ce/linux/centos/$releasever/$basearch/stable' ,europe: 'https://mirrors.xtom.de/docker-ce/linux/centos/$releasever/$basearch/stable' }}"
734+ },
701735 }
702736}
703737
@@ -891,7 +925,7 @@ repo_upstream_default:
891925 - { name: pigsty-infra ,description: 'Pigsty INFRA' ,module: infra ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://repo.pigsty.io/yum/infra/$basearch' ,china: 'https://repo.pigsty.cc/yum/infra/$basearch' }}
892926 - { name: pigsty-pgsql ,description: 'Pigsty PGSQL' ,module: pgsql ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://repo.pigsty.io/yum/pgsql/el$releasever.$basearch' ,china: 'https://repo.pigsty.cc/yum/pgsql/el$releasever.$basearch' }}
893927 - { name: nginx ,description: 'Nginx Repo' ,module: infra ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://nginx.org/packages/rhel/$releasever/$basearch/' }}
894- - { name: docker-ce ,description: 'Docker CE' ,module: infra ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.docker.com/linux/centos/$releasever/$basearch/stable' ,china: 'https://mirrors.aliyun.com/docker-ce/linux/centos/$releasever/$basearch/stable' ,europe: 'https://mirrors.xtom.de/docker-ce/linux/centos/$releasever/$basearch/stable' }}
928+ {{ getDockerRepo }}
895929 - { name: baseos ,description: 'EL 8+ BaseOS' ,module: node ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://dl.rockylinux.org/pub/rocky/$releasever/BaseOS/$basearch/os/' ,china: 'https://mirrors.aliyun.com/rockylinux/$releasever/BaseOS/$basearch/os/' ,europe: 'https://mirrors.xtom.de/rocky/$releasever/BaseOS/$basearch/os/' }}
896930 - { name: appstream ,description: 'EL 8+ AppStream' ,module: node ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://dl.rockylinux.org/pub/rocky/$releasever/AppStream/$basearch/os/' ,china: 'https://mirrors.aliyun.com/rockylinux/$releasever/AppStream/$basearch/os/' ,europe: 'https://mirrors.xtom.de/rocky/$releasever/AppStream/$basearch/os/' }}
897931 - { name: extras ,description: 'EL 8+ Extras' ,module: node ,releases: [8,9,10] ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://dl.rockylinux.org/pub/rocky/$releasever/extras/$basearch/os/' ,china: 'https://mirrors.aliyun.com/rockylinux/$releasever/extras/$basearch/os/' ,europe: 'https://mirrors.xtom.de/rocky/$releasever/extras/$basearch/os/' }}
@@ -1015,7 +1049,7 @@ repo_extra_packages_default: [ pgsql-main ]
10151049node_packages_default:
10161050 - lz4,unzip,bzip2,pv,jq,git,ncdu,make,patch,bash,lsof,wget,uuid,tuned,nvme-cli,numactl,sysstat,iotop,htop,rsync,tcpdump
10171051 - python3,python3-pip,socat,lrzsz,net-tools,ipvsadm,telnet,ca-certificates,openssl,keepalived,etcd,haproxy,chrony,pig
1018- - zlib1g,acl,dnsutils ,libreadline-dev,vim-tiny,node-exporter,openssh-server,openssh-client
1052+ - zlib1g,acl,{{ getDNSPackage }} ,libreadline-dev,vim-tiny,node-exporter,openssh-server,openssh-client
10191053
10201054# default infra packages to be installed (if ` + "`infra_packages`" + ` is not explicitly set)
10211055infra_packages_default:
@@ -1082,7 +1116,7 @@ package_map:
10821116 infra-addons: "{{ index .Constants.DEBCommonPkg 1 }}"
10831117 extra-modules: "{{ index .Constants.DEBCommonPkg 2 }}"
10841118 node-package1: "{{ index .Constants.DEBCommonPkg 3 }}"
1085- node-package2: "{{ index .Constants.DEBCommonPkg 4 }}"
1119+ node-package2: "{{ getNodePackage2 }}"
10861120 pgsql-utility: "{{ index .Constants.DEBCommonPkg 5 }}"
10871121
10881122 #--------------------------------#
0 commit comments