Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Emerge failing with [Errno 22] Invalid argument
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
landdie
n00b
n00b


Joined: 10 Sep 2013
Posts: 26
Location: Southern Sweden

PostPosted: Tue Nov 12, 2013 5:21 pm    Post subject: [SOLVED]Emerge failing with [Errno 22] Invalid argument Reply with quote

Hiya, got a problem. Emerge is bailing with..
Quote:
[Errno 22] Invalid argument:
/bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/libnetfilter_queue-1.0.2.tar.bz2 http://de-mirror.org/gentoo/distfiles/libnetfilter_queue-1.0.2.tar.bz2
Traceback (most recent call last):
File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
unshare_net, unshare_ipc, cgroup)
File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
pre_exec()
File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
setexec(self._con)
File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading '#http://ftp.df.lth.se/pub/gentoo/distfiles/libnetfilter_queue-1.0.2.tar.bz2'
[Errno 22] Invalid argument:

In this instance it happened whilst trying to emerge conntrack-tools but the same thing happens whatever I try emerging with the same error lines so I deduce it is something fundamental!

If any of you good folks have an idea on this one I'd really appreciate hearing it! :)


Last edited by landdie on Thu Jan 23, 2014 5:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
landdie
n00b
n00b


Joined: 10 Sep 2013
Posts: 26
Location: Southern Sweden

PostPosted: Wed Nov 13, 2013 7:11 pm    Post subject: Still no go. Reply with quote

So I have made a manual fix on portage.
    tar xfj /usr/portage/distfiles/portage-2.2.7.tar.bz2
    rm -rf /usr/lib/portage/*
    cp -R pym bin /usr/lib/portage/

Which sadly didn't help. Then I got it in my head it might be something to do with the dev-lang/python-exec issue as in "News 9". I did a world update at the inappropriate moment :( So I unmerged dev-lang/python-exec. but no joy. I'm still stuck with a system where all emerge attempts end with....
Quote:
[Errno 22] Invalid argument:
/bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/python-exec-2.0.tar.bz2 http://cdn.bitbucket.org/mgorny/python-exec/downloads/python-exec-2.0.tar.bz2
Traceback (most recent call last):
File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
unshare_net, unshare_ipc, cgroup)
File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
pre_exec()
File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
setexec(self._con)
File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
!!! Couldn't download 'python-exec-2.0.tar.bz2'. Aborting.
* Fetch failed for 'dev-lang/python-exec-2.0', Log file:
* '/home/portage_log/dev-lang:python-exec-2.0:20131113-182939.log'

So now I'd really like to know what is the most sensible way to re-install dev-lang/python-exec without a working portage and is it possible this package could be causing my problem.?

Many thanks in advance for any help, hints or tips, I've been building this server for four weeks now and don't fancy starting over. 8O
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Thu Nov 14, 2013 12:30 am    Post subject: Reply with quote

Why does this line go ' wget wget' ?
Anything in your that could explain this ?
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9221

PostPosted: Thu Nov 14, 2013 4:27 am    Post subject: Reply with quote

landdie wrote:
So I have made a manual fix on portage.
    tar xfj /usr/portage/distfiles/portage-2.2.7.tar.bz2
    rm -rf /usr/lib/portage/*
    cp -R pym bin /usr/lib/portage/

Which sadly didn't help.
That sort of approach usually only makes things worse, and when it does make things temporarily better tends to imply something is, or at least was, very wrong.

Start with portageq envvar FETCHCOMMAND, and go from there.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9236
Location: beyond the rim

PostPosted: Thu Nov 14, 2013 9:15 am    Post subject: Reply with quote

Please post the output of `emerge -v --info`
Back to top
View user's profile Send private message
landdie
n00b
n00b


Joined: 10 Sep 2013
Posts: 26
Location: Southern Sweden

PostPosted: Thu Nov 14, 2013 4:43 pm    Post subject: Reply with quote

VoidMage wrote:
Why does this line go ' wget wget' ?
Anything in your that could explain this ?
Thanks for the response and wish I could tell you why it goes "wget wget" but I haven't fiddled with wgetrc at all and the only other place I can think of I might have broken it is
Quote:
/etc/fail2ban/action.d/mynetwatchman.conf:getcmd = wget --no-verbose --tries=3 --waitretry=10 --connect-timeout=10 --read-timeout=60 --retry-connrefused --output-document=- --user-agent=Fail2Ban
But it looks OK to me. We have however had a number of power outages recently they of course happened whilst I was editing conf files but I've scoured the box for all *.swp's been through them and not found anything out of line. To be honest whilst I've used Gentoo on and off for ten years now I've never had a portage problem before and taken very little notice of wget so for me "wget wget" is just the way it is. :) Shouldn't it be?

desultory wrote:
landdie wrote:
So I have made a manual fix on portage.
    tar xfj /usr/portage/distfiles/portage-2.2.7.tar.bz2
    rm -rf /usr/lib/portage/*
    cp -R pym bin /usr/lib/portage/

Which sadly didn't help.
That sort of approach usually only makes things worse, and when it does make things temporarily better tends to imply something is, or at least was, very wrong.

Start with portageq envvar FETCHCOMMAND, and go from there.

Thanks for the advice on my manual fix. So it's not a good idea to go down that road :) Anyways I'm no Gentoo aficionado and am floundering about in the dark here so any and all advice is well appreciated!

Right portageq envvar FETCHCOMMAND gives me.
Quote:
wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"
Which to the best of my limited knowledge is what I should see. Where should I go from here? Oh I should mention emerge --sync still works.

Genone wrote:
Please post the output of `emerge -v --info`

Thanks for getting back to me on this and here is the output of emerge -v --info

Code:
Portage 2.2.7 (hardened/linux/amd64/selinux, gcc-4.6.3, glibc-2.15-r3, 3.10.1-hardened-r1 x86_64)

=================================================================
System uname: Linux-3.10.1-hardened-r1-x86_64-Intel-R-_Pentium-R-_D_CPU_3.00GHz-with-gentoo-2.2
KiB Mem:     2037664 total,    756772 free
KiB Swap:    1023996 total,   1023996 free
Timestamp of tree: Tue, 12 Nov 2013 11:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.2.5-r3
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es19
38 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymf
pci"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias a
uthn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host a
uthz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env exp
ires 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"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="cxx unicode python_targets_python3_2 python_targets_python2_7 multilib hardened pa
x_kernel pic -jit -orc"
CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author"
CAMERAS="ptp2"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/g
entoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-ph
p5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DEFAULT_ABI="amd64"
DISPLAY=":0"
DISTDIR="/usr/portage/distfiles"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--complete-graph"
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles
 merge-sync news parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms str
ict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xa
ttr"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:
*} ; [[ \${host} = \${port} ]] && port=22 ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp -P \
${port} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "$
{PORTAGE_SSH_OPTS}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*}
 ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${hos
t}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FFLAGS="-O2 -pipe"
GCC_SPECS=""
GENTOO_MIRRORS="ftp://de-mirror.org/gentoo/ http://de-mirror.org/gentoo/ http://ftp.df.lth.se/pub
/gentoo/ ftp://ftp.df.lth.se/pub/gentoo/"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nme
a ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripma
te tnt ubx"
GRUB_PLATFORMS=""
HG="/usr/bin/hg"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info:/usr/share/binutils-
data/x86_64-pc-linux-gnu/2.23.1/info"
INPUT_DEVICES="keyboard mouse evdev"
IUSE_IMPLICIT="prefix"
KERNEL="linux"
LANG="C"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_COLLATE="C"
LC_MESSAGES="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBDIR_amd64="lib64"
LIBDIR_amd64_fbsd="lib64"
LIBDIR_n32="lib32"
LIBDIR_n64="lib64"
LIBDIR_o32="lib"
LIBDIR_ppc="lib32"
LIBDIR_ppc64="lib64"
LIBDIR_s390="lib32"
LIBDIR_s390x="lib64"
LIBDIR_sparc32="lib32"
LIBDIR_sparc64="lib64"
LIBDIR_x32="libx32"
LIBDIR_x86="lib32"
LIBDIR_x86_fbsd="lib32"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LOGNAME="root"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;
05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;3
1:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;3
1:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01
;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;
31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;3
5:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35
:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;3
5:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;
35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;3
5:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*
.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.
ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*
.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*
.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
MAIL="/var/mail/root"
MAKEOPTS="-j2"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man:/u
sr/share/binutils-data/x86_64-pc-linux-gnu/2.23.1/man:/usr/lib64/php5.5/man/:/usr/share/postgresq
l/man/:/usr/share/postgresql-9.2/man/"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/l
ib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|py
thon-exec)"
MULTIOSDIRS="../lib64:../lib32"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa v
isualweb webcommon websvccommon xml"
NGINX_MODULES_HTTP="access autoindex browser charset empty_gif fastcgi flv geoip gzip map proxy r
ewrite stub_status upstream_ip_hash upload_progress"
NOCOLOR="true"
OFFICE_IMPLEMENTATION="libreoffice"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-
gnu/gcc-bin/4.6.3"
PHP_INI_VERSION="development"
PHP_TARGETS="php5-5"
PKGDIR="/usr/portage/packages"
POLICY_TYPES="strict"
PORTAGE_ARCHLIST="ppc sparc64-freebsd ppc-openbsd x86-openbsd ppc64 x86-winnt x86-fbsd ppc-aix al
pha arm x86-freebsd s390 amd64 arm-linux x86-macos x64-openbsd ia64-hpux hppa x86-netbsd ppc64-li
nux x86-cygwin amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64
-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris m68k sh x
86-solaris sparc-fbsd"
PORTAGE_BIN_PATH="/usr/lib64/portage/bin"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary:log,warn,error,qa echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_FETCH_T="portage_fetch_t"
PORTAGE_GID="250"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${P
ORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_INTERNAL_CALLER="1"
PORTAGE_OVERRIDE_EPREFIX=""
PORTAGE_PYM_PATH="/usr/lib64/portage/pym"
PORTAGE_PYTHONPATH="/usr/lib64/portage/pym"
PORTAGE_REPOSITORIES="[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
masters =
priority = -1000
sync-type = rsync
sync-uri = rsync://rsync.europe.gentoo.org/gentoo-portage"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress
--force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclu
de=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="-1"
PORTAGE_SANDBOX_T="portage_sandbox_t"
PORTAGE_SYNC_STALE="30"
PORTAGE_T="portage_t"
PORTAGE_TMPDIR="/home/portage_temp"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTAGE_XATTR_EXCLUDE="security.* system.nfs4_acl"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
PORT_LOGDIR="/home/portage_log"
PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"
PRELINK_PATH_MASK="/usr/lib64/libfreebl3.so:/usr/lib64/libnssdbm3.so:/usr/lib64/libsoftokn3.so"
PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_U
NPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
PWD="/root"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python2_7 python3_2"
QT_GRAPHICSSYSTEM="raster"
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*
} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${ho
st}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
RPMDIR="/usr/portage/rpm"
RSYNC_TIMEOUT="500"
RUBYOPT="-rauto_gem"
RUBY_TARGETS="ruby19 ruby18"
SHELL="/bin/bash"
SHLVL="2"
SSH_ASKPASS="/usr/bin/ssh-askpass-fullscreen"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
TERM="xterm"
UNINSTALL_IGNORE="/lib/modules/*"
USE="X alsa amd64 apache2 authdaemond berkdb bindist bzip2 cdr cgi cli cracklib crypt cups cxx db
us dri dvdr embed fastcgi ffmpeg flac fpm gd gdbm geoip gstreamer hardened hddtemp iconv imap ipv
6 justify maildir mmx modules mudflap multilib mysql ncurses nls nptl ogg open_perms openmp pam p
ax_kernel pcre peer_perms php postgres python readline sasl selinux session sound spamassassin sp
ell sse sse2 sse3 ssl tcpd truetype ubac unicode urandom vda vhosts zlib" ABI_X86="64" ALSA_CARDS
="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968
fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACH
E2_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 nego
tiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURE
S="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECT
D_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtec
h aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanse
rver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVI
CES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216
lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX
_MODULES_HTTP="access autoindex browser charset empty_gif fastcgi flv geoip gzip map proxy rewrit
e stub_status upstream_ip_hash upload_progress" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="
php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby1
9 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage
sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4o
ptions ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpm
ac delude chaos account"
USER="root"
USERLAND="GNU"
USE_EXPAND="ABI_MIPS ABI_X86 ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS CO
LLECTD_PLUGINS CROSSCOMPILE_OPTS CURL_SSL DRACUT_MODULES DVB_CARDS ELIBC ENLIGHTENMENT_MODULES FC
DSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KER
NEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES MONKEYD_PLUGINS NETBEANS_MODULES NGIN
X_MODULES_HTTP NGINX_MODULES_MAIL OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED
_FEATURES OPENMPI_RM PHP_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_US
ER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES
_ADDONS"
USE_EXPAND_HIDDEN="ABI_MIPS CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux hppa hppa-hpux ia64 ia64
-hpux ia64-linux m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd s390 sh
sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-freebsd x64-macos x64-openbsd
x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-op
enbsd x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin FreeBSD glibc HPUX Interix mintlib musl NetBSD OpenBSD
 SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Cygwin Darwin FreeBSD freemint HPUX Interix linux NetBSD OpenBSD Su
nOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via
 vmware dummy v4l"
WINDOWID="20971554"
WINDOWPATH="7"
XDG_CONFIG_DIRS="/etc/xdg"
XDG_DATA_DIRS="/usr/local/share:/usr/share"
XSESSION="icewm"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy conditi
on tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
XTERM_LOCALE="C"
XTERM_SHELL="/bin/bash"
XTERM_VERSION="XTerm(297)"
_="/usr/bin/emerge"


Well thats an eyeful! Any use to you? I've done a comparison with the output of emerge -v --info on another Gentoo, which has a working portage, running on the same box same kernel but minus the hardened source and I can't see any glaring faults......
.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9236
Location: beyond the rim

PostPosted: Fri Nov 15, 2013 7:43 am    Post subject: Reply with quote

Mainly I wanted to verify that you're really on a hardened profile as the error seems to be a SELinux issue. Unfortunately I don't really know anyting about that stuff, so all I can advice is to "check your SELinux stuff".
The other thing that made me a bit suspicious was the hash in
Code:
>>> Downloading '#http://ftp.df.lth.se/pub/gentoo/distfiles/libnetfilter_queue-1.0.2.tar.bz2'
, but I assume that was a typing/display error.
Back to top
View user's profile Send private message
landdie
n00b
n00b


Joined: 10 Sep 2013
Posts: 26
Location: Southern Sweden

PostPosted: Fri Nov 15, 2013 7:53 pm    Post subject: Reply with quote

Genone wrote:
Mainly I wanted to verify that you're really on a hardened profile as the error seems to be a SELinux issue. Unfortunately I don't really know anyting about that stuff, so all I can advice is to "check your SELinux stuff".
The other thing that made me a bit suspicious was the hash in
Code:
>>> Downloading '#http://ftp.df.lth.se/pub/gentoo/distfiles/libnetfilter_queue-1.0.2.tar.bz2'
, but I assume that was a typing/display error.


Thanks for picking up on the
Code:
>>> Downloading '#http://ftp.df.lth.se/pub/gentoo/distfiles/libnetfilter_queue-1.0.2.tar.bz2'
That was my make.conf. I'd commented the mirror out but forgotten to move the " so emerge was still parsing it. :oops:
Yep it could well be a hard source thing however I am running "setenforce 0" and will do until the server is running sweet. Turning it on and starting configuring it before this seems to me like a sure way to open up a potential for a real rats nest of problems. So far other than a quick spin to ensure my hard source install was good I have been running "setenforce 0".

But... here's a thing I don't understand and would love some enlightenment on. When I emerge dev-lang/python-exec I get this in the log file.
Code:
 * Package:    dev-lang/python-exec-2.0
 * Repository: gentoo
 * Maintainer: python@gentoo.org
 * Upstream:   mgorny@gentoo.org https://bitbucket.org/mgorny/python-exec/issues/
 * USE:        amd64 elibc_glibc kernel_linux python_targets_jython2_5 python_targets_jython2_7 python_targets_python2_6 python_targets_python2_7 python_targets_python3_2 userland_GNU
 * FEATURES:   preserve-libs sandbox selinux sesandbox userpriv usersandbox
[Errno 22] Invalid argument:
   /usr/bin/sandbox /usr/lib64/portage/bin/ebuild.sh unpack
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
 * The ebuild phase 'unpack' has exited unexpectedly. This type of behavior
 * is known to be triggered by things such as failed variable assignments
 * (bug #190128) or bad substitution errors (bug #200313). Normally, before
 * exiting, bash should have displayed an error message above. If bash did
 * not produce an error message above, it's possible that the ebuild has
 * called `exit` when it should have called `die` instead. This behavior
 * may also be triggered by a corrupt bash binary or a hardware problem
 * such as memory or cpu malfunction. If the problem is not reproducible or
 * it appears to occur randomly, then it is likely to be triggered by a
 * hardware problem. If you suspect a hardware problem then you should try
 * some basic hardware diagnostics such as memtest. Please do not report
 * this as a bug unless it is consistently reproducible and you are sure
 * that your bash binary and hardware are functioning properly.


When I try emerge --ask bash I get
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-shells/bash-4.2_p45

Would you like to merge these packages? [Yes/No]


When I say yes to this I get the below output to the log file. Oh same thing if I just emerge bash

Code:
>>> Downloading 'http://gnu.skazkaforyou.com/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://gnu.skazkaforyou.com/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://gnu.sixsigmaonline.org/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://gnu.sixsigmaonline.org/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://gnu.billfett.com/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://gnu.billfett.com/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://www.fyxm.net/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://www.fyxm.net/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://ftp.df.lth.se/pub/ftp.gnu.org/pub/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://ftp.df.lth.se/pub/ftp.gnu.org/pub/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'ftp://mirrors.fe.up.pt/pub/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz ftp://mirrors.fe.up.pt/pub/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'ftp://mirrors.dotsrc.org/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz ftp://mirrors.dotsrc.org/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://gnu.promotionalpro.com/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://gnu.promotionalpro.com/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'ftp://mirrors.igsobe.com/gnuftp/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz ftp://mirrors.igsobe.com/gnuftp/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://mirror.vocabbuilder.net/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://mirror.vocabbuilder.net/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://www.very-clever.com/download/gnu/bash/bash-4.2.tar.gz'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/distfiles/bash-4.2.tar.gz http://www.very-clever.com/download/gnu/bash/bash-4.2.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument


This is just a fraction of what appears to be a list of shots at every mirror there is that holds bash-4.2.tar.gz Is this odd behavior or is it normal I'm wondering? I can wget bash-4.2.tar.gz from some of them others are unresponsive even when I probe them in various ways.

Finally if I emerge net-firewall/conntrack-tools I get this in the log file.
Code:
[Errno 22] Invalid argument:
   /bin/bash -c >> /usr/portage/distfiles/.__portage_test_write__ 2>/dev/null ;
rval=$? ; rm -f  /usr/portage/distfiles/.__portage_test_write__ ; exit $rval
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'ftp://de-mirror.org/gentoo/distfiles/libnetfilter_queue-1.0.2.t
ar.bz2'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/dis
tfiles/libnetfilter_queue-1.0.2.tar.bz2 ftp://de-mirror.org/gentoo/distfiles/lib
netfilter_queue-1.0.2.tar.bz2
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://de-mirror.org/gentoo/distfiles/libnetfilter_queue-1.0.2.
tar.bz2'
[Errno 22] Invalid argument:
/bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/dis
tfiles/libnetfilter_queue-1.0.2.tar.bz2 http://de-mirror.org/gentoo/distfiles/li
bnetfilter_queue-1.0.2.tar.bz2
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
>>> Downloading 'http://www.netfilter.org/projects/libnetfilter_queue/files/libn
etfilter_queue-1.0.2.tar.bz2'
[Errno 22] Invalid argument:
   /bin/bash -c exec "$@" wget wget -t 3 -T 60 --passive-ftp -O /usr/portage/dis
tfiles/libnetfilter_queue-1.0.2.tar.bz2 http://www.netfilter.org/projects/libnet
filter_queue/files/libnetfilter_queue-1.0.2.tar.bz2
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
    unshare_net, unshare_ipc, cgroup)
  File "/usr/lib64/portage/pym/portage/process.py", line 511, in _exec
    pre_exec()
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 119, in _pre_exec
    setexec(self._con)
  File "/usr/lib64/portage/pym/portage/_selinux.py", line 80, in setexec
    if selinux.setexeccon(ctx) < 0:
OSError: [Errno 22] Invalid argument
!!! Couldn't download 'libnetfilter_queue-1.0.2.tar.bz2'. Aborting.
^[[31;01m * ^[[39;49;00mFetch failed for 'net-libs/libnetfilter_queue-1.0.2', Lo
g file:
^[[31;01m * ^[[39;49;00m '/home/portage_log/net-libs:libnetfilter_queue-1.0.2:20
131115-193909.log'


These are three very different responses to emerge so either my portage is really up the spout or there is a lot I need to learn about portage! At the moment I'm guessing both. :)
Back to top
View user's profile Send private message
FuzzyRay
Retired Dev
Retired Dev


Joined: 02 Oct 2003
Posts: 79

PostPosted: Fri Nov 15, 2013 11:18 pm    Post subject: Reply with quote

This blog post looks like it covers the problem that you are hitting with emerge:

http://blog.siphos.be/2011/03/portage-fails-to-build-due-to-selinux/
Back to top
View user's profile Send private message
landdie
n00b
n00b


Joined: 10 Sep 2013
Posts: 26
Location: Southern Sweden

PostPosted: Sat Nov 16, 2013 11:04 am    Post subject: Reply with quote

FuzzyRay wrote:
This blog post looks like it covers the problem that you are hitting with emerge:

http://blog.siphos.be/2011/03/portage-fails-to-build-due-to-selinux/


Many big thanks for pointing me at this link!

Setting SELINUX=disabled worked, hadn't crossed my mind to try that, and emerge is back on line. What I need to discover now is what tipped the balance. This box isn't pointed at the world yet and I've been running with SELINUX=permissive with no probs at all and something I did changed that.

I had done a emerge --update --deep --with-bdeps=y --newuse world and emerge --depclean which left me with a skewed python-exec Is it possible that is the root problem here?

Well I will reset SELINUX=permissive when my emerge --update --deep --with-bdeps=y --newuse world finishes and see if the problem has gone away.
Back to top
View user's profile Send private message
landdie
n00b
n00b


Joined: 10 Sep 2013
Posts: 26
Location: Southern Sweden

PostPosted: Sat Nov 16, 2013 10:44 pm    Post subject: Reply with quote

Well sadly portage still has the same problems even after a fresh emerge of portage, python-exec, full world update, a depclean, reset selinux to permissive and done a rlpkg -a -r . Have I missed something?

I'm still wondering if the python-exec plays a roll in the whole thing. I read here http://www.gentoo.org/proj/en/hardened/selinux/selinux-handbook.xml?part=2&chap=1 that
Quote:
For now, the SELinux management utilities are not all compatible with Python 3 so we recommend to switch to Python 2 until the packages are updated and fixed.


Does anyone know if this is still the case?

I set python2.7 but not being "savoir fait" with python or the nitty gritties of portage I can't help wondering if python-exec could be the cause of my hassle. Tomorrow I will try to roll back to the previous version and see what happens. Wonder how that will go given eselect news 9

On the bright side at least I can use emerge if I set SELINUX=disable :) and my box is otherwise running perfectly! Well almost ;)
Back to top
View user's profile Send private message
landdie
n00b
n00b


Joined: 10 Sep 2013
Posts: 26
Location: Southern Sweden

PostPosted: Fri Nov 22, 2013 11:50 pm    Post subject: Reply with quote

Well after much fuss all I needed to do to resolve the situation was a
Code:
newrole -r sysadm_r
and sudo emerge package-name worked fine. Same thing to emerge as root but no sudo of course. Don't know what changed on my box that suddenly meant I had to do this but it means I can't be so slack in my practices any more which is a good thing! :)
Thanks all for the help and tips and what a lot I've learnt about selinux figuring this one out! :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum