[GRASS5] GRASS packaging issues

Hi,

during preparation of a GRASS rpm package, two issues
occured:

- is there a reason why manual confirmation is requested
  when building as root? It is not unusual to be root
  when creating a rpm package.

- the installation routine copies several CVS directories.

Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Mon, May 07, 2001 at 12:14:29PM +0200, Jan-Oliver Wagner wrote:

Hi,

during preparation of a GRASS rpm package, two issues
occured:

- is there a reason why manual confirmation is requested
  when building as root? It is not unusual to be root
  when creating a rpm package.

Justin will be able to answer this (Wednesday).

- the installation routine copies several CVS directories.

Do you think of "grass5install.sh"? It anything else?
Within GRASS' Gmakefiles there are various "tar" calls, unfortunately
the "exclude" parameter of tar is not portable.

Just my 0.02 Euro

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Mon, May 07, 2001 at 12:31:01PM +0100, Markus Neteler wrote:

On Mon, May 07, 2001 at 12:14:29PM +0200, Jan-Oliver Wagner wrote:
> - the installation routine copies several CVS directories.
Do you think of "grass5install.sh"? It anything else?
Within GRASS' Gmakefiles there are various "tar" calls, unfortunately
the "exclude" parameter of tar is not portable.

the copying of CVS directories happens when executing 'make install'.
IMO, if tar can't do the job cross-plattform it should be replaced
by alternative methods to install. AFAIK it is unusual to use
tar for installing anyway.

Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Jan

Jan-Oliver Wagner wrote:

Hi,

during preparation of a GRASS rpm package, two issues
occured:

- is there a reason why manual confirmation is requested
        when building as root? It is not unusual to be root
        when creating a rpm package.

The reason confirmation is requested is due to UNIX system
administration practices. In general, you should never do anything as
root that you do not have to. The potential for damaging your system
unintentionally is not worth it.

Even though compiling is generally safer than installation, it is still
good practice not to compile as root. So, I put the confirmation step in
to warn people not familiar with this practice and/or UNIX that what
they are doing could be dangerous.

Do you actually need root access to create an rpm? I never created one
so I don't know. If not, then I would suggest not creating it as root.
But if you need root access then you can bypass the confirmation by
typing

make real-binaries

However, this bypass may not work with the new Makefile system, since I
think we could get rid of the real* targets using GNU Make. So, if
people want the confirmation removed, then I will remove it.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Jan

Jan-Oliver Wagner wrote:

On Mon, May 07, 2001 at 12:31:01PM +0100, Markus Neteler wrote:
> On Mon, May 07, 2001 at 12:14:29PM +0200, Jan-Oliver Wagner wrote:
> > - the installation routine copies several CVS directories.
> Do you think of "grass5install.sh"? It anything else?
> Within GRASS' Gmakefiles there are various "tar" calls,
> unfortunately the "exclude" parameter of tar is not portable.

the copying of CVS directories happens when executing 'make install'.
IMO, if tar can't do the job cross-plattform it should be replaced
by alternative methods to install. AFAIK it is unusual to use
tar for installing anyway.

The reason tar is used is because we link everything to the front-end
module and cp was copying the executable not the link, increasing the
size of the distribution significantly. However, cp would also take the
CVS directories so that is not a good solution.

An alternative method is to generate lists of files to be copied. This
is useful, not only as solving the CVS directory problem but also
ensuring that install and uninstall do not touch any file it is not
supposed to (possible now since we use rm -rf and * to remove files). I
did not have time to implement this method when I rewrote the Makefile
but I was planning on including it in the new Makefile system.

If you want, I can write a script to remove all CVS directories but I
don't think this should go into CVS since someone could inadvertently
destroy their CVS tree.

Please let me know if you want the script.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Justin,

On Wed, May 09, 2001 at 02:58:59PM +0700, Justin Hickey wrote:

Jan-Oliver Wagner wrote:
> during preparation of a GRASS rpm package, two issues
> occured:
>
> - is there a reason why manual confirmation is requested
> when building as root? It is not unusual to be root
> when creating a rpm package.

The reason confirmation is requested is due to UNIX system
administration practices. In general, you should never do anything as
root that you do not have to. The potential for damaging your system
unintentionally is not worth it.

Even though compiling is generally safer than installation, it is still
good practice not to compile as root. So, I put the confirmation step in
to warn people not familiar with this practice and/or UNIX that what
they are doing could be dangerous.

Do you actually need root access to create an rpm? I never created one
so I don't know. If not, then I would suggest not creating it as root.
But if you need root access then you can bypass the confirmation by
typing

make real-binaries

However, this bypass may not work with the new Makefile system, since I
think we could get rid of the real* targets using GNU Make. So, if
people want the confirmation removed, then I will remove it.

I think this confirmation is reasoned by GRASS history, because
once there was only one make install step that also built the
binaries.

If it is intended to furnish GRASS with the usual autoconf/automake/...
type of building some day, the root-confirmation would be quite unusual.

I bypassed with 'echo "y" | make' which should work always :slight_smile:

I vote for removing the confirmation, but I don't have a problem if it
stays.

Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Justin,

On Wed, May 09, 2001 at 03:17:48PM +0700, Justin Hickey wrote:

The reason tar is used is because we link everything to the front-end
module and cp was copying the executable not the link, increasing the
size of the distribution significantly. However, cp would also take the
CVS directories so that is not a good solution.

An alternative method is to generate lists of files to be copied. This
is useful, not only as solving the CVS directory problem but also
ensuring that install and uninstall do not touch any file it is not
supposed to (possible now since we use rm -rf and * to remove files). I
did not have time to implement this method when I rewrote the Makefile
but I was planning on including it in the new Makefile system.

If you want, I can write a script to remove all CVS directories but I
don't think this should go into CVS since someone could inadvertently
destroy their CVS tree.

Please let me know if you want the script.

it is not necessary.

tar can exclude files (-X). A list could be prepare with find,
but I am not sure whether all this is working the same on the many
platforms GRASS is compatible to.

Please consider low priority of this problem.

Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Jan-Oliver,

With my rpm spec file i solved this with echo y> make.

The second one may be from the broken tar on Solaris and IRIX, which
bail out with the exclusion option. I don't know if it is ok with others
to use always GNU tar. I can not see that it will be reasonable to use
bsd like install to install grass. The big number of files will slow
down grass installation very much. But it would be possible to controll
file access permissions and automatic de-installation.

How do you solve the problems with the hardcoded paths in the monitorcap
file? I have a rpm-spec file that works very well, but was never able to
make a pakage that is relocatable or builds under a temporary root
(which is the usual setup). I looked into building a solaris pkg
package, but this has the same problems than the rpm package (not
building in a tmp root, not relocatable).

cu,

Andreas

Jan-Oliver Wagner wrote:

Hi,

during preparation of a GRASS rpm package, two issues
occured:

- is there a reason why manual confirmation is requested
        when building as root? It is not unusual to be root
        when creating a rpm package.

- the installation routine copies several CVS directories.

Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Andreas Lange wrote:

Hi Jan-Oliver,

With my rpm spec file i solved this with echo y> make.

ooups, this should read echo y | make. But everyone knows this ;-).

cu,

Andreas

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'