Welcome, Guest. Please login or register.
Did you miss your activation email?
July 31, 2010, 09:11:30 pm

Kubuntu Forums  |  Important Information  |  Documentation  |  Experimentation/Customization/Optimization  |  Topic: Making Local Repository 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Making Local Repository  (Read 4203 times)
Rog131
Kubuntu Veteran
*******
Offline Offline

Posts: 3922


Kubuntu facientes adiuvant


« on: October 18, 2007, 06:03:57 am »

This is based on APT HOWTO
http://www.debian.org/doc/manuals/apt-howto/index.en.html
===> 2.2 How to use APT locally

There is also > Ubuntu Documentation: Personal Repositories


Note
user is your log in name.
gutsy is part of Kubuntu code name (hoary, breezy, dapper, edgy, feisty, gutsy, hardy...)

Kubuntu wiki
http://en.wikipedia.org/wiki/Kubuntu


1) Make folders:
/home/user/debs/
and
/home/user/dists/gutsy/debs_for_gutsy/binary-i386/

2) Copy .deb files to the /home/user/debs/

3) Generate package info:

a) if your debs are in the /home/user/debs. You can use in the konsole (konsole is in the home folder - /home/user/):
Code:
dpkg-scanpackages debs /dev/null | gzip > /home/user/dists/gutsy/debs_for_gutsy/binary-i386/Packages.gz

b)  or full path to the debs. Packages are in the /home/user/debs
Code:
dpkg-scanpackages /home/user/debs /dev/null | sed s/"\/home\/user\/"//g | \
gzip > /home/user/dists/gutsy/debs_for_gutsy/binary-i386/Packages.gz

4) Add your local repository in the /etc/apt/sources.list

Alt + F2 and type kdesudo kate /etc/apt/sources.list
(kdesu kate /etc/apt/sources.list)
Add: deb file:///home/user/ gutsy debs_for_gutsy

or

Synaptic:
Settings > Repositories
Quote
URI:             file:///home/user/
Distribution: gutsy
Sections(s): debs_for_gutsy



or

Adept:
Adept > Manage Repositories > | Third-Party Software | > Add


4b) Alternative to the 4, using sources.list.d

You can create mysources.list (or whatever.list) file in the /etc/apt/sources.list.d/:
(kdesudo kate /etc/apt/sources.list.d/mysources.list)

And add: deb file:///home/user/ gutsy debs_for_gutsy

man sources.list(5)
Quote
SOURCES.LIST.D

 The /etc/apt/sources.list.d directory provides a way to add sources.list entries in seperate files that end with .list. The format is the same as for the regular sources.list file.

5) Update package lists.

6) Install (by Apt/Aptitude/Adept/Synaptic/Whatever).


When you have new debs -> Do 2 and 3 then 5 and  6.


Dpkg/Apt/Aptitude/Adept/Synaptic

FAQ: Package Managers

Dpkg
dpkg - package manager for Debian.

Apt
apt - Advanced Package Tool.  APT  is  a  management system for software packages.

Aptitude
A highly configurable console front-end for Debian APT. Aptitude is a text-based interface to the Debian GNU/Linux package system.

Adept
Adept is a GUI to the Advanced Packaging Tool for KDE. Adept is developed by Peter Ročkai and is sponsored by Canonical Ltd. through the Kubuntu project.

Synaptic
Synaptic is a graphical package management program for apt. It provides the same features as the apt-get command line utility with a GUI front-end based on Gtk+.


GDebi KDE
https://launchpad.net/gdebi

From Kubuntu 7.10 - Gutsy Gibbon
http://kubuntu.org/announcements/7.10-release.php
Quote
New for Kubuntu 7.10 is a KDE front end to the amazing APT package manager for third party packages. GDebi KDE makes it easier to install Debian based packages (.deb files) onto your system with just a click of the mouse. No more command line hassles when trying to manually install a package, and GDebi KDE even takes care of those pesky dependencies so you don't have to. Using GDebi KDE is simple, go to the directory where you have downloaded your package and just click on the file. Installation takes off, and you are on your way to a new application.

You need:
gdebi-core, Simple tool to install deb files
Quote
gdebi lets you install local deb packages resolving and installing
its dependencies. apt does the same, but only for remote (http, ftp)
located packages.
and
gdebi-kde, Simple tool to install deb files
Quote
This package contains the KDE user interface.

Note
gdebi does not support multi-package installations
https://bugs.launchpad.net/ubuntu/+source/gdebi/+bug/37649

gdebi should search for .debs in current folder
https://bugs.launchpad.net/ubuntu/+source/gdebi/+bug/134331


Links:

Topic: OpenOffice 2.2.3
http://kubuntuforums.net/forums/index.php?topic=3086717.0

Topic: Adept for offline installation
http://kubuntuforums.net/forums/index.php?topic=3087546.0

Topic: FAQ: Kubuntu without internet connection
http://kubuntuforums.net/forums/index.php?topic=3085805.0

Bugs in gdebi in ubuntu
https://bugs.launchpad.net/ubuntu/+source/gdebi
« Last Edit: August 11, 2008, 11:17:48 am by Rog131 » Logged

computador
On a Roll
**
Offline Offline

Posts: 98


« Reply #1 on: March 24, 2008, 06:25:45 am »


 I follow the guide but when I use apt-get install after answer the question (yes/no) it don't find the file.

Impossible to find  file:///home/user/packages//home/user/packages/debs/opera_9.26-20080218.6-shared-qt_en_i386.deb  File not found

 I didn't use the same folders as the guide (after user I make another directory named packages and hardy instead of gutsy)

 "I make this steps"
 mkdir  /home/user/packages/debs/
and
 mkdir /home/user/packages/dists/hardy/debs_for_hardy/binary-i386/

2) Copy .deb files to the /home/user/packages/debs/

3) Generate package info:
:~$ dpkg-scanpackages /home/user/packages/debs /dev/null | gzip > /home/user/packages/dists/hardy/debs_for_hardy/binary-i386/Packages.gz

4) Add your local repository in the /etc/apt/sources.list
file:///home/user/packages/ hardy debs_for_hardy

Tell me if I make a mistake because I don't find it.
Logged
Rog131
Kubuntu Veteran
*******
Offline Offline

Posts: 3922


Kubuntu facientes adiuvant


« Reply #2 on: March 24, 2008, 10:43:24 am »

Quote
Tell me if I make a mistake because I don't find it.

No, you are not making mistake.

If you are using full path in the "Generate package info" then working command is:
Code:
dpkg-scanpackages /home/user/packages/debs /dev/null | sed s/"\/home\/user\/packages\/"//g | \
gzip > /home/user/packages/dists/hardy/debs_for_hardy/binary-i386/Packages.gz

Sed is used to remove /home/user/packages/ from the Packages.gz.
Quote
sed - stream editor for filtering and transforming text

Without sed, package manager is trying to find:
Quote
/home/user/packages//home/user/packages/debs/opera_9.26-20080218.6-shared-qt_en_i386.deb


Added to the How to.
« Last Edit: March 24, 2008, 11:17:11 am by Rog131 » Logged

computador
On a Roll
**
Offline Offline

Posts: 98


« Reply #3 on: March 24, 2008, 11:26:49 am »


 Thanks
Logged
Rog131
Kubuntu Veteran
*******
Offline Offline

Posts: 3922


Kubuntu facientes adiuvant


« Reply #4 on: March 24, 2008, 11:48:13 am »

And double checking with Hardy:

Note
<user> is your username.

1) Making
Quote
/home/<user>/packages/debs/
/home/<user>/packages/dists/hardy/debs_for_hardy/binary-i386/

2) Dropping debs in the /home/<user>/packages/debs/

3) Generating package info
Code:
dpkg-scanpackages /home/<user>/packages/debs /dev/null | sed s/"\/home\/<user>\/packages\/"//g | \
gzip > /home/<user>/packages/dists/hardy/debs_for_hardy/binary-i386/Packages.gz

Quote
** Packages in archive but missing from override file: **
  libdvdcss2 w32codecs

 Wrote 2 entries to output Packages file.

4) Adding local repositary

Alt + F2
Code:
kdesudo kate /etc/apt/sources.list.d/mysources.list

Inserting:
Quote
deb file:///home/<user>/packages hardy debs_for_hardy
 

5) Updating package database
Code:
sudo apt-get update

6) Installing
Code:
sudo apt-get install w32codecs

Quote
...
Selecting previously deselected package w32codecs.
(Reading database ... 89338 files and directories currently installed.)
Unpacking w32codecs (from .../w32codecs_20071007-0.1_i386.deb) ...
Setting up w32codecs (1:20071007-0.1) ...


Seems to work  Wink
« Last Edit: March 24, 2008, 11:53:53 am by Rog131 » Logged

RealG187
Linux for Life
****
Offline Offline

Posts: 336



WWW
« Reply #5 on: July 24, 2008, 02:44:01 pm »

Quote
mpg@MIKED5:~$ sudo dpkg-scanpackages debs /dev/null | gzip > /home/mpg/dists/hardy/debs_for_hardy/binary-i386/Packages.gz
[sudo] password for mpg:
sudo: dpkg-scanpackages: command not found
mpg@MIKED5:~$ [/quotre]

It doesnt work, how come
Logged

Rog131
Kubuntu Veteran
*******
Offline Offline

Posts: 3922


Kubuntu facientes adiuvant


« Reply #6 on: July 24, 2008, 02:55:41 pm »

/usr/bin/dpkg-scanpackages is a part of the package: dpkg-dev
Quote
package building tools for Debian

This package contains the tools (including dpkg-source) required to unpack, build and upload Debian source packages.
Logged

RealG187
Linux for Life
****
Offline Offline

Posts: 336



WWW
« Reply #7 on: July 24, 2008, 04:21:13 pm »

Okay thanks.

Should I use this thread or this one for future discussion about this?
Logged

Rog131
Kubuntu Veteran
*******
Offline Offline

Posts: 3922


Kubuntu facientes adiuvant


« Reply #8 on: August 02, 2008, 04:00:20 am »

Intrepid Ibex example
(for a user rog)


Making directories:

Code:
mkdir -p ~/packages/debs
and
Code:
mkdir -p ~/packages/dists/intrepid/debs_for_intrepid/binary-i386/


man mkdir
Quote
NAME
       mkdir - make directories

SYNOPSIS
       mkdir [OPTION] DIRECTORY...

       -p, --parents
              no error if existing, make parent directories as needed


Adding local repository to the sources:
 
alt + f2 : kdesudo kate /etc/apt/sources.list.d/local_sources.list
or
konsole : sudo nano /etc/apt/sources.list.d/local_sources.list

dropping there:
Code:
deb file:///home/rog/packages/ intrepid debs_for_intrepid


Making package index files:

Code:
dpkg-scanpackages /home/rog/packages/debs /dev/null | sed s/"\/home\/rog\/packages\/"//g | \
gzip > /home/rog/packages/dists/intrepid/debs_for_intrepid/binary-i386/Packages.gz
There is only one package:
Quote
** Packages in archive but missing from override file: **
  mplayerthumbs

 Wrote 1 entries to output Packages file.


man dpkg-scanpackages
Quote
NAME
       dpkg-scanpackages - create Packages index files

SYNOPSIS
       dpkg-scanpackages  [options] binary-dir [override-file [path-prefix]] >
       Packages

DESCRIPTION
       dpkg-scanpackages sorts through a tree of Debian  binary  packages  and
       creates  a  Packages file, used by apt(8), dselect(1), etc, to tell the
       user what packages are available for installation. These Packages files
       are  the  same  as those found on Debian archive sites and CD-ROMs. You
       might use dpkg-scanpackages yourself if making  a  directory  of  local
       packages to install on a cluster of machines.


Updating package database:

Code:
sudo apt-get update
Logged

hallve_revera
On a Roll
**
Offline Offline

Posts: 30


« Reply #9 on: February 14, 2009, 03:26:49 am »

i didnt work for me
when i input "sudo apt-get update"
the result is the repository from the file is ignored...
how do i fix it...
thanks
im using kubuntu intrepid live usb
Logged
Rog131
Kubuntu Veteran
*******
Offline Offline

Posts: 3922


Kubuntu facientes adiuvant


« Reply #10 on: February 15, 2009, 11:00:25 am »

Quote
i didnt work for me
when i input "sudo apt-get update"
the result is the repository from the file is ignored...


Tell a bit more  Wink What was the error message(s) ??

Did you get something like this?
Code:
sudo apt-get update
Quote
...
Ign file: jaunty/debs_for_jaunty Packages
Err file: jaunty/debs_for_jaunty Packages
  File not found
...
W: Failed to fetch file:/home/<YOUR_USERNAME_HERE>/packages/dists/jaunty/debs_for_jaunty/binary-i386/Packages 
File not found

E: Some index files failed to download, they have been ignored, or old ones used instead.
sudo died with exit status 100

That is because apt can't find the package index file - Packages.gz - from the directory: /home/<YOUR_USERNAME_HERE>/packages/dists/jaunty/debs_for_jaunty/binary-i386.
« Last Edit: February 15, 2009, 11:07:21 am by Rog131 » Logged

Pages: [1] Go Up Print 
Kubuntu Forums  |  Important Information  |  Documentation  |  Experimentation/Customization/Optimization  |  Topic: Making Local Repository « previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.263 seconds with 14 queries.
 

MKPortal M1.1.1 ©2003-2006 mkportal.it
Page generated in 0.04223 seconds with 10 queries