mirror of
https://github.com/Xastir/Xastir
synced 2026-08-13 17:46:16 -04:00
The update-xastir script does a git pull, rebootstrap, reconfigure, and build of Xastir with default options. Because it runs configure with no options, it can only work on systems where all libraries are found in directories searched by the C compiler by default, which eliminates some of the most popular Linux distros (many of which put libgeotiff headers in directories not searched by the compiler), and some of those whose default install paths are really nonstandard (such as Macs with Homebrew or Macports). Because it is so narrowly targeted, it mistakenly gives the impression that it's a shortcut to keeping Xastir up to date, whereas it will actually frustrate more users than it helps. It does little more than exactly what we tell users to do by hand, in a less flexible and more verbose manner. As such, it should be removed. I am also removing references to the script in README.sudo. Closes #328
70 lines
2.9 KiB
Text
70 lines
2.9 KiB
Text
SUDO Instructions:
|
|
------------------
|
|
|
|
"sudo" is a command that can make your life much simpler. After you set
|
|
it up that is! By adding a couple of lines to your /etc/sudoers file
|
|
(using the "visudo" command to edit this file), you'll be able to run a few
|
|
commands as root without having to type the root password each time.
|
|
Another thing you can do at that point is automate the entire
|
|
"git pull; mkdir -p build; cd build; ../configure; su; make install"
|
|
process via a script. Here's how to set all of this up:
|
|
|
|
Type "su" to become the root user, then type "visudo". This will bring up
|
|
the "vi" editor on the /etc/sudoers file. If you'd like to learn more
|
|
about what I'm going to describe, type "man sudoers" in another window and
|
|
read about this file. Another man-page that is useful here is the "man
|
|
sudo" page.
|
|
|
|
Back to the editing: There's a section in there for user alias. Mine is
|
|
labeled "# User alias specification". Add a line there that reads like
|
|
this:
|
|
|
|
User_Alias XASTIR = username1, username2, username3
|
|
|
|
where username1, etc, are valid usernames that you wish to be able to do
|
|
Xastir installs. For instance you might have:
|
|
|
|
User_Alias XASTIR = mikey
|
|
|
|
Next, add a line near the bottom that reads like this:
|
|
|
|
XASTIR ALL = NOPASSWD: /bin/chmod, /usr/bin/make
|
|
|
|
Now write out and close the file. At this point the "mikey" user will have
|
|
root permissions when he/she runs the commands "/bin/chmod" or
|
|
"/usr/bin/make". Make sure the paths to those programs are correct for
|
|
your system.
|
|
|
|
Exit from "su" so that you're a regular (non-root) user again.
|
|
|
|
To update xastir when the upstream sources have changed, one need only
|
|
pull the updated source code and rebuild the code. The process is:
|
|
|
|
git pull
|
|
autoreconf -i
|
|
mkdir -p build # actually any new, empty directory will do
|
|
cd build
|
|
../configure [options needed to help configure find dependencies]
|
|
sudo make clean
|
|
sudo make install
|
|
sudo chmod 4755 /usr/local/bin/xastir
|
|
|
|
This is actually overly conservative, as it forces a full rebuild
|
|
of Xastir after each git update. You can keep your build
|
|
directories around and just rerun configure and make in them and
|
|
make will only recompile files that have changed.
|
|
|
|
Windows users: You may need to remove the "sudo" keyword on each line to
|
|
have it work properly for you.
|
|
|
|
A note from Gerry Creager as to another way to set up the sudoers file:
|
|
|
|
"I now consider it a good idea to add the "gifted" users to the 'wheel'
|
|
group and then solely enable wheel in /etc/sudoers; I've seen a recent
|
|
article also supporting this."
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
Copyright (C) 1999 Frank Giannandrea
|
|
Copyright (C) 2000-2026 The Xastir Group
|
|
|