Skip to content

Commit

Permalink
Merge pull request #1 from domcleal/apt-11
Browse files Browse the repository at this point in the history
Add Date:, Valid-Until
  • Loading branch information
mattock committed Mar 3, 2016
2 parents 2fdb0fb + fbf0d24 commit 566c84f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/freight/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ apt_filesize() {
# Setup the repository for the distro named in the first argument,
# including all packages read from `stdin`.
apt_cache() {
REL_DATE="$(LC_ALL=en_US date '+%a, %d %b %Y %H:%M:%S %Z')"
VALID_DATE="Fri, 31 Nov 2038 00:00:00 JST"
DIST="$1"
SUITE="${SUITE:-$DIST}"

Expand Down Expand Up @@ -129,6 +131,8 @@ Component: $COMP
Origin: $ORIGIN
Label: $LABEL
Architecture: $ARCH
Date: $REL_DATE
Valid-Until: $VALID_DATE
EOF
gzip -c "$DISTCACHE/$COMP/binary-$ARCH/Packages" \
>"$DISTCACHE/$COMP/binary-$ARCH/Packages.gz"
Expand All @@ -141,6 +145,8 @@ Component: $COMP
Origin: $ORIGIN
Label: $LABEL
Architecture: source
Date: $REL_DATE
Valid-Until: $VALID_DATE
EOF
gzip -c "$DISTCACHE/$COMP/source/Sources" \
>"$DISTCACHE/$COMP/source/Sources.gz"
Expand All @@ -158,6 +164,8 @@ Suite: $SUITE
Codename: $DIST
Components: $(echo "$COMPS" | tr \\n " ")
Architectures: $ARCHS
Date: $REL_DATE
Valid-Until: $VALID_DATE
EOF

# Finish the top-level `Release` file with references and
Expand Down

0 comments on commit 566c84f

Please sign in to comment.