[GRASS-dev] [GRASS GIS] #1946: wingrass: demolocation includes .svn/ cruft

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------
the nightly build wingrass installers ship '.svn/' files for the
demolocation.

perhaps somewhere needs to do 'svn export' not 'svn checkout'?

thanks,
Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by neteler):

Replying to [ticket:1946 hamish]:
> the nightly build wingrass installers ship '.svn/' files for the
demolocation.

To better understand: is it a problem?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

Replying to [comment:1 neteler]:
> Replying to [ticket:1946 hamish]:
> > the nightly build wingrass installers ship '.svn/' files for the
demolocation.
> To better understand: is it a problem?

It does not cause breakage, but it should be removed.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------
Changes (by martinl):

  * priority: normal => trivial

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

please don't ignore it. it's a 2 minute job and these things make us look
unprofessional.

thanks,
Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by martinl):

Replying to [comment:4 hamish]:
> please don't ignore it. it's a 2 minute job and these things make us
look unprofessional.

huh, "trivial" means ignoring? if it's a 2 minute job, feel free to fix
it. Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

.. it seemed to be going that way. Yes, I had a look at fixing it myself
before filing the ticket, but couldn't see where in src:mswindows/ and
addons:tools/wingrass-packager/ it was done. Any hints?

thanks,
Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hellik):

Replying to [comment:6 hamish]:
> .. it seemed to be going that way. Yes, I had a look at fixing it
myself before filing the ticket, but couldn't see where in src:mswindows/
and addons:tools/wingrass-packager/ it was done. Any hints?
>

http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/mswindows
/GRASS-Installer.nsi.tmpl#L13

Helmut

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

so, IIUC, the packager does a 'svn up' on their machine into a local
C:\osgeo4w dir, then the packaging script recursively copies from within
that checked out source tree?

http://trac.osgeo.org/grass/wiki/CompileOnWindows#CreatetheWinGRASSInstaller

Line 586 of GRASS-Installer.nsi.tmpl has:
{{{
File /r ${DEMOLOCATION_PATH}\*.*
}}}

how to restrict that, or afterwards recursively rm the 6 .svn/ dirs within
it?
or just forget anything fancy and remove them by hand after the copy:
{{{
RMDir /r "$GIS_DATABASE\demolocation/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/vector/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/vector/mysites/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/vector/point/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/dbf/.svn"
}}}

http://nsis.sourceforge.net/Delete_files_and_subdirectories

(I think that recursive remove is also needed for the extracted ms VC++
dll dir in Temp/, right now it gets left behind after install)

thanks,
Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by martinl):

Replying to [comment:8 hamish]:
> so, IIUC, the packager does a 'svn up' on their machine into a local
C:\osgeo4w dir, then the packaging script recursively copies from within
that checked out source tree?

see

source:grass-addons/tools/wingrass-packager/grass_compile.sh#L14

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hellik):

Replying to [comment:8 hamish]:
>
> (I think that recursive remove is also needed for the extracted ms VC++
dll dir in Temp/, right now it gets left behind after install)

http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/mswindows
/GRASS-Installer.nsi.tmpl#L1000

{{{
Delete "$TEMP\$ARCHIVE_NAME"
Delete "$TEMP\$ORIGINAL_UNTAR_FOLDER"
}}}

the downloaded files and folders should be deleted.

if e.g. vcredist_2005_x86.exe creates another folder with extracted files,
shouldn't be this cleaning the os?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

left over in ...\Local Settings\Temp\ are a install_msruntime dir from
osgeo4w, with bin/ and etc/ within it, and an empty "Microsoft Visual C++
Runtime 2010 x86 Redistributible Setup_10.0.30319" dir, and matching 2010
.html and .txt log files.

wrt the 'install_msruntime' dir, does "Delete" work for folders?

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1946#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by glynn):

Replying to [ticket:1946 hamish]:

> the nightly build wingrass installers ship '.svn/' files for the
demolocation.

I think that this isn't restricted to Windows; the "builddemolocation"
target in the top-level Makefile simply copies the demolocation directory
to dist.<arch> (using "tar c ... | tar x ...").

In 7.x, the demolocation directory has a Makefile which explicitly creates
target directories and copies files with $(INSTALL_DATA).

Also: recent versions of the subversion client use a single .svn directory
in the root of the working directory, rather than having a separate .svn
directory in each subdirectory, so updating the subversion client would
make this particular issue disappear.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1946#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

attempt to remove the unpacked 'install_msruntime' dir in devbr6 r56001.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1946#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

Replying to [comment:12 glynn]:
> Replying to [ticket:1946 hamish]:
> > the nightly build wingrass installers ship '.svn/' files for the
demolocation.
>
> I think that this isn't restricted to Windows; the "builddemolocation"
> target in the top-level Makefile simply copies the demolocation
directory
> to dist.<arch> (using "tar c ... | tar x ...").

that is correct, it's in all 'make install' for svn builds.

> In 7.x, the demolocation directory has a Makefile which explicitly
> creates target directories and copies files with $(INSTALL_DATA).

since there's no `Other.make` in grass6 I'd just go with the cheap & dirty
approach-of-least-change:

{{{
Index: Makefile

--- Makefile (revision 55903)
+++ Makefile (working copy)
@@ -389,6 +389,13 @@
  builddemolocation:
         test -d ${ARCH_DISTDIR} || ${MAKE_DIR_CMD} ${ARCH_DISTDIR}
         -tar cBf - demolocation | (cd ${ARCH_DISTDIR}/ ; tar xBfo - )
2>/dev/null
+ -(cd ${ARCH_DISTDIR}/demolocation ; \
+ rm -rf ".svn" ; \
+ rm -rf "PERMANENT/.svn" ; \
+ rm -rf "PERMANENT/vector/.svn" ; \
+ rm -rf "PERMANENT/vector/mysites/.svn" ; \
+ rm -rf "PERMANENT/vector/point/.svn" ; \
+ rm -rf "PERMANENT/dbf/.svn" )
         @ echo "GISDBASE: ${RUN_GISBASE}" > ${RUN_GISRC}
         @ echo "LOCATION_NAME: demolocation" >> ${RUN_GISRC}
         @ echo "MAPSET: PERMANENT" >> ${RUN_GISRC}
}}}

I notice that the last part creates a file called demolocation/.grassrc65,
when it should perhaps be .grassrc6? That's named by Platform.make.in:
{{{
RUN_GISRC =
${ARCH_DISTDIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
}}}

(RUN_GISRC is used by e.g. Man.make at build time, with the GISRC=
override set to the same variable, so it doesn't matter much what it's
called)

?,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1946#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

second call for comments on the cheap & dirty patch in comment:14.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1946#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

patch committed in devbr6 and relbr64, but only affects 'make install',
which the nsis installer doesn't use.

another attempt at cleaning it up wingrass committed in devbr6 r56107.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1946#comment:16&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

wingrass7 was also copying over the .svn/ files (doesn't use 'make
install', just copies from source dir), devbr6 fix for that merged to
trunk in r56108.

I also notice in a wingrass7 install that a Makefile and grassrc.tmpl file
have made it into $GISBASE/demolocation.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1946#comment:17&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by martinl):

Replying to [comment:5 martinl]:
> Replying to [comment:4 hamish]:
> > please don't ignore it. it's a 2 minute job and these things make us
look unprofessional.
>
> huh, "trivial" means ignoring? if it's a 2 minute job, feel free to fix
it. Martin

as you can see such "2 minutes jobs" are usually taking more then "2
minutes", currently stand-alone installer for G65 and G70 are broken

{{{
SetOutPath: "$GIS_DATABASE\demolocation"
File: Returning to: "."
File: "$DEMOLOCATION_PATH" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
    /oname=outfile one_file_only)
Error in script ".\grass65\GRASS-Installer.nsi" on line 586 -- aborting
creation
  process
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:18&gt;
GRASS GIS <http://grass.osgeo.org>

#1946: wingrass: demolocation includes .svn/ cruft
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: Packaging | Version: svn-develbranch6
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------

Comment(by hamish):

Replying to [comment:18 martinl]:
> currently stand-alone installer for G65 and G70 are broken
>
  {{{
  SetOutPath: "$GIS_DATABASE\demolocation"
  File: Returning to: "."
  File: "$DEMOLOCATION_PATH" -> no files found.
  Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
     /oname=outfile one_file_only)
  Error in script ".\grass65\GRASS-Installer.nsi" on line 586 -- aborting
creation
   process
  }}}

try r56130,1. Probably nothing to do with .svn/ additions, just me not
understanding the nsis scripting language very well in a side-edit.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1946#comment:19&gt;
GRASS GIS <http://grass.osgeo.org>