      # 生成GPG 公钥
      if [ ! -f "repo-private.key" ];then
              echo "[INFO] private-key not exist, init repo, generate GPG Key..."
              gpg --batch --passphrase '' --quick-generate-key "containerd repo" default
              gpg --export-secret-keys -a "containerd repo" > "repo-private.key"
              gpg --export -a "containerd repo" > "containerd-archive-keyring.gpg"
              echo "[INFO] GPG private key and public key is generated!"
      else
              echo "[INFO] GPG is already exist!"
              gpg --import "repo-private.key"
      fi

      # 确保目录存在
      mkdir -p dists/stable/main/binary-loong64

      # 生成 Packages.gz
      dpkg-scanpackages pool /dev/null | gzip -9c > dists/stable/main/binary-loong64/Packages.gz

      # 生成 Release 文件
      mkdir -p dists/stable
      echo \"Origin: containerd\" > dists/stable/Release
      echo \"Label: containerd\" >> dists/stable/Release
      echo \"Suite: stable\" >> dists/stable/Release
      echo \"Codename: stable\" >> dists/stable/Release
      echo \"Architectures: loong64\" >> dists/stable/Release
      echo \"Components: main\" >> dists/stable/Release
      echo \"Description: Containerd Debian Repository\" >> dists/stable/Release

      KEY_ID=$(gpg --list-keys --with-colons "containerd repo" | awk -F: '/^pub/ {print $5}')
      gpg --batch --yes --default-key "$KEY_ID" -abs -o "dists/stable/Release.gpg" "dists/stable/Release"
      gpg --clearsign -o "dists/stable/InRelease" "dists/stable/Release"

