ETHW

(Created page with "Here is How To: Work with local overlay synchronized with your git repository. == Setup git local overlay == === Create local overlay === Create the necessary directory struct...")
 
(Create local overlay)
Line 6: Line 6:
  
 
Create the necessary directory structure
 
Create the necessary directory structure
<pre>
+
<console>
# mkdir -p /usr/local/portage/profiles  
+
###i## mkdir -p /usr/local/portage/profiles  
# echo "$HOSTNAME" >> /usr/local/portage/profiles/repo_name
+
###i## echo "$HOSTNAME" >> /usr/local/portage/profiles/repo_name
</pre>
+
</console>
  
 
This enables access to /usr/local/portage
 
This enables access to /usr/local/portage
 
for users in the portage group
 
for users in the portage group
<pre>
+
<console>
# chown root:portage /usr/local/portage
+
###i## chown root:portage /usr/local/portage
</pre>
+
</console>
  
 
Assign the portage group as default for newly created files in
 
Assign the portage group as default for newly created files in
/usr/local/portage
+
<tt>/usr/local/portage</tt>
<pre>
+
<console>
# chmod g+s /usr/local/portage
+
###i## chmod g+s /usr/local/portage
</pre>
+
</console>
  
 
Enable users in the portage group to write to
 
Enable users in the portage group to write to
/usr/local/portage
+
<tt>/usr/local/portage</tt>
<pre>
+
<console>
# chmod 775 /usr/local/portage
+
###i## chmod 775 /usr/local/portage
</pre>
+
</console>
  
Edit make.conf
+
Edit /etc/portage/make.conf
<pre>
+
<console>
# echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/make.conf
+
###i## echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/portage/make.conf
</pre>
+
</console>
 
+
Logout as root
+
<pre>
+
# exit
+
</pre>
+
  
 
Create the relevant directory structure  
 
Create the relevant directory structure  
 
(I use the game rain-slick as example)
 
(I use the game rain-slick as example)
<pre>
+
<console>
$ mkdir -p /usr/local/portage/games-rpg/rain-slick
+
$ ##bl##mkdir -p /usr/local/portage/games-rpg/rain-slick
</pre>
+
</console>
  
 
Copy the ebuild to your overlay
 
Copy the ebuild to your overlay
<pre>
+
<console>
$ cp rain-slick-1.5.ebuild /usr/local/portage/games-rpg/rain-slick
+
$ ##bl##cp rain-slick-1.5.ebuild /usr/local/portage/games-rpg/rain-slick
</pre>
+
</console>
  
 
Issue the following commands to install rain-slick from your overlay
 
Issue the following commands to install rain-slick from your overlay
<pre>
+
<console>
$ cd /usr/local/portage/games-rpg/rain-slick
+
$ ##bl##cd /usr/local/portage/games-rpg/rain-slick
$ ebuild rain-slick-1.5.ebuild digest
+
$ ##bl##ebuild rain-slick-1.5.ebuild digest
$ su
+
$ ##bl##su
# emerge -a rain-slick
+
###i## emerge rain-slick
</pre>
+
</console>
  
 
=== Synchronize with git repository ===
 
=== Synchronize with git repository ===

Revision as of 15:43, January 29, 2014

Here is How To: Work with local overlay synchronized with your git repository.

Setup git local overlay

Create local overlay

Create the necessary directory structure

# mkdir -p /usr/local/portage/profiles 
# echo "$HOSTNAME" >> /usr/local/portage/profiles/repo_name

This enables access to /usr/local/portage for users in the portage group

# chown root:portage /usr/local/portage

Assign the portage group as default for newly created files in /usr/local/portage

# chmod g+s /usr/local/portage

Enable users in the portage group to write to /usr/local/portage

# chmod 775 /usr/local/portage

Edit /etc/portage/make.conf

# echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/portage/make.conf

Create the relevant directory structure (I use the game rain-slick as example)

$ mkdir -p /usr/local/portage/games-rpg/rain-slick

Copy the ebuild to your overlay

$ cp rain-slick-1.5.ebuild /usr/local/portage/games-rpg/rain-slick

Issue the following commands to install rain-slick from your overlay

$ cd /usr/local/portage/games-rpg/rain-slick
$ ebuild rain-slick-1.5.ebuild digest
$ su
# emerge rain-slick

Synchronize with git repository

If you are not related with git and ssh you can check this GitHub manual. If you have not git repository with local overlay yet you can assign it alike :

$ cd /usr/local/portage/
$ git add /usr/local/portage/profiles/repo_name
$ git commit -m 'git init'
$ git remote add origin git@github.com:YourGitHubAccount/YourGitHubRepository.git
$ git push -u origin master

If you already have git overlay repository or want to use some you can assign it alike :

$ cd /usr/local/portage/
$ git init
$ git remote add origin git@github.com:YourGitHubAccount/YourGitHubRepository.git
$ git fetch
$ git branch master origin/master
$ git checkout master