public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] doc: Describe offline building
@ 2018-10-16 13:47 Baurzhan Ismagulov
  2018-10-17 12:15 ` Maxim Yu. Osipov
  0 siblings, 1 reply; 2+ messages in thread
From: Baurzhan Ismagulov @ 2018-10-16 13:47 UTC (permalink / raw)
  To: isar-users

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] doc: Describe offline building
  2018-10-16 13:47 [PATCH] doc: Describe offline building Baurzhan Ismagulov
@ 2018-10-17 12:15 ` Maxim Yu. Osipov
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Yu. Osipov @ 2018-10-17 12:15 UTC (permalink / raw)
  To: Baurzhan Ismagulov, isar-users

On 10/16/18 4:47 PM, Baurzhan Ismagulov wrote:
> From: Baurzhan Ismagulov <ibr@ilbers.de>
> 
> Describes building Isar offline using a local partial Debian mirror.

Applied to the 'next'.

Thanks,
Maxim.


> 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
> 


-- 
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-17 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 13:47 [PATCH] doc: Describe offline building Baurzhan Ismagulov
2018-10-17 12:15 ` Maxim Yu. Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox