From owner-freebsd-jail@FreeBSD.ORG Sun Aug 31 04:12:13 2008 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C601106566C for ; Sun, 31 Aug 2008 04:12:13 +0000 (UTC) (envelope-from jack@crepinc.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 397D38FC1C for ; Sun, 31 Aug 2008 04:12:13 +0000 (UTC) (envelope-from jack@crepinc.com) Received: by wa-out-1112.google.com with SMTP id j4so970295wah.3 for ; Sat, 30 Aug 2008 21:12:12 -0700 (PDT) Received: by 10.114.184.7 with SMTP id h7mr4226396waf.9.1220154192167; Sat, 30 Aug 2008 20:43:12 -0700 (PDT) Received: by 10.115.110.16 with HTTP; Sat, 30 Aug 2008 20:43:12 -0700 (PDT) Message-ID: <2ad0f9f60808302043i5ea4c20eoa83469f655020a9@mail.gmail.com> Date: Sat, 30 Aug 2008 23:43:12 -0400 From: "Jack C" To: freebsd-jail@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Building with Jail Patches X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2008 04:12:13 -0000 Greetings all, I apologize in advance for anything stupid I overlooked; I tried to search as best I could for answers before wasting your time. I've been trying to compile resource controls into jails for about the past week. No matter how hard I try, I always seem to run into some issue. I started by finding Chris Jones' Summer of Code patches, and attempting them against 6.0 to no avail. In reading archives of this list, I found the 7.0 memory control patch and tried that as well. Can anyone point out what I'm doing wrong? I installed this machine straight from 6.0 ISOs. No cvsup was performed. --- bsd6laptop# uname -a FreeBSD bsd6laptop.66fruit.com 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 bsd6laptop# [apply the changes detailed in docs/INSTALL (without error)] bsd6laptop# make buildworld [... stuff working fine here ...] ===> usr.bin/elf2aout (all) cc -O2 -fno-strict-aliasing -pipe -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -c /usr/src/usr.bin/elf2aout/elf2aout.c /usr/src/usr.bin/elf2aout/elf2aout.c: In function `main': /usr/src/usr.bin/elf2aout/elf2aout.c:69: error: syntax error before "phentsize" /usr/src/usr.bin/elf2aout/elf2aout.c:120: error: `machine' undeclared (first use in this function) /usr/src/usr.bin/elf2aout/elf2aout.c:120: error: (Each undeclared identifier is reported only once /usr/src/usr.bin/elf2aout/elf2aout.c:120: error: for each function it appears in.) /usr/src/usr.bin/elf2aout/elf2aout.c:123: error: `phentsize' undeclared (first use in this function) /usr/src/usr.bin/elf2aout/elf2aout.c:129: error: `phnum' undeclared (first use in this function) *** Error code 1 Stop in /usr/src/usr.bin/elf2aout. *** Error code 1 [...] --- Similarly, I installed a 7.0 machine straight from ISO without update. I succeded to buildworld, buildkernel and installkernel, however in single user mode when I go to installworld, I am stopped at this: ---- [...] install-info --quiet --defsection="Programming & development tools." --defentry="* libcom_err: (com_err). A Common Error Description Library for UNIX." com_err.info /usr/share/info/dir *** Error code 1 Stop in /usr/src/lib/libcom_err/doc *** Error code 1 [...] --- On the 7.0 machine, if I cvsup to RELENG_7 or RELENG_7_0 (same issue with both), the patch does not apply: (I am not amazing at patching it seems... the only way I could get it to work is to make src.old, and the patches seem to be applied there.) --- hydra# uname -a FreeBSD hydra.66fruit.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 hydra# grep RELENG /usr/local/etc/cvsup/src-supfile *default release=cvs tag=RELENG_7_0 hydra# pwd /usr hydra# cp -R src src.old hydra# patch < /root/jailmem.patch [... success and such ...] Hunk #13 succeeded at 482. Hunk #14 succeeded at 607. patch: **** malformed patch at line 424: diff -burN src.old/sys/kern/syscalls.c src.new/sys/kern/syscalls.c hydra# --- After cvsuping to the current 7 tree, I try again. --- hydra# grep RELENG /usr/local/etc/cvsup/src-supfile *default release=cvs tag=RELENG_7 ---cvsuping takes place here without issue--- hydra# patch < /root/jailmem.patch [... edited for brevity ...] Patching file src.old/sys/kern/init_sysent.c using Plan A... Hunk #1 failed at 2. Hunk #2 succeeded at 510 with fuzz 1 (offset -1 lines). [...] patch: **** malformed patch at line 424: diff -burN src.old/sys/kern/syscalls.c src.new/sys/kern/syscalls.c --- Could anyone perchance give me a condensed step-by-step as to getting the right source, patching, and compiling one of the resource patches out there? Sorry again for the long mail. Thanks, -Jack Carrozzo