Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for building qubes-os.org website locally on Fedora 38/39/40 #237

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

UndeadDevel
Copy link

@UndeadDevel UndeadDevel commented Nov 13, 2023

The currently presented solution does not work without additional measures taken, and even then either works badly, requiring a download of different components every time the VM starts and has inconsistent results, or requires installing Ruby in addition to podman and podman-compose.

But if we're already installing Ruby to fix issues with the main solution, why not just use Ruby as the main solution? I've tested this and it works reliably, with better performance than the podman solution, without requiring podman or podman-compose, which pull far more dependencies than Ruby does (e.g. ~250 MB vs. ~30 MB additional installed size on a standard qubes Fedora template), and seems more robust.

To sum up:

  • provides a working solution for users right now (podman solution does not work on fresh fedora-38 template)
  • takes up an order of magnitude less space in the template
  • has better performance
  • doesn't require sudo when launching the server (of interest for those who use VM hardening measures)
  • is actually offline; once set up does not require downloading files to run the server
  • uses readily available packages from the standard repos (while all gems are installed in the AppVM)

Add missing gem
After much trial and error with the currently presented solution, which does not work without additional measures, and even then either works badly, requiring a download of different components every time the VM starts and has inconsistent results, or requires installing Ruby anyway.

But if we're already installing Ruby to fix issues with the main solution, why not just use Ruby as the main solution? I've tested this and it works reliably, with better performance than the podman solution, doesn't require podman and podman-compose, which pull far more dependencies on a standard qubes Fedora template than Ruby does (e.g. ~250 MB vs. ~30 MB additional installed size), and seems more robust.

If anything, this PR should be accepted so that new users trying to get the offline web page to work don't have to experiment and research for 5 hours like I did to first discover the issues, diagnose them and then get a working solution; the fact that the main solution presented right now does not even mention the issues is unacceptable.
@UndeadDevel
Copy link
Author

If so desired I could also add this to the Makefile, e.g. similarly to the solution in #207

all:
	podman-compose up

clean:
	$(RM) -r _site

rootless:
	jekyll serve

.PHONY: all clean rootless

The user can then either call sudo make with the existing solution or make rootless with this solution.

Let me know if that is preferred.

@UndeadDevel UndeadDevel changed the title Provide new solution for local builds Add instructions for new solution Nov 14, 2023
@UndeadDevel UndeadDevel changed the title Add instructions for new solution Add new solution which works now on Fedora 38 Nov 14, 2023
@marmarek
Copy link
Member

Adding an entry to the makefile is a good idea, maybe even for the setup step too, like rootless-setup target?

Add rootless and rootless-setup targets
reflect changes to Makefile
@UndeadDevel
Copy link
Author

Adding an entry to the makefile is a good idea, maybe even for the setup step too, like rootless-setup target?

Done. Tested on updated Fedora-38-based AppVM and StandaloneVM.

Adds instructions for Debian-based qubes and updates message about which qubes this was tested on (namely all major templates of Qubes 4.2).
search more specifically in .local to avoid problems
@UndeadDevel
Copy link
Author

@marmarek I've now tested this on fresh templates of fedora-38, fedora-38-xfce, debian-12 and debian-12-xfce on Qubes 4.2rc5 and updated the instructions accordingly (they didn't change for fedora, but debian needed some adjustment). I think it's good to go.

@UndeadDevel
Copy link
Author

Okay I've now retested this with fedora-39 and fedora-39-xfce templates on QubesOS 4.2 as well. Results:

As expected, the podman solution, which is still the only solution advertised on the README page doesn't work with the new Fedora-39 templates, which means the only official solution doesn't work with any of the officially supported templates (I've tested all the others last year).

The solution of this PR, however, works flawlessly. I also signed with my own PGP key now instead of the GitHub one. Please merge. Test failure is not due to this PR:

For the Links > Internal check, the following failures were found:
* At ./_site/doc/device-handling-security/index.html:424:
  internally linking to /news/2018/09/11/qubes-ctap-proxy/, which does not exist
* At ./_site/news/2018/09/11/qubes-u2f-proxy/index.html:364:
  internally linking to /attachment/doc/u2f.svg, which does not exist
HTML-Proofer found 2 failures!
Some checked failed. See above.
+ all_ok=false
+ false
+ echo 'Some checked failed. See above.'
+ exit 1

@UndeadDevel
Copy link
Author

UndeadDevel commented Apr 17, 2024

PipelineRefresh

Hmm...doesn't work; I was trying to make it run the integration tests again...looks like I was using the wrong keyword.

Is the failed test the problem or is there another reason why this is still not merged? I've tested it on all standard QubesOS templates successfully and it's kind of embarrassing that the official solution on the landing page of this repo hasn't worked for years...I can't be the only one who wasted hours trying to get it to work.

@UndeadDevel
Copy link
Author

PipelineRetry

1 similar comment
@marmarek
Copy link
Member

PipelineRetry

@marmarek
Copy link
Member

Hmm...doesn't work

There is an access list who can issue commands...

@UndeadDevel
Copy link
Author

There is an access list who can issue commands...

I suspected...well the failure is the same as in all the other doc PRs (not due to this PR):

For the Links > Internal check, the following failures were found:
* At ./_site/doc/device-handling-security/index.html:424:
  internally linking to /news/2018/09/11/qubes-ctap-proxy/, which does not exist
* At ./_site/news/2018/09/11/qubes-u2f-proxy/index.html:364:
  internally linking to /attachment/doc/u2f.svg, which does not exist
HTML-Proofer found 2 failures!

@unman
Copy link
Member

unman commented Apr 18, 2024 via email

@UndeadDevel
Copy link
Author

UndeadDevel commented Apr 18, 2024

Fixed both of these errors

Nice! It might be worth running PipelineRetry on all the PRs with integration check failed status in qubes-doc, as most are sitting there waiting for review, so there likely won't be more commits to trigger a new check.

Add info about fedora-40 templates successfully tested.
@UndeadDevel
Copy link
Author

Tested both fedora-40 and fedora-40-xfce now and both work perfectly well with this solution; updated the README.md to reflect that.

Since this is probably now the most thoroughly tested PR in this repo and the first templates I tested (fedora-38 ones) are now EOL, thus making that effort a total waste, and no reason has been given why this is not getting merged, the latest Fedora templates will be the last I'll have tested for this PR.

@UndeadDevel UndeadDevel changed the title Add new solution which works now on Fedora 38 Add new solution which works now on Fedora 38/39/40 and Debian 12 (both for GNOME and Xfce variants) May 19, 2024
@parulin
Copy link

parulin commented Jun 14, 2024

I tried to follow the instructions of the main branch on Debian 12 and it failed, following this PR helped me.

I don't know if it's relevant (because I didn't try exactly theses rootless instructions in the first place) but I got this error:

You have already activated jekyll-sass-converter 3.0.0, but your Gemfile requires jekyll-sass-converter 1.5.2.
Prepending bundle exec to your command may solve this. (Gem::LoadError)

Replacing jekyll serve by bundle exec jekyll serve works for me.

Copy link
Member

@marmarek marmarek left a comment

Choose a reason for hiding this comment

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Approved as of f0ad5c73070e5141a94bc5bb2f53e7481bb2ea9f
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEnYWYU8Ll1fIX9iss8yiUvpaEk4oFAmZuQn8ACgkQ8yiUvpaE
k4q03xAAnBNaphhqW/5s+sBDY2NjjUrvWV1D8lgn4d7p92xp/70U2GSRlVkTx6z6
peuO4DOtcNV2FVdE1ovOjLcLCoJXaph4qtEGoqS7dvpcajjalW47zVscD78bwc0u
1cej1I0IOl/puS+MzNBxc8BYb7Rhe+LUELx0J8mtlsBEZ1pCbT5MBPwvPCIX1Hr1
m1IzkXH7EULQS/fy6JpqZp5A9nZDWjBYxm2WPN9drKCx64UJaxWMFMBkskCcfVGr
wFO7URJi8KazD9y9RlWCeQJuL07GEbFvv5KOWAn92xt5eXLJYxoUANPKkUfa0NYO
wUxeP/OApWJVaik1b5WTtX8pHi16yNBdFPqWwUVVNPaEI0Ts/MikdPt3Llj94XUe
XR319j9Ce48n7TwPeOr45a6f0ZfCYm48OfHrJR3BV/N7tVkdu2PbbFNMZfTwBleY
NbQvlwXvWppnaVVgUsMb4E/CHWtZwGldWRtbSeqm0n6aByd78neTl6KJVPkGC7+t
/rZldjBcZSKDjBDZYt8hDEwRLUaeqqs8N8E7Qn0H6+5K/R7UAnYpblSSpsCqy/3L
onPVsOvSHdzvmIYaR5XH9i9Ub1hzxEW8U+qAprJEAKF+1igp5sjoAa4Ur3XtVeKa
kr8JxovJRghhAdObJdAKnlc7bVce/qI1+IYl0r+4qqG+B6M/UEs=
=LPtk
-----END PGP SIGNATURE-----

@andrewdavidwong andrewdavidwong changed the title Add new solution which works now on Fedora 38/39/40 and Debian 12 (both for GNOME and Xfce variants) Solution for building qubes-os.org website locally on Fedora 38/39/40 Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants