Created attachment 480590 [details, diff] sys-power/bbswitch-0.8 patch for >=linux 4.12 sys-power/bbswitch-0.8 needs to be patched for 4.12 and higher kernels due to uaccess.h changes. Also, the current bbswitch ebuild is EAPI 5 and doesn't call epatch_user making this bug a little more of a hassle to deal with.
Created attachment 480592 [details] sys-power/bbswitch-0.8 build.log
Created attachment 480594 [details] emerge --info
same here
i put this patch in: /etc/portage/patches/sys-power but i still get: > Emerging (1 of 1) sys-power/bbswitch-0.8::gentoo * bbswitch-0.8.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/4.12.0-gentoo/build * Found sources for kernel version: * 4.12.0-gentoo * Checking for suitable kernel configuration options... [ ok ] >>> Unpacking source... >>> Unpacking bbswitch-0.8.tar.gz to /var/tmp/portage/sys-power/bbswitch-0.8/work >>> Source unpacked in /var/tmp/portage/sys-power/bbswitch-0.8/work >>> Preparing source in /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8 ... ln: failed to create symbolic link 'Module.symvers': File exists * Preparing bbswitch module make -j9 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KVERSION=4.12.0-gentoo default make -C /usr/src/linux M="$(pwd)" modules make[1]: Entering directory '/usr/src/linux-4.12.0-gentoo' CC [M] /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.o /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.c: In function ‘bbswitch_proc_write’: /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.c:317:9: error: implicit declaration of function ‘copy_from_user’ [-Werror=implicit-function-declaration] if (copy_from_user(cmd, buff, len)) ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:309: /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.o] Error 1 make[1]: *** [Makefile:1512: _module_/var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8] Error 2 make[1]: Leaving directory '/usr/src/linux-4.12.0-gentoo' make: *** [Makefile:13: default] Error 2 * ERROR: sys-power/bbswitch-0.8::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-power/bbswitch-0.8::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-power/bbswitch-0.8::gentoo'`. * The complete build log is located at '/mnt/portage/logs/sys-power:bbswitch-0.8:20170706-230712.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-power/bbswitch-0.8/temp/environment'. * Working directory: '/var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8' * S: '/var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8' >>> Failed to emerge sys-power/bbswitch-0.8, Log file:
could someone put this as soon as in portage please? this is a sys package and the patches is there... thanks
Can you update the patch to include within a conditional macro for linux version? I don't want to apply this patch unconditionally, and conditional logic in the ebuild is not the place for it. Conditional preprocessor directives is the way to go.
Created attachment 481732 [details, diff] sys-power/bbswitch-0.8 patch for >=linux 4.12 Sorry about that, for some reason I thought that the patch logic was better suited for the ebuild. I've adjusted the patch with what I think is a working conditional to check the kernel version. If this isn't the right way to do it, I'm open to comments and suggestions to do it properly.
(In reply to Niranjan from comment #7) > Created attachment 481732 [details, diff] [details, diff] > sys-power/bbswitch-0.8 patch for >=linux 4.12 > > Sorry about that, for some reason I thought that the patch logic was better > suited for the ebuild. I've adjusted the patch with what I think is a > working conditional to check the kernel version. If this isn't the right > way to do it, I'm open to comments and suggestions to do it properly. Yeah, conditional patching in ebuilds is pretty frowned upon. Patch looks pretty good. Would you mind switching the conditional logic to >= 4.12 instead of < 4.12? Otherwise, LGTM. I'll give it a test when you update the patch and will commit ASAP.
Created attachment 481802 [details, diff] sys-power/bbswitch-0.8 patch for >=linux 4.12 Changed the logic to >= 4.12 as requested.
Created attachment 481804 [details, diff] sys-power/bbswitch-0.8 patch for >=linux 4.12 Ugh, sorry for the dupe, I didn't obsolete the patch properly.
(In reply to NP-Hardass from comment #8) > (In reply to Niranjan from comment #7) > > Created attachment 481732 [details, diff] [details, diff] [details, diff] > > sys-power/bbswitch-0.8 patch for >=linux 4.12 > > > > Sorry about that, for some reason I thought that the patch logic was better > > suited for the ebuild. I've adjusted the patch with what I think is a > > working conditional to check the kernel version. If this isn't the right > > way to do it, I'm open to comments and suggestions to do it properly. > > Yeah, conditional patching in ebuilds is pretty frowned upon. Patch looks > pretty good. Would you mind switching the conditional logic to >= 4.12 > instead of < 4.12? Otherwise, LGTM. I'll give it a test when you update > the patch and will commit ASAP. please make this ebuild also with epatch_user available.
how far are u with testing? would be nice if we could have a solution for this broken ebuild. thanks
(In reply to tman from comment #12) > how far are u with testing? > > would be nice if we could have a solution for this broken ebuild. > > thanks No news? The problem still persists.
(In reply to Silvio from comment #13) > (In reply to tman from comment #12) > > how far are u with testing? > > > > would be nice if we could have a solution for this broken ebuild. > > > > thanks > > No news? The problem still persists. >>> Emerging (1 of 1) sys-power/bbswitch-0.8::gentoo * bbswitch-0.8.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/4.12.2-gentoo/build * Found sources for kernel version: * 4.12.2-gentoo * Checking for suitable kernel configuration options... [ ok ] >>> Unpacking source... >>> Unpacking bbswitch-0.8.tar.gz to /var/tmp/portage/sys-power/bbswitch-0.8/work >>> Source unpacked in /var/tmp/portage/sys-power/bbswitch-0.8/work >>> Preparing source in /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8 ... ln: failed to create symbolic link 'Module.symvers': File exists * Preparing bbswitch module make -j9 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KVERSION=4.12.2-gentoo default make -C /usr/src/linux M="$(pwd)" modules make[1]: Entering directory '/usr/src/linux-4.12.2-gentoo' CC [M] /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.o /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.c: In function ‘bbswitch_proc_write’: /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.c:317:9: error: implicit declaration of function ‘copy_from_user’ [-Werror=implicit-function-declaration] if (copy_from_user(cmd, buff, len)) ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:309: /var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8/bbswitch.o] Error 1 make[1]: *** [Makefile:1512: _module_/var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8] Error 2 make[1]: Leaving directory '/usr/src/linux-4.12.2-gentoo' make: *** [Makefile:13: default] Error 2 * ERROR: sys-power/bbswitch-0.8::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-power/bbswitch-0.8::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-power/bbswitch-0.8::gentoo'`. * The complete build log is located at '/mnt/portage/logs/sys-power:bbswitch-0.8:20170720-134647.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-power/bbswitch-0.8/temp/environment'. * Working directory: '/var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8' * S: '/var/tmp/portage/sys-power/bbswitch-0.8/work/bbswitch-0.8' >>> Failed to emerge sys-power/bbswitch-0.8, Log file: YES still having problem, still nothing from maintainer :(
Patch works for me and sees to address the changes requested in comment #8. Please commit (and bump the ebuild to EAPI=6 so we can use /etc/portage/patches in the future)
Created attachment 486488 [details] bbswitch ebuild with EAPI bumped to 6 and epatch_user added to src_prepare
(In reply to Niranjan from comment #16) > Created attachment 486488 [details] > bbswitch ebuild with EAPI bumped to 6 and epatch_user added to src_prepare Thanks for all of your help. Resolved in 1b0fc3aa8f51619ce45cf39ed1c27910bba3c1ac
8 months after, couldn't sys-power/bbswitch-0.8-r1 be in stable portage tree ?
(In reply to Christophe PEREZ from comment #18) > 8 months after, couldn't sys-power/bbswitch-0.8-r1 be in stable portage tree > ? Yes. I'll open a stablereq.