Skip to content
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

install: Improve and simplify logging for patch failures. #61

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions phreaknet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,7 @@ git_patch() {
wget -q "https://raw.githubusercontent.com/InterLinked1/phreakscript/master/patches/$1" -O /tmp/$1 --no-cache
git apply "/tmp/$1"
if [ $? -ne 0 ]; then
echoerr "Failed to apply git patch... this should be reported..."
exit 2
die "Failed to apply git patch $1... this should be reported..."
fi
rm "/tmp/$1"
}
Expand Down Expand Up @@ -1517,10 +1516,12 @@ asterisk_pr() {
git_custom_patch() {
printf "Applying git patch: %s\n" "$1"
wget -q "$1" -O /tmp/tmp_git_patch.diff --no-cache
if [ ! -f /tmp/tmp_git_patch.diff ]; then
die "Failed to download patch $1"
fi
git apply "/tmp/tmp_git_patch.diff"
if [ $? -ne 0 ]; then
echoerr "Failed to apply git patch... this should be reported..."
exit 2
die "Failed to apply git patch $1... this should be reported..."
fi
rm "/tmp/tmp_git_patch.diff"
}
Expand Down Expand Up @@ -1884,8 +1885,6 @@ install_dahdi() {
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/64.diff" # PR 64: More struct device to const struct device
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/66.diff" # PR 66: Add braces around empty if body
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/69.diff" # PR 69: DEFINE_SEMAPHORE for RHEL

# Not yet merged
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/32.patch" # PR 32: xpp: Fix 32-bit builds

# Fix or skip compilation of the XPP driver for 32-bit
Expand Down Expand Up @@ -2357,11 +2356,12 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
asterisk_pr_if 994 220200 210700 201200 182700 # FGD regression fix
asterisk_pr_if 245 220200 210700 201200 182700 # config.c: fix template inheritance/overrides
asterisk_pr_if 414 220200 210700 201200 182700 # IAX2 loopback warning
asterisk_pr_if 1030 220200 210700 201200 182700 # chan_dahdi: Fix wrong channel state when RINGING recieved

## Unmerged patches: remove or switch to asterisk_pr_if once merged
asterisk_pr_unconditional 918 # config.c #tryinclude fixes
#asterisk_pr_unconditional 918 # config.c #tryinclude fixes. Temporarily disabled since patch fails to apply: main/config.c:2750
asterisk_pr_unconditional 971 # config.c fix issues w/ whitespace in comments
asterisk_pr_unconditional 1030 # chan_dahdi: Fix wrong channel state when RINGING recieved
asterisk_pr_unconditional 1055 # chan_iax2: Avoid unnecessarily backlogging frames

#asterisk_pr_unconditional 272 # Call Waiting Deluxe. This also now conflicts (with the latest revisions), so temp. disabled.
#asterisk_pr_unconditional 438 # Last Number Redial. This now conflicts with 272, so temp. disabled.
Expand Down