Fedorapeople Repos/zh-cn

From FedoraProject

< Fedorapeople Repos(Difference between revisions)
Jump to: navigation, search
(Create repo)
m (Delete repo)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{autolang}}
 
{{autolang}}
= Fedora个人源 =
+
= Fedora 个人源 =
Fedora Packagers looking to create a repo at http://repos.fedorapeople.org/ should follow the directions below.  These repos should only be used for packages that are intended for end-user non-transient use.  For example:
+
Fedora 的打包人员寻找一个可供他们创建自己的软件源的空间。这就是 http://repos.fedorapeople.org/ 。如果您想使用它,请按照以下步骤来做。注意,这些软件源只能被用作面向用户的“非短期”使用,例如:
  
* Bring a major release version to an older Fedora release
+
* 放置针对 Feodra 的历史版本制作的软件包
* Testing out new software before putting it in rawhide
+
* 在把新的软件包推送至 Rawhide 发行版之前进行测试
* Alternate packages already available (different compile options for example)
+
* 放置经过不同编译选项编译出来的软件包
  
Things it should _not_ be used for include:
+
禁止以下操作:
  
* Package reviews
+
* 软件包审核
* Stuff on the [http://fedoraproject.org/wiki/ForbiddenItems Forbidden Items] page
+
* [http://fedoraproject.org/wiki/ForbiddenItems 禁止的软件包] 页面规定禁止出现的软件包
  
 
= 创建源 =
 
= 创建源 =
  
== Create Repo Layout ==
+
== 创建软件源环境 ==
  
Log in to fedorapeople.org and run:
+
登陆 fedorapeople.org 然后运行:
  
 
<pre>
 
<pre>
Line 23: Line 23:
 
</pre>
 
</pre>
  
And follow the directions.
+
然后按照提示继续操作。
  
 
== Local Repo ==
 
== Local Repo ==
Line 61: Line 61:
 
http://repos.fedorapeople.org/
 
http://repos.fedorapeople.org/
  
= Delete repo =
+
= 删除个人源 =
  
 
To delete a path, just use REPO_PATH from above and remove it:
 
To delete a path, just use REPO_PATH from above and remove it:

Latest revision as of 04:29, 4 April 2012

Contents

[edit] Fedora 个人源

Fedora 的打包人员寻找一个可供他们创建自己的软件源的空间。这就是 http://repos.fedorapeople.org/ 。如果您想使用它,请按照以下步骤来做。注意,这些软件源只能被用作面向用户的“非短期”使用,例如:

  • 放置针对 Feodra 的历史版本制作的软件包
  • 在把新的软件包推送至 Rawhide 发行版之前进行测试
  • 放置经过不同编译选项编译出来的软件包

禁止以下操作:

[edit] 创建源

[edit] 创建软件源环境

登陆 fedorapeople.org 然后运行:

$ newgrp cla_done
$ new_repo

然后按照提示继续操作。

[edit] Local Repo

You must create all repodata locally on your workstation, not on fedorapeople.org. If you compiled via koji --scratch builds, download those builds and follow the example below (nagios, nagios-debuginfo and nagios-devel had already been downloaded to ~/)

$ mkdir /tmp/myrepo
$ cd /tmp/myrepo
$ mkdir i386 x86_64 SRPMS
$ cp ~/nagios*3.1.2-2.fc12.i386.rpm ./i386
$ cp ~/nagios*3.1.2-2.fc12.x86_64.rpm ./x86_64
$ cp ~/nagios-3.1.2-2.fc12.src.rpm ./SRPMS
$ for dir in *; do cd $dir; createrepo ./; cd ..; done

You now have 3 local yum repos in your i386, x86_64 and SRPMS directory

Note.png
It is recommended to use a dist tag when creating rpms to avoid confusion

[edit] Upload Repos

Note: to complete this step you need the REPO_PATH from the "Create Repo Layout" above.

$ rsync -avz * fas_name@fedorapeople.org:$REPO_PATH

[edit] Accessing new repo

Your new repo should now be listed at:

http://repos.fedorapeople.org/repos/

A cron job will be run regularly to add it to the list of known repos at:

http://repos.fedorapeople.org/

[edit] 删除个人源

To delete a path, just use REPO_PATH from above and remove it:

rm -rf /srv/repos/mmcgrath/nagios

[edit] Script for easy create tree local repo directory

#!/usr/bin/env bash
repoLocalDir=~/repos
declare -a branches=(fedora-13 fedora-14)
declare -a rpmdir=(i386 x86_64 noarch SRPMS)

IFS=",$IFS"
eval mkdir -pv $repoLocalDir/{"${branches[*]}"}/{"${rpmdir[*]}"}

[edit] Script for easy repo update

#!/usr/bin/env bash
fasLogin=bioinfornatics
repoLocalDir=~/repos
repoName=D
declare -a branch=(fedora-13 fedora-14)
declare -a rpmdir=(i386 x86_64 noarch SRPMS)
declare -a rsyncParam=(-avtz --delete)

cd $repoLocalDir
for dir2 in "${branch[@]}"
do
    echo -e "\033[31mUpdate $dir2 repos:\033[0m"
    cd $dir2
    for dir3 in "${rpmdir[@]}"
    do
        echo -e "\033[34m\t* $dir3:\033[0m"
        cd $dir3
        createrepo ./
        rsync "${rsyncParam[@]}" ./* $fasLogin@fedorapeople.org:/srv/repos/$fasLogin/$repoName/$dir2/$dir3
        cd ..
    done
    cd ..
done
cd ..

In my example i put all fedora branch in ~/repos directory so maybe you need modify this. You can use sed for quick replace as:

$ sed -i "s|repoLocalDir=~/repos|repoLocalDir=newDirName|"

And you need replace bioinfornatics by to own fas login

$ sed -i "s|fasLogin=bioinfornatics|fasLogin=fasLoginName|"

In last my repos is named D so you need replace this to:

$ sed -i "s|repoName=D|repoName=myRepoName|"