Trying it install hardened-dev-sources-2.6.5 results in a "hang" after seeing "* genpatches-2.6-7.38-base.tar.bz2 unpacked". Pressing enter causes the patching process to continue The output is as follows uberserver hardened-dev-sources # emerge hardened-dev-sources Calculating dependencies ...done! >>> emerge (1 of 1) sys-kernel/hardened-dev-sources-2.6.7 to / >>> md5 src_uri ;-) linux-2.6.7.tar.bz2 >>> md5 src_uri ;-) hardened-patches-2.6-7.2.tar.bz2 >>> md5 src_uri ;-) genpatches-2.6-7.38-base.tar.bz2 >>> Preparing to unpack... >>> Unpacking source... >>> Unpacking linux-2.6.7.tar.bz2 to /var/tmp/portage/hardened-dev-sources-2.6.7/work * hardened-patches-2.6-7.2.tar.bz2 unpacked * genpatches-2.6-7.38-base.tar.bz2 unpacked * Excluding Patch #1315 * From: /patches/2/genpatches-2.6-7.38 * Applying 1000_grsecurity-2.0.1-2.6.7.patch... [ ok ] * Applying 1300_linux-2.6.4-selinux-hooks.patch... [ ok ] * Applying 1305_linux-2.6.7-selinux-ipaddr.patch... [ ok ] * Applying 1310_linux-2.6.5-extra_sec_ops.patch... [ ok ] * Applying 2010_tcp-stealth-2.6.7.patch... [ ok ] * Applying 3000_netdev-random-core-2.6.7.patch... [ ok ] * Applying 3005_netdev-random-drivers-2.6.7.patch... [ ok ] * Applying 1310_k8_cardbus_io.patch... [ ok ] * Applying 1315_alpha-sysctl-uac.patch... [ !! ] * Please attach /var/tmp/portage/hardened-dev-sources-2.6.7/temp/1315_alpha-sysctl-uac.err to any bug you may post. !!! ERROR: sys-kernel/hardened-dev-sources-2.6.7 failed. !!! Function unipatch, Line 485, Exitcode 0 !!! Unable to dry-run patch. tseng on #gentoo-hardened tried to help me fix this, but to no avail :( He thinks it's a kernel-2.eclass error, but mine matches his. Portage 2.0.50-r8 (hardened-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-hardened-r5) ================================================================= System uname: 2.6.5-hardened-r5 i686 VIA Nehemiah Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=i686 -pipe -mmmx -msse -mfpmath=sse -fprefetch-loop-arrays -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=i686 -pipe -mmmx -msse -mfpmath=sse -fprefetch-loop-arrays -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ http://www.ibiblio.org/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="acl apache2 berkdb chroot crypt fam gdbm hardened imap libwww maildir mmx nls nptl pam perl pic pie png postgres python readline sasl slang sse ssl tcpd threads x86 zlib"
This is freaky weird, I can merge no problem on three boxes. Could any kernel herders try and figure out what the deal is here? I'm pretty sure its not my bug, if its valid at all.
Sorry, first line should read Trying it install hardened-dev-sources-2.6.7 results in a "hang" after seeing "* genpatches-2.6-7.38-base.tar.bz2 unpacked". 2.6.5-r5 installs fine....
Created attachment 34568 [details] 1315_alpha-sysctl-uac.err Same problem here. The ebuild completely hangs after displaying "* genpatches-2.6-7.38-base.tar.bz2 unpacked" and does nothing until you press enter, which causes the same output as listed above. I attached the file mentioned above (/var/tmp/portage/hardened-dev-sources-2.6.7/temp/1315_alpha-sysctl-uac.err). Another very weird behavior occours when I stop the process (Crtl-Z) and background it (bg) a simple "ps" will stop it again (output listed bellow). This does not happen before the ebuild "hangs"... ------------------------------------------- [..] * hardened-patches-2.6-7.2.tar.bz2 unpacked * genpatches-2.6-7.38-base.tar.bz2 unpacked [1]+ Stopped emerge sys-kernel/hardened-dev-sources root@xxx (~)# bg [1]+ emerge sys-kernel/hardened-dev-sources & root@xxx (~)# ps PID TTY TIME CMD 29951 pts/3 00:00:00 su 9646 pts/3 00:00:00 bash 916 pts/3 00:00:04 emerge 32322 pts/3 00:00:00 ps [1]+ Stopped emerge sys-kernel/hardened-dev-sources root@xxx (~)#
Odd thing is that it works on a server here at work - which as pretty much the same configuration as my home server with the error as I admin them both. The main difference is that works server is a P4 instead of a VIA C3-2.
Same error with hardened-dev-sources-2.6.7-r1
I added 'set -x' and PS4='[${LINENO}]+' to the kernel-2.eclass and found out, that the skript hangs in an rm-call in line 440 (437 in the unedited file). After removing the I/O-redirection from line 437 in kernel-2.eclass I found out that the file is write-protected. ------------- output ------------- [..] [437]+rm /var/tmp/portage/hardened-dev-sources-2.6.7-r1/work/patches/2/genpatches-2.6-7.38/1315_alpha-sysctl-uac.patch rm: remove write-protected regular file `/var/tmp/portage/hardened-dev-sources-2.6.7-r1/work/patches/2/genpatches-2.6-7.38/1315_alpha-sysctl-uac.patch'? ------------- end ------------- As a quick workaround you can simply press 'y' + enter at this point and the patch will be excluded: ------------- output ------------- * Excluding Patch #1315_alpha * From: /patches/2/genpatches-2.6-7.38 ------------- end ------------- I hope this helps!
The patches that I inherit from gentoo-dev-sources (genpatches-2.6-${GPV}-base.tar.bz2) looks to be the problem here. If you unpack the tarball (im using 2.6-7.38 currently), you will notice that the files are read-only. This throws a fork into the rm.
Could someone with the issue test this as a fix: Unpack genpatches, add write permissions, repack, and update the ebuilds digest. See if the merge still hangs.
All new genpatches are set to read-only, so this will be a constant problem in the future...
i had _exactly_ the same error as the reporter of this bug (hitting enter made it continue, but it would fail in the same place). i repackaged genpatches as Brandon (tseng) suggested in Comment #8, and the emerge completed successfully. # emerge info Portage 2.0.51_pre12 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-mm2) ================================================================= System uname: 2.6.7-mm2 i686 Intel(R) Pentium(R) 4 Mobile CPU 2.00GHz Gentoo Base System version 1.5.1 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox userpriv" GENTOO_MIRRORS="ftp://mirror.iawnet.sandia.gov/pub/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync6.us.gentoo.org/gentoo-portage" USE="X aalib aavm alsa apache2 apm avi berkdb cdr crypt cups dvd encode esd exiscan-acl fbcon foomaticdb gdbm gif gpm gtk gtk2 imlib java jpeg kde kerberos ldap libg++ libwww mad mikmod motif mpeg ncurses nls nptl oggvorbis opengl pam pdflib perl png postgres ppds python qt quicktime readline samba sdl slang spell sse ssl svga tcpd tetex truetype usb x86 xml2 xmms xv zlib"
Greg, based on #9 , should I assume you have no intentions of helping to solve this?
Created attachment 34800 [details, diff] kernel-2.eclass-20040704.diff I've not encountered this bug, but I think/hope this patch might do the trick for you guys that are having problems.
No, it's not that I have no intention of helping, just trying to point out that the temporary fix of changing the single permission of that file isn't going to help out in the long run. This needs a ebuild fix, like the one that was just posted :)
Update: If I dont hear back from johnm (kernel-2 maintainer), I intend to commit this trivial fix. Greg, feel free to beat me to that, as you are the kernel team proper. Thanks for looking into the bug.
I have no problems with this going directly in. Thanks for pointing out the problem
The eclass is updated in CVS. This problem should disappear shortly. Thanks to everyone who helped out here and on the hardened ml.
Just a note.. for the kernel team. But the kernel-2.eclass is using sys-apps/module-init-tools vs virtual/modutils , and modules-init-tools does not build from all hosts/libcs.
*** Bug 55761 has been marked as a duplicate of this bug. ***