After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750533 - Non root installs fail
Non root installs fail
Status: RESOLVED OBSOLETE
Product: java-atk-wrapper
Classification: Applications
Component: general
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: Magdalen Berns (irc magpie)
java-atk-wrapper maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-07 22:18 UTC by Magdalen Berns (irc magpie)
Modified: 2021-05-17 15:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to address bug (1.62 KB, patch)
2015-06-07 22:21 UTC, Magdalen Berns (irc magpie)
committed Details | Review
patch to fix bug (1007 bytes, patch)
2015-06-14 14:15 UTC, Magdalen Berns (irc magpie)
committed Details | Review
patch to tidy up logic (1.24 KB, patch)
2015-06-23 16:34 UTC, Magdalen Berns (irc magpie)
committed Details | Review
Don't use hard path for HOME install (941 bytes, patch)
2015-07-07 15:59 UTC, Magdalen Berns (irc magpie)
committed Details | Review

Description Magdalen Berns (irc magpie) 2015-06-07 22:18:20 UTC
This bug relates to bug 737124 but has a more straightforward fix.
Comment 1 Magdalen Berns (irc magpie) 2015-06-07 22:21:09 UTC
Created attachment 304737 [details] [review]
patch to address bug
Comment 2 Magdalen Berns (irc magpie) 2015-06-14 14:14:51 UTC
Reopening as although this fixed the bug it introduced a problem for root installs which needs to be addressed
Comment 3 Magdalen Berns (irc magpie) 2015-06-14 14:15:33 UTC
Created attachment 305232 [details] [review]
patch to fix bug
Comment 4 Jose Vilmar Estacio de Souza 2015-06-14 21:00:30 UTC
Maybe I'm wrong, but it seems to me that some files are not being installed properly.

java-atk-wrapper.jar was installed in /root/.local/usr/lib/jvm/java-7-jdk/jre/lib/ext but I think that it should be installed at /usr/lib/jvm/java-7-jdk/jre/lib/ext.
A similar observation to the file accessibility.properties.

Am I doing something wrong?
Comment 5 Magdalen Berns (irc magpie) 2015-06-14 21:10:49 UTC
(In reply to Jose Vilmar Estacio de Souza from comment #4)
> Maybe I'm wrong, but it seems to me that some files are not being installed
> properly.
> 
> java-atk-wrapper.jar was installed in
> /root/.local/usr/lib/jvm/java-7-jdk/jre/lib/ext but I think that it should
> be installed at /usr/lib/jvm/java-7-jdk/jre/lib/ext.
> A similar observation to the file accessibility.properties.
> 
> Am I doing something wrong?

What build commands are you running?
Comment 6 Jose Vilmar Estacio de Souza 2015-06-14 22:06:17 UTC
(In reply to Magdalen Berns (irc magpie) from comment #5)
> (In reply to Jose Vilmar Estacio de Souza from comment #4)

> 
> What build commands are you running?

.//autogen --prefix=/usr
make
sudo make install
Comment 7 Magdalen Berns (irc magpie) 2015-06-14 23:28:38 UTC
(In reply to Jose Vilmar Estacio de Souza from comment #6)
> (In reply to Magdalen Berns (irc magpie) from comment #5)
> > (In reply to Jose Vilmar Estacio de Souza from comment #4)
> 
> > 
> > What build commands are you running?
> 
> .//autogen --prefix=/usr
> make
> sudo make install

Are you logged in as root when you perform this commands?
Comment 8 Jose Vilmar Estacio de Souza 2015-06-15 00:03:05 UTC
(In reply to Magdalen Berns (irc magpie) from comment #7)
 
> Are you logged in as root when you perform this commands?

No, the last command 'make install' was executed using the sudo, but the previous were not.
Comment 9 Magdalen Berns (irc magpie) 2015-06-15 12:02:38 UTC
(In reply to Jose Vilmar Estacio de Souza from comment #8)
> (In reply to Magdalen Berns (irc magpie) from comment #7)
>  
> > Are you logged in as root when you perform this commands?
> 
> No, the last command 'make install' was executed using the sudo, but the
> previous were not.

OK thanks for the info.

If you're running make as sudo then running sudo ./autogen.sh --prefix=/usr should get things installed in the right way for a root install.
Comment 10 Jose Vilmar Estacio de Souza 2015-06-15 12:39:37 UTC
(In reply to Magdalen Berns (irc magpie) from comment #9)
> 
> OK thanks for the info.
> 
> If you're running make as sudo then running sudo ./autogen.sh --prefix=/usr
> should get things installed in the right way for a root install.

Ok, works fine.
sudo ./autogen.sh --prefix=/usr
sudo make
sudo make install

Seems that the files were installed correctly.
In my opinion, only 'make install' should be executed as root.
Comment 11 Magdalen Berns (irc magpie) 2015-06-15 14:32:56 UTC
(In reply to Jose Vilmar Estacio de Souza from comment #10)
> (In reply to Magdalen Berns (irc magpie) from comment #9)
> > 
> > OK thanks for the info.
> > 
> > If you're running make as sudo then running sudo ./autogen.sh --prefix=/usr
> > should get things installed in the right way for a root install.
> 
> Ok, works fine.

Thanks for getting back to me about this.

> sudo ./autogen.sh --prefix=/usr
> sudo make
> sudo make install
> 
> Seems that the files were installed correctly.

I have set it up this way to avoid the non-root install failure triggered when trying to write properties and jar files to system java directories which don't provide permission for ordinary users.

A similar issue affects 'make distcheck' too (see bug 737124)

> In my opinion, only 'make install' should be executed as root.

Off hand, I can't think of a reason for that and it seems like something that could be awkward to implement for the aforementioned reasons but I want to keep an open mind: Do you have a compelling reference on this which could persuade me that setting things up that way could improve the wrapper in some way?
Comment 12 Jose Vilmar Estacio de Souza 2015-06-15 18:48:09 UTC
(In reply to Magdalen Berns (irc magpie) from comment #11)
> > In my opinion, only 'make install' should be executed as root.
> 
> Off hand, I can't think of a reason for that and it seems like something
> that could be awkward to implement for the aforementioned reasons but I want
> to keep an open mind: Do you have a compelling reference on this which could
> persuade me that setting things up that way could improve the wrapper in
> some way?

No, I have no strong argument, just that I do not like to run commands as sudo.
Comment 13 Magdalen Berns (irc magpie) 2015-06-18 14:31:11 UTC
(In reply to Jose Vilmar Estacio de Souza from comment #12)
> (In reply to Magdalen Berns (irc magpie) from comment #11)
> > > In my opinion, only 'make install' should be executed as root.
> > 
> > Off hand, I can't think of a reason for that and it seems like something
> > that could be awkward to implement for the aforementioned reasons but I want
> > to keep an open mind: Do you have a compelling reference on this which could
> > persuade me that setting things up that way could improve the wrapper in
> > some way?
> 
> No, I have no strong argument, just that I do not like to run commands as
> sudo.

Why run sudo make install in this case?

If you want to do a non-root install dropping the "sudo" command from the "make install" command should allow you to do this without the build breaking once you have cleaned up your previous install.
Comment 14 Magdalen Berns (irc magpie) 2015-06-23 16:34:05 UTC
Created attachment 305935 [details] [review]
patch to tidy up logic
Comment 15 Magdalen Berns (irc magpie) 2015-07-07 15:59:20 UTC
Created attachment 307018 [details] [review]
Don't use hard path for HOME install

I've arbitrarily decided on $(HOME)/.local/share/java-atk-wrapper for home installs and this is not ideal.

Given that it's not possible for a non root user to install jars and property files into the $JAVA_HOME directory and java does not search the /usr/local sub directory paths by default, it seems to make more sense to either make the user set JAVA_HOME for non-root installs or at least avoid hard coding paths in this way. - I think it makes sense to go with  the latter for at least until I can think of a better way of getting around the annoyingness...
Comment 16 GNOME Infrastructure Team 2021-05-17 15:40:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/java-atk-wrapper/-/issues/14.