The officially official Devuan Forum!

You are not logged in.

#1 2018-07-20 04:28:03

GNUser
Member
Registered: 2017-03-16
Posts: 570  

trouble setting up local ASCII repo [SOLVED]

I created a local ASCII repo (snapshot of main's binary-all and binary-amd64) in ~/Desktop/repo (will move it to a more dignified location later). It almost works. The only trouble is that for packages that Devuan takes directly from Debian, apt is trying to get the package from /home/bruno/Desktop/repo/merged/http://deb.debian.org/debian/pool/main... (obviously wrong) instead of the intended http://deb.debian.org/debian/pool/main.... Can you help me fix this?

First an example of the problem (notice the "File not found" line):

bruno@thinkpad:~/Desktop$ sudo apt-get install nano
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  spell
The following NEW packages will be installed:
  nano
0 upgraded, 1 newly installed, 0 to remove and 43 not upgraded.
Need to get 0 B/485 kB of archives.
After this operation, 2,092 kB of additional disk space will be used.
Get:1 file:/home/bruno/Desktop/repo/merged ascii/main amd64 nano amd64 2.7.4-1 [485 kB]
Err:1 file:/home/bruno/Desktop/repo/merged ascii/main amd64 nano amd64 2.7.4-1
  File not found - /home/bruno/Desktop/repo/merged/http://deb.debian.org/debian/pool/main/n/nano/nano_2.7.4-1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/bruno/Desktop/repo/merged/http://deb.debian.org/debian/pool/main/n/nano/nano_2.7.4-1_amd64.deb  File not found - /home/bruno/Desktop/repo/merged/http://deb.debian.org/debian/pool/main/n/nano/nano_2.7.4-1_amd64.deb (2: No such file or directory)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Now for my setup. Here is my /etc/apt/sources.list:

deb file:/home/bruno/Desktop/repo/merged/ ascii main

And here is the relevant part of ~/Desktop/repo/merged/dists/ascii/main/binary-amd64/Packages.gz and Packages.xz (notice the "Filename" line):

Package: nano
Version: 2.7.4-1
Installed-Size: 2043
---snip---
Filename: http://deb.debian.org/debian/pool/main/n/nano/nano_2.7.4-1_amd64.deb
Size: 484790
MD5sum: 161a45ba3787383f8348f985b4c3d3e9
SHA256: 9181ebcf0fb5c302bd53150531b6609394a030d1be06f376275d690c70964d59

Please, how do I change my Packages files (or apt settings) so that apt grabs packages from deb.debian.org when appropriate?

Last edited by GNUser (2018-07-20 19:38:38)

Offline

#2 2018-07-20 05:03:43

golinux
Administrator
Registered: 2016-11-25
Posts: 3,318  

Re: trouble setting up local ASCII repo [SOLVED]

There may be some clues for you here or here

Offline

#3 2018-07-20 12:09:08

GNUser
Member
Registered: 2017-03-16
Posts: 570  

Re: trouble setting up local ASCII repo [SOLVED]

Thank you, golinux. Accomplishing this with on-the-fly nginx/apache redirects on a web server is overkill for my purposes.

Is it possible to instruct APT to grab Devuan-specific packages locally vs. grab Debian-shared packages from deb.debian.org by means of the Filename line in the Packages file? If not, is there some other way to accomplish this without setting up a file server?

Last edited by GNUser (2018-07-20 14:01:27)

Offline

#4 2018-07-20 12:46:21

sgage
Member
Registered: 2016-12-01
Posts: 341  

Re: trouble setting up local ASCII repo [SOLVED]

GNUser wrote:

Thank you, golinux. Accomplishing this with on-the-fly nginx/apache redirects on a web server is overkill for my purposes.

Is there a simpler way to redirect to deb.debian.org for the simpler use case where the Devuan repository is in a directory on the user's harddrive?

Wouldn't you have to do something with Amprolla? I am no expert in these matters, but I believe Amprolla is what generates the redirects to Debian for packages not 'natively' Devuan. Hopefully somebody who really knows how it all works will chime in. Maybe take it to the IRC channel?

Offline

#5 2018-07-20 13:34:16

GNUser
Member
Registered: 2017-03-16
Posts: 570  

Re: trouble setting up local ASCII repo [SOLVED]

I'm not sure, sgage. I was hoping to not involve Amprolla, either.

My hope was to make this work by putting everything required in the repository directory itself, with only change in my system being in /etc/apt/sources.list. Maybe this isn't possible?

Last edited by GNUser (2018-07-20 14:05:30)

Offline

#6 2018-07-20 14:02:49

sgage
Member
Registered: 2016-12-01
Posts: 341  

Re: trouble setting up local ASCII repo [SOLVED]

GNUser wrote:

I'm not sure, sgage. I was hoping to not involve Amprolla, either.

My hope was to make this work by putting everything required in the repository directory itself, with only change in my system being in /etc/apt/sources.list. Maybe this isn't possible?

I suspect not. But I think you could get a clear answer if you brought this up on the IRC - at least post a link to this thread. The people who understand the whole packaging/repo system tend to hang out there more often than they check here in the forum...

Offline

#7 2018-07-20 14:06:02

GNUser
Member
Registered: 2017-03-16
Posts: 570  

Re: trouble setting up local ASCII repo [SOLVED]

I'll try that. Thank you.

Offline

#8 2018-07-20 14:27:16

golinux
Administrator
Registered: 2016-11-25
Posts: 3,318  

Re: trouble setting up local ASCII repo [SOLVED]

The danger in not doing it the amprolla way is that the banned package filter won't be there to protect from unwanted cruft working it's way into your system.

Offline

#9 2018-07-20 14:46:50

GNUser
Member
Registered: 2017-03-16
Posts: 570  

Re: trouble setting up local ASCII repo [SOLVED]

I'm comfortable with that small risk in order to keep things simple.

If only I could tell APT to treat the Filenames in the Packages file as absolute paths--not paths relative to the local repo--everything would work. Does anyone know how to accomplish this?

Last edited by GNUser (2018-07-20 14:53:59)

Offline

#10 2018-07-20 14:54:56

golinux
Administrator
Registered: 2016-11-25
Posts: 3,318  

Re: trouble setting up local ASCII repo [SOLVED]

You might want to ping parazyd (who does amprolla) on one of the irc channels

Offline

#11 2018-07-20 19:38:08

GNUser
Member
Registered: 2017-03-16
Posts: 570  

Re: trouble setting up local ASCII repo [SOLVED]

golinux, I decided to devote some time to learn how to use nginx. Then I followed the advice in the second link you posted (section 5b) and it works like a charm now. I ended up needed to host the repo on my router+nginx instead of locally on my machine, but I like it better this way anyway. Thank you.

Offline

#12 2018-07-20 21:04:52

golinux
Administrator
Registered: 2016-11-25
Posts: 3,318  

Re: trouble setting up local ASCII repo [SOLVED]

YEA!   Really happy to hear that worked out for you.   I try to point users in the right direction even when I don't understand the finer points myself . . . something like a librarian who hasn't read every book in the library.

Offline

Board footer