-
Notifications
You must be signed in to change notification settings - Fork 501
[ci][linux] build client and manager for arm64 #6587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,8 @@ | ||||||||||
| #!/bin/bash | ||||||||||
|
|
||||||||||
| # This file is part of BOINC. | ||||||||||
| # http://boinc.berkeley.edu | ||||||||||
| # Copyright (C) 2024 University of California | ||||||||||
| # https://boinc.berkeley.edu | ||||||||||
| # Copyright (C) 2025 University of California | ||||||||||
| # | ||||||||||
| # BOINC is free software; you can redistribute it and/or modify it | ||||||||||
| # under the terms of the GNU Lesser General Public License | ||||||||||
|
|
@@ -144,42 +144,26 @@ if [[ "$IS_MIRROR" -eq "0" ]]; then | |||||||||
|
|
||||||||||
| # keep only 3 last versions of each package before adding new ones | ||||||||||
| packets=$(aptly -config=$CONF_FILE repo search boinc-$TYPE | grep -o '[^[:space:]]*_\([[:digit:]]*\.\)\{2\}[[:digit:]]*-\([[:digit:]]*_\)[^[:space:]]*' | sort -t '_' -k 2 -V | uniq) | ||||||||||
| declare -A split_lists | ||||||||||
| packets_list=() | ||||||||||
| while IFS= read -r line; do | ||||||||||
| packets_list+=("$line") | ||||||||||
| done <<< "$packets" | ||||||||||
| for item in "${packets_list[@]}"; do | ||||||||||
| prefix="${item%%_*}" # Extract the prefix (text before the first underscore) | ||||||||||
| split_lists["$prefix"]+="$item"$'\n' # Append the item to the corresponding prefix's list | ||||||||||
| done | ||||||||||
|
|
||||||||||
| for prefix in "${!split_lists[@]}"; do | ||||||||||
| echo "List for prefix: $prefix" | ||||||||||
| echo "${split_lists[$prefix]}" | ||||||||||
| count=$(echo "${split_lists[$prefix]}" | wc -l) | ||||||||||
| number=$(expr $count - 1) | ||||||||||
| echo "count=$number" | ||||||||||
| i=0 | ||||||||||
| exceed=$(expr $number - 3) | ||||||||||
| echo "exceed=$exceed" | ||||||||||
| if (( exceed > 0)); then | ||||||||||
| values_list=() | ||||||||||
| while IFS= read -r line; do | ||||||||||
| values_list+=("$line") | ||||||||||
| done <<< "${split_lists[$prefix]}" | ||||||||||
| for value in "${values_list[@]}"; do | ||||||||||
| if (( i < exceed )); then | ||||||||||
| echo "Remove: $value" | ||||||||||
| i=$((i+1)) | ||||||||||
| aptly -config=$CONF_FILE repo remove boinc-$TYPE $value | ||||||||||
| prefixes=$(echo "$packets"| cut -d '_' -f 1 | sort -n | uniq) | ||||||||||
| suffixes=$(echo "$packets"| cut -d '_' -f 3- | sort -V | uniq) | ||||||||||
| for prefix in $prefixes; do | ||||||||||
| echo $prefix | ||||||||||
| for suffix in $suffixes; do | ||||||||||
| echo " $suffix" | ||||||||||
| matched_packets=$(echo "$packets" | grep "^${prefix}_.*_${suffix}$") | ||||||||||
| count=$(echo "$matched_packets" | wc -l) | ||||||||||
| echo " count: $count" | ||||||||||
| exceed=$(expr $count - 3) | ||||||||||
| echo " exceed: $exceed" | ||||||||||
| if (( exceed > 0 )); then | ||||||||||
| echo "$matched_packets" | head -n $exceed | while IFS= read -r packet; do | ||||||||||
| echo " Remove: $packet" | ||||||||||
| aptly -config=$CONF_FILE repo remove boinc-$TYPE $packet | ||||||||||
| exit_on_fail "Failed to remove the package" | ||||||||||
| else | ||||||||||
| break | ||||||||||
| fi | ||||||||||
| done | ||||||||||
| fi | ||||||||||
| done | ||||||||||
| done | ||||||||||
| fi | ||||||||||
| done | ||||||||||
| done | ||||||||||
|
|
||||||||||
| # creates the snapshot of the old situation | ||||||||||
| aptly -config=$CONF_FILE snapshot create old-boinc-$TYPE-snap from repo boinc-$TYPE | ||||||||||
|
|
@@ -191,30 +175,21 @@ fi | |||||||||
|
|
||||||||||
| if [[ "$TYPE" == "stable" ]]; then | ||||||||||
| # get only one latest packages of each type from the alpha repo | ||||||||||
| alpha_packets=$(aptly -config=$CONF_FILE mirror search boinc-alpha-mirror | grep -o '[^[:space:]]*_\([[:digit:]]*\.\)\{2\}[[:digit:]]*-\([[:digit:]]*_\)[^[:space:]]*' | sort -t '_' -k 2 -V -r | uniq) | ||||||||||
| declare -A alpha_split_lists | ||||||||||
| alpha_packets_list=() | ||||||||||
| while IFS= read -r line; do | ||||||||||
| alpha_packets_list+=("$line") | ||||||||||
| done <<< "$alpha_packets" | ||||||||||
| for item in "${alpha_packets_list[@]}"; do | ||||||||||
| prefix="${item%%_*}" # Extract the prefix (text before the first underscore) | ||||||||||
| alpha_split_lists["$prefix"]+="$item"$'\n' # Append the item to the corresponding prefix's list | ||||||||||
| done | ||||||||||
| for prefix in "${!alpha_split_lists[@]}"; do | ||||||||||
| echo "List for prefix: $prefix" | ||||||||||
| echo "${alpha_split_lists[$prefix]}" | ||||||||||
| alpha_values_list=() | ||||||||||
| while IFS= read -r line; do | ||||||||||
| alpha_values_list+=("$line") | ||||||||||
| done <<< "${alpha_split_lists[$prefix]}" | ||||||||||
| for value in "${alpha_values_list[@]}"; do | ||||||||||
| # copy the latest package to the local repo | ||||||||||
| echo "Adding: $value" | ||||||||||
| aptly -config=$CONF_FILE repo import boinc-alpha-mirror boinc-$TYPE $value | ||||||||||
| break | ||||||||||
| done | ||||||||||
| done | ||||||||||
| packets=$(aptly -config=$CONF_FILE mirror search boinc-alpha-mirror | grep -o '[^[:space:]]*_\([[:digit:]]*\.\)\{2\}[[:digit:]]*-\([[:digit:]]*_\)[^[:space:]]*' | sort -t '_' -k 2 -V -r | uniq) | ||||||||||
| prefixes=$(echo "$packets"| cut -d '_' -f 1 | sort -n | uniq) | ||||||||||
| suffixes=$(echo "$packets"| cut -d '_' -f 3- | sort -V | uniq) | ||||||||||
| for prefix in $prefixes; do | ||||||||||
| echo $prefix | ||||||||||
| for suffix in $suffixes; do | ||||||||||
| echo " $suffix" | ||||||||||
| matched_packets=$(echo "$packets" | grep "^${prefix}_.*_${suffix}$") | ||||||||||
| echo "$matched_packets" | tail -n 1 | while IFS= read -r packet; do | ||||||||||
| echo " Adding: $packet" | ||||||||||
| aptly -config=$CONF_FILE repo remove boinc-$TYPE $packet | ||||||||||
| exit_on_fail "Failed to remove the package" | ||||||||||
|
Comment on lines
+188
to
+189
|
||||||||||
| aptly -config=$CONF_FILE repo remove boinc-$TYPE $packet | |
| exit_on_fail "Failed to remove the package" | |
| aptly -config=$CONF_FILE repo import boinc-alpha-mirror boinc-$TYPE "$packet" | |
| exit_on_fail "Failed to import the package" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the stable branch you (a) use packets instead of alpha_packets, so the selection is empty, and (b) call repo remove instead of repo import. This prevents promoting the latest alpha packages into the stable repo. Replace packets with alpha_packets and use aptly ... repo import boinc-alpha-mirror boinc-$TYPE "$packet".