From 1857980f9076265be369b0557dfc058a070668ed Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Tue, 8 Oct 2019 00:25:40 +0200 Subject: [PATCH] Replace an authorsfile with a script DOSBox maintainer expressed a concern about mail being stored verbatim in the source code. SourceForge does not forward messages to the real mailing addresses by default, therefore it's rather pointless to target them for spamming nowadays, but git-svn can easily take input from as script, so let's just replace the static file. --- scripts/import-from-svn/import-from-svn.sh | 19 +++++++++++++++++-- scripts/import-from-svn/import-svn-ignore.sh | 3 +++ scripts/import-from-svn/svn-authors-prog.sh | 19 +++++++++++++++++++ scripts/import-from-svn/svn-dosbox-authors | 9 --------- 4 files changed, 39 insertions(+), 11 deletions(-) create mode 100755 scripts/import-from-svn/svn-authors-prog.sh delete mode 100644 scripts/import-from-svn/svn-dosbox-authors diff --git a/scripts/import-from-svn/import-from-svn.sh b/scripts/import-from-svn/import-from-svn.sh index 06b45c65..63135495 100755 --- a/scripts/import-from-svn/import-from-svn.sh +++ b/scripts/import-from-svn/import-from-svn.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Copyright (c) 2019 Patryk Obara +# SPDX-License-Identifier: GPL-2.0-or-later + +# Import script suitable for SVN repositories using standard layout. +# Uses git-svn to download whole history, converts svn tag paths to git tags, +# filters repo and removes temporary git refs. + readonly svn_url=https://svn.code.sf.net/p/dosbox/code-0/dosbox echo_err () { @@ -33,10 +40,10 @@ git_svn_clone_dosbox () { "$svn_url" \ "$repo_name" - local -r authors_file=$PWD/svn-dosbox-authors + local -r authors_prog=$PWD/svn-authors-prog.sh git -C "$repo_name" svn fetch \ --use-log-author \ - --authors-file="$authors_file" + --authors-prog="$authors_prog" } # Remove UUID of SVN server to avoid issues in case SourceForge will change @@ -105,6 +112,13 @@ cleanup () { git -C "$1" branch -D master } +# Set up remote repo to prepare for push +# +setup_remote () { + git -C "$1" remote add dosbox-staging git@github.com:dreamer/dosbox-staging.git + git -C "$1" fetch dosbox-staging +} + # main # main () { @@ -118,6 +132,7 @@ main () { name_active_branches "$repo" import_svn_tagpaths_as_git_tags "$repo" cleanup "$repo" + setup_remote "$repo" } main "$@" diff --git a/scripts/import-from-svn/import-svn-ignore.sh b/scripts/import-from-svn/import-svn-ignore.sh index 9e5c473d..7ce84457 100755 --- a/scripts/import-from-svn/import-svn-ignore.sh +++ b/scripts/import-from-svn/import-svn-ignore.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2019 Patryk Obara +# SPDX-License-Identifier: GPL-2.0-or-later + readonly svn_url=https://svn.code.sf.net/p/dosbox/code-0/dosbox list_directories () { diff --git a/scripts/import-from-svn/svn-authors-prog.sh b/scripts/import-from-svn/svn-authors-prog.sh new file mode 100755 index 00000000..7a835adc --- /dev/null +++ b/scripts/import-from-svn/svn-authors-prog.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +readonly user=$1 + +format_author () { + echo "$1 <$user@users.sourceforge.net>" +} + +case $user in + qbix79) format_author "Peter Veenstra" ;; + harekiet) format_author "Sjoerd van der Berg" ;; + finsterr) format_author "Ulf Wohlers" ;; + canadacow) format_author "Dean Beeler" ;; + yot) format_author "Felix Jakschitsch" ;; + c2woody) format_author "Sebastian Strohhäcker" ;; + h-a-l-9000) format_author "Ralf Grillenberger" ;; + ripsaw8080) format_author "ripsaw8080" ;; + uid83799) format_author "uid83799" ;; +esac diff --git a/scripts/import-from-svn/svn-dosbox-authors b/scripts/import-from-svn/svn-dosbox-authors deleted file mode 100644 index a7cb6486..00000000 --- a/scripts/import-from-svn/svn-dosbox-authors +++ /dev/null @@ -1,9 +0,0 @@ -qbix79 = Peter Veenstra -harekiet = Sjoerd van der Berg -finsterr = Ulf Wohlers -canadacow = Dean Beeler -yot = Felix Jakschitsch -c2woody = Sebastian Strohhäcker -h-a-l-9000 = Ralf Grillenberger -ripsaw8080 = ripsaw8080 -uid83799 = uid83799