From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6612951189497577472 X-Received: by 2002:a1c:786:: with SMTP id 128-v6mr2492262wmh.1.1539778537168; Wed, 17 Oct 2018 05:15:37 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:eb04:: with SMTP id s4-v6ls3211499wrn.7.gmail; Wed, 17 Oct 2018 05:15:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV615z5H9f5necPssiwX6dS56wVOC+tp6BSpC2WskC3IGiE0M/fIgPpbo2Sr1Cn5cAsAQQpzr X-Received: by 2002:adf:eb0d:: with SMTP id s13-v6mr1651096wrn.23.1539778536775; Wed, 17 Oct 2018 05:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539778536; cv=none; d=google.com; s=arc-20160816; b=YhEbF8AdAkBqh4SfcQNcA63UurpAgS8bvfVCZAd2kokv1TEsKGHxeyI6g8Hhd2VCDs 3PBxEV2hzQQBaIMOkHIUDSq3LbMFGrGlPxjXmBCeIDIl8WwGzP68g0dG7d9nLLlyiv1C 0webMoYP+Y6tvsPYcMxfw85OketktE56R8iyytftmZebf/TkvtyaGdwlsGxlVxi8PKP7 xwzt9Jedxl1AcaDPUfwOI7wRAHghH+iqwFiXOoZWtcGoBDsEskKFuCD4Zc5HWr3yVB/6 wx2YjJ31+5+PV3amSeI8l1z47E0d5EdQ+EXImVMSptExJuKRI4OPESkpPpla8m+lN1Lz ctaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:references:to:subject; bh=SOBU41uj7jbo2w3kWLnQ57ZEaYa4RQLyIZXsI0es280=; b=s7A6bPnBmgeFk6+HN5gaIQvel3zO1hf3lmR0DidqrfW5Iam0smZoC5T5qMOXBl6cF4 86qh+O5/5XH4toP87dF12xfGP4CNPbwfEEiq0IT6/VqYK012TWKbxIpk6WcwONng4wuw 90AOy/gzdquGfaLP+AZry1P6F1zVe9hNVjNXFzrbVG287O0IkV9xmVLUjm/6M9AF1uQw IlR0WIJAYn1roYpEiOosEbP+E8+DdUCBBUbS11Mid1XJ5U9SgPkMjzhI013jRPEwdJ76 BF8cYl1XuYzzPffJMReQW/3ZRCPar9CAVga6vPB/8tEuPZlHC4dvYwZALfDLJqWtUdUf nbXA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id 204-v6si82649wmw.3.2018.10.17.05.15.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 05:15:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.180] (nat-ppp-217.71.235.199-satnet-spb.ru [217.71.235.199] (may be forged)) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w9HCFYxR001656 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 17 Oct 2018 14:15:35 +0200 Subject: Re: [PATCH] doc: Describe offline building To: Baurzhan Ismagulov , isar-users@googlegroups.com References: <20181016134758.13983-1-ibr@radix50.net> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: Date: Wed, 17 Oct 2018 15:15:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181016134758.13983-1-ibr@radix50.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: ulNx6jD5993i On 10/16/18 4:47 PM, Baurzhan Ismagulov wrote: > From: Baurzhan Ismagulov > > Describes building Isar offline using a local partial Debian mirror. Applied to the 'next'. Thanks, Maxim. > Signed-off-by: Baurzhan Ismagulov > --- > doc/offline.md | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 111 insertions(+) > create mode 100644 doc/offline.md > > diff --git a/doc/offline.md b/doc/offline.md > new file mode 100644 > index 0000000..d2256a5 > --- /dev/null > +++ b/doc/offline.md > @@ -0,0 +1,111 @@ > += Working Offline > + > +== Prepare Partial Debian Mirror > + > +``` > +HOST=ftp.de.debian.org > +WEB_HOME=/mnt/sdc1/w > +ARCHES=amd64,arm64,armhf,i386 > +mkdir -p $WEB_HOME > +``` > + > +``` > +DST=$WEB_HOME/debian > +DISTROS=jessie,jessie-updates,stretch,stretch-updates,buster,buster-updates > +time debmirror -p --getcontents -e http -h $HOST -d $DISTROS -a $ARCHES $DST > +``` > + > +``` > +DST=$WEB_HOME/debian-security > +DISTROS=jessie/updates,stretch/updates,buster/updates > +time debmirror -p --getcontents -e http -h $HOST -r /debian-security \ > + -d $DISTROS -a $ARCHES $DST > +``` > + > +== Prepare Git Mirror > + > +``` > +DST=$WEB_HOME/git > +``` > + > +``` > +PKG=hello > +mkdir -p $DST/ilbers/$PKG.git > +cd $DST/ilbers/$PKG.git > +git init --bare > +cp hooks/post-update.sample hooks/post-update > +cd - > +git clone https://github.com/ilbers/$PKG.git > +cd $PKG > +git remote add local $DST/ilbers/$PKG.git > +git push local master > +``` > + > +Repeat for `libhello`. > + > +== Set Up Apache > + > +``` > +sudo apt-get install apache2 > +sudo vi /etc/apache2/sites-available/000-default.conf > +``` > + > +``` > + > + ... > + Alias /debian /mnt/sdc1/w/debian > + Alias /debian-security /mnt/sdc1/w/debian-security > + Alias /git /mnt/sdc1/w/git > + > + Options +Indexes > + AllowOverride None > + Require all granted > + > + > +``` > + > +Repeat for `/etc/apache2/sites-available/default-ssl.conf`. > + > +`sudo systemctl reload apache2` > + > +== Set Up BIND > + > +A DNS server is necessary to resolve `localhost` from `buildchroot-target`. > + > +``` > +sudo apt-get install bind9 > +sudo systemctl start bind9 > +sudo vi /etc/resolv.conf > +``` > + > +``` > +nameserver 127.0.0.1 > +``` > + > +== Use Offline Files > + > +``` > +git clone https://github.com/ilbers/isar.git > +cd isar > +. isar-init-build-env ../build > +vi conf/local.conf > +``` > + > +``` > +DISTRO_APT_PREMIRRORS = "\ > + ftp\.de\.debian\.org localhost\n\ > + security\.debian\.org localhost/debian-security\n" > + > +PREMIRRORS_prepend = "git://github.com/ git://localhost/git/\n" > + > +FETCHCMD_git = "GIT_SSL_NO_VERIFY=1 git -c core.fsyncobjectfiles=0" > +``` > + > +Setting `GIT_SSL_NO_VERIFY` is necessary if SSL certificate is self-signed or > +its CN isn't `localhost`. > + > +== TODO > + > +* Build without BIND > +* Change `protocol=https` to `protocol=http` in `PREMIRRORS`, drop FETCHCMD_git > +* Tool for mirroring git repos > -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov