You are not logged in.

#1 2012-09-24 07:44:53

jsnlry
Member
Registered: 2012-06-26
Posts: 39

[SOLVED] host own pacman repo with apache web server

Hi there,

I want to host my own ArchLinux pacman repository for my own packages. I already found out, I can simply create a repo by just using repo-add and if I upload the generated foo.db.tar.gz and its symlink to my webserver, I can access this repo by just adding the following lines to my /etc/pacman.conf

[foo]
Server = http://example.com/foo/

But when I now add another package to the repo and again upload the foo.db.tar.gz to the web server, then run pacman -Syy and try to install the new package with pacman -S bar, the package can't be found.

Also, if I just run pacman -Sy, pacman tells me, there are no changes for my own repo.

So, what is wrong with my configuration? I think my apache has to be configured in a special way, but I can't find any hint on the web. Any idea?

Note: the apache web server runs on a ubuntu server

Last edited by jsnlry (2012-09-27 09:30:05)

Offline

#2 2012-09-24 11:57:21

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] host own pacman repo with apache web server

Check man pacman.conf ,  REPOSITORY SECTIONS .

Server = url
           A full URL to a location where the database, packages, and signatures (if available) for this repository can be found.

In short, you will need to upload the packages to the same location on your webserver where you have the db/symlink .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2012-09-24 22:20:57

jsnlry
Member
Registered: 2012-06-26
Posts: 39

Re: [SOLVED] host own pacman repo with apache web server

Ok, but if I understand this right, I think it's correct. At the url mentioned above I can find the link ending with .db and a file ending with .db.tar.gz. So the full urls are similar to the following:

http://example.com/foo/foo.db
http://example.com/foo/foo.db.tar.gz

What's wrong with this configuration?

Offline

#4 2012-09-24 22:24:02

jsnlry
Member
Registered: 2012-06-26
Posts: 39

Re: [SOLVED] host own pacman repo with apache web server

Oh, and yes, I upload the updated .db.tar.gz and the .db symlink to this folder (I actually upload it via SSH but it's the folder that is shared via HTTP).

Offline

#5 2012-09-24 23:28:29

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: [SOLVED] host own pacman repo with apache web server

Try running pacman with --debug and post the output.

EDIT: And don't forget the .db.tar.gz is just a tarball... Extract it to make sure it is being updated correctly and does have the package info in it.

Last edited by fukawi2 (2012-09-24 23:29:08)

Offline

#6 2012-09-25 22:04:37

jsnlry
Member
Registered: 2012-06-26
Posts: 39

Re: [SOLVED] host own pacman repo with apache web server

Thanks for the tip with the tar.gz, but there is the newly added package. When I update pacman with -Syy and search for the new package, it still can't be found.

When I run pacman with --debug I see the following lines:

...
debug: url: http://example.com/foo/foo.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/foo.db.part (wb)
downloading foo.db...
debug: curl returned error 0 from transfer
debug: response code: 200
debug: url: http://example.com/foo/foo.db.sig
debug: maxsize: 16384
debug: opened tempfile for download: /var/lib/pacman/sync/foo.db.sig.part (wb)
debug: curl returned error 22 from transfer
debug: failed retrieving file 'foo.db.sig' from example.com : The requested URL returned error: 404 Not Found
debug: "/var/lib/pacman/sync/foo.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/foo.db.sig could not be opened
debug: missing optional signature
...

Is it because of the signature?

Offline

#7 2012-09-25 23:04:56

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: [SOLVED] host own pacman repo with apache web server

Try adding SigLevel = Never to your repo definition

[foo]
Server = http://example.com/foo/
SigLevel = Never

Offline

#8 2012-09-26 20:07:19

jsnlry
Member
Registered: 2012-06-26
Posts: 39

Re: [SOLVED] host own pacman repo with apache web server

Sooooorry. For any reason the foo.db was not a link to foo.db.tar.gz and for any other reason it did not get updated when I uploaded the new version.

So, I removed it and recreated the symlink directly on the server, and now it works.

Anyway, many thanks for trying to help me!

Offline

Board footer

Powered by FluxBB