diff --git a/iana-etc/.SRCINFO b/iana-etc/.SRCINFO index 1684d2c480..ae2bd07d8b 100644 --- a/iana-etc/.SRCINFO +++ b/iana-etc/.SRCINFO @@ -1,16 +1,16 @@ pkgbase = iana-etc pkgdesc = /etc/protocols and /etc/services provided by IANA - pkgver = 20240612 + pkgver = 20240814 pkgrel = 1 url = https://www.iana.org/protocols arch = any license = custom:none backup = etc/protocols backup = etc/services - source = https://sources.archlinux.org/other/packages/iana-etc/service-names-port-numbers-20240612.xml + source = https://sources.archlinux.org/other/packages/iana-etc/service-names-port-numbers-20240814.xml source = https://sources.archlinux.org/other/packages/iana-etc/protocol-numbers-20240503.xml source = LICENSE - sha256sums = 16ad85a7b41d9f4e66d0d874c700ce78b7443804dc871dd398f50754612b8bf1 + sha256sums = e05d5b388d1fc4a1f96a501ef713c8e55b08ff6c169f7d10b8159d600ed6f516 sha256sums = 08090825eabfc99032614b2b6dbc36ebf64e39e3a2c8d5e0a3af1df4a6d4da66 sha256sums = dd37e92942d5a4024f1c77df49d61ca77fc6284691814903a741785df61f78cb diff --git a/iana-etc/PKGBUILD b/iana-etc/PKGBUILD index 98bf6566c4..ef86e77212 100644 --- a/iana-etc/PKGBUILD +++ b/iana-etc/PKGBUILD @@ -4,7 +4,7 @@ # Maintainer: Jelle van der Waa pkgname=iana-etc -pkgver=20240612 +pkgver=20240814 _ports=service-names-port-numbers-${pkgver} _protocols=protocol-numbers-20240503 pkgrel=1 @@ -16,7 +16,7 @@ backup=('etc/'{protocols,services}) source=("https://sources.archlinux.org/other/packages/iana-etc/${_ports}.xml" "https://sources.archlinux.org/other/packages/iana-etc/${_protocols}.xml" 'LICENSE') -sha256sums=('16ad85a7b41d9f4e66d0d874c700ce78b7443804dc871dd398f50754612b8bf1' +sha256sums=('e05d5b388d1fc4a1f96a501ef713c8e55b08ff6c169f7d10b8159d600ed6f516' '08090825eabfc99032614b2b6dbc36ebf64e39e3a2c8d5e0a3af1df4a6d4da66' 'dd37e92942d5a4024f1c77df49d61ca77fc6284691814903a741785df61f78cb') diff --git a/iana-etc/iana-versioned.sh b/iana-etc/iana-versioned.sh new file mode 100755 index 0000000000..f3e42f7f6c --- /dev/null +++ b/iana-etc/iana-versioned.sh @@ -0,0 +1,37 @@ +#!/usr/bin/bash + +URLS=( + https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml + https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml +) + +DEST=/srv/ftp/other/packages/iana-etc + +curl="curl --silent --fail --location" + +do_update() { + url=$1 + date=$( + $curl --head "$url" | + sed 's/^Last-Modified: //;t;d' | + date -f- +%Y%m%d + ) + if [[ -z $date ]]; then + return + fi + + file=${url##*/} + name=${file%.*} + ext=${file##*.} + versioned="$name-$date.$ext" + + if [[ ! -f "$versioned" ]]; then + $curl --output "$versioned" "$url" + fi +} + +cd "$DEST" + +for url in ${URLS[@]}; do + do_update "$url" +done