From owner-freebsd-python@FreeBSD.ORG Thu Apr 3 19:02:09 2014 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C44DC26 for ; Thu, 3 Apr 2014 19:02:09 +0000 (UTC) Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com [209.85.216.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B7361C3 for ; Thu, 3 Apr 2014 19:02:08 +0000 (UTC) Received: by mail-qa0-f46.google.com with SMTP id i13so2037311qae.5 for ; Thu, 03 Apr 2014 12:02:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:subject:message-id :mime-version:content-type:content-disposition:user-agent; bh=EdRpYZuWpBUUCTK/VqPoqivLs4MeUzOz5D2VXsvXzHA=; b=gU+9DXNg1pOE9p6x8aulCQipIoN8sbNy6zFmHwJQBAdb2+iRrtzq5aLJqWElszp8xO 7+CQ4SbR/ekjk5/E652FB3bVOxI9V4hAm+ai8zOAwpTx6/HxSD74CcU8TxVYkDbF6TWi lQ8uGTWEWmSG0mu/QI2aICIxMomoFNKgAH9kc1dLupuwRqQMVO7he1ygq4KYTAV77bJA TO5p14Z8EdLXxjppBOvk2UHhQ9cYuHTRmEYTLpyAb0fEF9tl62CiDrJvtnWskU7ejZIY TcubumWkt6ECMH/mHEHtSuXLY7EIxovuvvE7kmOtsFJunvQ/6IRTjVOmyw4cb5SRfTiA SPBQ== X-Gm-Message-State: ALoCoQnu/kymJzTmAynF/DSKyavF+Ev30lN3hjcRaKWdqao/5hdUB1AjH50HzNqiTxcy+6wIEeL2 X-Received: by 10.140.86.166 with SMTP id p35mr8792015qgd.81.1396551721768; Thu, 03 Apr 2014 12:02:01 -0700 (PDT) Received: from mastodon.meroh.net (cpe-108-176-158-82.nyc.res.rr.com. [108.176.158.82]) by mx.google.com with ESMTPSA id r4sm11615727qat.16.2014.04.03.12.02.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Apr 2014 12:02:01 -0700 (PDT) Sender: Julio Merino Date: Thu, 3 Apr 2014 15:01:56 -0400 From: Julio Merino To: python@freebsd.org Subject: Make python27 build as an unprivileged user Message-ID: <20140403190156.GA83695@mastodon.meroh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 19:02:09 -0000 Hello, I needed the patch below to be able to build python27 when using ports as an unprivileged user. It is a bit too coarse-grained, but I think ports does not offer a finer-grained mechanism to indicate that only the staging phase needs root. (Note that pkgsrc marks all python packages as requiring root for the stage phase... and I suppose it's because of the same problem I encountered.) What do you think? (If you think this is OK, I'll need an explicit approval to commit.) Thanks. Index: Makefile =================================================================== --- Makefile (revision 349914) +++ Makefile (working copy) @@ -22,6 +22,13 @@ INSTALL_TARGET= altinstall +# The compilation of all modules during the staging phase fails when not +# run as root because the compiler attemps to rewrite .pyc files +# previously-created with 444 permissions. Either the compiler should be +# fixed to not rewrite such files or they should be temporarily created +# with 644 permissions and later changed to 444. +NEED_ROOT= yes + USES= readline USE_LDCONFIG= yes USE_PYTHON= yes