Skip to content

Commit 08c87d9

Browse files
committed
Add Date:, Valid-Until
Signed-off-by: Youhei SASAKI <[email protected]>
1 parent f34c6d6 commit 08c87d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/freight/apt.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ apt_filesize() {
7676
# Setup the repository for the distro named in the first argument,
7777
# including all packages read from `stdin`.
7878
apt_cache() {
79+
REL_DATE="$(LC_ALL=en_US date '+%a, %d %b %Y %H:%M:%S %Z')"
80+
VALID_DATE="Fri, 31 Nov 2038 00:00:00 JST"
7981
DIST="$1"
8082
SUITE="${SUITE:-$DIST}"
8183

@@ -129,6 +131,8 @@ Component: $COMP
129131
Origin: $ORIGIN
130132
Label: $LABEL
131133
Architecture: $ARCH
134+
Date: $REL_DATE
135+
Valid-Until: $VALID_DATE
132136
EOF
133137
gzip -c "$DISTCACHE/$COMP/binary-$ARCH/Packages" \
134138
>"$DISTCACHE/$COMP/binary-$ARCH/Packages.gz"
@@ -141,6 +145,8 @@ Component: $COMP
141145
Origin: $ORIGIN
142146
Label: $LABEL
143147
Architecture: source
148+
Date: $REL_DATE
149+
Valid-Until: $VALID_DATE
144150
EOF
145151
gzip -c "$DISTCACHE/$COMP/source/Sources" \
146152
>"$DISTCACHE/$COMP/source/Sources.gz"
@@ -158,6 +164,8 @@ Suite: $SUITE
158164
Codename: $DIST
159165
Components: $(echo "$COMPS" | tr \\n " ")
160166
Architectures: $ARCHS
167+
Date: $REL_DATE
168+
Valid-Until: $VALID_DATE
161169
EOF
162170

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

0 commit comments

Comments
 (0)