diff --git a/conf/app.src b/conf/app.src index 5162bc3..a345dca 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/f0d9bb4898642ca65bde42c8c53d1a4c6dc72e0d.zip -SOURCE_SUM=0788a176da28b52433a19d7144878ad8c2fad3b2893a22aa69285a1f6c356731 +SOURCE_URL=https://github.com/outline/outline/archive/68640860fb9cf584f155348ae06e4536226bef16.zip +SOURCE_SUM=a883915940d3e7889a49240e34d7ed577bd3ca82a306680b87e1fa976d1d5225 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/policy.json b/conf/policy.json new file mode 100644 index 0000000..7ffe219 --- /dev/null +++ b/conf/policy.json @@ -0,0 +1,20 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowPublicRead", + "Effect": "Allow", + "Principal": { + "AWS": [ + "*" + ] + }, + "Action": [ + "s3:GetObject" + ], + "Resource": [ + "arn:aws:s3:::outlinestorage/public/*" + ] + } + ] +} \ No newline at end of file diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index a544695..a08ae4b 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,7 +1,7 @@ ### Not totally free licence Outline is a softwared licenced under [BUSL 1.1 licence](https://spdx.org/licenses/BUSL-1.1.html). ⚠️ That licence **is not totally free**. Please read it very carefully if you have any commercial use in mind. -The Outline version shipped with this package (v0.65.2) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE). +The Outline version shipped with this package (v0.68.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE). ### Known limitations diff --git a/manifest.json b/manifest.json index 7198f84..b9d391c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Wiki and knowledge base for teams", "fr": "Wiki et base de connaissances pour les équipes" }, - "version": "0.67.2~ynh1", + "version": "0.68.0.4~ynh1", "url": "www.getoutline.com", "upstream": { "license": "BUSL-1.1", diff --git a/scripts/_common.sh b/scripts/_common.sh index f507ae3..11978d9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="postgresql" -NODEJS_VERSION=16 +NODEJS_VERSION=18 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index f8b2395..776f05a 100755 --- a/scripts/install +++ b/scripts/install @@ -194,9 +194,12 @@ chown -R $app:www-data "$final_path" #================================================= ynh_script_progression --message="Setting up MinIO bucket for Outline..." --weight=1 +ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" + pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" - ynh_exec_warn_less sudo -u minio ./mc policy set public minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage popd #================================================= @@ -214,14 +217,10 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs - ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=3 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 - ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 + ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1900" yarn build 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 popd diff --git a/scripts/restore b/scripts/restore index 3888fc9..815c140 100755 --- a/scripts/restore +++ b/scripts/restore @@ -122,11 +122,15 @@ chown -R $app:www-data "$final_path" mv "$final_path/outlinestorage" "$mc_path/outlinestorage" chown -R minio:www-data "$mc_path/outlinestorage" + +ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" + pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" - ynh_exec_warn_less sudo -u minio ./mc policy set public minio/outlinestorage - ynh_exec_warn_less sudo -u minio ./mc mirror --a ./outlinestorage/ minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage popd + ynh_secure_remove --file="$mc_path/outlinestorage" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1300fbd..ab266fa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,6 +95,18 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPDATE MINIO BUCKET +#================================================= +ynh_script_progression --message="Updating outlinestorage MinIO bucket access policy..." --weight=1 + +ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" + +pushd "$mc_path" + ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage +popd + #================================================= # NGINX CONFIGURATION #================================================= @@ -123,15 +135,11 @@ ynh_script_progression --message="Building Yarn dependencies... This can be very pushd "$final_path" ynh_use_nodejs - ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=5 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=1 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 - ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=5 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 - ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=5 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=1 + ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 + ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1900" yarn build 2>&1 + ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 popd diff --git a/sources/patches/app-02-email.patch b/sources/patches/app-01-email.patch similarity index 75% rename from sources/patches/app-02-email.patch rename to sources/patches/app-01-email.patch index 475ab66..4ec6e3e 100644 --- a/sources/patches/app-02-email.patch +++ b/sources/patches/app-01-email.patch @@ -1,8 +1,8 @@ diff --git a/server/emails/mailer.tsx b/server/emails/mailer.tsx -index 0d4dea367..5857ccb8a 100644 +index 3584f03b4..c72e6f3fb 100644 --- a/server/emails/mailer.tsx +++ b/server/emails/mailer.tsx -@@ -123,6 +123,7 @@ export class Mailer { +@@ -138,6 +138,7 @@ export class Mailer { : { rejectUnauthorized: false, },