From nobody Wed Jan 15 16:55:02 2025 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1704893908271284.73470304904663; Wed, 10 Jan 2024 05:38:28 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 2D53F1BFD; Wed, 10 Jan 2024 08:38:27 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 649CE1BF7; Wed, 10 Jan 2024 08:31:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 53A0B1AEC; Wed, 10 Jan 2024 08:30:34 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 2068A1BAF for ; Wed, 10 Jan 2024 08:30:31 -0500 (EST) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-pJmvAH_QMz-KojhqmYYolQ-1; Wed, 10 Jan 2024 08:30:29 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1EE123C1E9C5 for ; Wed, 10 Jan 2024 13:30:29 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D78B2026D66 for ; Wed, 10 Jan 2024 13:30:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: pJmvAH_QMz-KojhqmYYolQ-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 2/4] docs: Add redirects configuration for gitlab pages Date: Wed, 10 Jan 2024 14:30:23 +0100 Message-ID: <6f53fe5cc6402f3b42a925c18757df53d8c5e01c.1704892703.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: JYGDAX436SA3TTPRB37VC5WU5EF7BZ75 X-Message-ID-Hash: JYGDAX436SA3TTPRB37VC5WU5EF7BZ75 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1704893908561100001 Adapt the configuration of redirects from the server hosting libvirt.org The redirect to the 'libvirt-console-proxy' Golang module is not adapted as it doesn't exist on the current server. NOTES: - The redirects are currently configured for hosting via the 'gitlab.io/libvirt' URI. For hosting via custom domain it will need to be rewritten to drop the '/libvirt' prefixes. - gitlab pages doesn't currently support redirects to outside content, thus most of the redirects don't actually work: https://gitlab.com/gitlab-org/gitlab-pages/-/issues/601 - The redirects file is only installed in the webpage job but is not actually distributed. - The validity of the redirects can be checked by visiting: https://libvirt.gitlab.io/_redirects Having them installed allows us to validate them before we'll be switching to use gitlab pages completely. Signed-off-by: Peter Krempa --- .gitlab-ci.yml | 1 + docs/.gitlab_redirects | 54 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 docs/.gitlab_redirects diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c7d54c311..1ee945aa0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,6 +130,7 @@ website_prebuilt_env_legacy: after_script: - test "$CI_JOB_STATUS" !=3D "success" && exit 1; - mv install/usr/share/doc/libvirt/html/ public + - cp docs/.gitlab_redirects public/_redirects artifacts: expose_as: 'pages' name: 'pages' diff --git a/docs/.gitlab_redirects b/docs/.gitlab_redirects new file mode 100644 index 0000000000..26e64563ee --- /dev/null +++ b/docs/.gitlab_redirects @@ -0,0 +1,54 @@ +# Redirects to golang module pages +/libvirt/libvirt-go /libvirt-go.html 200 +/libvirt/libvirt-go-xml /libvirt-go-xml.html 200 +/libvirt/go/libvirt /go/libvirt.html 200 +/libvirt/go/libvirtxml /go/libvirtxml.html 200 + +# Redirects to the download server +/libvirt/sources/* https://download.libvirt.org/:splat 301 +/libvirt/ruby/download/* https://download.libvirt.org/ruby/:splat 301 +/libvirt/maven2/* https://download.libvirt.org/maven2/:splat 301 + +# Redirects to subproject pages +/libvirt/ruby/* https://ruby.libvirt.org/:splat 301 +/libvirt/ocaml/* https://ocaml.libvirt.org/:splat 301 +/libvirt/php/* https://php.libvirt.org/:splat 301 +/libvirt/libvirt-appdev-guide-python/en-US/html/* https://libvirt.gitlab.i= o/libvirt-appdev-guide-python/:splat: 301 +/libvirt/java.html https://java.libvirt.org 301 +# Redirect to the proper javadoc directory on the subproject page +/libvirt/sources/java/javadoc/* https://java.libvirt.org/javadoc/:splat 301 + +# Redirects from old gitweb location (see below) +/libvirt/git https://gitlab.com/libvirt/ 301 + +# The above rules are adapted from the following set of 'mod_rewrite' rule= s used +# originally on libvirt.org: +# +# RewriteRule ^/libvirt-go$ /libvirt-go.html [L] +# RewriteRule ^/libvirt-go-xml$ /libvirt-go-xml.html [L] +# RewriteRule ^/go/libvirt$ /go/libvirt.html [L] +# RewriteRule ^/go/libvirtxml$ /go/libvirtxml.html [L] +# RewriteRule ^/sources/(.*) https://download.libvirt.org/$1 [L] +# RewriteRule ^/ruby/download/(.*) https://download.libvirt.org/ruby/$1= [L] +# RewriteRule ^/(maven2/.*) https://download.libvirt.org/$1 [L] +# RewriteRule ^/ocaml/(.*) https://ocaml.libvirt.org/$1 [L] +# RewriteRule ^/ruby/(.*) https://ruby.libvirt.org/$1 [L] +# RewriteRule ^/php/(.*) https://php.libvirt.org/$1 [L] +# RewriteRule ^/java.html https://java.libvirt.org [L] +# RewriteRule ^/docs/libvirt-appdev-guide-python/en-US/html/(.*) https:= //libvirt.gitlab.io/libvirt-appdev-guide-python/$1 [L] +# RewriteRule ^/git https://gitlab.com/libvirt/ [L] +# +# Redirect replacing 'gitweb'. The 'gitweb' interface was originally repl= aced +# by the following redirect condition: +# +# RewriteCond %{QUERY_STRING} p=3D([-a-zA-Z0-9]+).git +# RewriteRule ^/git/$ https://gitlab.com/libvirt/%1 [L] +# +# That unfortunately can't be represented in gitlab redirects as it doesn't +# support redirects based on query strings. Given that the above redirect = broke +# most gitweb links anyways, due to handling only the 'p=3D' argument, git= gitlab +# redirect will break the rest of them. +# +# The following rule was dropped as the page never existed: +# +# RewriteRule ^/libvirt-console-proxy$ /libvirt-console-proxy.html [L] --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org