User:Fab/Personal aports repo

From Alpine Linux
Revision as of 13:39, 5 July 2011 by Fab (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This page was made to check the existing guides to setup a developer repository and publish it at git.alpinelinux.org. I use the aports repository because this requires a bit more of configuration than just setting up a repo at git.alpinelinux.org.

Note: If you just want to have a local clone of the official Alpine aports repo, go to a directory of your choice and use git to clone everything.

git clone git://git.alpinelinux.org/aports.git

SSH access to git.alpinelinux.org and some space is needed.

Create a repository

Create a directory on your local system.

mkdir aports

Initialize the git repository and create a first commit

echo "testing" > aports/test.txt cd aports git init git add . git commit -m 'Initial commit'

Create a bare repo

Clone it to a bare repo

cd .. git clone --bare aports aports.git

Set the description

echo "fab's aports repo" > aports.git/description

Set the section and your name for cgit.

cat <<EOF >> aports.git/cgitrc
section=Developer fab
owner=Fabian Affolter
EOF

Upload to git.alpinelinux.org

Copy the content to your the ~/cgit directory on git.alpinelinux.org.

scp -r aports.git git.alpinelinux.org:cgit/

Clean up

We no longer need the local aports.git directory.

rm -rf aports.git

Add your personal repo

So far git does not know anything about about the repositories.

cd aports git remote add origin ssh://git.alpinelinux.org/gitroot/fab/aports.git

Add upstream source to merge with

Add the original source as a git remote repository ("upstream" can be whatever name you want to assign to the remote repository):

git remote add upstream git://git.alpinelinux.org/aports