Fedora Server features Cockpit, a web UI for systems administration. Because it’s a common home use case, I want to include a module which handles Samba (Windows-compatible) network shares. There’s a third-party open source module which does this, and @sgallagh and I have done some work in packaging it up. See this bugzilla entry for details.
In order to package this properly, one of our rules is that we shouldn’t bundle bits of minified javascript libraries — see the guidelines on that. But this package includes a file file-sharing-patternfly.css.gz, which clearly violates that.
Now, Cockpit itself uses Patternfly at the higher level. So I’m not sure exactly what this file does. I solved a similar bundling issue with Font Awesome by just removing the bundled version of the font, and it still works. But if I remove this patterfly file, the UI for the File Sharing pane gets messed up. So it’s doing something important.
Can someone who knows web stuff help out here? Getting this set up to test is relatively easy:
Install Fedora Server in a VM (in Boxes or Virt-Manager)
Look at the address displayed on that server’s console and connect to it from the web browser (not from inside the VM — that’s the whole point).
From the Terminal panel in cockpit, sudo dnf install https://fedorapeople.org/~mattdm/packagereview/cockpit-file-sharing-2.4.1-1.fc35.mattdm.noarch.rpm
Reload the Cockpit page, I think, to make File Sharing show up as an option
See how that looks
Back in the Terminal pane, look in /usr/share/cockpit/file-sharing/and find the files installed by the package. Normally one wouldn’t edit those “live”, but since this is a test VM, you can mess around and do whatever you want.
Tell me what I need to change to fix the package so I don’t need to include that file!
If so, is there a better protocol for sharing files over network already? If I remember correctly the only feature why it superior over anything IP based is that it has LAN autodiscovery with short names.
Web developer tools might help. I do not know if it can be automated to record to file.
For CSS files:
$ firefox
open new tab
Tools – Browser Tools - Web Developer Tools # or toggle with shortcut Ctrl+Shift+i
go to “Network” tab ; for reference: in “Console” tab warnings and errors will be printed
Disable Cache # in upper right corner of sub-window; or start private mode window; or clean cache manually
load website
to filter by file type to see only loaded CSS files: switch from [All] to [CSS]
For CSS parts:
steps 1 to 3 from above
go to “Inspector” tab
press Ctrl+Shift+c (or press icon left to Inspector tab); select an item
below “Inspector” tab you will see HTML code; line with selected item is highlighted
to the right of the HTML code you will see the used styles; clicking on “${FILE}:${LINE}” will bring you to the specified location in “Style Editor” tab