Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TOOL][PORTAGE] Sync-overlay - sync vari overlay e ebuilds.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Thu May 20, 2004 4:50 pm    Post subject: [TOOL][PORTAGE] Sync-overlay - sync vari overlay e ebuilds. Reply with quote

[UPDATE] 05.07.2004: new version.

ok, dopo 4 giorni di infausta reinstallazione mio malgrado :evil: lo "Scriptaro" torna alla riscossa :roll:

Stavolta Suor Germana propone uno script per gli smanettoni come me (e chi usa ~x86 pesantemente): questo fa un sync verso il tree di portage principale, verso breakmygentoo, verso un overlay di un certo robmoss2k che contiene molte fix per gcc 3.4, e verso 1 ebuild di uno script di configurazione wireless che uso e che viene aggiornato spesso.
edit:dimenticavo di dire, che una volta syncato, lo script mostra gli ebuild nuovi e aggiornati rispetto all'ultimo aggiornamento :D
Dovrete avere esearch installato (sta in portage).

si lancia con
Code:
script -v
o --verbose, se si e' in console, altrimenti senza nulla, ad. esempio per metterlo in cron.

ovviamente presume che abbiate PORTDIR_OVERLAY settata :)

[UPDATE]: il repository di redeeman sta sul suo pc, che spegne di notte (GMT+1). non vi preoccupate quindi se e' offline, riprovate di giorno.

auguri.
Code:
#!/bin/sh
################################################################################################
# script to sync various ebuild against local portage tree.
# author: Giovanni Ferri <fonderiadigitale@gechi.it>
# License: GPL-2
# The repositories listed here are not guaranteed to work all the time.
# If you experience errors, please check they're still alive.
#
# Please note that this script does not check (yet!) that syncing was performed correctly.
# Anyway, it shouldn't hurt your overlay tree.
################################################################################################

ver="0.2"
source /etc/make.conf
if [ -z "${PORTDIR_OVERLAY}" ]; then
   echo "Make sure that you have defined \$PORTDIR_OVERLAY in your /etc/make.conf"
   exit 0
elif [ ! -d ${PORTDIR_OVERLAY} ]; then
   echo "Please check that ${PORTDIR_OVERLAY} exists in your disk. and is a directory."
   exit 0
fi
# parse options
quiet="-q"
case "$1" in
   -v|--verbose) verbose=on;shift;;
   -vv|--really-verbose) verbose=on;unset quiet;reallyverbose=on;shift;;
   -e|--erase-backup) erase=on;shift;;
   -b|--backup)   shift
         if [ -n "$1" ]; then
            backupfile="$1"
         else
            echo "Specify a file to write the backup to."
            exit 1
         fi
         shift;;
   -m|--mail)   [ -z "${backupfile}" ] && shift
         if [ -n "$1" ]; then
            mailaddress="$1"
         else
            echo "Please specify a mail recipient to send result to.";exit 0
         fi;;
   [a-Z]*|[0-9]*)   echo "sync-overlay v${ver} [-v|--verbose] [-vv|--really-verbose] [-m|--mailto <email-address>]"
         echo "                    [-b|--backup <tar.bz2 file>] [-e|--erase]"
         exit 0;;
esac

if [ -n "${backupfile}" ]; then
   if [ -f "${backupfile}" ]; then
      if [ -n "${erase}" ]; then
         echo "Backup file exists! Be sure not to erase an existing backup.(-e to overwrite)"
         exit 0
      fi
   fi
   [ -n "${verbose}" ] && echo -n "Backing up ${PORTDIR_OVERLAY} to ${backupfile}.."
   [ -n "${reallyverbose}" ] && x="v"
   [ -f ${backupfile} ] && rm -f ${backupfile}
   cd /;tar cjp${x}f ${backupfile} ${PORTDIR_OVERLAY}
   echo -ne "..done.\n`ls -hl --color ${backupfile}`"
   exit 0
fi

[ -n "${verbose}" ] && echo "Syncing overlays..."

#bmg
rsync ${quiet} -ar rsync://rsync.breakmygentoo.net/bmg-overlay /usr/portage/overlay

#robmoss2k local tree
cd /usr/portage/overlay
wget  ${quiet} -o /dev/null http://home.jesus.ox.ac.uk/~rmoss/portage/local/tarball-local.tar.bz2
tar jxfp tarball-local.tar.bz2
cp -aR local/* .
rm -rf local tarball-local.tar.bz2
[ -n "${verbose}" ] && echo "RobMoss2k Overlay synced."

# wireless config
cd /usr/portage/overlay/net-wireless/wireless-config
wget -m -np -nd ${quiet} -t3 -l1 -Aebuild http://rsm.demon.co.uk/~roy/downloads.php
[ -n "${verbose}" ] && echo "Wireless-config ebuild synced."

# freevo

if [ -n "${reallyverbose}" ]
then
  /usr/local/scripts/portage/rsync-freevo
else
  /usr/local/scripts/portage/rsync-freevo > /dev/null
fi
[ -n "${verbose}" ] && echo "Freevo Ebuilds synced."

# redeeman local tree - big!

cd ${PORTDIR_OVERLAY}
if [ -n "${reallyverbose}" ]
then
  svn co http://redeeman.kaspersandberg.com/fluidportage/trunk/
else
  svn co http://redeeman.kaspersandberg.com/fluidportage/trunk/ > /dev/null
fi
cp -a trunk/* . > /dev/null
rm -rf trunk > /dev/null

[ -n "${verbose}" ] && echo "Redeeman Overlay synced."

# Esyncing total result

[ -n "${verbose}" ] && echo "Building Portage esearch index for your overlay tree..."

if [ -n "${mailaddress}" ]; then
   esync -n | mail -s "Portage Overlay tree Syncing result" ${mailaddress}
elif [ -z "${verbose}" ]; then
   esync > /usr/portage/updates.log &
else
   esync > /usr/portage/updates.log
   less /usr/portage/updates.log
fi

_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)


Last edited by FonderiaDigitale on Mon Jul 05, 2004 10:06 pm; edited 4 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Thu May 20, 2004 4:55 pm    Post subject: Reply with quote

Bello script. Voglio solo aggiungere che gli ebuild di breakmygentoo ogni tanto possono cusare qualche problema quindi occhi a quello che fate.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Thu May 20, 2004 4:58 pm    Post subject: Reply with quote

si appunto, e' il tree unstable (~x86) se lo usate, lo fate a vostro uso e consumo, ma sopratutto poi non c'e' assistenza degli sviluppatori.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Thu May 20, 2004 5:05 pm    Post subject: Reply with quote

FonderiaDigitale wrote:
ma sopratutto poi non c'e' assistenza degli sviluppatori.

Esattamente questo quello che intendevo.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sat Jun 26, 2004 11:58 pm    Post subject: Reply with quote

vorrei sapere se qualcuno lo (usa|usava), in caso affermativo rilascio una nuova versione.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Wed Jun 30, 2004 10:11 pm    Post subject: Reply with quote

uppo l'ultima volta perche forse e' andato perso, poi butto le modifiche (se a nessuno interessa)
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Jun 30, 2004 10:13 pm    Post subject: Reply with quote

FonderiaDigitale wrote:
uppo l'ultima volta perche forse e' andato perso, poi butto le modifiche (se a nessuno interessa)

Io direi che puoi metterle lo stesso visto che quest'estate appena ho tempo metto una bella macchina di test e questo script lo usero'
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Mon Jul 05, 2004 10:07 pm    Post subject: Reply with quote

updated.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
jdoe
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2003
Posts: 122
Location: Italy - Florence - Empoli

PostPosted: Mon Jul 05, 2004 11:58 pm    Post subject: Reply with quote

nn usa gensync per bmg?
sarebbe molto + comodo no?

John
_________________
me
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Tue Jul 06, 2004 12:07 am    Post subject: Reply with quote

non e' adatto per diverse cose. ad esempio ci sono alcuni archivi che si sincano con subversion, e non con rsync.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
jdoe
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2003
Posts: 122
Location: Italy - Florence - Empoli

PostPosted: Tue Jul 06, 2004 11:48 am    Post subject: Reply with quote

si ma per i repository di breakmygentoo intendevo...
_________________
me
Back to top
View user's profile Send private message
Delta9
n00b
n00b


Joined: 07 Mar 2004
Posts: 35

PostPosted: Mon Aug 30, 2004 4:41 pm    Post subject: Reply with quote

Sbaglio o questo script non utilizza $PORT_OVERLAY che per i repository di redeeman? Per gli altri, mi sembra metta tutto in /usr/portage/overlay.
È normale che siano lì?

Aggiunta: Non si potrebbe aggiungere l'ebuild del Gekit, in modo da aggiornarla automaticamente?
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Mon Aug 30, 2004 7:20 pm    Post subject: Reply with quote

per la seconda richiesta, e' gia' nel gekit.
per la prima, sto per rilasciare una nuova versione aggiornata :)
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum