On Thu, Sep 09, 2021 at 07:41:19AM -0600, Theo de Raadt wrote:
> 
> Stuart Henderson <s...@spacehopper.org> wrote:
> 
> > On 2021/09/09 16:45, Kevin Lo wrote:
> > > On Thu, Sep 09, 2021 at 07:05:26AM +0000, Yifei Zhan wrote:
> > > > 
> > > > On 21/09/09 02:35PM, Kevin Lo wrote:
> > > > >
> > > > > This has been discussed before:
> > > > > https://marc.info/?t=157811343800002&r=1&w=2
> > > > 
> > > > Is there an unified path list for IME that I'm not aware of? I've read 
> > > > that thread before but it doesn't mention chromium and I still have to 
> > > > add that path manually here.
> > > 
> > > I'd prefer not to add IMEs to unveil.main.  It would be useful to mention 
> > > how
> > > to enable IMEs in firefox/chromium readme, thanks.
> > > 
> > 
> > Having users add to unveil.XX files on their own system is a problem.
> > If done, and unveil.XX is later updated in the port (say, to add a new
> > path required by the browser or some library it uses), when the user
> > runs pkg_add -u, the new paths *won't* be merged automatically.
> > 
> > Maybe something can be done to unify the paths for IMEs but that will
> > take time; for now I would recommend that where people are experiencing
> > a problem, we add those paths to the browser ports..
> 
> These two programs (chrome and firefox) that have their unveil and pledge
> configurations in /etc are special.  During pledge development in chrome,
> I proposed this approach to robert -- to save him build time.  This mechanism
> was proposed as a convenience to the developer.
> 
> Maybe robert should go back to hard-coding the lists inside the program.
> 
> Let me be firm.  The files are owned by root.  They are part of the
> system.  They are delivered by pkg_add.  pkg_add should continue to
> smash them when upgrades happen.
> 
> These files do NOT belong to the user.
> 
> If someone edits them, they are on your own.

When I used fcitx-chewing, I also needed to add the line "~/.chewing r" 
to unveil.main for both firefox and chromium in order to make it work.
It seems that there's no need to add that anymore.
The diff below enables fcitx input method by expending unveiled directories.
ok?

Index: www/chromium/files/unveil.main
===================================================================
RCS file: /cvs/ports/www/chromium/files/unveil.main,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 unveil.main
--- www/chromium/files/unveil.main      6 Jan 2020 16:05:06 -0000       1.8
+++ www/chromium/files/unveil.main      10 Sep 2021 05:21:59 -0000
@@ -61,6 +61,7 @@
 
 ~/.config/chromium rwc
 ~/.config/dconf r
+~/.config/fcitx r
 ~/.config/fontconfig r
 ~/.config/gtk-3.0 r
 ~/.config/mimeapps.list r
Index: www/mozilla-firefox/files/unveil.main
===================================================================
RCS file: /cvs/ports/www/mozilla-firefox/files/unveil.main,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 unveil.main
--- www/mozilla-firefox/files/unveil.main       13 Jul 2021 15:25:30 -0000      
1.10
+++ www/mozilla-firefox/files/unveil.main       10 Sep 2021 05:21:59 -0000
@@ -56,6 +56,7 @@ $XDG_RUNTIME_DIR/dconf rwc
 $XDG_CACHE_HOME/thumbnails rwc
 $XDG_CACHE_HOME/mozilla/firefox rwc
 $XDG_CONFIG_HOME/dconf rw
+$XDG_CONFIG_HOME/fcitx r
 $XDG_CONFIG_HOME/fontconfig r
 $XDG_CONFIG_HOME/gtk-3.0 r
 $XDG_CONFIG_HOME/mimeapps.list r

Reply via email to