public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] genkernel version parsing problem
@ 2016-04-15  7:54 Marco Gigante
  2016-04-21  5:41 ` Leno Hou
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Marco Gigante @ 2016-04-15  7:54 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

Hi,
I got a problem with catalyst and latest version of genkernel, installed 
with genkernel-9999 ebuild.
genkernel --version returns v3.5.0.1 (with the 'v' prefix) and catalyst 
fails to check the minimal required version.

I made a quick fix which worked for me and wanted to share it for comments.

Thanks
marco

[-- Attachment #2: check_genkernel_version.diff --]
[-- Type: text/x-patch, Size: 604 bytes --]

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 456ae4c..bcb22f4 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -21,6 +21,7 @@ check_genkernel_version(){
 	if [ -x /usr/bin/genkernel ]
 	then
 		genkernel_version=$(genkernel --version)
+		genkernel_version=${genkernel_version//[^0-9\.]/}	# keep just numbers and dots
 		genkernel_version_major=${genkernel_version%%.*}
 		genkernel_version_minor_sub=${genkernel_version#${genkernel_version_major}.}
 		genkernel_version_minor=${genkernel_version_minor_sub%%.*}

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-15  7:54 [gentoo-catalyst] genkernel version parsing problem Marco Gigante
@ 2016-04-21  5:41 ` Leno Hou
  2016-04-21  5:42 ` Mike Frysinger
  2016-04-21 17:05 ` Mike Frysinger
  2 siblings, 0 replies; 11+ messages in thread
From: Leno Hou @ 2016-04-21  5:41 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

On Fri, Apr 15, 2016 at 3:54 PM, Marco Gigante <m.gigante@nextworks.it>
wrote:

> Hi,
> I got a problem with catalyst and latest version of genkernel, installed
> with genkernel-9999 ebuild.
> genkernel --version returns v3.5.0.1 (with the 'v' prefix) and catalyst
> fails to check the minimal required version.
>
> I made a quick fix which worked for me and wanted to share it for comments.
>
> Thanks
> marco
>

Thanks, yesterday I have faced the problem you said and this works fine
with me~~

-Leno Hou

[-- Attachment #2: Type: text/html, Size: 988 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-15  7:54 [gentoo-catalyst] genkernel version parsing problem Marco Gigante
  2016-04-21  5:41 ` Leno Hou
@ 2016-04-21  5:42 ` Mike Frysinger
  2016-04-21  5:48   ` Leno Hou
  2016-04-21 17:05 ` Mike Frysinger
  2 siblings, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2016-04-21  5:42 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: robbat2

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

On 15 Apr 2016 09:54, Marco Gigante wrote:
> I got a problem with catalyst and latest version of genkernel, installed 
> with genkernel-9999 ebuild.
> genkernel --version returns v3.5.0.1 (with the 'v' prefix) and catalyst 
> fails to check the minimal required version.

is this new to 3.5.0.1 ?  or did it happen with 3.5.0.0 ?  i don't think
it was intentional, so we can always just change genkernel ...
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-21  5:42 ` Mike Frysinger
@ 2016-04-21  5:48   ` Leno Hou
  2016-04-21  6:21     ` Mike Frysinger
  2016-04-21  6:34     ` Marco Gigante
  0 siblings, 2 replies; 11+ messages in thread
From: Leno Hou @ 2016-04-21  5:48 UTC (permalink / raw
  To: gentoo-catalyst, robbat2

[-- Attachment #1: Type: text/plain, Size: 628 bytes --]

On Thu, Apr 21, 2016 at 1:42 PM, Mike Frysinger <vapier@gentoo.org> wrote:

> On 15 Apr 2016 09:54, Marco Gigante wrote:
> > I got a problem with catalyst and latest version of genkernel, installed
> > with genkernel-9999 ebuild.
> > genkernel --version returns v3.5.0.1 (with the 'v' prefix) and catalyst
> > fails to check the minimal required version.
>
> is this new to 3.5.0.1 ?  or did it happen with 3.5.0.0 ?  i don't think
> it was intentional, so we can always just change genkernel ...
> -mike
>

Faced the problem only in v3.5.0.1. Not happen in v3.5.0.0

leno@localhost ~ $ genkernel --version

v3.5.0.1

-Leno Hou

[-- Attachment #2: Type: text/html, Size: 1611 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-21  5:48   ` Leno Hou
@ 2016-04-21  6:21     ` Mike Frysinger
  2016-04-21  6:29       ` Leno Hou
  2016-04-21  6:34       ` Leno Hou
  2016-04-21  6:34     ` Marco Gigante
  1 sibling, 2 replies; 11+ messages in thread
From: Mike Frysinger @ 2016-04-21  6:21 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: robbat2

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

On 21 Apr 2016 13:48, Leno Hou wrote:
> On Thu, Apr 21, 2016 at 1:42 PM, Mike Frysinger wrote:
> > On 15 Apr 2016 09:54, Marco Gigante wrote:
> > > I got a problem with catalyst and latest version of genkernel, installed
> > > with genkernel-9999 ebuild.
> > > genkernel --version returns v3.5.0.1 (with the 'v' prefix) and catalyst
> > > fails to check the minimal required version.
> >
> > is this new to 3.5.0.1 ?  or did it happen with 3.5.0.0 ?  i don't think
> > it was intentional, so we can always just change genkernel ...
> 
> Faced the problem only in v3.5.0.1. Not happen in v3.5.0.0
> 
> leno@localhost ~ $ genkernel --version
> 
> v3.5.0.1

i made the 3.5.0.1 release and def did not mean to make that change.
but in looking at the git history, i'm not seeing anything since the
3.5.0.0 tag that looks relevant.

that said, i'm not seeing this behavior:
$ genkernel --version
3.5.0.1

and when i look at the source, it's OK:
$ tar xf /usr/portage/distfiles/genkernel-3.5.0.1.tar.xz 
$ grep ^GK genkernel-3.5.0.1/genkernel
GK_V='3.5.0.1'

so where are you guys getting that "v" from ?  if your GK_V var is
also set correctly, send over the output from running:
$ bash -x genkernel --version
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-21  6:21     ` Mike Frysinger
@ 2016-04-21  6:29       ` Leno Hou
  2016-04-21  6:34       ` Leno Hou
  1 sibling, 0 replies; 11+ messages in thread
From: Leno Hou @ 2016-04-21  6:29 UTC (permalink / raw
  To: gentoo-catalyst, robbat2

[-- Attachment #1: Type: text/plain, Size: 5294 bytes --]

On Thu, Apr 21, 2016 at 2:21 PM, Mike Frysinger <vapier@gentoo.org> wrote:

> On 21 Apr 2016 13:48, Leno Hou wrote:
> > On Thu, Apr 21, 2016 at 1:42 PM, Mike Frysinger wrote:
> > > On 15 Apr 2016 09:54, Marco Gigante wrote:
> > > > I got a problem with catalyst and latest version of genkernel,
> installed
> > > > with genkernel-9999 ebuild.
> > > > genkernel --version returns v3.5.0.1 (with the 'v' prefix) and
> catalyst
> > > > fails to check the minimal required version.
> > >
> > > is this new to 3.5.0.1 ?  or did it happen with 3.5.0.0 ?  i don't
> think
> > > it was intentional, so we can always just change genkernel ...
> >
> > Faced the problem only in v3.5.0.1. Not happen in v3.5.0.0
> >
> > leno@localhost ~ $ genkernel --version
> >
> > v3.5.0.1
>
> i made the 3.5.0.1 release and def did not mean to make that change.
> but in looking at the git history, i'm not seeing anything since the
> 3.5.0.0 tag that looks relevant.
>
> that said, i'm not seeing this behavior:
> $ genkernel --version
> 3.5.0.1
>
> and when i look at the source, it's OK:
> $ tar xf /usr/portage/distfiles/genkernel-3.5.0.1.tar.xz
> $ grep ^GK genkernel-3.5.0.1/genkernel
> GK_V='3.5.0.1'
>
> so where are you guys getting that "v" from ?  if your GK_V var is
> also set correctly, send over the output from running:
> $ bash -x genkernel --version

leno@localhost ~ $ bash -x genkernel --version

+
PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/powerpc64le-unknown-linux-gnu/gcc-bin/5.3.0:/sbin:/usr/sbin

+ GK_V=v3.5.0.1

+ TMPDIR=/var/tmp/genkernel

+ TODEBUGCACHE=1

+ (( i=1 ))

+ (( i<=1  ))

+ eval 'arg=$1'

++ arg=--version

+ [[ --version = --config=* ]]

+ (( i=i+1  ))

+ (( i<=1  ))

+ _GENKERNEL_CONF=/etc/genkernel.conf

+ source /etc/genkernel.conf

++ OLDCONFIG=yes

++ MENUCONFIG=no

++ CLEAN=yes

++ MRPROPER=yes

++ MOUNTBOOT=yes

++ SAVE_CONFIG=yes

++ USECOLOR=yes

++ DISKLABEL=yes

++ GK_SHARE=/usr/share/genkernel

++ CACHE_DIR=/var/cache/genkernel

++ DISTDIR=/usr/share/genkernel/distfiles

++ LOGFILE=/var/log/genkernel.log

++ LOGLEVEL=1

++ DEFAULT_KERNEL_SOURCE=/usr/src/linux

+ LOGLEVEL=1

+ source /usr/share/genkernel/defaults/software.sh

++ BUSYBOX_VER=1.20.2

++ BUSYBOX_SRCTAR=/usr/share/genkernel/distfiles/busybox-1.20.2.tar.bz2

++ BUSYBOX_DIR=busybox-1.20.2

++ BUSYBOX_BINCACHE=%%CACHE%%/busybox-1.20.2-%%ARCH%%.tar.bz2

++ LVM_VER=2.02.88

++ LVM_DIR=LVM2.2.02.88

++ LVM_SRCTAR=/usr/share/genkernel/distfiles/LVM2.2.02.88.tgz

++ LVM_BINCACHE=%%CACHE%%/LVM2.2.02.88-%%ARCH%%.tar.bz2

++ MDADM_VER=3.1.5

++ MDADM_DIR=mdadm-3.1.5

++ MDADM_SRCTAR=/usr/share/genkernel/distfiles/mdadm-3.1.5.tar.bz2

++ MDADM_BINCACHE=%%CACHE%%/mdadm-3.1.5-%%ARCH%%.tar.bz2

++ DMRAID_VER=1.0.0.rc16-3

++ DMRAID_DIR=dmraid/1.0.0.rc16-3/dmraid

++ DMRAID_SRCTAR=/usr/share/genkernel/distfiles/dmraid-1.0.0.rc16-3.tar.bz2

++ DMRAID_BINCACHE=%%CACHE%%/dmraid-1.0.0.rc16-3-%%ARCH%%.tar.bz2

++ ISCSI_VER=2.0-872

++ ISCSI_DIR=open-iscsi-2.0-872

++ ISCSI_SRCTAR=/usr/share/genkernel/distfiles/open-iscsi-2.0-872.tar.gz

++ ISCSI_BINCACHE=%%CACHE%%/iscsi-2.0-872-%%ARCH%%.bz2

++ FUSE_VER=2.8.6

++ FUSE_DIR=fuse-2.8.6

++ FUSE_SRCTAR=/usr/share/genkernel/distfiles/fuse-2.8.6.tar.gz

++ FUSE_BINCACHE=%%CACHE%%/fuse-2.8.6-%%ARCH%%.tar.bz2

++ UNIONFS_FUSE_VER=0.24

++ UNIONFS_FUSE_DIR=unionfs-fuse-0.24

++
UNIONFS_FUSE_SRCTAR=/usr/share/genkernel/distfiles/unionfs-fuse-0.24.tar.bz2

++ UNIONFS_FUSE_BINCACHE=%%CACHE%%/unionfs-fuse-0.24-%%ARCH%%.bz2

++ GPG_VER=1.4.11

++ GPG_DIR=gnupg-1.4.11

++ GPG_SRCTAR=/usr/share/genkernel/distfiles/gnupg-1.4.11.tar.bz2

++ GPG_BINCACHE=%%CACHE%%/gnupg-1.4.11-%%ARCH%%.bz2

+ source /usr/share/genkernel/defaults/config.sh

++ KERNEL_MAKE_DIRECTIVE=--INVALID--

++ DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE=--INVALID--

++ KERNEL_MAKE_DIRECTIVE_OVERRIDE=--INVALID--

++ KERNEL_MAKE_DIRECTIVE_2=

++ KERNEL_BINARY=--INVALID--

++ KERNEL_BINARY_OVERRIDE=

++ DEFAULT_COMPRESS_INITRD=yes

++ DEFAULT_COMPRESS_INITRD_TYPE=best

+++ portageq envvar MAKEOPTS

++ PORTAGE_MAKEOPTS=

++ DEFAULT_MAKEOPTS=' -j2'

++ DEFAULT_KERNEL_MAKE=make

++ DEFAULT_UTILS_MAKE=make

++ DEFAULT_KERNEL_CC=gcc

++ DEFAULT_KERNEL_AS=as

++ DEFAULT_KERNEL_LD=ld

++ DEFAULT_UTILS_CC=gcc

++ DEFAULT_UTILS_AS=as

++ DEFAULT_UTILS_LD=ld

+ source /usr/share/genkernel/gen_funcs.sh

++ setColorVars

++ isTrue yes

++ case "$1" in

++ return 0

++ GOOD=''

++ WARN=''

++ BAD=''

++ NORMAL=''

++ BOLD=''

++ UNDER=''

+ source /usr/share/genkernel/gen_cmdline.sh

+ source /usr/share/genkernel/gen_arch.sh

+ source /usr/share/genkernel/gen_determineargs.sh

+ source /usr/share/genkernel/gen_compile.sh

+ source /usr/share/genkernel/gen_configkernel.sh

+ source /usr/share/genkernel/gen_initramfs.sh

++ COPY_BINARIES=false

++ CPIO_ARGS='--quiet -o -H newc --owner root:root --force-local'

+ source /usr/share/genkernel/gen_moddeps.sh

+ source /usr/share/genkernel/gen_package.sh

+ source /usr/share/genkernel/gen_bootloader.sh

+ TEMP=/var/tmp/genkernel/25303.5280.20958.30535

+ trap trap_cleanup SIGHUP SIGQUIT SIGINT SIGTERM SIGKILL

+ BUILD_KERNEL=0

+ BUILD_RAMDISK=0

+ BUILD_MODULES=0

+ Options=--version

+ '[' 1 -gt 0 ']'

+ Option=--version

+ shift

+ parse_cmdline --version

+ case "$*" in

+ echo v3.5.0.1

v3.5.0.1

+ exit 0

-Leno Hou

[-- Attachment #2: Type: text/html, Size: 22903 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-21  5:48   ` Leno Hou
  2016-04-21  6:21     ` Mike Frysinger
@ 2016-04-21  6:34     ` Marco Gigante
  1 sibling, 0 replies; 11+ messages in thread
From: Marco Gigante @ 2016-04-21  6:34 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

On 21/04/2016 07:48, Leno Hou wrote:
> On Thu, Apr 21, 2016 at 1:42 PM, Mike Frysinger <vapier@gentoo.org 
> <mailto:vapier@gentoo.org>> wrote:
>
>     On 15 Apr 2016 09:54, Marco Gigante wrote:
>     > I got a problem with catalyst and latest version of genkernel,
>     installed
>     > with genkernel-9999 ebuild.
>     > genkernel --version returns v3.5.0.1 (with the 'v' prefix) and
>     catalyst
>     > fails to check the minimal required version.
>
>     is this new to 3.5.0.1 ?  or did it happen with 3.5.0.0 ?  i don't
>     think
>     it was intentional, so we can always just change genkernel ...
>

I looked at genkernel before writing and GK_V is "3.5.0.1". Couldn't 
quickly figure out where the 'v' comes from.

I just analysed the issue, and it is the genkernel-9999 ebuild which 
modifies the GK_V into src_prepare(), by picking the git tag as version 
number.
Not sure which is better, change genkernel or catalyst. I guess 
protecting version check in catalyst will make it more reliable anyway.

-marco

>     -mike
>
>
> Faced the problem only in v3.5.0.1. Not happen in v3.5.0.0
>
> leno@localhost~ $ genkernel --version
>
> v3.5.0.1
>
>
> -Leno Hou


[-- Attachment #2: Type: text/html, Size: 3744 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-21  6:21     ` Mike Frysinger
  2016-04-21  6:29       ` Leno Hou
@ 2016-04-21  6:34       ` Leno Hou
  2016-04-21 16:43         ` Mike Frysinger
  1 sibling, 1 reply; 11+ messages in thread
From: Leno Hou @ 2016-04-21  6:34 UTC (permalink / raw
  To: gentoo-catalyst, Robin Johnson

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

On Thu, Apr 21, 2016 at 2:21 PM, Mike Frysinger <vapier@gentoo.org> wrote:

>
> i made the 3.5.0.1 release and def did not mean to make that change.
> but in looking at the git history, i'm not seeing anything since the
> 3.5.0.0 tag that looks relevant.
>
> that said, i'm not seeing this behavior:
> $ genkernel --version
> 3.5.0.1
>
> and when i look at the source, it's OK:
> $ tar xf /usr/portage/distfiles/genkernel-3.5.0.1.tar.xz
> $ grep ^GK genkernel-3.5.0.1/genkernel
> GK_V='3.5.0.1'
>
>
Sorry, this happens in genkernel-9999

[-- Attachment #2: Type: text/html, Size: 993 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-21  6:34       ` Leno Hou
@ 2016-04-21 16:43         ` Mike Frysinger
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2016-04-21 16:43 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Robin Johnson, m.gigante

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

On 21 Apr 2016 14:34, Leno Hou wrote:
> On Thu, Apr 21, 2016 at 2:21 PM, Mike Frysinger wrote:
> > i made the 3.5.0.1 release and def did not mean to make that change.
> > but in looking at the git history, i'm not seeing anything since the
> > 3.5.0.0 tag that looks relevant.
> >
> > that said, i'm not seeing this behavior:
> > $ genkernel --version
> > 3.5.0.1
> >
> > and when i look at the source, it's OK:
> > $ tar xf /usr/portage/distfiles/genkernel-3.5.0.1.tar.xz
> > $ grep ^GK genkernel-3.5.0.1/genkernel
> > GK_V='3.5.0.1'
>
> Sorry, this happens in genkernel-9999

ok, that makes more sense.  i'll update the ebuild so that it doesn't
add the v prefix and so it includes 9999 so it's clear where the code
is coming from.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-15  7:54 [gentoo-catalyst] genkernel version parsing problem Marco Gigante
  2016-04-21  5:41 ` Leno Hou
  2016-04-21  5:42 ` Mike Frysinger
@ 2016-04-21 17:05 ` Mike Frysinger
  2016-04-22  6:49   ` Marco Gigante
  2 siblings, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2016-04-21 17:05 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

On 15 Apr 2016 09:54, Marco Gigante wrote:
> I got a problem with catalyst and latest version of genkernel, installed 
> with genkernel-9999 ebuild.
> genkernel --version returns v3.5.0.1 (with the 'v' prefix) and catalyst 
> fails to check the minimal required version.

i've fixed the ebuild here:
	https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=187ec2310c21c0c96812dec5e2d2a13172492ca9

with that in place, i don't think any changes to catalyst are needed.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-catalyst] genkernel version parsing problem
  2016-04-21 17:05 ` Mike Frysinger
@ 2016-04-22  6:49   ` Marco Gigante
  0 siblings, 0 replies; 11+ messages in thread
From: Marco Gigante @ 2016-04-22  6:49 UTC (permalink / raw
  To: gentoo-catalyst

On 21/04/2016 19:05, Mike Frysinger wrote:
> On 15 Apr 2016 09:54, Marco Gigante wrote:
>> I got a problem with catalyst and latest version of genkernel, installed
>> with genkernel-9999 ebuild.
>> genkernel --version returns v3.5.0.1 (with the 'v' prefix) and catalyst
>> fails to check the minimal required version.
> i've fixed the ebuild here:
> 	https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=187ec2310c21c0c96812dec5e2d2a13172492ca9
>
> with that in place, i don't think any changes to catalyst are needed.

Will try it asap.
Thanks a lot for the fix and the help.

-marco

> -mike



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-04-22  6:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15  7:54 [gentoo-catalyst] genkernel version parsing problem Marco Gigante
2016-04-21  5:41 ` Leno Hou
2016-04-21  5:42 ` Mike Frysinger
2016-04-21  5:48   ` Leno Hou
2016-04-21  6:21     ` Mike Frysinger
2016-04-21  6:29       ` Leno Hou
2016-04-21  6:34       ` Leno Hou
2016-04-21 16:43         ` Mike Frysinger
2016-04-21  6:34     ` Marco Gigante
2016-04-21 17:05 ` Mike Frysinger
2016-04-22  6:49   ` Marco Gigante

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox