From fb3973b264d82aad7e0ae3086255d72506a38c41 Mon Sep 17 00:00:00 2001 From: Owncast Date: Wed, 13 Jul 2022 02:31:33 +0000 Subject: [PATCH 01/36] Update admin to 19c9ac698ac49922046fd8f2a5b0b816dc6e921a --- static/admin/404/index.html | 2 +- .../_buildManifest.js | 2 +- .../_middlewareManifest.js | 0 .../_ssgManifest.js | 0 static/admin/access-tokens/index.html | 2 +- static/admin/actions/index.html | 2 +- static/admin/chat/messages/index.html | 2 +- static/admin/chat/users/index.html | 2 +- static/admin/config-chat/index.html | 2 +- static/admin/config-federation/index.html | 2 +- static/admin/config-notify/index.html | 2 +- static/admin/config-public-details/index.html | 2 +- static/admin/config-server-details/index.html | 2 +- static/admin/config-social-items/index.html | 2 +- static/admin/config-storage/index.html | 2 +- static/admin/config-video/index.html | 2 +- static/admin/federation/actions/index.html | 2 +- static/admin/federation/followers/index.html | 2 +- static/admin/hardware-info/index.html | 4 ++-- static/admin/help/index.html | 2 +- static/admin/index.html | 2 +- static/admin/logs/index.html | 2 +- static/admin/stream-health/index.html | 2 +- static/admin/upgrade/index.html | 2 +- static/admin/viewer-info/index.html | 2 +- static/admin/webhooks/index.html | 2 +- 26 files changed, 25 insertions(+), 25 deletions(-) rename static/admin/_next/static/{8BXA3sIFsH4Fe1n-GRdoJ => IF0q45tHTUnbAhOX9pFCQ}/_buildManifest.js (92%) rename static/admin/_next/static/{8BXA3sIFsH4Fe1n-GRdoJ => IF0q45tHTUnbAhOX9pFCQ}/_middlewareManifest.js (100%) rename static/admin/_next/static/{8BXA3sIFsH4Fe1n-GRdoJ => IF0q45tHTUnbAhOX9pFCQ}/_ssgManifest.js (100%) diff --git a/static/admin/404/index.html b/static/admin/404/index.html index 399ce835b..30d0fef9a 100644 --- a/static/admin/404/index.html +++ b/static/admin/404/index.html @@ -1 +1 @@ -404: This page could not be found

What is your stream about today?

What is your stream about today?
Offline

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

What is your stream about today?

What is your stream about today?
Offline

404

This page could not be found.

\ No newline at end of file diff --git a/static/admin/_next/static/8BXA3sIFsH4Fe1n-GRdoJ/_buildManifest.js b/static/admin/_next/static/IF0q45tHTUnbAhOX9pFCQ/_buildManifest.js similarity index 92% rename from static/admin/_next/static/8BXA3sIFsH4Fe1n-GRdoJ/_buildManifest.js rename to static/admin/_next/static/IF0q45tHTUnbAhOX9pFCQ/_buildManifest.js index 0f931653a..655ec899b 100644 --- a/static/admin/_next/static/8BXA3sIFsH4Fe1n-GRdoJ/_buildManifest.js +++ b/static/admin/_next/static/IF0q45tHTUnbAhOX9pFCQ/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,c,a,e,t,i,f,n,o,d,h,g,u,r,k){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,a,e,t,i,f,h,"static/chunks/2494-8114e9c6571377d1.js","static/chunks/pages/index-e0ac83ceaf99b5f0.js"],"/_error":["static/chunks/pages/_error-785557186902809b.js"],"/access-tokens":[s,c,a,"static/chunks/pages/access-tokens-d328b918d1f9b3d4.js"],"/actions":[s,c,"static/chunks/pages/actions-9278698db4cd1a16.js"],"/chat/messages":[g,s,c,a,f,u,"static/chunks/pages/chat/messages-0df125d8b9455827.js"],"/chat/users":[g,s,c,a,e,f,"static/chunks/6489-cea2e8971ed16ad4.js",u,"static/chunks/pages/chat/users-c3f6235e6932151e.js"],"/config-chat":["static/chunks/pages/config-chat-bacb12d23264144b.js"],"/config-federation":["static/chunks/1829-f5c4fb462b2f7e98.js","static/chunks/pages/config-federation-ea0f018fb4193b61.js"],"/config-notify":["static/chunks/pages/config-notify-10a8844dc11ca4b2.js"],"/config-public-details":[s,c,n,"static/css/e773f9ad06a56dc3.css","static/chunks/2589-9a64928383be2ad7.js",r,"static/chunks/pages/config-public-details-94ff52653eb2586e.js"],"/config-server-details":[k,"static/chunks/pages/config-server-details-cd516688accb84d3.js"],"/config-social-items":[s,c,r,"static/chunks/pages/config-social-items-42e2ed4eed8d4dd2.js"],"/config-storage":["static/chunks/5473-623385148d67cba2.js","static/chunks/pages/config-storage-5ff120c715bfdb04.js"],"/config-video":[s,c,k,"static/chunks/1556-f79a922e799c7a06.js","static/chunks/pages/config-video-32d86e0ba98dc6fe.js"],"/federation/actions":[s,c,a,"static/chunks/pages/federation/actions-7cfffddef3b58d86.js"],"/federation/followers":[s,c,a,e,"static/chunks/pages/federation/followers-d2d105c342c79f98.js"],"/hardware-info":[o,a,e,t,i,d,n,"static/chunks/pages/hardware-info-4723b20a84e4f461.js"],"/help":[e,t,"static/chunks/6132-0f911799dd6dd847.js","static/chunks/pages/help-deeb1c0f667c7d75.js"],"/logs":[s,c,a,h,"static/chunks/pages/logs-df4b23b85b8ac818.js"],"/stream-health":[o,s,a,e,t,i,d,"static/chunks/pages/stream-health-4a811c8adeb950de.js"],"/upgrade":[s,c,"static/chunks/1758-3a8e1364ffda64ee.js","static/chunks/pages/upgrade-1dcaa9f0a72f02f8.js"],"/viewer-info":[o,s,c,a,e,t,i,f,d,n,"static/chunks/pages/viewer-info-03fcbea265510389.js"],"/webhooks":[s,c,"static/chunks/pages/webhooks-651cb241952e0e4a.js"],sortedPages:["/","/_app","/_error","/access-tokens","/actions","/chat/messages","/chat/users","/config-chat","/config-federation","/config-notify","/config-public-details","/config-server-details","/config-social-items","/config-storage","/config-video","/federation/actions","/federation/followers","/hardware-info","/help","/logs","/stream-health","/upgrade","/viewer-info","/webhooks"]}}("static/chunks/1741-d9d648ade4ad86b9.js","static/chunks/6003-f37682e25271f05f.js","static/chunks/8091-5bc21baa6d0d3232.js","static/chunks/8879-af8bf87fdc518c08.js","static/chunks/7751-48959ec0f11e9080.js","static/chunks/4763-7fd93797a527a971.js","static/chunks/5533-096cc7dc6703128f.js","static/chunks/7910-699eb8ed3467dc00.js","static/chunks/36bcf0ca-110fd889741d5f41.js","static/chunks/1080-1a127ea7f5a8eb3d.js","static/chunks/2429-ccb4d7fa1648dd38.js","static/chunks/29107295-4a69275373f23f88.js","static/chunks/1371-f41477e42ee50603.js","static/chunks/1017-0760c7f39ffcc2a7.js","static/chunks/4578-afc9eff4fbf5ecb1.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,c,a,e,t,i,f,n,d,o,h,g,u,r,k){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,a,e,t,i,f,h,"static/chunks/2494-8114e9c6571377d1.js","static/chunks/pages/index-e0ac83ceaf99b5f0.js"],"/_error":["static/chunks/pages/_error-785557186902809b.js"],"/access-tokens":[s,c,a,"static/chunks/pages/access-tokens-d328b918d1f9b3d4.js"],"/actions":[s,c,"static/chunks/pages/actions-9278698db4cd1a16.js"],"/chat/messages":[g,s,c,a,f,u,"static/chunks/pages/chat/messages-0df125d8b9455827.js"],"/chat/users":[g,s,c,a,e,f,"static/chunks/6489-cea2e8971ed16ad4.js",u,"static/chunks/pages/chat/users-c3f6235e6932151e.js"],"/config-chat":["static/chunks/pages/config-chat-bacb12d23264144b.js"],"/config-federation":["static/chunks/1829-f5c4fb462b2f7e98.js","static/chunks/pages/config-federation-ea0f018fb4193b61.js"],"/config-notify":["static/chunks/pages/config-notify-10a8844dc11ca4b2.js"],"/config-public-details":[s,c,n,"static/css/e773f9ad06a56dc3.css","static/chunks/2589-9a64928383be2ad7.js",r,"static/chunks/pages/config-public-details-94ff52653eb2586e.js"],"/config-server-details":[k,"static/chunks/pages/config-server-details-cd516688accb84d3.js"],"/config-social-items":[s,c,r,"static/chunks/pages/config-social-items-42e2ed4eed8d4dd2.js"],"/config-storage":["static/chunks/5473-623385148d67cba2.js","static/chunks/pages/config-storage-5ff120c715bfdb04.js"],"/config-video":[s,c,k,"static/chunks/1556-f79a922e799c7a06.js","static/chunks/pages/config-video-32d86e0ba98dc6fe.js"],"/federation/actions":[s,c,a,"static/chunks/pages/federation/actions-7cfffddef3b58d86.js"],"/federation/followers":[s,c,a,e,"static/chunks/pages/federation/followers-d2d105c342c79f98.js"],"/hardware-info":[d,a,e,t,i,o,n,"static/chunks/pages/hardware-info-4723b20a84e4f461.js"],"/help":[e,t,"static/chunks/6132-0f911799dd6dd847.js","static/chunks/pages/help-deeb1c0f667c7d75.js"],"/logs":[s,c,a,h,"static/chunks/pages/logs-df4b23b85b8ac818.js"],"/stream-health":[d,s,a,e,t,i,o,"static/chunks/pages/stream-health-4a811c8adeb950de.js"],"/upgrade":[s,c,"static/chunks/1758-3a8e1364ffda64ee.js","static/chunks/pages/upgrade-1dcaa9f0a72f02f8.js"],"/viewer-info":[d,s,c,a,e,t,i,f,o,n,"static/chunks/pages/viewer-info-03fcbea265510389.js"],"/webhooks":[s,c,"static/chunks/pages/webhooks-651cb241952e0e4a.js"],sortedPages:["/","/_app","/_error","/access-tokens","/actions","/chat/messages","/chat/users","/config-chat","/config-federation","/config-notify","/config-public-details","/config-server-details","/config-social-items","/config-storage","/config-video","/federation/actions","/federation/followers","/hardware-info","/help","/logs","/stream-health","/upgrade","/viewer-info","/webhooks"]}}("static/chunks/1741-d9d648ade4ad86b9.js","static/chunks/6003-f37682e25271f05f.js","static/chunks/8091-5bc21baa6d0d3232.js","static/chunks/8879-af8bf87fdc518c08.js","static/chunks/7751-48959ec0f11e9080.js","static/chunks/4763-7fd93797a527a971.js","static/chunks/5533-096cc7dc6703128f.js","static/chunks/7910-699eb8ed3467dc00.js","static/chunks/36bcf0ca-110fd889741d5f41.js","static/chunks/1080-1a127ea7f5a8eb3d.js","static/chunks/2429-ccb4d7fa1648dd38.js","static/chunks/29107295-4a69275373f23f88.js","static/chunks/1371-f41477e42ee50603.js","static/chunks/1017-0760c7f39ffcc2a7.js","static/chunks/4578-afc9eff4fbf5ecb1.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/static/admin/_next/static/8BXA3sIFsH4Fe1n-GRdoJ/_middlewareManifest.js b/static/admin/_next/static/IF0q45tHTUnbAhOX9pFCQ/_middlewareManifest.js similarity index 100% rename from static/admin/_next/static/8BXA3sIFsH4Fe1n-GRdoJ/_middlewareManifest.js rename to static/admin/_next/static/IF0q45tHTUnbAhOX9pFCQ/_middlewareManifest.js diff --git a/static/admin/_next/static/8BXA3sIFsH4Fe1n-GRdoJ/_ssgManifest.js b/static/admin/_next/static/IF0q45tHTUnbAhOX9pFCQ/_ssgManifest.js similarity index 100% rename from static/admin/_next/static/8BXA3sIFsH4Fe1n-GRdoJ/_ssgManifest.js rename to static/admin/_next/static/IF0q45tHTUnbAhOX9pFCQ/_ssgManifest.js diff --git a/static/admin/access-tokens/index.html b/static/admin/access-tokens/index.html index 7a32fd67c..9868d7b60 100644 --- a/static/admin/access-tokens/index.html +++ b/static/admin/access-tokens/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No Data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No Data

\ No newline at end of file diff --git a/static/admin/actions/index.html b/static/admin/actions/index.html index 34e01466b..9e3794260 100644 --- a/static/admin/actions/index.html +++ b/static/admin/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No Data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No Data

\ No newline at end of file diff --git a/static/admin/chat/messages/index.html b/static/admin/chat/messages/index.html index 06eee6f53..f3abe6662 100644 --- a/static/admin/chat/messages/index.html +++ b/static/admin/chat/messages/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No Data
\ No newline at end of file diff --git a/static/admin/chat/users/index.html b/static/admin/chat/users/index.html index 0d9f35842..f6e4ab4a3 100644 --- a/static/admin/chat/users/index.html +++ b/static/admin/chat/users/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file diff --git a/static/admin/config-chat/index.html b/static/admin/config-chat/index.html index 70502a358..a3d3cddc9 100644 --- a/static/admin/config-chat/index.html +++ b/static/admin/config-chat/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/admin/config-federation/index.html b/static/admin/config-federation/index.html index 536426634..cd5e049cb 100644 --- a/static/admin/config-federation/index.html +++ b/static/admin/config-federation/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/admin/config-notify/index.html b/static/admin/config-notify/index.html index 6c4577570..9b5b48ae5 100644 --- a/static/admin/config-notify/index.html +++ b/static/admin/config-notify/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Followers

Enabling Fediverse social features will alert your followers when you go live, along with other functionality.

Fediverse social features: Disabled

Configure

Custom

Build your own notifications by using custom webhooks.

Create
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Followers

Enabling Fediverse social features will alert your followers when you go live, along with other functionality.

Fediverse social features: Disabled

Configure

Custom

Build your own notifications by using custom webhooks.

Create
\ No newline at end of file diff --git a/static/admin/config-public-details/index.html b/static/admin/config-public-details/index.html index 40d8aeeb5..d020f8336 100644 --- a/static/admin/config-public-details/index.html +++ b/static/admin/config-public-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


Customize your page styling with CSS

Customize the look and feel of your Owncast instance by overriding the CSS styles of various components on the page. Refer to the CSS & Components guide.

Please input plain CSS text, as this will be directly injected onto your page during load.


\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


Customize your page styling with CSS

Customize the look and feel of your Owncast instance by overriding the CSS styles of various components on the page. Refer to the CSS & Components guide.

Please input plain CSS text, as this will be directly injected onto your page during load.


\ No newline at end of file diff --git a/static/admin/config-server-details/index.html b/static/admin/config-server-details/index.html index 0b4823c5f..ff7023358 100644 --- a/static/admin/config-server-details/index.html +++ b/static/admin/config-server-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file diff --git a/static/admin/config-social-items/index.html b/static/admin/config-social-items/index.html index b067f99b6..13a20ff1c 100644 --- a/static/admin/config-social-items/index.html +++ b/static/admin/config-social-items/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file diff --git a/static/admin/config-storage/index.html b/static/admin/config-storage/index.html index f8dbdd2fc..caf25d4d4 100644 --- a/static/admin/config-storage/index.html +++ b/static/admin/config-storage/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file diff --git a/static/admin/config-video/index.html b/static/admin/config-video/index.html index f222f854e..9d47d951d 100644 --- a/static/admin/config-video/index.html +++ b/static/admin/config-video/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file diff --git a/static/admin/federation/actions/index.html b/static/admin/federation/actions/index.html index 9d4b2dd62..21dff5cc5 100644 --- a/static/admin/federation/actions/index.html +++ b/static/admin/federation/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No Data
\ No newline at end of file diff --git a/static/admin/federation/followers/index.html b/static/admin/federation/followers/index.html index bfd49dfcf..3fbe9840c 100644 --- a/static/admin/federation/followers/index.html +++ b/static/admin/federation/followers/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No Data
\ No newline at end of file diff --git a/static/admin/hardware-info/index.html b/static/admin/hardware-info/index.html index 4564d34cb..01be57273 100644 --- a/static/admin/hardware-info/index.html +++ b/static/admin/hardware-info/index.html @@ -1,4 +1,4 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


Disk
0%
Loading...
\ No newline at end of file + a 47,47 0 1 1 0,94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" style="stroke:#52C41A;stroke-dasharray:0px 295.3097094374406px;stroke-dashoffset:-37.5px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s">
Disk
0%
Loading...
\ No newline at end of file diff --git a/static/admin/help/index.html b/static/admin/help/index.html index 2e154e69b..900061a8b 100644 --- a/static/admin/help/index.html +++ b/static/admin/help/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file diff --git a/static/admin/index.html b/static/admin/index.html index de0921ae9..ce8c0961b 100644 --- a/static/admin/index.html +++ b/static/admin/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file diff --git a/static/admin/logs/index.html b/static/admin/logs/index.html index 7e30279c1..d4fafded4 100644 --- a/static/admin/logs/index.html +++ b/static/admin/logs/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/admin/stream-health/index.html b/static/admin/stream-health/index.html index c790251d5..836242fa1 100644 --- a/static/admin/stream-health/index.html +++ b/static/admin/stream-health/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file diff --git a/static/admin/upgrade/index.html b/static/admin/upgrade/index.html index 59c664360..2cfdb0172 100644 --- a/static/admin/upgrade/index.html +++ b/static/admin/upgrade/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No Data
\ No newline at end of file diff --git a/static/admin/viewer-info/index.html b/static/admin/viewer-info/index.html index a10daa470..6ca507c8e 100644 --- a/static/admin/viewer-info/index.html +++ b/static/admin/viewer-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No Data
\ No newline at end of file diff --git a/static/admin/webhooks/index.html b/static/admin/webhooks/index.html index 0b0e4834e..ee66f50c5 100644 --- a/static/admin/webhooks/index.html +++ b/static/admin/webhooks/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No Data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No Data

\ No newline at end of file From 3d9703f32a1321cb428a6c4f72dea2e4966d93f3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 10:06:42 -0700 Subject: [PATCH 02/36] Lock file maintenance (#2007) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- build/javascript/package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/build/javascript/package-lock.json b/build/javascript/package-lock.json index 2c411480a..ca27d739c 100644 --- a/build/javascript/package-lock.json +++ b/build/javascript/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@babel/runtime": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz", - "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==", + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -317,13 +317,13 @@ } }, "browserslist": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", - "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.2.tgz", + "integrity": "sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA==", "requires": { - "caniuse-lite": "^1.0.30001359", - "electron-to-chromium": "^1.4.172", - "node-releases": "^2.0.5", + "caniuse-lite": "^1.0.30001366", + "electron-to-chromium": "^1.4.188", + "node-releases": "^2.0.6", "update-browserslist-db": "^1.0.4" } }, @@ -350,9 +350,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001364", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001364.tgz", - "integrity": "sha512-9O0xzV3wVyX0SlegIQ6knz+okhBB5pE0PC40MNdwcipjwpxoUEHL24uJ+gG42cgklPjfO5ZjZPme9FTSN3QT2Q==" + "version": "1.0.30001367", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz", + "integrity": "sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw==" }, "chalk": { "version": "4.1.2", @@ -645,9 +645,9 @@ } }, "electron-to-chromium": { - "version": "1.4.185", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.185.tgz", - "integrity": "sha512-9kV/isoOGpKkBt04yYNaSWIBn3187Q5VZRtoReq8oz5NY/A4XmU6cAoqgQlDp7kKJCZMRjWZ8nsQyxfpFHvfyw==" + "version": "1.4.192", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.192.tgz", + "integrity": "sha512-8nCXyIQY9An88NXAp+PuPy5h3/w5ZY7Iu2lag65Q0XREprcat5F8gKhoHsBUnQcFuCRnmevpR8yEBYRU3d2HDw==" }, "emoji-regex": { "version": "8.0.0", From b75cb1784bb5c4adf036a6223d4435ca177d7813 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Mon, 18 Jul 2022 11:08:49 -0700 Subject: [PATCH 03/36] Set ReadHeaderTimeout in http server --- router/router.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/router/router.go b/router/router.go index fbc2c1859..fdb5e9dbf 100644 --- a/router/router.go +++ b/router/router.go @@ -3,6 +3,7 @@ package router import ( "fmt" "net/http" + "time" "github.com/prometheus/client_golang/prometheus/promhttp" log "github.com/sirupsen/logrus" @@ -374,8 +375,9 @@ func Start() error { h2s := &http2.Server{} server := &http.Server{ - Addr: fmt.Sprintf("%s:%d", ip, port), - Handler: h2c.NewHandler(http.DefaultServeMux, h2s), + Addr: fmt.Sprintf("%s:%d", ip, port), + ReadHeaderTimeout: 4 * time.Second, + Handler: h2c.NewHandler(http.DefaultServeMux, h2s), } log.Infof("Web server is listening on IP %s port %d.", ip, port) From b4da968499077743126bf0b704a42c52b247862a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 19:41:26 +0000 Subject: [PATCH 04/36] Update golang.org/x/net digest to 1185a90 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 1e22485d4..7ab4faa0d 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect - golang.org/x/net v0.0.0-20220607020251-c690dde0001d + golang.org/x/net v0.0.0-20220708220712-1185a9018129 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect ) diff --git a/go.sum b/go.sum index 303988410..e8092dffd 100644 --- a/go.sum +++ b/go.sum @@ -380,6 +380,8 @@ golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXz golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0= +golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From e2e4707c829eb743a5334f4b6f436bc4a4e9d23e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 22:00:15 +0000 Subject: [PATCH 05/36] Update github.com/teris-io/shortid digest to 71ec9f2 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 7ab4faa0d..a367ec628 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 github.com/schollz/sqlite3dump v1.3.1 github.com/sirupsen/logrus v1.8.1 - github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 + github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 github.com/yuin/goldmark v1.4.12 golang.org/x/mod v0.5.1 golang.org/x/time v0.0.0-20220411224347-583f2d630306 diff --git a/go.sum b/go.sum index e8092dffd..7a68c72ff 100644 --- a/go.sum +++ b/go.sum @@ -278,6 +278,8 @@ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMT github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB1JpVZouslJpI3GBNoiqW7+wb0Rz7w= github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= +github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 h1:xzABM9let0HLLqFypcxvLmlvEciCHL7+Lv+4vwZqecI= +github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569/go.mod h1:2Ly+NIftZN4de9zRmENdYbvPQeaVIYKWpLFStLFEBgI= github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= From 8866fe46f40d6105e0ef56f15dbe20a1034edcb7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 23:56:53 +0000 Subject: [PATCH 06/36] Update golang.org/x/time digest to 579cf78 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index a367ec628..17e17867b 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 github.com/yuin/goldmark v1.4.12 golang.org/x/mod v0.5.1 - golang.org/x/time v0.0.0-20220411224347-583f2d630306 + golang.org/x/time v0.0.0-20220609170525-579cf78fd858 mvdan.cc/xurls v1.1.0 ) diff --git a/go.sum b/go.sum index 7a68c72ff..1387c9ef6 100644 --- a/go.sum +++ b/go.sum @@ -462,6 +462,8 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRinntgeXO2AeZVd0AWD3w= golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= From fb2cad86f8344d1c5799a264a2bdc8c38f95f56e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 19 Jul 2022 02:06:37 +0000 Subject: [PATCH 07/36] Update module github.com/shirou/gopsutil/v3 to v3.22.6 --- go.mod | 2 +- go.sum | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 17e17867b..a950714a9 100644 --- a/go.mod +++ b/go.mod @@ -57,7 +57,7 @@ require ( require ( github.com/nakabonne/tstorage v0.3.5 - github.com/shirou/gopsutil/v3 v3.22.3 + github.com/shirou/gopsutil/v3 v3.22.6 ) require github.com/SherClockHolmes/webpush-go v1.2.0 diff --git a/go.sum b/go.sum index 1387c9ef6..527971ff0 100644 --- a/go.sum +++ b/go.sum @@ -140,6 +140,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -261,6 +262,8 @@ github.com/schollz/sqlite3dump v1.3.1 h1:QXizJ7XEJ7hggjqjZ3YRtF3+javm8zKtzNByYtE github.com/schollz/sqlite3dump v1.3.1/go.mod h1:mzSTjZpJH4zAb1FN3iNlhWPbbdyeBpOaTW0hukyMHyI= github.com/shirou/gopsutil/v3 v3.22.3 h1:UebRzEomgMpv61e3hgD1tGooqX5trFbdU/ehphbHd00= github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= +github.com/shirou/gopsutil/v3 v3.22.6 h1:FnHOFOh+cYAM0C30P+zysPISzlknLC5Z1G4EAElznfQ= +github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -270,12 +273,14 @@ github.com/spf13/cobra v0.0.4-0.20190109003409-7547e83b2d85/go.mod h1:1l0Ry5zgKv github.com/spf13/pflag v1.0.4-0.20181223182923-24fa6976df40/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB1JpVZouslJpI3GBNoiqW7+wb0Rz7w= github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 h1:xzABM9let0HLLqFypcxvLmlvEciCHL7+Lv+4vwZqecI= @@ -600,6 +605,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From aead748c0d1f45e77b18adbd64a57495e5ecb97b Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 19 Jul 2022 21:09:45 -0700 Subject: [PATCH 08/36] Use the race detector when running automated tests. --- .github/workflows/test.yaml | 2 +- test/automated/api/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c0b70767c..c2ec9f401 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,5 +38,5 @@ jobs: go-version: "^1" - name: Run tests - run: go test ./... + run: go test -race ./... diff --git a/test/automated/api/run.sh b/test/automated/api/run.sh index b2a3a1cda..fde189604 100755 --- a/test/automated/api/run.sh +++ b/test/automated/api/run.sh @@ -18,7 +18,7 @@ fi pushd ../../.. > /dev/null # Build and run owncast from source -go build -o owncast main.go +go build -race -o owncast main.go ./owncast -database $TEMP_DB & SERVER_PID=$! From 2300c2fae79270aa15a0e382b55f8739b6498751 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Jul 2022 21:17:08 +0000 Subject: [PATCH 09/36] Update golang.org/x/net digest to a158d28 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index a950714a9..a6f7db0f0 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect - golang.org/x/net v0.0.0-20220708220712-1185a9018129 + golang.org/x/net v0.0.0-20220722155237-a158d28d115b golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect ) diff --git a/go.sum b/go.sum index 527971ff0..1e25506e6 100644 --- a/go.sum +++ b/go.sum @@ -389,6 +389,8 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzh golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0= golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From 3b9d5908e476aa41036267e241226979292a0107 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Jul 2022 21:38:59 +0000 Subject: [PATCH 10/36] Update golang.org/x/time digest to e5dcc9c --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index a6f7db0f0..e7db8a209 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 github.com/yuin/goldmark v1.4.12 golang.org/x/mod v0.5.1 - golang.org/x/time v0.0.0-20220609170525-579cf78fd858 + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 mvdan.cc/xurls v1.1.0 ) diff --git a/go.sum b/go.sum index 1e25506e6..454c43190 100644 --- a/go.sum +++ b/go.sum @@ -471,6 +471,8 @@ golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRi golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= From bb1e273d11dd79a92ec02828b6a7484458d4ff88 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Jul 2022 23:56:12 +0000 Subject: [PATCH 11/36] Update module github.com/aws/aws-sdk-go to v1.44.61 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e7db8a209..f5a0acdac 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/amalfra/etag v1.0.0 - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.61 github.com/go-fed/activity v1.0.1-0.20210803212804-d866ba75dd0f github.com/go-fed/httpsig v1.1.0 github.com/go-ole/go-ole v1.2.6 // indirect diff --git a/go.sum b/go.sum index 454c43190..34cc6c836 100644 --- a/go.sum +++ b/go.sum @@ -50,6 +50,8 @@ github.com/aws/aws-sdk-go v1.43.44 h1:t+97cY4ScE/czlNlK5iikUGi7w1fC0uop1OUalDIRT github.com/aws/aws-sdk-go v1.43.44/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.61 h1:NcpLSS3Z0MiVQIYugx4I40vSIEEAXT0baO684ExNRco= +github.com/aws/aws-sdk-go v1.44.61/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= From 8ac594f7ad48b046da172fe3a0ea2aedba0d6bbd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 23 Jul 2022 01:31:05 +0000 Subject: [PATCH 12/36] Update module github.com/microcosm-cc/bluemonday to v1.0.19 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index f5a0acdac..ccc6fa19f 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/grafov/m3u8 v0.11.1 github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible github.com/mattn/go-sqlite3 v1.14.13 - github.com/microcosm-cc/bluemonday v1.0.18 + github.com/microcosm-cc/bluemonday v1.0.19 github.com/mssola/user_agent v0.5.3 github.com/nareix/joy5 v0.0.0-20210317075623-2c912ca30590 github.com/oschwald/geoip2-golang v1.7.0 diff --git a/go.sum b/go.sum index 34cc6c836..bddb2f913 100644 --- a/go.sum +++ b/go.sum @@ -204,6 +204,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/microcosm-cc/bluemonday v1.0.18 h1:6HcxvXDAi3ARt3slx6nTesbvorIc3QeTzBNRvWktHBo= github.com/microcosm-cc/bluemonday v1.0.18/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= +github.com/microcosm-cc/bluemonday v1.0.19 h1:OI7hoF5FY4pFz2VA//RN8TfM0YJ2dJcl4P4APrCWy6c= +github.com/microcosm-cc/bluemonday v1.0.19/go.mod h1:QNzV2UbLK2/53oIIwTOyLUSABMkjZ4tqiyC1g/DyqxE= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= From bd03e668cd39d541570de7b875a5eb51c475ae57 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 23 Jul 2022 04:00:45 +0000 Subject: [PATCH 13/36] Update module github.com/mattn/go-sqlite3 to v1.14.14 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index ccc6fa19f..f1136d5f0 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/grafov/m3u8 v0.11.1 github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible - github.com/mattn/go-sqlite3 v1.14.13 + github.com/mattn/go-sqlite3 v1.14.14 github.com/microcosm-cc/bluemonday v1.0.19 github.com/mssola/user_agent v0.5.3 github.com/nareix/joy5 v0.0.0-20210317075623-2c912ca30590 diff --git a/go.sum b/go.sum index bddb2f913..d9aee39b9 100644 --- a/go.sum +++ b/go.sum @@ -200,6 +200,8 @@ github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.13 h1:1tj15ngiFfcZzii7yd82foL+ks+ouQcj8j/TPq3fk1I= github.com/mattn/go-sqlite3 v1.14.13/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/microcosm-cc/bluemonday v1.0.18 h1:6HcxvXDAi3ARt3slx6nTesbvorIc3QeTzBNRvWktHBo= From 7dfb0c70252d9a1b5aed42e736cdce8febbf6f50 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 23 Jul 2022 05:58:06 +0000 Subject: [PATCH 14/36] Update module github.com/sirupsen/logrus to v1.9.0 --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index f1136d5f0..0c7db8c5b 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/oschwald/geoip2-golang v1.7.0 github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 github.com/schollz/sqlite3dump v1.3.1 - github.com/sirupsen/logrus v1.8.1 + github.com/sirupsen/logrus v1.9.0 github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 github.com/yuin/goldmark v1.4.12 golang.org/x/mod v0.5.1 @@ -36,7 +36,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect ) require github.com/prometheus/client_golang v1.12.2 diff --git a/go.sum b/go.sum index d9aee39b9..121835b4e 100644 --- a/go.sum +++ b/go.sum @@ -275,6 +275,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v0.0.4-0.20190109003409-7547e83b2d85/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.4-0.20181223182923-24fa6976df40/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -459,6 +461,8 @@ golang.org/x/sys v0.0.0-20220325203850-36772127a21f h1:TrmogKRsSOxRMJbLYGrB4SBbW golang.org/x/sys v0.0.0-20220325203850-36772127a21f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= From fef0cd722e2e18fd75142ff0fc310992b4e22ebb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 23 Jul 2022 11:07:12 +0000 Subject: [PATCH 15/36] Update module github.com/yuin/goldmark to v1.4.13 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0c7db8c5b..0df6a95fc 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/schollz/sqlite3dump v1.3.1 github.com/sirupsen/logrus v1.9.0 github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 - github.com/yuin/goldmark v1.4.12 + github.com/yuin/goldmark v1.4.13 golang.org/x/mod v0.5.1 golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 mvdan.cc/xurls v1.1.0 diff --git a/go.sum b/go.sum index 121835b4e..c58a2e9b9 100644 --- a/go.sum +++ b/go.sum @@ -304,6 +304,8 @@ github.com/yuin/goldmark v1.4.11 h1:i45YIzqLnUc2tGaTlJCyUxSG8TvgyGqhqOZOUKIjJ6w= github.com/yuin/goldmark v1.4.11/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= github.com/yuin/goldmark v1.4.12 h1:6hffw6vALvEDqJ19dOJvJKOoAOKe4NDaTqvd2sktGN0= github.com/yuin/goldmark v1.4.12/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= From 64c5580c6997bf84ccb73e60e457b2e7ff1e16d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 23 Jul 2022 19:49:18 +0000 Subject: [PATCH 16/36] Update github/codeql-action action to v2 --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4da61c10d..835816694 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -43,7 +43,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From 77c11a603ba4aab6e96ebecaa6bd6dfa6755ea00 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 23 Jul 2022 21:17:04 +0000 Subject: [PATCH 17/36] Update docker/setup-qemu-action action to v2 --- .github/workflows/docker-nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-nightly.yaml b/.github/workflows/docker-nightly.yaml index cc686f270..171c33491 100644 --- a/.github/workflows/docker-nightly.yaml +++ b/.github/workflows/docker-nightly.yaml @@ -27,7 +27,7 @@ jobs: - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: image: tonistiigi/binfmt:latest platforms: all From 4b7367fdcc68a376da8c9794e8da6c43f2bd7c1f Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 27 Jul 2022 14:08:52 -0700 Subject: [PATCH 18/36] Set sqlite_omit_load_extension flag when building to disable sqlite feature --- Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index 98f3554d3..4a8b846d6 100644 --- a/Earthfile +++ b/Earthfile @@ -74,7 +74,7 @@ build: WORKDIR /build # MacOSX disallows static executables, so we omit the static flag on this platform - RUN go build -a -installsuffix cgo -ldflags "$([ "$GOOS"z != darwinz ] && echo "-linkmode external -extldflags -static ") -s -w -X github.com/owncast/owncast/config.GitCommit=$EARTHLY_GIT_HASH -X github.com/owncast/owncast/config.VersionNumber=$version -X github.com/owncast/owncast/config.BuildPlatform=$NAME" -o owncast main.go + RUN go build -a -installsuffix cgo -ldflags "$([ "$GOOS"z != darwinz ] && echo "-linkmode external -extldflags -static ") -s -w -X github.com/owncast/owncast/config.GitCommit=$EARTHLY_GIT_HASH -X github.com/owncast/owncast/config.VersionNumber=$version -X github.com/owncast/owncast/config.BuildPlatform=$NAME" -tags sqlite_omit_load_extension -o owncast main.go COPY +tailwind/prod-tailwind.min.css /build/dist/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css SAVE ARTIFACT owncast owncast From 3951f23b5566d45358186cb1674a3e9ae34cc7e2 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 27 Jul 2022 14:17:35 -0700 Subject: [PATCH 19/36] Run BSD tests under macos-latest --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c2ec9f401..f5e654cce 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: run: go test ./... test-bsds: - runs-on: macos-10.15 + runs-on: macos-latest strategy: matrix: os: From 643b54037b0706be89b8303e2c5de9a2a74496b2 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 2 Aug 2022 12:44:24 -0700 Subject: [PATCH 20/36] Do not log inactionable error. Closes #1992 --- activitypub/inbox/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activitypub/inbox/worker.go b/activitypub/inbox/worker.go index ef8aef9f3..a3c2f19e0 100644 --- a/activitypub/inbox/worker.go +++ b/activitypub/inbox/worker.go @@ -22,7 +22,7 @@ import ( func handle(request apmodels.InboxRequest) { if verified, err := Verify(request.Request); err != nil { - log.Errorln("Error in attempting to verify request", err) + log.Debugln("Error in attempting to verify request", err) return } else if !verified { log.Debugln("Request failed verification", err) From c40eaa47e9c04729db2f59d1c13c2a8c478d459f Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 2 Aug 2022 13:03:11 -0700 Subject: [PATCH 21/36] Force origin test to always pass. Closes #2003 --- core/chat/chatclient.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/chat/chatclient.go b/core/chat/chatclient.go index fdcd77e38..3e02e7158 100644 --- a/core/chat/chatclient.go +++ b/core/chat/chatclient.go @@ -3,6 +3,7 @@ package chat import ( "bytes" "encoding/json" + "net/http" "sync" "time" @@ -60,6 +61,12 @@ const ( var upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, + + // Override default origin check to allow all clients, even those that + // do not match our server. + CheckOrigin: func(r *http.Request) bool { + return true + }, } var ( From 0b5ddf433b1f36ac90c3635eda237c3087c7db0a Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 2 Aug 2022 13:29:06 -0700 Subject: [PATCH 22/36] Limit OTP requests to one per expiry window. Closes #2000 --- auth/fediverse/fediverse.go | 16 +++++++++++++--- auth/fediverse/fediverse_test.go | 19 ++++++++++++++++++- controllers/auth/fediverse/fediverse.go | 7 ++++++- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/auth/fediverse/fediverse.go b/auth/fediverse/fediverse.go index 8f00ee120..404af3916 100644 --- a/auth/fediverse/fediverse.go +++ b/auth/fediverse/fediverse.go @@ -19,9 +19,19 @@ type OTPRegistration struct { // to be active at a time. var pendingAuthRequests = make(map[string]OTPRegistration) +const registrationTimeout = time.Minute * 10 + // RegisterFediverseOTP will start the OTP flow for a user, creating a new // code and returning it to be sent to a destination. -func RegisterFediverseOTP(accessToken, userID, userDisplayName, account string) OTPRegistration { +func RegisterFediverseOTP(accessToken, userID, userDisplayName, account string) (OTPRegistration, bool) { + request, requestExists := pendingAuthRequests[accessToken] + + // If a request is already registered and has not expired then return that + // existing request. + if requestExists && time.Since(request.Timestamp) < registrationTimeout { + return request, false + } + code, _ := createCode() r := OTPRegistration{ Code: code, @@ -32,14 +42,14 @@ func RegisterFediverseOTP(accessToken, userID, userDisplayName, account string) } pendingAuthRequests[accessToken] = r - return r + return r, true } // ValidateFediverseOTP will verify a OTP code for a auth request. func ValidateFediverseOTP(accessToken, code string) (bool, *OTPRegistration) { request, ok := pendingAuthRequests[accessToken] - if !ok || request.Code != code || time.Since(request.Timestamp) > time.Minute*10 { + if !ok || request.Code != code || time.Since(request.Timestamp) > registrationTimeout { return false, nil } diff --git a/auth/fediverse/fediverse_test.go b/auth/fediverse/fediverse_test.go index 8c1d58f66..912736d05 100644 --- a/auth/fediverse/fediverse_test.go +++ b/auth/fediverse/fediverse_test.go @@ -10,7 +10,11 @@ const ( ) func TestOTPFlowValidation(t *testing.T) { - r := RegisterFediverseOTP(accessToken, userID, userDisplayName, account) + r, success := RegisterFediverseOTP(accessToken, userID, userDisplayName, account) + + if !success { + t.Error("Registration should be permitted.") + } if r.Code == "" { t.Error("Code is empty") @@ -41,3 +45,16 @@ func TestOTPFlowValidation(t *testing.T) { t.Error("UserDisplayName is not set correctly") } } + +func TestSingleOTPFlowRequest(t *testing.T) { + r1, _ := RegisterFediverseOTP(accessToken, userID, userDisplayName, account) + r2, s2 := RegisterFediverseOTP(accessToken, userID, userDisplayName, account) + + if r1.Code != r2.Code { + t.Error("Only one registration should be permitted.") + } + + if s2 { + t.Error("Second registration should not be permitted.") + } +} diff --git a/controllers/auth/fediverse/fediverse.go b/controllers/auth/fediverse/fediverse.go index e335a5a81..6192e712e 100644 --- a/controllers/auth/fediverse/fediverse.go +++ b/controllers/auth/fediverse/fediverse.go @@ -29,7 +29,12 @@ func RegisterFediverseOTPRequest(u user.User, w http.ResponseWriter, r *http.Req } accessToken := r.URL.Query().Get("accessToken") - reg := fediverseauth.RegisterFediverseOTP(accessToken, u.ID, u.DisplayName, req.FediverseAccount) + reg, success := fediverseauth.RegisterFediverseOTP(accessToken, u.ID, u.DisplayName, req.FediverseAccount) + if !success { + controllers.WriteSimpleResponse(w, false, "Could not register auth request. One may already be pending. Try again later.") + return + } + msg := fmt.Sprintf("

This is an automated message from %s. If you did not request this message please ignore or block. Your requested one-time code is:

%s

", data.GetServerName(), reg.Code) if err := activitypub.SendDirectFederatedMessage(msg, reg.Account); err != nil { controllers.WriteSimpleResponse(w, false, "Could not send code to fediverse: "+err.Error()) From eda62a91dc49267664edefac953c8cd7b5f88655 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 3 Aug 2022 10:21:55 -0700 Subject: [PATCH 23/36] Messages table fixes to improve query performance (#2026) * Move to yaml sqlc config * Add util for ungraceful sql execs * Fix messages schema + add indexes * Add migration to drop+recreate messages table * Create index only if does not exist * Fix typo * Unexport function --- core/data/data.go | 2 +- core/data/messages.go | 32 ++++++++++++++------------------ core/data/migrations.go | 12 ++++++++++++ core/data/utils.go | 20 ++++++++++++++++++++ sqlc.json | 9 --------- sqlc.yaml | 6 ++++++ 6 files changed, 53 insertions(+), 28 deletions(-) create mode 100644 core/data/utils.go delete mode 100644 sqlc.json create mode 100644 sqlc.yaml diff --git a/core/data/data.go b/core/data/data.go index 1abd512bd..b2d71d014 100644 --- a/core/data/data.go +++ b/core/data/data.go @@ -17,7 +17,7 @@ import ( ) const ( - schemaVersion = 5 + schemaVersion = 6 ) var ( diff --git a/core/data/messages.go b/core/data/messages.go index 30516866a..047917ec7 100644 --- a/core/data/messages.go +++ b/core/data/messages.go @@ -13,30 +13,26 @@ import ( func CreateMessagesTable(db *sql.DB) { createTableSQL := `CREATE TABLE IF NOT EXISTS messages ( "id" string NOT NULL, - "user_id" INTEGER, + "user_id" TEXT, "body" TEXT, "eventType" TEXT, "hidden_at" DATETIME, "timestamp" DATETIME, - "title" TEXT, - "subtitle" TEXT, - "image" TEXT, - "link" TEXT, + "title" TEXT, + "subtitle" TEXT, + "image" TEXT, + "link" TEXT, PRIMARY KEY (id) - );CREATE INDEX index ON messages (id, user_id, hidden_at, timestamp); - CREATE INDEX id ON messages (id); - CREATE INDEX user_id ON messages (user_id); - CREATE INDEX hidden_at ON messages (hidden_at); - CREATE INDEX timestamp ON messages (timestamp);` + );` + mustExec(createTableSQL, db) - stmt, err := db.Prepare(createTableSQL) - if err != nil { - log.Fatal("error creating chat messages table", err) - } - defer stmt.Close() - if _, err := stmt.Exec(); err != nil { - log.Fatal("error creating chat messages table", err) - } + // Create indexes + mustExec(`CREATE INDEX IF NOT EXISTS user_id_hidden_at_timestamp ON messages (id, user_id, hidden_at, timestamp);`, db) + mustExec(`CREATE INDEX IF NOT EXISTS idx_id ON messages (id);`, db) + mustExec(`CREATE INDEX IF NOT EXISTS idx_user_id ON messages (user_id);`, db) + mustExec(`CREATE INDEX IF NOT EXISTS idx_hidden_at ON messages (hidden_at);`, db) + mustExec(`CREATE INDEX IF NOT EXISTS idx_timestamp ON messages (timestamp);`, db) + mustExec(`CREATE INDEX IF NOT EXISTS idx_messages_hidden_at_timestamp on messages(hidden_at, timestamp);`, db) } // GetMessagesCount will return the number of messages in the database. diff --git a/core/data/migrations.go b/core/data/migrations.go index 3366294cf..c7d14b975 100644 --- a/core/data/migrations.go +++ b/core/data/migrations.go @@ -29,6 +29,8 @@ func migrateDatabaseSchema(db *sql.DB, from, to int) error { migrateToSchema4(db) case 4: migrateToSchema5(db) + case 5: + migrateToSchema6(db) default: log.Fatalln("missing database migration step") } @@ -42,6 +44,16 @@ func migrateDatabaseSchema(db *sql.DB, from, to int) error { return nil } +func migrateToSchema6(db *sql.DB) { + // Fix chat messages table schema. Since chat is ephemeral we can drop + // the table and recreate it. + // Drop the old messages table + mustExec(`DROP TABLE messages`, db) + + // Recreate it + CreateMessagesTable(db) +} + // nolint:cyclop func migrateToSchema5(db *sql.DB) { // Create the access tokens table. diff --git a/core/data/utils.go b/core/data/utils.go new file mode 100644 index 000000000..7791f445e --- /dev/null +++ b/core/data/utils.go @@ -0,0 +1,20 @@ +package data + +import ( + "database/sql" + + log "github.com/sirupsen/logrus" +) + +// mustExec will execute a SQL statement on a provided database instance. +func mustExec(s string, db *sql.DB) { + stmt, err := db.Prepare(s) + if err != nil { + log.Fatal(err) + } + defer stmt.Close() + _, err = stmt.Exec() + if err != nil { + log.Warnln(err) + } +} diff --git a/sqlc.json b/sqlc.json deleted file mode 100644 index 780a5b3cf..000000000 --- a/sqlc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "version": "1", - "packages": [{ - "schema": "db/schema.sql", - "queries": "db/query.sql", - "name": "db", - "path": "db" - }] - } \ No newline at end of file diff --git a/sqlc.yaml b/sqlc.yaml new file mode 100644 index 000000000..a4964736b --- /dev/null +++ b/sqlc.yaml @@ -0,0 +1,6 @@ +version: 1 +packages: + - path: db + name: db + schema: 'db/schema.sql' + queries: 'db/query.sql' From 5d34279862cf539ea33572beb585ba38dadf48d1 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 2 Aug 2022 15:13:52 -0700 Subject: [PATCH 24/36] Add util for ungraceful sql execs --- core/data/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/data/utils.go b/core/data/utils.go index 7791f445e..d5f82fd3f 100644 --- a/core/data/utils.go +++ b/core/data/utils.go @@ -6,8 +6,8 @@ import ( log "github.com/sirupsen/logrus" ) -// mustExec will execute a SQL statement on a provided database instance. -func mustExec(s string, db *sql.DB) { +// MustExec will execute a SQL statement on a provided database instance. +func MustExec(s string, db *sql.DB) { stmt, err := db.Prepare(s) if err != nil { log.Fatal(err) From b2b77f5eb98ed670e18fe97843511e13abcb5657 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 2 Aug 2022 22:45:15 -0700 Subject: [PATCH 25/36] Fix creating table indexes --- activitypub/persistence/followers.go | 17 ++++---------- activitypub/persistence/persistence.go | 31 +++++++------------------- auth/persistence.go | 16 +++---------- core/data/persistence.go | 26 ++++++++++++--------- core/data/users.go | 18 +++++---------- core/data/utils.go | 2 +- notifications/persistence.go | 14 +++--------- 7 files changed, 39 insertions(+), 85 deletions(-) diff --git a/activitypub/persistence/followers.go b/activitypub/persistence/followers.go index 61f173575..7d9e1298b 100644 --- a/activitypub/persistence/followers.go +++ b/activitypub/persistence/followers.go @@ -24,19 +24,10 @@ func createFederationFollowersTable() { "approved_at" TIMESTAMP, "disabled_at" TIMESTAMP, "request_object" BLOB, - PRIMARY KEY (iri)); - CREATE INDEX iri_index ON ap_followers (iri); - CREATE INDEX approved_at_index ON ap_followers (approved_at);` - - stmt, err := _datastore.DB.Prepare(createTableSQL) - if err != nil { - log.Fatal(err) - } - defer stmt.Close() - _, err = stmt.Exec() - if err != nil { - log.Warnln("error executing sql creating followers table", createTableSQL, err) - } + PRIMARY KEY (iri));` + _datastore.MustExec(createTableSQL) + _datastore.MustExec(`CREATE INDEX IF NOT EXISTS idx_iri ON ap_followers (iri);`) + _datastore.MustExec(`CREATE INDEX IF NOT EXISTS idx_approved_at ON ap_followers (approved_at);`) } // GetFollowerCount will return the number of followers we're keeping track of. diff --git a/activitypub/persistence/persistence.go b/activitypub/persistence/persistence.go index 26628f846..d375e7d2d 100644 --- a/activitypub/persistence/persistence.go +++ b/activitypub/persistence/persistence.go @@ -202,17 +202,10 @@ func createFederatedActivitiesTable() { "actor" TEXT NOT NULL, "type" TEXT NOT NULL, "timestamp" TIMESTAMP NOT NULL - ); - CREATE INDEX iri_actor_index ON ap_accepted_activities (iri,actor);` + );` - stmt, err := _datastore.DB.Prepare(createTableSQL) - if err != nil { - log.Fatal("error creating inbox table", err) - } - defer stmt.Close() - if _, err := stmt.Exec(); err != nil { - log.Fatal("error creating inbound federated activities table", err) - } + _datastore.MustExec(createTableSQL) + _datastore.MustExec(`CREATE INDEX IF NOT EXISTS idx_iri_actor_index ON ap_accepted_activities (iri,actor);`) } func createFederationOutboxTable() { @@ -223,20 +216,12 @@ func createFederationOutboxTable() { "type" TEXT NOT NULL, "created_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "live_notification" BOOLEAN DEFAULT FALSE, - PRIMARY KEY (iri)); - CREATE INDEX iri ON ap_outbox (iri); - CREATE INDEX type ON ap_outbox (type); - CREATE INDEX live_notification ON ap_outbox (live_notification);` + PRIMARY KEY (iri));` - stmt, err := _datastore.DB.Prepare(createTableSQL) - if err != nil { - log.Fatal(err) - } - defer stmt.Close() - _, err = stmt.Exec() - if err != nil { - log.Warnln("error executing sql creating outbox table", createTableSQL, err) - } + _datastore.MustExec(createTableSQL) + _datastore.MustExec(`CREATE INDEX IF NOT EXISTS idx_iri ON ap_outbox (iri);`) + _datastore.MustExec(`CREATE INDEX IF NOT EXISTS idx_type ON ap_outbox (type);`) + _datastore.MustExec(`CREATE INDEX IF NOT EXISTS idx_live_notification ON ap_outbox (live_notification);`) } // GetOutboxPostCount will return the number of posts in the outbox. diff --git a/auth/persistence.go b/auth/persistence.go index d644d0c25..0ab28cb89 100644 --- a/auth/persistence.go +++ b/auth/persistence.go @@ -6,7 +6,6 @@ import ( "github.com/owncast/owncast/core/data" "github.com/owncast/owncast/core/user" - log "github.com/sirupsen/logrus" "github.com/owncast/owncast/db" ) @@ -24,18 +23,9 @@ func Setup(db *data.Datastore) { "type" TEXT NOT NULL, "timestamp" DATE DEFAULT CURRENT_TIMESTAMP NOT NULL, FOREIGN KEY(user_id) REFERENCES users(id) - );CREATE INDEX auth_token ON auth (token);` - - stmt, err := db.DB.Prepare(createTableSQL) - if err != nil { - log.Fatal(err) - } - defer stmt.Close() - - _, err = stmt.Exec() - if err != nil { - log.Fatalln(err) - } + );` + _datastore.MustExec(createTableSQL) + _datastore.MustExec(`CREATE INDEX IF NOT EXISTS idx_auth_token ON auth (token);`) } // AddAuth will add an external authentication token and type for a user. diff --git a/core/data/persistence.go b/core/data/persistence.go index cd182f6e4..a765f0b72 100644 --- a/core/data/persistence.go +++ b/core/data/persistence.go @@ -118,18 +118,9 @@ func (ds *Datastore) Setup() { "key" string NOT NULL PRIMARY KEY, "value" BLOB, "timestamp" DATE DEFAULT CURRENT_TIMESTAMP NOT NULL - );CREATE INDEX IF NOT EXISTS messages_timestamp_index ON messages(timestamp);` + );` - stmt, err := ds.DB.Prepare(createTableSQL) - if err != nil { - log.Fatal(err) - } - defer stmt.Close() - - _, err = stmt.Exec() - if err != nil { - log.Fatalln(err) - } + ds.MustExec(createTableSQL) if !HasPopulatedDefaults() { PopulateDefaults() @@ -173,3 +164,16 @@ func (ds *Datastore) Reset() { func GetDatastore() *Datastore { return _datastore } + +// MustExec will execute a SQL statement on a provided database instance. +func (ds *Datastore) MustExec(s string) { + stmt, err := ds.DB.Prepare(s) + if err != nil { + log.Panic(err) + } + defer stmt.Close() + _, err = stmt.Exec() + if err != nil { + log.Warnln(err) + } +} diff --git a/core/data/users.go b/core/data/users.go index d682776ad..d03593616 100644 --- a/core/data/users.go +++ b/core/data/users.go @@ -41,20 +41,12 @@ func createUsersTable(db *sql.DB) { "type" TEXT DEFAULT 'STANDARD', "last_used" DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) - );CREATE INDEX user_id_disabled_at_index ON users (id, disabled_at); - CREATE INDEX user_id_index ON users (id); - CREATE INDEX user_id_disabled_index ON users (id, disabled_at); - CREATE INDEX user_disabled_at_index ON USERS (disabled_at);` + );` - stmt, err := db.Prepare(createTableSQL) - if err != nil { - log.Fatal(err) - } - defer stmt.Close() - _, err = stmt.Exec() - if err != nil { - log.Warnln(err) - } + MustExec(createTableSQL, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_user_id ON users (id);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_user_id_disabled ON users (id, disabled_at);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_user_disabled_at ON users (disabled_at);`, db) } // GetUsersCount will return the number of users in the database. diff --git a/core/data/utils.go b/core/data/utils.go index d5f82fd3f..bec9e09b1 100644 --- a/core/data/utils.go +++ b/core/data/utils.go @@ -10,7 +10,7 @@ import ( func MustExec(s string, db *sql.DB) { stmt, err := db.Prepare(s) if err != nil { - log.Fatal(err) + log.Panic(err) } defer stmt.Close() _, err = stmt.Exec() diff --git a/notifications/persistence.go b/notifications/persistence.go index 283e4e551..bc6cecec1 100644 --- a/notifications/persistence.go +++ b/notifications/persistence.go @@ -17,18 +17,10 @@ func createNotificationsTable(db *sql.DB) { "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "channel" TEXT NOT NULL, "destination" TEXT NOT NULL, - "created_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP); - CREATE INDEX channel_index ON notifications (channel);` + "created_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP);` - stmt, err := db.Prepare(createTableSQL) - if err != nil { - log.Fatal(err) - } - defer stmt.Close() - _, err = stmt.Exec() - if err != nil { - log.Warnln("error executing sql creating followers table", createTableSQL, err) - } + data.MustExec(createTableSQL, db) + data.MustExec(`CREATE INDEX IF NOT EXISTS idx_channel ON notifications (channel);`, db) } // AddNotification saves a new user notification destination. From 0470403b71c5bd296bafffd82dfa2d501be7ce3a Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 3 Aug 2022 11:30:06 -0700 Subject: [PATCH 26/36] Function has been re-exported for use --- core/data/messages.go | 14 +++++++------- core/data/migrations.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/data/messages.go b/core/data/messages.go index 047917ec7..cce63fb6d 100644 --- a/core/data/messages.go +++ b/core/data/messages.go @@ -24,15 +24,15 @@ func CreateMessagesTable(db *sql.DB) { "link" TEXT, PRIMARY KEY (id) );` - mustExec(createTableSQL, db) + MustExec(createTableSQL, db) // Create indexes - mustExec(`CREATE INDEX IF NOT EXISTS user_id_hidden_at_timestamp ON messages (id, user_id, hidden_at, timestamp);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_id ON messages (id);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_user_id ON messages (user_id);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_hidden_at ON messages (hidden_at);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_timestamp ON messages (timestamp);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_messages_hidden_at_timestamp on messages(hidden_at, timestamp);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS user_id_hidden_at_timestamp ON messages (id, user_id, hidden_at, timestamp);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_id ON messages (id);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_user_id ON messages (user_id);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_hidden_at ON messages (hidden_at);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_timestamp ON messages (timestamp);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_messages_hidden_at_timestamp on messages(hidden_at, timestamp);`, db) } // GetMessagesCount will return the number of messages in the database. diff --git a/core/data/migrations.go b/core/data/migrations.go index c7d14b975..817010bff 100644 --- a/core/data/migrations.go +++ b/core/data/migrations.go @@ -48,7 +48,7 @@ func migrateToSchema6(db *sql.DB) { // Fix chat messages table schema. Since chat is ephemeral we can drop // the table and recreate it. // Drop the old messages table - mustExec(`DROP TABLE messages`, db) + MustExec(`DROP TABLE messages`, db) // Recreate it CreateMessagesTable(db) From 38e833233af76320717b70f3a7693f7d7f16616c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Aug 2022 22:24:26 -0700 Subject: [PATCH 27/36] Update module github.com/aws/aws-sdk-go to v1.44.69 (#2027) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0df6a95fc..f3032eb37 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/amalfra/etag v1.0.0 - github.com/aws/aws-sdk-go v1.44.61 + github.com/aws/aws-sdk-go v1.44.69 github.com/go-fed/activity v1.0.1-0.20210803212804-d866ba75dd0f github.com/go-fed/httpsig v1.1.0 github.com/go-ole/go-ole v1.2.6 // indirect diff --git a/go.sum b/go.sum index c58a2e9b9..019eae361 100644 --- a/go.sum +++ b/go.sum @@ -52,6 +52,8 @@ github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.61 h1:NcpLSS3Z0MiVQIYugx4I40vSIEEAXT0baO684ExNRco= github.com/aws/aws-sdk-go v1.44.61/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.69 h1:3A3DEizrCK6dAbBoRGh8KmoZij7She9snclG1ixY/xQ= +github.com/aws/aws-sdk-go v1.44.69/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= From 824c823684557e5619ec256f38727089d12059ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 05:25:33 +0000 Subject: [PATCH 28/36] Update golang.org/x/net digest to 0bcc04d --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index f3032eb37..451d25bb4 100644 --- a/go.mod +++ b/go.mod @@ -35,8 +35,8 @@ require ( github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b - golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect + golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b + golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect ) require github.com/prometheus/client_golang v1.12.2 diff --git a/go.sum b/go.sum index 019eae361..44dc08626 100644 --- a/go.sum +++ b/go.sum @@ -403,6 +403,8 @@ golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6fl golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b h1:3ogNYyK4oIQdIKzTu68hQrr4iuVxF3AxKl9Aj/eDrw0= +golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -467,6 +469,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbuf golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= From c08c86bfd91b43df76dfed301e2f3291f0f432b9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 11:26:14 +0000 Subject: [PATCH 29/36] Update module github.com/shirou/gopsutil/v3 to v3.22.7 --- go.mod | 2 +- go.sum | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 451d25bb4..e15ac2367 100644 --- a/go.mod +++ b/go.mod @@ -57,7 +57,7 @@ require ( require ( github.com/nakabonne/tstorage v0.3.5 - github.com/shirou/gopsutil/v3 v3.22.6 + github.com/shirou/gopsutil/v3 v3.22.7 ) require github.com/SherClockHolmes/webpush-go v1.2.0 diff --git a/go.sum b/go.sum index 44dc08626..9e65d542b 100644 --- a/go.sum +++ b/go.sum @@ -272,6 +272,8 @@ github.com/shirou/gopsutil/v3 v3.22.3 h1:UebRzEomgMpv61e3hgD1tGooqX5trFbdU/ehphb github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= github.com/shirou/gopsutil/v3 v3.22.6 h1:FnHOFOh+cYAM0C30P+zysPISzlknLC5Z1G4EAElznfQ= github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= +github.com/shirou/gopsutil/v3 v3.22.7 h1:flKnuCMfUUrO+oAvwAd6GKZgnPzr098VA/UJ14nhJd4= +github.com/shirou/gopsutil/v3 v3.22.7/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -291,6 +293,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB1JpVZouslJpI3GBNoiqW7+wb0Rz7w= github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 h1:xzABM9let0HLLqFypcxvLmlvEciCHL7+Lv+4vwZqecI= From ffd24ccccbea4e92a3644160b12b9dc03ec9140a Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 4 Aug 2022 08:53:12 -0700 Subject: [PATCH 30/36] Run test builds using recent Go --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f5e654cce..68f0d8e53 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,7 +5,7 @@ jobs: test: strategy: matrix: - go-version: [1.16.x, 1.17.x] + go-version: [1.18.x, 1.19.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: From 0a48492462b440aa876af8977ddecb8c8b2939d1 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 3 Aug 2022 13:47:17 -0700 Subject: [PATCH 31/36] Remove unused query --- activitypub/persistence/persistence.go | 6 ------ db/db.go | 2 +- db/models.go | 2 +- db/query.sql | 2 -- db/query.sql.go | 13 +------------ 5 files changed, 3 insertions(+), 22 deletions(-) diff --git a/activitypub/persistence/persistence.go b/activitypub/persistence/persistence.go index d375e7d2d..1f631053a 100644 --- a/activitypub/persistence/persistence.go +++ b/activitypub/persistence/persistence.go @@ -277,12 +277,6 @@ func AddToOutbox(iri string, itemData []byte, typeString string, isLiveNotificat return tx.Commit() } -// GetObjectByID will return a string representation of a single object by the ID. -func GetObjectByID(id string) (string, error) { - value, err := _datastore.GetQueries().GetObjectFromOutboxByID(context.Background(), id) - return string(value), err -} - // GetObjectByIRI will return a string representation of a single object by the IRI. func GetObjectByIRI(iri string) (string, bool, time.Time, error) { row, err := _datastore.GetQueries().GetObjectFromOutboxByIRI(context.Background(), iri) diff --git a/db/db.go b/db/db.go index cbb8c9a5d..f30b89ec0 100644 --- a/db/db.go +++ b/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.13.0 +// sqlc v1.14.0 package db diff --git a/db/models.go b/db/models.go index 91d932907..94e23b7d6 100644 --- a/db/models.go +++ b/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.13.0 +// sqlc v1.14.0 package db diff --git a/db/query.sql b/db/query.sql index 6e386f802..4dfe8c6b8 100644 --- a/db/query.sql +++ b/db/query.sql @@ -29,8 +29,6 @@ SELECT iri, inbox, name, username, image, request, request_object, created_at, a -- name: GetOutboxWithOffset :many SELECT value FROM ap_outbox LIMIT $1 OFFSET $2; --- name: GetObjectFromOutboxByID :one -SELECT value FROM ap_outbox WHERE iri = $1; -- name: GetObjectFromOutboxByIRI :one SELECT value, live_notification, created_at FROM ap_outbox WHERE iri = $1; diff --git a/db/query.sql.go b/db/query.sql.go index 00975e9eb..ad4cb81f8 100644 --- a/db/query.sql.go +++ b/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.13.0 +// sqlc v1.14.0 // source: query.sql package db @@ -439,17 +439,6 @@ func (q *Queries) GetNotificationDestinationsForChannel(ctx context.Context, cha return items, nil } -const getObjectFromOutboxByID = `-- name: GetObjectFromOutboxByID :one -SELECT value FROM ap_outbox WHERE iri = $1 -` - -func (q *Queries) GetObjectFromOutboxByID(ctx context.Context, iri string) ([]byte, error) { - row := q.db.QueryRowContext(ctx, getObjectFromOutboxByID, iri) - var value []byte - err := row.Scan(&value) - return value, err -} - const getObjectFromOutboxByIRI = `-- name: GetObjectFromOutboxByIRI :one SELECT value, live_notification, created_at FROM ap_outbox WHERE iri = $1 ` From 2402914000ecc200520048c2ec54fb98a01fb2d2 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 4 Aug 2022 13:55:32 -0700 Subject: [PATCH 32/36] Explicitly set an alpine build version + install tar into build env --- Earthfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Earthfile b/Earthfile index 4a8b846d6..221cd7d92 100644 --- a/Earthfile +++ b/Earthfile @@ -1,6 +1,6 @@ VERSION --new-platform 0.6 -FROM --platform=linux/amd64 alpine:latest +FROM --platform=linux/amd64 alpine:3.15.5 ARG version=develop WORKDIR /build @@ -17,8 +17,10 @@ docker-all: crosscompiler: # This image is missing a few platforms, so we'll add them locally FROM --platform=linux/amd64 bdwyertech/go-crosscompile - RUN curl -sfL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 - RUN curl -sfL "https://musl.cc/i686-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 + RUN apk add --update --no-cache tar gzip >> /dev/null + # RUN curl -sfL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar xf - -C /usr/ --strip-components=1 + RUN curl -fL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" -o armv7l-linux-musleabihf-cross.tgz && tar zxf armv7l-linux-musleabihf-cross.tgz -C /usr/ --strip-components=1 + RUN curl -sfL "https://musl.cc/i686-linux-musl-cross.tgz" | tar xf - -C /usr/ --strip-components=1 RUN curl -sfL "https://musl.cc/x86_64-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 code: @@ -119,7 +121,7 @@ docker: ARG image=ghcr.io/owncast/owncast ARG tag=develop ARG TARGETPLATFORM - FROM --platform=$TARGETPLATFORM alpine:latest + FROM --platform=$TARGETPLATFORM alpine:3.15.5 RUN apk update && apk add --no-cache ffmpeg ffmpeg-libs ca-certificates unzip && update-ca-certificates WORKDIR /app COPY --platform=$TARGETPLATFORM +package/owncast.zip /app From 59fab1b137effbb69386de188e1b4b80afe79fc8 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 4 Aug 2022 14:26:04 -0700 Subject: [PATCH 33/36] Change how musl is downloaded/unarchived --- .github/workflows/docker-nightly.yaml | 4 ++-- Earthfile | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-nightly.yaml b/.github/workflows/docker-nightly.yaml index 171c33491..d825555d9 100644 --- a/.github/workflows/docker-nightly.yaml +++ b/.github/workflows/docker-nightly.yaml @@ -6,7 +6,7 @@ name: Build nightly docker on: workflow_dispatch: schedule: - - cron: '0 2 * * *' + - cron: "0 2 * * *" jobs: Docker: @@ -14,7 +14,7 @@ jobs: steps: - uses: earthly/actions-setup@v1 with: - version: 'latest' # or pin to an specific version, e.g. "v0.6.10" + version: "latest" # or pin to an specific version, e.g. "v0.6.10" - name: Earthly version run: earthly --version diff --git a/Earthfile b/Earthfile index 221cd7d92..cbfb1fef6 100644 --- a/Earthfile +++ b/Earthfile @@ -17,11 +17,11 @@ docker-all: crosscompiler: # This image is missing a few platforms, so we'll add them locally FROM --platform=linux/amd64 bdwyertech/go-crosscompile - RUN apk add --update --no-cache tar gzip >> /dev/null - # RUN curl -sfL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar xf - -C /usr/ --strip-components=1 - RUN curl -fL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" -o armv7l-linux-musleabihf-cross.tgz && tar zxf armv7l-linux-musleabihf-cross.tgz -C /usr/ --strip-components=1 - RUN curl -sfL "https://musl.cc/i686-linux-musl-cross.tgz" | tar xf - -C /usr/ --strip-components=1 - RUN curl -sfL "https://musl.cc/x86_64-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 + RUN apk add --update --no-cache wget tar gzip >> /dev/null + RUN curl https://httpbin.org/get + RUN wget "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" && tar zxf armv7l-linux-musleabihf-cross.tgz -C /usr/ --strip-components=1 + RUN wget "https://musl.cc/i686-linux-musl-cross.tgz" && tar zxf i686-linux-musl-cross.tgz -C /usr/ --strip-components=1 + RUN wget "https://musl.cc/x86_64-linux-musl-cross.tgz" && tar zxf x86_64-linux-musl-cross.tgz -C /usr/ --strip-components=1 code: FROM --platform=linux/amd64 +crosscompiler From c7a35e9d0239562df2017e97c9df84f9d3437728 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 4 Aug 2022 15:18:42 -0700 Subject: [PATCH 34/36] Revert "Change how musl is downloaded/unarchived" as the problem is a Github problem. This reverts commit 59fab1b137effbb69386de188e1b4b80afe79fc8. --- .github/workflows/docker-nightly.yaml | 4 ++-- Earthfile | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-nightly.yaml b/.github/workflows/docker-nightly.yaml index d825555d9..171c33491 100644 --- a/.github/workflows/docker-nightly.yaml +++ b/.github/workflows/docker-nightly.yaml @@ -6,7 +6,7 @@ name: Build nightly docker on: workflow_dispatch: schedule: - - cron: "0 2 * * *" + - cron: '0 2 * * *' jobs: Docker: @@ -14,7 +14,7 @@ jobs: steps: - uses: earthly/actions-setup@v1 with: - version: "latest" # or pin to an specific version, e.g. "v0.6.10" + version: 'latest' # or pin to an specific version, e.g. "v0.6.10" - name: Earthly version run: earthly --version diff --git a/Earthfile b/Earthfile index cbfb1fef6..c5e688b67 100644 --- a/Earthfile +++ b/Earthfile @@ -17,11 +17,11 @@ docker-all: crosscompiler: # This image is missing a few platforms, so we'll add them locally FROM --platform=linux/amd64 bdwyertech/go-crosscompile - RUN apk add --update --no-cache wget tar gzip >> /dev/null - RUN curl https://httpbin.org/get - RUN wget "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" && tar zxf armv7l-linux-musleabihf-cross.tgz -C /usr/ --strip-components=1 - RUN wget "https://musl.cc/i686-linux-musl-cross.tgz" && tar zxf i686-linux-musl-cross.tgz -C /usr/ --strip-components=1 - RUN wget "https://musl.cc/x86_64-linux-musl-cross.tgz" && tar zxf x86_64-linux-musl-cross.tgz -C /usr/ --strip-components=1 + RUN apk add --update --no-cache tar gzip >> /dev/null + # RUN curl -sfL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar xf - -C /usr/ --strip-components=1 + RUN curl -fL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar xf - -C /usr/ --strip-components=1 + RUN curl -sfL "https://musl.cc/i686-linux-musl-cross.tgz" | tar xf - -C /usr/ --strip-components=1 + RUN curl -sfL "https://musl.cc/x86_64-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 code: FROM --platform=linux/amd64 +crosscompiler From 9d45b0edf4de2a97fcb5c563982cb35bd4e9bf97 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 5 Aug 2022 12:18:21 -0700 Subject: [PATCH 35/36] Host our own musl build toolchain --- Earthfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Earthfile b/Earthfile index c5e688b67..06322965c 100644 --- a/Earthfile +++ b/Earthfile @@ -18,10 +18,9 @@ crosscompiler: # This image is missing a few platforms, so we'll add them locally FROM --platform=linux/amd64 bdwyertech/go-crosscompile RUN apk add --update --no-cache tar gzip >> /dev/null - # RUN curl -sfL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar xf - -C /usr/ --strip-components=1 - RUN curl -fL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar xf - -C /usr/ --strip-components=1 - RUN curl -sfL "https://musl.cc/i686-linux-musl-cross.tgz" | tar xf - -C /usr/ --strip-components=1 - RUN curl -sfL "https://musl.cc/x86_64-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 + RUN curl -sfL "https://owncast-infra.nyc3.cdn.digitaloceanspaces.com/build/armv7l-linux-musleabihf-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 + RUN curl -sfL "https://owncast-infra.nyc3.cdn.digitaloceanspaces.com/build/i686-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 + RUN curl -sfL "https://owncast-infra.nyc3.cdn.digitaloceanspaces.com/build/x86_64-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1 code: FROM --platform=linux/amd64 +crosscompiler From fa5b3d338eeed30fba04faf4b9b13e22a886b3ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Aug 2022 11:03:24 +0000 Subject: [PATCH 36/36] Lock file maintenance --- build/javascript/package-lock.json | 42 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/build/javascript/package-lock.json b/build/javascript/package-lock.json index ca27d739c..5bc732d91 100644 --- a/build/javascript/package-lock.json +++ b/build/javascript/package-lock.json @@ -317,14 +317,14 @@ } }, "browserslist": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.2.tgz", - "integrity": "sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", + "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", "requires": { - "caniuse-lite": "^1.0.30001366", - "electron-to-chromium": "^1.4.188", + "caniuse-lite": "^1.0.30001370", + "electron-to-chromium": "^1.4.202", "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.4" + "update-browserslist-db": "^1.0.5" } }, "bytes": { @@ -350,9 +350,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001367", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz", - "integrity": "sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw==" + "version": "1.0.30001374", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001374.tgz", + "integrity": "sha512-mWvzatRx3w+j5wx/mpFN5v5twlPrabG8NqX2c6e45LCpymdoGqNvRkRutFUqpRTXKFQFNQJasvK0YT7suW6/Hw==" }, "chalk": { "version": "4.1.2", @@ -645,9 +645,9 @@ } }, "electron-to-chromium": { - "version": "1.4.192", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.192.tgz", - "integrity": "sha512-8nCXyIQY9An88NXAp+PuPy5h3/w5ZY7Iu2lag65Q0XREprcat5F8gKhoHsBUnQcFuCRnmevpR8yEBYRU3d2HDw==" + "version": "1.4.211", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.211.tgz", + "integrity": "sha512-BZSbMpyFQU0KBJ1JG26XGeFI3i4op+qOYGxftmZXFZoHkhLgsSv4DHDJfl8ogII3hIuzGt51PaZ195OVu0yJ9A==" }, "emoji-regex": { "version": "8.0.0", @@ -895,9 +895,9 @@ } }, "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "requires": { "has": "^1.0.3" } @@ -2076,9 +2076,9 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "update-browserslist-db": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", - "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", + "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -2209,9 +2209,9 @@ } }, "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true } }