Change:
, CVSSv3=7.5 (nixos-20.09, nixos-unstable) Scanned versions: nixos-20.09: ; nixos-unstable: . Cc Cc Cc

Discussion:
sha256 = "1s9idx2miwk178sa731ig9r4fzx4gy1q8xazfqyd7q4lfd70s1cy"; }; <del> in rec { </del> <ins> # auto-generated by update.py versions = lib.mapAttrs (_: {version, sha256}: common { inherit version sha256; externals = { "externals_cache/pjproject-2.10.tar.bz2" = pjproject_2_10; "addons/mp3" = mp3-202; }; }) (builtins.fromJSON (builtins.readFile ./versions.json)); in { </ins> # Supported releases (as of 2020-10-26). # Source: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions # Exact version can be found at https://www.asterisk.org/downloads/asterisk/all-asterisk-versions/

# 16.x    LTS        2018-10-09  2022-10-09  2023-10-09 # 17.x    Standard   2019-10-28  2020-10-28  2021-10-28 # 18.x    LTS        2020-10-20  2024-10-20  2025-10-20 <del> asterisk-lts = asterisk_18; asterisk-stable = asterisk_18; asterisk = asterisk_18; asterisk_13 = common { version = "13.38.2"; sha256 = "1v7wgsa9vf7qycg3xpvmn2bkandkfh3x15pr8ylg0w0gvfkkf5b9"; externals = { "externals_cache/pjproject-2.10.tar.bz2" = pjproject_2_10; "addons/mp3" = mp3-202; }; }; asterisk_16 = common { version = "16.17.0"; sha256 = "1bzlsk9k735qf8a693b6sa548my7m9ahavmdicwmc14px70wrvnw"; externals = { "externals_cache/pjproject-2.10.tar.bz2" = pjproject_2_10; "addons/mp3" = mp3-202; }; }; asterisk_17 = common { version = "17.9.3"; sha256 = "0nhk0izrxx24pz806fwnhidjmciwrkcrsvxvhrdvibiqyvfk8yk7"; externals = { "externals_cache/pjproject-2.10.tar.bz2" = pjproject_2_10; "addons/mp3" = mp3-202; }; }; </del> <ins> asterisk-lts = versions.asterisk_18; asterisk-stable = versions.asterisk_18; asterisk = versions.asterisk_18; </ins> <del> asterisk_18 = common { version = "18.3.0"; sha256 = "1xb953i9ay82vcdv8izi5dd5xnspcsvg10ajiyph377jw2xnd5fb"; externals = { "externals_cache/pjproject-2.10.tar.bz2" = pjproject_2_10; "addons/mp3" = mp3-202; }; }; } </del> <ins> } // versions </ins>

<ins> #!/usr/bin/env nix-shell #!nix-shell -i python3 -p python39 python39.pkgs.packaging python39.pkgs.beautifulsoup4 python39.pkgs.requests from packaging import version from bs4 import BeautifulSoup import re, requests, json URL = "https://downloads.asterisk.org/pub/telephony/asterisk" page = requests.get(URL) changelog = re.compile("^ChangeLog-d+.d+.d+$") changelogs = [a.get_text() for a in BeautifulSoup(page.text, 'html.parser').find_all('a') if changelog.match(a.get_text())] major_versions = {} for changelog in changelogs: v = version.parse(changelog.removeprefix("ChangeLog-")) major_versions.setdefault(v.major, []).append(v) out = {} for mv in major_versions.keys(): v = max(major_versions[mv]) sha = requests.get(f"{URL}/asterisk-{v}.sha256").text.split()[0] out["asterisk_" + str(mv)] = { "version": str(v), "sha256": sha } try: with open("versions.json", "r") as in_file: in_data = json.loads(in_file.read()) for v in in_data.keys(): print(v + ":", in_data[v]["version"], "->", out[v]["version"]) except: # nice to have for the PR, not a requirement pass with open("versions.json", "w") as out_file: out_file.write(json.dumps(out, sort_keys=True, indent=2) + "n") </ins>

<ins> { "asterisk_13": { "sha256": "478040705f5819259bb1d22cb4e27970092a5bfdb691d27d321c26235eea4bb3", "version": "13.38.3" }, "asterisk_16": { "sha256": "c34fc38287cea533c0d0a34959112119e47d12d8ea6ac11bdddf9265afda6d11", "version": "16.19.1" }, "asterisk_17": { "sha256": "cc0d6b9ef1512d4e279b80ca8bf78032d69fe6e92492c95c22c44023d6c111fa", "version": "17.9.4" }, "asterisk_18": { "sha256": "e7d78716a0deeadf24b7d537cd24c11c2d9a096265eefc9470565c4da0fc54c7", "version": "18.5.1" } } </ins>