Re: [GNC-dev] Building 3.5 package for Disco

2019-05-02 Thread John Ralls



> On May 2, 2019, at 6:38 PM, Stephen M. Butler  wrote:
> 
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libgtest_main.a(gtest_main.cc.o):

It's linking a system file instead of the one that GnuCash should have built. 
Is it linking that libgtest_main.a when you do a regular build?

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Building 3.5 package for Disco

2019-05-02 Thread John Ralls



> On May 2, 2019, at 6:12 PM, Stephen M. Butler  wrote:
> 
> Did my test of directly building GnC 3.5 on Ubuntu 19.04.  Following is
> the <> output from cmake and make (taking most defaults).  I
> have <> what I think are the non-essentials to show some
> warnings that were reported.  They may mean nothing but ...
> 
> 
> steve@SteveLaptop:~/Projects/GnuCash/build-area$ cmake
> -DGTEST_ROOT=/usr/src/googletest/googletesti
> -DGMOCK_ROOT=/usr/src/googletest/googlemock ../gnucash
> -- Using guile-2.0.x
> -- Using guile SRFI-64
> -- Checking for GTEST
> -- Checking for GMOCK
> 
>   <>
> 
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/steve/Projects/GnuCash/build-area
> 
> 
> steve@SteveLaptop:~/Projects/GnuCash/build-area$ make
> Scanning dependencies of target ChangeLog
> [  0%] Built target ChangeLog
> Scanning dependencies of target guile-json
> 
> <>
> 
> [ 38%] Linking CXX shared library ../../../lib/libgnc-backend-xml-utils.so
> /usr/bin/ld: CMakeFiles/gnc-backend-xml-utils.dir/gnc-xml-backend.cpp.o:
> in function `GncXmlBackend::write_to_file(bool)':
> gnc-xml-backend.cpp:(.text+0x11e6): warning: the use of `mktemp' is
> dangerous, better use `mkstemp' or `mkdtemp'
> 
> <>
> 
> [ 85%] Generating
> ../../../lib/gnucash/scm/ccache/2.0/gnucash/report/report-system/report-collectors.go
> wrote
> `/home/steve/Projects/GnuCash/build-area/lib/gnucash/scm/ccache/2.0/gnucash/report/report-system/report-collectors.go'
> 
> Some deprecated features have been used.  Set the environment
> variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
> program to get more information.  Set it to "no" to suppress
> this message.
> [ 85%] Built target scm-report-system-2b
> 
> <>
> 
> [ 94%] Generating
> ../../../../lib/gnucash/scm/ccache/2.0/gnucash/report/locale-specific/de_DE.go
> 
> (process:30149): gnc.module-WARNING **: 17:53:58.604: Could not locate
> module gnucash/tax/de_DE interface v.0
> wrote
> `/home/steve/Projects/GnuCash/build-area/lib/gnucash/scm/ccache/2.0/gnucash/report/locale-specific/de_DE.go'
> 
> <>
> 
> 
> [100%] Built target swig-gnucash-core
> 
> ==
> 
> Do I need to file a bug for any of the above?

Steve,

Nope, those are all either known- or non-problems. 

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Building 3.5 package for Disco

2019-05-02 Thread Stephen M. Butler
On 4/30/19 7:29 AM, John Ralls wrote:
> The arguments I gave you are for the cmake command line. I don't know the 
> packaging tool you're using, but it's obviously constructing a cmake command 
> line out of compressed arguments: The snippet --with python3,aqbanking would 
> be passed to cmake as -D WITH_PYTHON=ON -D WITH_AQBANKING=ON.
>
> You'll need to read the docs on the packaging tool to find out how to set 
> other kinds of cmake options.
>
> Regards,
> John Ralls

Found reference to this snippet of the rules file and added the two
underlined lines:

override_dh_auto_configure:
    ## copy gtest sources
    mkdir -p .build/__gtest
    cp -Rv /usr/src/googletest/* .build/__gtest/
    env    ## debug
    mkdir -v -p \
    "$${HOME}"/.local/share/GnuCash/books \
    "$${HOME}"/.local/share/GnuCash/checks \
    "$${HOME}"/.local/share/GnuCash/translog
    dh_auto_configure -- -Wdev \
   -DCMAKE_VERBOSE_MAKEFILE=ON  \
   -DCMAKE_BUILD_TYPE=Release   \
   -DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
   -DWITH_PYTHON=ON \
  
-DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/gnucash \
_   -DGTEST_ROOT=/usr/src/googletest/googletest \__
__   -DGMOCK_ROOT=/usr/src/googletest/googlemock \__
_    $(CMAKE_WORDS_BIGENDIAN) \
    ;

But ran into this condition near the end of the build:

[ 87%] Linking CXX executable ../../../../bin/test-tx_import

cd
/home/steve/Projects/GnuCash/gnucash/.build/gnucash/import-export/csv-imp/test
&& /usr/bin/cmake -E cmake_link_script
CMakeFiles/test-tx_import.dir/link.txt --verbose=1
/usr/bin/c++  -Wno-error=deprecated-declarations  -Werror -Wall
-Wmissing-declarations -Wno-unused -Wno-error=parentheses -std=gnu++11
-g -O2 -fdebug-prefix-map=/home/steve/Projects/GnuCash/gnucash=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -O3 -DNDEBUG  -Wl,-Bsymbolic-functions -Wl,-z,relro
-Wl,-z,now -rdynamic CMakeFiles/test-tx_import.dir/test-tx-import.cpp.o 
-o ../../../../bin/test-tx_import
-Wl,-rpath,/home/steve/Projects/GnuCash/gnucash/.build/lib/x86_64-linux-gnu/gnucash/gnucash:/home/steve/Projects/GnuCash/gnucash/.build/lib/x86_64-linux-gnu/gnucash
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-csv-import.so
-lglib-2.0 -Wl,-Bstatic -lgtest -lgtest_main -Wl,-Bdynamic -licui18n
-licuuc -licudata
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-generic-import.so
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-gnome-utils.so
../../../../lib/x86_64-linux-gnu/gnucash/libgnc-backend-xml-utils.so -lz
-ldl -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0
-lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lsecret-1
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-app-utils.so
-lgio-2.0 -lxslt -lxml2
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-engine.so
../../../../lib/x86_64-linux-gnu/gnucash/libgnc-core-utils.so
-lboost_date_time -lboost_regex -lboost_locale -lboost_filesystem
-lboost_system -lgobject-2.0
../../../../lib/x86_64-linux-gnu/gnucash/libgnc-module.so
-Wl,--export-dynamic -lgmodule-2.0 -lglib-2.0 -pthread -lguile-2.0 -lgc
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libgtest_main.a(gtest_main.cc.o):
in function `main':


(.text.startup+0x2f): undefined reference to
`testing::InitGoogleTest(int*, char**)'

/usr/bin/ld: (.text.startup+0x34): undefined reference to
`testing::UnitTest::GetInstance()'
/usr/bin/ld: (.text.startup+0x3c): undefined reference to
`testing::UnitTest::Run()'
collect2: error: ld returned 1 exit status


make[5]: ***
[gnucash/import-export/csv-imp/test/CMakeFiles/test-tx_import.dir/build.make:103:
bin/test-tx_import] Error 1

make[5]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
make[4]: *** [CMakeFiles/Makefile2:9843:
gnucash/import-export/csv-imp/test/CMakeFiles/test-tx_import.dir/all]
Error 2
make[4]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
make[3]: *** [CMakeFiles/Makefile2:261: CMakeFiles/check.dir/rule] Error 2
make[3]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
make[2]: *** [Makefile:226: check] Error 2
make[2]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
+ RV=2
+ [ 2 -eq 0 ]
+ cat .build/Testing/Temporary/LastTest.log
cat: .build/Testing/Temporary/LastTest.log: No such file or directory
+ exit 2
make[1]: *** [debian/rules:69: override_dh_auto_test] Error 2
make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
make: *** [debian/rules:26: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit
status 2


Not sure why it fails inside dpkg_buildpackage but works OK directly.

-- 
Stephen M Butler, PMP, PSM
stephen.m.butle...@gmail.com
kg...@arrl.net
253-350-0166
---
GnuPG Fingerprint:  8A25 9726 D439 758D D846 

Re: [GNC-dev] Building 3.5 package for Disco

2019-05-02 Thread Stephen M. Butler
Did my test of directly building GnC 3.5 on Ubuntu 19.04.  Following is
the <> output from cmake and make (taking most defaults).  I
have <> what I think are the non-essentials to show some
warnings that were reported.  They may mean nothing but ...


steve@SteveLaptop:~/Projects/GnuCash/build-area$ cmake
-DGTEST_ROOT=/usr/src/googletest/googletesti
-DGMOCK_ROOT=/usr/src/googletest/googlemock ../gnucash
-- Using guile-2.0.x
-- Using guile SRFI-64
-- Checking for GTEST
-- Checking for GMOCK

  <>

-- Configuring done
-- Generating done
-- Build files have been written to: /home/steve/Projects/GnuCash/build-area


steve@SteveLaptop:~/Projects/GnuCash/build-area$ make
Scanning dependencies of target ChangeLog
[  0%] Built target ChangeLog
Scanning dependencies of target guile-json

<>

[ 38%] Linking CXX shared library ../../../lib/libgnc-backend-xml-utils.so
/usr/bin/ld: CMakeFiles/gnc-backend-xml-utils.dir/gnc-xml-backend.cpp.o:
in function `GncXmlBackend::write_to_file(bool)':
gnc-xml-backend.cpp:(.text+0x11e6): warning: the use of `mktemp' is
dangerous, better use `mkstemp' or `mkdtemp'

<>

[ 85%] Generating
../../../lib/gnucash/scm/ccache/2.0/gnucash/report/report-system/report-collectors.go
wrote
`/home/steve/Projects/GnuCash/build-area/lib/gnucash/scm/ccache/2.0/gnucash/report/report-system/report-collectors.go'

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.
[ 85%] Built target scm-report-system-2b

<>

[ 94%] Generating
../../../../lib/gnucash/scm/ccache/2.0/gnucash/report/locale-specific/de_DE.go

(process:30149): gnc.module-WARNING **: 17:53:58.604: Could not locate
module gnucash/tax/de_DE interface v.0
wrote
`/home/steve/Projects/GnuCash/build-area/lib/gnucash/scm/ccache/2.0/gnucash/report/locale-specific/de_DE.go'

<>


[100%] Built target swig-gnucash-core

==

Do I need to file a bug for any of the above?

--Steve

-- 
Stephen M Butler, PMP, PSM
stephen.m.butle...@gmail.com
kg...@arrl.net
253-350-0166
---
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread David Cousens
Hi John,

It was because of a number of posts in the forum, not sure whether DEV or
USER around the time I reworked the pages which suggested $HOME/.local  for
single user local installations of GnuCash . I think it may also have been
specified the previous Wiki page I started from as well. At the time I could
not find any better suggestions so I left it in place. My own preference has
been to install in /usr/local or /opt system wide for production. If you use
make uninstall from the build directory it seems to uninstall correctly from
$HOME/.local as long as the manifest still exists as the paths to each file
installed are specified

If I do a local temporary install, I personally install in a subdirectory of
my home directory and add the relevant search paths to the front of the PATH
environment variable . You of course have the problem with the order in PATH
as to whether you search $HOME directories before or after system installed
paths if you have multiple copies of different versions. Ideally in that
case you could invoke a startup script which setup the PATH variable
depending on which version you are starting up and where its resouces are
located. I have used /opt and /usr/local for different versions but the same
problem with ordering the search order in PATH arises.

Python installs what it calls site-packages under $HOME/.local which seem to
be user specific but most of the other data I find in the directory is in
$HOME/.local/share which seems to be mainly user specific data for various
packages.

The Linux File Heirarchy gives no real guidance for the structure of a users
home directory apart from a reference to XDG and GLib conventions ( can't
find any reference):

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

One stackexchange article suggested duplicating sections of the FHS under
$HOME which seems a bit extreme. If I did that I would be inclined to have a
specific directory under $HOME with the /bin, /etc, /lib /share directories
under it. I have an Applications directory for that purpose usually with a
package sub directory under that which contains the above directories.

For the little development work on GnuCash I do I have a separate structure
again under my home directory which has an install subdirectory which I
install to. I have often wondered whether I am actually getting to the
correct libraries by setting up the PATH variable (particularly if I forget
to set it up). Then there is unsetting PATH when you want to go back to
production work. 

Perhaps it is worth investigating the update-alternatives command  used when
several python versions are installed, e.g.
https://askubuntu.com/questions/315646/update-java-alternatives-vs-update-alternatives-config-java.
perhaps using this in startup scripts. Here the installed files are labelled
with the version number and selected by setting a master and slave symbolic
link groups which are setup with the "update-alternatives --set  name path"
command.

Not sure what is the best location and structure for general users for a
local installation though. I would be inclined to go for a directory
labelled with a package name and version number with its own /bin, /etc,
/lib and /share directories and then prepend these to the PATH.

David Cousens



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread John Ralls
Correction: http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html says 
that AT invented /opt for SYSV. 

http://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html is as close to 
canonical as one gets for what different parts of the file hierarchy are for 
and how they should be used.

Regards,
John Ralls

> On May 2, 2019, at 10:03 AM, John Ralls  wrote:
> 
> AT Unix and the real BSD did have /usr/local as the place for installing 
> stuff not part of the system. Sun Microsystems started using that for their 
> Solaris extensions to BSD and invented /opt as the place for 
> locally-installed packages. Both typically require root to install into and 
> some distros have put stuff in one or the other, so care is advised when 
> using either.
> 
> There's another problem: CMake treats both specially and munges the 
> subdirectory locations; this is worst with /opt as it insists on stuffing 
> etc/gnucash into a weird path under /etc so root is required for the install 
> step and gnucash can't find the environment file.
> 
> I lean towards guiding inexperienced users toward keeping everything in their 
> home directories and away from using su or sudo for anything. 
> 
> Regards,
> John Ralls
> 
>> On May 2, 2019, at 9:40 AM, Colin Law  wrote:
>> 
>> On many varieties of Linux /usr/local is the conventional location to
>> add locally built packages.  In this case probably /usr/local/gnucash.
>> I think the build instructions used to suggest that but I may be
>> mistaken.
>> 
>> Colin
>> 
>> On Thu, 2 May 2019 at 17:27, Geert Janssens  
>> wrote:
>>> 
>>> Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
 On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
 
 wrote:
> Our current wiki on building gnucash for Ubuntu 16.04 (https://
> wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid
> installation prefix.
 
 ...
 
> So personally I would recommend against using $HOME/.local as installation
> prefix. I am however curious where this suggestion originally came from.
 
 This is entirely speculation... I'm looking at this system where I've been
 testing the GnuCash versions available as Snap and Flatpak... and I see
 that the Flatpak installation apparently added
 ~/.local/share/flatpak/exports/share to the $XDG_DATA_DIRS environment
 variable.
 
 Maybe whoever wrote the wiki entry was also working with Flatpak and
 thought .local would be a good place to stash things to make them more
 accessible to Flatpak.
 
>>> Possibly.
>>> 
 I would think ~/bin would be a more ideal suggestion because I see it is
 already defined in my bash $PATH on this Ubuntu machine. (And I'm pretty
 sure I didn't add it, though I may have.)
>>> 
>>> That would be another alternative location. To have gnucash benefit from 
>>> ~/bin
>>> being on the path though the gnucash binary itself should be ~/bin/gnucash.
>>> 
>>> Translating this back to the required installation prefix would mean the
>>> installation prefix should be $HOME.
>>> 
>>> This is certainly possible but has the drawback the installation would add
>>> extra directories in your home directory, like
>>> ~/share
>>> ~/etc
>>> ~/lib(64)
>>> ...
>>> 
>>> That may be cluttering the home directory more than the average user may 
>>> like.
>>> And in addition if someone is adding other binaries to ~/bin it again 
>>> becomes
>>> more difficult to keep the gnucash build separate from everything else.
>>> 
>>> To me something like Adrien suggested makes most sense.
>>> One could add two extra steps to simplify launching gnucash afterwards:
>>> - make a softlink from /bin/gnucash to 
>>> /home/bin/gnucash.
>>> This would allow console users to simply type "gnucash" to run their own
>>> gnucash build.
>>> - copy /share/applications/gnucash.desktop to
>>> ~/.local/share/applications
>>> That should make you graphical environment aware of your self-built gnucash
>>> and have it pop up in the usual places to launch applications (the Kicker 
>>> menu
>>> on KDE, or the gnome-shell application launcher).
>>> 
>>> Regards,
>>> 
>>> Geert
>>> 
>>> 
>>> ___
>>> gnucash-devel mailing list
>>> gnucash-devel@gnucash.org
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>> ___
>> gnucash-devel mailing list
>> gnucash-devel@gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread John Ralls
AT Unix and the real BSD did have /usr/local as the place for installing 
stuff not part of the system. Sun Microsystems started using that for their 
Solaris extensions to BSD and invented /opt as the place for locally-installed 
packages. Both typically require root to install into and some distros have put 
stuff in one or the other, so care is advised when using either.

There's another problem: CMake treats both specially and munges the 
subdirectory locations; this is worst with /opt as it insists on stuffing 
etc/gnucash into a weird path under /etc so root is required for the install 
step and gnucash can't find the environment file.

I lean towards guiding inexperienced users toward keeping everything in their 
home directories and away from using su or sudo for anything. 

Regards,
John Ralls

> On May 2, 2019, at 9:40 AM, Colin Law  wrote:
> 
> On many varieties of Linux /usr/local is the conventional location to
> add locally built packages.  In this case probably /usr/local/gnucash.
> I think the build instructions used to suggest that but I may be
> mistaken.
> 
> Colin
> 
> On Thu, 2 May 2019 at 17:27, Geert Janssens  
> wrote:
>> 
>> Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
>>> On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
>>> 
>>> wrote:
 Our current wiki on building gnucash for Ubuntu 16.04 (https://
 wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid
 installation prefix.
>>> 
>>> ...
>>> 
 So personally I would recommend against using $HOME/.local as installation
 prefix. I am however curious where this suggestion originally came from.
>>> 
>>> This is entirely speculation... I'm looking at this system where I've been
>>> testing the GnuCash versions available as Snap and Flatpak... and I see
>>> that the Flatpak installation apparently added
>>> ~/.local/share/flatpak/exports/share to the $XDG_DATA_DIRS environment
>>> variable.
>>> 
>>> Maybe whoever wrote the wiki entry was also working with Flatpak and
>>> thought .local would be a good place to stash things to make them more
>>> accessible to Flatpak.
>>> 
>> Possibly.
>> 
>>> I would think ~/bin would be a more ideal suggestion because I see it is
>>> already defined in my bash $PATH on this Ubuntu machine. (And I'm pretty
>>> sure I didn't add it, though I may have.)
>> 
>> That would be another alternative location. To have gnucash benefit from 
>> ~/bin
>> being on the path though the gnucash binary itself should be ~/bin/gnucash.
>> 
>> Translating this back to the required installation prefix would mean the
>> installation prefix should be $HOME.
>> 
>> This is certainly possible but has the drawback the installation would add
>> extra directories in your home directory, like
>> ~/share
>> ~/etc
>> ~/lib(64)
>> ...
>> 
>> That may be cluttering the home directory more than the average user may 
>> like.
>> And in addition if someone is adding other binaries to ~/bin it again becomes
>> more difficult to keep the gnucash build separate from everything else.
>> 
>> To me something like Adrien suggested makes most sense.
>> One could add two extra steps to simplify launching gnucash afterwards:
>> - make a softlink from /bin/gnucash to 
>> /home/bin/gnucash.
>> This would allow console users to simply type "gnucash" to run their own
>> gnucash build.
>> - copy /share/applications/gnucash.desktop to
>> ~/.local/share/applications
>> That should make you graphical environment aware of your self-built gnucash
>> and have it pop up in the usual places to launch applications (the Kicker 
>> menu
>> on KDE, or the gnome-shell application launcher).
>> 
>> Regards,
>> 
>> Geert
>> 
>> 
>> ___
>> gnucash-devel mailing list
>> gnucash-devel@gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread Colin Law
On many varieties of Linux /usr/local is the conventional location to
add locally built packages.  In this case probably /usr/local/gnucash.
I think the build instructions used to suggest that but I may be
mistaken.

Colin

On Thu, 2 May 2019 at 17:27, Geert Janssens  wrote:
>
> Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
> > On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
> >
> > wrote:
> > > Our current wiki on building gnucash for Ubuntu 16.04 (https://
> > > wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid
> > > installation prefix.
> >
> > ...
> >
> > > So personally I would recommend against using $HOME/.local as installation
> > > prefix. I am however curious where this suggestion originally came from.
> >
> > This is entirely speculation... I'm looking at this system where I've been
> > testing the GnuCash versions available as Snap and Flatpak... and I see
> > that the Flatpak installation apparently added
> > ~/.local/share/flatpak/exports/share to the $XDG_DATA_DIRS environment
> > variable.
> >
> > Maybe whoever wrote the wiki entry was also working with Flatpak and
> > thought .local would be a good place to stash things to make them more
> > accessible to Flatpak.
> >
> Possibly.
>
> > I would think ~/bin would be a more ideal suggestion because I see it is
> > already defined in my bash $PATH on this Ubuntu machine. (And I'm pretty
> > sure I didn't add it, though I may have.)
>
> That would be another alternative location. To have gnucash benefit from ~/bin
> being on the path though the gnucash binary itself should be ~/bin/gnucash.
>
> Translating this back to the required installation prefix would mean the
> installation prefix should be $HOME.
>
> This is certainly possible but has the drawback the installation would add
> extra directories in your home directory, like
> ~/share
> ~/etc
> ~/lib(64)
> ...
>
> That may be cluttering the home directory more than the average user may like.
> And in addition if someone is adding other binaries to ~/bin it again becomes
> more difficult to keep the gnucash build separate from everything else.
>
> To me something like Adrien suggested makes most sense.
> One could add two extra steps to simplify launching gnucash afterwards:
> - make a softlink from /bin/gnucash to /home/bin/gnucash.
> This would allow console users to simply type "gnucash" to run their own
> gnucash build.
> - copy /share/applications/gnucash.desktop to
> ~/.local/share/applications
> That should make you graphical environment aware of your self-built gnucash
> and have it pop up in the usual places to launch applications (the Kicker menu
> on KDE, or the gnome-shell application launcher).
>
> Regards,
>
> Geert
>
>
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread Geert Janssens
Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
> On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
> 
> wrote:
> > Our current wiki on building gnucash for Ubuntu 16.04 (https://
> > wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid
> > installation prefix.
> 
> ...
> 
> > So personally I would recommend against using $HOME/.local as installation
> > prefix. I am however curious where this suggestion originally came from.
> 
> This is entirely speculation... I'm looking at this system where I've been
> testing the GnuCash versions available as Snap and Flatpak... and I see
> that the Flatpak installation apparently added
> ~/.local/share/flatpak/exports/share to the $XDG_DATA_DIRS environment
> variable.
> 
> Maybe whoever wrote the wiki entry was also working with Flatpak and
> thought .local would be a good place to stash things to make them more
> accessible to Flatpak.
> 
Possibly.

> I would think ~/bin would be a more ideal suggestion because I see it is
> already defined in my bash $PATH on this Ubuntu machine. (And I'm pretty
> sure I didn't add it, though I may have.)

That would be another alternative location. To have gnucash benefit from ~/bin 
being on the path though the gnucash binary itself should be ~/bin/gnucash.

Translating this back to the required installation prefix would mean the 
installation prefix should be $HOME.

This is certainly possible but has the drawback the installation would add 
extra directories in your home directory, like
~/share
~/etc
~/lib(64)
...

That may be cluttering the home directory more than the average user may like. 
And in addition if someone is adding other binaries to ~/bin it again becomes 
more difficult to keep the gnucash build separate from everything else.

To me something like Adrien suggested makes most sense.
One could add two extra steps to simplify launching gnucash afterwards:
- make a softlink from /bin/gnucash to /home/bin/gnucash. 
This would allow console users to simply type "gnucash" to run their own 
gnucash build.
- copy /share/applications/gnucash.desktop to
~/.local/share/applications
That should make you graphical environment aware of your self-built gnucash 
and have it pop up in the usual places to launch applications (the Kicker menu 
on KDE, or the gnome-shell application launcher).

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread John Ralls



> On May 2, 2019, at 4:01 AM, Geert Janssens  wrote:
> 
> Our current wiki on building gnucash for Ubuntu 16.04 (https://
> wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid 
> installation prefix.
> 
> While checking for another thread I have found this to be problematic.
> 
> In particular when using this installation prefix, a number of files and 
> directories will be added in $HOME/.local/share/. That directory however is 
> also to primary directory where a running applications store their runtime 
> data. So the same directory is being used as installation directory and data 
> directory.
> 
> That makes it pretty difficult to quickly remove the local gnucash 
> installation in one go as the installation directory may also hold runtime 
> data (and from more than one application!).
> 
> So personally I would recommend against using $HOME/.local as installation 
> prefix. I am however curious where this suggestion originally came from.

A quick search of history shows it was added by David Cousens in 
https://wiki.gnucash.org/wiki/index.php?title=BuildUbuntu16.04=13834=13833.

David, what led you to use that directory?

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread Geert Janssens
Yes, something like that would make more sense to me as well.

Op donderdag 2 mei 2019 17:03:53 CEST schreef Adrien Monteleone:
> Good question.
> 
> I’ve never used that location, and have not otherwise seen any
> recommendation to use it for a single/local-user installation.
> 
> I’ve seen people recommend to recreate the official tree under ~/ (~/usr,
> ~/usr/local, ~/usr/bin) which doesn’t make much sense to me, or something
> else like:
> 
> ~/apps, ~/applications
> 
> I would think a recommendation of:
> 
> $HOME/apps/gnucash, $HOME/applications/gnucash
> 
> would be fine as it would be easier to remove. (one could maybe keep a
> `$HOME/apps/gnucash/build` directory around for that eventual removal)
> 
> Regards,
> Adrien
> 
> > On May 2, 2019, at 6:01 AM, Geert Janssens 
> > wrote:
> > 
> > Our current wiki on building gnucash for Ubuntu 16.04 (https://
> > wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid
> > installation prefix.
> > 
> > While checking for another thread I have found this to be problematic.
> > 
> > In particular when using this installation prefix, a number of files and
> > directories will be added in $HOME/.local/share/. That directory however
> > is
> > also to primary directory where a running applications store their runtime
> > data. So the same directory is being used as installation directory and
> > data directory.
> > 
> > That makes it pretty difficult to quickly remove the local gnucash
> > installation in one go as the installation directory may also hold runtime
> > data (and from more than one application!).
> > 
> > So personally I would recommend against using $HOME/.local as installation
> > prefix. I am however curious where this suggestion originally came from.
> > 
> > Regards,
> > 
> > Geert
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel




___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread Tommy Trussell
On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
wrote:

> Our current wiki on building gnucash for Ubuntu 16.04 (https://
> wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid
> installation prefix.
>
...

> So personally I would recommend against using $HOME/.local as installation
> prefix. I am however curious where this suggestion originally came from.
>

This is entirely speculation... I'm looking at this system where I've been
testing the GnuCash versions available as Snap and Flatpak... and I see
that the Flatpak installation apparently added
~/.local/share/flatpak/exports/share to the $XDG_DATA_DIRS environment
variable.

Maybe whoever wrote the wiki entry was also working with Flatpak and
thought .local would be a good place to stash things to make them more
accessible to Flatpak.

I would think ~/bin would be a more ideal suggestion because I see it is
already defined in my bash $PATH on this Ubuntu machine. (And I'm pretty
sure I didn't add it, though I may have.)
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[GNC-dev] Fwd: [GNC] UK VAT and "Making Tax Digital"

2019-05-02 Thread Christopher Lam
Maf's reply forwarded to devel.

I think a sensible restriction to vat-report will be: all amounts *must* be
converted into a report-currency... which will then ensure there's only 1
currency for grand-total, therefore 1 heading + 1 grand-total = 1 csv row.

-- Forwarded message -
From: Maf. King 
Date: Thu, 2 May 2019 at 13:36
Subject: Re: [GNC] UK VAT and "Making Tax Digital"
To: Christopher Lam 
Cc: gnucash-devel 


Hi Christopher,

responses inline:

On Thursday, 2 May 2019 12:36:06 BST Christopher Lam wrote:
> Are you referring to the Multicolumn report with multiple embedded
reports?
> This one would be very annoying to create CSV export from... each embedded
> report exposes its html output only.
>

That was the report I was thinking of, not surprised that CSV would be hard
to
generate.


> The links I attached earlier (replacing transaction.scm and
> income-gst-statement.scm) would enable CSV export, exposing the headers
and
> the grand-totals.
>

Correct, that is what I see.  but the totals are wrong because the report
can't consider the asset purchases.

> Meanwhile I'm rather more interested in generating a proper solution :-)
>
> For UK VAT I'd think the more complex requirements here would warrant a
> customised solution based on the existing VAT account structure, rather
> than to try shoehorn hacks on the existing report.
>

Fair enough.  I guess the GST report was written with Oz in mind and then
generalised a bit.


> If you can create a sample datafile based on the CoA as suggested by
> New-account wizard,

No problem, will take your template file and try to get that sorted over
the
weekend or early next week.

thanks,
Maf.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread Adrien Monteleone
Good question.

I’ve never used that location, and have not otherwise seen any recommendation 
to use it for a single/local-user installation.

I’ve seen people recommend to recreate the official tree under ~/ (~/usr, 
~/usr/local, ~/usr/bin) which doesn’t make much sense to me, or something else 
like:

~/apps, ~/applications

I would think a recommendation of:

$HOME/apps/gnucash, $HOME/applications/gnucash

would be fine as it would be easier to remove. (one could maybe keep a 
`$HOME/apps/gnucash/build` directory around for that eventual removal)

Regards,
Adrien

> On May 2, 2019, at 6:01 AM, Geert Janssens  wrote:
> 
> Our current wiki on building gnucash for Ubuntu 16.04 (https://
> wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid 
> installation prefix.
> 
> While checking for another thread I have found this to be problematic.
> 
> In particular when using this installation prefix, a number of files and 
> directories will be added in $HOME/.local/share/. That directory however is 
> also to primary directory where a running applications store their runtime 
> data. So the same directory is being used as installation directory and data 
> directory.
> 
> That makes it pretty difficult to quickly remove the local gnucash 
> installation in one go as the installation directory may also hold runtime 
> data (and from more than one application!).
> 
> So personally I would recommend against using $HOME/.local as installation 
> prefix. I am however curious where this suggestion originally came from.
> 
> Regards,
> 
> Geert

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[GNC-dev] About the "$HOME/.local" installation prefix

2019-05-02 Thread Geert Janssens
Our current wiki on building gnucash for Ubuntu 16.04 (https://
wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid 
installation prefix.

While checking for another thread I have found this to be problematic.

In particular when using this installation prefix, a number of files and 
directories will be added in $HOME/.local/share/. That directory however is 
also to primary directory where a running applications store their runtime 
data. So the same directory is being used as installation directory and data 
directory.

That makes it pretty difficult to quickly remove the local gnucash 
installation in one go as the installation directory may also hold runtime 
data (and from more than one application!).

So personally I would recommend against using $HOME/.local as installation 
prefix. I am however curious where this suggestion originally came from.

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel