From owner-freebsd-questions@FreeBSD.ORG Thu Sep 22 10:21:36 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85A8D106566B for ; Thu, 22 Sep 2011 10:21:36 +0000 (UTC) (envelope-from andyzammy@googlemail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B96E8FC14 for ; Thu, 22 Sep 2011 10:21:34 +0000 (UTC) Received: by vcbf13 with SMTP id f13so469293vcb.13 for ; Thu, 22 Sep 2011 03:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=k2dPjNO6L8u+kwAY48E5VePfYpXY4bBzp6N6SGG9BH0=; b=xLNSwdKfWzr4EVgc5IptQ+Tvw6nai7KzV0Lz7E9ttKOU/UMVEE1V3SZgQ+Lnjta2ni hFbbZ4pgInayKn6hwRkH/mEt9+6tu9AXrfFxdSyAjWGni+TSFbTsdwi7wIWjVvGuqmQl VxYqeVqqUzbNwe3Aos4icc5Ay6KPDwQ0sUdGI= MIME-Version: 1.0 Received: by 10.52.175.234 with SMTP id cd10mr1534152vdc.475.1316686894501; Thu, 22 Sep 2011 03:21:34 -0700 (PDT) Received: by 10.52.161.228 with HTTP; Thu, 22 Sep 2011 03:21:34 -0700 (PDT) In-Reply-To: <4E7ADE4B.6010601@infracaninophile.co.uk> References: <4E7ADE4B.6010601@infracaninophile.co.uk> Date: Thu, 22 Sep 2011 11:21:34 +0100 Message-ID: From: Andy Zammy To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Dynamic Window Manager install with patch(es) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2011 10:21:36 -0000 I see, then in that case I don't think I'm doing anything wrong. Here is the output of make: ------------------------------------------------------------ # make You can build dwm with your own config.h using the DWM_CONF knob: make DWM_CONF=/path/to/dwm/config.h install clean Note: Pre-5.6 config.h-files no longer work. ===> License MIT accepted by the user ===> Found saved configuration for dwm-5.9 ===> Extracting for dwm-5.9 => SHA256 Checksum OK for dwm-5.9.tar.gz. ===> Patching for dwm-5.9 ===> Applying FreeBSD patches for dwm-5.9 File to patch: files/patch-defaultopacity No file found--skip this patch? [n] n File to patch: /usr/home/user/Downloads/dwm.defaultopacity.patch patch: **** malformed patch at line 9: @@ -52,6 +54,9 @@ => Patch patch-defaultopacity failed to apply cleanly. => Patch(es) patch-Makefile patch-config.mk applied cleanly. *** Error code 1 Stop in /usr/ports/x11-wm/dwm. *** Error code 1 Stop in /usr/ports/x11-wm/dwm. -------------------------------------------------------------- Like I say I don't know how patch or diff work but it's strange how it needs pointing to the patch again? On 22 September 2011 08:05, Matthew Seaman wrote: > On 22/09/2011 00:51, Andy Zammy wrote: > > According to the instructions listed here: > http://dwm.suckless.org/patches/ I > > figured I'm to use the "tarball method" as that's how ports fetches dwm. > I > > tried applying the method to /usr/ports/x11-wm/dwm/work/dwm-5.9 but it > > didn't work (malformed patch). > > This is pretty much the correct approach. Although to do it in the best > ports fashion, you'ld save the patch file to > ${PORTSDIR}/x11-wm/dwm/files/patch-something-or-other and then the ports > would patch the sources for you automatically any time you rebuilt the > port. Don't worry about that for the time being though. Just getting > the patch to apply by hand is a good first step. > > It's quite normal for ports to apply patches this way -- the dwm port > already has patches for Makefile and config.mk. If your patch attempts > to patch those same files it could fail. However the error message > would be 'patch failed to apply' which is obviously not what you're > getting. > > The big question is why the patch you already have appears to be > malformed. How did you obtain it? Can you repeat the process paying > attention to any error messages and so forth and see if that works better? > > > I've used ubuntu for about a year but for all intents and purposes I'm > still > > a beginner with UNIX-like, and I've never used patch or diff before. But, > I > > remembered that these are ports and wonder if these patches would work on > > FreeBSD source? Would I have to apply the patch to the tarball while it's > in > > distfiles before it gets 'ported' to freebsd? Or am I talking crazy? > > No -- modifying the tarball is possible, but as the effect is exactly > the same as what you tried above and as it will then fail the checksum > tests, well, it's not worth the bother. > > patch and diff at this level work in exactly the same way on just about > any unix (eg FreeBSD) or unix-alike (Linux including Ubuntu) and > probably a few weird OSes you've never heard of. Like I said, applying > patches is a common action the ports will do for you. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > JID: matthew@infracaninophile.co.uk Kent, CT11 9PW > >