Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión e7713836

Añadido por Rafael J. García Perdigón hace casi 5 años

Creado linex-mirror

Ver diferencias:

debian/all/linex-mirror/debian/changelog
linex-mirror (1.1) linex; urgency=medium
* Created directories for repos and apache2.
-- Rafael J. García Perdigón <rafael.garciap@juntaex.es> Tue, 21 Jul 2020 10:26:18 +0200
linex-mirror (1.0) linex; urgency=medium
* Initial Release.
-- Rafael J. García Perdigón <rafael.garciap@juntaex.es> Fri, 17 Jul 2020 12:18:26 +0200
debian/all/linex-mirror/debian/compat
10
debian/all/linex-mirror/debian/control
Source: linex-mirror
Section: admin
Priority: extra
Maintainer: Rafael Jesús García Perdigón<rafael.garciap@juntaex.es>
Build-Depends: debhelper (>= 10.0.0)
Standards-Version: 3.9.4
Package: linex-mirror
Architecture: all
Pre-Depends: apt-mirror,apache2
Description: linex apt-mirror config
Configure apt-mirror with linex repositories configurations.
debian/all/linex-mirror/debian/copyright
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: linex-miror
Files: *
Copyright: 2014 Gobierno de Extremadura
License: GPL-3.0+
Files: debian/*
Copyright: 2014 Gobierno de Extremadura
License: GPL-3.0+
License: GPL-3.0+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
debian/all/linex-mirror/debian/install
usr
debian/all/linex-mirror/debian/linex-mirror.links
/usr/share/linex-mirror/mirror.list /etc/apt/mirror.list
/usr/share/linex-mirror/apt-mirror /etc/cron.d/apt-mirror
debian/all/linex-mirror/debian/postinst
#!/bin/bash
set -e
# Lista de Repos de los que crear un mirror.
REPOS="es.archive.ubuntu.com security.ubuntu.com"
#Ruta base donde almacenar el mirror.
base_path=`cat /usr/share/linex-mirror/mirror.list |grep "^set base_path"|tr -s " " " "|cut -d " " -f3`
[ -d $base_path/mirror/ ] || mkdir -p $base_path/mirror/
chown apt-mirror:apt-mirror $base_path/mirror/
# Crear los directorios correspondientes a los mirrors.
for i in $REPOS; do
[ -d $base_path/mirror/$i ] || mkdir $base_path/mirror/$i
chown apt-mirror:apt-mirror $base_path/mirror/$i
ln -s $base_path/mirror/$i /var/www
[ -d /var/www/html/ ] && ln -s $base_path/mirror/$i /var/www/html/
done
debian/all/linex-mirror/debian/postrm
#!/bin/bash
set -e
PKG="linex-mirror"
SHAREDIR="/usr/share/linex-mirror"
remove_divert() {
diverter=$(dpkg-divert --listpackage $1)
if [ "$diverter" = "linex-mirror" ]; then
dpkg-divert --package linex-mirror --rename --remove $1
fi
}
if [ "$1" = remove ]; then
remove_divert /etc/apt/mirror.list
remove_divert /etc/cron.d/apt-mirror
fi
exit 0
debian/all/linex-mirror/debian/preinst
#!/bin/bash
set -e
PKG="linex-mirror"
SHAREDIR="/usr/share/linex-mirror"
divert() {
diverted_file=$1
dpkg-divert --package "$PKG" --add --rename \
--divert "${diverted_file}-pre-$PKG" $diverted_file
}
divert /etc/apt/mirror.list
divert /etc/cron.d/apt-mirror
exit 0
debian/all/linex-mirror/debian/rules
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
debian/all/linex-mirror/debian/source/format
3.0 (native)
debian/all/linex-mirror/usr/share/linex-mirror/apt-mirror
#
# Regular cron jobs for the apt-mirror package
#
0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log
debian/all/linex-mirror/usr/share/linex-mirror/mirror.list
############# config ##################
#
#set base_path /var/spool/apt-mirror
set base_path /var/apt-mirror
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads 20
set _tilde 0
#set limit_rate 1000k
#
############# end config ##############
######### Inicio ubuntu 18.04 #########
deb-amd64 http://es.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-amd64 http://es.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb-amd64 http://es.archive.ubuntu.com/ubuntu/ bionic universe
deb-amd64 http://es.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb-amd64 http://es.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-amd64 http://es.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-amd64 http://es.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-amd64 http://security.ubuntu.com/ubuntu bionic-security main restricted
deb-amd64 http://security.ubuntu.com/ubuntu bionic-security universe
deb-amd64 http://security.ubuntu.com/ubuntu bionic-security multiverse
######### FIN ubuntu 18.04 #########
### Limpieza
## Comento la limpieza para que no genere /var/apt-mirror/var/clean.sh que se utiliza para borrado de paquetes obseletos y directorios.
## Lo hacemos para no perder el repo 14.04(congelado) comentado.
#clean http://es.archive.ubuntu.com/ubuntu/
#clean http://security.ubuntu.com/ubuntu/
#clean http://extras.ubuntu.com/ubuntu/

Exportar a: Unified diff