[arch-general] arch linux repository

jesse jaara jesse.jaara at gmail.com
Wed Jun 15 17:44:40 EDT 2011


2011/6/16 jesse jaara <jesse.jaara at gmail.com>

>
>
> 2011/6/16 Sergio de Almeida Lenzi <lenzi.sergio at gmail.com>
>
>> Hello...
>>
>> I am building a private repository (myrep) I put all the packages, I
>> build
>> using PKGBUILD and /var/abs/tree. and saved it on an internet server
>> that can be acessed by using http.
>>
>> Is there a way to build the db and files in the repository, in a way
>> pacman -Syu can
>> update my archlinux???   or pacman just do not use them???
>>
>> Thanks
>>
> You can use repo-add and repo-remove commands to modify pacman-repo-dbs
> then just add the server to pacman.conf
>
> [myrepo]
> Server = http://myserver.fi/arch/repo
>
> you want to put that over the other entries if you build packages that are
> also found from core/extra/community
> so that the get fech from there instead from the offical repos.
> --
> (\_ /) copy the bunny to your profile
> (0.o ) to help him achieve world domination.
> (> <) come join the dark side.
> /_|_\ (we have cookies.)
>
>
Oh and I used to maintain a customrepo in the past and created 2 scripts to
help in it. Use them if you like
they are normal bash functions. They require package
'bash-xyne-common_functions' from aur/xyne's-repo

##This push the changes from the local copy of the repo to net.
jrepo-sync () {
lftp -c "set ftp:list-options -a;
open ftp://username:password@myserver.fi;
lcd /path/to/my-repo;
cd /repo/path/on/ftp/server;
mirror --reverse --delete --verbose"
}

###This adds the package to the custom repo and removes old versions
###if they exist.

jrepo-add () {
for pkg in $@; do
cp "`pwd`/$pkg" "/srv/ftp/jrepo/"
repo-add "/srv/ftp/jrepo/jrepo.db" "/srv/ftp/jrepo/$pkg"
extensionless=`strip_pkg_ext $pkg`
name=`get_package_name $extensionless`
toremove=`ls "/srv/ftp/jrepo" | grep -v "$pkg" | grep "$name"`

for i in $toremove; do
extensionless=`strip_pkg_ext $i`
if [ `get_package_name $extensionless` = $name ]; then

echo "Removing old version(s) of $name from repository"
echo $i
rm "/srv/ftp/jrepo/$i"
fi
done
done
}


-- 
(\_ /) copy the bunny to your profile
(0.o ) to help him achieve world domination.
(> <) come join the dark side.
/_|_\ (we have cookies.)


More information about the arch-general mailing list