dnbert / prm

PRM Allows you to quickly build package repositories, inspired by Jordan Sissels' FPM
MIT License
250 stars 33 forks source link

Repo Date format is incorrect for Debian #72

Closed luksi1 closed 7 years ago

luksi1 commented 7 years ago

Perhaps there is a better way to do this, but I simply changed the timezone to 'UTC' and called time.now, instead of time.now.utc. This complies with:

https://wiki.debian.org/RepositoryFormat#Date.2CValid-Until https://tools.ietf.org/html/rfc5322#section-3.3

luksi1 commented 7 years ago

Confirmed to work on 10.04.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.4 LTS
Release:    10.04
Codename:   lucid
root@server:~# apt-get update -o Dir::Etc::sourcelist=sources.list.d/vgrit.list -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
Bra http://repo.vgregion.se lucid Release.gpg
Ign http://repo.vgregion.se/ lucid/stable Translation-sv_SE
Bra http://repo.vgregion.se lucid Release
Ign http://repo.vgregion.se lucid/stable Packages
Ign http://repo.vgregion.se lucid/stable Packages
Bra http://repo.vgregion.se lucid/stable Packages
Läser paketlistor... Färdig
root@server:~# grep Date /var/lib/apt/lists/repo.vgregion.se_dists_lucid_Release
Date: 2016-10-01 14:34:57 +0000

Confirmed to work on 12.04

root@server:~# apt-get update -o Dir::Etc::sourcelist=sources.list.d/vgrit.list -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
Bra http://repo.vgregion.se precise Release.gpg
Bra http://repo.vgregion.se precise Release
Bra http://repo.vgregion.se precise/stable amd64 Packages
Bra http://repo.vgregion.se precise/stable i386 Packages
Ign http://repo.vgregion.se precise/stable TranslationIndex
Ign http://repo.vgregion.se precise/stable Translation-sv_SE            
Ign http://repo.vgregion.se precise/stable Translation-sv
Ign http://repo.vgregion.se precise/stable Translation-en
Läser paketlistor... Färdig
root@server:~# grep /var/lib/apt/lists/repo.vgregion.se_dists_precise_
repo.vgregion.se_dists_precise_Release
repo.vgregion.se_dists_precise_Release.gpg
repo.vgregion.se_dists_precise_stable_binary-amd64_Packages
repo.vgregion.se_dists_precise_stable_binary-i386_Packages
root@server:~# grep Date /var/lib/apt/lists/repo.vgregion.se_dists_precise_Release
Date: 2016-08-10 07:56:03 UTC
root@server:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise

Confirmed to work on 14.04

server:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty
server:~# apt-get update -o Dir::Etc::sourcelist=sources.list.d/vgrit.list -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
Ign http://repo.vgregion.se trusty InRelease
Hit http://repo.vgregion.se trusty Release.gpg
Hit http://repo.vgregion.se trusty Release
Hit http://repo.vgregion.se trusty/stable amd64 Packages
Ign http://repo.vgregion.se trusty/stable Translation-en_US
Ign http://repo.vgregion.se trusty/stable Translation-en
Ign http://repo.vgregion.se trusty/stable Translation-sv
Reading package lists... Done                        
server:~# grep Date /var/lib/apt/lists/repo.vgregion.se_dists_trusty_Release
Date: 2016-10-01 14:41:27 +0000
luksi1 commented 7 years ago

I'm closing this pull request. The date doesn't format according the RFC that I posted. Moreover, a pull request alread exists for this.