1 |
commit: 0b27bd3a16618c0e4ac55dc02b15d961115ef7cd |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 18 23:19:10 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 18 23:19:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=0b27bd3a |
7 |
|
8 |
Update genpatches site generation |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
scripts/gpdoweb | 2 +- |
13 |
web/content/about.html | 3 ++- |
14 |
web/gentoo_sources_web.pm | 3 ++- |
15 |
web/makesite.pl | 34 +++++++++++++++++++++++----------- |
16 |
4 files changed, 28 insertions(+), 14 deletions(-) |
17 |
|
18 |
diff --git a/scripts/gpdoweb b/scripts/gpdoweb |
19 |
index 4cfd951..feb2240 100755 |
20 |
--- a/scripts/gpdoweb |
21 |
+++ b/scripts/gpdoweb |
22 |
@@ -4,7 +4,7 @@ |
23 |
|
24 |
# calling make site |
25 |
cd ${WEB_LOCAL} |
26 |
-./makesite.pl |
27 |
+./makesite.pl ${USERNAME} |
28 |
if [ $? -eq 0 ]; then |
29 |
exit 1 |
30 |
fi |
31 |
|
32 |
diff --git a/web/content/about.html b/web/content/about.html |
33 |
index 6959cc1..3b0afde 100644 |
34 |
--- a/web/content/about.html |
35 |
+++ b/web/content/about.html |
36 |
@@ -1,8 +1,9 @@ |
37 |
<div class="container"> |
38 |
<div class="row"> |
39 |
<div id="content" class="col-md-12"> |
40 |
- <h1>What is genpatches?<br/><br/> |
41 |
+ <h1>What is genpatches?<br/> |
42 |
<small>A brief description of the package, and details about our patching and release policy.</small></h1> |
43 |
+ <br/> |
44 |
|
45 |
<div class="newsitem-content"> |
46 |
<p>genpatches is a patchset applied to many of Gentoo's Linux kernel packages. It |
47 |
|
48 |
diff --git a/web/gentoo_sources_web.pm b/web/gentoo_sources_web.pm |
49 |
index b0923db..a6b419a 100644 |
50 |
--- a/web/gentoo_sources_web.pm |
51 |
+++ b/web/gentoo_sources_web.pm |
52 |
@@ -113,10 +113,11 @@ sub html_header { |
53 |
|
54 |
sub html_footer { |
55 |
local *FD = shift; |
56 |
+ my $USERNAME = shift; |
57 |
my $date = `date`; |
58 |
my $user = `whoami`; |
59 |
|
60 |
- print FD '<hr /><div align="right"><h4>Automatically generated: '.$date.' by '.$user.'</h4></div>'; |
61 |
+ print FD '<hr /><div align="right"><h4>Automatically generated: '.$date.' by '.$USERNAME.'</h4></div>'; |
62 |
print FD '</body>'; |
63 |
print FD '</html>'; |
64 |
} |
65 |
|
66 |
diff --git a/web/makesite.pl b/web/makesite.pl |
67 |
index 0bb3cc2..328d64c 100755 |
68 |
--- a/web/makesite.pl |
69 |
+++ b/web/makesite.pl |
70 |
@@ -17,6 +17,8 @@ use Sort::Versions; |
71 |
# print out arguments for easier debugging |
72 |
print "makesite.pl called with arguments: @ARGV \n"; |
73 |
|
74 |
+$USERNAME = shift; |
75 |
+ |
76 |
if (!precheck()) { |
77 |
exit 0; |
78 |
} |
79 |
@@ -44,7 +46,7 @@ sub make_index_page { |
80 |
open(FD, '> '.$output_path.'/index.html'); |
81 |
html_header *FD; |
82 |
include_content *FD, 'sitemap'; |
83 |
- html_footer *FD; |
84 |
+ html_footer *FD,$USERNAME; |
85 |
close(FD); |
86 |
} |
87 |
|
88 |
@@ -54,7 +56,7 @@ sub make_about_page { |
89 |
open(FD, '> '.$output_path.'/about.html'); |
90 |
html_header *FD; |
91 |
include_content *FD, 'about'; |
92 |
- html_footer *FD; |
93 |
+ html_footer *FD,$USERNAME; |
94 |
close(FD); |
95 |
} |
96 |
|
97 |
@@ -63,11 +65,14 @@ sub make_faq_page { |
98 |
print ">> Making FAQ page\n"; |
99 |
open(FD, '> '.$output_path.'/faq.html'); |
100 |
html_header *FD; |
101 |
+ print FD '<div class="container"><div class="row"><div id="content" class="col-md-12">'; |
102 |
print FD '<h1>Frequently Asked Questions</h1>'; |
103 |
+ print FD '<div class="newsitem-content">'; |
104 |
opendir(DIR, 'content/faq'); |
105 |
include_faq *FD, $_ foreach grep { -f "content/faq/$_" } sort readdir DIR; |
106 |
closedir(DIR); |
107 |
- html_footer *FD; |
108 |
+ print FD '</div></div></div>'; |
109 |
+ html_footer *FD,$USERNAME; |
110 |
close(FD); |
111 |
} |
112 |
|
113 |
@@ -76,8 +81,12 @@ sub make_bugs_page { |
114 |
print ">> Making bugs page\n"; |
115 |
open(FD, '> '.$output_path.'/bugs.html'); |
116 |
html_header *FD; |
117 |
+ print FD '<div class="container"><div class="row"><div id="content" class="col-md-12">'; |
118 |
+ print FD '<h1>Kernel Troubleshooting</h1>'; |
119 |
+ print FD '<div class="newsitem-content">'; |
120 |
include_content *FD, 'bugs'; |
121 |
- html_footer *FD; |
122 |
+ print FD '</div></div></div>'; |
123 |
+ html_footer *FD,$USERNAME; |
124 |
close(FD); |
125 |
} |
126 |
|
127 |
@@ -87,7 +96,7 @@ sub make_issues_page { |
128 |
open(FD, '> '.$output_path.'/issues.html'); |
129 |
html_header *FD; |
130 |
generate_issues_index(FD); |
131 |
- html_footer *FD; |
132 |
+ html_footer *FD,$USERNAME; |
133 |
close(FD); |
134 |
|
135 |
generate_issues_current(); |
136 |
@@ -146,7 +155,7 @@ sub generate_issues_current { |
137 |
} |
138 |
closedir(DIR); |
139 |
|
140 |
- html_footer *FD; |
141 |
+ html_footer *FD,$USERNAME; |
142 |
close(FD); |
143 |
} |
144 |
|
145 |
@@ -172,7 +181,7 @@ sub generate_issues_resolved { |
146 |
} |
147 |
closedir(DIR); |
148 |
|
149 |
- html_footer *FD; |
150 |
+ html_footer *FD,$USERNAME; |
151 |
close(FD); |
152 |
} |
153 |
|
154 |
@@ -212,7 +221,7 @@ sub make_kernels_page { |
155 |
} |
156 |
|
157 |
print FD '</table>'; |
158 |
- html_footer *FD; |
159 |
+ html_footer *FD,$USERNAME; |
160 |
close(FD); |
161 |
} |
162 |
|
163 |
@@ -287,7 +296,9 @@ sub make_releases_index { |
164 |
|
165 |
open(INDEX, '> '.$webscript_path.'/output/releases.html'); |
166 |
html_header(INDEX, 'genpatches Releases'); |
167 |
+ print INDEX '<div class="container"><div class="row"><div id="content" class="col-md-12">'; |
168 |
print INDEX '<h1>genpatches Releases</h1>'; |
169 |
+ print INDEX '<div class="newsitem-content">'; |
170 |
|
171 |
foreach $kernel (sort keys %kernels) { |
172 |
print("kernel: $kernel\n"); |
173 |
@@ -301,11 +312,12 @@ sub make_releases_index { |
174 |
foreach (grep { /^$kernel-/ } sort mysort @infopages) { |
175 |
include_generated(FILE, $_); |
176 |
} |
177 |
- html_footer(FILE); |
178 |
+ print FD '</div></div></div>'; |
179 |
+ html_footer(FILE,$USERNAME); |
180 |
close(FILE); |
181 |
} |
182 |
|
183 |
- html_footer(INDEX); |
184 |
+ html_footer(INDEX,$USERNAME); |
185 |
close (INDEX); |
186 |
closedir(DIR); |
187 |
|
188 |
@@ -338,7 +350,7 @@ sub generate_patchlist { |
189 |
print PATCHLIST '</tr>'; |
190 |
} |
191 |
print PATCHLIST '</table>'; |
192 |
- html_footer(PATCHLIST); |
193 |
+ html_footer(PATCHLIST,$USERNAME); |
194 |
close(PATCHLIST); |
195 |
} |