From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6612951189497577472 X-Received: by 2002:a1c:7ece:: with SMTP id z197-v6mr2178626wmc.0.1539697681244; Tue, 16 Oct 2018 06:48:01 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:40d1:: with SMTP id b17-v6ls3321415wrq.1.gmail; Tue, 16 Oct 2018 06:48:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Xhlpm0BX7OkV8GCTWYn6JBHEnQ03O7JmXJXmUMZvha5zrD+rp6zhPgM4SQS8g9wQw66r6 X-Received: by 2002:adf:9d01:: with SMTP id k1-v6mr1983279wre.21.1539697680767; Tue, 16 Oct 2018 06:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539697680; cv=none; d=google.com; s=arc-20160816; b=zTiV2MQR2R1SvhXBFOa7jcz8Vl7YOHL3b5WG9pxUDQzqqHwwjMJ/ammOVuth+RnQqa QnTk0P7baxy0/13c8vSBn6jq9bPH5giQBICiveGSlFb5swIIMp5iIkBZ/iYOX97YwTZd xLmwmD1kclJqW09IV53FlmiBqXj6YPYuy8N0Uz+FYHKsYq4YM1Y6HolQ+V/5KfAH3F06 keFRwSTlDJA0L6rv0vj9BmbByprMzaCXv32zLR+PXVHk/0qL0zw1ZFIJYUNW7u9lU39T vzdSaDFy3y/ffVAGrif7LBZ3LI3Tu9LOUhRbj+Zjn/Ya/1sc6RNmvrDGAr5FSG8K9dO0 ujZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from; bh=ArQ5ZUrjx7FEXJyJQ5zh9sWTyaLpsYHQqO+TwQdN5uY=; b=y52REc2ehA87NAcRN14pAzcivXux0prJwHGRDP3gY/DJbGBSDetZHdEPrL8cAph7XE nvO/lIomeKDb5xNXCngFihEOpe7IOeYL7VxNZHZFxS0JWwD8CIyitzeDjITMDSL9+dI3 KMHrcMfIL+U0N5xjeV6OTTIUabjyizfABPW9lEVtfWVPmn+/4SUeDpwVo0wuLxkqEj4L bu0QwilIuYwMnfgtQV53fWgY7HGGdwOqpTYkrBj6cphmlnsJwU8BSTk5kFYXaew5Kz4+ gvH0ccMhGJ1ku6C/Dk9zFo+yX2mP4WQaY4iFHNk63DQsO77sajp5nBrngwo58PRuv1an 3dUQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 85.214.62.211 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id e5-v6si472594wru.1.2018.10.16.06.48.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 06:48:00 -0700 (PDT) Received-SPF: neutral (google.com: 85.214.62.211 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.214.62.211 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Received: from yssyq.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w9GDlw8d030952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Oct 2018 15:47:59 +0200 Received: from yssyq.m.ilbers.de (localhost [127.0.0.1]) by yssyq.m.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id w9GDlwRS014024 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Oct 2018 15:47:58 +0200 Received: (from ibr@localhost) by yssyq.m.ilbers.de (8.15.2/8.15.2/Submit) id w9GDlwpU014023 for isar-users@googlegroups.com; Tue, 16 Oct 2018 15:47:58 +0200 From: Baurzhan Ismagulov To: isar-users@googlegroups.com Subject: [PATCH] doc: Describe offline building Date: Tue, 16 Oct 2018 15:47:58 +0200 Message-Id: <20181016134758.13983-1-ibr@radix50.net> X-Mailer: git-send-email 2.11.0 X-TUID: YaIrNz5MZCkK From: Baurzhan Ismagulov Describes building Isar offline using a local partial Debian mirror. 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 -- 2.11.0