Skip to content

Conversation

masonicboom
Copy link

@masonicboom masonicboom commented Jul 14, 2018

Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-

@masonicboom
Copy link
Author

@hkjn got time for a review? This is just a little cleanup from an old change of yours. Also tagging @laanwj who merged that one.

@sipa
Copy link
Member

sipa commented Jul 14, 2018

Can this be implemented as a scripted diff?

@@ -514,7 +514,7 @@ Password for JSON\-RPC connections
.IP
Username and hashed password for JSON\-RPC connections. The field
<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A
canonical python script is included in share/rpcuser. The client
canonical python script is included in share/rpcauth. The client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

." DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing

@@ -231,7 +231,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Username and hashed password for JSON-RPC connections. The field <userpw> "
"comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is "
"included in share/rpcuser. The client then connects normally using the "
"included in share/rpcauth. The client then connects normally using the "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Automatically generated by extract_strings_qt.py

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing

@fanquake fanquake added the Docs label Jul 15, 2018
@masonicboom
Copy link
Author

Thanks for review. @MarcoFalke I made the fixes you mentioned. @sipa it’s now a scripted diff.

@fanquake
Copy link
Member

utACK c38d567

The only instances of share/rpcuser left in the code are in old release-notes, doc/man and bitcoinstrings.cpp

I also removed the reference to codemod from the PR description, as that isn't required.

@maflcko
Copy link
Member

maflcko commented Jul 15, 2018

utACK c38d567cbf25495fea7e941c75b3603e79d58061. Just noting that the scripted diff also modifies files that are not tracked by git. So I'd prefer to not do this 3-line change as a scripted diff, but I don't care either way.

@maflcko maflcko added this to the 0.17.0 milestone Jul 15, 2018
@practicalswift
Copy link
Contributor

utACK c38d567cbf25495fea7e941c75b3603e79d58061 modulo having the scripted-diff changed so that it only touches files tracked by git per @MarcoFalke:s feedback

Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'`

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-
@masonicboom
Copy link
Author

Ok. I restricted the script to only touch files in version control.

If someone could point me to a reference on the scripted diff concept I would appreciate it. I'm curious what it buys us in this case.

Here's a test plan:

  1. pull changes

  2. build

  3. src/bitcoind --help | grep "share/rpcuser" comes up empty.

  4. src/bitcoind --help | grep "share/rpcauth" produces:

    canonical python script is included in share/rpcauth. The client
    

@hkjn
Copy link
Contributor

hkjn commented Jul 16, 2018

utACK c64cc1b.

Thanks for the fix! (In the original commit 3fdb297 I greped for the share/rpcuser.py and rpcuser.py strings, but didn't think to look for references without the .py suffix..)

@maflcko maflcko merged commit c64cc1b into bitcoin:master Jul 16, 2018
maflcko pushed a commit that referenced this pull request Jul 16, 2018
…auth)

c64cc1b scripted-diff: Fix references to share/rpcuser (now share/rpcauth) (Mason Simon)

Pull request description:

  Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

  ```
  -BEGIN VERIFY SCRIPT-
  git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
  git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
  -END VERIFY SCRIPT-
  ```

Tree-SHA512: 0ae5c746cfbaf38683e636382a9d518bbce123d308b1c8d47c1b089cc2e64dd6a7098cdfb6606ed5a9abc867d948a14022c3f3065f64076086ded429a7fa3cc7
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 13, 2020
Summary:
c64cc1b scripted-diff: Fix references to share/rpcuser (now share/rpcauth) (Mason Simon)

Pull request description:

  Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

  ```
  -BEGIN VERIFY SCRIPT-
  git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
  git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
  -END VERIFY SCRIPT-
  ```

Tree-SHA512: 0ae5c746cfbaf38683e636382a9d518bbce123d308b1c8d47c1b089cc2e64dd6a7098cdfb6606ed5a9abc867d948a14022c3f3065f64076086ded429a7fa3cc7

---

This is a backport of Core [[bitcoin/bitcoin#13664 | PR13664]]

Test Plan:
  ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5707
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Jul 19, 2020
…(now share/rpcauth)

Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'`

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Jul 24, 2020
…(now share/rpcauth)

Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'`

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Jul 27, 2020
…(now share/rpcauth)

Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'`

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 27, 2020
…(now share/rpcauth)

Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'`

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 27, 2020
…(now share/rpcauth)

Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'`

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 17, 2020
Summary:
c64cc1b scripted-diff: Fix references to share/rpcuser (now share/rpcauth) (Mason Simon)

Pull request description:

  Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

  ```
  -BEGIN VERIFY SCRIPT-
  git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
  git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
  -END VERIFY SCRIPT-
  ```

Tree-SHA512: 0ae5c746cfbaf38683e636382a9d518bbce123d308b1c8d47c1b089cc2e64dd6a7098cdfb6606ed5a9abc867d948a14022c3f3065f64076086ded429a7fa3cc7

---

This is a backport of Core [[bitcoin/bitcoin#13664 | PR13664]]

Test Plan:
  ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5707
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants