Description
Jim D.
2019-08-13 21:18:37 UTC
Hmm - spoke too soon about installing gnome-terminal not requiring more non-mate programs. Looking further down the gnome-terminal Makefile I now see: gnome-shell:x11/gnome-shell and mention of nautilus. Suggestions a) and b) offered earlier would seem to be better so as to not "contaminate" a mate-only installation with more "gnome" applications. Hmmm - can't find the reference to "stage/usr/local....." so just the usr/ports/security/secpanel/work/usr/local...." reference is relevant (as it is a subdirectory of "secpanel/work"). One could also apply a 'diff -c' patch to the installed "/usr/local/share/secpanel/termdefs.txt" file, but this is then a user function rather than a port Makefile option. (In reply to Jim D. from comment #1) I don't really understand what happens. Does gnome-terminal not install or not start? Please Post the exact error-message. It is not a problem of gnome-terminal failing to be installed. The issue is that secpanel's default configuration specifically uses "gnome-terminal" as its runtime option. I do not have the Gnome desktop installed - I have the Mate desktop installed. Hence - "gnome-terminal" is not installed. This makes secpanel unusable as it attempts to invoke "gnome-terminal" which doesn't exist. By changing the secpanel default terminal definition to "mate-terminal", I can now get the full secpanel functionality without the Gnome desktop. The suggestions offered were to modify the Makefile to provide a port installer the option of which terminal application to define for secpanel to use. Created attachment 206687 [details]
svn-diff-secpanel
You mean something like that?
Created attachment 206688 [details]
svn-diff-secpanel_v2
Was a typo in.
Created attachment 206689 [details]
svn-diff-secpanel_v3
Yes - v3 looks good and provides for either/both gnome-terminal and mate-terminal. Thanks. Will that also change the 'work/usr/local/lib/secpanel/termdefs.txt:set termtype(GNOME-Terminal_path) "gnome-terminal"' definition? For Mate it's just replacing "gnome-terminal" with "mate-terminal". Of course, one could be more explicit and also replace "GNOME-Terminal_path" but that would probably force other changes. It is the later part that is important as it is the system command that gets executed. I don't know if adding xterm would be useful or not. Created attachment 206726 [details]
svn-diff-nspr_v4
You have to test by yourself. Secpanel does not start on my system.
Patches are good. Looking at results... Am in the middle of massive local ports updates and numereous issues. Will get back to you when able to. Have found some things in the runtime script to look at. Now that I have TK and TCL reinstalled, there is one change needed in file patch (case change): set termtype(Mate-Terminal_...).. => set termtype(MATE-Terminal_...) .. Application works with patches and local modifications. Still need to do more testing from application removal to application installation as there seems to be some differences in the "config" file that gets created versus what I had after making simple "Gnome" => "Mate" change in the "<home>.secpanel/config" file. By default, the inital "config" file has only 2 lines whereas my "in-use config" file has 20 lines. FWIW - I also modified the 'set termtype(MATE...path) "mate-terminal"' to include a geometry paramater " --geometry=97x26". Don't know of an easy way to provide another Makefile option to select a "default terminal window size". May be able to specify a mate-terminal profile as defined by user (profile/General "Use custom default terminal size") using the mate-terminal "--profile=" parameter rather than raw geometry parameter. P.S. I use this application A LOT and it is VERY HANDY. I only have 15 entries ("secpanel profiles") but it saves me a lot of work opening up multiple, concurent, SSH sessions which I use just about every day for my own PHP/Apache development). Created attachment 206813 [details]
svn-diff-secpanel_v5
Change set termtype math-terminal to MATE-terminal.
Created attachment 206821 [details]
svn-diff-secpanel_v6
v5 was the wrong change.
Created attachment 206912 [details]
Modified "~/.secpanel/config" file with many more definitions than the default
I don't remember how this modified user secpanel config file was created, but then - I have been using secpanel for quite a few years. Nevertheless, the necessary "browserbin" entry is there. The current version of Secpanel does not create this modified config file. It may be that an earlier version of the Secpanel application or an earlier version of a FBSD Secpanel port may have created it.
Note that the "termver" was changed manually by me where it was "GNOME-Terminal" before.
There is still something "wrong" about the implementation of secpanel. Once installed, it uses a default user configuration file that has only two lines in it which do not define any terminal or browser application. When attempting to execute "secpanel" from icon - nothing appears to happen. When executing the "/usr/local/bin/secpanel" script manually, it fails:
Error in startup script: can't read "configs(browserbin)": no such element in array
while executing
"$widget([set f]ent) insert 0 "$configs([set f]bin)""
(procedure "main" line 11)
invoked from within
"main $argc $argv"
(file "/usr/local/bin/secpanel" line 2567)
The element being searched for does not exist within the application "default.config" file.
Yet, when I copy over my previous user "config" file (see attachment 206912 [details]), everything works just fine. So SOMEthing, SOMEwhere, created the modified user config file. I know that _I_ didn't create the entire thing on my own.
I have looked long at the Secpanel TCL scripts and can't find any resolution to this issue. I also don't understand one TCL "foreach" statement that has an odd number of values used to assign to two loop variables, manages to work.
Something within TCL/TK-land must have generated the user config file that I have, but I cannot see what or where.
It may be simplest just to supply two "sample" config files, without the "wins" statements, for the two major terminal emulators: gnome-terminal and mate-terminal. I will test some variations on this and report back.
Created attachment 206913 [details]
Builtin requirement for TCL/TK version
The Makefile for Secpanel port might need another REQUIRES statement for TCL/TK version.
Created attachment 206914 [details]
Add one value to secpanel "initconfigs proc" to make secpanel initialization work
Found out how to use the TCL "puts" command and "traced" the Secpanel "initconfigs" proc with just the default "config" file. Adding "thunar" following the "Thunar" value entry solves the problem of an unbalanced "value list". This the allows Secpanel to create a modified user "config" file that allows the application to work.
Only major change left: get Makefle "do-install" block to (sed) modify the "secpanel" TCL script in its "initconfigs" proc to replace "Xterm" with the makefile selected terminal type (eg; "GNOME-Terminal" or "MATE-Terminal"). Created attachment 206916 [details]
svn-diff-secpanel_v7
(In reply to Jim D. from comment #16) Why? Created attachment 206917 [details]
svn-diff-secpanel_v8
Added most of the desired changes to default.config. But renamed it to default.config.sample (maybe, we also need a pkg-message for that).
Created attachment 206918 [details]
svn-diff-secpanel_v9
Forgot to svn add the patch-default.config.
In the meantime secpanel also starts on my system.
Assignee was wrong, sorry. (In reply to Walter Schwarzenfeld from comment #20) If the port Makefile doesn't specify minimum TCL/TK required for Secpanel and someone tries to run an installed Secpanel under TCL/TK < 8.0, they will get a warning message. That is OK as it would inform the user that they need to install a suitable version of TCL/TK. I just thought that if the TCL/TK minimum version check was in the Makefile, then a user will know up front (sooner, quicker?) that they will require a newer version of TCL/TK. Not having a version check within the Makefile doesn't affect the port installation as there is no code assembly/compilation performed. Having the TCL/TK version check in the Makefile would then be "convenience" addition. Comment on attachment 206918 [details]
svn-diff-secpanel_v9
Looks good.
How about adding similar changes for gnome-|GNOME-terminal since that is another popular choice and was the application default?
Created attachment 206934 [details]
Secpanel Configurations panel - were app default values may be changed
(In reply to Walter Schwarzenfeld from comment #21) Yes - a "pkg-message" might be helpful. A user might then able to create a "Secpanel default config" file that would better suit their environment, or use the "pre-filled-in sample config" file to start with (ie; copy/rename the "sample" file to the "default.config" file). Also, if the running Secpanel does not pick up different local applications (ie; they don't appear in the Configurations panel drop-down selectors see attachment image of Configurations panel), then a user can modify their "<home>.secpanel/ config" file with the appropriate values. Much easier than trying to modify the TCL script to provide more options and recreate the user "config" file. It would might be helpful to include a brief comment about this as well. It is frustrating to install an application (port) and then it doesn't work. All of this should help to eliminate that problem. (In reply to Jim D. from comment #25) What you mean with similar changes? Created attachment 206935 [details]
svn-diff-secpanel_v10
Created attachment 206936 [details]
svn-diff-secpanel_v11
Change the text of the pkg-message.
Created attachment 206937 [details]
svn-diff-secpanel_v12
Attached wrong version.
Comment on attachment 206937 [details]
svn-diff-secpanel_v12
"Similar changes": duplicate Makefile "do-install" changes for "MATE-TERMINAL" using "GNOME-TERMINAL".
Other note: shouldn't "set termtype(Mate...)..." be "set termtype(MATE...)..."?
Created attachment 206949 [details]
svn-diff-secpanel_v13
Final version.
Comment on attachment 206949 [details]
svn-diff-secpanel_v13
Umm - shouldn't "set termtype(Mate..." be "set termtype(MATE..." , or am I wrong?
Created attachment 206974 [details]
svn-diff-secpanel_v14
Ok.
Comment on attachment 206974 [details]
svn-diff-secpanel_v14
Looks good.
A commit references this bug: Author: pi Date: Thu Aug 29 10:21:50 UTC 2019 New revision: 510151 URL: https://svnweb.freebsd.org/changeset/ports/510151 Log: security/secpanel: fix the mate-only case PR: 239832 Submitted by: Walter Schwarzenfeld <w.schwarzenfeld@utanet.at> Reported by: Jim D. <radicleparticles@gmail.com> Changes: head/security/secpanel/Makefile head/security/secpanel/files/patch-bin_secpanel head/security/secpanel/files/patch-default.config head/security/secpanel/files/patch-lib_secpanel_termdefs.txt head/security/secpanel/files/pkg-message.in head/security/secpanel/pkg-plist Committed, thanks. |