:: Re: [DNG] Mirroring Devuan
Top Pagina
Delete this message
Reply to this message
Auteur: aitor_czr
Datum:  
Aan: dng
Onderwerp: Re: [DNG] Mirroring Devuan
Hi all,

Take the case two mirrors, a complete Debian mirror in DEBIAN folder,
and the merged packages in DEVUAN folder, containing both their
corresponding /dists/ and /pool/. The following scripts build the /dist/
and /pool/ from the content of them, giving priority to Devuan. The
script1 calls to the script2:

****** SCRIPT1:

#!/bin/sh

find ./DEBIAN -name "*.dsc" -exec ./script2 {} \;

exit 0

****** END OF THE SCRIPT1

****** SCRIPT2:
#!/bin/sh

line1=${1%/*}
line2=${line1#*/}
line3=${line2#*/}

### The above lines converts
###./DEBIAN/pool/main/main/l/linux/linux_3.16.7-ckt11-1+deb8u3.dsc
### in /pool/main/main/l/linux
### The relationship betwen paths and sources is biyective


if [ -d ./DEVUAN/$line3 ];

then
find ./DEVUAN -name "*.deb" -exec reprepro --ask-passphrase -b . -V -C
main includedeb jessie {} \;
find ./DEVUAN -name "*.udeb" -exec reprepro --ask-passphrase -b . -V
-C main includeudeb jessie {} \;
find ./DEVUAN -name "*.dsc" -exec reprepro --ask-passphrase -b . -V -C
main includedsc jessie {} \;
exit 0
fi

find ./DEBIAN -name "*.deb" -exec reprepro --ask-passphrase -b . -V -C
main includedeb jessie {} \;
find ./DEBIAN -name "*.udeb" -exec reprepro --ask-passphrase -b . -V -C
main includeudeb jessie {} \;
find ./DEBIAN -name "*.dsc" -exec reprepro --ask-passphrase -b . -V -C
main includedsc jessie {} \;

exit 0

****** END OF THE SCRIPT2

For each description file *.dsc found in the frist script, the second
script searches in the corresponding path in ./DEVUAN. If it exits,
DEBIAN packages are ignored.

There are some stuffs to add: debian must be changed by devuan in the
path (debian-keyring by devuan-keyring, etc), a black list for debian,
extra packages nonexistent in debian...

Aitor

Jaromil:
>> we haven't yet worked on the mirroring mechanism, but we will
>>
>> once done, there will be a script and it will be easy
>> I guess it will be a sort of amprolla satellite process
>> so that the mirror redirection will be handled by nextime's software