From aa0e029fce58e0f8b1a5508069450ebbfa9a9c2e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 2 Jun 2016 23:21:51 -0400 Subject: db-update: add some stricter checks from Arch Linux upstream --- db-update | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/db-update b/db-update index a1552c0..b769b5d 100755 --- a/db-update +++ b/db-update @@ -43,9 +43,21 @@ for repo in "${repos[@]}"; do if ! check_pkgfile "${pkg}"; then die "Package %s is not consistent with its meta data" "${repo}/${pkg##*/}" fi + if "${REQUIRE_SIGNATURE}" && ! pacman-key -v "${pkg}.sig" >/dev/null 2>&1; then + die "Package %s does not have a valid signature" "${repo}/${pkg##*/}" + fi if ! check_pkgrepos "${pkg}"; then die "Package %s already exists in another repository" "${repo}/${pkg##*/}" fi + if ! check_packager "${pkg}"; then + die "Package ${repo}/${pkg##*/} does not have a valid packager" + fi + if ! check_buildinfo "${pkg}"; then + die "Package ${repo}/${pkg##*/} does not have a .BUILDINFO file" + fi + if ! check_builddir "${pkg}"; then + die "Package ${repo}/${pkg##*/} was not built in a chroot" + fi done # This is fucking obnoxious #if ! check_splitpkgs ${repo} "${pkgs[@]}"; then -- cgit v1.2.3 From 4bc5d6607295d4054d67e0dfe6da56cbb7381999 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 2 Jun 2016 23:23:01 -0400 Subject: Drop support code for old pkgpool-les repository format. We switched away in 2011 at the latest. --- db-functions | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/db-functions b/db-functions index f021299..1d37123 100644 --- a/db-functions +++ b/db-functions @@ -378,17 +378,6 @@ check_pkgrepos() { [ -f "${FTP_BASE}/${PKGPOOL}/${pkgfile##*/}" ] && return 1 [ -f "${FTP_BASE}/${PKGPOOL}/${pkgfile##*/}.sig" ] && return 1 - local repo - local arch - for repo in "${PKGREPOS[@]}"; do - for arch in "${ARCHES[@]}"; do - [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT} ] && return 1 - [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT}.sig ] && return 1 - [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkgfile##*/}" ] && return 1 - [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkgfile##*/}.sig" ] && return 1 - done - done - return 0 } -- cgit v1.2.3