Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 589730

Summary: net-misc-netifrc-0.4.0 fails to build due to OS variable of "Gentoo" not being supported
Product: Gentoo Linux Reporter: Simon Alman <haven>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: haven
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Adding a proposed patch to add in support for the Gentoo OS type

Description Simon Alman 2016-07-26 08:11:05 UTC
netifrc expects the OS variable to be FreeBSD or Linux. On a Gentoo system it is set to "Gentoo" (at least for me) and netifrc fails to build due to this.

Reproducible: Always

Steps to Reproduce:
1. check OS variable is set to Gentoo: echo ${OS}
2. emerge netifrc
3.
Actual Results:  
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-misc/netifrc-0.4.0::gentoo
 * netifrc-0.4.0.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                                                                                            [ ok ]
>>> Unpacking source...
>>> Unpacking netifrc-0.4.0.tar.bz2 to /var/tmp/portage/net-misc/netifrc-0.4.0/work
>>> Source unpacked in /var/tmp/portage/net-misc/netifrc-0.4.0/work
>>> Preparing source in /var/tmp/portage/net-misc/netifrc-0.4.0/work/netifrc-0.4.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-misc/netifrc-0.4.0/work/netifrc-0.4.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-misc/netifrc-0.4.0/work/netifrc-0.4.0 ...
make -j21 UDEVDIR=/lib/udev LIBEXECDIR=/lib/netifrc PF=netifrc-0.4.0 all
mk/os.mk:9: mk/os-Gentoo.mk: No such file or directory
make: *** No rule to make target 'mk/os-Gentoo.mk'.  Stop.
 * ERROR: net-misc/netifrc-0.4.0::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-misc/netifrc-0.4.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/netifrc-0.4.0::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-misc:netifrc-0.4.0:20160726-065901.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-misc/netifrc-0.4.0/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/netifrc-0.4.0/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/netifrc-0.4.0/work/netifrc-0.4.0'
 * S: '/var/tmp/portage/net-misc/netifrc-0.4.0/work/netifrc-0.4.0'

>>> Failed to emerge net-misc/netifrc-0.4.0, Log file:

>>>  '/var/log/portage/net-misc:netifrc-0.4.0:20160726-065901.log.gz'

 * Messages for package net-misc/netifrc-0.4.0:

 * ERROR: net-misc/netifrc-0.4.0::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-misc/netifrc-0.4.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/netifrc-0.4.0::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-misc:netifrc-0.4.0:20160726-065901.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-misc/netifrc-0.4.0/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/netifrc-0.4.0/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/netifrc-0.4.0/work/netifrc-0.4.0'
 * S: '/var/tmp/portage/net-misc/netifrc-0.4.0/work/netifrc-0.4.0'


Intalling netifrc via:

OS='Linux' emerge netifrc

works fine
Comment 1 Simon Alman 2016-07-26 08:13:49 UTC
Created attachment 441610 [details, diff]
Adding a proposed patch to add in support for the Gentoo OS type

Adding in patch that adds support for OS='Gentoo'. I've tested this via my patches directory:

/etc/portage/patches/net-misc/netifrc/netifrc-gentoo.patch

This is just one approach - we could instead set the OS env variable within the ebuild is another option.
Comment 2 Simon Alman 2016-07-26 11:10:38 UTC
When OS='Gentoo' then /lib/netifrc/sh/functions.sh does not get built. Looks like the best way is to ensure that OS is unset and then this important file does get built. Ignore the patch option.
Comment 3 Simon Alman 2016-07-26 11:14:59 UTC
Ok now I feel stupid - turns out I'm setting OS=Gentoo in an old .bashrc file.

I'll close this ticket off as user error.