Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Backport GnuCash 3.x from Debian to Bionic

  1. #11
    Join Date
    Nov 2004
    Location
    Conway AR USA
    Beans
    217
    Distro
    Ubuntu

    Re: Backport GnuCash 3.x from Debian to Bionic

    SO I created a new VM with bionic, copied Rik Mills' PPA version, and it built properly using dpkg-buildpackage (NOT sbuild or pbuilder)

    Every attempt to build Ubuntu versions in the sbuild environment I was using failed in the tests phase.

    The Debian versions built properly; just not the Ubuntu versions.

    MAYBE because the VM was a Debian Buster VM???? I don't see why.....
    There must be some weird things going on in the sbuild environments.

    But I am going to take this as a success. I just want to replicate it with a "properly constructed" debian package.

  2. #12
    Join Date
    Nov 2004
    Location
    Conway AR USA
    Beans
    217
    Distro
    Ubuntu

    Thumbs up Re: Backport GnuCash 3.x from Debian to Bionic

    Here is a TESTED & WORKING procedure for building GnuCash 3.7 on Ubuntu Bionic

    REQUIREMENTS
    An Ubuntu Bionic installation with bionic-backports activated. (I used a minimal Xubuntu VM for this setup)

    1) Create a source directory

    Code:
    $ mkdir bionic37
    $ cd bionic37
    2) Get the latest Ubuntu package

    Code:
    $ dget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gnucash/1:3.7-1ubuntu1/gnucash_3.7-1ubuntu1.dsc
    2b) Move into the directory created by the source package

    Code:
    $ cd gnucash-3.7
    3) Comment out a build flag line in debian/rules so it will build in Bionic

    Code:
    $ sed -i 's/export DEB_CXXFLAGS/#export DEB_CXXFLAGS/' debian/rules
    4) Make this your custom version

    Code:
    $ dch --nmu
    4b) Edit the new version at the top so it reads something like gnucash (1:3.7-1ubuntu18.04~1)

    4c) Add a comment under your name saying something like "Commented out DEB_CXXFLAGS instruction in debian/rules"

    4d) Save and exit the editor.

    5) Upgrade debhelper

    Code:
    $ sudo apt install debhelper/bionic-backports
    6) Build the package

    Code:
    $ dpkg-buildpackage
    7) You will see the package files in the bionic37 directory, ready to install.
    Code:
    $ sudo dpkg -i *.deb *.ddeb
    
    $ sudo apt install -f
    The dpkg -i command attempts to install gnucash .deb files and the .ddeb debugging files. In a fresh installation, the dpkg -i command will fail because of missing dependencies, so the second command will install the missing dependencies and finish installing gnucash.
    Last edited by Tommy; 1 Week Ago at 05:30 PM. Reason: missing upgraded debhelper

  3. #13
    Join Date
    Nov 2004
    Location
    Conway AR USA
    Beans
    217
    Distro
    Ubuntu

    Unhappy Re: Backport GnuCash 3.x from Debian to Bionic

    I am still trying to figure out why I can't get sbuild to work.

    $ sudo apt install ubuntu-dev-tools sbuild apt-cacher-ng auto-apt-proxy

    (the last one I haven't used before)

    $ sudo adduser twt sbuild

    log out and back in

    $ mk-sbuild bionic

    add backport to the build environment

    $ sudo schroot -c source:bionic-amd64 -u root

    (bionic-amd64) # cd /etc/apt/sources.list.d/
    (bionic-amd64) # cat > bionic-backports.list

    [paste the following two lines into the file, and then type ctrl-D]
    deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

    (bionic-amd64) # apt update ; apt upgrade
    ...
    (bionic-amd64) # exit


    Create a source directory

    $ mkdir bionicSbuild
    $ cd bionicSbuild

    Get the latest Ubuntu package

    $ dget https://launchpad.net/ubuntu/+archiv...7-1ubuntu1.dsc

    $ cd gnucash-3.7

    Comment out a build flag line in debian/rules

    $ sed -i 's/export DEB_CXXFLAGS/#export DEB_CXXFLAGS/' debian/rules

    Make this a special version

    $ dch --nmu

    A: edit new version so it reads something like gnucash (1:3.7-1ubuntu18.04~sbuild)

    B: add comment under your name saying something like "Commented out DEB_CXXFLAGS instruction in debian/rules"

    C: save and exit the editor

    $ sbuild --build-dep-resolver=aptitude -c bionic-amd64



    the package build fails lots of tests

    Here are a few (snippets below)

    The following tests FAILED:
    60 - test-gnc-timezone (Failed)

    3/127 Testing: test-print-parse-amount
    3/127 Test: test-print-parse-amount
    Command: "/<<PKGBUILDDIR>>/.build/bin/test-print-parse-amount"
    Directory: /<<PKGBUILDDIR>>/.build/libgnucash/app-utils/test
    "test-print-parse-amount" start time: Oct 09 19:28 UTC
    Output:
    ----------------------------------------------------------
    <WARNING> (qof) [gnc_numeric_mul()] Value too large to represent as int64_t
    <WARNING> (qof) [gnc_numeric_mul()] Value too large to represent as int64_t
    <WARNING> (qof) [gnc_numeric_mul()] Value too large to represent as int64_t
    ... about two dozen of these
    <WARNING> (qof) [gnc_numeric_mul()] Value too large to represent as int64_t
    Executed 6187 tests. All tests passed.
    <end of output>
    Test time = 0.03 sec
    ----------------------------------------------------------
    ----------------------------------------------------------
    <CRITICAL> (gnc.engine) void xaccAccountSetCommodity(Account*, gnc_commodity*): assertion 'GNC_IS_COMMODITY(com)' failed
    Executed 42 tests. All tests passed.
    <end of output>
    Test time = 0.03 sec
    ----------------------------------------------------------
    OK
    /qof/qofbook/shutting down: OK
    /qof/qofbook/set get data: OK
    /qof/qofbook/get collection: OK
    /qof/qofbook/foreach collection:
    (/<<PKGBUILDDIR>>/.build/bin/test-qof:30951): gnc.engine-CRITICAL **: 19:28:37.310: void qof_book_foreach_collection(const QofBook*, QofCollectionForeachCB, gpointer): assertion 'book' failed

    (/<<PKGBUILDDIR>>/.build/bin/test-qof:30951): gnc.engine-CRITICAL **: 19:28:37.310: void qof_book_foreach_collection(const QofBook*, QofCollectionForeachCB, gpointer): assertion 'cb' failed
    OK
    /qof/qofbook/set data finalizers: OK
    /qof/qofbook/mark closed: OK

    ----------------------------------------------------------

    /qof/gnc-date/gnc time64 to iso8601 buff: OK
    /qof/gnc-date/gnc dmy2time64: <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 1257-7-2: Year is out of valid range: 1400..10000
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-2-29: Day of month is not valid for year
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-2-33: Day of month value is out of range 1..31
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-13-29: Month number is out of range 1..12
    OK
    /qof/gnc-date/gnc dmy2time64 end: <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 1257-7-2: Year is out of valid range: 1400..10000
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-2-29: Day of month is not valid for year
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-2-33: Day of month value is out of range 1..31
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-13-29: Month number is out of range 1..12
    OK
    /qof/gnc-date/gnc dmy2time64 Neutral: <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 1257-7-2: Year is out of valid range: 1400..10000
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-2-29: Day of month is not valid for year
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-2-33: Day of month value is out of range 1..31
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 2017-13-29: Month number is out of range 1..12
    OK
    /qof/gnc-date/time64 to gdate: OK
    /qof/gnc-date/gdate to time64: <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 1257-7-2: Year is out of valid range: 1400..10000
    <FATAL CRITICAL> (GLib) g_date_get_year: assertion 'g_date_valid (d)' failed
    <FATAL CRITICAL> (GLib) g_date_get_month: assertion 'g_date_valid (d)' failed
    <FATAL CRITICAL> (GLib) g_date_get_day: assertion 'g_date_valid (d)' failed
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 0-0-0: Day of month value is out of range 1..31
    <FATAL CRITICAL> (GLib) g_date_get_year: assertion 'g_date_valid (d)' failed
    <FATAL CRITICAL> (GLib) g_date_get_month: assertion 'g_date_valid (d)' failed
    <FATAL CRITICAL> (GLib) g_date_get_day: assertion 'g_date_valid (d)' failed
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 0-0-0: Day of month value is out of range 1..31
    <FATAL CRITICAL> (GLib) g_date_get_year: assertion 'g_date_valid (d)' failed
    <FATAL CRITICAL> (GLib) g_date_get_month: assertion 'g_date_valid (d)' failed
    <FATAL CRITICAL> (GLib) g_date_get_day: assertion 'g_date_valid (d)' failed
    <FATAL WARNING> (qof.engine) [gnc_dmy2time64_internal()] Date computation error from Y-M-D 0-0-0: Day of month value is out of range 1..31
    OK
    /qof/gnc-date/gnc time64 get day start: OK
    /qof/gnc-date/gnc time64 get day end: OK
    /qof/qof-string-cache/string-cache: OK
    <end of output>
    Test time = 0.01 sec
    ----------------------------------------------------------



    ...........................................
    ----------------------------------------------------------------------
    Ran 43 tests in 0.185s

    OK
    <end of output>
    Test time = 0.39 sec
    ----------------------------------------------------------
    Test Passed.
    "python-bindings" end time: Oct 09 19:29 UTC
    "python-bindings" time elapsed: 00:00:00
    ----------------------------------------------------------

    End testing: Oct 09 19:29 UTC
    + exit 2
    debian/rules:92: recipe for target 'override_dh_auto_test' failed
    make[1]: *** [override_dh_auto_test] Error 2
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    debian/rules:33: recipe for target 'build' failed
    make: *** [build] Error 2
    dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
    --------------------------------------------------------------------------------
    Build finished at 2019-10-09T19:29:18Z

    Finished
    --------


    +------------------------------------------------------------------------------+
    | Cleanup |
    +------------------------------------------------------------------------------+

    Purging /<<BUILDDIR>>
    Not cleaning session: cloned chroot in use
    E: Build failure (dpkg-buildpackage died)

    +------------------------------------------------------------------------------+
    | Summary |
    +------------------------------------------------------------------------------+

    Build Architecture: amd64
    Build Type: binary
    Build-Space: n/a
    Build-Time: 1055
    Distribution: UNRELEASED
    Fail-Stage: build
    Host Architecture: amd64
    Install-Time: 844
    Job: /home/twt/src/bionicSbuild/gnucash_3.7-1ubuntu18.04~sbuild.dsc
    Machine Architecture: amd64
    Package: gnucash
    Package-Time: 1908
    Source-Version: 1:3.7-1ubuntu18.04~sbuild
    Space: n/a
    Status: attempted
    Version: 1:3.7-1ubuntu18.04~sbuild
    --------------------------------------------------------------------------------
    Finished at 2019-10-09T19:29:18Z
    Build needed 00:31:48, no disk space



    EDIT: I assumed maybe I'm missing some major dependencies with sbuild so I tried the following but it failed in the same way:

    $ sbuild --build-dep-resolver=aptitude -d bionic -c bionic-amd64 gnucash_3.7-1ubuntu18.04~sbuild.dsc
    Last edited by Tommy; 1 Week Ago at 09:44 PM. Reason: added new attempt

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •