From: Baurzhan Ismagulov <ibr@radix50.net>
To: isar-users@googlegroups.com
Subject: [PATCH] doc: Describe offline building
Date: Tue, 16 Oct 2018 15:47:58 +0200 [thread overview]
Message-ID: <20181016134758.13983-1-ibr@radix50.net> (raw)
From: Baurzhan Ismagulov <ibr@ilbers.de>
Describes building Isar offline using a local partial Debian mirror.
Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
---
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
+```
+
+```
+<VirtualHost *:80>
+ ...
+ Alias /debian /mnt/sdc1/w/debian
+ Alias /debian-security /mnt/sdc1/w/debian-security
+ Alias /git /mnt/sdc1/w/git
+ <Directory /mnt/sdc1/w>
+ Options +Indexes
+ AllowOverride None
+ Require all granted
+ </Directory>
+</VirtualHost>
+```
+
+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
next reply other threads:[~2018-10-16 13:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 13:47 Baurzhan Ismagulov [this message]
2018-10-17 12:15 ` Maxim Yu. Osipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181016134758.13983-1-ibr@radix50.net \
--to=ibr@radix50.net \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox