Difference between pages "Portage Git Mirror" and "Test"

(Difference between pages)
(Pull from remote)
 
 
Line 1: Line 1:
=Setting up local git mirror =
+
{{#get_web_data:url=http://build.funtoo.org/index.xml|format=xml|use xpath|data=builds=/subarches/subarch[@name='amd64-bulldozer']/@builds}}
 +
;Builds: {{#external_value:builds}}
  
This tutorial explains how to save bandwidth when several local computers need to pull updates from a single remote git repository.
+
asdflk asdlfk asdlf alsdf lasd flasd flasd flasd flasd flasd flasd flas dflasd flasdl flasdf lasdfl alsdf lasdf lasdflafsd la sdf
 +
<div style="align: center;"><div style="border: 1px solid #ccc; border-radius: 5px;">
 +
[[{{#show: Organization:Brownrice Internet| ?Logo|link=none}}|350px|class=img-responsive|link=Organization:Brownrice Internet]]</div><br/>
 +
[[Organization:Brownrice Internet|Learn about Funtoo-friendly organization: Brownrice Internet]]</div>
 +
asdflk asdlfk asdlf alsdf lasd flasd flasd flasd flasd flasd flasd flas dflasd flasdl flasdf lasdfl alsdf lasdf lasdflafsd la sdf
 +
{{fullurl:News:The Many Builds of Funtoo Linux}}
 +
{{#widget:AddThis}}
  
== Use case ==
+
I like the {{f|/etc/make.conf}} file, which can also be referred to as {{f|/etc/portage/make.conf}}. It is a groovy file. Another cool file is {{f|/etc/fstab}}.
  
This tutorial will be about hosting a local mirror of funtoo git based portage tree.
+
=== make.conf mentions ===
  
Following terms should be adapted
+
{{#ask: [[Mentions file::make.conf]]
 +
| format=category
 +
}}
  
<table border="1">
+
{{console|body=
<tr class="header">
+
# ##i##bluetoothctl
<th align="left">Terms</th>
+
[##g##NEW##!g##] Controller 00:02:72:C9:62:65 antec [default]
<th align="left">Definition</th>
+
##bl##[bluetooth]##!bl###power on
</tr>
+
Changing power on succeeded
<tr class="odd">
+
##bl##[bluetooth]##!bl### ##i##agent on
<td align="left">git.lan</td>
+
Agent registered
<td align="left">The git-daemon local mirror host</td>
+
##bl##[bluetooth]##!bl### ##i##scan on
</tr>
+
Discovery started
<tr class="even">
+
##bl##[bluetooth]##!bl### ##i##devices
<td align="left">localhost</td>
+
Device 00:1F:20:3D:1E:75 Logitech K760
<td align="left">Any local host</td>
+
##bl##[bluetooth]##!bl### ##i##pair 00:1F:20:3D:1E:75
</tr>
+
Attempting to pair with 00:1F:20:3D:1E:75
<tr class="odd">
+
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Connected: yes
<td align="left">nobody</td>
+
##r##[agent]##!r## Passkey: 454358
<td align="left">Owner user of .git files</td>
+
##r##[agent]##!r## Passkey: ##i##4##!i##54358
</tr>
+
##r##[agent]##!r## Passkey: ##i##45##!i##4358
<tr class="even">
+
##r##[agent]##!r## Passkey: ##i##454##!i##358
<td align="left">/home/git-mirrors</td>
+
##r##[agent]##!r## Passkey: ##i##4543##!i##58
<td align="left">Base path of git-daemon</td>
+
##r##[agent]##!r## Passkey: ##i##45435##!i##8
</tr>
+
##r##[agent]##!r## Passkey: ##i##454358##!i##
</table>
+
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Paired: yes
 
+
Pairing successful
== Local mirror ==
+
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Connected: no
 
+
##bl##[bluetooth]##!bl### ##i##connect 00:1F:20:3D:1E:75
=== Git-daemon configuration ===
+
Attempting to connect to 00:1F:20:3D:1E:75
==== Prepare directories and get portage tree====
+
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Connected: yes
<console>
+
Connection successful
###i## mkdir /home/git-mirrors
+
##bl##[bluetooth]##!bl### ##i##quit
###i## chown nobody /home/git-mirrors
+
[##r##DEL##!r##] Controller 00:02:72:C9:62:65 antec [default]
###i## su -s /bin/sh nobody
+
#
$##bl## cd /home/git-mirrors
+
$##bl## git clone --mirror --bare git://github.com/funtoo/ports-2012.git portage.git
+
</console>
+
For a security reason we use a nobody user .
+
==== git-daemon configuration====
+
{{file|name=/etc/conf.d/git-daemon|desc=|body=
+
GITDAEMON_OPTS=--syslog --verbose --enable=receive-pack --export-all
+
GITDAEMON_OPTS=${GITDAEMON_OPTS} --base-path=/home/git-mirrors /home/git-mirrors
+
GIT_USER=nobody
+
GIT_GROUP=nobody
+
 
}}
 
}}
 
====Service configuration====
 
To start daemon with a mirror machine boot add <code>git-daemon</code> to OpenRC's default runlevel
 
<console>
 
###i## rc-update add git-daemon default
 
</console>
 
To make changes start immediately just run <code>rc</code>
 
<console>
 
###i## rc
 
</console>
 
 
=== Pull from remote ===
 
 
Add the following to <code>/etc/cron.daily/funtoo-sync.sh</code>:
 
 
<pre>
 
#!/bin/sh
 
cd /home/git-mirrors/portage.git
 
su nobody -s "/bin/sh" -c "git pull"
 
</pre>
 
 
== Cloning from local git-daemon ==
 
 
Local clone from <code>git.lan</code>:
 
<console>
 
###i## mv /usr/portage /usr/portage.old
 
###i## git clone git://git.lan/portage.git /usr/portage
 
###i## cd /usr/portage
 
###i## git checkout funtoo.org
 
</console>
 
 
[[Category:HOWTO]]
 

Revision as of 15:22, January 12, 2015

Builds
1,2,3,4,5,6

asdflk asdlfk asdlf alsdf lasd flasd flasd flasd flasd flasd flasd flas dflasd flasdl flasdf lasdfl alsdf lasdf lasdflafsd la sdf

[[{{#show: Organization:Brownrice Internet| ?Logo|link=none}}|350px|class=img-responsive|link=Organization:Brownrice Internet]]

Learn about Funtoo-friendly organization: Brownrice Internet

asdflk asdlfk asdlf alsdf lasd flasd flasd flasd flasd flasd flasd flas dflasd flasdl flasdf lasdfl alsdf lasdf lasdflafsd la sdf http://www.funtoo.org/News:The_Many_Builds_of_Funtoo_Linux

I like the /etc/make.conf file, which can also be referred to as /etc/portage/make.conf. It is a groovy file. Another cool file is /etc/fstab.

make.conf mentions

{{#ask: Mentions file::make.conf | format=category }}

# bluetoothctl 
[NEW] Controller 00:02:72:C9:62:65 antec [default]
[bluetooth]#power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# scan on
Discovery started
[bluetooth]# devices
Device 00:1F:20:3D:1E:75 Logitech K760
[bluetooth]# pair 00:1F:20:3D:1E:75
Attempting to pair with 00:1F:20:3D:1E:75
[CHG] Device 00:1F:20:3D:1E:75 Connected: yes
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[CHG] Device 00:1F:20:3D:1E:75 Paired: yes
Pairing successful
[CHG] Device 00:1F:20:3D:1E:75 Connected: no
[bluetooth]# connect 00:1F:20:3D:1E:75
Attempting to connect to 00:1F:20:3D:1E:75
[CHG] Device 00:1F:20:3D:1E:75 Connected: yes
Connection successful
[bluetooth]# quit
[DEL] Controller 00:02:72:C9:62:65 antec [default]
#