[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Slowdown problem of a Debian package



Hello,

I agree with you.

It seems that the problem is only the permission of the database
directory (/usr/local/var/gtags/sitekeys).

It is very easy for you to change it. It is set at the time of
installation.

[htags/Makefile.am]
+-----------------------------------------------------------
|...
|install-data-hook:
|        dir="$(DESTDIR)$(localstatedir)/gtags/sitekeys"; \
|        if [ ! -d $$dir ]; then \
|                $(MKDIR_P) $$dir; \
|                chmod 755 $$dir; \             <== HERE
|        fi
+-----------------------------------------------------------

To change the permission, please rewrite the 755 into a value
as you like. If needed, I will add new option to the configure
script like:

	./configure --sitekeys-permission=777

If you want to change the value of GNU GLOBAL, would you please
make a suggestion on bug-global@gnu.org?  I'm not going to avoid
arguments. If your system is accepted in the world, I may make it
instead of you.

Thank you for your constructive opinion.
I'm happy if a good conclusion is obtained.

===============================================================
By the way, since the talk became detailed, I will explain the
background briefly to the people who read this thread.
>From now on, only those interested need to read. I will explain
also about the "requires-admin-privilege-to-enable-web-interface".
===============================================================

GLOBAL includes 'htags' command  which generates a hypertext of
a piece of source code. Htags uses CGI scripts if some options
like -f (search form) are specified. By default, htags put the
scripts in the same place with the hypertext.

Some people said that htags should support 'system CGI'. System CGI
means CGI scripts in a system area like '/usr/local/apache2/cgi-bin'.
The --system-cgi option is used for it. It is said that system CGI
is important for system security.

However, in fact, the --system-cgi option is rarely used, because
almost all users use their personal machine, and don't care about
where the CGI script is. Though you can use python interpreter as
a WEB server, it doesn't support system CGI. Though I'm publishing
a hypertext generated by htags on the Internet, I don't use it.
Because I think it is safe without system CGI. The option is for
the people who long system CGI.

Then I also considered a concept: 'Files in system area should be
updated only by admin users'. So, I made the default permission of
the database directory '755'. Of course, root users can change it.
If the directory is writable, htags updates the database directly.

Regards,
Shigio

On Fri, 21 Jun 2013 06:04:43 +0900
Taisuke Yamada <tai@rakugaki.org> wrote:

> Hi.
> 
> I am still an active user of both GNU global and Debian,
> but haven't been tracking recent version for a while.
> 
> From the discussion, it seems the only (technical) resolution
> is to apply a package-local patch to either remove or fix this
> "requires-admin-privilege-to-enable-web-interface" design.
> A patch to replace semi-hardcoded path with some reference
> to $envvar or ~/.conffile would do.
> 
> # As FYI, even after the feature removal, GNU global is still
> # worth using, as it has many other interfaces including
> # integration with GNU Emacs.
> 
> To make it clear, I actually do not like this "sitekey" design or
> above-proposed "fix". IMHO, this design is debatable (and that's
> why I once posted an alternative script - and still using it),
> and the "fix" adds another distro-local complexity which
> confuses newcomers.
> 
> That said, I wish Shigio accepts upstream patch that removes
> requirement of admin privilege - after all, it should be a Good Thing
> if no special privilege is needed to use such a everyday developer tool.
> Not all developers have root on one's working environment, after all.
> 
> But all this is a design decision, and if upstream author rejects
> certain design request, all we can do is to workaround it.
> Actually, this might be a good thing, as with a appropriate fix,
> Debian would be the only distro with a "better" GNU global.
-- 
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


Reply to: