Issue
Short Description
I want to create a apt repository from a maven repository folder. Following href="https://askubuntu.com/questions/170348/how-to-make-my-own-local-repository">Tutorials & Tutorials this works fine.
cd /path/to/maven/repo
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
echo deb file:///path/to/maven/repo ./ >> /etc/apt/sources.list
apt-get update
apt-ftparchive release . > Release
gpg --output Release.gpg -ba Release
However, when I try to access this repository via apache like this
deb http://repository.mukis.de/apt/ ./
E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.mukis.de_apt_._de E: The package list or status file could not be opened
Removing the nested maven repository folder structure solves the problem with remote. How can I solve this so a I can keep the maven structure?
Long Description
I have a Nexus OSS Server running and the Nexus APT Plugin, which doesn't work. After that I tried to build the repos myself with dpkg-scanpackages or apt-ftparchive with no success. reprepro copies the files why this is not an option, because I have the files twice for no reason.
In the end what I only want is:
mvn deploy
apt-get install deployed-package
The repository needs no architecture information as only java packages will be installed.
thanks in advance, Muki
Solution
Your directory hierarchy is messy and apt-get will give you trouble to work with it. It works internally without problem but for the package list it's a bad name. The entry should be without the trailing /
:
$ cat sources.list
deb http://repository.mukis.de/apt ./
$ apt-get -s -o Dir::State::Lists=/home/braiam/lab/ --option Dir::Etc::SourceParts=/home/braiam/ --option Dir::Etc::SourceList=/home/braiam/sources.list update
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Get:1 http://repository.mukis.de ./ Release.gpg [490 B]
Get:2 http://repository.mukis.de ./ Release [1,202 B]
Ign http://repository.mukis.de ./ Release
Get:3 http://repository.mukis.de ./ Packages [417 B]
Ign http://repository.mukis.de ./ Translation-en_US
Ign http://repository.mukis.de ./ Translation-en
Fetched 2,109 B in 3s (596 B/s)
Reading package lists... Done
W: GPG error: http://repository.mukis.de ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 59B7C730340E30A7
$ ls lab/
partial repository.mukis.de_apt_._Packages repository.mukis.de_apt_._Release
But, if you want to prevent weird stuff from happening, I would recommend either:
- Construct a real hierarchy like this
apt/dists/raring/
andapt/dists/raring/
(you can change raring with whatever you like, or - create several relative symlinks in your server to comply Debian/apt repository policy
Why ./
is not advisable?
These repositories that needs this entries are called Trivial Archives, from the client/user point of view. These has no support for apt-pinning used by the preferences files due the collision of two Release files. If you need to build an apt-repository like developers advice, is better if you do since the start. There are tools to set up your personal archive called reprepo and mini-dinstall. For a complete guide read https://wiki.debian.org/HowToSetupADebianRepository
Answered By - Braiam Answer Checked By - Robin (WPSolving Admin)