Commit Graph

13 Commits

Author SHA1 Message Date
R. Ryantm
5f64a1615c sabnzbd: 4.4.1 -> 4.5.0 2025-04-09 10:09:28 +00:00
Winter
a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00
Pol Dellaiera
65a333600d treewide: replace rev with tag 2025-04-07 16:57:22 +02:00
Peder Bergebakken Sundt
357d2530e5 treewide: substitute pname for strings
Inspired by https://github.com/NixOS/nixpkgs/pull/387725#issuecomment-2704943777, script is based on https://github.com/NixOS/nixpkgs/pull/336172 using what i learned in https://github.com/NixOS/nixpkgs/pull/386865, part of https://github.com/NixOS/nixpkgs/issues/346453

Should be zero rebuilds.

All candidates were made using:

```shell

export NIXPKGS_ALLOW_UNFREE=1
export NIXPKGS_ALLOW_INSECURE=1
export NIXPKGS_ALLOW_BROKEN=1

git-wait restore .

test -s packages.json || ( set -x;
  time nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f ./. -qaP --json --meta --drv-path --out-path --show-trace --no-allow-import-from-derivation --arg config '{ allowAliases = false; }' > packages.json
)

list_attrpath_fname_col() {
    jq <packages.json 'to_entries[] | select(.value.meta.position==null|not) | "\(.key)\t\(.value.meta.position)"' -r |
        sed -e "s#\t$(realpath .)/#\t#" |
        sed -e 's#:\([0-9]*\)$#\t\1#' |
        grep . |
        grep -iv haskell |
        grep -iv /top-level/ |
        grep -iv chicken |
        grep pkgs/by-name/ |
        grep -iv build |
        grep -E '/(package|default)\.nix'
}

FLOCKDIR="$(mktemp -d)"
N_WORKERS=4
while read attrpath fname col; do
    grep -qE 'repo *= *("\$\{pname\}"|pname);' "$fname" || continue

    echo | (
        # mutex on fname
        flock --nonblock 200 || {
            >&2 echo "failed to aquire lock for $fname"
            exit 1
        }

        echo "$attrpath"
        data="$(nix eval --impure  --expr 'with import ./. {}; { inherit ('"$attrpath"') pname drvPath passthru meta; drvPath2='"$attrpath"'.src.drvPath; }' --json)" || exit
        test -n "$data" || exit
        pname="$(jq <<<"$data" .pname -r)"
        test -n "$pname" || exit

        (set -x
            sd -F '${pname}'  "$pname"         "$fname"
            sd -F ' = pname;' " = \"$pname\";" "$fname"
        )

        data2="$(nix eval --impure  --expr 'with import ./. {}; { inherit ('"$attrpath"') pname drvPath passthru meta; drvPath2='"$attrpath"'.src.drvPath; }' --json)"
        if [[ "$data" = "$data2" ]]; then
            (set -x; git-wait add "$fname")
        else
            (set -x; git-wait restore "$fname")
            exit
        fi

        (set -x
            sd -F ' rec {' ' {' "$fname"
        )

        data3="$(nix eval --impure  --expr 'with import ./. {}; { inherit ('"$attrpath"') pname drvPath passthru meta; drvPath2='"$attrpath"'.src.drvPath; }' --json 2>/dev/nul)"

        if [[ "$data" = "$data3" ]]; then
            (set -x; git-wait add "$fname")
        else
            (set -x; git-wait restore "$fname")
        fi

    ) 200>"$FLOCKDIR"/"$(sha256sum - <<<"$fname" | cut -d' ' -f1)".lock &

    while [[ $(jobs -p | wc -l) -ge $N_WORKERS ]]; do
        wait -n < <(jobs -p) || true
    done

done < <(list_attrpath_fname_col)

wait

git restore .

time nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f ./. -qaP --json --meta --drv-path --out-path --show-trace --no-allow-import-from-derivation --arg config '{ allowAliases = false; }' > packages2.json
```

`diff packages{,2}.json` is empty, indicating that no package nor src derivation has changed.
I checked and cherry-picked the changes using `GIT_DIFF_OPTS='-u15' git -c interactive.singleKey=true add --patch`
2025-03-11 23:55:31 +01:00
R. Ryantm
7bb4a481e0 sabnzbd: 4.4.0 -> 4.4.1 2024-12-22 19:53:42 +00:00
R. Ryantm
853a77c9b3 sabnzbd: 4.3.3 -> 4.4.0 2024-12-11 21:01:38 +00:00
nicoo
2641d97cbf pkgs/by-name: Convert hashes to SRI format
Reproduction script:
	# Bulk rewrite
	./maintainers/scripts/sha-to-sri.py pkgs/by-name
	# Revert some packages which will need manual intervention
	for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do
		git checkout -- "pkgs/by-name/${n:0:2}/${n}"
	done
2024-09-15 11:24:31 +02:00
R. Ryantm
5714d92909 sabnzbd: 4.3.2 -> 4.3.3 2024-08-26 18:48:07 +00:00
Adam Stephens
1eefa87b71
sabnzbd: override sabctools version and add updateScript 2024-07-12 09:28:32 -04:00
Adam Stephens
aaa57ba41a
sabnzbd: apply nixfmt 2024-07-12 08:57:10 -04:00
R. Ryantm
b6517002af sabnzbd: 4.3.1 -> 4.3.2 2024-05-29 14:53:54 +00:00
R. Ryantm
68998c804f sabnzbd: 4.3.0 -> 4.3.1 2024-05-08 21:42:12 +00:00
R. Ryantm
9df673937a
sabnzbd: 4.2.3 -> 4.3.0 2024-05-02 10:22:22 -04:00