Page 1 of 1

Wiki error re sources.list?

PostPosted: 2017-08-11 23:52
by sunrat
From viewtopic.php?f=17&t=134251&hilit=+sources&start=15#p651748

sunrat wrote:I just tried to go to http://deb.debian.org/debian in browser and got 404 Not Found error. However when I checked my own default sources.list (in sid) it has a trailing slash after the url, and this works. Try modifying your sources to add this eg:

Code: Select all
deb  http://deb.debian.org/debian/ stretch main contrib non-free

not sure if a server glitch or the wiki is wrong. :shock:


The OP in that thread was unable to update, and had no trailing slash in his self-edited sources.list although that conforms with the wiki - https://wiki.debian.org/SourcesList
Could a few other people please check this to see if the wiki needs edit?

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 00:07
by dasein
Wiki needs an edit (or more properly, a correction to its last edit).

AFAICT, the trailing slash has always been required. (Though frankly I'd never noticed it before.)

See also every URL in: https://www.debian.org/mirror/list

Good catch!

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 00:31
by eor2004
This is indeed very strange because I did a copy & paste of the same repos from the debian wiki and they worked fine, just had a little issue with the GPG keys and apt-get refused to install anything until I ran these commands "rm /etc/apt/trusted.gpg" and "apt-key update" that Bulkley posted in this thread: viewtopic.php?f=5&t=130558&p=650785#p650785 After that apt-get worked fine.

These are the repos from debian wiki:

inxi -r
Repos: Active apt sources in file: /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 01:31
by sunrat
Try clicking on the first url in the above posted sources - http://deb.debian.org/debian
Here it redirects to https://deb.debian.org/debian and gives 404
Adding a trailing slash redirects to https://cdn-aws.deb.debian.org/debian/ and opens fine.

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 01:40
by dasein
sunrat wrote:Try clicking on the first url in the above posted sources - http://deb.debian.org/debian
Here it redirects to https://deb.debian.org/debian and gives 404
Adding a trailing slash redirects to https://cdn-aws.deb.debian.org/debian/ and opens fine.

Yes, yes, and yes (respectively).

Random thoughts in no particular order...

- Some http servers will try to avoid throwing a 404 by automagically appending a trailing slash if a URL isn't found.

- Clearly the "canonical" rendering is with trailing slash, per the mirror list linked to above

- The sources.list from my Wheezy install also shows trailing slashes

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 02:05
by eor2004
If I click on the first and second url it fails with an 404 error, if I click on the third url "security.debian" it works an redirects me to a debian webpage, however if I run an "apt-get update" it works, here's the output from yesterday:

apt-get update
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org stretch/updates InRelease [62.9 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [88.5 kB]
Hit:4 http://deb.debian.org/debian stretch Release
Fetched 151 kB in 10s (15.0 kB/s)
Reading package lists... Done

This from today:

apt-get update
Get:1 http://security.debian.org stretch/updates InRelease [62.9 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://deb.debian.org/debian stretch Release
Fetched 62.9 kB in 5s (11.9 kB/s)
Reading package lists... Done

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 02:09
by sunrat
I don't have a horse in this race - no Stretch install and no wiki login, but it appeared to be an anomaly in the thread I linked.
I guess the default sources created during installation must be correct or we'd have a torrent of threads about it. Only the user-created sources entries following the wiki may be a possible problem.

@eor2004 - post your sources.list or inxi -r please.

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 02:19
by eor2004
inxi -r
Repos: Active apt sources in file: /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 02:30
by eor2004
FYI: I have a secondary PC that I upgraded from jessie to stretch, didn't have a problem with the GPG keys and the default repos unlike with this fresh debian stretch install, I think that maybe for stretch the debian devs changed something in the way the gpg keys and the repos works, who knows! :?

These are the repos I was using before changing the name from jessie to stretch and upgrading my secondary PC:

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

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 02:57
by sunrat
eor2004 wrote:FYI: I have a secondary PC that I upgraded from jessie to stretch, didn't have a problem with the GPG keys and the default repos unlike with this fresh debian stretch install, I think that maybe for stretch the debian devs changed something in the way the gpg keys and the repos works, who knows! :?

Who knows indeed. It seems to consistently 404 in browser without a trailing slash, but works with apt.
Dr. Watson, I believe the trail has gone cold. Holmes exits to indulge alternative pastime...

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 10:36
by GarryRicketson
dasein wrote:Wiki needs an edit (or more properly, a correction to its last edit).

AFAICT, the trailing slash has always been required. (Though frankly I'd never noticed it before.)

See also every URL in: https://www.debian.org/mirror/list

Good catch!

Thanks, it does appear some kind of edit, and perhaps some additional explanation
is needed.
Hopefully later today someone works on it, I don't feel confident enough my self,
so I put in a request for someone to take a look,..

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 16:12
by RU55EL
Interesting. Apt update && apt upgrade seems to work just fine on my systems with or without the forward slash at the end of the sources.list URLs.

After checking out the link that Dasein posted:

dasein wrote:[...] See also every URL in: https://www.debian.org/mirror/list [...]


I added the "/" to the end of the URLs in my sources.list entries.

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 20:38
by dasein
The key point, I think, is that there is no earthly reason for the copy-and-paste exemplars to be different from all other exemplars in and across multiple Wiki pages. The difference is noticeable (obviously, since it was noticed) and at best it leaves newbies wondering about the rationale behind the difference.

At worst, it leaves newbies (or even us not-so-newbies) confused because the "same" URL succeeds or fails based on the user agent used to fetch it. That's not how URLs are "supposed" to work.

Re: Wiki error re sources.list?

PostPosted: 2017-08-12 23:17
by pendrachken
dasein wrote:The key point, I think, is that there is no earthly reason for the copy-and-paste exemplars to be different from all other exemplars in and across multiple Wiki pages. The difference is noticeable (obviously, since it was noticed) and at best it leaves newbies wondering about the rationale behind the difference.

At worst, it leaves newbies (or even us not-so-newbies) confused because the "same" URL succeeds or fails based on the user agent used to fetch it. That's not how URLs are "supposed" to work.


Some knucklehead ( see here why it is a bad idea ) almost had to have set it up this way intentionally, and only on that particular repo URL to boot. HTTP://ftp.us.debian.org/debian still redirects to the directory as expected.

If anything a bug should be filed against the repo itself for having mangled the mod_dir options of its Apache config ( Apache Server at deb.debian.org Port 80 ).