[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive fd609d9584 1/5: Change: Migrate from hyper-gate
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive fd609d9584 1/5: Change: Migrate from hyper-gateway to hyper-gateway-ushin |
Date: |
Wed, 15 May 2024 01:01:17 -0400 (EDT) |
branch: elpa/hyperdrive
commit fd609d9584bc1bc783d4c8ad123ab2c2f7a04a0e
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Change: Migrate from hyper-gateway to hyper-gateway-ushin
- rename user option h/hyper-gateway-port to
h/hyper-gateway-ushin-port
- rename defun hyperdrive-hyper-gateway-version to
hyperdrive-hyper-gateway-ushin-version
- update expected binary name
- update links and docs
---
CHANGELOG.org | 2 +-
doc/hyperdrive.org | 82 ++++++++++++++++++++--------------------
doc/hyperdrive.texi | 106 ++++++++++++++++++++++++++--------------------------
hyperdrive-lib.el | 49 +++++++++++++-----------
hyperdrive-menu.el | 2 +-
hyperdrive-vars.el | 6 +--
hyperdrive.el | 30 +++++++--------
tests/org links.org | 2 +-
8 files changed, 144 insertions(+), 135 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 918da61bda..5a68a07d48 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -14,7 +14,7 @@ This project adheres to
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
** Changed
- Improved defcustom types
-- Better error message when ~hyper-gateway~ is not installed. Thanks to
+- Better error message when ~hyper-gateway-ushin~ is not installed. Thanks to
~magnum~ on XMPP for reporting.
- Removed ~hyperdrive-reuse-buffers~ user option to ensure consistent
behavior when uniquifying buffer names.
diff --git a/doc/hyperdrive.org b/doc/hyperdrive.org
index 300b363ce2..b26d086aae 100644
--- a/doc/hyperdrive.org
+++ b/doc/hyperdrive.org
@@ -39,16 +39,16 @@ modify this GNU manual."
* Installation
-** Emacs
+** Install Emacs
~hyperdrive.el~ requires [[https://www.gnu.org/software/emacs/][GNU Emacs]]
version 28.1 or later.
-** hyper-gateway
+** Install hyper-gateway-ushin
-~hyperdrive.el~ relies on
[[https://github.com/RangerMauve/hyper-gateway/][hyper-gateway]] for talking to
the hypercore
-network
([[https://github.com/RangerMauve/hyper-gateway#how-do-i-install-hyper-gateway][installation
instructions]]).
+~hyperdrive.el~ relies on
[[https://git.sr.ht/~ushin/hyper-gateway-ushin/][hyper-gateway-ushin]] for
talking to the
+hypercore network
([[https://git.sr.ht/~ushin/hyper-gateway-ushin#installation][installation
instructions]]).
-** hyperdrive.el
+** Install hyperdrive.el
~hyperdrive.el~ can be installed from
[[https://elpa.nongnu.org/nongnu/hyperdrive.html][NonGNU ELPA]] with ~M-x
package-refresh-contents~ then ~M-x package-install RET hyperdrive~.
@@ -132,40 +132,41 @@ documentation]]. To learn about the commands available in
** Start/stop the gateway
-To connect with peers, you'll need to start ~hyper-gateway~ (see
-[[*Hyper-gateway]]). The current running status of the gateway can be
-seen in ~hyperdrive-menu~ (see [[*Hyperdrive menu command]]) and in the
+To connect with peers, you'll need to start ~hyper-gateway-ushin~ (see
+[[*hyper-gateway-ushin]]). The current running status of the gateway can
+be seen in ~hyperdrive-menu~ (see [[*Hyperdrive menu command]]) and in the
"Hyperdrive" menu bar (see [[*Menu bar support]]).
- Command: hyperdrive-start ::
- Start ~hyper-gateway~.
+ Start ~hyper-gateway-ushin~.
- Command: hyperdrive-stop ::
- Stop ~hyper-gateway~.
+ Stop ~hyper-gateway-ushin~.
- User Option: hyperdrive-gateway-process-type ::
- How to start and stop ~hyper-gateway~. By default, ~hyperdrive.el~ will
- autodetect the appropriate process type. If you have configured
-
[[https://github.com/RangerMauve/hyper-gateway#how-do-i-run-hyper-gateway-as-a-background-process-on-gnulinux--systemd][hyper-gateway
to run as a systemd service]], then ~hyperdrive.el~ will
- automatically use ~systemd~ to manage the gateway. Otherwise,
- ~hyperdrive.el~ will start ~hyper-gateway~ as an Emacs subprocess.
+ How to start and stop ~hyper-gateway-ushin~. By default,
+ ~hyperdrive.el~ will autodetect the appropriate process type. If you
+ have configured
[[https://git.sr.ht/~ushin/hyper-gateway-ushin#how-do-i-run-hyper-gateway-ushin-as-a-background-process-on-gnulinux--systemd][hyper-gateway-ushin
to run as a systemd service]],
+ then ~hyperdrive.el~ will automatically use ~systemd~ to manage the
+ gateway. Otherwise, ~hyperdrive.el~ will start ~hyper-gateway-ushin~
+ as an Emacs subprocess.
- User Option: hyperdrive-gateway-command ::
- The command run to start ~hyper-gateway~ as an Emacs subprocess. This
+ The command run to start ~hyper-gateway-ushin~ as an Emacs subprocess. This
option only takes effect when ~hyperdrive-gateway-process-type~ is set
to ~subprocess~.
-Alternatively, you can start hyper-gateway manually by running:
+Alternatively, you can start ~hyper-gateway-ushin~ manually by running:
#+begin_src sh
-hyper-gateway run --writable true
+hyper-gateway-ushin run --writable true
#+end_src
-For full installation instructions, see the
[[https://github.com/RangerMauve/hyper-gateway#usage][hyper-gateway README]].
+For full usage instructions, see the
[[https://git.sr.ht/~ushin/hyper-gateway-ushin#usage][hyper-gateway-ushin
README]].
** Open a hyperdrive
@@ -901,7 +902,7 @@ is specified in a hyper URL.
Because hyperdrives are sparsely replicated (see [[*Sparse replication]]),
~hyperdrive.el~ might not know the full version history of a file. When
-the gateway (see [[*Hyper-gateway]]) loads a file from the network, it
+the gateway (see [[*hyper-gateway-ushin]]) loads a file from the network, it
also loads some version metadata about that file. Specifically, it
loads the hyperdrive version number at which the file was modified.
For example, if I load the most recent version of ~/bar.org~ from your
@@ -928,13 +929,14 @@ your hyperdrive was actually created at version 51 of
your hyperdrive:
| 1-50 | unknown |
Running ~hyperdrive-previous~ while looking at ~/bar.org~ at version 51 or
-52 will send a request for ~/bar.org~ at version 50. ~hyper-gateway~ will
-report that ~/bar.org~ does not exist at version 50, but it won't report
-whether ~/bar.org~ ever existed /before/ version 50. For example,
-~/bar.org~ might have been created at version 6, deleted at 14, then
-created again at version 51. ~hyperdrive.el~ will keep sending requests
-to the network (up to ~hyperdrive-fill-version-ranges-limit~) until the
-history view looks like:
+52 will send a request for ~/bar.org~ at version 50.
+~hyper-gateway-ushin~ will report that ~/bar.org~ does not exist at
+version 50, but it won't report whether ~/bar.org~ ever existed /before/
+version 50. For example, ~/bar.org~ might have been created at version
+6, deleted at 14, then created again at version 51. ~hyperdrive.el~
+will keep sending requests to the network (up to
+~hyperdrive-fill-version-ranges-limit~) until the history view looks
+like:
| Version range | exists |
|---------------+---------|
@@ -961,12 +963,12 @@ and technical reason:
The secret master key is combined with a seed (see [[*Seeds]]) to generate
a new public key for a hyperdrive when you run ~hyperdrive-new~. Your
-master key is generated automatically by ~hyper-gateway~.
+master key is generated automatically by ~hyper-gateway-ushin~.
-** Hyper-gateway
-#+cindex: Hyper-gateway
+** hyper-gateway-ushin
+#+cindex: hyper-gateway-ushin
-[[https://github.com/RangerMauve/hyper-gateway/][Hyper-gateway]] handles
interactions with hyperdrive under the hood, and
+[[https://git.sr.ht/~ushin/hyper-gateway-ushin][Hyper-gateway-ushin]] handles
interactions with hyperdrive under the hood, and
it runs a local HTTP server which offers a Fetch API to access the
Hyperdrive network. In ~hyperdrive.el~, P2P interactions consist
mostly of, e.g., ~GET~ requests to download files and ~PUT~ requests
@@ -998,8 +1000,8 @@ Public keys are globally unique identifiers for
hyperdrives. They
make up the first part of a ~hyper://~ URL. Public keys are
52-character-long
[[https://en.wikipedia.org/wiki/Base32#z-base-32][z-base-32]] encoded keys
generated from your master
key (see [[*Master key]]) and a [[*Seeds][seed]] string. When you run
~hyperdrive-new~
-and type a new seed, ~hyper-gateway~ automatically generates a new
-public key.
+and type a new seed, ~hyper-gateway-ushin~ automatically generates a
+new public key.
*** Nicknames
#+cindex: Nicknames
@@ -1048,9 +1050,9 @@ DNS domains are checked for suspicious characters (see
You can adjust the following options in the customization interface by
running ~M-x customize-group RET hyperdrive RET~:
-- User Option: hyperdrive-hyper-gateway-port ::
+- User Option: hyperdrive-hyper-gateway-ushin-port ::
- ~hyperdrive.el~ will send HTTP requests to ~hyper-gateway~ on this port.
+ ~hyperdrive.el~ will send HTTP requests to ~hyper-gateway-ushin~ on this
port.
Defaults to ~4973~.
- User Option: hyperdrive-persist-location ::
@@ -1066,8 +1068,8 @@ running ~M-x customize-group RET hyperdrive RET~:
- User Option: hyperdrive-queue-limit ::
- Default number of request sent to ~hyper-gateway~ at a time in a
- queues. Defaults to ~20~.
+ Default number of request sent to ~hyper-gateway-ushin~ at a time in
+ a queue. Defaults to ~20~.
- User Option: hyperdrive-fill-version-ranges-limit ::
@@ -1192,9 +1194,9 @@ If you run into issues, please first try resetting the
values of
(persist-save 'hyperdrive-version-ranges))
#+end_src
-Please ensure that your version of ~hyper-gateway~ (~M-x
-hyperdrive-hyper-gateway-version~) is the latest version
-([[https://github.com/RangerMauve/hyper-gateway/releases/][releases]]).
+Please ensure that your version of ~hyper-gateway-ushin~ (~M-x
+hyperdrive-hyper-gateway-ushin-version~) is version `3.7.0`
+([downloads](https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/v3.7.0)).
* Contributing/Getting help
diff --git a/doc/hyperdrive.texi b/doc/hyperdrive.texi
index e99665ba3c..d90cc2a1c2 100644
--- a/doc/hyperdrive.texi
+++ b/doc/hyperdrive.texi
@@ -68,9 +68,9 @@ This manual is for @code{hyperdrive.el} version 0.4-pre.
Installation
-* Emacs::
-* hyper-gateway::
-* hyperdrive.el: hyperdriveel.
+* Install Emacs::
+* Install hyper-gateway-ushin::
+* Install hyperdrive.el: Install hyperdriveel.
Usage
@@ -126,7 +126,7 @@ Miscellaneous features
Concepts
* Hyperdrive::
-* Hyper-gateway::
+* hyper-gateway-ushin::
* Naming::
Hyperdrive
@@ -197,24 +197,24 @@ modify this GNU manual.''
@chapter Installation
@menu
-* Emacs::
-* hyper-gateway::
-* hyperdrive.el: hyperdriveel.
+* Install Emacs::
+* Install hyper-gateway-ushin::
+* Install hyperdrive.el: Install hyperdriveel.
@end menu
-@node Emacs
-@section Emacs
+@node Install Emacs
+@section Install Emacs
@code{hyperdrive.el} requires @uref{https://www.gnu.org/software/emacs/, GNU
Emacs} version 28.1 or later.
-@node hyper-gateway
-@section hyper-gateway
+@node Install hyper-gateway-ushin
+@section Install hyper-gateway-ushin
-@code{hyperdrive.el} relies on
@uref{https://github.com/RangerMauve/hyper-gateway/, hyper-gateway} for talking
to the hypercore
-network
(@uref{https://github.com/RangerMauve/hyper-gateway#how-do-i-install-hyper-gateway,
installation instructions}).
+@code{hyperdrive.el} relies on
@uref{https://git.sr.ht/~ushin/hyper-gateway-ushin/, hyper-gateway-ushin} for
talking to the
+hypercore network
(@uref{https://git.sr.ht/~ushin/hyper-gateway-ushin#installation, installation
instructions}).
-@node hyperdriveel
-@section hyperdrive.el
+@node Install hyperdriveel
+@section Install hyperdrive.el
@code{hyperdrive.el} can be installed from
@uref{https://elpa.nongnu.org/nongnu/hyperdrive.html, NonGNU ELPA} with
@code{M-x
package-refresh-contents} then @code{M-x package-install RET hyperdrive}.
@@ -326,40 +326,41 @@ documentation,,transient,}. To learn about the commands
available in
@node Start/stop the gateway
@section Start/stop the gateway
-To connect with peers, you'll need to start @code{hyper-gateway} (see
-@ref{Hyper-gateway}). The current running status of the gateway can be
-seen in @code{hyperdrive-menu} (see @ref{Hyperdrive menu command}) and in the
+To connect with peers, you'll need to start @code{hyper-gateway-ushin} (see
+@ref{hyper-gateway-ushin}). The current running status of the gateway can
+be seen in @code{hyperdrive-menu} (see @ref{Hyperdrive menu command}) and in
the
``Hyperdrive'' menu bar (see @ref{Menu bar support}).
@deffn Command hyperdrive-start
-Start @code{hyper-gateway}.
+Start @code{hyper-gateway-ushin}.
@end deffn
@deffn Command hyperdrive-stop
-Stop @code{hyper-gateway}.
+Stop @code{hyper-gateway-ushin}.
@end deffn
@defopt hyperdrive-gateway-process-type
-How to start and stop @code{hyper-gateway}. By default, @code{hyperdrive.el}
will
-autodetect the appropriate process type. If you have configured
-@uref{https://github.com/RangerMauve/hyper-gateway#how-do-i-run-hyper-gateway-as-a-background-process-on-gnulinux--systemd,
hyper-gateway to run as a systemd service}, then @code{hyperdrive.el} will
-automatically use @code{systemd} to manage the gateway. Otherwise,
-@code{hyperdrive.el} will start @code{hyper-gateway} as an Emacs subprocess.
+How to start and stop @code{hyper-gateway-ushin}. By default,
+@code{hyperdrive.el} will autodetect the appropriate process type. If you
+have configured
@uref{https://git.sr.ht/~ushin/hyper-gateway-ushin#how-do-i-run-hyper-gateway-ushin-as-a-background-process-on-gnulinux--systemd,
hyper-gateway-ushin to run as a systemd service},
+then @code{hyperdrive.el} will automatically use @code{systemd} to manage the
+gateway. Otherwise, @code{hyperdrive.el} will start @code{hyper-gateway-ushin}
+as an Emacs subprocess.
@end defopt
@defopt hyperdrive-gateway-command
-The command run to start @code{hyper-gateway} as an Emacs subprocess. This
+The command run to start @code{hyper-gateway-ushin} as an Emacs subprocess.
This
option only takes effect when @code{hyperdrive-gateway-process-type} is set
to @code{subprocess}.
@end defopt
-Alternatively, you can start hyper-gateway manually by running:
+Alternatively, you can start @code{hyper-gateway-ushin} manually by running:
@example
-hyper-gateway run --writable true
+hyper-gateway-ushin run --writable true
@end example
-For full installation instructions, see the
@uref{https://github.com/RangerMauve/hyper-gateway#usage, hyper-gateway README}.
+For full usage instructions, see the
@uref{https://git.sr.ht/~ushin/hyper-gateway-ushin#usage, hyper-gateway-ushin
README}.
@node Open a hyperdrive
@section Open a hyperdrive
@@ -1114,7 +1115,7 @@ You can jump to a @code{hyper://} link with @code{M-x
webjump} after adding it t
@menu
* Hyperdrive::
-* Hyper-gateway::
+* hyper-gateway-ushin::
* Naming::
@end menu
@@ -1244,7 +1245,7 @@ is specified in a hyper URL@.
Because hyperdrives are sparsely replicated (see @ref{Sparse replication}),
@code{hyperdrive.el} might not know the full version history of a file. When
-the gateway (see @ref{Hyper-gateway}) loads a file from the network, it
+the gateway (see @ref{hyper-gateway-ushin}) loads a file from the network, it
also loads some version metadata about that file. Specifically, it
loads the hyperdrive version number at which the file was modified.
For example, if I load the most recent version of @code{/bar.org} from your
@@ -1280,13 +1281,14 @@ your hyperdrive was actually created at version 51 of
your hyperdrive:
@end multitable
Running @code{hyperdrive-previous} while looking at @code{/bar.org} at version
51 or
-52 will send a request for @code{/bar.org} at version 50.
@code{hyper-gateway} will
-report that @code{/bar.org} does not exist at version 50, but it won't report
-whether @code{/bar.org} ever existed @emph{before} version 50. For example,
-@code{/bar.org} might have been created at version 6, deleted at 14, then
-created again at version 51. @code{hyperdrive.el} will keep sending requests
-to the network (up to @code{hyperdrive-fill-version-ranges-limit}) until the
-history view looks like:
+52 will send a request for @code{/bar.org} at version 50.
+@code{hyper-gateway-ushin} will report that @code{/bar.org} does not exist at
+version 50, but it won't report whether @code{/bar.org} ever existed
@emph{before}
+version 50. For example, @code{/bar.org} might have been created at version
+6, deleted at 14, then created again at version 51. @code{hyperdrive.el}
+will keep sending requests to the network (up to
+@code{hyperdrive-fill-version-ranges-limit}) until the history view looks
+like:
@multitable {aaaaaaaaaaaaa} {aaaaaa}
@headitem Version range
@@ -1327,14 +1329,14 @@ contains, which can never prove that a directory
doesn't exist.
The secret master key is combined with a seed (see @ref{Seeds}) to generate
a new public key for a hyperdrive when you run @code{hyperdrive-new}. Your
-master key is generated automatically by @code{hyper-gateway}.
+master key is generated automatically by @code{hyper-gateway-ushin}.
-@node Hyper-gateway
-@section Hyper-gateway
+@node hyper-gateway-ushin
+@section hyper-gateway-ushin
-@cindex Hyper-gateway
+@cindex hyper-gateway-ushin
-@uref{https://github.com/RangerMauve/hyper-gateway/, Hyper-gateway} handles
interactions with hyperdrive under the hood, and
+@uref{https://git.sr.ht/~ushin/hyper-gateway-ushin, Hyper-gateway-ushin}
handles interactions with hyperdrive under the hood, and
it runs a local HTTP server which offers a Fetch API to access the
Hyperdrive network. In @code{hyperdrive.el}, P2P interactions consist
mostly of, e.g., @code{GET} requests to download files and @code{PUT} requests
@@ -1387,8 +1389,8 @@ Public keys are globally unique identifiers for
hyperdrives. They
make up the first part of a @code{hyper://} URL@. Public keys are
52-character-long @uref{https://en.wikipedia.org/wiki/Base32#z-base-32,
z-base-32} encoded keys generated from your master
key (see @ref{Master key}) and a @ref{Seeds, , seed} string. When you run
@code{hyperdrive-new}
-and type a new seed, @code{hyper-gateway} automatically generates a new
-public key.
+and type a new seed, @code{hyper-gateway-ushin} automatically generates a
+new public key.
@node Nicknames
@subsection Nicknames
@@ -1446,8 +1448,8 @@ DNS domains are checked for suspicious characters (see
You can adjust the following options in the customization interface by
running @code{M-x customize-group RET hyperdrive RET}:
-@defopt hyperdrive-hyper-gateway-port
-@code{hyperdrive.el} will send HTTP requests to @code{hyper-gateway} on this
port.
+@defopt hyperdrive-hyper-gateway-ushin-port
+@code{hyperdrive.el} will send HTTP requests to @code{hyper-gateway-ushin} on
this port.
Defaults to @code{4973}.
@end defopt
@@ -1463,8 +1465,8 @@ which see.
@end defopt
@defopt hyperdrive-queue-limit
-Default number of request sent to @code{hyper-gateway} at a time in a
-queues. Defaults to @code{20}.
+Default number of request sent to @code{hyper-gateway-ushin} at a time in
+a queue. Defaults to @code{20}.
@end defopt
@defopt hyperdrive-fill-version-ranges-limit
@@ -1620,9 +1622,9 @@ If you run into issues, please first try resetting the
values of
(persist-save 'hyperdrive-version-ranges))
@end lisp
-Please ensure that your version of @code{hyper-gateway} (@code{M-x
-hyperdrive-hyper-gateway-version}) is the latest version
-(@uref{https://github.com/RangerMauve/hyper-gateway/releases/, releases}).
+Please ensure that your version of @code{hyper-gateway-ushin} (@code{M-x
+hyperdrive-hyper-gateway-ushin-version}) is version `3.7.0`
+([downloads](@uref{https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/v3.7.0})).
@node Contributing/Getting help
@chapter Contributing/Getting help
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 81185716d9..683ec90593 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -153,7 +153,7 @@ See `hyperdrive-directory-sort' for the type of DIRECTION."
Calls `hyperdrive--httpify-url' to convert HYPER-URL starting
with `hyperdrive--hyper-prefix' to a URL starting with
\"http://localhost:4973/hyper/\" (assuming that
-`hyper-gateway-port' is \"4973\").
+`hyperdrive-hyper-gateway-ushin-port' is \"4973\").
REST is passed to `plz', which see.
@@ -172,7 +172,7 @@ make the request."
(guard (string-suffix-p "/" url)))
;; By default, hypercore-fetch resolves directory URLs to the
;; index.html file inside that directory. See
- ;;
<https://github.com/RangerMauve/hypercore-fetch#fetchhypernameexamplenoresolve-method-get>
+ ;;
<https://git.sr.ht/~ushin/hypercore-fetch-ushin/#codefetchhypernameexamplenoresolve-method-getcode>
(setf url (concat url "?noResolve"))))
(pcase-let* ((else (pcase (plist-get rest :then)
((or `nil 'sync)
@@ -207,7 +207,8 @@ PLZ-ERR should be a `plz-error' struct."
;; Curl error 7 is "Failed to connect to host."
(h/user-error "Gateway not running. Use \\[hyperdrive-start] to start
it"))
((app plz-error-response (cl-struct plz-response (status (or 403 405))
body))
- ;; 403 Forbidden or 405 Method Not Allowed: Display message from
hyper-gateway.
+ ;; 403 Forbidden or 405 Method Not Allowed: Display message from
+ ;; hyper-gateway-ushin.
(h/error "%s" body))
((guard else)
(funcall else plz-err))
@@ -216,16 +217,16 @@ PLZ-ERR should be a `plz-error' struct."
;;;###autoload
(defun hyperdrive-status ()
- "Return non-nil if `hyper-gateway' is running and accessible."
+ "Return non-nil if `hyper-gateway-ushin' is running and accessible."
;; FIXME: Ensure a very short timeout for this request.
(condition-case nil
- (plz 'get (format "http://localhost:%d/" h/hyper-gateway-port))
+ (plz 'get (format "http://localhost:%d/" h/hyper-gateway-ushin-port))
(error nil)))
(defun h//httpify-url (url)
"Return localhost HTTP URL for HYPER-URL."
(format "http://localhost:%d/hyper/%s"
- h/hyper-gateway-port
+ h/hyper-gateway-ushin-port
(substring url (length h//hyper-prefix))))
(cl-defun h//write (url &key body then else queue)
@@ -582,8 +583,9 @@ echo area when the request for the file is made."
;; Hyperdrive entry is not writable: prompt for action.
(not-found-action))))
(500 ;; Generic error, likely a mistyped URL
- (h/message "Generic hyper-gateway status 500 error. %s %s"
- "Is this URL correct?" (he/url entry)))
+ (h/message
+ "Generic hyper-gateway-ushin status 500 error. %s %s"
+ "Is this URL correct?" (he/url entry)))
(_ (h/message "Unable to load URL \"%s\": %S"
(he/url entry) err))))))
(when messagep
@@ -919,7 +921,7 @@ HYPERDRIVE's public metadata file."
(cl-defun h/purge-no-prompt (hyperdrive &key then else)
"Purge all data corresponding to HYPERDRIVE, then call THEN with response.
-- HYPERDRIVE file content and metadata managed by hyper-gateway
+- HYPERDRIVE file content and metadata managed by hyper-gateway-ushin
- hash table entry for HYPERDRIVE in `hyperdrive-hyperdrives'
- hash table entries for HYPERDRIVE in `hyperdrive-version-ranges'
@@ -1390,7 +1392,7 @@ This does not mean that the gateway is responsive, only
that the
process is running. Used when HYPERDRIVE-GATEWAY-PROCESS-TYPE
is the symbol `systemd'."
(zerop (call-process "systemctl" nil nil nil
- "--user" "is-active" "hyper-gateway.service")))
+ "--user" "is-active" "hyper-gateway-ushin.service")))
(cl-defmethod h//gateway-running-p (&context (h/gateway-process-type (eql
'subprocess)))
"Return non-nil if the gateway process is running.
@@ -1419,8 +1421,9 @@ To customize the command run as a subprocess, see
;; `subprocess'.)
(setf value
(if (ignore-errors
- (zerop (call-process "systemctl" nil nil nil
- "--user" "is-enabled"
"hyper-gateway.service")))
+ (zerop (call-process
+ "systemctl" nil nil nil "--user" "is-enabled"
+ "hyper-gateway-ushin.service")))
'systemd
'subprocess)))
(let ((runningp (h//gateway-running-p)))
@@ -1436,10 +1439,11 @@ To customize the command run as a subprocess, see
(const :tag "Autodetect" nil))
:group 'hyperdrive)
-(defcustom h/gateway-command "hyper-gateway run --writable true --silent true"
+(defcustom h/gateway-command
+ "hyper-gateway-ushin run --writable true --silent true"
;; TODO: File Emacs bug report because the customization formatter handles
the
;; "symbol `subprocess'" part differently than `describe-variable' does.
- "Command used to run the hyper-gateway.
+ "Command used to run hyper-gateway-ushin.
Only used when `hyperdrive-gateway-process-type' is the symbol `subprocess'."
:type 'string
:group 'hyperdrive)
@@ -1452,9 +1456,10 @@ Used when HYPERDRIVE-GATEWAY-PROCESS-TYPE is the symbol
(user-error "Gateway already running"))
(let ((buffer (get-buffer-create " *hyperdrive-start*")))
(unwind-protect
- (unless (zerop (call-process "systemctl" nil (list buffer t) nil
- "--user" "start" "hyper-gateway.service"))
- (h/error "Unable to start hyper-gateway: %S"
+ (unless (zerop (call-process
+ "systemctl" nil (list buffer t) nil
+ "--user" "start" "hyper-gateway-ushin.service"))
+ (h/error "Unable to start hyper-gateway-ushin: %S"
(with-current-buffer buffer
(string-trim-right (buffer-string)))))
(kill-buffer buffer))))
@@ -1467,14 +1472,14 @@ Used when HYPERDRIVE-GATEWAY-PROCESS-TYPE is the symbol
(user-error "Gateway already running"))
(condition-case nil
(setf h/gateway-process
- (make-process :name "hyper-gateway"
+ (make-process :name "hyper-gateway-ushin"
:buffer " *hyperdrive-start*"
:command (split-string-and-unquote h/gateway-command)
:connection-type 'pipe))
(file-missing
- (info "(hyperdrive) hyper-gateway")
+ (info "(hyperdrive) hyper-gateway-ushin")
(user-error
- "hyper-gateway program not found; Please see installation
instructions")))
+ "hyper-gateway-ushin not found; Please see installation instructions")))
(sleep-for 0.5)
(unless (process-live-p h/gateway-process)
(if (h/status)
@@ -1491,8 +1496,8 @@ Used when HYPERDRIVE-GATEWAY-PROCESS-TYPE is the symbol
(let ((buffer (get-buffer-create " *hyperdrive-stop*")))
(unwind-protect
(unless (zerop (call-process "systemctl" nil (list buffer t) nil
- "--user" "stop" "hyper-gateway.service"))
- (h/error "Unable to stop hyper-gateway: %S"
+ "--user" "stop"
"hyper-gateway-ushin.service"))
+ (h/error "Unable to stop hyper-gateway-ushin: %S"
(with-current-buffer buffer
(string-trim-right (buffer-string)))))
(cl-loop for i below 40
diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index fbc077d608..f0c89acbf8 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -211,7 +211,7 @@
:transient t)
("G S" "Stop" h/stop
:transient t)
- ("G v" "Version" h/hyper-gateway-version
+ ("G v" "Version" h/hyper-gateway-ushin-version
:transient t)]
["Bookmark"
("b j" "Jump" h/bookmark-jump)
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index f20e5bfae5..af679dc4dd 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -38,8 +38,8 @@
:group 'external
:prefix "hyperdrive-")
-(defcustom h/hyper-gateway-port 4973
- "Port to use to send requests to the hyper-gateway server."
+(defcustom h/hyper-gateway-ushin-port 4973
+ "Port to use to send requests to the hyper-gateway-ushin server."
:type 'natnum)
(defcustom h/honor-auto-mode-alist t
@@ -350,7 +350,7 @@ values are alists mapping version range starts to plists
with
;;;;; Internals
(defvar h/gateway-process nil
- "Hyper-gateway process.
+ "Hyper-gateway-ushin process.
Only used when `hyperdrive-gateway-process-type' is `subprocess'.")
(defvar-local h/current-entry nil
diff --git a/hyperdrive.el b/hyperdrive.el
index db15d4f0e9..787901920b 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -41,11 +41,11 @@
;; Once you've set up MELPA, run
;; M-x package-install RET hyperdrive RET
-;; hyperdrive.el relies on hyper-gateway for connecting to the P2P network:
-;; https://github.com/RangerMauve/hyper-gateway
+;; hyperdrive.el relies on hyper-gateway-ushin for connecting to the P2P
network:
+;; https://git.sr.ht/~ushin/hyper-gateway-ushin
;; Installation instructions:
-;; https://github.com/RangerMauve/hyper-gateway#how-do-i-install-hyper-gateway
+;; https://git.sr.ht/~ushin/hyper-gateway-ushin/#installation
;;; Code:
@@ -95,27 +95,27 @@
;;;###autoload
(defun hyperdrive-start ()
- "Start `hyper-gateway' if not already running.
+ "Start `hyper-gateway-ushin' if not already running.
Customize behavior with `hyperdrive-gateway-process-type', which see."
(interactive)
- ;; TODO: Verify that the latest version is installed. See:
<https://github.com/RangerMauve/hyper-gateway/issues/9>.
+ ;; TODO: Verify that the expected version, e.g., 3.7.0, is installed.
(h//gateway-start))
;;;###autoload
(defun hyperdrive-stop ()
- "Stop `hyper-gateway' if running.
+ "Stop `hyper-gateway-ushin' if running.
Customize behavior with `hyperdrive-gateway-process-type', which see."
(interactive)
(h//gateway-stop))
;;;###autoload
-(defun hyperdrive-hyper-gateway-version ()
- "Say version number of `hyper-gateway'.
+(defun hyperdrive-hyper-gateway-ushin-version ()
+ "Say version number of `hyper-gateway-ushin'.
Gateway must be running."
(interactive)
(condition-case err
- (let ((url (format "http://localhost:%d/" h/hyper-gateway-port)))
- (h/message "hyper-gateway version %s"
+ (let ((url (format "http://localhost:%d/" h/hyper-gateway-ushin-port)))
+ (h/message "hyper-gateway-ushin version %s"
(alist-get 'version (plz 'get url :as #'json-read))))
(plz-error (h/api-default-else nil (caddr err)))))
@@ -464,7 +464,7 @@ use, see `hyperdrive-write'."
;; PUT responses only include ETag and Last-Modified
;; headers, so we need to set other entry metadata manually.
;; FIXME: For large buffers, `buffer-size' returns a
different
- ;; value than hyper-gateway's Content-Length header.
+ ;; value than hyper-gateway-ushin's Content-Length header.
(setf (he/size entry) (buffer-size))
;; FIXME: Will entry type ever be anything besides
text/plain?
;; /.well-known/host-meta.json ?
@@ -813,11 +813,11 @@ The return value of this function is the retrieval
buffer."
:label
(format "Gateway (%s)" (if (h/status) "on" "off"))
["Start Gateway" h/start
- :help "Start hyper-gateway"]
+ :help "Start hyper-gateway-ushin"]
["Stop Gateway" h/stop
- :help "Stop hyper-gateway"]
- ["Gateway version" h/hyper-gateway-version
- :help "Say hyper-gateway version"])
+ :help "Stop hyper-gateway-ushin"]
+ ["Gateway version" h/hyper-gateway-ushin-version
+ :help "Say hyper-gateway-ushin version"])
"---"
["Open URL" h/open-url
:help "Load a hyperdrive URL"]
diff --git a/tests/org links.org b/tests/org links.org
index cadb1f1741..f264e63593 100644
--- a/tests/org links.org
+++ b/tests/org links.org
@@ -34,7 +34,7 @@ Here are various link types which we want to test.
+ [[hyper://PUBLIC_KEY/links%20test.org]]
+ hyper://PUBLIC_KEY/links%20test.org
-+ [2023-08-30 Wed 14:43] Getting this error (with the public key changed to
the real one), for both the bracketed and unbracketed links: ~Hyperdrive:
Generic hyper-gateway status 500 error. Is this URL correct?
hyper:////wnqpdr9xdy1p9wofqbj7e7csueg7aynqbot8gt53ueunezry6any/links%20test.org~
++ [2023-08-30 Wed 14:43] Getting this error (with the public key changed to
the real one), for both the bracketed and unbracketed links: ~Hyperdrive:
Generic hyper-gateway-ushin status 500 error. Is this URL correct?
hyper:////wnqpdr9xdy1p9wofqbj7e7csueg7aynqbot8gt53ueunezry6any/links%20test.org~
+ There are FOUR SLASHES.