Форум русскоязычного сообщества Ubuntu


Получить помощь и пообщаться с другими пользователями Ubuntu можно
на irc канале #ubuntu-ru в сети Freenode
и в Jabber конференции ubuntu@conference.jabber.ru

Автор Тема: Импорт в Apt-cacher-ng уже скаченного  (Прочитано 3828 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн sirwalrus

  • Автор темы
  • Любитель
  • *
  • Сообщений: 78
    • Просмотр профиля
Импорт в Apt-cacher-ng уже скаченного
« : 15 Сентября 2011, 23:07:35 »
собственно как написано в многих инструкциях копирую в папку Apt-cacher-ng в папку _import то что уже синаптик успел закачать.
захожу на вебмору Apt-cacher-ng жму ИМПОРТ.
а он вещает что там ничего нет:(
подскажите что именно и из какой папки нужно туда копировать???

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28366
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #1 : 16 Сентября 2011, 05:14:25 »
Забей. Толку ноль, быстрее скачать ещё один раз.
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн theFirstOne

  • Новичок
  • *
  • Сообщений: 3
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #2 : 18 Сентября 2011, 15:40:17 »
Забить то легко, а лучше пофиксить (пишет автор этой штуки).

Для начала пожалуста покажите весь лог (результаты) из вебформа. Так как навыком телепатии не обладаю.

Оффлайн sirwalrus

  • Автор темы
  • Любитель
  • *
  • Сообщений: 78
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #3 : 18 Сентября 2011, 17:37:35 »
Не понял о какой вебформе вы говорилте.\
Можно как то командой через трми6ал начаить импорт а не через вебморду?

Оффлайн theFirstOne

  • Новичок
  • *
  • Сообщений: 3
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #4 : 18 Сентября 2011, 23:29:30 »
Имею в виду как раз тот, где кнопка IMPORT.

А зачем нужна дополнительная программа для импорта? С точки зрения программного кода, выносить эту функциональность в наружнее приложение это подход очень смутный. Имеет мало преимуществ но приносит риск поломать состав данных и усложняет или удваивает код.

А если охота посмотреть на зрелище в окне эмулятора терминала, можете вызвать

wget -O- 'http://localhost:3142/acng-report.html?beVerbose=bV&doImport=Start+Import'

;-)

Но вопрос остается. С информацией "а он вещает что там ничего нет" я не смогу много сделать. Версия? Список фаилов? Какие на них права выставлены, на ихнею папку, итд. итп. - вот это мне интересно. Как достать?

ls -laR /var/cache/apt-cacher-ng/_import/
/usr/sbin/apt-cacher-ng debug=15 foreground=1

и что находится в:
/var/log/apt-cacher-ng/maint_1*log
/etc/apt-cacher-ng/*.conf

Оффлайн sirwalrus

  • Автор темы
  • Любитель
  • *
  • Сообщений: 78
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #5 : 28 Сентября 2011, 17:49:16 »
вот что мне пишут после нажатия на кнопочку импорт

Цитировать
Maintenance task (File Import), apt-cacher-ng version: 0.5.14 (Cancel)
Importing from /acache/_import directory, scanning...
No index files detected. Unable to continue, cannot map files to internal locations.
Return to main page

в паочку импортя положил собственно деб самого апткечеранг и деб гепартеда :)

права поставил 777 на все (ну что бы уж наверняка)


Цитировать
~$ ls -laR /acache/_import/
/acache/_import/:
итого 36432
drwxrwxrwx 4 root root     4096 2011-09-28 17:34 .
drwxrwxrwx 5 root root     4096 2011-09-28 17:30 ..
-rwxrwxrwx 1 root root   396086 2011-02-23 16:05 apt-cacher-ng_0.5.14_i386.deb
drwxrwxrwx 3 root root     4096 2011-09-28 17:16 archives
-rwxrwxrwx 1 root root   498818 2011-03-01 00:12 gparted_0.7.0-1ubuntu1_i386.deb
-rwxrwxrwx 1 root root        0 2011-04-26 05:59 lock
drwxrwxrwx 2 sir  sir      4096 2011-09-28 17:16 partial
-rwxrwxrwx 1 root root 18205472 2011-09-28 17:19 pkgcache.bin
-rwxrwxrwx 1 root root 18184929 2011-09-28 16:28 srcpkgcache.bin

/acache/_import/archives:
итого 888
drwxrwxrwx 3 root root   4096 2011-09-28 17:16 .
drwxrwxrwx 4 root root   4096 2011-09-28 17:34 ..
-rwxrwxrwx 1 root root 396086 2011-02-23 16:05 apt-cacher-ng_0.5.14_i386.deb
-rwxrwxrwx 1 root root 498818 2011-03-01 00:12 gparted_0.7.0-1ubuntu1_i386.deb
-rwxrwxrwx 1 root root      0 2011-04-26 05:59 lock
drwxrwxrwx 2 root root   4096 2011-09-28 17:16 partial

/acache/_import/archives/partial:
итого 8
drwxrwxrwx 2 root root 4096 2011-09-28 17:16 .
drwxrwxrwx 3 root root 4096 2011-09-28 17:16 ..

/acache/_import/partial:
итого 8
drwxrwxrwx 2 sir  sir  4096 2011-09-28 17:16 .
drwxrwxrwx 4 root root 4096 2011-09-28 17:34 ..

Maintenance task (<b>File Import</b>), apt-cacher-ng version: 0.5.14 (<a href=acng-report.html?abortOnErrors=aOe&doImport=Start+Import&sigabort>Cancel</a>)<br><form action="#top">
Importing from /acache/_import directory, scanning...<br>
<font size=0 color=red>No index files detected. Unable to continue, cannot map files to internal locations.</font><br>
<a href="/acng-report.html">Return to main page</a></form><hr><address>Server Debian Apt-Cacher-NG/0.5.14 | <a href="https://flattr.com/thing/51105/Apt-Cacher-NG">Flattr it!</a> | <a href="http://www.unix-ag.uni-kl.de/~bloch/acng/">Apt-Cacher NG homepage</a></address>



                        </div>
<!--a href="javascript:stopScroll()">Stop Scrolling</a-->
                  </div>
               </td>
            </tr>
         </table>
   </body>
</html>

# Letter case in directive names does not matter. Must be separated with colons.
# Valid boolean values are a zero number for false, non-zero numbers for true.

CacheDir: /acache

# set empty to disable logging
LogDir: /var/log/apt-cacher-ng

# TCP (http) port
# Set to 9999 to emulate apt-proxy
Port:3142

# Addresses or hostnames to listen on. Multiple addresses must be separated by
# spaces. Each entry must be associated with a local interface. DNS resolution
# is performed using getaddrinfo(3) for all available protocols (i.e. IPv4 and
# IPv6 if available).
#
# Default: not set, will listen on all interfaces.
#
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface

# The specification of another proxy which shall be used for downloads.
# Username and password are, and see manual for limitations.
#
#Proxy: http://www-proxy.example.net:80
#proxy: username:proxypassword@proxy.example.net:3128

# Repository remapping. See manual for details.
# In this example, some backends files might be generated during package
# installation using information collected on the system.
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
Remap-sfnet:  file:sfnet_mirrors # ; file:backends_sfnet # incomplete, please create this file or specify preferred mirrors here
Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # incomplete, please create this file or specify preferred mirrors here

# Virtual page accessible in a web browser to see statistics and status
# information, i.e. under http://localhost:3142/acng-report.html
ReportPage: acng-report.html

# Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
# used with inetd bridge or cron client.
# SocketPath:/var/run/apt-cacher-ng/socket

# Forces log file to be written to disk after every line when set to 1. Default
# is 0, buffer flush happens after client disconnects.
#
# (technically, this is an alias to the Debug option provided for convenience)
#
# UnbufferLogs: 0

# Set to 0 to store only type, time and transfer sizes.
# 1 -> client IP and relative local path are logged too
# VerboseLog: 1

# Don't detach from the console
# ForeGround: 0

# Store the pid of the daemon process therein
# PidFile: /var/run/apt-cacher-ng/pid

# Forbid outgoing connections, work around them or respond with 503 error
# offlinemode:0

# Forbid all downloads that don't run through preconfigured backends (.where)
#ForceManaged: 0

# Days before considering an unreferenced file expired (to be deleted).
# Warning: if the value is set too low and particular index files are not
# available for some days (mirror downtime) there is a risk of deletion of
# still useful package files.
ExTreshold: 4

# Stop expiration when a critical problem appeared. Currently only failed
# refresh of an index file is considered as critical.
#
# WARNING: don't touch this option or set to a non-zero number.
# Anything else is DANGEROUS and may cause data loss.
#
# ExAbortOnProblems: 1

# Replace some Windows/DOS-FS incompatible chars when storing
# StupidFs: 0

# Experimental feature for apt-listbugs: pass-through SOAP requests and
# responses to/from bugs.debian.org. If not set, default is true if
# ForceManaged is enabled and false otherwise.
# ForwardBtsSoap: 1

# The daemon has a small cache for DNS data, to speed up resolution. The
# expiration time of the DNS entries can be configured in seconds.
# DnsCacheSeconds: 3600

# Don't touch the following values without good consideration!
#
# Max. count of connection threads kept ready (for faster response in the
# future). Should be a sane value between 0 and average number of connections,
# and depend on the amount of spare RAM.
# MaxStandbyConThreads: 8
#
# Hard limit of active thread count for incoming connections, i.e. operation
# is refused when this value is reached (below zero = unlimited).
# MaxConThreads: -1
#
#VfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$
#PfilePattern = .*(\.deb|\.rpm|\.dsc|\.tar\.gz\.gpg|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.jigdo|\.template|changelog|copyright|\.udeb|\.diff/.*\.gz|vmlinuz|initrd\.gz|(Devel)?ReleaseAnnouncement(\\?.*)?)$
# Whitelist for expiration, file types not to be removed even when being
# unreferenced. Default: same as VfilePattern which is a safe bed. When and
# only when the only used mirrors are official repositories (with working
# Release files) then it might be set to something more restrictive, like
# (^|.*?/)(Release|Release\.gpg|release|meta-release|Translation[^/]*\.bz2)$
#WfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$

# Higher modes only working with the debug version
# Warning, writes a lot into apt-cacher.err logfile
# Value overwrites UnbufferLogs setting (aliased)
# Debug:3

# Usually, general purpose proxies like Squid expose the IP address of the
# client user to the remote server using the X-Forwarded-For HTTP header. This
# behaviour can be optionally turned on with the Expose-Origin option.
# ExposeOrigin: 0

# When logging the originating IP address, trust the information supplied by
# the client in the X-Forwarded-For header.
# LogSubmittedOrigin: 0

# The version string reported to the peer, to be displayed as HTTP client (and
# version) in the logs of the mirror.
# WARNING: some archives use this header to detect/guess capabilities of the
# client (i.e. redirection support) and change the behaviour accordingly, while
# ACNG might not support the expected features. Expect side effects.
#
# UserAgent: Yet Another HTTP Client/1.2.3p4

# In some cases the Import and Expiration tasks might create fresh volatile
# data for internal use by reconstructing them using patch files. This
# by-product might be recompressed with bzip2 and with some luck the resulting
# file becomes identical to the *.bz2 file on the server, usable for APT
# clients trying to fetch the full .bz2 compressed version. Injection of the
# generated files into the cache has however a disadvantage on underpowered
# servers: bzip2 compression can create high load on the server system and the
# visible download of the busy .bz2 files also becomes slower.
#
# RecompBz2: 0

# Network timeout for outgoing connections.
# NetworkTimeout: 60

# Sometimes it makes sense to not store the data in cache and just return the
# package data to client as it comes in. DontCache parameters can enable this
# behaviour for certain URL types. The tokens are extended regular expressions
# that URLs are matched against.
#
# DontCacheRequested is applied to the URL as it comes in from the client.
# Example: exclude packages built with kernel-package for x86
# DontCacheRequested: linux-.*_10\...\.Custo._i386
# Example usecase: exclude popular private IP ranges from caching
# DontCacheRequested: 192.168.0 ^10\..* 172.30
#
# DontCacheResolved is applied to URLs after mapping to the target server. If
# multiple backend servers are specified then it's only matched against the
# download link for the FIRST possible source (due to implementation limits).
# Example usecase: all Ubuntu stuff comes from a local mirror (specified as
# backend), don't cache it again:
# DontCacheResolved: ubuntumirror.local.net
#
# DontCache directive sets (overrides) both, DontCacheResolved and
# DontCacheRequested.  Provided for convenience, see those directives for
# details.
#
# Default permission set of freshly created files and directories, as octal
# numbers (see chmod(1) for details).
# Can by limited by the umask value (see umask(2) for details) if it's set in
# the environment of the starting shell, e.g. in apt-cacher-ng init script or
# in its configuration file.
# DirPerms: 00755
# FilePerms: 00664
#
#
# It's possible to use use apt-cacher-ng as a regular web server with limited
# feature set, i.e.
# including directory browsing and download of any file;
# excluding sorting, mime types/encodings, CGI execution, index page
# redirection and other funny things.
# To get this behavior, mappings between virtual directories and real
# directories on the server must be defined with the LocalDirs directive.
# Virtual and real dirs are separated by spaces, multiple pairs are separated
# by semi-colons. Real directories must be absolute paths.
# NOTE: Since the names of that key directories share the same namespace as
# repository names (see Remap-...) it's administrators job to avoid such
# collisions on them (unless created deliberately).
#
# LocalDirs: woo /data/debarchive/woody ; hamm /data/debarchive/hamm

# Precache a set of files referenced by specified index files. This can be used
# to create a partial mirror usable for offline work. There are certain limits
# and restrictions on the path specification, see manual for details. A list of
# (maybe) relevant index files could be retrieved via
# "apt-get --print-uris update" on a client machine.
#
# PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages*

# Arbitrary set of data to append to request headers sent over the wire. Should
# be a well formated HTTP headers part including newlines which can be entered
# as simple escape sequences (default: Cache-Control: no-store,no-cache,max-age=0\r\n ).
# RequestAppendix: Cache-Control: no-store,no-cache,max-age=0\r\nX-Nothing: anything\r\n

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28366
    • Просмотр профиля
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн autokilla47

  • Любитель
  • *
  • Сообщений: 90
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #7 : 12 Декабря 2011, 17:21:25 »
а подскажите пжлсто! установил,настроеил apt-cacher-ng, импортировал все через вэб-морду нажав на Импорт...
нажал на клиенте sudo apt-get update, захотел устанвить пакет и выдает сообщение:
ПАкет ххххх недоступен,но упомянут в списке зависимостей другого пакета.
в sourse.list все сделал как надо прописал айпи:порт...
почему эти пакеты (partner) не добавляются в список???(((

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28366
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #8 : 12 Декабря 2011, 21:17:15 »
Ничего в sources.list трогать НЕ НАДО!!
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн autokilla47

  • Любитель
  • *
  • Сообщений: 90
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #9 : 14 Декабря 2011, 09:09:15 »
на клиентской машине зайдя на морду сервера...вот что пишет:
Edit the /etc/apt/sources.list file and edit the source lines therein, replacing the mirror hostname with the hostname of this server machine and the port with 3142 (adding a port if none specified). For example:

deb http://ftp.debian.org/debian stable main contrib non-free
deb-src http://ftp.debian.org/debian stable main contrib non-free

becomes:

deb http://10.69.12.184:3142/ftp.debian.org/debian stable main contrib non-free
deb-src http://10.69.12.184:3142/ftp.debian.org/debian stable main contrib non-free

Depending on the configuration, it might be possible to use a shortcut for the base URLs without knowing the mirror, for example:

deb http://10.69.12.184:3142/debian stable main contrib non-free


я и поправил sources.list
Вы судя по всему предлагаете поправить только 01proxy? а при этом строчки в sources.list надо #?

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28366
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #10 : 14 Декабря 2011, 11:39:02 »
Вы бы прочитали полностью, что он пишет, а не только то, что вам удобно цитировать.
Верните sources.list как было и просто пропишите apt-cacher-ng как прокси для апта.
$ cat /etc/apt/apt.conf.d/10apt-cacher-ng
Acquire::http { Proxy "http://user.td-art.lan:3142"; };
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн autokilla47

  • Любитель
  • *
  • Сообщений: 90
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #11 : 14 Декабря 2011, 17:21:46 »
2 AnrDaemon ты чертовски прав...))) спасибо...
еще вопросик к тебе тогда будет - влияет ли статус Unreferenced на что ниб? тч смогу ли я пакеты,которые не распределены, получить на клиенте?
Спасбо)

Оффлайн thunderamur

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 6846
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #12 : 14 Декабря 2011, 17:28:25 »
Забей. Толку ноль, быстрее скачать ещё один раз.
+++

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28366
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #13 : 14 Декабря 2011, 22:05:51 »
2 AnrDaemon ты чертовски прав...))) спасибо...
еще вопросик к тебе тогда будет - влияет ли статус Unreferenced на что ниб? тч смогу ли я пакеты,которые не распределены, получить на клиенте?
Спасбо)
Конечно, сможете. Он работает как прокси, специализированный прокси-сервер, ориентированный именно на поддержку протокола apt как расширения HTTP.
Любые apt-репозитории, которые вы будете добавлять в настройки клиентов, будут кешироваться на сервере.
Я так за 20 минут на 6 машин OpenOffice.org ставил. 15 минут на скачку в кеш и за 5 минут на ещё 5 минутах полная установка из кеша.
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн autokilla47

  • Любитель
  • *
  • Сообщений: 90
    • Просмотр профиля
Re: Импорт в Apt-cacher-ng уже скаченного
« Ответ #14 : 15 Декабря 2011, 10:30:36 »
а если я скачиваю сторонние пакеты,то куда мне их на сервере надо скинуть,что бы они появились в репозиториях на клиентах?
правильно я понимаю - что достаточно их бросить в /var/cache/apt/archives/ и потом на морде нажать Import?)))

 

Страница сгенерирована за 0.036 секунд. Запросов: 26.