Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704580 - sci-geosciences/gpsd - port to EAPI=7
Summary: sci-geosciences/gpsd - port to EAPI=7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sci-geo Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-01-02 16:33 UTC by Michael Weiser
Modified: 2020-07-29 08:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Switch sci-geosciences/gpsd to EAPI=7 (gpsd-9999-eapi7.patch,2.09 KB, patch)
2020-01-02 16:36 UTC, Michael Weiser
Details | Diff
sci-geosciences/gpsd: Update v9999 to EAPI 7 (sci-geosciences-gpsd-Update-v9999-to-EAPI-7.patch,3.87 KB, patch)
2020-03-06 22:49 UTC, Edward Kigwana
Details | Diff
sci-geosciences/gpsd: Update v3.19 to EAPI 7 (sci-geosciences-gpsd-Update-v3.19-to-EAPI-7.patch,3.86 KB, patch)
2020-03-06 22:50 UTC, Edward Kigwana
Details | Diff
Updated ebuilds for 3.19, 3.20 and 9999 (0001-sci-geosciences-gpsd-Update-to-EAPI-7.patch,11.76 KB, patch)
2020-04-15 19:06 UTC, Michael Weiser
Details | Diff
Updated ebuilds for 3.19, 3.20 and 9999 (0001-sci-geosciences-gpsd-Update-to-EAPI-7.patch,17.56 KB, patch)
2020-04-18 10:19 UTC, Michael Weiser
Details | Diff
Make systemd integration work (0002-sci-geosciences-gpsd-Make-systemd-integration-work.patch,7.46 KB, patch)
2020-04-18 10:21 UTC, Michael Weiser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weiser 2020-01-02 16:33:45 UTC
gpsd has a hidden dependency on python 2.7 through scons-util and EAPI=5

Reproducible: Always

Steps to Reproduce:
1. change make.conf to PYTHON_TARGETS="python3_6" (from profile default which includes python2_7)
2. emerge -atuND @world

Actual Results:  
WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

dev-util/scons:0

  (dev-util/scons-3.1.2:0/0::gentoo, ebuild scheduled for merge) USE="-doc -test" PYTHON_TARGETS="python3_6 -python2_7 (-python3_7) (-python3_8)" conflicts with 
    >=dev-util/scons-2.3.0[python_targets_python2_7] required by (sci-geosciences/gpsd-3.19:0/24::gentoo, ebuild scheduled for merge) USE="cxx ipv6 ncurses ntp python shm sockets -X -bluetooth -dbus -debug -latency-timing -qt5 -static -test -udev -usb" GPSD_PROTOCOLS="aivdm ashtech earthmate evermore fury fv18 garmin garmintxt geostar gpsclock greis isync itrax mtk3301 navcom nmea0183 nmea2000 ntrip oceanserver oncore passthrough rtcm104v2 rtcm104v3 sirf skytraq superstar2 tnt tripmate tsip ublox" PYTHON_TARGETS="python3_6 -python2_7"
                           ^^^^^^^^^^^^^^^^^^^^^^^^



Expected Results:  
[ebuild   R    ] sci-geosciences/gpsd-3.19 [3.19] PYTHON_TARGETS="-python2_7*" 
[...]
[nomerge       ]  net-libs/serf-1.3.9-r1 
[ebuild   R    ]   dev-util/scons-3.1.2  PYTHON_TARGETS="-python2_7*" 


app-geosciences/gpsd:
- is EAPI=5
- uses scons build system
- inherits distutils-r1 and scons-util
- declares PYTHON_COMPAT=( python2_7 python3_5 python3_6 )
- distutils-r1.eclass inherits python-r1.eclass if DISTUTILS_SINGLE_IMPL is false
- scons-utils.eclass adds a usedep on python_targets_python2_7 if:
  * EAPI is below 7 and
  * neither python-any-r1
  * nor python-single-r1 are in use:

if [[ ${_PYTHON_ANY_R1} ]]; then
        # when using python-any-r1, use any-of dep API
        BDEPEND="$(python_gen_any_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]")"

        scons-utils_python_check_deps() {
                has_version "${SCONS_DEPEND}[${PYTHON_USEDEP}]"
        }
        python_check_deps() { scons-utils_python_check_deps; }
elif [[ ${_PYTHON_SINGLE_R1} ]]; then
        # when using python-single-r1, use plain PYTHON_USEDEP API
        BDEPEND="${SCONS_DEPEND}[${PYTHON_USEDEP}]
                ${PYTHON_DEPS}"
elif [[ ${EAPI:-0} == [0123456] ]]; then
        # in older EAPIs, just force Python 2.7
        BDEPEND="${SCONS_DEPEND}[python_targets_python2_7]"

Possible avenues based on that logic (ignoring repercussions):
- raise EAPI to 7
- switch to python-any-r1
- switch to python-single-r1
Comment 1 Michael Weiser 2020-01-02 16:36:26 UTC
Created attachment 602326 [details, diff]
Switch sci-geosciences/gpsd to EAPI=7

Minimal changes to switch to EAPI=7, naively replacing use_scons with usex as required by ensuing error messages.
Comment 2 Michael Weiser 2020-01-02 16:39:47 UTC
Portage 2.3.84 (python 3.6.10-final-0, default/linux/arm/17.0/armv7a, gcc-9.2.0, glibc-2.30-r3, 5.4.1-gentoo armv7l)
=================================================================
System uname: Linux-5.4.1-gentoo-armv7l-ARMv7_Processor_rev_4_-v7l-with-gentoo-2.6
KiB Mem:     1033772 total,    189800 free
KiB Swap:     524284 total,    520700 free
Timestamp of repository gentoo: Tue, 31 Dec 2019 19:30:01 +0000
Head commit of repository gentoo: 185e7ee9987b61845800aa53828e01dacf6dcfdd
sh bash 5.0_p11
ld GNU ld (Gentoo 2.33.1 p1) 2.33.1
app-shells/bash:          5.0_p11::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo
dev-util/cmake:           3.16.2-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.1-r2::gentoo
sys-devel/binutils:       2.33.1::gentoo
sys-devel/gcc:            9.2.0-r3::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://local-gentoo-mirror/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

local
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="@FREE"
CBUILD="armv7ve-unknown-linux-gnueabihf"
CFLAGS="-O2 -pipe -mcpu=cortex-a7 -mfpu=vfpv4 -mthumb -fomit-frame-pointer"
CHOST="armv7ve-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -mcpu=cortex-a7 -mfpu=vfpv4 -mthumb -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=10 --with-bdeps=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="arm armv5te armv6 armv6t2 bzip2 caps cli crypt cxx dri filecaps gnutls hardened iconv idn ipv6 libressl logrotate mbox ncurses nptl openmp pam pcre pic pie readline seccomp split-usr ssl ssp tcpd threads unicode urandom xtpax zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 v4 v5 v6 v7 thumb2" CURL_SSL="libressl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-02 16:45:07 UTC
I am changing the Summary as supposing EAPI=5 sets BDEPEND would not have any effect as that EAPI does not even recognise BDEPEND.
Comment 4 Michael Weiser 2020-01-02 16:47:35 UTC
Thanks, Jeroen. scons-util.eclass tackles this 10 lines down:

if [[ ${EAPI:-0} == [0123456] ]]; then
    DEPEND=${BDEPEND}
    unset BDEPEND
fi
Comment 5 Edward Kigwana 2020-03-06 22:48:02 UTC
I guess I am late to the party. I have attached what I did.
Comment 6 Edward Kigwana 2020-03-06 22:49:14 UTC
Created attachment 617348 [details, diff]
sci-geosciences/gpsd: Update v9999 to EAPI 7
Comment 7 Edward Kigwana 2020-03-06 22:50:06 UTC
Created attachment 617350 [details, diff]
sci-geosciences/gpsd: Update v3.19 to EAPI 7
Comment 8 Michael Weiser 2020-04-15 19:06:03 UTC
Created attachment 633108 [details, diff]
Updated ebuilds for 3.19, 3.20 and 9999

Thanks Edward! Here's my latest attempt based on your changes and stuff I ran into myself recently. It adds 3.20, a more robust workaround for deleting the scons-installed python stuff, switch to the dialout group and acct-user scheme and workaround for recent changes to the build system.

BTW: According to my tests, the CC and CXX variables are still required to pass the actual compiler in use (e.g. clang or cross-compiler) to scons.
Comment 9 Michael Weiser 2020-04-18 10:19:01 UTC
Created attachment 633560 [details, diff]
Updated ebuilds for 3.19, 3.20 and 9999

Latest attempt, fixing the switch to the dialout group by actually supplying the group to the build system. Also, apparently, the 3.20 ebuild was missing from the previous patch.
Comment 10 Michael Weiser 2020-04-18 10:21:22 UTC
Created attachment 633564 [details, diff]
Make systemd integration work

Parking this here since it depends on the previous patch until we have decided whether and how to split these patches into separate bugs.
Comment 11 Rick Farina (Zero_Chaos) gentoo-dev 2020-07-29 02:47:24 UTC
Nearly all of this has been addressed in one way or another in gpsd-3.20 and the updated gpsd-9999.

Thanks a bunch to the folks submitting information on this bug.  To avoid confusion, if I missed anything critical, please open a new bug.

Thanks!
Comment 12 Thomas Bettler 2020-07-29 07:48:24 UTC
thanks for this new ebuild.
one remaining issue reported in bug #734352
Comment 13 Thomas Bettler 2020-07-29 08:33:20 UTC
another issue is BDEP missing scons filed in bug #734364