From patchwork Sat Feb 4 22:33:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 724146 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vG7xf1bkyz9ryk for ; Sun, 5 Feb 2017 09:41:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XbF7dKVP"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 85DB530926; Sat, 4 Feb 2017 22:41:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RZZGraI0WvG5; Sat, 4 Feb 2017 22:41:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7C51E30917; Sat, 4 Feb 2017 22:41:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 101161C10C1 for ; Sat, 4 Feb 2017 22:41:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EE7B689862 for ; Sat, 4 Feb 2017 22:41:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hhYT47pRfjWd for ; Sat, 4 Feb 2017 22:41:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id 15C938980C for ; Sat, 4 Feb 2017 22:41:00 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id u63so13377021wmu.2 for ; Sat, 04 Feb 2017 14:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0zunrptVm3XHZyd8g+1DMpoQsBNzRQQkELfxfIUkvr8=; b=XbF7dKVP1FG/mcHeIBM8WIQNlpARbOQI7VLtgFSQZnHxX3/kM9xeGKOmBkCVX989WW KfHG02wS3JGuuAPHQP24af6Cm4Z15/3wiJ4yCeFvUx3LnfwOj/du4Vu1yU7FoV4oTAri uEBHki8obZJGbXrdn8d6NrDkXiCENxPm6w79X4E08BM7397CeMlXwEqdNO+xUUFEuUAm s0WVTfEDBPWH9AfyzkbiU8mMCEzbVoQK/kIZ/I3h0fbjJVD7jwqoE0eZAzmLOKrIwXZF gtzs7abaPSa1mk0ztmplDLlYHsRfyNsXht2k55UdZVtNr9Jru7NQ8AEHf0iznqFRdW+w 0jcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0zunrptVm3XHZyd8g+1DMpoQsBNzRQQkELfxfIUkvr8=; b=tCbZJNcg1KiRq0/KoaTNrABnY4oNPPlJpX7Dhf4FpFQy8ZSkScKczwfbOe9O1VEcn6 uT0+DFf8rBUgzrui4G4WimBqsJeq3DLbr9gunMYjOYb+xP11MVJs0ybPjhF0gT4ladT9 fnL8N+vjsgxOVvn1ECBeOrGnd6A0hxzZdkO2x0Mp9DY0hxZreVWuYIGz2mSI1vbNiIwr oL+xxSUrPMdnRf0r8b1fTeJAb1Eyum1pbdbqr41dobLRY8nLrihY9aKsaax8UfsNsVA0 GJ1ithKsBGhvGedw8tt//eJSPnL1cO5WbfDnB8Je5yuYYgeh6NsZyYROmIGsyU5W7vej oahA== X-Gm-Message-State: AMke39nGEbQjXSkQrwXPupg/G9/FsQOIZLD5iKT8gtqileQqGej/BsqC5QfZil6xBW56bg== X-Received: by 10.28.71.133 with SMTP id m5mr2914376wmi.132.1486247638500; Sat, 04 Feb 2017 14:33:58 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id o70sm52022450wrc.20.2017.02.04.14.33.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Feb 2017 14:33:57 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Sat, 4 Feb 2017 23:33:54 +0100 Message-Id: <1486247634-5995-1-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH 1/1] support/misc/Vagrantfile: Enable website X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch enables buildroot website inside Vagrant and makes it accessible on localhost:8888 outside. It could be usefull for website development or simply navigating it without internet access. * Removed apt-get update to speedup first boot * Moved archive download at first to accomodate Apache * Added Apache configuration via here document * Added 80 to 8888 port redirection Signed-off-by: Angelo Compagnucci --- support/misc/Vagrantfile | 52 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile index dc4c15d..fefce5b 100644 --- a/support/misc/Vagrantfile +++ b/support/misc/Vagrantfile @@ -14,6 +14,8 @@ VM_CORES=1 Vagrant.configure('2') do |config| config.vm.box = 'bento/ubuntu-16.04' + config.vm.network "forwarded_port", guest: 80, host: 8888 + config.vm.provider :vmware_fusion do |v, override| v.vmx['memsize'] = VM_MEMORY v.vmx['numvcpus'] = VM_CORES @@ -41,19 +43,41 @@ Vagrant.configure('2') do |config| end end - config.vm.provision 'shell', inline: - "sudo dpkg --add-architecture i386 - sudo apt-get -q update - sudo apt-get purge -q -y snapd lxcfs lxd ubuntu-core-launcher snap-confine - sudo apt-get -q -y upgrade - sudo apt-get -q -y install build-essential libncurses5-dev \ - git bzr cvs mercurial subversion libc6:i386 unzip bc - sudo apt-get -q -y autoremove - sudo apt-get -q -y clean - sudo update-locale LC_ALL=C" - config.vm.provision 'shell', privileged: false, inline: - "echo 'Downloading and extracting buildroot #{RELEASE}' - wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz - tar axf buildroot-#{RELEASE}.tar.gz" +"echo 'Downloading and extracting buildroot #{RELEASE}' +wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz +tar axf buildroot-#{RELEASE}.tar.gz" + + config.vm.provision 'shell', privileged: true, inline: +"sed -i 's|deb http://us.archive.ubuntu.com/ubuntu/|deb mirror://mirrors.ubuntu.com/mirrors.txt|g' /etc/apt/sources.list +dpkg --add-architecture i386 +apt-get -q update +apt-get purge -q -y snapd lxcfs lxd ubuntu-core-launcher snap-confine +apt-get -q -y install build-essential libncurses5-dev \ + git bzr cvs mercurial subversion libc6:i386 unzip bc \ + apache2 +apt-get -q -y autoremove +apt-get -q -y clean +update-locale LC_ALL=C + +# Configure Apache for buildroot website +a2enmod include +cat << EOF > /etc/apache2/sites-enabled/000-default.conf + +ServerAdmin webmaster@localhost +DocumentRoot /home/vagrant/buildroot-#{RELEASE}/docs/website/ +ErrorLog ${APACHE_LOG_DIR}/error.log +CustomLog ${APACHE_LOG_DIR}/access.log combined + +Options Indexes FollowSymLinks Includes ExecCGI Includes +AllowOverride All +Require all granted +Allow from all +AddType text/html .html +AddOutputFilter INCLUDES .html + + +EOF +service apache2 restart" + end