Merge lp:~dpb/ubuntu-manpage-repository/highlight-current-series into lp:ubuntu-manpage-repository
- highlight-current-series
- Merge into trunk
Proposed by
David Britton
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 222 | ||||||||
Proposed branch: | lp:~dpb/ubuntu-manpage-repository/highlight-current-series | ||||||||
Merge into: | lp:ubuntu-manpage-repository | ||||||||
Diff against target: |
779 lines (+277/-125) 13 files modified
Makefile (+18/-16) README.md (+17/-66) bin/fetch-man-pages.sh (+6/-5) bin/make-manpage-repo.sh (+38/-19) bin/make-sitemaps.sh (+1/-1) examples/config (+9/-3) tools/create-microsite-container.sh (+42/-0) tools/setup-archive-fixture-in-server.sh (+30/-0) tools/setup-in-server.sh (+0/-8) tools/update-fixtures.sh (+68/-0) tools/update-microsite-container.sh (+35/-0) www/assets/light/css/styles.css (+6/-0) www/functions.js (+7/-7) |
||||||||
To merge this branch: | bzr merge lp:~dpb/ubuntu-manpage-repository/highlight-current-series | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joshua Powers (community) | Approve | ||
Review via email: mp+347488@code.launchpad.net |
Commit message
new additions:
1) Easy microsite create with makefile target using LXD and a checked-in mini archive.
2) fixed width fonts
3) highlight current series in bold
4) cache invalidate generated manpages once per month (on average)
5) limit generated manpage to 100 columns.
Description of the change
To post a comment you must log in.
Revision history for this message
Joshua Powers (powersj) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile' | |||
2 | --- Makefile 2018-06-03 17:10:52 +0000 | |||
3 | +++ Makefile 2018-06-05 23:57:15 +0000 | |||
4 | @@ -5,21 +5,23 @@ | |||
5 | 5 | deps: | 5 | deps: |
6 | 6 | sudo apt -y install w3m shellcheck flake8 < /dev/null | 6 | sudo apt -y install w3m shellcheck flake8 < /dev/null |
7 | 7 | 7 | ||
8 | 8 | # Note, this is destructive, you could have just wasted hours of | ||
9 | 9 | # manpage building by running it. Try not to make this the default | ||
10 | 10 | # action or make it a dependency of another operation. | ||
11 | 11 | clean: | 8 | clean: |
12 | 12 | rm -rf www/manpages www/manpages.gz | 9 | rm -rf www/manpages www/manpages.gz |
26 | 13 | 10 | [ -L config ] && rm config | |
27 | 14 | manpage-repo: | 11 | |
28 | 15 | @echo "The first time this runs, it could take many hours" | 12 | config: |
29 | 16 | @sleep 2 | 13 | ln -s examples/config config |
30 | 17 | (cd bin && ./make-manpage-repo.sh) | 14 | |
31 | 18 | @echo "If running locally: file://$(pwd)/www" | 15 | manpage-repo: config |
32 | 19 | @echo "If running in container: http://<IP_ADDR>:8080/" | 16 | bin/make-manpage-repo.sh |
33 | 20 | 17 | ||
34 | 21 | setup-and-mirror: | 18 | create-microsite-container: |
35 | 22 | @echo "This will be downloading >8GB of data, it could take a while..." | 19 | tools/create-microsite-container.sh |
36 | 23 | @sleep 2 | 20 | |
37 | 24 | ./tools/setup-in-server.sh | 21 | update-microsite-container: |
38 | 25 | apt-mirror | 22 | tools/update-microsite-container.sh |
39 | 23 | |||
40 | 24 | setup-microsite-in-server: config | ||
41 | 25 | tools/setup-archive-fixture-in-server.sh | ||
42 | 26 | tools/setup-in-server.sh | ||
43 | 27 | |||
44 | 26 | 28 | ||
45 | === modified file 'README.md' | |||
46 | --- README.md 2018-05-24 20:36:29 +0000 | |||
47 | +++ README.md 2018-06-05 23:57:15 +0000 | |||
48 | @@ -1,73 +1,24 @@ | |||
72 | 1 | See: https://launchpad.net/ubuntu-manpage-repository for developing | 1 | See also: https://launchpad.net/ubuntu-manpage-repository |
50 | 2 | information. | ||
51 | 3 | |||
52 | 4 | # Hacking locally, without setting up a micro site | ||
53 | 5 | |||
54 | 6 | Make changes, then... | ||
55 | 7 | |||
56 | 8 | make deps | ||
57 | 9 | cd bin; ./make-manpage-repo.sh | ||
58 | 10 | |||
59 | 11 | And then, wait, you can typically kill this after a couple minutes as | ||
60 | 12 | you will have some data available then. After that, you can check | ||
61 | 13 | things out by pulling up: | ||
62 | 14 | |||
63 | 15 | * file:///home/<user>/<path_to_source>/www/ in chrome... | ||
64 | 16 | |||
65 | 17 | Note, for most bugs, you do not need to wait for everything to | ||
66 | 18 | download/create. Instead, you can just generate a few pages and check | ||
67 | 19 | what happened there. | ||
68 | 20 | |||
69 | 21 | To start over: | ||
70 | 22 | |||
71 | 23 | make clean | ||
73 | 24 | 2 | ||
74 | 25 | # Setting up a micro site for dev/test in a container | 3 | # Setting up a micro site for dev/test in a container |
75 | 26 | 4 | ||
113 | 27 | To get the search form to work and debug more complex issues, you need | 5 | To help ease the testing of this there is tooling in place to create a |
114 | 28 | to set up a real microsite. The quickest way I have is to create a | 6 | small "microsite". This just puts out a Packages files with a small |
115 | 29 | container, checkout the code there, and setup. These instructions | 7 | set of packages for testing pursposes in a container. It also copies |
116 | 30 | should help. Once in the container, this should all be run as root. | 8 | the current branch (.bzr file and all) out to the container in the |
117 | 31 | 9 | /srv/manpages.ubuntu.com directory, making it super easy to test out | |
118 | 32 | After this has been done one time, updates should be fast. Some sample | 10 | your changes. |
119 | 33 | times: | 11 | |
120 | 34 | 12 | make create-microsite-container | |
121 | 35 | # create container / install bzr | 13 | |
122 | 36 | lxc launch ubuntu:xenial manpages-test | 14 | You can also override the default container name |
123 | 37 | lxc exec manpages-test bash | 15 | (default=**manpages-microsite**), if you want to deploy |
124 | 38 | apt update | 16 | two sites to compare, for instance: |
125 | 39 | apt install bzr make | 17 | |
126 | 40 | 18 | MICROSITE_CONTAINER=name2 make create-microsite-container | |
90 | 41 | # Checkout source (Remember, you can checkout your branch too) | ||
91 | 42 | cd /srv | ||
92 | 43 | bzr checkout lp:ubuntu-manpage-repository manpages.ubuntu.com | ||
93 | 44 | cd manpages.ubuntu.com | ||
94 | 45 | |||
95 | 46 | # Setup the container, and start the mirror process (>8GB d/l ahead) | ||
96 | 47 | # Also, do the actually conversion from debs into manpages | ||
97 | 48 | make deps setup-and-mirror manpage-repo | ||
98 | 49 | |||
99 | 50 | You can then reach the page at: | ||
100 | 51 | |||
101 | 52 | * http://<ip>:8080/index_real.html | ||
102 | 53 | * http://<ip>:8080/cgi-bin/search.py?q=aalib-config (one of the first pages that | ||
103 | 54 | should be downloaded) | ||
104 | 55 | |||
105 | 56 | # Dev notes | ||
106 | 57 | |||
107 | 58 | * Don't erase the apt-mirror (/srv/manpages.ubuntu.com/ubuntu/), it can | ||
108 | 59 | just be updated by the 'setup-and-mirror' make target each time. | ||
109 | 60 | * Manpage generation takes about 40m on my computer. It also doesn't | ||
110 | 61 | usually need to be repeated | ||
111 | 62 | * The config files limit the archive to bionic/main by default, just to | ||
112 | 63 | help speed up development, you can expand those as necessary. | ||
127 | 64 | 19 | ||
128 | 65 | # TODO | 20 | # TODO |
129 | 66 | 21 | ||
130 | 67 | * remove creation of the needed symlink for the real dev site testing, | ||
131 | 68 | this requires modification of search.py | ||
132 | 69 | * create a series/branch for production since the configuration needs | ||
133 | 70 | to be modified for devel/production. Or solve in some other way. | ||
134 | 71 | * search.py really needs someone to make functions and simplify it. | 22 | * search.py really needs someone to make functions and simplify it. |
137 | 72 | * switch container setup instructions to use 'manpages' user account | 23 | * switch container setup script to use a 'manpages' user account |
138 | 73 | instead of root as they do now | 24 | instead of root as it does now |
139 | 74 | 25 | ||
140 | === modified file 'bin/fetch-man-pages.sh' | |||
141 | --- bin/fetch-man-pages.sh 2018-06-03 18:27:44 +0000 | |||
142 | +++ bin/fetch-man-pages.sh 2018-06-05 23:57:15 +0000 | |||
143 | @@ -29,7 +29,7 @@ | |||
144 | 29 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 29 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
145 | 30 | 30 | ||
146 | 31 | # shellcheck disable=SC1090 | 31 | # shellcheck disable=SC1090 |
148 | 32 | . "$DIR/config" | 32 | . "$DIR/../config" |
149 | 33 | 33 | ||
150 | 34 | TEMPDIR=$(mktemp -d -t manpages-fetch-XXXXXX) | 34 | TEMPDIR=$(mktemp -d -t manpages-fetch-XXXXXX) |
151 | 35 | trap 'rm -rf $TEMPDIR 2>/dev/null || true' EXIT HUP INT QUIT TERM | 35 | trap 'rm -rf $TEMPDIR 2>/dev/null || true' EXIT HUP INT QUIT TERM |
152 | @@ -60,7 +60,7 @@ | |||
153 | 60 | if [ -z "$man" ]; then | 60 | if [ -z "$man" ]; then |
154 | 61 | echo "INFO: No manpages: [$DIST] [$PKG]" | 61 | echo "INFO: No manpages: [$DIST] [$PKG]" |
155 | 62 | # Touch the cache file so we don't look again until package updated | 62 | # Touch the cache file so we don't look again until package updated |
157 | 63 | sha1sum "$DEB" | awk '{ print $1 }' >> "$DESTDIR/.cache/$NAME" | 63 | sha1sum "$DEB" | awk '{ print $1 }' > "$DESTDIR/.cache/$NAME" |
158 | 64 | exit 0 | 64 | exit 0 |
159 | 65 | fi | 65 | fi |
160 | 66 | 66 | ||
161 | @@ -81,7 +81,8 @@ | |||
162 | 81 | manpage="$TEMPDIR/$i" | 81 | manpage="$TEMPDIR/$i" |
163 | 82 | i=$(printf "%s" "$i" | sed -e "s/usr\/share.*\/man\///i" -e "s/\.gz$//") | 82 | i=$(printf "%s" "$i" | sed -e "s/usr\/share.*\/man\///i" -e "s/\.gz$//") |
164 | 83 | #printf "%s\n" "INFO: Considering manpage [$i]" | 83 | #printf "%s\n" "INFO: Considering manpage [$i]" |
166 | 84 | if [ ! -s "$manpage" -o -z "$i" -a "$SYMLINK" = "0" ]; then | 84 | # shellcheck disable=SC2166 |
167 | 85 | if [ ! -s "$manpage" -o -z "$i" ] && [ "$SYMLINK" = "0" ]; then | ||
168 | 85 | #printf "%s\n" "INFO: Skipping empty manpage [$manpage]" | 86 | #printf "%s\n" "INFO: Skipping empty manpage [$manpage]" |
169 | 86 | continue | 87 | continue |
170 | 87 | fi | 88 | fi |
171 | @@ -97,7 +98,7 @@ | |||
172 | 97 | ln -f -s "$LN" "$out" | 98 | ln -f -s "$LN" "$out" |
173 | 98 | printf "INFO: Created symlink [%s]" "$out" | 99 | printf "INFO: Created symlink [%s]" "$out" |
174 | 99 | else | 100 | else |
176 | 100 | BODY=$(/usr/lib/w3m/cgi-bin/w3mman2html.cgi "local=$manpage" | grep -A 1000000 "^<b>" | sed -e '/<\/body>/,+100 d' -e 's:^<b>\(.*\)</b>$:</pre><h4><b>\1</b></h4><pre>:g' -e 's:<a href="file\:///[^?]*?\([^(]*\)(\([^)]*\))">:<a href="../man\2/\1.\2.html">:g') | 101 | BODY=$(COLUMNS=100 /usr/lib/w3m/cgi-bin/w3mman2html.cgi "local=$manpage" | grep -A 1000000 "^<b>" | sed -e '/<\/body>/,+100 d' -e 's:^<b>\(.*\)</b>$:</pre><h4><b>\1</b></h4><pre>:g' -e 's:<a href="file\:///[^?]*?\([^(]*\)(\([^)]*\))">:<a href="../man\2/\1.\2.html">:g') |
177 | 101 | TITLE=$(printf "%s" "$BODY" | head -n2 | tail -n1 | sed "s/<[^>]\+>//g") | 102 | TITLE=$(printf "%s" "$BODY" | head -n2 | tail -n1 | sed "s/<[^>]\+>//g") |
178 | 102 | BIN_PKG=$(printf "%s" "$NAME_AND_VER" | sed s/_.*$//g) | 103 | BIN_PKG=$(printf "%s" "$NAME_AND_VER" | sed s/_.*$//g) |
179 | 103 | PKG_LINK="https://launchpad.net/ubuntu/$DIST/+package/$BIN_PKG" | 104 | PKG_LINK="https://launchpad.net/ubuntu/$DIST/+package/$BIN_PKG" |
180 | @@ -121,7 +122,7 @@ | |||
181 | 121 | 122 | ||
182 | 122 | # After extracting all manpages, cache the sha1sum, so we don't | 123 | # After extracting all manpages, cache the sha1sum, so we don't |
183 | 123 | # repeat the downloads | 124 | # repeat the downloads |
185 | 124 | sha1sum "$DEB" | awk '{ print $1 }' >> "$DESTDIR/.cache/$NAME" | 125 | sha1sum "$DEB" | awk '{ print $1 }' > "$DESTDIR/.cache/$NAME" |
186 | 125 | 126 | ||
187 | 126 | # In the case of freakish package permissions, fix them on rm failure. | 127 | # In the case of freakish package permissions, fix them on rm failure. |
188 | 127 | rm -rf "$TEMPDIR" 2>/dev/null || ( chmod -R 700 "$TEMPDIR" && rm -rf "$TEMPDIR" ) || true | 128 | rm -rf "$TEMPDIR" 2>/dev/null || ( chmod -R 700 "$TEMPDIR" && rm -rf "$TEMPDIR" ) || true |
189 | 128 | 129 | ||
190 | === modified file 'bin/make-manpage-repo.sh' | |||
191 | --- bin/make-manpage-repo.sh 2018-06-03 17:15:58 +0000 | |||
192 | +++ bin/make-manpage-repo.sh 2018-06-05 23:57:15 +0000 | |||
193 | @@ -1,8 +1,6 @@ | |||
194 | 1 | #!/bin/bash -e | 1 | #!/bin/bash -e |
195 | 2 | 2 | ||
196 | 3 | ############################################################################### | 3 | ############################################################################### |
197 | 4 | # This is the Ubuntu manpage repository generator and interface. | ||
198 | 5 | # | ||
199 | 6 | # Copyright (C) 2008 Canonical Ltd. | 4 | # Copyright (C) 2008 Canonical Ltd. |
200 | 7 | # | 5 | # |
201 | 8 | # This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>, | 6 | # This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>, |
202 | @@ -27,8 +25,11 @@ | |||
203 | 27 | 25 | ||
204 | 28 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 26 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
205 | 29 | 27 | ||
206 | 28 | # keeps shellcheck happy. | ||
207 | 29 | ARCH="" | ||
208 | 30 | |||
209 | 30 | # shellcheck disable=SC1090 | 31 | # shellcheck disable=SC1090 |
211 | 31 | . "$DIR/config" | 32 | . "$DIR/../config" |
212 | 32 | 33 | ||
213 | 33 | # Establish some locking, to keep multiple updates from running | 34 | # Establish some locking, to keep multiple updates from running |
214 | 34 | mkdir -p "$PUBLIC_HTML_DIR/manpages" | 35 | mkdir -p "$PUBLIC_HTML_DIR/manpages" |
215 | @@ -47,10 +48,11 @@ | |||
216 | 47 | get_packages_url() { | 48 | get_packages_url() { |
217 | 48 | dist=$1 | 49 | dist=$1 |
218 | 49 | repo=$2 | 50 | repo=$2 |
221 | 50 | if [ -e "$DEBDIR/dists/$dist/$repo/binary-$ARCH/Packages.gz" ]; then | 51 | arch=$3 |
222 | 51 | echo "file://$DEBDIR/dists/$dist/$repo/binary-$ARCH/Packages.gz" | 52 | if [ -e "$DEBDIR/dists/$dist/$repo/binary-$arch/Packages.gz" ]; then |
223 | 53 | echo "file://$DEBDIR/dists/$dist/$repo/binary-$arch/Packages.gz" | ||
224 | 52 | else | 54 | else |
226 | 53 | echo "$ARCHIVE/dists/$dist/$repo/binary-$ARCH/Packages.gz" | 55 | echo "$ARCHIVE/dists/$dist/$repo/binary-$arch/Packages.gz" |
227 | 54 | fi | 56 | fi |
228 | 55 | } | 57 | } |
229 | 56 | 58 | ||
230 | @@ -73,10 +75,25 @@ | |||
231 | 73 | sum="$2" | 75 | sum="$2" |
232 | 74 | name=$(basename "$deb" | awk -F_ '{print $1}') | 76 | name=$(basename "$deb" | awk -F_ '{print $1}') |
233 | 75 | existing_sum=$(cat "$PUBLIC_HTML_DIR/manpages/$dist/.cache/$name" 2>/dev/null) | 77 | existing_sum=$(cat "$PUBLIC_HTML_DIR/manpages/$dist/.cache/$name" 2>/dev/null) |
234 | 78 | |||
235 | 79 | # Take the first two digits of the existing_sum modulo 28 to | ||
236 | 80 | # compare to the current day of month. | ||
237 | 81 | # | ||
238 | 82 | # Reasoning: this will invalidate the cache for everything ~ | ||
239 | 83 | # once per month (days: 1-28) | ||
240 | 84 | day_mod=$((0x$(echo "$existing_sum" | cut -b 1-2)%27 + 1)) | ||
241 | 85 | if [ "$day_mod" -eq "$(date +%d)" ]; then | ||
242 | 86 | echo "INFO: date_mod match, regnerating: $deb ($day_mod)" | ||
243 | 87 | return 0 | ||
244 | 88 | fi | ||
245 | 89 | |||
246 | 90 | # Of course, if the sum found in the packages file for this | ||
247 | 91 | # package does not equal the sum I have on disk, regenerate. | ||
248 | 76 | if [ "$existing_sum" = "$sum" ]; then | 92 | if [ "$existing_sum" = "$sum" ]; then |
249 | 77 | echo "INFO: cksum skip: $deb" | 93 | echo "INFO: cksum skip: $deb" |
250 | 78 | return 1 | 94 | return 1 |
251 | 79 | else | 95 | else |
252 | 96 | echo "INFO: cksum mismatch: $deb" | ||
253 | 80 | return 0 | 97 | return 0 |
254 | 81 | fi | 98 | fi |
255 | 82 | } | 99 | } |
256 | @@ -88,7 +105,7 @@ | |||
257 | 88 | deburl=$(get_deb_url "$deb") | 105 | deburl=$(get_deb_url "$deb") |
258 | 89 | # FIXME: the || true needs to bubble up to a list of things wrong obviously. | 106 | # FIXME: the || true needs to bubble up to a list of things wrong obviously. |
259 | 90 | # shellcheck disable=SC2015 | 107 | # shellcheck disable=SC2015 |
261 | 91 | is_pkg_cache_invalid "$deb" "$sum" && ./fetch-man-pages.sh "$dist" "$deburl" || true | 108 | is_pkg_cache_invalid "$deb" "$sum" && "$DIR/fetch-man-pages.sh" "$dist" "$deburl" || true |
262 | 92 | } | 109 | } |
263 | 93 | 110 | ||
264 | 94 | link_en_locale() { | 111 | link_en_locale() { |
265 | @@ -122,18 +139,20 @@ | |||
266 | 122 | mkdir -p "$PUBLIC_HTML_DIR/manpages/$dist/.cache" "$PUBLIC_HTML_DIR/manpages.gz/$dist" || true | 139 | mkdir -p "$PUBLIC_HTML_DIR/manpages/$dist/.cache" "$PUBLIC_HTML_DIR/manpages.gz/$dist" || true |
267 | 123 | link_en_locale "$dist" | 140 | link_en_locale "$dist" |
268 | 124 | for repo in $REPOS; do | 141 | for repo in $REPOS; do |
280 | 125 | file=$(get_packages_url "$dist" "$repo") | 142 | for arch in $ARCH; do |
281 | 126 | echo "INFO: Packages.gz: $file" | 143 | file=$(get_packages_url "$dist" "$repo" "$arch") |
282 | 127 | curl -s "$file" \ | 144 | echo "INFO: Packages.gz: $file" |
283 | 128 | | gunzip -c \ | 145 | curl -s "$file" \ |
284 | 129 | | grep -E "(^Filename: |^SHA1: )" \ | 146 | | gunzip -c \ |
285 | 130 | | awk '{print $2}' \ | 147 | | grep -E "(^Filename: |^SHA1: )" \ |
286 | 131 | | sed 'N;s/\n/ /' \ | 148 | | awk '{print $2}' \ |
287 | 132 | | sort -u \ | 149 | | sed 'N;s/\n/ /' \ |
288 | 133 | | while read -r deb sum; do | 150 | | sort -u \ |
289 | 134 | handle_deb "$dist" "$deb" "$sum" | 151 | | while read -r deb sum; do |
290 | 135 | done | 152 | handle_deb "$dist" "$deb" "$sum" |
291 | 153 | done | ||
292 | 154 | done | ||
293 | 136 | done | 155 | done |
294 | 137 | done | 156 | done |
295 | 138 | 157 | ||
297 | 139 | ./make-sitemaps.sh | 158 | "$DIR/make-sitemaps.sh" |
298 | 140 | 159 | ||
299 | === modified file 'bin/make-sitemaps.sh' | |||
300 | --- bin/make-sitemaps.sh 2018-06-03 17:15:58 +0000 | |||
301 | +++ bin/make-sitemaps.sh 2018-06-05 23:57:15 +0000 | |||
302 | @@ -30,7 +30,7 @@ | |||
303 | 30 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 30 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
304 | 31 | 31 | ||
305 | 32 | # shellcheck disable=SC1090 | 32 | # shellcheck disable=SC1090 |
307 | 33 | . "$DIR/config" | 33 | . "$DIR/../config" |
308 | 34 | 34 | ||
309 | 35 | printf "%s\n" "INFO: Making sitemaps" | 35 | printf "%s\n" "INFO: Making sitemaps" |
310 | 36 | 36 | ||
311 | 37 | 37 | ||
312 | === renamed file 'bin/config' => 'examples/config' | |||
313 | --- bin/config 2018-05-23 19:48:06 +0000 | |||
314 | +++ examples/config 2018-06-05 23:57:15 +0000 | |||
315 | @@ -1,5 +1,9 @@ | |||
316 | 1 | 1 | ||
317 | 2 | # Customize this file and rename it to 'config' | 2 | # Customize this file and rename it to 'config' |
318 | 3 | # It should be in the root of the directory structure, like | ||
319 | 4 | # - bin/ | ||
320 | 5 | # - www/ | ||
321 | 6 | # - config | ||
322 | 3 | 7 | ||
323 | 4 | # What archive are you wanting to pull Packages.gz and .deb files from? | 8 | # What archive are you wanting to pull Packages.gz and .deb files from? |
324 | 5 | ARCHIVE="http://archive.ubuntu.com/ubuntu" | 9 | ARCHIVE="http://archive.ubuntu.com/ubuntu" |
325 | @@ -9,13 +13,15 @@ | |||
326 | 9 | 13 | ||
327 | 10 | # Point this at the location where you want the manpages | 14 | # Point this at the location where you want the manpages |
328 | 11 | # and manpages.gz directories generated. | 15 | # and manpages.gz directories generated. |
330 | 12 | PUBLIC_HTML_DIR="$(pwd)/../www" | 16 | PUBLIC_HTML_DIR="/srv/manpages.ubuntu.com/www" |
331 | 13 | 17 | ||
332 | 14 | # For generating the sitemap.xml, everything else in the scripts | 18 | # For generating the sitemap.xml, everything else in the scripts |
333 | 15 | # uses relative links | 19 | # uses relative links |
334 | 16 | SITE="http://manpages.ubuntu.com" | 20 | SITE="http://manpages.ubuntu.com" |
335 | 17 | 21 | ||
336 | 18 | # These form a combinatorial download matrix | 22 | # These form a combinatorial download matrix |
339 | 19 | DISTROS="bionic" | 23 | DISTROS="bionic artful xenial trusty precise" |
340 | 20 | REPOS="main" | 24 | REPOS="main restricted universe multiverse" |
341 | 25 | |||
342 | 26 | # For now, stick to a single arch | ||
343 | 21 | ARCH="amd64" | 27 | ARCH="amd64" |
344 | 22 | 28 | ||
345 | === added file 'tools/create-microsite-container.sh' | |||
346 | --- tools/create-microsite-container.sh 1970-01-01 00:00:00 +0000 | |||
347 | +++ tools/create-microsite-container.sh 2018-06-05 23:57:15 +0000 | |||
348 | @@ -0,0 +1,42 @@ | |||
349 | 1 | #!/bin/bash -e | ||
350 | 2 | # | ||
351 | 3 | # Goal: create a small microsite in a container from this branch | ||
352 | 4 | # | ||
353 | 5 | # Notes: | ||
354 | 6 | # | ||
355 | 7 | # - A new container will be created each time. | ||
356 | 8 | # - This script should be run as root | ||
357 | 9 | # - Your code will be copied into the microsite | ||
358 | 10 | |||
359 | 11 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
360 | 12 | NAME=${MICROSITE_CONTAINER:-manpages-microsite} | ||
361 | 13 | SITE_PATH=/srv/manpages.ubuntu.com | ||
362 | 14 | |||
363 | 15 | if ! lxc info "$NAME" 2>/dev/null; then | ||
364 | 16 | lxc launch ubuntu:xenial "$NAME" | ||
365 | 17 | sleep 5 | ||
366 | 18 | lxc exec "$NAME" -- apt update | ||
367 | 19 | else | ||
368 | 20 | echo "-------------------------------------------" | ||
369 | 21 | echo "Found existing container: $NAME" | ||
370 | 22 | echo "Hit [CTRL]-c to avoid wiping out $NAME:$SITE_PATH" | ||
371 | 23 | read -p "Press enter to continue" | ||
372 | 24 | echo "-------------------------------------------" | ||
373 | 25 | fi | ||
374 | 26 | |||
375 | 27 | lxc exec "$NAME" -- apt install -y apache2 bzr make < /dev/null | ||
376 | 28 | lxc exec "$NAME" -- rm -rf "$SITE_PATH" | ||
377 | 29 | lxc exec "$NAME" -- mkdir -p "$SITE_PATH" | ||
378 | 30 | tar cf - "$DIR/../" | lxc exec "$NAME" -- tar xvf - -C "$SITE_PATH" | ||
379 | 31 | lxc exec "$NAME" -- sh -c "cd $SITE_PATH; make deps setup-microsite-in-server manpage-repo" | ||
380 | 32 | |||
381 | 33 | echo "--------" | ||
382 | 34 | echo "Summary:" | ||
383 | 35 | echo "--------" | ||
384 | 36 | echo "" | ||
385 | 37 | lxc list "$NAME" | ||
386 | 38 | |||
387 | 39 | IP=$(lxc info "$NAME" |grep eth0: |grep -v inet6 | awk '{ print $3 }') | ||
388 | 40 | echo "" | ||
389 | 41 | echo "Site URL: http://$IP:8080" | ||
390 | 42 | echo " * Try searching for 'ac'" | ||
391 | 0 | 43 | ||
392 | === added directory 'tools/fixtures' | |||
393 | === added directory 'tools/fixtures/mirror' | |||
394 | === added directory 'tools/fixtures/mirror/dists' | |||
395 | === added directory 'tools/fixtures/mirror/dists/artful' | |||
396 | === added directory 'tools/fixtures/mirror/dists/artful/main' | |||
397 | === added directory 'tools/fixtures/mirror/dists/artful/main/binary-amd64' | |||
398 | === added file 'tools/fixtures/mirror/dists/artful/main/binary-amd64/Packages.gz' | |||
399 | 1 | Binary files tools/fixtures/mirror/dists/artful/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 44 | Binary files tools/fixtures/mirror/dists/artful/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
400 | === added directory 'tools/fixtures/mirror/dists/artful/main/binary-s390x' | |||
401 | === added file 'tools/fixtures/mirror/dists/artful/main/binary-s390x/Packages.gz' | |||
402 | 2 | Binary files tools/fixtures/mirror/dists/artful/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 45 | Binary files tools/fixtures/mirror/dists/artful/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
403 | === added directory 'tools/fixtures/mirror/dists/artful/multiverse' | |||
404 | === added directory 'tools/fixtures/mirror/dists/artful/multiverse/binary-amd64' | |||
405 | === added file 'tools/fixtures/mirror/dists/artful/multiverse/binary-amd64/Packages.gz' | |||
406 | 3 | Binary files tools/fixtures/mirror/dists/artful/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 46 | Binary files tools/fixtures/mirror/dists/artful/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
407 | === added directory 'tools/fixtures/mirror/dists/artful/multiverse/binary-s390x' | |||
408 | === added file 'tools/fixtures/mirror/dists/artful/multiverse/binary-s390x/Packages.gz' | |||
409 | 4 | Binary files tools/fixtures/mirror/dists/artful/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 47 | Binary files tools/fixtures/mirror/dists/artful/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
410 | === added directory 'tools/fixtures/mirror/dists/artful/restricted' | |||
411 | === added directory 'tools/fixtures/mirror/dists/artful/restricted/binary-amd64' | |||
412 | === added file 'tools/fixtures/mirror/dists/artful/restricted/binary-amd64/Packages.gz' | |||
413 | 5 | Binary files tools/fixtures/mirror/dists/artful/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 48 | Binary files tools/fixtures/mirror/dists/artful/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
414 | === added directory 'tools/fixtures/mirror/dists/artful/restricted/binary-s390x' | |||
415 | === added file 'tools/fixtures/mirror/dists/artful/restricted/binary-s390x/Packages.gz' | |||
416 | 6 | Binary files tools/fixtures/mirror/dists/artful/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 49 | Binary files tools/fixtures/mirror/dists/artful/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
417 | === added directory 'tools/fixtures/mirror/dists/artful/universe' | |||
418 | === added directory 'tools/fixtures/mirror/dists/artful/universe/binary-amd64' | |||
419 | === added file 'tools/fixtures/mirror/dists/artful/universe/binary-amd64/Packages.gz' | |||
420 | 7 | Binary files tools/fixtures/mirror/dists/artful/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 50 | Binary files tools/fixtures/mirror/dists/artful/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
421 | === added directory 'tools/fixtures/mirror/dists/artful/universe/binary-s390x' | |||
422 | === added file 'tools/fixtures/mirror/dists/artful/universe/binary-s390x/Packages.gz' | |||
423 | 8 | Binary files tools/fixtures/mirror/dists/artful/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 51 | Binary files tools/fixtures/mirror/dists/artful/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/artful/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
424 | === added directory 'tools/fixtures/mirror/dists/bionic' | |||
425 | === added directory 'tools/fixtures/mirror/dists/bionic/main' | |||
426 | === added directory 'tools/fixtures/mirror/dists/bionic/main/binary-amd64' | |||
427 | === added file 'tools/fixtures/mirror/dists/bionic/main/binary-amd64/Packages.gz' | |||
428 | 9 | Binary files tools/fixtures/mirror/dists/bionic/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 52 | Binary files tools/fixtures/mirror/dists/bionic/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
429 | === added directory 'tools/fixtures/mirror/dists/bionic/main/binary-s390x' | |||
430 | === added file 'tools/fixtures/mirror/dists/bionic/main/binary-s390x/Packages.gz' | |||
431 | 10 | Binary files tools/fixtures/mirror/dists/bionic/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 53 | Binary files tools/fixtures/mirror/dists/bionic/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
432 | === added directory 'tools/fixtures/mirror/dists/bionic/multiverse' | |||
433 | === added directory 'tools/fixtures/mirror/dists/bionic/multiverse/binary-amd64' | |||
434 | === added file 'tools/fixtures/mirror/dists/bionic/multiverse/binary-amd64/Packages.gz' | |||
435 | 11 | Binary files tools/fixtures/mirror/dists/bionic/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 54 | Binary files tools/fixtures/mirror/dists/bionic/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
436 | === added directory 'tools/fixtures/mirror/dists/bionic/multiverse/binary-s390x' | |||
437 | === added file 'tools/fixtures/mirror/dists/bionic/multiverse/binary-s390x/Packages.gz' | |||
438 | 12 | Binary files tools/fixtures/mirror/dists/bionic/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 55 | Binary files tools/fixtures/mirror/dists/bionic/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
439 | === added directory 'tools/fixtures/mirror/dists/bionic/restricted' | |||
440 | === added directory 'tools/fixtures/mirror/dists/bionic/restricted/binary-amd64' | |||
441 | === added file 'tools/fixtures/mirror/dists/bionic/restricted/binary-amd64/Packages.gz' | |||
442 | 13 | Binary files tools/fixtures/mirror/dists/bionic/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 56 | Binary files tools/fixtures/mirror/dists/bionic/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
443 | === added directory 'tools/fixtures/mirror/dists/bionic/restricted/binary-s390x' | |||
444 | === added file 'tools/fixtures/mirror/dists/bionic/restricted/binary-s390x/Packages.gz' | |||
445 | 14 | Binary files tools/fixtures/mirror/dists/bionic/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 57 | Binary files tools/fixtures/mirror/dists/bionic/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
446 | === added directory 'tools/fixtures/mirror/dists/bionic/universe' | |||
447 | === added directory 'tools/fixtures/mirror/dists/bionic/universe/binary-amd64' | |||
448 | === added file 'tools/fixtures/mirror/dists/bionic/universe/binary-amd64/Packages.gz' | |||
449 | 15 | Binary files tools/fixtures/mirror/dists/bionic/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 58 | Binary files tools/fixtures/mirror/dists/bionic/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
450 | === added directory 'tools/fixtures/mirror/dists/bionic/universe/binary-s390x' | |||
451 | === added file 'tools/fixtures/mirror/dists/bionic/universe/binary-s390x/Packages.gz' | |||
452 | 16 | Binary files tools/fixtures/mirror/dists/bionic/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 59 | Binary files tools/fixtures/mirror/dists/bionic/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/bionic/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
453 | === added directory 'tools/fixtures/mirror/dists/precise' | |||
454 | === added directory 'tools/fixtures/mirror/dists/precise/main' | |||
455 | === added directory 'tools/fixtures/mirror/dists/precise/main/binary-amd64' | |||
456 | === added file 'tools/fixtures/mirror/dists/precise/main/binary-amd64/Packages.gz' | |||
457 | 17 | Binary files tools/fixtures/mirror/dists/precise/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 60 | Binary files tools/fixtures/mirror/dists/precise/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
458 | === added directory 'tools/fixtures/mirror/dists/precise/main/binary-s390x' | |||
459 | === added file 'tools/fixtures/mirror/dists/precise/main/binary-s390x/Packages.gz' | |||
460 | 18 | Binary files tools/fixtures/mirror/dists/precise/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 61 | Binary files tools/fixtures/mirror/dists/precise/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
461 | === added directory 'tools/fixtures/mirror/dists/precise/multiverse' | |||
462 | === added directory 'tools/fixtures/mirror/dists/precise/multiverse/binary-amd64' | |||
463 | === added file 'tools/fixtures/mirror/dists/precise/multiverse/binary-amd64/Packages.gz' | |||
464 | 19 | Binary files tools/fixtures/mirror/dists/precise/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 62 | Binary files tools/fixtures/mirror/dists/precise/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
465 | === added directory 'tools/fixtures/mirror/dists/precise/multiverse/binary-s390x' | |||
466 | === added file 'tools/fixtures/mirror/dists/precise/multiverse/binary-s390x/Packages.gz' | |||
467 | 20 | Binary files tools/fixtures/mirror/dists/precise/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 63 | Binary files tools/fixtures/mirror/dists/precise/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
468 | === added directory 'tools/fixtures/mirror/dists/precise/restricted' | |||
469 | === added directory 'tools/fixtures/mirror/dists/precise/restricted/binary-amd64' | |||
470 | === added file 'tools/fixtures/mirror/dists/precise/restricted/binary-amd64/Packages.gz' | |||
471 | 21 | Binary files tools/fixtures/mirror/dists/precise/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 64 | Binary files tools/fixtures/mirror/dists/precise/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
472 | === added directory 'tools/fixtures/mirror/dists/precise/restricted/binary-s390x' | |||
473 | === added file 'tools/fixtures/mirror/dists/precise/restricted/binary-s390x/Packages.gz' | |||
474 | 22 | Binary files tools/fixtures/mirror/dists/precise/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 65 | Binary files tools/fixtures/mirror/dists/precise/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
475 | === added directory 'tools/fixtures/mirror/dists/precise/universe' | |||
476 | === added directory 'tools/fixtures/mirror/dists/precise/universe/binary-amd64' | |||
477 | === added file 'tools/fixtures/mirror/dists/precise/universe/binary-amd64/Packages.gz' | |||
478 | 23 | Binary files tools/fixtures/mirror/dists/precise/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 66 | Binary files tools/fixtures/mirror/dists/precise/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
479 | === added directory 'tools/fixtures/mirror/dists/precise/universe/binary-s390x' | |||
480 | === added file 'tools/fixtures/mirror/dists/precise/universe/binary-s390x/Packages.gz' | |||
481 | 24 | Binary files tools/fixtures/mirror/dists/precise/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 67 | Binary files tools/fixtures/mirror/dists/precise/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/precise/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
482 | === added directory 'tools/fixtures/mirror/dists/trusty' | |||
483 | === added directory 'tools/fixtures/mirror/dists/trusty/main' | |||
484 | === added directory 'tools/fixtures/mirror/dists/trusty/main/binary-amd64' | |||
485 | === added file 'tools/fixtures/mirror/dists/trusty/main/binary-amd64/Packages.gz' | |||
486 | 25 | Binary files tools/fixtures/mirror/dists/trusty/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 68 | Binary files tools/fixtures/mirror/dists/trusty/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
487 | === added directory 'tools/fixtures/mirror/dists/trusty/main/binary-s390x' | |||
488 | === added file 'tools/fixtures/mirror/dists/trusty/main/binary-s390x/Packages.gz' | |||
489 | 26 | Binary files tools/fixtures/mirror/dists/trusty/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 69 | Binary files tools/fixtures/mirror/dists/trusty/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
490 | === added directory 'tools/fixtures/mirror/dists/trusty/multiverse' | |||
491 | === added directory 'tools/fixtures/mirror/dists/trusty/multiverse/binary-amd64' | |||
492 | === added file 'tools/fixtures/mirror/dists/trusty/multiverse/binary-amd64/Packages.gz' | |||
493 | 27 | Binary files tools/fixtures/mirror/dists/trusty/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 70 | Binary files tools/fixtures/mirror/dists/trusty/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
494 | === added directory 'tools/fixtures/mirror/dists/trusty/multiverse/binary-s390x' | |||
495 | === added file 'tools/fixtures/mirror/dists/trusty/multiverse/binary-s390x/Packages.gz' | |||
496 | 28 | Binary files tools/fixtures/mirror/dists/trusty/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 71 | Binary files tools/fixtures/mirror/dists/trusty/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
497 | === added directory 'tools/fixtures/mirror/dists/trusty/restricted' | |||
498 | === added directory 'tools/fixtures/mirror/dists/trusty/restricted/binary-amd64' | |||
499 | === added file 'tools/fixtures/mirror/dists/trusty/restricted/binary-amd64/Packages.gz' | |||
500 | 29 | Binary files tools/fixtures/mirror/dists/trusty/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 72 | Binary files tools/fixtures/mirror/dists/trusty/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
501 | === added directory 'tools/fixtures/mirror/dists/trusty/restricted/binary-s390x' | |||
502 | === added file 'tools/fixtures/mirror/dists/trusty/restricted/binary-s390x/Packages.gz' | |||
503 | 30 | Binary files tools/fixtures/mirror/dists/trusty/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 73 | Binary files tools/fixtures/mirror/dists/trusty/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
504 | === added directory 'tools/fixtures/mirror/dists/trusty/universe' | |||
505 | === added directory 'tools/fixtures/mirror/dists/trusty/universe/binary-amd64' | |||
506 | === added file 'tools/fixtures/mirror/dists/trusty/universe/binary-amd64/Packages.gz' | |||
507 | 31 | Binary files tools/fixtures/mirror/dists/trusty/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 74 | Binary files tools/fixtures/mirror/dists/trusty/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
508 | === added directory 'tools/fixtures/mirror/dists/trusty/universe/binary-s390x' | |||
509 | === added file 'tools/fixtures/mirror/dists/trusty/universe/binary-s390x/Packages.gz' | |||
510 | 32 | Binary files tools/fixtures/mirror/dists/trusty/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 75 | Binary files tools/fixtures/mirror/dists/trusty/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/trusty/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
511 | === added directory 'tools/fixtures/mirror/dists/xenial' | |||
512 | === added directory 'tools/fixtures/mirror/dists/xenial/main' | |||
513 | === added directory 'tools/fixtures/mirror/dists/xenial/main/binary-amd64' | |||
514 | === added file 'tools/fixtures/mirror/dists/xenial/main/binary-amd64/Packages.gz' | |||
515 | 33 | Binary files tools/fixtures/mirror/dists/xenial/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 76 | Binary files tools/fixtures/mirror/dists/xenial/main/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/main/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
516 | === added directory 'tools/fixtures/mirror/dists/xenial/main/binary-s390x' | |||
517 | === added file 'tools/fixtures/mirror/dists/xenial/main/binary-s390x/Packages.gz' | |||
518 | 34 | Binary files tools/fixtures/mirror/dists/xenial/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 77 | Binary files tools/fixtures/mirror/dists/xenial/main/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/main/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
519 | === added directory 'tools/fixtures/mirror/dists/xenial/multiverse' | |||
520 | === added directory 'tools/fixtures/mirror/dists/xenial/multiverse/binary-amd64' | |||
521 | === added file 'tools/fixtures/mirror/dists/xenial/multiverse/binary-amd64/Packages.gz' | |||
522 | 35 | Binary files tools/fixtures/mirror/dists/xenial/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 78 | Binary files tools/fixtures/mirror/dists/xenial/multiverse/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/multiverse/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
523 | === added directory 'tools/fixtures/mirror/dists/xenial/multiverse/binary-s390x' | |||
524 | === added file 'tools/fixtures/mirror/dists/xenial/multiverse/binary-s390x/Packages.gz' | |||
525 | 36 | Binary files tools/fixtures/mirror/dists/xenial/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 79 | Binary files tools/fixtures/mirror/dists/xenial/multiverse/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/multiverse/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
526 | === added directory 'tools/fixtures/mirror/dists/xenial/restricted' | |||
527 | === added directory 'tools/fixtures/mirror/dists/xenial/restricted/binary-amd64' | |||
528 | === added file 'tools/fixtures/mirror/dists/xenial/restricted/binary-amd64/Packages.gz' | |||
529 | 37 | Binary files tools/fixtures/mirror/dists/xenial/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 80 | Binary files tools/fixtures/mirror/dists/xenial/restricted/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/restricted/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
530 | === added directory 'tools/fixtures/mirror/dists/xenial/restricted/binary-s390x' | |||
531 | === added file 'tools/fixtures/mirror/dists/xenial/restricted/binary-s390x/Packages.gz' | |||
532 | 38 | Binary files tools/fixtures/mirror/dists/xenial/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 81 | Binary files tools/fixtures/mirror/dists/xenial/restricted/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/restricted/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
533 | === added directory 'tools/fixtures/mirror/dists/xenial/universe' | |||
534 | === added directory 'tools/fixtures/mirror/dists/xenial/universe/binary-amd64' | |||
535 | === added file 'tools/fixtures/mirror/dists/xenial/universe/binary-amd64/Packages.gz' | |||
536 | 39 | Binary files tools/fixtures/mirror/dists/xenial/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ | 82 | Binary files tools/fixtures/mirror/dists/xenial/universe/binary-amd64/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/universe/binary-amd64/Packages.gz 2018-06-05 23:57:15 +0000 differ |
537 | === added directory 'tools/fixtures/mirror/dists/xenial/universe/binary-s390x' | |||
538 | === added file 'tools/fixtures/mirror/dists/xenial/universe/binary-s390x/Packages.gz' | |||
539 | 40 | Binary files tools/fixtures/mirror/dists/xenial/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ | 83 | Binary files tools/fixtures/mirror/dists/xenial/universe/binary-s390x/Packages.gz 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/dists/xenial/universe/binary-s390x/Packages.gz 2018-06-05 23:57:15 +0000 differ |
540 | === added directory 'tools/fixtures/mirror/pool' | |||
541 | === added directory 'tools/fixtures/mirror/pool/main' | |||
542 | === added directory 'tools/fixtures/mirror/pool/main/a' | |||
543 | === added directory 'tools/fixtures/mirror/pool/main/a/acct' | |||
544 | === added file 'tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu1_amd64.deb' | |||
545 | 41 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu1_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu1_amd64.deb 2018-06-05 23:57:15 +0000 differ | 84 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu1_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu1_amd64.deb 2018-06-05 23:57:15 +0000 differ |
546 | === added file 'tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu5_amd64.deb' | |||
547 | 42 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu5_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu5_amd64.deb 2018-06-05 23:57:15 +0000 differ | 85 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu5_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-1ubuntu5_amd64.deb 2018-06-05 23:57:15 +0000 differ |
548 | === added file 'tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_amd64.deb' | |||
549 | 43 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_amd64.deb 2018-06-05 23:57:15 +0000 differ | 86 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_amd64.deb 2018-06-05 23:57:15 +0000 differ |
550 | === added file 'tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_s390x.deb' | |||
551 | 44 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_s390x.deb 2018-06-05 23:57:15 +0000 differ | 87 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.5.5-2.1ubuntu1_s390x.deb 2018-06-05 23:57:15 +0000 differ |
552 | === added file 'tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_amd64.deb' | |||
553 | 45 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_amd64.deb 2018-06-05 23:57:15 +0000 differ | 88 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_amd64.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_amd64.deb 2018-06-05 23:57:15 +0000 differ |
554 | === added file 'tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_s390x.deb' | |||
555 | 46 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_s390x.deb 2018-06-05 23:57:15 +0000 differ | 89 | Binary files tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/a/acct/acct_6.6.4-1_s390x.deb 2018-06-05 23:57:15 +0000 differ |
556 | === added directory 'tools/fixtures/mirror/pool/main/s' | |||
557 | === added directory 'tools/fixtures/mirror/pool/main/s/s390-tools' | |||
558 | === added file 'tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.34.0-0ubuntu8_s390x.deb' | |||
559 | 47 | Binary files tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.34.0-0ubuntu8_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.34.0-0ubuntu8_s390x.deb 2018-06-05 23:57:15 +0000 differ | 90 | Binary files tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.34.0-0ubuntu8_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.34.0-0ubuntu8_s390x.deb 2018-06-05 23:57:15 +0000 differ |
560 | === added file 'tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.39.0-0ubuntu4_s390x.deb' | |||
561 | 48 | Binary files tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.39.0-0ubuntu4_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.39.0-0ubuntu4_s390x.deb 2018-06-05 23:57:15 +0000 differ | 91 | Binary files tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.39.0-0ubuntu4_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_1.39.0-0ubuntu4_s390x.deb 2018-06-05 23:57:15 +0000 differ |
562 | === added file 'tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_2.3.0-0ubuntu3_s390x.deb' | |||
563 | 49 | Binary files tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_2.3.0-0ubuntu3_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_2.3.0-0ubuntu3_s390x.deb 2018-06-05 23:57:15 +0000 differ | 92 | Binary files tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_2.3.0-0ubuntu3_s390x.deb 1970-01-01 00:00:00 +0000 and tools/fixtures/mirror/pool/main/s/s390-tools/s390-tools_2.3.0-0ubuntu3_s390x.deb 2018-06-05 23:57:15 +0000 differ |
564 | === added file 'tools/setup-archive-fixture-in-server.sh' | |||
565 | --- tools/setup-archive-fixture-in-server.sh 1970-01-01 00:00:00 +0000 | |||
566 | +++ tools/setup-archive-fixture-in-server.sh 2018-06-05 23:57:15 +0000 | |||
567 | @@ -0,0 +1,30 @@ | |||
568 | 1 | #!/bin/bash -e | ||
569 | 2 | # | ||
570 | 3 | # Goal: idempotent script to setup this server with an archive | ||
571 | 4 | # built from the test fixture. That is, a reduced set of manpages | ||
572 | 5 | # to just test the functionality of the tool. | ||
573 | 6 | # | ||
574 | 7 | # Notes: | ||
575 | 8 | # | ||
576 | 9 | # - This script should be run as root | ||
577 | 10 | # - This script should be created/structured so that | ||
578 | 11 | # it's idempotent | ||
579 | 12 | |||
580 | 13 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
581 | 14 | |||
582 | 15 | # Defining arch avoids shellcheck lint | ||
583 | 16 | ARCH="" | ||
584 | 17 | |||
585 | 18 | source "$DIR/../config" | ||
586 | 19 | mkdir -p "$DEBDIR" | ||
587 | 20 | |||
588 | 21 | # do this to avoid having to rm -rf whatever was in the mirror before I | ||
589 | 22 | # start. This seems the safest to avoid mistakingly blowing away | ||
590 | 23 | # someones mirror if they run this script accidently. It would instead | ||
591 | 24 | # just blow away the packages.gz files, which are fast to re-download. | ||
592 | 25 | cd -- "$DIR/fixtures/mirror" && find . -type f -exec sh -c ' | ||
593 | 26 | for x do | ||
594 | 27 | mkdir -p "$0/${x%/*}" | ||
595 | 28 | mv "$x" "$0/$x" | ||
596 | 29 | done | ||
597 | 30 | ' "$DEBDIR" {} + | ||
598 | 0 | 31 | ||
599 | === modified file 'tools/setup-in-server.sh' | |||
600 | --- tools/setup-in-server.sh 2018-05-23 19:48:06 +0000 | |||
601 | +++ tools/setup-in-server.sh 2018-06-05 23:57:15 +0000 | |||
602 | @@ -12,15 +12,7 @@ | |||
603 | 12 | 12 | ||
604 | 13 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 13 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
605 | 14 | 14 | ||
606 | 15 | apt update | ||
607 | 16 | |||
608 | 17 | # use apt-mirror to setup a "small" archive mirro for testing the local | ||
609 | 18 | # archive case, as this is how production is run. | ||
610 | 19 | apt install -y apache2 apt-mirror < /dev/null | ||
611 | 20 | |||
612 | 21 | cp -v "$DIR/../examples/mirror.list" /etc/apt/mirror.list | ||
613 | 22 | cp -v "$DIR/../examples/manpages-site.conf" /etc/apache2/sites-available/ | 15 | cp -v "$DIR/../examples/manpages-site.conf" /etc/apache2/sites-available/ |
614 | 23 | ln -sf /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/ ../ubuntu | ||
615 | 24 | 16 | ||
616 | 25 | a2ensite manpages-site | 17 | a2ensite manpages-site |
617 | 26 | a2enmod cgi | 18 | a2enmod cgi |
618 | 27 | 19 | ||
619 | === added file 'tools/update-fixtures.sh' | |||
620 | --- tools/update-fixtures.sh 1970-01-01 00:00:00 +0000 | |||
621 | +++ tools/update-fixtures.sh 2018-06-05 23:57:15 +0000 | |||
622 | @@ -0,0 +1,68 @@ | |||
623 | 1 | #!/bin/bash -e | ||
624 | 2 | # | ||
625 | 3 | #TODO: CLEANUP | ||
626 | 4 | # Goal: idempotent script to setup this server with an archive | ||
627 | 5 | # built from the test fixture. That is, a reduced set of manpages | ||
628 | 6 | # to just test the functionality of the tool. | ||
629 | 7 | # | ||
630 | 8 | # Notes: | ||
631 | 9 | # | ||
632 | 10 | # - This script should be run as root | ||
633 | 11 | # - This script should be created/structured so that | ||
634 | 12 | # it's idempotent | ||
635 | 13 | |||
636 | 14 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
637 | 15 | MIRROR="$DIR/fixtures/mirror" | ||
638 | 16 | PORTS="http://ports.ubuntu.com" | ||
639 | 17 | |||
640 | 18 | # Keeps shellcheck happy | ||
641 | 19 | ARCH="" | ||
642 | 20 | source "$DIR/../config" | ||
643 | 21 | |||
644 | 22 | # - multi-arch (s390-tools) - TODO: this makes a lot of manpages, maybe | ||
645 | 23 | # slim down? | ||
646 | 24 | # - something in main (acct) | ||
647 | 25 | PACKAGES="powerpc-ibm-utils acct s390-tools" | ||
648 | 26 | |||
649 | 27 | # Download packages for all combinations. Note, some packages are not | ||
650 | 28 | # in all pockets, so don't fail on download errors. | ||
651 | 29 | for distro in $DISTROS; do | ||
652 | 30 | for repo in $REPOS; do | ||
653 | 31 | for arch in $ARCH; do | ||
654 | 32 | |||
655 | 33 | path="dists/$distro/$repo/binary-$arch" | ||
656 | 34 | packagesgz="$path/Packages.gz" | ||
657 | 35 | mkdir -p "$MIRROR/$path" | ||
658 | 36 | if [ "$arch" == "amd64" ]; then | ||
659 | 37 | site="$ARCHIVE" | ||
660 | 38 | else | ||
661 | 39 | site="$PORTS" | ||
662 | 40 | fi | ||
663 | 41 | echo "$site/$packagesgz" | ||
664 | 42 | curl -s "$site/$packagesgz" -o "$MIRROR/$packagesgz" | ||
665 | 43 | |||
666 | 44 | for package in $PACKAGES; do | ||
667 | 45 | filename=$(gunzip -c "$MIRROR/$packagesgz" \ | ||
668 | 46 | | egrep "(^Filename: |^Package: )" \ | ||
669 | 47 | | sed 'N;s/\n/ /' \ | ||
670 | 48 | | grep "Package: $package " \ | ||
671 | 49 | | awk '{ print $4 }') | ||
672 | 50 | if [ -n "$filename" ]; then | ||
673 | 51 | echo " - [$package]: $site/$filename" | ||
674 | 52 | curl -fs "$site/$filename" \ | ||
675 | 53 | -o "$MIRROR/$path/$filename" \ | ||
676 | 54 | --create-dirs | ||
677 | 55 | fi | ||
678 | 56 | done | ||
679 | 57 | (cd "$MIRROR/$path"; dpkg-scanpackages . | gzip -cn > Packages.gz) | ||
680 | 58 | (cd -- "$MIRROR/$path" && | ||
681 | 59 | find . -type f -name '*.deb' -exec sh -c ' | ||
682 | 60 | for x do | ||
683 | 61 | mkdir -p "$0/${x%/*}" | ||
684 | 62 | mv "$x" "$0/$x" | ||
685 | 63 | done | ||
686 | 64 | ' "$MIRROR" {} +) | ||
687 | 65 | rm -rf "$MIRROR/$path/pool" | ||
688 | 66 | done | ||
689 | 67 | done | ||
690 | 68 | done | ||
691 | 0 | 69 | ||
692 | === added file 'tools/update-microsite-container.sh' | |||
693 | --- tools/update-microsite-container.sh 1970-01-01 00:00:00 +0000 | |||
694 | +++ tools/update-microsite-container.sh 2018-06-05 23:57:15 +0000 | |||
695 | @@ -0,0 +1,35 @@ | |||
696 | 1 | #!/bin/bash -e | ||
697 | 2 | # | ||
698 | 3 | # Goal: create a small microsite in a container from this branch | ||
699 | 4 | # | ||
700 | 5 | # Notes: | ||
701 | 6 | # | ||
702 | 7 | # - A new container will be created each time. | ||
703 | 8 | # - This script should be run as root | ||
704 | 9 | # - Your code will be copied into the microsite | ||
705 | 10 | |||
706 | 11 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
707 | 12 | NAME=${MICROSITE_CONTAINER:-manpages-microsite} | ||
708 | 13 | SITE_PATH=/srv/manpages.ubuntu.com | ||
709 | 14 | |||
710 | 15 | if ! lxc info "$NAME" 2>/dev/null; then | ||
711 | 16 | echo "-------------------------------------------" | ||
712 | 17 | echo "Error: Existing container not found: $NAME" | ||
713 | 18 | echo "Run 'make microsite-container' first" | ||
714 | 19 | echo "-------------------------------------------" | ||
715 | 20 | exit 1 | ||
716 | 21 | fi | ||
717 | 22 | |||
718 | 23 | tar cf - "$DIR/../" | lxc exec "$NAME" -- tar xvf - -C "$SITE_PATH" | ||
719 | 24 | lxc exec "$NAME" -- sh -c "cd $SITE_PATH; make deps manpage-repo" | ||
720 | 25 | |||
721 | 26 | echo "--------" | ||
722 | 27 | echo "Summary:" | ||
723 | 28 | echo "--------" | ||
724 | 29 | echo "" | ||
725 | 30 | lxc list "$NAME" | ||
726 | 31 | |||
727 | 32 | IP=$(lxc info "$NAME" |grep eth0: |grep -v inet6 | awk '{ print $3 }') | ||
728 | 33 | echo "" | ||
729 | 34 | echo "Site URL: http://$IP:8080" | ||
730 | 35 | echo " * Try searching for 'ac'" | ||
731 | 0 | 36 | ||
732 | === modified file 'www/assets/light/css/styles.css' | |||
733 | --- www/assets/light/css/styles.css 2012-12-28 19:54:23 +0000 | |||
734 | +++ www/assets/light/css/styles.css 2018-06-05 23:57:15 +0000 | |||
735 | @@ -7,6 +7,9 @@ | |||
736 | 7 | margin: 0px; | 7 | margin: 0px; |
737 | 8 | padding: 0px; | 8 | padding: 0px; |
738 | 9 | } | 9 | } |
739 | 10 | pre { | ||
740 | 11 | font-family: "Ubuntu Mono", "Andale Mono", "DejaVu Sans Mono", monospace; | ||
741 | 12 | } | ||
742 | 10 | #container { | 13 | #container { |
743 | 11 | background: #f7f6f5; | 14 | background: #f7f6f5; |
744 | 12 | margin: 0px auto 20px; | 15 | margin: 0px auto 20px; |
745 | @@ -260,6 +263,9 @@ | |||
746 | 260 | #subheader ul li a:hover { | 263 | #subheader ul li a:hover { |
747 | 261 | color: #772953; | 264 | color: #772953; |
748 | 262 | } | 265 | } |
749 | 266 | #subheader ul li.current { | ||
750 | 267 | font-weight: bold; | ||
751 | 268 | } | ||
752 | 263 | #subheader ul li a, #subheader ul li span, #subheader ul li input { | 269 | #subheader ul li a, #subheader ul li span, #subheader ul li input { |
753 | 264 | padding: 12px 8px 0; | 270 | padding: 12px 8px 0; |
754 | 265 | display: block; | 271 | display: block; |
755 | 266 | 272 | ||
756 | === modified file 'www/functions.js' | |||
757 | --- www/functions.js 2018-05-24 20:05:50 +0000 | |||
758 | +++ www/functions.js 2018-06-05 23:57:15 +0000 | |||
759 | @@ -99,13 +99,13 @@ | |||
760 | 99 | versions.push({"name":"artful", "number":"17.10"}); | 99 | versions.push({"name":"artful", "number":"17.10"}); |
761 | 100 | versions.push({"name":"bionic", "number":"18.04 LTS"}); | 100 | versions.push({"name":"bionic", "number":"18.04 LTS"}); |
762 | 101 | for (var i=0; i<versions.length; i++) { | 101 | for (var i=0; i<versions.length; i++) { |
770 | 102 | if (location.href.match("\.html$")) { | 102 | if (location.href.match("\.html$")) { |
771 | 103 | href = location.href; | 103 | href = location.href; |
772 | 104 | href = href.replace(/\/manpages\/[^\/]*/, "/manpages/" + versions[i]["name"]); | 104 | href = href.replace(/\/manpages\/[^\/]*/, "/manpages/" + versions[i]["name"]); |
773 | 105 | document.write("<li class=\"active\" id=\"" + highlight(versions[i]["name"]) + "\"><a href=\"" + href + "\">" + versions[i]["number"] + "</a></li>"); | 105 | document.write("<li class=\"active " + highlight(versions[i]["name"]) + "\"><a href=\"" + href + "\">" + versions[i]["number"] + "</a></li>"); |
774 | 106 | } else { | 106 | } else { |
775 | 107 | document.write("<li id=\"" + highlight(versions[i]["name"]) + "\"><a href=\"/manpages/" + versions[i]["name"] + "\">" + versions[i]["number"] + "</a></li>"); | 107 | document.write("<li class=\"" + highlight(versions[i]["name"]) + "\"><a href=\"/manpages/" + versions[i]["name"] + "\">" + versions[i]["number"] + "</a></li>"); |
776 | 108 | } | 108 | } |
777 | 109 | } | 109 | } |
778 | 110 | document.write("<li><a href=\"javascript:printManpage()\"><img src=/img/printer.png></a></li>"); | 110 | document.write("<li><a href=\"javascript:printManpage()\"><img src=/img/printer.png></a></li>"); |
779 | 111 | document.write("</ul>"); | 111 | document.write("</ul>"); |