Hello,
So our team has a Cockpit plugin we use for our server's UI. Since I've setup my new laptop with F36 the method I've been using for a long time to make live changes to the plugin stopped working. Here is what I was doing:
See our code here: https://github.com/389ds/389-ds-base/tree/main/src/cockpit/389-console
Source dir: /home/mareynol/source/ds389/389-ds-base/src/cockpit/389-console
Under here I see:
[mareynol@fedora 389-console]$ ls -l total 612 -rw-r--r--. 1 mareynol mareynol 109 Sep 28 10:32 audit-ci.json -rwxr-xr-x. 1 mareynol mareynol 1119 Sep 30 09:50 buildAndRun.sh drwxr-xr-x. 1 mareynol mareynol 130 Nov 29 13:10 dist drwxr-xr-x. 1 mareynol mareynol 12066 Nov 29 13:10 node_modules -rw-r--r--. 1 mareynol mareynol 232 Sep 28 10:32 node_modules.mk -rw-r--r--. 1 mareynol mareynol 733 Sep 28 10:32 org.port389.cockpit_console.metainfo.xml -rw-r--r--. 1 mareynol mareynol 2209 Nov 28 10:37 package.json -rw-r--r--. 1 mareynol mareynol 589355 Nov 29 12:27 package-lock.json -rw-r--r--. 1 mareynol mareynol 5806 Sep 28 10:32 README.md drwxr-xr-x. 1 mareynol mareynol 356 Nov 28 11:11 src -rw-r--r--. 1 mareynol mareynol 5274 Nov 28 10:37 webpack.config.js
Then I create this directory: ~/.local/share/cockpit/389-console
And create a link to it:
[mareynol@fedora 389-console]$ ln -s $(pwd)/dist ~/.local/share/cockpit/389-console/
[mareynol@fedora 389-console]$ ls -la ~/.local/share/cockpit/389-console/ total 4 drwxr-xr-x. 1 mareynol mareynol 8 Nov 29 13:09 . drwxr-xr-x. 1 mareynol mareynol 22 Nov 29 13:09 .. lrwxrwxrwx. 1 mareynol mareynol 68 Nov 29 13:09 dist -> /home/mareynol/source/ds389/389-ds-base/src/cockpit/389-console/dist
I run our "buildAndRun.sh" script which basically calls: node_modules/webpack/bin/webpack.js --watch
When I log into cockpit as "mareynol" I don't see any of the changes that I have made. This used to work fine, but now it's not working on my new system running Fedora 36. I'm not sure what is missing or what I did wrong. Maybe something changed in Cockpit (cockpit-279-1.fc36) ??
Any help would be appreciated.
Thanks, Mark
Hello Mark,
Mark Reynolds [2022-11-29 13:31 -0500]:
Then I create this directory: ~/.local/share/cockpit/389-console
And create a link to it:
[mareynol@fedora 389-console]$ ln -s $(pwd)/dist ~/.local/share/cockpit/389-console/
This creates a "dist" symlink *inside* the 389-console/ directory, which is a wrong structure:
[mareynol@fedora 389-console]$ ls -la ~/.local/share/cockpit/389-console/ total 4 drwxr-xr-x. 1 mareynol mareynol 8 Nov 29 13:09 . drwxr-xr-x. 1 mareynol mareynol 22 Nov 29 13:09 .. lrwxrwxrwx. 1 mareynol mareynol 68 Nov 29 13:09 dist -> /home/mareynol/source/ds389/389-ds-base/src/cockpit/389-console/dist
What you want is ~/.local/share/cockpit/389-console → /home/mareynol/source/ds389/389-ds-base/src/cockpit/389-console/dist
I.e. do this instead:
rm -r ~/.local/share/cockpit/389-console/ ln -s $(pwd)/dist ~/.local/share/cockpit/389-console
(essentially, drop the trailing slash. That's what your README [0] says as well.
Note that starter-kit has a `make devel-install` rule [1] to do that, which avoids these pitfalls. Your project even has that as well [2], even with the `rm` robustification.
So TL/DR: Run `make devel-install`.
HTH,
Pitti
[0] https://github.com/389ds/389-ds-base/blob/main/src/cockpit/389-console/READM... [1] https://github.com/cockpit-project/starter-kit/blob/main/Makefile#L102 [2] https://github.com/389ds/389-ds-base/blob/main/Makefile.am#L2094
On 11/30/22 1:54 AM, Martin Pitt wrote:
Hello Mark,
Mark Reynolds [2022-11-29 13:31 -0500]:
Then I create this directory: ~/.local/share/cockpit/389-console
And create a link to it:
[mareynol@fedora 389-console]$ ln -s $(pwd)/dist ~/.local/share/cockpit/389-console/
This creates a "dist" symlink *inside* the 389-console/ directory, which is a wrong structure:
[mareynol@fedora 389-console]$ ls -la ~/.local/share/cockpit/389-console/ total 4 drwxr-xr-x. 1 mareynol mareynol 8 Nov 29 13:09 . drwxr-xr-x. 1 mareynol mareynol 22 Nov 29 13:09 .. lrwxrwxrwx. 1 mareynol mareynol 68 Nov 29 13:09 dist -> /home/mareynol/source/ds389/389-ds-base/src/cockpit/389-console/dist
What you want is ~/.local/share/cockpit/389-console → /home/mareynol/source/ds389/389-ds-base/src/cockpit/389-console/dist
I.e. do this instead:
rm -r ~/.local/share/cockpit/389-console/ ln -s $(pwd)/dist ~/.local/share/cockpit/389-console
(essentially, drop the trailing slash. That's what your README [0] says as well.
Hmm my README says to create ~/.local/share/cockpit/389-console This is where things went wrong. I guess when I set it up on my old system I did it correctly. I'll fix our README. Thanks for the help Martin!
Mark
Note that starter-kit has a `make devel-install` rule [1] to do that, which avoids these pitfalls. Your project even has that as well [2], even with the `rm` robustification.
So TL/DR: Run `make devel-install`.
HTH,
Pitti
[0] https://github.com/389ds/389-ds-base/blob/main/src/cockpit/389-console/READM... [1] https://github.com/cockpit-project/starter-kit/blob/main/Makefile#L102 [2] https://github.com/389ds/389-ds-base/blob/main/Makefile.am#L2094 _______________________________________________ cockpit-devel mailing list -- cockpit-devel@lists.fedorahosted.org To unsubscribe send an email to cockpit-devel-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/cockpit-devel@lists.fedorahoste... Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
cockpit-devel@lists.fedorahosted.org