Репозиторий Sisyphus
Последнее обновление: 13 августа 2020 | Пакетов: 17687 | Посещений: 19042055
en ru br
Репозитории ALT
S:0.18-alt1
5.1: 0.2-alt1
www.altlinux.org/Changes

Группа :: Система/Настройка/Прочее
Пакет: installer-feature-online-repo

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064120615736610014521gustar00rootroot0000000000000052 comment=63d6fd5fd433d7cf47e7a1f97c83c0e697826f30
installer-feature-online-repo-0.13/000075500000000000000000000000001206157366100173155ustar00rootroot00000000000000installer-feature-online-repo-0.13/.gear-rules000064400000000000000000000000071206157366100213610ustar00rootroot00000000000000tar: .
installer-feature-online-repo-0.13/99-online-repo.sh000075500000000000000000000026771206157366100223560ustar00rootroot00000000000000#!/bin/sh

a= . install2-init-functions

internet='no'
host='http://ftp.altlinux.org'


# Regexps from alterator-pkg
prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?"
updates_re="${prefix_re}http:\/\/\([^[:space:]]\+\)[[:space:]]*"
repo_source='/etc/apt/sources.list.d/alt.list'

# Architectures
host_arch="$(rpm --eval '%_host_cpu')"
arepo=""
test "$host_arch" = "x86_64" && arepo="x86_64-i586"

repo_on()
{
for arch in "$host_arch" noarch "$arepo"
do
test -z "$arch" && continue
run_chroot sed "s/^#\(${updates_re}${arch}\)/\1/" -i $repo_source ||:
#run_chroot grep "^${updates_re}${arch}" $repo_source ||:
done
}

repo_off()
{
for arch in "$host_arch" noarch "$arepo"
do
test -z "$arch" && continue
run_chroot sed "s/^\(${updates_re}${arch}\)/#\1/" -i $repo_source ||:
done
}

cdrom_off()
{
if [ -f $destdir/etc/apt/sources.list.d/sources.list ] ; then
# turn off cdrom repository
find $destdir/etc/apt/sources.list.d -type f -name \*.list | \
while read r
do
sed -r -i '/^[[:space:]]*rpm[[:space:]]+cdrom:/s/^/#/' $r
done
# turn off cdrom mountpoint
sed -i '/[[:space:]]\/media\/cdrom[[:space:]]/s/^/#/' $destdir/etc/fstab ||:
fi
}

# Detect working Internet connection
curl --connect-timeout 10 "$host" >/dev/null 2>&1 && internet='yes'

# Make online repositories available
if test "$internet" = "yes" -a -f "$repo_source"
then
echo "Enable online repositories"
repo_on
cdrom_off
fi
installer-feature-online-repo-0.13/installer-feature.spec000064400000000000000000000031651206157366100236240ustar00rootroot00000000000000Name: installer-feature-online-repo
Version: 0.13
Release: alt1

Summary: Make online repositories available
License: GPL
Group: System/Configuration/Other
Url: http://www.altlinux.org/Installer/beans
BuildArch: noarch
Packager: Andrey Cherepanov <cas@altlinux.org>
Source: %name-%version.tar

%description
Make online repositories available

Requires: chrooted

%prep
%setup

%install
%define hookdir %_datadir/install2/postinstall.d
mkdir -p %buildroot%hookdir
install -pm755 *.sh %buildroot%hookdir/

%files
%hookdir/*

%changelog
* Tue Dec 11 2012 Andrey Cherepanov <cas@altlinux.org> 0.13-alt1
- Increase level from 80 to 99 because cdrom source is added at 90 level
- Do not show sources at script execution

* Sat Jun 02 2012 Sergey V Turchin <zerg@altlinux.org> 0.12-alt1
- turn off cdrom repository and mountpoint when turn on online repo

* Thu May 10 2012 Andrey Cherepanov <cas@altlinux.org> 0.6-alt1
- Change arepo repository name

* Fri Nov 25 2011 Andrey Cherepanov <cas@altlinux.org> 0.5-alt1
- Fix process empty item on i586 architecture

* Tue Aug 23 2011 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.4-alt1
- Fix fail on i586 (thanks cas@)

* Mon May 23 2011 Andrey Cherepanov <cas@altlinux.org> 0.3-alt1
- Support x86_32 repository

* Fri Oct 22 2010 Andrey Cherepanov <cas@altlinux.org> 0.2-alt1
- use curl instead chrooted ping for network availability
- use http:// instead of ftp:// sources because somebody have passive mode

* Tue Feb 09 2010 Andrey Cherepanov <cas@altlinux.org> 0.1-alt2
- fix hook directory
- fix network detection

* Wed Feb 03 2010 Andrey Cherepanov <cas@altlinux.org> 0.1-alt1
- initial version

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin