Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935737 - app-misc/openhab-bin-4.1.2 reports as 4.1.1 after upgrade of 4.1.1
Summary: app-misc/openhab-bin-4.1.2 reports as 4.1.1 after upgrade of 4.1.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Florian Schmaus
URL: https://forums.gentoo.org/viewtopic-p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-08 08:37 UTC by Xavier Miller
Modified: 2024-07-18 15:00 UTC (History)
2 users (show)

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


Attachments
openhab openrc script (openhab,437 bytes, text/plain)
2024-07-18 13:39 UTC, Xavier Miller
Details
patch for non-systemd users: elog messages with operations to apply (openhab-bin-4.2.0.ebuild.-openrc-patch,737 bytes, patch)
2024-07-18 13:42 UTC, Xavier Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Miller 2024-07-08 08:37:08 UTC
I did upgrade openhab-bin from version 4.1.1 to 4.1.2 but openhab reports itself as version 4.1.1

Seems the upgrade needs to run an upgrade script.

I started a threads months ago but since this ebuild sits in the main gentoo tree I file a but instead.

Version 4.2 is out today and I would like that the upgrade will be OK.

If not, I will switch back to a manual install.

PS: please also include an openrc init script, would be nice :-)



INFO:
# zcat /var/log/openhab/openhab.log.1.gz  | head -n 1
2024-06-27 21:42:05.293 [INFO ] [org.openhab.core.Activator          ] - Starting openHAB 4.1.1 (build Release Build)

[ebuild   R   *] app-misc/openhab-bin-4.1.2::gentoo  0 KiB
Comment 1 Xavier Miller 2024-07-08 08:39:26 UTC
# emerge --info
Portage 3.0.65 (python 3.12.4-final-0, default/linux/arm/23.0/armv7a_hf, gcc-14, glibc-2.39-r9, 6.6.36 armv7l)
=================================================================
System uname: Linux-6.6.36-armv7l-ARMv7_Processor_rev_1_-v7l-with-glibc2.39
KiB Mem:     2070132 total,    142252 free
KiB Swap:    4194196 total,   4190868 free
Timestamp of repository gentoo: Thu, 27 Jun 2024 15:49:09 +0000
Timestamp of repository guru: Thu, 27 Jun 2024 08:49:05 +0000
sh bash 5.2_p26-r5
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r5::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.29.3::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.4_p1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             14.1.1_p20240622::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.9::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r9::gentoo
Repositories:

gentoo
    location: /var/portage/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 

audio-overlay
    location: /var/portage/repos/audio-overlay
    masters: gentoo
    volatile: True

guru
    location: /var/portage/repos/guru
    masters: gentoo
    volatile: True

inode64-overlay
    location: /var/portage/repos/inode64-overlay
    masters: gentoo
    volatile: True

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

crossdev
    location: /data/nas/xavier/portage/helios4/var/db/repos/crossdev
    masters: gentoo
    priority: 10
    volatile: True

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="@FREE as-is freedist"
CBUILD="armv7a-unknown-linux-gnueabihf"
CFLAGS="-O2 -pipe -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -mtune=cortex-a9 -marm -march=armv7-a+mp+sec+neon-fp16"
CHOST="armv7a-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/zigbee2mqtt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O2 -pipe -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -mtune=cortex-a9 -marm -march=armv7-a+mp+sec+neon-fp16"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --quiet-build=n --buildpkg"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_BE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed"
LEX="flex"
LINGUAS="fr fr-BE fr-FR nl nl-BE nl-NL en en-GB en-US"
MAKEOPTS="-j5 -l7"
PKGDIR="/var/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"
SHELL="/bin/bash"
USE="arm armv7 bzip2 crypt exif gif headless-awt iconv jpeg lzma mysql ncurses nls openmp openssl pam pcre pdf png pnm readline seccomp sqlite ssl svg system-bootstrap system-llvm test-rust tiff truetype unicode xattr zlib zstd" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 vfp-d32 v4 v5 v6 v7 thumb2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="fr fr-BE fr-FR nl nl-BE nl-NL en en-GB en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="18" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31" SANE_BACKENDS="hp" VIDEO_CARDS="exynos fbdev omap dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Florian Schmaus gentoo-dev 2024-07-10 20:22:06 UTC
Thanks for reporting this. It is a know issue. I have some commands ready for pkg_postinst() that should fix this on issue (basically dropping the internal Open hab Caches).
Comment 3 Larry the Git Cow gentoo-dev 2024-07-15 19:39:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4c3e76f042074370e93beb05796a25da93574a1

commit a4c3e76f042074370e93beb05796a25da93574a1
Author:     Florian Schmaus <flow@gentoo.org>
AuthorDate: 2024-07-15 19:38:15 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2024-07-15 19:38:15 +0000

    app-misc/openhab-bin: add update logic
    
    Closes: https://bugs.gentoo.org/935737
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 app-misc/openhab-bin/openhab-bin-4.1.2.ebuild | 29 +++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)
Comment 4 Xavier Miller 2024-07-15 20:49:19 UTC
I use openrc, not systemd, how to apply the upgrade on openrc systems?
Comment 5 Florian Schmaus gentoo-dev 2024-07-16 06:24:07 UTC
If you look at the changes of the build, especially the pkg_postinst() phase, you will find that the secret is simply running "openhab-cli clean-cache" while OpenHAB is not running.

Feel free to contribute openrc runscripts and ebuild logic for OpenHAB in Gentoo.
Comment 6 Xavier Miller 2024-07-16 14:31:05 UTC
Io(In reply to Florian Schmaus from comment #5)
> If you look at the changes of the build, especially the pkg_postinst()
> phase, you will find that the secret is simply running "openhab-cli
> clean-cache" while OpenHAB is not running.
> 
> Feel free to contribute openrc runscripts and ebuild logic for OpenHAB in
> Gentoo.

Sure, will do it :-)
I'll send my openrc script and patch the ebuild
Comment 7 Xavier Miller 2024-07-16 19:35:06 UTC
BTW calling openhab-cli clean-cache did the fix on my 4.1.2 version.

2024-07-16 21:29:43.873 [INFO ] [org.openhab.core.Activator          ] - Starting openHAB 4.1.2 (build Release Build)


I will patch the ebuild with openrc script and will test it on 4.2
Comment 8 Xavier Miller 2024-07-18 13:39:28 UTC
Created attachment 897927 [details]
openhab openrc script

to add in the files/ directory of the ebuild
Comment 9 Xavier Miller 2024-07-18 13:42:06 UTC
Created attachment 897928 [details, diff]
patch for non-systemd users: elog messages with operations to apply

I tried to do stop the openrc service but the openhab process got corrupted after the update and clean-cache failed

I also observed that some openhab directories were not attributed to openhab users so I had to run openhab-cli reset-ownership
I found safer to ask the user to manually clean the cache
Comment 10 Xavier Miller 2024-07-18 13:43:45 UTC
BTW with my patched ebuild I could upgrade openhab to version 4.2
I see some directories were not ownedby openha, I had to run openhab-cli reset-ownership too
Comment 11 Florian Schmaus gentoo-dev 2024-07-18 15:00:18 UTC
Please create a new bug for OpenRC support for OpenHAB.