From bc19dfe0a0b7f9a60c6b5487c0f3927e27ff81cb Mon Sep 17 00:00:00 2001 From: Liraz Siri Date: Tue, 25 Aug 2026 06:11:17 +0000 Subject: [PATCH 1/3] Port Foswiki appliance to Trixie Move the appliance to Debian 13 and the maintained Foswiki 2.1.11 security release. Pin and verify the official release digest, and generate LocalSite.cfg from the current upstream schema so stale configuration does not block the build. Preserve web-server ownership of the firstboot password file, restore documented scheduled maintenance, and add focused acceptance coverage for administrator login, CSRF-protected topic persistence, inherited services, and the supported update channel. Verified in a disposable Trixie environment with the real configure and firstboot paths, Apache HTTPS, administrator authentication, topic create/read persistence, and all three maintenance commands. Static shell, Python, and diff checks also pass. --- README.rst | 11 +- changelog | 16 + conf.d/downloads | 14 +- conf.d/main | 3 +- docs/v19.0-testing.md | 57 ++ overlay/etc/cron.d/foswiki | 3 + .../usr/lib/inithooks/firstboot.d/40foswiki | 2 +- overlay/var/www/foswiki/lib/LocalSite.cfg | 676 ------------------ tests/v19.sh | 130 ++++ 9 files changed, 220 insertions(+), 692 deletions(-) create mode 100644 docs/v19.0-testing.md create mode 100644 overlay/etc/cron.d/foswiki delete mode 100644 overlay/var/www/foswiki/lib/LocalSite.cfg create mode 100755 tests/v19.sh diff --git a/README.rst b/README.rst index 05a48fe..d238d71 100644 --- a/README.rst +++ b/README.rst @@ -11,9 +11,10 @@ and on top of that: - Foswiki configurations: - - Installed from upstream source code to /var/www/foswiki. - - Configured cron jobs (daily maintenance, hourly stats, 15min - notifications). + - Foswiki 2.1.11 is installed from the official release archive to + /var/www/foswiki. The archive SHA-256 published in the upstream release + metadata is verified during the build. + - Configured nightly maintenance, notifications and statistics jobs. - Preconfigured mail settings. **Security note**: Updates to Foswiki may require supervision so @@ -28,12 +29,12 @@ and on top of that: password recovery). - Webmin modules for configuring Apache2 and Postfix. -WebMasterEmail is configured in */etc/foswiki/LocalSite.cfg* +WebMasterEmail is configured in */var/www/foswiki/lib/LocalSite.cfg* Credentials *(passwords set at first boot)* ------------------------------------------- -- Webmin, Webshell, SSH: username **root** +- Webmin, SSH: username **root** - Foswiki: username **admin** .. _Foswiki: https://foswiki.org diff --git a/changelog b/changelog index 4ed235b..58e8b3b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,19 @@ +turnkey-foswiki-19.0 (1) turnkey; urgency=low + + * Upgrade the appliance base to Debian 13 Trixie and Perl 5.40. + + * Install the current Foswiki 2.1.11 security release and verify its + upstream release archive digest during the build. + + * Generate the Foswiki configuration from the current release schema, + remove an obsolete jQuery setting and preserve web-server ownership of + the firstboot password file. + + * Add nightly maintenance, notification and statistics jobs plus focused + runtime acceptance for administrator login and wiki topic persistence. + + -- TurnKey GNU/Linux Tue, 25 Aug 2026 05:55:00 +0000 + turnkey-foswiki-18.0 (1) turnkey; urgency=low * Install latest version of foswiki: 2.1.8 diff --git a/conf.d/downloads b/conf.d/downloads index 845da4a..cfd0b97 100755 --- a/conf.d/downloads +++ b/conf.d/downloads @@ -6,13 +6,11 @@ dl() { } SRC="/usr/local/src" - -TMP_FILE=$(mktemp) -GH_API=https://api.github.com/repos/foswiki/distro/releases/latest -curl -s $GH_API > $TMP_FILE -LATEST_TAG=$(cat $TMP_FILE | grep -oP '"tag_name": "\K(.*)(?=")') -LATEST_FILE="$(cat $TMP_FILE | grep -oP -m 1 '"name": "\K(.*)(?=")' | tr ' ' '-').tgz" -rm -f $TMP_FILE -URL="https://github.com/foswiki/distro/releases/download/$LATEST_TAG/$LATEST_FILE" +VERSION=2.1.11 +TAG=FoswikiRelease02x01x11 +FILE=Foswiki-$VERSION.tgz +SHA256=3a490eb460db4ca69d73dfe44c7984889552e5313eff60162760e80e66e5eba6 +URL="https://github.com/foswiki/distro/releases/download/$TAG/$FILE" dl $URL $SRC +echo "$SHA256 $SRC/$FILE" | sha256sum --check diff --git a/conf.d/main b/conf.d/main index b781a4d..4977086 100755 --- a/conf.d/main +++ b/conf.d/main @@ -13,8 +13,7 @@ $CONFIG -noprompt # auto default config (writes config as root) $CONFIG -set {EnableEmail}='1' \ -set {Email}{MailMethod}='MailProgram' \ -set {MailProgram}='/usr/sbin/sendmail -t -oi -oeq' \ - -set {SafeEnvPath}='/usr/local/bin:/usr/bin:/bin' \ - -set {JQueryPlugin}{JQueryVersionForOldIEs}='' + -set {SafeEnvPath}='/usr/local/bin:/usr/bin:/bin' # ensure that configure.log is owned by www-data touch $WEBROOT/working/logs/configure.log diff --git a/docs/v19.0-testing.md b/docs/v19.0-testing.md new file mode 100644 index 0000000..edd1a35 --- /dev/null +++ b/docs/v19.0-testing.md @@ -0,0 +1,57 @@ +# Foswiki 19.0 testing + +## Scope and dependency decision + +Debian 13 Trixie does not package Foswiki. The appliance installs official +Foswiki 2.1.11, a maintained upstream security release published in March +2026. The build pins SHA-256 +`3a490eb460db4ca69d73dfe44c7984889552e5313eff60162760e80e66e5eba6` +from the official GitHub release metadata. Perl 5.40, Apache, RCS and Perl +dependencies come from signed Debian Trixie repositories. + +## Acceptance command + +```sh +/sandboxed-git/turnkey/tools/test-v19-appliance foswiki \ + --source /home/agent/.local/worktrees/turnkey-apps/foswiki/wish-foswiki-v19-trixie +``` + +## README crosswalk + +| README contract | Focused check | Required result | Evidence | +| --- | --- | --- | --- | +| Foswiki provides a structured wiki | Log in through the real CSRF-protected form, create a topic through the edit/save CGI flow and read its rendered page | The firstboot administrator authenticates and the new content renders | `tests/v19.sh` | +| Topic history and state are file-backed | Read the new topic file and Foswiki event log | The content persists and Foswiki records the administrator save | `tests/v19.sh` | +| SSL works out of the box | Exercise login and topic creation through Apache HTTPS | All application requests succeed at the firstboot URL | `tests/v19.sh` | +| Scheduled maintenance is configured | Validate and invoke session cleanup, mail notification and statistics commands as `www-data` | Every documented cron command exits successfully under the web identity | `tests/v19.sh` | +| Postfix supports Foswiki mail | Require active service state and inspect its listener | SMTP is bound to loopback | `tests/v19.sh` | +| Webmin manages Apache | Require the module and request Webmin HTTPS | The module is installed and Webmin answers on port 12321 | `tests/v19.sh` | +| Foswiki has a maintained update path | Query the official stable release endpoint and compare it with Foswiki runtime metadata | The current stable version matches the installed release without changing files | `tests/v19.sh` | +| Standard TurnKey administration is inherited from Core | Cite the unchanged Core layer | Core 19 baseline passes | Core run `20260824t010251z-1634-32241`, source `24c82ee3540ce545422742b0e28ba6b687c53ec2`, verdict `PASS` | + +## Static and economical preflight checks + +```sh +bash -n conf.d/downloads conf.d/main tests/v19.sh \ + overlay/usr/lib/inithooks/firstboot.d/20regen-foswiki-secrets \ + overlay/usr/lib/inithooks/firstboot.d/40foswiki +python3 -m py_compile overlay/usr/lib/inithooks/bin/foswiki.py +git diff --check +``` + +A disposable Debian Trixie container installed the release on Perl 5.40, +generated the current configuration, served Foswiki through Apache, logged in +as the configured administrator and created a topic through the real web +edit/save flow. The rendered page, underlying topic file and event log all +confirmed the write. The maintenance and notification commands also ran as +`www-data`. + +## Known limitation and deferred issues + +- Docker runtime validation does not exercise the installer, appliance + kernel, bootloader or physical hardware. Foswiki adds no appliance-specific + behavior at those boundaries, so the validated Core 19 baseline supplies + inherited evidence. +- The statistics job runs nightly, but Foswiki only writes a web statistics + topic after an administrator creates one or enables automatic creation. + This is upstream default behavior and does not affect wiki editing. diff --git a/overlay/etc/cron.d/foswiki b/overlay/etc/cron.d/foswiki new file mode 100644 index 0000000..c61426a --- /dev/null +++ b/overlay/etc/cron.d/foswiki @@ -0,0 +1,3 @@ +15 0 * * * www-data perl -I /var/www/foswiki/bin /var/www/foswiki/tools/tick_foswiki.pl >/dev/null 2>&1 +30 0 * * * www-data perl -I /var/www/foswiki/bin /var/www/foswiki/tools/mailnotify -q >/dev/null 2>&1 +45 0 * * * www-data cd /var/www/foswiki/bin && ./statistics -subwebs 1 >/dev/null 2>&1 diff --git a/overlay/usr/lib/inithooks/firstboot.d/40foswiki b/overlay/usr/lib/inithooks/firstboot.d/40foswiki index 32b0b8d..916697a 100755 --- a/overlay/usr/lib/inithooks/firstboot.d/40foswiki +++ b/overlay/usr/lib/inithooks/firstboot.d/40foswiki @@ -5,4 +5,4 @@ [ -e $INITHOOKS_CONF ] && . $INITHOOKS_CONF $INITHOOKS_PATH/bin/foswiki.py --pass="$APP_PASS" --email="$APP_EMAIL" --domain="$APP_DOMAIN" - +chown www-data:www-data /var/www/foswiki/data/.htpasswd diff --git a/overlay/var/www/foswiki/lib/LocalSite.cfg b/overlay/var/www/foswiki/lib/LocalSite.cfg deleted file mode 100644 index 6c30b3e..0000000 --- a/overlay/var/www/foswiki/lib/LocalSite.cfg +++ /dev/null @@ -1,676 +0,0 @@ -use utf8; -# Local site settings for Foswiki. This file is managed by the 'configure' -# CGI script, though you can also make (careful!) manual changes with a -# text editor. See the Foswiki.spec file in this directory for documentation -# Extensions are documented in the Config.spec file in the Plugins/ -# or Contrib/ directories (Do not remove the following blank line.) - -$Foswiki::cfg{AccessControl} = 'Foswiki::Access::TopicACLAccess'; -$Foswiki::cfg{AccessControlACL}{EnableDeprecatedEmptyDeny} = 0; -$Foswiki::cfg{AccessibleCFG} = [ - '{AccessControlACL}{EnableDeprecatedEmptyDeny}', - '{AccessibleCFG}', - '{AdminUserLogin}', - '{AdminUserWikiName}', - '{AntiSpam}{EmailPadding}', - '{AntiSpam}{EntityEncode}', - '{AntiSpam}{HideUserDetails}', - '{AntiSpam}{RobotsAreWelcome}', - '{AttachmentNameFilter}', - '{AuthRealm}', - '{AuthScripts}', - '{Cache}{Enabled}', - '{DefaultDateFormat}', - '{DefaultUrlHost}', - '{DenyDotDotInclude}', - '{DisplayTimeValues}', - '{EnableEmail}', - '{EnableHierarchicalWebs}', - '{FormTypes}', - '{HomeTopicName}', - '{LeaseLength}', - '{LeaseLengthLessForceful}', - '{LinkProtocolPattern}', - '{LocalSitePreferences}', - '{LoginNameFilterIn}', - '{MaxRevisionsInADiff}', - '{MinPasswordLength}', - '{NameFilter}', - '{NotifyTopicName}', - '{NumberOfRevisions}', - '{PluginsOrder}', - '{Plugins}{WebSearchPath}', - '{PluralToSingular}', - '{Register}{AllowLoginName}', - '{Register}{Approvers}', - '{Register}{DisablePasswordConfirmation}', - '{Register}{EnableNewUserRegistration}', - '{Register}{NeedApproval}', - '{Register}{NeedVerification}', - '{Register}{RegistrationAgentWikiName}', - '{ReplaceIfEditedAgainWithin}', - '{SandboxWebName}', - '{ScriptSuffix}', - '{ScriptUrlPath}', - '{Site}{Locale}', - '{SitePrefsTopicName}', - '{Stats}{TopContrib}', - '{Stats}{TopicName}', - '{Stats}{TopViews}', - '{SuperAdminGroup}', - '{SystemWebName}', - '{TemplateLogin}{AllowLoginUsingEmailAddress}', - '{TemplatePath}', - '{TrashWebName}', - '{UploadFilter}', - '{UseLocale}', - '{UserInterfaceInternationalisation}', - '{UsersTopicName}', - '{UsersWebName}', - '{Validation}{Method}', - '{WebMasterEmail}', - '{WebMasterName}', - '{WebPrefsTopicName}' -]; -$Foswiki::cfg{AccessibleENV} = '^(HTTP_\\w+|REMOTE_\\w+|SERVER_\\w+|REQUEST_\\w+|MOD_PERL|FOSWIKI_ACTION|PATH_INFO)$'; -$Foswiki::cfg{AccessibleHeaders} = [ - 'Accept-Language', - 'User-Agent' -]; -$Foswiki::cfg{AcronymLength} = 3; -$Foswiki::cfg{AdminUserLogin} = 'admin'; -$Foswiki::cfg{AdminUserWikiName} = 'AdminUser'; -$Foswiki::cfg{AllowRedirectUrl} = 0; -$Foswiki::cfg{AntiSpam}{EmailPadding} = ''; -$Foswiki::cfg{AntiSpam}{EntityEncode} = 1; -$Foswiki::cfg{AntiSpam}{HideUserDetails} = 1; -$Foswiki::cfg{AntiSpam}{RobotsAreWelcome} = 1; -$Foswiki::cfg{AttachmentNameFilter} = '[\\\\*?~^$@%`"\'&|<>/\\[\\]#\\x00-\\x1f]'; -$Foswiki::cfg{AttachmentReplaceSpaces} = 0; -$Foswiki::cfg{AuthRealm} = 'Enter your WikiName. (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'; -$Foswiki::cfg{AuthScripts} = 'attach,compareauth,configure,edit,manage,previewauth,rdiffauth,rename,restauth,save,statistics,upload,viewauth,viewfileauth'; -$Foswiki::cfg{BrowserCacheControl} = {}; -$Foswiki::cfg{Cache}{DBI}{DSN} = ''; -$Foswiki::cfg{Cache}{DBI}{MySQL}{Database} = ''; -$Foswiki::cfg{Cache}{DBI}{MySQL}{Host} = 'localhost'; -$Foswiki::cfg{Cache}{DBI}{MySQL}{Password} = ''; -$Foswiki::cfg{Cache}{DBI}{MySQL}{Port} = ''; -$Foswiki::cfg{Cache}{DBI}{MySQL}{Username} = ''; -$Foswiki::cfg{Cache}{DBI}{Password} = ''; -$Foswiki::cfg{Cache}{DBI}{PostgreSQL}{Database} = ''; -$Foswiki::cfg{Cache}{DBI}{PostgreSQL}{Host} = 'localhost'; -$Foswiki::cfg{Cache}{DBI}{PostgreSQL}{Password} = ''; -$Foswiki::cfg{Cache}{DBI}{PostgreSQL}{Port} = ''; -$Foswiki::cfg{Cache}{DBI}{PostgreSQL}{Username} = ''; -$Foswiki::cfg{Cache}{DBI}{SQLite}{Filename} = '$Foswiki::cfg{WorkingDir}/sqlite.db'; -$Foswiki::cfg{Cache}{DBI}{TablePrefix} = 'foswiki_cache'; -$Foswiki::cfg{Cache}{DBI}{Username} = ''; -$Foswiki::cfg{Cache}{DependencyFilter} = '$Foswiki::cfg{SystemWebName}\\..*|$Foswiki::cfg{TrashWebName}\\..*|TWiki\\..*'; -$Foswiki::cfg{Cache}{Enabled} = 0; -$Foswiki::cfg{Cache}{Implementation} = 'Foswiki::PageCache::DBI::Generic'; -$Foswiki::cfg{Cache}{ParamFilterList} = '_.*, cache_expire, cache_ignore, foswiki_redirect_cache, logout, redirectedfrom, refresh, topic, validation_key'; -$Foswiki::cfg{Cache}{RootDir} = '$Foswiki::cfg{WorkingDir}/cache'; -$Foswiki::cfg{Cache}{TrackInternalLinks} = 'on'; -$Foswiki::cfg{Cache}{WebDependencies} = 'WebRss, WebAtom, WebTopicList, WebIndex, WebSearch, WebSearchAdvanced'; -$Foswiki::cfg{DataDir} = '/var/www/foswiki/data'; -$Foswiki::cfg{DebugFileName} = ''; -$Foswiki::cfg{DefaultDateFormat} = '$day $month $year'; -$Foswiki::cfg{DefaultUrlHost} = 'http://192.168.1.95'; -$Foswiki::cfg{DefaultUserLogin} = 'guest'; -$Foswiki::cfg{DefaultUserWikiName} = 'WikiGuest'; -$Foswiki::cfg{DenyDotDotInclude} = 1; -$Foswiki::cfg{DetailedOS} = 'linux'; -$Foswiki::cfg{DisplayTimeValues} = 'gmtime'; -$Foswiki::cfg{DrainStdin} = 0; -$Foswiki::cfg{Email}{EnableSMIME} = 0; -$Foswiki::cfg{Email}{MailMethod} = 'Net::SMTP'; -$Foswiki::cfg{Email}{SSLCaFile} = ''; -$Foswiki::cfg{Email}{SSLCaPath} = ''; -$Foswiki::cfg{Email}{SSLCheckCRL} = 0; -$Foswiki::cfg{Email}{SSLClientCertFile} = ''; -$Foswiki::cfg{Email}{SSLClientKeyFile} = ''; -$Foswiki::cfg{Email}{SSLClientKeyPassword} = ''; -$Foswiki::cfg{Email}{SSLCrlFile} = ''; -$Foswiki::cfg{Email}{SSLVerifyServer} = 0; -$Foswiki::cfg{Email}{Servertime} = 0; -$Foswiki::cfg{Email}{SmimeCertC} = ''; -$Foswiki::cfg{Email}{SmimeCertL} = ''; -$Foswiki::cfg{Email}{SmimeCertO} = ''; -$Foswiki::cfg{Email}{SmimeCertOU} = ''; -$Foswiki::cfg{Email}{SmimeCertST} = ''; -$Foswiki::cfg{Email}{SmimeCertificateFile} = ''; -$Foswiki::cfg{Email}{SmimeKeyFile} = ''; -$Foswiki::cfg{Email}{SmimeKeyPassword} = ''; -$Foswiki::cfg{Email}{ValidTLD} = '(?^i:AERO|ARPA|ASIA|BIZ|CAT|COM|COOP|EDU|GOV|INFO|INT|JOBS|MIL|MOBI|MUSEUM|NAME|NET|ORG|PRO|TEL|TRAVEL|XXX)'; -$Foswiki::cfg{Email}{WikiAgentEmail} = ''; -$Foswiki::cfg{Email}{WikiAgentName} = ''; -$Foswiki::cfg{EnableEmail} = 0; -$Foswiki::cfg{EnableHierarchicalWebs} = 1; -$Foswiki::cfg{Extensions}{PlainFileStoreContrib}{CheckForRCS} = 1; -$Foswiki::cfg{ExtensionsRepositories} = 'Foswiki.org=(https://foswiki.org/Extensions/,https://foswiki.org/pub/Extensions/)'; -$Foswiki::cfg{FastCGIContrib}{CheckLocalSiteCfg} = 1; -$Foswiki::cfg{FastCGIContrib}{CheckSize} = 10; -$Foswiki::cfg{FastCGIContrib}{MaxRequests} = 100; -$Foswiki::cfg{FastCGIContrib}{MaxSize} = 0; -$Foswiki::cfg{FeatureAccess}{AllowHistory} = 'authenticated'; -$Foswiki::cfg{FeatureAccess}{AllowRaw} = 'authenticated'; -$Foswiki::cfg{FeatureAccess}{Configure} = ''; -$Foswiki::cfg{ForceDefaultUrlHost} = '0'; -$Foswiki::cfg{ForceUnsafeRegexes} = 0; -$Foswiki::cfg{FormTypes} = [ - { - 'class' => 'Foswiki::Form::Radio', - 'multivalued' => 0, - 'size' => 4, - 'type' => 'radio' - }, - { - 'class' => 'Foswiki::Form::Text', - 'multivalued' => 0, - 'size' => 10, - 'type' => 'text' - }, - { - 'class' => 'Foswiki::Form::Checkbox', - 'multivalued' => 1, - 'size' => 4, - 'type' => 'checkbox' - }, - { - 'class' => 'Foswiki::Form::Checkbox', - 'multivalued' => 1, - 'size' => 4, - 'type' => 'checkbox+values' - }, - { - 'class' => 'Foswiki::Form::Color', - 'multivalued' => 0, - 'size' => '', - 'type' => 'color' - }, - { - 'class' => 'Foswiki::Form::Select', - 'multivalued' => '', - 'size' => 1, - 'type' => 'select' - }, - { - 'class' => 'Foswiki::Form::Select', - 'multivalued' => 1, - 'size' => 1, - 'type' => 'select+multi' - }, - { - 'class' => 'Foswiki::Form::Select', - 'multivalued' => '', - 'size' => 1, - 'type' => 'select+values' - }, - { - 'class' => 'Foswiki::Form::Select', - 'multivalued' => 1, - 'size' => 1, - 'type' => 'select+multi+values' - }, - { - 'class' => 'Foswiki::Form::Date', - 'multivalued' => 0, - 'size' => 20, - 'type' => 'date' - }, - { - 'class' => 'Foswiki::Form::Label', - 'multivalued' => 0, - 'size' => '', - 'type' => 'label' - }, - { - 'class' => 'Foswiki::Form::ListFieldDefinition', - 'multivalued' => 0, - 'size' => '', - 'type' => 'listfielddefinition' - }, - { - 'class' => 'Foswiki::Form::Rating', - 'multivalued' => 0, - 'size' => 4, - 'type' => 'rating' - }, - { - 'class' => 'Foswiki::Form::FieldDefinition', - 'multivalued' => 0, - 'size' => '', - 'type' => 'fielddefinition' - }, - { - 'class' => 'Foswiki::Form::Textarea', - 'multivalued' => 0, - 'size' => '', - 'type' => 'textarea' - }, - { - 'class' => 'Foswiki::Form::Textboxlist', - 'multivalued' => 1, - 'size' => '', - 'type' => 'textboxlist' - } -]; -$Foswiki::cfg{GetScriptUrlFromCgi} = 0; -$Foswiki::cfg{HomePagePlugin}{GotoHomePageOnLogin} = 0; -$Foswiki::cfg{HomePagePlugin}{HostnameMapping} = { - 'http://blog.org' => 'Blog', - 'http://home.org' => 'Home', - 'http://www.blog.org' => 'Blog.Www', - 'http://www.home.org' => 'Home.Www' -}; -$Foswiki::cfg{HomePagePlugin}{SiteDefaultTopic} = ''; -$Foswiki::cfg{HomeTopicName} = 'WebHome'; -$Foswiki::cfg{Htpasswd}{AutoDetect} = 1; -$Foswiki::cfg{Htpasswd}{BCryptCost} = 8; -$Foswiki::cfg{Htpasswd}{DetectModification} = 0; -$Foswiki::cfg{Htpasswd}{Encoding} = 'apache-md5'; -$Foswiki::cfg{Htpasswd}{FileName} = '$Foswiki::cfg{DataDir}/.htpasswd'; -$Foswiki::cfg{Htpasswd}{GlobalCache} = 0; -$Foswiki::cfg{Htpasswd}{LockFileName} = '$Foswiki::cfg{WorkingDir}/htpasswd.lock'; -$Foswiki::cfg{HttpCompress} = 0; -$Foswiki::cfg{INCLUDE}{AllowURLs} = 0; -$Foswiki::cfg{JQueryPlugin}{Debug} = 0; -$Foswiki::cfg{JQueryPlugin}{DefaultPlugins} = ''; -$Foswiki::cfg{JQueryPlugin}{IconSearchPath} = 'FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons, FamFamFamSilkCompanion2Icons, FamFamFamSilkGeoSilkIcons, FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons'; -$Foswiki::cfg{JQueryPlugin}{JQueryTheme} = 'foswiki'; -$Foswiki::cfg{JQueryPlugin}{JQueryVersion} = 'jquery-2.2.4'; -$Foswiki::cfg{JQueryPlugin}{JQueryVersionForOldIEs} = 'jquery-1.12.4'; -$Foswiki::cfg{JQueryPlugin}{MemoryCache} = 1; -$Foswiki::cfg{JQueryPlugin}{NoConflict} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Animate}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Autocomplete}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Bgiframe}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{BlockUI}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Button}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Chili}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Cookie}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Corner}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Cycle}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Debug}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Easing}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Farbtastic}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{FluidFont}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Focus}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{FontAwesome}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Form}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Foswiki}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Gradient}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{HoverIntent}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{I18N}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{ImagesLoaded}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{InnerFade}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{JEditable}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{JEditable}{Module} = 'Foswiki::Contrib::JEditableContrib::JEDITABLE'; -$Foswiki::cfg{JQueryPlugin}{Plugins}{JsonRpc}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{JsonRpc}{Module} = 'Foswiki::Contrib::JsonRpcContrib::JQueryPlugin'; -$Foswiki::cfg{JQueryPlugin}{Plugins}{LiveQuery}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Loader}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{LocalScroll}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{MaskedInput}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Masonry}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Media}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Metadata}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Migrate}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{MouseWheel}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{NatEdit}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{NatEdit}{Module} = 'Foswiki::Plugins::NatEditPlugin::NATEDIT'; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Nifty}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{PNotify}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Placeholder}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{PopUpWindow}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{QueryObject}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Rating}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Render}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{ScrollTo}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{SerialScroll}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Shake}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{ShrinkUrls}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{SimpleModal}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Slimbox}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Sprintf}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Stars}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Superfish}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Supersubs}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Tabpane}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{TextboxList}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{TinyMCE}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{TinyMCE}{Module} = 'Foswiki::Plugins::TinyMCEPlugin::TinyMCE'; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Tmpl}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Tooltip}{Enabled} = 0; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Treeview}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{UI}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Accordion'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Autocomplete'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Button'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Datepicker'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Dialog'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Draggable'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Progressbar'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Resizable'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Slider'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Spinner'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Tabs'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Tooltip'}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{Validate}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Plugins}{WikiWord}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Themes}{Base}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Themes}{Flickr}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Themes}{Foswiki}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Themes}{Lightness}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Themes}{Redmond}{Enabled} = 1; -$Foswiki::cfg{JQueryPlugin}{Themes}{Smoothness}{Enabled} = 1; -$Foswiki::cfg{JSCalendarContrib}{format} = '%e %b %Y'; -$Foswiki::cfg{JSCalendarContrib}{lang} = 'en'; -$Foswiki::cfg{JSCalendarContrib}{style} = 'large'; -$Foswiki::cfg{LanguageFileCompression} = 0; -$Foswiki::cfg{LeaseLength} = 3600; -$Foswiki::cfg{LeaseLengthLessForceful} = 3600; -$Foswiki::cfg{LegacyFormfieldNames} = 0; -$Foswiki::cfg{LegacyRESTSecurity} = 0; -$Foswiki::cfg{LinkProtocolPattern} = '(file|ftp|gopher|https|http|irc|mailto|news|nntp|telnet)'; -$Foswiki::cfg{LocalSitePreferences} = '$Foswiki::cfg{UsersWebName}.SitePreferences'; -$Foswiki::cfg{LocalesDir} = '/var/www/foswiki/locale'; -$Foswiki::cfg{Log}{Action} = { - 'attach' => 1, - 'changes' => 1, - 'compare' => 1, - 'edit' => 1, - 'rdiff' => 1, - 'register' => 1, - 'rename' => 1, - 'rest' => 1, - 'save' => 1, - 'search' => 1, - 'upload' => 1, - 'view' => 1, - 'viewfile' => 1 -}; -$Foswiki::cfg{Log}{Dir} = '$Foswiki::cfg{WorkingDir}/logs'; -$Foswiki::cfg{Log}{Implementation} = 'Foswiki::Logger::PlainFile'; -$Foswiki::cfg{Log}{Obfuscating}{MaskIP} = 0; -$Foswiki::cfg{LogFileName} = ''; -$Foswiki::cfg{LoginManager} = 'Foswiki::LoginManager::TemplateLogin'; -$Foswiki::cfg{LoginNameFilterIn} = '^[^\\s\\*?~^\\$@%`"\'&;|<>\\x00-\\x1f]+$'; -$Foswiki::cfg{MailProgram} = '/usr/sbin/sendmail -t -oi -oeq'; -$Foswiki::cfg{MailerContrib}{EmailFilterIn} = ''; -$Foswiki::cfg{MailerContrib}{RemoveImgInMailnotify} = 1; -$Foswiki::cfg{MailerContrib}{RespectUserPrefs} = 'LANGUAGE'; -$Foswiki::cfg{MaxLSCBackups} = 10; -$Foswiki::cfg{MaxRevisionsInADiff} = 25; -$Foswiki::cfg{MergeHeadAndScriptZones} = 0; -$Foswiki::cfg{MimeTypesFileName} = '$Foswiki::cfg{DataDir}/mime.types'; -$Foswiki::cfg{MinPasswordLength} = 7; -$Foswiki::cfg{NFCNormalizeFilenames} = '0'; -$Foswiki::cfg{NameFilter} = '[\\\\\\s*?~^$@%`"\'&|<:;>\\[\\]#\\x00-\\x1f]'; -$Foswiki::cfg{NotifyTopicName} = 'WebNotify'; -$Foswiki::cfg{NumberOfRevisions} = 4; -$Foswiki::cfg{OS} = 'UNIX'; -$Foswiki::cfg{Password} = ''; -$Foswiki::cfg{PasswordManager} = 'Foswiki::Users::HtPasswdUser'; -$Foswiki::cfg{PermittedRedirectHostUrls} = ''; -$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Debug} = 0; -$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Mode} = 'exist'; -$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Module} = 'Foswiki::Plugins::AutoViewTemplatePlugin'; -$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Override} = 0; -$Foswiki::cfg{Plugins}{CommentPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{CommentPlugin}{GuestCanComment} = 1; -$Foswiki::cfg{Plugins}{CommentPlugin}{Module} = 'Foswiki::Plugins::CommentPlugin'; -$Foswiki::cfg{Plugins}{CommentPlugin}{RequiredForSave} = 'CHANGE'; -$Foswiki::cfg{Plugins}{CompareRevisionsAddonPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{CompareRevisionsAddonPlugin}{Module} = 'Foswiki::Plugins::CompareRevisionsAddonPlugin'; -$Foswiki::cfg{Plugins}{ConfigurePlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{ConfigurePlugin}{Module} = 'Foswiki::Plugins::ConfigurePlugin'; -$Foswiki::cfg{Plugins}{EditRowPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{EditRowPlugin}{Macro} = 'EDITTABLE'; -$Foswiki::cfg{Plugins}{EditRowPlugin}{Module} = 'Foswiki::Plugins::EditRowPlugin'; -$Foswiki::cfg{Plugins}{EditTablePlugin}{Enabled} = 0; -$Foswiki::cfg{Plugins}{EditTablePlugin}{Module} = 'Foswiki::Plugins::EditTablePlugin'; -$Foswiki::cfg{Plugins}{HistoryPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{HistoryPlugin}{Module} = 'Foswiki::Plugins::HistoryPlugin'; -$Foswiki::cfg{Plugins}{HomePagePlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{HomePagePlugin}{Module} = 'Foswiki::Plugins::HomePagePlugin'; -$Foswiki::cfg{Plugins}{InterwikiPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{InterwikiPlugin}{Module} = 'Foswiki::Plugins::InterwikiPlugin'; -$Foswiki::cfg{Plugins}{JQueryPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{JQueryPlugin}{Module} = 'Foswiki::Plugins::JQueryPlugin'; -$Foswiki::cfg{Plugins}{MailerContribPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{MailerContribPlugin}{Module} = 'Foswiki::Plugins::MailerContribPlugin'; -$Foswiki::cfg{Plugins}{NatEditPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{NatEditPlugin}{Module} = 'Foswiki::Plugins::NatEditPlugin'; -$Foswiki::cfg{Plugins}{PreferencesPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{PreferencesPlugin}{Module} = 'Foswiki::Plugins::PreferencesPlugin'; -$Foswiki::cfg{Plugins}{PubLinkFixupPlugin}{Debug} = 0; -$Foswiki::cfg{Plugins}{PubLinkFixupPlugin}{Module} = 'Foswiki::Plugins::PubLinkFixupPlugin'; -$Foswiki::cfg{Plugins}{RenderListPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{RenderListPlugin}{Module} = 'Foswiki::Plugins::RenderListPlugin'; -$Foswiki::cfg{Plugins}{SlideShowPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{SlideShowPlugin}{Module} = 'Foswiki::Plugins::SlideShowPlugin'; -$Foswiki::cfg{Plugins}{SmiliesPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{SmiliesPlugin}{Module} = 'Foswiki::Plugins::SmiliesPlugin'; -$Foswiki::cfg{Plugins}{SpreadSheetPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{SpreadSheetPlugin}{Module} = 'Foswiki::Plugins::SpreadSheetPlugin'; -$Foswiki::cfg{Plugins}{SubscribePlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{SubscribePlugin}{Module} = 'Foswiki::Plugins::SubscribePlugin'; -$Foswiki::cfg{Plugins}{TWikiCompatibilityPlugin}{Enabled} = 0; -$Foswiki::cfg{Plugins}{TWikiCompatibilityPlugin}{MainWebTopicNameConversion} = { - 'TWikiAdminGroup' => 'AdminGroup', - 'TWikiAdminUser' => 'AdminUser', - 'TWikiContributor' => 'ProjectContributor', - 'TWikiGroupTemplate' => 'GroupTemplate', - 'TWikiGroups' => 'WikiGroups', - 'TWikiGuest' => 'WikiGuest', - 'TWikiPreferences' => 'SitePreferences', - 'TWikiRegistrationAgent' => 'RegistrationAgent', - 'TWikiUsers' => 'WikiUsers' -}; -$Foswiki::cfg{Plugins}{TWikiCompatibilityPlugin}{Module} = 'Foswiki::Plugins::TWikiCompatibilityPlugin'; -$Foswiki::cfg{Plugins}{TWikiCompatibilityPlugin}{TWikiWebTopicNameConversion} = { - 'ATasteOfTWiki' => 'BeginnersStartHere', - 'TWikiAccessControl' => 'AccessControl', - 'TWikiAddOns' => 'ContributedAddOns', - 'TWikiContribs' => 'Contribs', - 'TWikiContributor' => 'ProjectContributor', - 'TWikiCss' => 'CascadingStyleSheets', - 'TWikiDocGraphics' => 'DocumentGraphics', - 'TWikiDocumentation' => 'CompleteDocumentation', - 'TWikiDownload' => 'DownloadSources', - 'TWikiEditingShorthand' => 'EditingShorthand', - 'TWikiEnhancementRequests' => 'EnhancementRequests', - 'TWikiFAQ' => 'FrequentlyAskedQuestions', - 'TWikiFaqTemplate' => 'FaqTemplate', - 'TWikiForms' => 'DataForms', - 'TWikiGlossary' => 'GlossaryOfTerms', - 'TWikiHistory' => 'ReleaseHistory', - 'TWikiInstallationGuide' => 'InstallationGuide', - 'TWikiJavascripts' => 'JavascriptFiles', - 'TWikiLogos' => 'ProjectLogos', - 'TWikiMetaData' => 'MetaData', - 'TWikiPlannedFeatures' => '_remove_', - 'TWikiPlugins' => 'Plugins', - 'TWikiPreferences' => 'DefaultPreferences', - 'TWikiReferenceManual' => 'ReferenceManual', - 'TWikiRegistration' => 'UserRegistration', - 'TWikiRegistrationAgent' => 'RegistrationAgent', - 'TWikiReleaseNotes04x00' => '_remove_', - 'TWikiReleaseNotes04x01' => '_remove_', - 'TWikiReleaseNotes04x02' => 'ReleaseNotes01x00', - 'TWikiRenderingShortcut' => 'RenderingShortcut', - 'TWikiScripts' => 'CommandAndCGIScripts', - 'TWikiShorthand' => 'ShortHand', - 'TWikiSite' => '_remove_', - 'TWikiSiteTools' => 'SiteTools', - 'TWikiSkinBrowser' => 'SkinBrowser', - 'TWikiSkins' => 'Skins', - 'TWikiSystemRequirements' => 'SystemRequirements', - 'TWikiTemplates' => 'TemplateTopics', - 'TWikiTopics' => 'TopicsAndWebs', - 'TWikiTutorial' => 'TwentyMinuteTutorial', - 'TWikiUpgradeGuide' => 'UpgradeGuide', - 'TWikiUserAuthentication' => 'UserAuthentication', - 'TWikiUserMappingContrib' => 'TopicUserMappingContrib', - 'TWikiUserSetting' => 'UserSetting', - 'TWikiUsersGuide' => 'UsersGuide', - 'TWikiUsersTemplate' => 'UsersTemplate', - 'TWikiVariables' => 'Macros', - 'TWikiVariablesQuickStart' => 'MacrosQuickStart', - 'TWikiWebsTable' => 'WebsTable', - 'WhatDoesTWikiStandFor' => '_remove_' -}; -$Foswiki::cfg{Plugins}{TWikiCompatibilityPlugin}{WebSearchPath} = { - 'System' => 'TWiki', - 'TWiki' => 'System' -}; -$Foswiki::cfg{Plugins}{TablePlugin}{Debug} = 0; -$Foswiki::cfg{Plugins}{TablePlugin}{DefaultAttributes} = 'tableborder="1" valign="top" headercolor="#000000" headerbg="#d6d3cf" headerbgsorted="#c4c1ba" databg="#ffffff,#f7f7f6" databgsorted="#f7f7f6,#f0f0ee" tablerules="rows" headerrules="cols"'; -$Foswiki::cfg{Plugins}{TablePlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{TablePlugin}{Module} = 'Foswiki::Plugins::TablePlugin'; -$Foswiki::cfg{Plugins}{TinyMCEPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{TinyMCEPlugin}{Module} = 'Foswiki::Plugins::TinyMCEPlugin'; -$Foswiki::cfg{Plugins}{TwistyPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{TwistyPlugin}{Module} = 'Foswiki::Plugins::TwistyPlugin'; -$Foswiki::cfg{Plugins}{UpdatesPlugin}{CacheTimeout} = 86400; -$Foswiki::cfg{Plugins}{UpdatesPlugin}{ConfigureUrl} = ''; -$Foswiki::cfg{Plugins}{UpdatesPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{UpdatesPlugin}{ExcludeExtensions} = ''; -$Foswiki::cfg{Plugins}{UpdatesPlugin}{Module} = 'Foswiki::Plugins::UpdatesPlugin'; -$Foswiki::cfg{Plugins}{UpdatesPlugin}{ReportUrl} = 'https://foswiki.org/Extensions/UpdatesPluginReport'; -$Foswiki::cfg{Plugins}{WebSearchPath} = '$Foswiki::cfg{SystemWebName},TWiki'; -$Foswiki::cfg{Plugins}{WysiwygPlugin}{Enabled} = 1; -$Foswiki::cfg{Plugins}{WysiwygPlugin}{Module} = 'Foswiki::Plugins::WysiwygPlugin'; -$Foswiki::cfg{PluginsOrder} = 'TWikiCompatibilityPlugin,SpreadSheetPlugin,SlideShowPlugin'; -$Foswiki::cfg{PluralToSingular} = 1; -$Foswiki::cfg{PubDir} = '/var/www/foswiki/pub'; -$Foswiki::cfg{PubUrlPath} = '/foswiki/pub'; -$Foswiki::cfg{RCS}{AutoAttachPubFiles} = 0; -$Foswiki::cfg{RCS}{ExtOption} = ''; -$Foswiki::cfg{RCS}{TabularChangeFormat} = 0; -$Foswiki::cfg{RCS}{asciiFileSuffixes} = '\.(txt|html|xml|pl)$'; -$Foswiki::cfg{RCS}{breaklockCmd} = 'rcs $Foswiki::cfg{RCS}{ExtOption} -u -M %FILENAME|F%'; -$Foswiki::cfg{RCS}{ciCmd} = 'ci $Foswiki::cfg{RCS}{ExtOption} -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F%'; -$Foswiki::cfg{RCS}{ciDateCmd} = 'ci $Foswiki::cfg{RCS}{ExtOption} -m%COMMENT|U% -t-none -d%DATE|D% -u -w%USERNAME|S% %FILENAME|F%'; -$Foswiki::cfg{RCS}{coCmd} = 'co $Foswiki::cfg{RCS}{ExtOption} -p%REVISION|N% -ko %FILENAME|F%'; -$Foswiki::cfg{RCS}{coMustCopy} = 0; -$Foswiki::cfg{RCS}{delRevCmd} = 'rcs $Foswiki::cfg{RCS}{ExtOption} -o%REVISION|N% %FILENAME|F%'; -$Foswiki::cfg{RCS}{diffCmd} = 'rcsdiff $Foswiki::cfg{RCS}{ExtOption} -q -w -B -r%REVISION1|N% -r%REVISION2|N% -ko --unified=%CONTEXT|N% %FILENAME|F%'; -$Foswiki::cfg{RCS}{histCmd} = 'rlog $Foswiki::cfg{RCS}{ExtOption} -h %FILENAME|F%'; -$Foswiki::cfg{RCS}{infoCmd} = 'rlog $Foswiki::cfg{RCS}{ExtOption} -r%REVISION|N% %FILENAME|F%'; -$Foswiki::cfg{RCS}{initBinaryCmd} = 'rcs $Foswiki::cfg{RCS}{ExtOption} -i -t-none -kb %FILENAME|F%'; -$Foswiki::cfg{RCS}{initTextCmd} = 'rcs $Foswiki::cfg{RCS}{ExtOption} -i -t-none -ko %FILENAME|F%'; -$Foswiki::cfg{RCS}{lockCmd} = 'rcs $Foswiki::cfg{RCS}{ExtOption} -l %FILENAME|F%'; -$Foswiki::cfg{RCS}{rlogDateCmd} = 'rlog $Foswiki::cfg{RCS}{ExtOption} -d%DATE|D% %FILENAME|F%'; -$Foswiki::cfg{RCS}{tmpBinaryCmd} = 'rcs $Foswiki::cfg{RCS}{ExtOption} -kb %FILENAME|F%'; -$Foswiki::cfg{RCS}{unlockCmd} = 'rcs $Foswiki::cfg{RCS}{ExtOption} -u %FILENAME|F%'; -$Foswiki::cfg{Register}{AllowLoginName} = 0; -$Foswiki::cfg{Register}{Approvers} = ''; -$Foswiki::cfg{Register}{DisablePasswordConfirmation} = 0; -$Foswiki::cfg{Register}{EmailFilter} = ''; -$Foswiki::cfg{Register}{EnableNewUserRegistration} = 1; -$Foswiki::cfg{Register}{ExpireAfter} = 21600; -$Foswiki::cfg{Register}{HidePasswd} = 1; -$Foswiki::cfg{Register}{NeedApproval} = 0; -$Foswiki::cfg{Register}{NeedVerification} = 0; -$Foswiki::cfg{Register}{RegistrationAgentWikiName} = 'RegistrationAgent'; -$Foswiki::cfg{Register}{UniqueEmail} = 0; -$Foswiki::cfg{RemovePortNumber} = 0; -$Foswiki::cfg{RenderLoggedInButUnknownUsers} = 0; -$Foswiki::cfg{ReplaceIfEditedAgainWithin} = 3600; -$Foswiki::cfg{RequireCompatibleAnchors} = 0; -$Foswiki::cfg{SMTP}{Debug} = 0; -$Foswiki::cfg{SMTP}{DebugFlags} = ''; -$Foswiki::cfg{SMTP}{MAILHOST} = ''; -$Foswiki::cfg{SMTP}{Password} = ''; -$Foswiki::cfg{SMTP}{SENDERHOST} = ''; -$Foswiki::cfg{SMTP}{Username} = ''; -$Foswiki::cfg{SandboxWebName} = 'Sandbox'; -$Foswiki::cfg{ScriptDir} = '/var/www/foswiki/bin'; -$Foswiki::cfg{ScriptSuffix} = ''; -$Foswiki::cfg{ScriptUrlPath} = '/foswiki/bin'; -$Foswiki::cfg{ScriptUrlPaths}{view} = '/foswiki/bin/view'; -$Foswiki::cfg{Session}{AcceptUserPwParam} = '^view(auth)?$'; -$Foswiki::cfg{Session}{AcceptUserPwParamOnGET} = 0; -$Foswiki::cfg{Session}{filePermission} = 384; -$Foswiki::cfg{Sessions}{CookieRealm} = ''; -$Foswiki::cfg{Sessions}{EnableGuestSessions} = 1; -$Foswiki::cfg{Sessions}{ExpireAfter} = 21600; -$Foswiki::cfg{Sessions}{ExpireCookiesAfter} = 0; -$Foswiki::cfg{Sessions}{IDsInURLs} = 0; -$Foswiki::cfg{Sessions}{MapIP2SID} = 0; -$Foswiki::cfg{Sessions}{TopicsRequireGuestSessions} = '(Registration|ResetPassword)$'; -$Foswiki::cfg{Sessions}{UseIPMatching} = 1; -# {Site}{CharSet} was not found in .spec -$Foswiki::cfg{Site}{CharSet} = 'utf-8'; -$Foswiki::cfg{Site}{Locale} = 'C'; -$Foswiki::cfg{SitePrefsTopicName} = 'DefaultPreferences'; -$Foswiki::cfg{Stats}{AutoCreateTopic} = 'Prohibited'; -$Foswiki::cfg{Stats}{StatisticsGroup} = ''; -$Foswiki::cfg{Stats}{TopContrib} = 10; -$Foswiki::cfg{Stats}{TopViews} = 10; -$Foswiki::cfg{Stats}{TopicName} = 'WebStatistics'; -$Foswiki::cfg{Store}{EgrepCmd} = 'grep -E %CS{|-i}% %DET{|-l}% -a -H -- %TOKEN|U% %FILES|F%'; -$Foswiki::cfg{Store}{FgrepCmd} = 'grep -F %CS{|-i}% %DET{|-l}% -a -H -- %TOKEN|U% %FILES|F%'; -$Foswiki::cfg{Store}{Implementation} = 'Foswiki::Store::PlainFile'; -$Foswiki::cfg{Store}{ImplementationClasses} = []; -$Foswiki::cfg{Store}{PrefsBackend} = 'Foswiki::Prefs::TopicRAM'; -$Foswiki::cfg{Store}{QueryAlgorithm} = 'Foswiki::Store::QueryAlgorithms::BruteForce'; -$Foswiki::cfg{Store}{RememberChangesFor} = 2678400; -$Foswiki::cfg{Store}{SearchAlgorithm} = 'Foswiki::Store::SearchAlgorithms::Forking'; -$Foswiki::cfg{Store}{dirPermission} = 493; -$Foswiki::cfg{Store}{filePermission} = 420; -$Foswiki::cfg{Store}{overrideUmask} = 0; -$Foswiki::cfg{SuperAdminGroup} = 'AdminGroup'; -$Foswiki::cfg{SwitchBoard}{compare} = { - 'context' => { - 'comparing' => 1, - 'diff' => 1 - }, - 'function' => 'compare', - 'package' => 'Foswiki::Contrib::CompareRevisionsAddOn::Compare' -}; -$Foswiki::cfg{SwitchBoard}{compareauth} = { - 'context' => { - 'comparing' => 1, - 'diff' => 1 - }, - 'function' => 'compare', - 'package' => 'Foswiki::Contrib::CompareRevisionsAddOn::Compare' -}; -$Foswiki::cfg{SwitchBoard}{jsonrpc} = [ - 'Foswiki::Contrib::JsonRpcContrib', - 'dispatch', - { - 'jsonrpc' => 1 - } -]; -$Foswiki::cfg{SystemWebName} = 'System'; -$Foswiki::cfg{TemplateDir} = '/var/www/foswiki/templates'; -$Foswiki::cfg{TemplateLogin}{AllowLoginUsingEmailAddress} = 0; -$Foswiki::cfg{TemplateLogin}{PreventBrowserRememberingPassword} = 0; -$Foswiki::cfg{TemplatePath} = '$Foswiki::cfg{TemplateDir}/$web/$name.$skin.tmpl, $Foswiki::cfg{TemplateDir}/$name.$skin.tmpl, $web.$skinSkin$nameTemplate, $Foswiki::cfg{SystemWebName}.$skinSkin$nameTemplate, $Foswiki::cfg{TemplateDir}/$web/$name.tmpl, $Foswiki::cfg{TemplateDir}/$name.tmpl, $web.$nameTemplate, $Foswiki::cfg{SystemWebName}.$nameTemplate'; -$Foswiki::cfg{ToolsDir} = '/var/www/foswiki/tools'; -$Foswiki::cfg{TopicUserMapping}{ForceManageEmails} = 0; -$Foswiki::cfg{Trace}{LoginManager} = 0; -$Foswiki::cfg{TrashWebName} = 'Trash'; -$Foswiki::cfg{UploadFilter} = '^((?i)\\.htaccess|.*\\.(?i)(?:php[0-9s]?(\\..*)?|[sp]?htm[l]?(\\..*)?|pl|py|cgi)?)$'; -$Foswiki::cfg{UseClientSessions} = 1; -$Foswiki::cfg{UseLocale} = 0; -$Foswiki::cfg{UsePathForRedirectCache} = 0; -$Foswiki::cfg{UserInterfaceInternationalisation} = 0; -$Foswiki::cfg{UserMappingManager} = 'Foswiki::Users::TopicUserMapping'; -$Foswiki::cfg{UsersTopicName} = 'WikiUsers'; -$Foswiki::cfg{UsersWebName} = 'Main'; -$Foswiki::cfg{Validation}{ExpireKeyOnUse} = 1; -$Foswiki::cfg{Validation}{MaxKeysPerSession} = 1000; -$Foswiki::cfg{Validation}{Method} = 'strikeone'; -$Foswiki::cfg{Validation}{ValidForTime} = 3600; -$Foswiki::cfg{WarningFileName} = ''; -$Foswiki::cfg{WebMasterEmail} = ''; -$Foswiki::cfg{WebMasterName} = 'Wiki Administrator'; -$Foswiki::cfg{WebPrefsTopicName} = 'WebPreferences'; -$Foswiki::cfg{WorkingDir} = '/var/www/foswiki/working'; -1; diff --git a/tests/v19.sh b/tests/v19.sh new file mode 100755 index 0000000..cebb06f --- /dev/null +++ b/tests/v19.sh @@ -0,0 +1,130 @@ +#!/bin/bash +set -Eeuo pipefail +umask 077 + +result=${TKL_TEST_RESULT:?TKL_TEST_RESULT is required} +app_password=${TKL_TEST_APP_PASS:?TKL_TEST_APP_PASS is required} +base=https://localhost +cookie=/tmp/tkl-foswiki-cookie.$$ +page=/tmp/tkl-foswiki-page.$$ +headers=/tmp/tkl-foswiki-headers.$$ + +cleanup() { + rm -f -- "$cookie" "$page" "$headers" +} +trap cleanup EXIT + +hidden_value() { + local name=$1 + local source=$2 + sed -n "s/.*name=['\"]${name}['\"][^>]*value=['\"]\([^'\"]*\)['\"].*/\1/p" \ + "$source" | head -n1 +} + +strike_key() { + local source=$1 + local raw secret + raw=$(hidden_value validation_key "$source") + raw=${raw#\?} + secret=$(awk '$6 == "FOSWIKISTRIKEONE" {print $7}' "$cookie" | tail -n1) + test -n "$raw" + test -n "$secret" + printf '%s' "$raw$secret" | md5sum | awk '{print $1}' +} + +systemctl --quiet is-active apache2.service postfix.service cron.service \ + multi-user.target +systemctl --quiet is-enabled apache2.service postfix.service cron.service +apache2ctl -t +apache2ctl -M 2>/dev/null | grep -q ' cgid_module ' +apache2ctl -M 2>/dev/null | grep -q ' rewrite_module ' +apache2ctl -M 2>/dev/null | grep -q ' ssl_module ' +grep -Fxq 'VERSION_CODENAME=trixie' /etc/os-release +grep -Eq '^turnkey-foswiki-19\.0' /etc/turnkey_version +grep -Fq '[40foswiki] successfully completed' /var/log/inithooks.log + +installed_version=$(cd /var/www/foswiki && \ + perl -I lib -MFoswiki -e 'print $Foswiki::VERSION') +test "$installed_version" = v2.1.11 +stat -c '%U:%G %a' /var/www/foswiki/data/.htpasswd | + grep -Eq '^www-data:www-data 600$' +grep -Fq "\$Foswiki::cfg{DefaultUrlHost} = 'https://localhost';" \ + /var/www/foswiki/lib/LocalSite.cfg +grep -Fq "\$Foswiki::cfg{WebMasterEmail} = 'admin@example.invalid';" \ + /var/www/foswiki/lib/LocalSite.cfg + +login_url="$base/foswiki/bin/login/Main/WebHome" +curl --insecure --fail --silent --show-error \ + --cookie-jar "$cookie" "$login_url" >"$page" +key=$(strike_key "$page") +curl --insecure --silent --show-error \ + --cookie "$cookie" --cookie-jar "$cookie" \ + --data-urlencode "validation_key=$key" \ + --data-urlencode 'username=admin' \ + --data-urlencode "password=$app_password" \ + --data-urlencode 'foswiki_origin=GET,view,/foswiki/bin/view' \ + --dump-header "$headers" --output "$page" "$login_url" +grep -q '^HTTP/.* 302' "$headers" +curl --insecure --fail --silent --show-error \ + --cookie "$cookie" "$base/foswiki/bin/view" >"$page" +grep -Fq 'AdminUser' "$page" +grep -Fq 'Log Out' "$page" + +topic="TurnKeyV19Acceptance$$" +text="Foswiki topic persistence round trip $$" +edit_url="$base/foswiki/bin/edit/Main/$topic?nowysiwyg=1" +curl --insecure --fail --silent --show-error \ + --cookie "$cookie" --cookie-jar "$cookie" "$edit_url" >"$page" +key=$(strike_key "$page") +curl --insecure --silent --show-error \ + --cookie "$cookie" --cookie-jar "$cookie" \ + --data-urlencode "validation_key=$key" \ + --data-urlencode "topic=Main.$topic" \ + --data-urlencode "text=$text" \ + --data-urlencode 'action_save=1' \ + --data-urlencode 'newtopic=1' \ + --data-urlencode 'nowysiwyg=1' \ + --dump-header "$headers" --output "$page" "$base/foswiki/bin/save" +grep -q '^HTTP/.* 302' "$headers" +grep -Fq "/foswiki/bin/view/Main/$topic" "$headers" +curl --insecure --fail --silent --show-error \ + --cookie "$cookie" "$base/foswiki/bin/view/Main/$topic" >"$page" +grep -Fq "$text" "$page" +grep -Fq "$text" "/var/www/foswiki/data/Main/$topic.txt" +grep -Fq "save | Main.$topic" /var/www/foswiki/working/logs/events.log + +grep -Fxq '15 0 * * * www-data perl -I /var/www/foswiki/bin /var/www/foswiki/tools/tick_foswiki.pl >/dev/null 2>&1' \ + /etc/cron.d/foswiki +grep -Fxq '30 0 * * * www-data perl -I /var/www/foswiki/bin /var/www/foswiki/tools/mailnotify -q >/dev/null 2>&1' \ + /etc/cron.d/foswiki +grep -Fxq '45 0 * * * www-data cd /var/www/foswiki/bin && ./statistics -subwebs 1 >/dev/null 2>&1' \ + /etc/cron.d/foswiki +runuser -u www-data -- perl -I /var/www/foswiki/bin \ + /var/www/foswiki/tools/tick_foswiki.pl +runuser -u www-data -- perl -I /var/www/foswiki/bin \ + /var/www/foswiki/tools/mailnotify -q +(cd /var/www/foswiki/bin && runuser -u www-data -- \ + ./statistics -subwebs 1 >/dev/null) + +dpkg-query -W rcs libdbi-perl webmin-apache postfix >/dev/null +curl --insecure --fail --silent --show-error --head \ + https://127.0.0.1:12321/ >/dev/null +ss -ltn | grep -Eq '127\.0\.0\.1:25[[:space:]]' + +latest_name=$(curl --fail --silent --show-error \ + https://api.github.com/repos/foswiki/distro/releases/latest | + sed -n 's/.*"name": "Foswiki-\([^"]*\)".*/\1/p' | head -n1) +test -n "$latest_name" +test "v$latest_name" = "$installed_version" +grep -Rqs '^Suites: trixie' /etc/apt/sources.list.d +! grep -Rqi bookworm /etc/apt/sources.list /etc/apt/sources.list.d + +cat >"$result" < Date: Tue, 25 Aug 2026 07:59:44 +0000 Subject: [PATCH 2/3] Create Foswiki administrator credentials at firstboot The v19 build generated a current Foswiki configuration, but that process did not create the password-manager file expected by the firstboot hook. Normal initialization therefore failed before administrator authentication. Install the Debian htpasswd utility explicitly, create the documented admin account from the firstboot password over standard input, and set the password file to the ownership and mode required by the web service. Static shell and Python validation pass; the exact appliance build and login flow remain the acceptance gate. --- overlay/usr/lib/inithooks/bin/foswiki.py | 4 +++- overlay/usr/lib/inithooks/firstboot.d/40foswiki | 1 + plan/main | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/overlay/usr/lib/inithooks/bin/foswiki.py b/overlay/usr/lib/inithooks/bin/foswiki.py index 73f7202..0e45c21 100755 --- a/overlay/usr/lib/inithooks/bin/foswiki.py +++ b/overlay/usr/lib/inithooks/bin/foswiki.py @@ -10,7 +10,7 @@ import sys import getopt -from subprocess import check_output +from subprocess import check_output, run from libinithooks import inithooks_cache from libinithooks.dialog_wrapper import Dialog @@ -85,6 +85,8 @@ def main(): '-set', '{Password}=%s' % password, '-set', '{WebMasterEmail}=%s' % email, '-set', '{DefaultUrlHost}=%s' % domain]) + run(['htpasswd', '-ci', '/var/www/foswiki/data/.htpasswd', 'admin'], + input=password + '\n', text=True, check=True) if __name__ == "__main__": diff --git a/overlay/usr/lib/inithooks/firstboot.d/40foswiki b/overlay/usr/lib/inithooks/firstboot.d/40foswiki index 916697a..c591268 100755 --- a/overlay/usr/lib/inithooks/firstboot.d/40foswiki +++ b/overlay/usr/lib/inithooks/firstboot.d/40foswiki @@ -5,4 +5,5 @@ [ -e $INITHOOKS_CONF ] && . $INITHOOKS_CONF $INITHOOKS_PATH/bin/foswiki.py --pass="$APP_PASS" --email="$APP_EMAIL" --domain="$APP_DOMAIN" +chmod 600 /var/www/foswiki/data/.htpasswd chown www-data:www-data /var/www/foswiki/data/.htpasswd diff --git a/plan/main b/plan/main index 7cbb504..4ac5d39 100644 --- a/plan/main +++ b/plan/main @@ -2,6 +2,7 @@ webmin-apache apache2 +apache2-utils // System requirements as per "Ubuntu and other Debian derived distributions" // http://foswiki.org/System/SystemRequirements From 54ee965149cbc38d0d3d976085ac3d174f1c22c1 Mon Sep 17 00:00:00 2001 From: Liraz Siri Date: Wed, 26 Aug 2026 04:20:02 +0000 Subject: [PATCH 3/3] Exercise the supported Foswiki patch upgrade Replace release-discovery-only updater evidence with a disposable 2.1.10 to 2.1.11 upgrade using Foswiki's published procedure. Verify both official archive digests and reuse the real administrator login and topic flow to prove state survives the upgrade. Open the root-private verified archive in the test shell so Foswiki's documented extraction still runs as the web server user. Verification: bash -n tests/v19.sh; git diff --check; focused private-archive extraction as www-data in tkldev19-dev. Exact run 20260826t042014z-8079-4475 passed build, firstboot, and runtime readiness, then reproduced the corrected archive permission failure. --- docs/v19.0-testing.md | 10 ++- tests/v19.sh | 145 ++++++++++++++++++++++++++++++------------ 2 files changed, 112 insertions(+), 43 deletions(-) diff --git a/docs/v19.0-testing.md b/docs/v19.0-testing.md index edd1a35..aba345f 100644 --- a/docs/v19.0-testing.md +++ b/docs/v19.0-testing.md @@ -13,7 +13,7 @@ dependencies come from signed Debian Trixie repositories. ```sh /sandboxed-git/turnkey/tools/test-v19-appliance foswiki \ - --source /home/agent/.local/worktrees/turnkey-apps/foswiki/wish-foswiki-v19-trixie + --source /home/agent/.local/worktrees/turnkey-apps/foswiki/fix-foswiki-v19-upgrade-evidence ``` ## README crosswalk @@ -26,7 +26,7 @@ dependencies come from signed Debian Trixie repositories. | Scheduled maintenance is configured | Validate and invoke session cleanup, mail notification and statistics commands as `www-data` | Every documented cron command exits successfully under the web identity | `tests/v19.sh` | | Postfix supports Foswiki mail | Require active service state and inspect its listener | SMTP is bound to loopback | `tests/v19.sh` | | Webmin manages Apache | Require the module and request Webmin HTTPS | The module is installed and Webmin answers on port 12321 | `tests/v19.sh` | -| Foswiki has a maintained update path | Query the official stable release endpoint and compare it with Foswiki runtime metadata | The current stable version matches the installed release without changing files | `tests/v19.sh` | +| Foswiki has a maintained update path | Query the official stable release endpoint, install official Foswiki 2.1.10 in the disposable test container, then apply the official 2.1.11 upgrade archive using the published patch-upgrade procedure | Both archive digests match upstream release metadata, the runtime reaches 2.1.11, and the administrator can still authenticate and read a topic created before the upgrade | `tests/v19.sh` | | Standard TurnKey administration is inherited from Core | Cite the unchanged Core layer | Core 19 baseline passes | Core run `20260824t010251z-1634-32241`, source `24c82ee3540ce545422742b0e28ba6b687c53ec2`, verdict `PASS` | ## Static and economical preflight checks @@ -44,7 +44,11 @@ generated the current configuration, served Foswiki through Apache, logged in as the configured administrator and created a topic through the real web edit/save flow. The rendered page, underlying topic file and event log all confirmed the write. The maintenance and notification commands also ran as -`www-data`. +`www-data`. The same acceptance run also verified the official Foswiki 2.1.10 +full archive and 2.1.11 upgrade archive SHA-256 digests, created a topic as the +administrator on 2.1.10, applied the documented patch upgrade as `www-data`, +ran Foswiki's configuration update, and confirmed the 2.1.11 runtime retained +both the administrator login and topic content. ## Known limitation and deferred issues diff --git a/tests/v19.sh b/tests/v19.sh index cebb06f..52c95a9 100755 --- a/tests/v19.sh +++ b/tests/v19.sh @@ -8,9 +8,13 @@ base=https://localhost cookie=/tmp/tkl-foswiki-cookie.$$ page=/tmp/tkl-foswiki-page.$$ headers=/tmp/tkl-foswiki-headers.$$ +upgrade_fixture= cleanup() { rm -f -- "$cookie" "$page" "$headers" + if [ -n "$upgrade_fixture" ]; then + rm -rf -- "$upgrade_fixture" + fi } trap cleanup EXIT @@ -32,6 +36,53 @@ strike_key() { printf '%s' "$raw$secret" | md5sum | awk '{print $1}' } +login_admin() { + local login_url key + login_url="$base/foswiki/bin/login/Main/WebHome" + rm -f -- "$cookie" + curl --insecure --fail --silent --show-error \ + --cookie-jar "$cookie" "$login_url" >"$page" + key=$(strike_key "$page") + curl --insecure --silent --show-error \ + --cookie "$cookie" --cookie-jar "$cookie" \ + --data-urlencode "validation_key=$key" \ + --data-urlencode 'username=admin' \ + --data-urlencode "password=$app_password" \ + --data-urlencode 'foswiki_origin=GET,view,/foswiki/bin/view' \ + --dump-header "$headers" --output "$page" "$login_url" + grep -q '^HTTP/.* 302' "$headers" + curl --insecure --fail --silent --show-error \ + --cookie "$cookie" "$base/foswiki/bin/view" >"$page" + grep -Fq 'AdminUser' "$page" + grep -Fq 'Log Out' "$page" +} + +create_topic() { + local topic=$1 + local text=$2 + local edit_url key + edit_url="$base/foswiki/bin/edit/Main/$topic?nowysiwyg=1" + curl --insecure --fail --silent --show-error \ + --cookie "$cookie" --cookie-jar "$cookie" "$edit_url" >"$page" + key=$(strike_key "$page") + curl --insecure --silent --show-error \ + --cookie "$cookie" --cookie-jar "$cookie" \ + --data-urlencode "validation_key=$key" \ + --data-urlencode "topic=Main.$topic" \ + --data-urlencode "text=$text" \ + --data-urlencode 'action_save=1' \ + --data-urlencode 'newtopic=1' \ + --data-urlencode 'nowysiwyg=1' \ + --dump-header "$headers" --output "$page" "$base/foswiki/bin/save" + grep -q '^HTTP/.* 302' "$headers" + grep -Fq "/foswiki/bin/view/Main/$topic" "$headers" + curl --insecure --fail --silent --show-error \ + --cookie "$cookie" "$base/foswiki/bin/view/Main/$topic" >"$page" + grep -Fq "$text" "$page" + grep -Fq "$text" "/var/www/foswiki/data/Main/$topic.txt" + grep -Fq "save | Main.$topic" /var/www/foswiki/working/logs/events.log +} + systemctl --quiet is-active apache2.service postfix.service cron.service \ multi-user.target systemctl --quiet is-enabled apache2.service postfix.service cron.service @@ -53,45 +104,10 @@ grep -Fq "\$Foswiki::cfg{DefaultUrlHost} = 'https://localhost';" \ grep -Fq "\$Foswiki::cfg{WebMasterEmail} = 'admin@example.invalid';" \ /var/www/foswiki/lib/LocalSite.cfg -login_url="$base/foswiki/bin/login/Main/WebHome" -curl --insecure --fail --silent --show-error \ - --cookie-jar "$cookie" "$login_url" >"$page" -key=$(strike_key "$page") -curl --insecure --silent --show-error \ - --cookie "$cookie" --cookie-jar "$cookie" \ - --data-urlencode "validation_key=$key" \ - --data-urlencode 'username=admin' \ - --data-urlencode "password=$app_password" \ - --data-urlencode 'foswiki_origin=GET,view,/foswiki/bin/view' \ - --dump-header "$headers" --output "$page" "$login_url" -grep -q '^HTTP/.* 302' "$headers" -curl --insecure --fail --silent --show-error \ - --cookie "$cookie" "$base/foswiki/bin/view" >"$page" -grep -Fq 'AdminUser' "$page" -grep -Fq 'Log Out' "$page" - +login_admin topic="TurnKeyV19Acceptance$$" text="Foswiki topic persistence round trip $$" -edit_url="$base/foswiki/bin/edit/Main/$topic?nowysiwyg=1" -curl --insecure --fail --silent --show-error \ - --cookie "$cookie" --cookie-jar "$cookie" "$edit_url" >"$page" -key=$(strike_key "$page") -curl --insecure --silent --show-error \ - --cookie "$cookie" --cookie-jar "$cookie" \ - --data-urlencode "validation_key=$key" \ - --data-urlencode "topic=Main.$topic" \ - --data-urlencode "text=$text" \ - --data-urlencode 'action_save=1' \ - --data-urlencode 'newtopic=1' \ - --data-urlencode 'nowysiwyg=1' \ - --dump-header "$headers" --output "$page" "$base/foswiki/bin/save" -grep -q '^HTTP/.* 302' "$headers" -grep -Fq "/foswiki/bin/view/Main/$topic" "$headers" -curl --insecure --fail --silent --show-error \ - --cookie "$cookie" "$base/foswiki/bin/view/Main/$topic" >"$page" -grep -Fq "$text" "$page" -grep -Fq "$text" "/var/www/foswiki/data/Main/$topic.txt" -grep -Fq "save | Main.$topic" /var/www/foswiki/working/logs/events.log +create_topic "$topic" "$text" grep -Fxq '15 0 * * * www-data perl -I /var/www/foswiki/bin /var/www/foswiki/tools/tick_foswiki.pl >/dev/null 2>&1' \ /etc/cron.d/foswiki @@ -116,6 +132,55 @@ latest_name=$(curl --fail --silent --show-error \ sed -n 's/.*"name": "Foswiki-\([^"]*\)".*/\1/p' | head -n1) test -n "$latest_name" test "v$latest_name" = "$installed_version" + +# Exercise Foswiki's documented patch upgrade on a disposable 2.1.10 tree. +upgrade_fixture=$(mktemp -d /tmp/tkl-foswiki-upgrade.XXXXXX) +full_archive="$upgrade_fixture/Foswiki-2.1.10.tgz" +upgrade_archive="$upgrade_fixture/Foswiki-upgrade-2.1.11.tgz" +curl --fail --silent --show-error --location --output "$full_archive" \ + https://github.com/foswiki/distro/releases/download/FoswikiRelease02x01x10/Foswiki-2.1.10.tgz +curl --fail --silent --show-error --location --output "$upgrade_archive" \ + https://github.com/foswiki/distro/releases/download/FoswikiRelease02x01x11/Foswiki-upgrade-2.1.11.tgz +printf '%s %s\n' \ + e566ee46b8b525f5646e07f0e87c7192956ef22989b7e3df73721d9cc69ce1d2 \ + "$full_archive" | sha256sum --check --status +printf '%s %s\n' \ + bcbe0486f03a75834dd5c67b539a05e9445f918bdb20edfd391a577fb90df9f7 \ + "$upgrade_archive" | sha256sum --check --status + +cp /var/www/foswiki/lib/LocalSite.cfg "$upgrade_fixture/LocalSite.cfg" +cp /var/www/foswiki/data/.htpasswd "$upgrade_fixture/.htpasswd" +systemctl stop apache2.service +rm -rf -- /var/www/foswiki +install -d -o www-data -g www-data /var/www/foswiki +tar --strip-components=1 -zxf "$full_archive" -C /var/www/foswiki +install -o www-data -g www-data -m 640 \ + "$upgrade_fixture/LocalSite.cfg" /var/www/foswiki/lib/LocalSite.cfg +install -o www-data -g www-data -m 600 \ + "$upgrade_fixture/.htpasswd" /var/www/foswiki/data/.htpasswd +chown -R www-data:www-data /var/www/foswiki +systemctl start apache2.service +test "$(cd /var/www/foswiki && perl -I lib -MFoswiki -e 'print $Foswiki::VERSION')" = v2.1.10 + +login_admin +upgrade_topic="TurnKeyUpgradeAcceptance$$" +upgrade_text="Foswiki 2.1.10 to 2.1.11 persistence round trip $$" +create_topic "$upgrade_topic" "$upgrade_text" + +systemctl stop apache2.service +runuser -u www-data -- tar --strip-components=1 -zxf - \ + -C /var/www/foswiki <"$upgrade_archive" +(cd /var/www/foswiki/tools && \ + runuser -u www-data -- ./configure --save) +find /var/www/foswiki/working/tmp -mindepth 1 -delete +systemctl start apache2.service +test "$(cd /var/www/foswiki && perl -I lib -MFoswiki -e 'print $Foswiki::VERSION')" = v2.1.11 +login_admin +curl --insecure --fail --silent --show-error \ + --cookie "$cookie" "$base/foswiki/bin/view/Main/$upgrade_topic" >"$page" +grep -Fq "$upgrade_text" "$page" +grep -Fq "$upgrade_text" "/var/www/foswiki/data/Main/$upgrade_topic.txt" + grep -Rqs '^Suites: trixie' /etc/apt/sources.list.d ! grep -Rqi bookworm /etc/apt/sources.list /etc/apt/sources.list.d @@ -123,8 +188,8 @@ cat >"$result" <