Commit Graph

151 Commits

Author SHA1 Message Date
0883ac6423 Fix whitespace and indentation, per pep8 2019-01-17 20:47:43 +01:00
87237f6536 Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
2019-01-17 15:35:39 +01:00
e62309a391 Fix typos in comments
Review by Stephen Frost and Jonathan S. Katz
Discussion: https://postgr.es/m/6EEB2B47-D274-4E65-83B1-2EF8C917C55F%40yesql.se
2018-12-04 21:51:08 +01:00
e934d32251 Update purge hook for non-template updates
For /media/ changes, generate a classic purge based on the URL. For
anything tha'ts not templates *or* media, just don't generate any purges
at all (of course).
2018-07-16 11:31:21 +02:00
2d18abd401 Add a purgehook script that will auto-purge pages on git push
This will integrate with the gitdeployer script to automatically purge
pages using specific templates using the xkeys that were added some time
ago.
2018-07-16 11:10:42 +02:00
76900b7657 Teach varnish purging code about xkey purges
It's just another  type of purge, so it's added as an extra option with
'K' as the key (as 'X' was already taken).
2018-07-06 15:32:14 +02:00
6e89d2fb66 Turn off tidy indent on docs older than 11
It seems the newer tidy in Debian Stretch breaks with the output from
the old docs toolchain, causing indention to happen inside <pre> blocks
which clearly breaks rendering.

Turn it off for thos, but keep it enabled for version 11 and up (at this
point that's just dev), because the output becomes a lot easier to read
when trying to debug things.
2018-04-03 15:04:47 +02:00
bc701e9ff4 Update scrubbing script for new reality 2018-04-02 12:31:41 +02:00
0fccb6a154 Fix "RedHat" type and add instructions for the SUSE rpm repository.
Patches by Devrim Gündüz on pgsql-www.
2018-02-15 18:52:02 +01:00
4339b112d0 Fix yum spider for versions with >1 repo rpm
The code was supposed to pick the latest version of the repo rpm in this
scenario, but at some point the data structure was updated and the code
was not, so it ended up actually picking the *oldest* version of the
repo rpm.
2018-02-15 16:34:50 +01:00
7ed70f1067 Add a createuser callback for cauth django plugin
This callback can prevent new users from being created based on specific
criteria. The plugin is defined in settings.py, so it can be any python
code. For example, it can look up in a specific table if this user is
supposed to be allowed to log in at all.
2018-01-13 18:14:13 +01:00
79659ae1dc Add ability to import user to django cauth example
This has been in used around a number of community sites already,
backpatch it into the upstream master.
2018-01-13 18:11:21 +01:00
38ff645d5d Add possibility to turn off django cauth using settings in sample
This sample is used across most of our other sites, so add functionality
to install without having a local master repo.

Back-patch of pgeu commit 3e4d8c9101c2d309b134c2f5638aa40db8ef2cf5
2018-01-13 18:09:27 +01:00
4ce8184e65 Explicitly exclude urls with .. in search crawling
There were per-site configured rules defined but the regexp was slightly
incorrectly defined. However, we should just simply never crawl urls
like this unless they are normalized, so for now just add them to the
hardcoded exclusion rules.
2017-11-08 12:04:36 -05:00
b8c353ac28 Spider fedora versions up to 30
No need for us to update this script on every new Fedora release. If we
don't have packages for them, they just won't be found.
2017-10-13 13:10:23 +02:00
4697ceb007 Automate supported versions in yum download scripts
We do this by always spidering every repo rpm available (since the ftp
server doesn't know about supported versions), and then filtering which
versions are shown in the dropdown instead. Given the small number of
versions of either kind, this doesn't make a material difference in the
size of the files anyway.
2017-10-09 12:51:33 +02:00
ebb16b80f5 Need to spider v10 yum files 2017-10-06 09:37:12 +02:00
69672dd195 Add proper tsearch configuration for site search as well
It was previously only on archives search
2017-05-26 10:31:52 -04:00
d09fde9ba3 Add function to spider reporpms from the yum repo
The ftp server can then submit a list (and structure) of which platforms
are supported for yum downloads, which can then later (in a separate
commit) be used to generate a nicer download for yum repo rpms.
2017-05-24 13:48:04 -04:00
ad33b3bb50 Remove left-over debugginng code
Commented out, but should be removed anyway.
2017-05-02 10:44:55 +02:00
afe95ae2fd Strip trailing slashes from symlinks
This avoids double slashes and issues they cause in the ftp browser.

Daniel Gustafsson
2017-05-02 10:40:51 +02:00
38a9d1bf2f Fix old typo in function name 2017-04-02 16:48:27 +02:00
d9744cba44 First stab at supporting https for generic sites
Previously only the main website search supported it, which was less
than great for community sites that are now https only.
2017-04-02 16:47:02 +02:00
3408963404 Set textsearch weight on the title of a page 2017-04-02 15:26:36 +02:00
7d46e18363 Explicitly specify the tsearch configuration to use
The main reason this didn't work before was because of server dictionary
configuration, not because of the code. But make it explicit so we're
not relying on session level settings.
2017-04-02 15:15:21 +02:00
1ff67bd26e Seems we'v ebroken the "pg" fts config, so disable temporarily 2017-03-23 17:15:58 +01:00
1d6aae3d56 Add support for searching in internal pages
In particular, this re-enables the ability to search in the developer
docs
2017-03-23 17:03:56 +01:00
67d35fca30 New column is isinternal, not internal 2017-03-23 16:43:12 +01:00
42e64878bf Move a bunch of initialization to the parse step
We probably need to clean up more internal state in expat between the
calls.
2017-03-23 16:39:03 +01:00
7edb14284d Teach search crawler about internal sitemap
We only support it for our main website, which uses a sitemap, so
implement it only for that provider. And always probe
sitemap_internal.xml, since we don't even try to access any external
sites on it.
2017-03-23 16:31:39 +01:00
3ba7ead866 Disable clean flag in tidy calls on new XML based docs build
Let's see if this cleans up some unintentional formatting
2017-02-18 14:09:57 +01:00
ab0ee30881 Support loading docs in utf-8 from pg version 10 2016-11-16 13:00:50 +01:00
b17340acf1 Add missing import 2016-05-25 15:48:01 +02:00
06b5c6fc11 More ssl for the crawler - don̈́'t verify server cert
We'll fix verification later, but for now since we're working on a
hardcoded local IP, we don't consider it important.
2016-05-25 15:47:21 +02:00
ff9e0dade6 More https fixes for search crawler 2016-05-25 15:43:54 +02:00
390bca1188 Update for https
Uncommented "add length 7" to array deindex seems to have come from it
being the length of http://. Now changed to https://, so change the
length as well, and properly comment it.
2016-05-25 15:37:32 +02:00
270da4d5df Issue purges over https 2016-05-24 21:46:55 +02:00
a126594260 Update sitemap URLs for https 2016-05-24 21:13:00 +02:00
948e6670eb Avoid returning NULL in nagios monitor 2016-05-14 20:42:27 +02:00
75edb3813c Simplify update script now that we're on uwsgi 2016-05-14 20:17:14 +02:00
795aca1531 Remove old migrate commands, not been used for years 2016-05-14 19:49:13 +02:00
f3e1a189b4 Move django-inteacting tools to be management commands
Much easier to execute them in the correct environment now that we have
proper management commands in django.
2016-05-14 19:49:13 +02:00
350b936e58 Prefix cross-application imports with pgweb
As required by the new project layout.
2016-05-14 19:49:12 +02:00
2f8bbc40dd Replace pgq with trivial local queue implementation
The queue used for varnish purges has so few entries that it's really
not worth paying the management overhead for skytools/pgq. Instead we
can use a very simple local deamon using LISTEN/NOTIFY to fire them off.

Now include a proper nagios plugin in this package, so we can get rid
of the not-very-nice munin plugin currently used in the deployment.
2016-05-14 19:49:12 +02:00
b8dd050611 Fix typo 2016-03-15 09:58:38 +00:00
c1e2ce22d6 Go back to using direct psycopg2 for docs loading
This removes the dependency on django from docload, facilitating
incremental upgrades of the infrastructure.

This now requires a new docload.ini file in the tools/docs directory,
with a section "db" and a setting "dsn".
2016-01-29 12:45:48 +01:00
51c10ee9df Replace simpljson imports with json
This has been in standard python since 2.6, and we don't really care
about supporting anything older than that (even our old and soon to
be upgraded environments use 2.7)
2015-12-12 17:44:22 +01:00
f93354eb00 users_keys is a view in production.. 2015-10-07 15:54:25 +02:00
48162b1c2c Drop objects in the correct order.. 2015-10-07 15:53:36 +02:00
b74c693b1e Also get rid of old users_keys table 2015-10-06 15:00:24 +02:00