diff options
-rwxr-xr-x | masterkey-sign.sh | 8 | ||||
-rwxr-xr-x | masterkey.pl | 11 | ||||
-rwxr-xr-x | setup-noise-suppression | 2 | ||||
-rwxr-xr-x | svn-commit-git-patch | 8 |
4 files changed, 23 insertions, 6 deletions
diff --git a/masterkey-sign.sh b/masterkey-sign.sh index 4ea97ce..c83974b 100755 --- a/masterkey-sign.sh +++ b/masterkey-sign.sh @@ -4,8 +4,16 @@ set -e key=$1 +TMPDIR="$(mktemp -d "/tmp/${0##*/}.XXXXXX")" +trap "rm -rf '${TMPDIR}'" EXIT TERM + gpg --quiet --recv-keys "$key" # this signs ALL uids... #printf 'y\ny\n' | gpg --default-key 0xA88E23E377514E00 --command-fd 0 --batch --quiet --sign-key "$key" gpg --default-key 0xA88E23E377514E00 --only-sign-text-ids --edit-key "$key" gpg --send-keys "$key" + +cd ~/git/arch/archlinux-keyring + +gpg --export "$key" > "$TMPDIR/key" +./keyringctl import "$TMPDIR/key" diff --git a/masterkey.pl b/masterkey.pl index f3b18cf..d24a5a5 100755 --- a/masterkey.pl +++ b/masterkey.pl @@ -46,9 +46,9 @@ sub main { 'body' => 'Hi, This mail is about having your GPG key signed by an Arch Linux master key. -Please reply with an email that is signed with your key ({$recipient_key}) +Please reply with an email that is signed with your key or a subkey of it ({$recipient_key}) and contains the token listed below. It is not necessary to encrypt the mail, -however, signing the mail with your key is required. +however, signing the mail with your key or a subkey of it is required. If you do not have GPG configured in your mail client, it is sufficient to send the signed token as an attachment. @@ -144,19 +144,22 @@ fun gpg_get_users($key) { my $user = Encode::decode('utf8', $uid->as_string); unless ($user =~ m/^(?<name>.*?) (?:\((?<comment>.*?)\) )?\<(?<email>.*?@.*?)\>$/) { - die "Failed to parse GPG user information for key $key; got $user"; + warn "Warning: Failed to parse GPG user information for key $key; got '$user'. Ignoring...\n"; } push @users, {%+}; } + die "Failed to parse even one UID from key. Giving up" unless (0+@users > 0); + return \@users; } fun gpg_get_user($key, $email_regex) { my $users = gpg_get_users($key); - return $users->[0] if $users->@* == 1; + # Disable this since we only want to use the userid matching the regex + #return $users->[0] if $users->@* == 1; my $user = first {$_->{email} =~ m/$email_regex/} $users->@*; diff --git a/setup-noise-suppression b/setup-noise-suppression index 699ca42..dd0e9ce 100755 --- a/setup-noise-suppression +++ b/setup-noise-suppression @@ -14,7 +14,7 @@ channels="${3:-2}" pacmd unload-module module-null-sink pacmd load-module module-null-sink sink_name=mic_denoised_out rate=48000 format=s16le -pacmd load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/usr/lib/ladspa/librnnoise_ladspa.so control="$control" +pacmd load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/usr/lib/ladspa/librnnoise_ladspa.so control="$control",20,0,0,0 pacmd load-module module-loopback source="$source" sink=mic_raw_in channels="$channels" source_dont_move=true sink_dont_move=true latency_msec=1 # remap to regular source for chromium diff --git a/svn-commit-git-patch b/svn-commit-git-patch index 54b345d..b25be44 100755 --- a/svn-commit-git-patch +++ b/svn-commit-git-patch @@ -49,5 +49,11 @@ while (my $line = <$fh>) { $message = "$subject\n\n$message"; -system(qw(svn patch --strip 1), $patchfile); +system(qw(patch -p 3 -i), $patchfile); + +system(qw(svn diff)); + +print "Commit message will be:\n$message\n\n\n"; +print "Press Enter to commit"; +<STDIN>; system(qw(svn commit -m), $message); |