Subject: [alpine-devel] git.alpinelinux.org reorganized

From: Natanael Copa <[email-masked]>
Date: Fri, 28 Jan 2011 19:46:13 +0000

Hi,

I have reorganized the git.alpinelinux.org repos.

Developers can create new git repos at will, it is just to put the repo
in ~/cgit and it will show up on the http://git.alpinelinux.org index
page. You can select in what section the repo should show up by create
a cgitrc file and you can set the description.

To create a new project named mytest do the following:

# create a dir, init git and create a first commit
mkdir mytest
cd mytest
echo "testing" > test.txt
git init
git add .
git commit -m 'initial commit'

# clone it to a bare repo
cd ..
git clone --bare mytest mytest.git

# set the description
echo "My git/cgit test" > mytest.git/description

# Set the section for cgit
echo "section=Developer ncopa" > mytest.git/cgitrc

# copy to ~/cgit dir on git.a.o
scp -r mytest.git git.alpinelinux.org:cgit/

# At this point, the empty repo should be visible on the index page
# http://git.alpinelinux.org/

# Note the ssh clone address on the cgit page:
# http://git.alpinelinux.org/cgit/ncopa/mytest.git/

# we no longer need the local bare repository.
rm -rf mytest.git

To continue use the repo you will mostly like want change the repos
origin, so you can simply do 'git push' for pushing it to git.a.o.
There are 2 ways to do it: 1) modify origin in .git/config or 2) remove
the mytest dir and use the ssh clone url.

1)
cd mytest
vim .git/config
# add the following lines:
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = ssh://git.alpinelinux.org/gitroot/ncopa/mytest.git
[branch "master"]
        remote = origin
        merge = refs/heads/master

2)
rm -rf mytest
git clone ssh://git.alpinelinux.org/gitroot/ncopa/mytest.git

Now you can do local modifications and git push etc.

Also note that developers with ssh also can put stuff in
~/public_html that will show up in http://dev.alpinelinux.org/~user.
See http://dev.alpinelinux.org/̃~ncopa/alpine for example. This is so
developers has some http space for uploading sources, bigger patchers
etc. Please do not abuse it.

-nc

PS. Would be nice if someone could test the above and put it on the
wiki.a.o. thanks!

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Ted Trask <[email-masked]>
Date: Mon, 31 Jan 2011 13:53:23 -0800 (PST)

I like the idea of developers creating there own repos. One problem though. The 
update changed the URI of every existing git repository. For instance, 
acf-kamailio became acf-kamailio.git. Now, the acf-kamailio APKBUILD is broken - 
both url and source are wrong. While I could go through and change ALL of the 
existing APKBUILD files that point to alpinelinux repos, it would still leave 
all of the existing installed APKs with invalid url information. Would be much 
nicer IMHO to modify the cgit config to change the URIs back to what they were. 
Thoughts?

Ted

----- Original Message ----
From: Natanael Copa <[email-masked]>
To: [email-masked]
Sent: Fri, January 28, 2011 2:46:13 PM
Subject: [alpine-devel] git.alpinelinux.org reorganized

Hi,

# set the description

1)
cd mytest
vim .git/config

2)
rm -rf mytest

-nc

---

---

---

From: Jeff Bilyk <[email-masked]>
Date: Mon, 31 Jan 2011 17:20:44 -0500

I'd agree with Ted.  Could the existing repositories in /var/gitroot
be renamed to {reponame} from {reponame}.git while leaving the new
symlinks to ~/cgit?

Jeff

-- 
Jeff

---

---

From: Natanael Copa <[email-masked]>
Date: Tue, 1 Feb 2011 13:46:08 +0000

On Mon, 31 Jan 2011 13:53:23 -0800 (PST)
Ted Trask <[email-masked]> wrote:

> I like the idea of developers creating there own repos. One problem
> though. The update changed the URI of every existing git repository.
> For instance, acf-kamailio became acf-kamailio.git. Now, the
> acf-kamailio APKBUILD is broken - both url and source are wrong.
> While I could go through and change ALL of the existing APKBUILD
> files that point to alpinelinux repos, it would still leave all of
> the existing installed APKs with invalid url information. Would be
> much nicer IMHO to modify the cgit config to change the URIs back to
> what they were. Thoughts?

Yeah, break links is always bad.

I have enabled remove-suffix (see the cgitrc man page:
http://hjemli.net/git/cgit/plain/cgitrc.5.txt ) but it doesnt seem to
work.

How about we make a redirect in lighttpd config? so cgit/aports/ gets
rewritten to cgit/aports.git/?

Please let me know if you figure out *how* to do it.

-nc

---