-- Leo's gemini proxy

-- Connecting to gemini.exoticsilicon.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

Local patchsets


Here at Exotic Silicon, we make local changes to a lot of the opensource software that we use. Although we try to upstream the most useful ones, sometimes that doesn't happen either because we're too busy, or the changes are too specific to be of wider interest. In any case, we maintain the most interesting ones here for anybody who is interested.


> Although we take pride in the quality of our work, and strive to deliver only code of the highest standards, the following patches are provided AS IS and with NO WARRANTY. We make no guarantees that they will work as described, or that they won't break other functionality, possibly in subtle ways that might not be immediately obvious. Be aware that all of our local patches were originally written for our own internal use, and our requirements are likely to be different to yours.


Currently available patchsets


Existing file supplement flag for cp on OpenBSD

Call recording and announcement for SXMO


Existing file supplement flag for cp


File                  Changes       Description
src/bin/cp/cp.c       +3 lines      Add s to getop.
                      ~3 lines      Add int sflag.
src/bin/cp/extern.h   ~1 line       Add int sflag.
src/bin/cp/utils.c    +7 lines      If a file exists with the same name in the
                                    destination directory, return 1 and do not
                                    perform the copy.Otherwise, allow the copy
                                    to proceed and print a diagnostic message
                                    to stderr.
                      ~2 lines      Add s flag to the usage information.
src/bin/cp/cp.1       +4 lines
                      ~3 lines      Document the new -s flag in the manual page.

Notes
Patch format                        Unified diff with signature
Patch size                          2861 bytes

Patch hash:
SHA512 (patchset_cp.sig): = JMw2G54RD5IduolZxvw3I6gZdUAKV7o2BbnLxW5fGll9B0pDh6V/UWOH6HZ800nUPbCdZubztXbCZ3oCDshNWw==

Applies to:
This diff will apply cleanly to OpenBSD 6.8-release and OpenBSD 6.9-release.

Downloads

Patch for OpenBSD 6.8-release and OpenBSD 6.9-release with embedded signify signature


This patch adds a new -s flag to cp. When used, the files in the destination directory are supplemented by the files being copied, rather than being overwritten.


For example, if we have two directories, source and dest, containing the following files:


 # ls -l source
 total 6
 -rw-r--r--  1 root  wheel  12 Jan  1  1970 bar
 -rw-r--r--  1 root  wheel  26 Jan  1  1970 baz
 -rw-r--r--  1 root  wheel   6 Jan  1  1970 foo

 # ls -l dest
 total 0
 -rw-r--r--  1 root  wheel  0 Jan  1  1970 foo

Then the output and result of cp -psv source/* dest/ will be:


 # cp -psv source/* dest/
 dest/bar doesn't already exist, copying
 source/bar -> dest/bar
 dest/baz doesn't already exist, copying
 source/baz -> dest/baz

 # ls -l source
 total 4
 -rw-r--r--  1 root  wheel  12 Jan  1  1970 bar
 -rw-r--r--  1 root  wheel  26 Jan  1  1970 baz
 -rw-r--r--  1 root  wheel   0 Jan  1  1970 foo

The file `foo' in the destination directory was not overwritten.


Call recording and announcement for SXMO


File Changes Description

bin/sxmo_modemcall.sh +11 lines


Description:


Make $HOME/call_rec if it doesn't already exist.

Create a base filename using the template YYYYMMDD_HHMMSS_{number}.

Record audio data to a wav file.

Write some cellular network data to a text file.

Play an announcement from $HOME/answer.wav file to incoming calls


Notes:


Patch format: Standard diff with embedded signify signature.

Patch size: 1843 bytes


Patch hash:

SHA512 (patchset_call_recording.sig) = 58X2DJ3mO7PBDuLYUHroZGbuBymi+liAF5fDQuyfteUm16oKslzKC9xbDIuK74i6M1ql5Vi+3ZEwIzio/+M3TQ==


Applies to: SXMO 1.4.1 as included in postmarketOS v21.03 20210605-0335.

Tested on: Pinephone.


KNOWN ISSUES


There are a couple of known issues with this patch:


In-call audio quality is negatively affected locally, due to the re-sampling method used to convert 8000 Hz to 48000 Hz. Samples are simply duplicated rather than being interpolated, causing spurious high frequencies.The wav file header is written with an incorrect length, as the recording is not cleanly stopped when the recording process is terminated.


Downloads


Patch with embedded signify signature


This patch implements a simple automatic PSTN call recording and announcement function in SXMO.


Once this patch is applied, all PSTN calls placed or received will be recorded. Call audio is written to a wav file in $HOME/call_rec/ with a filename following the template YYYYMMDD_HHMMSS_{number}_[inc|out].wav where number is either the telephone number dialed for outgoing calls, or that provided by the network for incoming calls. Incoming calls are further identified with inc, and outbound calls are identified with out. Some information provided by the cellular network s written to a text file with the same name, YYYYMMDD_HHMMSS_{number}_[inc|out].log. If no telephone number is provided by the network for incoming calls, the number is replaced with the string "unknown".


Additionally, if the file $HOME/answer.wav exists, and is a valid wav file, it will be played to the remote party when inbound PSTN calls are answered. This can be used, for example, to advise calling parties that the call is being recorded.


Call recordings are dual-channel, which when played as stereo places the local audio on the left channel and the remote audio on the right channel.


As supplied, the patch records 48 Khz, 16 bit audio. This has the advantage of recording the local audio in higher fidelity than it is likely being sent to the remote party. However, remote audio is converted to 48 Khz sampling by simple sample duplication, causing audible artifacts at the local end only, sounding like high frequency scratching during a call and on the recording. These artifacts can be trivially removed from the recording with post-processing.


The recording process is simply terminated when the call is ended, rather than being shut down cleanly. As a result, the wav file contains a header set to the maximum possible duration of recording. This can also trivially be fixed by writing a new header based on the actual length of the file.


You should check applicable regulations regarding the recording of PSTN telephone calls before using this patch.


Exotic Silicon signify key


All of the patches on this page have been signed with the following signify key:


RWRn5d3Yx35u01WPIhNxZWPAEXOTIciNJeYgzB2l1RyHE5VIhpA3Bc+I


Download our signify key as ASCII


Home page of the Exotic Silicon gemini capsule.

Your use of this gemini capsule is subject to the terms and conditions of use.

Copyright 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Exotic Silicon. All rights reserved.

-- Response ended

-- Page fetched on Sun May 12 06:26:44 2024