Nextcloud 17.0.2 → 18.0.1 upgrade memo

Nextcloudを17.0.2から18.0.1にupgradeしました.

$ sudo -u www-data php ./occ status
  - installed: true
  - version: 18.0.1.3
  - versionstring: 18.0.1
  - edition:

17系のeolは2020-09で18系のeolは2021-01のようです.もうしばらく17でもいいかも.

今回以下のページを参考に updater.phar でupgradeしました.
※実行前に念の為dbバックアップとかしておきましょう.

$ cd $NEXTCLIUDPATH
$ sudo -u www-data php ./updater/updater.phar
Nextcloud Updater - version: v16.0.3-3-ga0c2b25 dirty
Current version is 17.0.2.
Update to Nextcloud 18.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-18.0.1.zip
Open changelog ↗
Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrityapp:check-code
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done
Start update? [y/N] y
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done
Update of code successful.
Should the "occ upgrade" command be executed? [Y/n] Y
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
2020-03-02T19:16:42+00:00 Set log level to debug
2020-03-02T19:16:42+00:00 Repair step: Repair MySQL collation
2020-03-02T19:16:42+00:00 Repair info: All tables already have the correct collation -> nothing to do
2020-03-02T19:16:42+00:00 Repair step: Repair SQLite autoincrement
2020-03-02T19:16:42+00:00 Repair step: Copy data from accounts table when migrating from ownCloud
2020-03-02T19:16:43+00:00 Repair step: Drop account terms table when migrating from ownCloud
2020-03-02T19:16:43+00:00 Updating database schema
2020-03-02T19:16:46+00:00 Updated database
2020-03-02T19:16:46+00:00 Disabled incompatible app: announcementcenter
2020-03-02T19:16:46+00:00 Disabled incompatible app: data_request
2020-03-02T19:16:46+00:00 Disabled incompatible app: external
2020-03-02T19:16:46+00:00 Disabled incompatible app: files_snapshots
2020-03-02T19:16:46+00:00 Disabled incompatible app: fulltextsearch_elasticsearch
2020-03-02T19:16:46+00:00 Disabled incompatible app: gallery
2020-03-02T19:16:46+00:00 Disabled incompatible app: gpxedit
2020-03-02T19:16:46+00:00 Disabled incompatible app: quota_warning
2020-03-02T19:16:46+00:00 Disabled incompatible app: ransomware_protection
2020-03-02T19:16:46+00:00 Disabled incompatible app: sharerenamer
2020-03-02T19:16:46+00:00 Disabled incompatible app: social
2020-03-02T19:16:46+00:00 Disabled incompatible app: socialsharing_diaspora
2020-03-02T19:16:46+00:00 Disabled incompatible app: socialsharing_email
2020-03-02T19:16:46+00:00 Disabled incompatible app: socialsharing_twitter
2020-03-02T19:16:46+00:00 Disabled incompatible app: spreed
2020-03-02T19:16:46+00:00 Updating <accessibility> ...
2020-03-02T19:16:46+00:00 Repair step: Migrate old user config
2020-03-02T19:16:46+00:00 Migrate old user config
2020-03-02T19:16:46+00:00
2020-03-02T19:16:46+00:00  Starting ...
0/0 [>-]   0%2020-03-02T19:16:46+00:00
Starting ...
1/0 [->]   0%2020-03-02T19:16:46+00:00
Starting ...
2/0 [-->]   0%2020-03-02T19:16:46+00:00
Starting ...
3/0 [--->]   0%2020-03-02T19:16:46+00:00
2020-03-02T19:16:46+00:00 Updated <accessibility> to 1.4.0
2020-03-02T19:16:46+00:00 Updating <federatedfilesharing> ...
2020-03-02T19:16:46+00:00 Updated <federatedfilesharing> to 1.8.0
2020-03-02T19:16:46+00:00 Updating <files_pdfviewer> ...
2020-03-02T19:16:47+00:00 Updated <files_pdfviewer> to 1.7.0
2020-03-02T19:16:47+00:00 Updating <files_rightclick> ...
2020-03-02T19:16:47+00:00 Updated <files_rightclick> to 0.15.2
2020-03-02T19:16:47+00:00 Updating <files_videoplayer> ...
2020-03-02T19:16:47+00:00 Updated <files_videoplayer> to 1.7.0
2020-03-02T19:16:47+00:00 Updating <logreader> ...
2020-03-02T19:16:47+00:00 Updated <logreader> to 2.3.0
2020-03-02T19:16:47+00:00 Updating <password_policy> ...
2020-03-02T19:16:47+00:00 Updated <password_policy> to 1.8.0
2020-03-02T19:16:47+00:00 Updating <privacy> ...
2020-03-02T19:16:48+00:00 Updated <privacy> to 1.2.0
2020-03-02T19:16:48+00:00 Updating <provisioning_api> ...
2020-03-02T19:16:48+00:00 Updated <provisioning_api> to 1.8.0
2020-03-02T19:16:48+00:00 Updating <recommendations> ...
2020-03-02T19:16:48+00:00 Updated <recommendations> to 0.6.0
2020-03-02T19:16:48+00:00 Updating <serverinfo> ...
2020-03-02T19:16:48+00:00 Updated <serverinfo> to 1.8.0
2020-03-02T19:16:48+00:00 Updating <support> ...
2020-03-02T19:16:49+00:00 Updated <support> to 1.1.0
2020-03-02T19:16:49+00:00 Updating <survey_client> ...
2020-03-02T19:16:49+00:00 Updated <survey_client> to 1.6.0
2020-03-02T19:16:49+00:00 Updating <text> ...
2020-03-02T19:16:49+00:00 Updated <text> to 2.0.0
2020-03-02T19:16:49+00:00 Updating <twofactor_backupcodes> ...
2020-03-02T19:16:49+00:00 Repair step: Add background job to check for backup codes
2020-03-02T19:16:49+00:00 Updated <twofactor_backupcodes> to 1.7.0
2020-03-02T19:16:49+00:00 Updating <updatenotification> ...
2020-03-02T19:16:50+00:00 Updated <updatenotification> to 1.8.0
2020-03-02T19:16:50+00:00 Updating <federation> ...
2020-03-02T19:16:50+00:00 Updated <federation> to 1.8.0
2020-03-02T19:16:50+00:00 Updating <lookup_server_connector> ...
2020-03-02T19:16:50+00:00 Updated <lookup_server_connector> to 1.6.0
2020-03-02T19:16:50+00:00 Updating <oauth2> ...
2020-03-02T19:16:50+00:00 Repair step: Update OAuth token expiration times
2020-03-02T19:16:50+00:00 Updated <oauth2> to 1.6.0
2020-03-02T19:16:50+00:00 Updating <files> ...
2020-03-02T19:16:51+00:00 Updated <files> to 1.13.1
2020-03-02T19:16:51+00:00 Updating <activity> ...
2020-03-02T19:16:52+00:00 Updated <activity> to 2.11.0
2020-03-02T19:16:52+00:00 Updating <cloud_federation_api> ...
2020-03-02T19:16:52+00:00 Updated <cloud_federation_api> to 1.1.0
2020-03-02T19:16:52+00:00 Updating <dav> ...
2020-03-02T19:16:52+00:00 Repair step: Fix component of birthday calendars
2020-03-02T19:16:52+00:00 Repair info: 4 birthday calendars updated.
2020-03-02T19:16:52+00:00 Repair step: Regenerating birthday calendars to use new icons and fix old birthday events without year
2020-03-02T19:16:52+00:00 Repair info: Repair step already executed
2020-03-02T19:16:52+00:00 Repair step: Fix broken values of calendar objects
2020-03-02T19:16:52+00:00  Starting ...
0/0 [>-]   0%2020-03-02T19:16:52+00:00 Fix broken values of calendar objects
2020-03-02T19:16:52+00:00
2020-03-02T19:16:52+00:00
2020-03-02T19:16:52+00:00 Repair step: Registering building of calendar search index as background job
2020-03-02T19:16:52+00:00 Repair info: Repair step already executed
2020-03-02T19:16:52+00:00 Repair step: Registering background jobs to update cache for webcal calendars
2020-03-02T19:16:52+00:00 Repair info: Added 0 background jobs to update webcal calendars
2020-03-02T19:16:52+00:00 Repair step: Registering building of calendar reminder index as background job
2020-03-02T19:16:52+00:00 Repair info: Repair step already executed
2020-03-02T19:16:52+00:00 Repair step: Clean up orphan event and contact data
2020-03-02T19:16:52+00:00 Repair info: 0 events without a calendar have been cleaned up
2020-03-02T19:16:52+00:00 Repair info: 0 properties without an events have been cleaned up
2020-03-02T19:16:52+00:00 Repair info: 0 changes without a calendar have been cleaned up
2020-03-02T19:16:52+00:00 Repair info: 0 cached events without a calendar subscription have been cleaned up
2020-03-02T19:16:52+00:00 Repair info: 0 changes without a calendar subscription have been cleaned up
2020-03-02T19:16:52+00:00 Repair info: 0 contacts without an addressbook have been cleaned up
2020-03-02T19:16:52+00:00 Repair info: 0 properties without a contact have been cleaned up
2020-03-02T19:16:52+00:00 Repair info: 0 changes without an addressbook have been cleaned up
2020-03-02T19:16:52+00:00 Repair step: Remove activity entries of private events
2020-03-02T19:16:53+00:00 Repair info: Removed 0 activity entries
2020-03-02T19:16:53+00:00 Updated <dav> to 1.14.0
2020-03-02T19:16:53+00:00 Updating <encryption> ...
2020-03-02T19:16:53+00:00 Repair step: Write default encryption module configuration to the database
2020-03-02T19:16:53+00:00 Updated <encryption> to 2.6.0
2020-03-02T19:16:53+00:00 Updating <files_external> ...
2020-03-02T19:16:53+00:00 Updated <files_external> to 1.9.0
2020-03-02T19:16:53+00:00 Updating <files_sharing> ...
2020-03-02T19:16:54+00:00 Repair step: Fix the share type of guest shares when migrating from ownCloud
2020-03-02T19:16:54+00:00 Repair step: Copy the share password into the dedicated column
2020-03-02T19:16:54+00:00 Repair step: Set existing shares as accepted
2020-03-02T19:16:54+00:00 Updated <files_sharing> to 1.10.1
2020-03-02T19:16:54+00:00 Updating <files_trashbin> ...
2020-03-02T19:16:54+00:00 Updated <files_trashbin> to 1.8.0
2020-03-02T19:16:54+00:00 Updating <files_versions> ...
2020-03-02T19:16:54+00:00 Updated <files_versions> to 1.11.0
2020-03-02T19:16:54+00:00 Updating <sharebymail> ...
2020-03-02T19:16:55+00:00 Updated <sharebymail> to 1.8.0
2020-03-02T19:16:55+00:00 Updating <workflowengine> ...
2020-03-02T19:16:56+00:00 Repair step: Populating added database structures for workflows
2020-03-02T19:16:56+00:00 Updated <workflowengine> to 2.0.0
2020-03-02T19:16:56+00:00 Updating <admin_audit> ...
2020-03-02T19:16:56+00:00 Updated <admin_audit> to 1.8.0
2020-03-02T19:16:56+00:00 Updating <comments> ...
2020-03-02T19:16:56+00:00 Updated <comments> to 1.8.0
2020-03-02T19:16:56+00:00 Updating <firstrunwizard> ...
2020-03-02T19:16:56+00:00 Updated <firstrunwizard> to 2.7.0
2020-03-02T19:16:56+00:00 Updating <nextcloud_announcements> ...
2020-03-02T19:16:57+00:00 Updated <nextcloud_announcements> to 1.7.0
2020-03-02T19:16:57+00:00 Updating <notifications> ...
2020-03-02T19:16:57+00:00 Updated <notifications> to 2.6.0
2020-03-02T19:16:57+00:00 Updating <systemtags> ...
2020-03-02T19:16:57+00:00 Updated <systemtags> to 1.8.0
2020-03-02T19:16:57+00:00 Updating <theming> ...
2020-03-02T19:16:57+00:00 Updated <theming> to 1.9.0
2020-03-02T19:16:57+00:00 Checking for update of app accessibility in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "accessibility" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app activity in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "activity" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app admin_audit in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "admin_audit" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app bruteforcesettings in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "bruteforcesettings" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app calendar in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "calendar" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app camerarawpreviews in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "camerarawpreviews" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app carnet in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "carnet" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app checksum in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "checksum" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app cloud_federation_api in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "cloud_federation_api" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app cms_pico in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "cms_pico" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app comments in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "comments" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app dav in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "dav" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app encryption in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "encryption" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app federatedfilesharing in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "federatedfilesharing" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app federation in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "federation" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_antivirus in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_antivirus" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_external in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_external" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_markdown in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_markdown" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_mindmap in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_mindmap" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_pdfviewer in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_pdfviewer" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_rightclick in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_rightclick" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_sharing in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_sharing" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_trashbin in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_trashbin" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_versions in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_versions" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app files_videoplayer in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "files_videoplayer" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app firstrunwizard in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "firstrunwizard" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app forms in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "forms" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app gpxpod in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "gpxpod" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app logreader in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "logreader" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app lookup_server_connector in appstore
2020-03-02T19:17:02+00:00 Checked for update of app "lookup_server_connector" in appstore
2020-03-02T19:17:02+00:00 Checking for update of app mail in appstore
2020-03-02T19:17:02+00:00 Update app mail from appstore
2020-03-02T19:17:13+00:00 Repair step: Purify and migrate collected mail addresses
2020-03-02T19:17:13+00:00 Purify and migrate collected mail addresses
2020-03-02T19:17:13+00:00
2020-03-02T19:17:13+00:00  Starting ...
0/0 [>-]   0%2020-03-02T19:17:13+00:00
2020-03-02T19:17:13+00:00 Repair step: Make Mail itinerary extractor executable
2020-03-02T19:17:13+00:00 Repair step: Migrate Mail provisioning config from config.php to the database
2020-03-02T19:17:13+00:00 Repair info: No old config found
2020-03-02T19:17:13+00:00 Repair step: Create or update provisioned Mail accounts
2020-03-02T19:17:13+00:00 Repair info: No Mail provisioning config set
2020-03-02T19:17:13+00:00 Checked for update of app "mail" in appstore
2020-03-02T19:17:13+00:00 Checking for update of app maps in appstore
2020-03-02T19:17:13+00:00 Update app maps from appstore
2020-03-02T19:17:19+00:00 Checked for update of app "maps" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app metadata in appstore
2020-03-02T19:17:19+00:00 Checked for update of app "metadata" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app nextcloud_announcements in appstore
2020-03-02T19:17:19+00:00 Checked for update of app "nextcloud_announcements" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app notes in appstore
2020-03-02T19:17:19+00:00 Checked for update of app "notes" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app notifications in appstore
2020-03-02T19:17:19+00:00 Checked for update of app "notifications" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app oauth2 in appstore
2020-03-02T19:17:19+00:00 Checked for update of app "oauth2" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app password_policy in appstore
2020-03-02T19:17:19+00:00 Checked for update of app "password_policy" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app phonetrack in appstore
2020-03-02T19:17:19+00:00 Checked for update of app "phonetrack" in appstore
2020-03-02T19:17:19+00:00 Checking for update of app polls in appstore
2020-03-02T19:17:19+00:00 Update app polls from appstore
2020-03-02T19:17:22+00:00 Checked for update of app "polls" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app privacy in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "privacy" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app provisioning_api in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "provisioning_api" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app recommendations in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "recommendations" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app registration in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "registration" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app richdocuments in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "richdocuments" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app serverinfo in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "serverinfo" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app settings in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "settings" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app sharebymail in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "sharebymail" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app support in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "support" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app survey_client in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "survey_client" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app systemtags in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "systemtags" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app tasks in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "tasks" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app text in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "text" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app theming in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "theming" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app twofactor_backupcodes in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "twofactor_backupcodes" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app twofactor_totp in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "twofactor_totp" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app updatenotification in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "updatenotification" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app viewer in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "viewer" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app workflowengine in appstore
2020-03-02T19:17:22+00:00 Checked for update of app "workflowengine" in appstore
2020-03-02T19:17:22+00:00 Checking for update of app announcementcenter in appstore
2020-03-02T19:17:22+00:00 Update app announcementcenter from appstore
2020-03-02T19:17:24+00:00 Repair step: Add read permissions for existing announcements
2020-03-02T19:17:24+00:00 Add read permissions for existing announcements
2020-03-02T19:17:24+00:00
2020-03-02T19:17:24+00:00  Starting ...
0/0 [>-]   0%2020-03-02T19:17:24+00:00
2020-03-02T19:17:24+00:00 Checked for update of app "announcementcenter" in appstore
2020-03-02T19:17:24+00:00 Repair step: Add read permissions for existing announcements
2020-03-02T19:17:24+00:00 Add read permissions for existing announcements
2020-03-02T19:17:24+00:00
2020-03-02T19:17:24+00:00  Starting ...
0/0 [>-]   0%2020-03-02T19:17:24+00:00
2020-03-02T19:17:24+00:00 Checking for update of app data_request in appstore
2020-03-02T19:17:24+00:00 Update app data_request from appstore
2020-03-02T19:17:27+00:00 Checked for update of app "data_request" in appstore
2020-03-02T19:17:27+00:00 Checking for update of app external in appstore
2020-03-02T19:17:27+00:00 Update app external from appstore
2020-03-02T19:17:29+00:00 Repair step: Copy default images to the app data directory
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Checked for update of app "external" in appstore
2020-03-02T19:17:29+00:00 Repair step: Copy default images to the app data directory
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Repair step: Copy default images to the app data directory
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Repair info: Icon %s already exists
2020-03-02T19:17:29+00:00 Checking for update of app files_snapshots in appstore
2020-03-02T19:17:29+00:00 Checked for update of app "files_snapshots" in appstore
2020-03-02T19:17:29+00:00 Checking for update of app fulltextsearch_elasticsearch in appstore
2020-03-02T19:17:29+00:00 Update app fulltextsearch_elasticsearch from appstore
2020-03-02T19:17:32+00:00 Checked for update of app "fulltextsearch_elasticsearch" in appstore
2020-03-02T19:17:32+00:00 Checking for update of app gallery in appstore
2020-03-02T19:17:32+00:00 Checked for update of app "gallery" in appstore
2020-03-02T19:17:32+00:00 Checking for update of app gpxedit in appstore
2020-03-02T19:17:32+00:00 Update app gpxedit from appstore
2020-03-02T19:17:34+00:00 Checked for update of app "gpxedit" in appstore
2020-03-02T19:17:34+00:00 Checking for update of app quota_warning in appstore
2020-03-02T19:17:34+00:00 Update app quota_warning from appstore
2020-03-02T19:17:36+00:00 Checked for update of app "quota_warning" in appstore
2020-03-02T19:17:36+00:00 Repair step: Add background jobs for existing users
2020-03-02T19:17:36+00:00 Add background jobs for existing users
2020-03-02T19:17:36+00:00
2020-03-02T19:17:36+00:00  Starting ...
0/0 [>-]   0%2020-03-02T19:17:36+00:00
Starting ...
1/0 [->]   0%2020-03-02T19:17:36+00:00
Starting ...
2/0 [-->]   0%2020-03-02T19:17:36+00:00
Starting ...
3/0 [--->]   0%2020-03-02T19:17:36+00:00
2020-03-02T19:17:36+00:00 Checking for update of app ransomware_protection in appstore
2020-03-02T19:17:36+00:00 Update app ransomware_protection from appstore
2020-03-02T19:17:38+00:00 Checked for update of app "ransomware_protection" in appstore
2020-03-02T19:17:38+00:00 Checking for update of app sharerenamer in appstore
2020-03-02T19:17:38+00:00 Checked for update of app "sharerenamer" in appstore
2020-03-02T19:17:38+00:00 Checking for update of app social in appstore
2020-03-02T19:17:38+00:00 Checked for update of app "social" in appstore
2020-03-02T19:17:38+00:00 Checking for update of app socialsharing_diaspora in appstore
2020-03-02T19:17:38+00:00 Update app socialsharing_diaspora from appstore
2020-03-02T19:17:39+00:00 Checked for update of app "socialsharing_diaspora" in appstore
2020-03-02T19:17:39+00:00 Checking for update of app socialsharing_email in appstore
2020-03-02T19:17:39+00:00 Update app socialsharing_email from appstore
2020-03-02T19:17:41+00:00 Checked for update of app "socialsharing_email" in appstore
2020-03-02T19:17:41+00:00 Checking for update of app socialsharing_twitter in appstore
2020-03-02T19:17:41+00:00 Update app socialsharing_twitter from appstore
2020-03-02T19:17:43+00:00 Checked for update of app "socialsharing_twitter" in appstore
2020-03-02T19:17:43+00:00 Checking for update of app spreed in appstore
2020-03-02T19:17:43+00:00 Update app spreed from appstore
2020-03-02T19:17:46+00:00 Repair error: Repair step 'OCA\Talk\Migration\FixNamespaceInDatabaseTables' is unknown
2020-03-02T19:17:46+00:00 Repair info: No repair steps available
2020-03-02T19:17:46+00:00 Repair error: Repair step 'OCA\Talk\Migration\CreateHelpCommand' is unknown
2020-03-02T19:17:46+00:00 Repair error: Repair step 'OCA\Talk\Migration\ClearResourceAccessCache' is unknown
2020-03-02T19:17:46+00:00 Repair info: No repair steps available
2020-03-02T19:17:46+00:00 Checked for update of app "spreed" in appstore
2020-03-02T19:17:46+00:00 Repair error: Repair step 'OCA\Talk\Migration\FixNamespaceInDatabaseTables' is unknown
2020-03-02T19:17:46+00:00 Repair info: No repair steps available
2020-03-02T19:17:46+00:00 Repair error: Repair step 'OCA\Talk\Migration\CreateHelpCommand' is unknown
2020-03-02T19:17:46+00:00 Repair error: Repair step 'OCA\Talk\Migration\ClearResourceAccessCache' is unknown
2020-03-02T19:17:46+00:00 Repair info: No repair steps available
2020-03-02T19:17:46+00:00 Repair error: Repair step 'OCA\Talk\Migration\CreateHelpCommand' is unknown
2020-03-02T19:17:46+00:00 Repair info: No repair steps available
2020-03-02T19:17:47+00:00 Repair step: Repair MySQL collation
2020-03-02T19:17:47+00:00 Repair info: All tables already have the correct collation -> nothing to do
2020-03-02T19:17:47+00:00 Repair step: Repair mime types
2020-03-02T19:17:47+00:00 Repair step: Clean tags and favorites
2020-03-02T19:17:47+00:00 Repair info: 0 tags of deleted users have been removed.
2020-03-02T19:17:47+00:00 Repair info: 0 tags for delete files have been removed.
2020-03-02T19:17:47+00:00 Repair info: 0 tag entries for deleted tags have been removed.
2020-03-02T19:17:47+00:00 Repair info: 0 tags with no entries have been removed.
2020-03-02T19:17:47+00:00 Repair step: Repair invalid shares
2020-03-02T19:17:47+00:00 Repair step: Move .step file of updater to backup location
2020-03-02T19:17:47+00:00 Repair info: .step file exists
2020-03-02T19:17:47+00:00 Repair info: .step-previous-update removed
2020-03-02T19:17:47+00:00 Repair info: .step file moved to .step-previous-update
2020-03-02T19:17:47+00:00 Repair step: Fix potential broken mount points
2020-03-02T19:17:47+00:00 Repair info: No mounts updated
2020-03-02T19:17:47+00:00 Repair step: Add log rotate job
2020-03-02T19:17:47+00:00 Repair step: Clear frontend caches
2020-03-02T19:17:47+00:00 Repair info: Image cache cleared
2020-03-02T19:17:47+00:00 Repair info: SCSS cache cleared
2020-03-02T19:17:47+00:00 Repair info: JS cache cleared
2020-03-02T19:17:47+00:00 Repair step: Clear every generated avatar on major updates
2020-03-02T19:17:47+00:00 Repair step: Add preview background cleanup job
2020-03-02T19:17:47+00:00 Repair step: Queue a one-time job to cleanup old backups of the updater
2020-03-02T19:17:47+00:00 Repair step: Cleanup invalid photocache files for carddav
2020-03-02T19:17:47+00:00 Repair step: Add background job to cleanup login flow v2 tokens
2020-03-02T19:17:47+00:00 Repair step: Remove potentially over exposing share links
2020-03-02T19:17:47+00:00 Repair info: No need to remove link shares.
2020-03-02T19:17:47+00:00 Repair step: Clear access cache of projects
2020-03-02T19:17:47+00:00 Repair step: Switches from deprecated "production" to "stable" update channel
2020-03-02T19:17:47+00:00 Repair step: Sets the enterprise logo
2020-03-02T19:17:47+00:00 Repair info: Repair step already executed
2020-03-02T19:17:47+00:00 Repair step: Reset generated avatar flag
2020-03-02T19:17:47+00:00 Starting code integrity check...
2020-03-02T19:17:59+00:00 Finished code integrity check
2020-03-02T19:17:59+00:00 Update successful
2020-03-02T19:17:59+00:00 Maintenance mode is kept active
2020-03-02T19:17:59+00:00 Reset log level
Keep maintenance mode active? [y/N] y
Maintenance mode kept active
$ sudo -u www-data php occ maintenance:mode --off
Maintenance mode disabled

アプリも最新にしておきます.

$ sudo -u www-data php ./occ app:update --all

セキュリティ&セットアップ警告を確認します.管理権限ユーザでログインして, index.php/settings/admin/overview にアクセスします.

2つの警告が表示されたので対処します.

Security & Setup warnings

1つ目の警告

データベースにいくつかのインデックスがありません。 大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 "occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。 インデックスが追加されると、それらのテーブルへのクエリは通常はるかに速くなります。
テーブル "oc_calendarobjects_props"のインデックス "calendarobject_calid_index"が見つかりません。
テーブル "oc_schedulingobjects"のインデックス "schedulobj_principuri_index"が見つかりません。

案内の通り occ db:add-missing-indices でokでした.
(メッセージの : 部分は になっているのでコピペする場合は注意)

$ sudo -u www-data php ./occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Adding calendarobject_calid_index index to the calendarobjects_props table, this can take some time...
calendarobjects_props table updated successfully.
Check indices of the schedulingobjects table.
Adding schedulobj_principuri_index index to the schedulingobjects table, this can take some time...
schedulingobjects table updated successfully.

2つ目の警告

データベース内のいくつかの列で、big intへの変換が行われていません。 大きなテーブルでカラムタイプを変更すると時間がかかることがあるため、自動的には変更されませんでした。 'occ db:convert-filecache-bigint'を実行することによって、それらの保留中の変更は手動で適用できます。 この操作は、インスタンスがオフラインの間に行う必要があります。 詳細についてはこれに関するドキュメントページを読んでください。
mounts.storage_id
mounts.root_id
mounts.mount_id

こちらも案内どおりでok

$ sudo -u www-data php ./occ db:convert-filecache-bigint
Following columns will be updated:
* mounts.storage_id
* mounts.root_id
* mounts.mount_id
This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n] y

セキュリティ&セットアップ警告ページを再読込して警告が消えるのを確認します.

OK

OpenSSHで使えるRSA鍵ペアをOpenSSLで生成する

OpenSSH 7.1/7.1p1でRSA鍵長は最低1024bitになりました.

 * Refusing all RSA keys smaller than 1024 bits (the current minimum
is 768 bits)

1024bitより短い鍵長の鍵を作ろうとすると怒られます.

$ ssh-keygen -t rsa -b 768
Invalid RSA key length: minimum is 1024 bits

以下のMLで古い機器が1024bitに対応していない場合の相談でOpenSSLでOpenSSHで利用できるRSA鍵ペアが作れるのを知りました.

You can use openssl to generate a shorter key:
$ openssl genprsa -out key.pem 768
$ ssh-keygen -y -f key.pem > key.pub # optional to get public key
This works with a 768-bit RSA key (client: OpenSSH_7.2p2, OpenSSL
1.0.2g; server: OpenSSH_7.2p2, OpenSSL 1.0.2g) but not a 256-bit RSA
key: I can generate the shorter key but the server requires a minimum of
768-bits.

使うことがあるかわからないけど手元の環境で試してみました.

opensslでRSA 768の秘密鍵の作成
$ openssl genrsa -out id_rsa768 768
Generating RSA private key, 768 bit long modulus (2 primes)
........+++++++
................................+++++++
e is 65537 (0x010001)
パスフレーズありのRSA 768の秘密鍵の作成
$ openssl genrsa -out id_rsa768 -aes256 768
Generating RSA private key, 768 bit long modulus (2 primes)
..+++++++
..........+++++++
e is 65537 (0x010001)
Enter pass phrase for id_rsa768:
Verifying - Enter pass phrase for id_rsa768:

OpenSSLから書き出された鍵ファイルのパーミッションはumaskに関係なく(0000でも)600になっています :)

秘密鍵の確認
$ openssl rsa -text < id_rsa768

秘密鍵が出来たので続いてペアとなる公開鍵を作ります.
MLの例と同じように ssh-keygen を使うと鍵の長さで怒られます.

$ ssh-keygen -y -f id_rsa768 > id_rsa768.pub
Load key "id_rsa768": Invalid key length

公開鍵もOpenSSLで作ります.

OpenSSL公開鍵を作る
$ openssl rsa -pubout < id_rsa768 > id_rsa768.pub
writing RSA key
公開鍵の確認
$ openssl rsa -text -pubin < id_rsa768.pub
出来上がった鍵ペアでログインを試みると鍵長のせいで認証に失敗
$ ssh -v -i ~/.ssh/id_rsa768 localhost
:
debug1: Trying private key: /home/matoken/.ssh/id_rsa768
Load key "/home/matoken/.ssh/id_rsa768": Invalid key length

てことで使いみちがなさそうですがメモしておきます.
#今ならed25519使いますしね…….

ちなみに1024bitより長い鍵なら普通に使えてssh-keygenでコメントを書き換えたりパスフレーズを書き換えたりでしました.

RSA 4096の鍵
$ openssl genrsa -out id_rsa4096 -aes256 4096
Generating RSA private key, 4096 bit long modulus (2 primes)
................++++
.....................................................................................................++++
e is 65537 (0x010001)
Enter pass phrase for id_rsa4096:
Verifying - Enter pass phrase for id_rsa4096:
$ ssh-keygen -c -C 'OpenSSL generate key' -f ./id_rsa4096
Enter passphrase:
No existing comment
Comment 'OpenSSL generated key' applied
$ ssh-keygen -p -f ./id_rsa4096
Enter old passphrase:
Key has comment 'OpenSSL generated key'
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.
環境
$ dpkg-query -W openssl openssh-client openssh-server
openssh-client  1:8.1p1-2
openssh-server  1:8.1p1-2
openssl 1.1.1d-2
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ uname -m
x86_64

Megatoolsを新規アカウントで利用しようとするとエラーとなる( ERROR: Can’t login to mega.nz: API call ‘us’ failed: Server returned error ENOENT )

Mega.nz のサービスをコマンドラインで行うためのツール群の Megatools というものがあります.

これを新規アカウントで利用しようとするとこのようなエラーになります.

$ megadf
ERROR: Can't login to mega.nz: API call 'us' failed: Server returned error ENOENT

これは Mega.nz のユーザ登録の仕様が変わったせいなようで新規に Mega.nz のウェブから登録したアカウントで起こるらしいです.

仕様変更前に登録したアカウントや,現在でも Megatools の megareg コマンドで登録したアカウントならMegatools が利用できるようです.

ということで megareg コマンドでアカントを登録し直して試してみました.

megareg コマンドにユーザー名、メールアドレス、パスワードを指定する

$ megareg --register -n 'REALNAME' -e 'EMAIL' -p 'PASSWORD'
Registration email was sent to EMAIL. To complete registration, you must run:
megareg --verify 7e2c96BDD0DFnrlfo2hXmg==:/Lw2hwBBBBBBBBBBF2Lk1B==:5ceaxAEvkXQ @LINK@
(Where @LINK@ is registration link from the 'MEGA Signup' email)

登録確認メールが届くので、上の例の @LINK@ 部分をそのメールに書かれているURLに書き換えて megareg --verify を実行する

$ megareg --verify 7e2c96BDD0DFnrlfo2hXmg==:/Lw2hwBBBBBBBBBBF2Lk1B==:5ceaxAEvkXQ 'https://mega.nz/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
Account registered successfully!

利用できるか試してみる

$ megadf -u 'EMAIL' -p 'PASSWORD'
Total: 53687091200
Used:  0
Free:  53687091200

うまく行きました.

毎回コマンドの引数にアカウント情報は書きたくないので設定ファイルを用意して使います.

設定ファイルは, ~/.megarc, ./.megarc 若しくは --config $CONFIGFILE で指定します.設定ファイルの内容は最低限以下のような感じで詳細は man megarc を参照.

[Login]
Username = your@email
Password = yourpassword
環境1
$ dpkg-query -W megatools
megatools       1.10.2-1
$ lsb_release -dr
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
$ uname -m
armv7l
環境2
$ dpkg-query -W megatools
megatools       1.10.2-1
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ uname -m
x86_64

Google Chrome / Chromium 79でバックグラウンドタブのリソース消費を減らす Tab Freeze を試す

Google Chrome/Chromium の 79 で Tab Freeze という機能が入ったようです.これはバックグラウンドの利用していないタブを停止してリソース消費を抑えるというもののようです.

似たようなもので The Great Suspender という拡張機能があり,タブをつい開きっぱなしにしてしまう私はこれで大分助かっています.(この拡張機能はタブのCPUだけでなくメモリも開放されます.その代わり復帰に時間がかかります.)

今回の Tab Freeze で似たようなことが標準でできるようになっていそうなので試してみました.

この機能は未だ実験的な機能でDisabled になっているので手動で設定変更する必要があります.

設定の前に The Great Suspender は競合しそうなので一旦削除しておきます.(類似のものを入れている場合はやはり消しておいたほうがいいと思う)

設定変更はアドレスバーに chrome://flags/#proactive-tab-freeze と入力してアクセスした項目で設定変更します.

chrome://flags/#proactive-tab-freeze

いくつか選択項目がでてきます.

Tab Freeze Value

Enabled Freeze - Unfreeze 10 seconds every 15 minutes, だと少しするとChromium が落ちてしまいました.
Enabled, Enabled Freeze - No Unfreeze だと落ちないと思ったのですが, Shift + Esc でタスクマネージャを起動すると落ちてしまいました.

てことで手元の環境では未だ不安定で使えないようでした.残念.またバージョンが上がったら試してみようと思います.

この辺の機能はOperaの省電力機能があって気になっているのですが,中国企業の奇虎360(Qihoo)に買収されてから怖いなと…….

環境
$ dpkg-query -W chromium
chromium        79.0.3945.79-1
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ uname -m
x86_64

smbgetのパスワード指定

sambaの速度を測るのにsambaをwgetのように使える smbget を使おうとしたのですが以前使えていた気がする -p オプションが無くなっています.

$ bash -c "read -sp \"passwd: \" passwd; smbget smb://smbhost/share/data -U user -p $passwd -O > /dev/null"
passwd: -p: unknown option

usageを見ると確かにありません.

$ smbget --usage
Usage: smbget [-?aneruRODqv] [-?|--help] [--usage] [-w|--workgroup=STRING] [-U|--user=STRING] [-a|--guest] [-n|--nonprompt] [-d|--debuglevel=INT] [-e|--encrypt]
[-r|--resume] [-u|--update] [-R|--recursive] [-b|--blocksize=INT] [-o|--outputfile=STRING] [-O|--stdout] [-D|--dots] [-q|--quiet] [-v|--verbose]
[-f|--rcfile=STRING]

-pを無くせばプロンプトが出てきますが毎回入力するのは面倒なのでどうにか出来ないかなとmanを見てみます.

man smbget
       -U, --user=username[%password]
Username (and password) to use

-U オプションに一緒に書けるようです.デミリタは要らないよう.

$ bash -c "read -sp \"passwd: \" passwd; smbget smb://smbhost/share/data -U user$passwd -O > /dev/null"

デミリタに : を指定しても動きました.

$ bash -c "read -sp \"passwd: \" passwd; smbget smb://smbhost/share/data -U user:$passwd -O > /dev/null"

他にもSMB URLにも書けるようです.

man smbget
SMB URLS
SMB URL's should be specified in the following format:
smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]]

ただし,この書き方だとSMB URLが環境変数が展開されてSTDOUTに表示されるのでパスワードを隠したい場合は使えません.

$ bash -c "read -sp \"passwd: \" passwd; smbget smb://user:$passwd@smbhost/share/data -O > /dev/null"
smb://user:password@smbhost/share/data(100.00%) at 130.69MB/s ETA: 00:00:0008
Downloaded 2.17GB in 17 seconds

それを言うと -U の場合もプロセスにパスワードが表示されてしまうのであまりよろしくないですね.てことでとりあえずこんな感じならいいかな?

$ bash -c "read -sp \"passwd: \" passwd; echo $passwd | smbget smb://smbhost/share/data -U user -O > /dev/null"

このときのプロセス

$ ps -ef|grep smbget
mk       12626 14620  0 22:38 pts/6    00:00:00 bash -c read -sp "passwd: " passwd; echo $passwd | smbget smb://smbhost/share/data -U user -O > /dev/null
mk       13263 12626 49 22:39 pts/6    00:00:00 smbget smb://smbhost/share/data -U user -O

あれ?結局最初に戻って…….

余録(キャッシュクリア)

速度を測りたいけど2回目以降はキャッシュされてしまうのでキャッシュをクリアして測る.
以下はlocalhostで試してるので差が出ているが,ネットワーク経由だとネットワークがボトルネックになり差が出なかった.でも一応やっておく.

1回目
smb://smbhost/share/data(100.00%) at 28.12MB/s ETA: 00:00:00434
Downloaded 2.17GB in 79 seconds
2回目
smb://smbhost/share/data(100.00%) at 130.69MB/s ETA: 00:00:0008
Downloaded 2.17GB in 17 seconds
キャッシュをクリア
$ sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
もう一回
smb://smbhost/share/data(100.00%) at 27.43MB/s ETA: 00:00:0044
Downloaded 2.17GB in 81 seconds

/proc/sys/vm/drop_caches についてはKernel Documentsの admin-guide/sysctl/vm.rst.gz あたりを参照のこと.

$ zgrep ^drop_caches -A42 /usr/share/doc/linux-doc-5.3/Documentation/admin-guide/sysctl/vm.rst.gz

環境

環境1
$ dpkg-query -W samba smbclient bash
bash    4.4.18-2ubuntu1.2
samba   2:4.7.6+dfsg~ubuntu-0ubuntu2.14
smbclient       2:4.7.6+dfsg~ubuntu-0ubuntu2.14
$ lsb_release -dr
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
$ uname -rvm
4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64
環境2
$ dpkg-query -W samba smbclient bash
bash    5.0-5
samba   2:4.11.1+dfsg-3
smbclient       2:4.11.1+dfsg-3
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ uname -rvm
5.3.0-3-amd64 #1 SMP Debian 5.3.15-1 (2019-12-07) x86_64

Microsoft Teams の Linux版を少し試す

Microsoft Teams の Linux版パブリックプレビューが利用できるようになっています.
普段Microsoft Teamsは利用していないのですが少し試してみました.

以下のページより入手できます.amd64のDEB, RPMが用意されています.今回はDebian sid amd64で試しました.
(armhs, arm64 や snap, AppImageなんかがあると便利そう)

容量やhashはこんな感じでした.

$ ls -l ~/Downloads/teams_1.2.00.32451_amd64.deb
-rw-r--r-- 1 matoken matoken 64874490 Dec 11 19:16 /home/matoken/Downloads/teams_1.2.00.32451_amd64.deb
$ sha512sum ~/Downloads/teams_1.2.00.32451_amd64.deb
2e921c0ebd2306b6f61f5ecd448206922394a19339e8c14023aa1778444a649bf4730c71362263e53bb833caed05907203d782221429e853d76695695835e407  /home/matoken/Downloads/teams_1.2.00.32451_amd64.deb
$ sha256sum ~/Downloads/teams_1.2.00.32451_amd64.deb
28d8a0e644a4bb9d4ee9295953b97b7fa6558b8a9d1d28363a594f5cde1c05dc  /home/matoken/Downloads/teams_1.2.00.32451_amd64.deb

こんな感じで導入.

$ sudo dpkg -i ~/Downloads/teams_1.2.00.32451_amd64.deb

導入時の容量は233.5MB程.

$ dpkg-query -s teams|egrep 'Size|Version'
Installed-Size: 233488
Version: 1.2.00.32451

teams コマンドで起動します.

環境変数 LC_ALLja_JP.UTF-8 とかにしておくとログイン画面等は日本語になります.しかしログイン後は英語に.
設定で日本語を選んで再起動で日本語になりました.

プロセスはこんな感じ.Electronぽいですね.

$ ps aux|grep -i teams
matoken 2994658 1.0 1.1 2993376 180704 ? Sl 19:29 0:13 /usr/share/teams/teams
matoken 2994660 0.0 0.2 201364 40000 ? S 19:29 0:00 /usr/share/teams/teams --type=zygote --no-sandbox
matoken 2994722 0.0 0.5 769764 94808 ? Sl 19:29 0:01 /usr/share/teams/teams --type=gpu-process --enable-features=SharedArrayBuffer --disable-features=SpareRendererForSitePerProcess --gpu-preferences=KAAAAAAAAACAAABAAQAAAAAAAAAAAGAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAA --service-request-channel-token=15734132888989265996
matoken 2994776 0.0 0.5 1342416 90296 ? Sl 19:29 0:00 /usr/share/teams/teams --type=renderer --autoplay-policy=no-user-gesture-required --enable-features=SharedArrayBuffer --disable-features=SpareRendererForSitePerProcess --service-pipe-token=18244068696510772569 --lang=ja --app-path=/usr/share/teams/resources/app.asar --user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) MicrosoftTeams-Preview/1.2.00.32451 Chrome/69.0.3497.128 Electron/4.2.12 Safari/537.36 --node-integration=false --webview-tag=false --no-sandbox --preload=/usr/share/teams/resources/app.asar/lib/renderer/notifications/preload_notifications.js --disable-remote-module --background-color=#fff --electron-shared-settings=eyJjci5jb21wYW55IjoiRWxlY3Ryb24iLCJjci5kdW1wcyI6IiIsImNyLmVuYWJsZWQiOmZhbHNlLCJjci5wcm9kdWN0IjoiRWxlY3Ryb24iLCJjci5zZXNzaW9uIjoiIiwiY3IudXJsIjoiIiwiY3IudmVyc2lvbiI6InY0LjIuMTIifQ== --num-raster-threads=2 --enable-main-frame-before-activation --service-request-channel-token=18244068696510772569 --renderer-client-id=7 --shared-files=v8_context_snapshot_data:100,v8_natives_data:101 --msteams-process-type=notificationsManager
matoken 2994835 1.3 2.5 2363516 408984 ? Sl 19:29 0:17 /usr/share/teams/teams --type=renderer --autoplay-policy=no-user-gesture-required --enable-features=SharedArrayBuffer --disable-features=SpareRendererForSitePerProcess --service-pipe-token=15065448036180024072 --lang=ja --app-path=/usr/share/teams/resources/app.asar --user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) MicrosoftTeams-Preview/1.2.00.32451 Chrome/69.0.3497.128 Electron/4.2.12 Safari/537.36 --node-integration=false --webview-tag=true --no-sandbox --preload=/usr/share/teams/resources/app.asar/lib/renderer/preload.js --disable-remote-module --background-color=#fff --electron-shared-settings=eyJjci5jb21wYW55IjoiRWxlY3Ryb24iLCJjci5kdW1wcyI6IiIsImNyLmVuYWJsZWQiOmZhbHNlLCJjci5wcm9kdWN0IjoiRWxlY3Ryb24iLCJjci5zZXNzaW9uIjoiIiwiY3IudXJsIjoiIiwiY3IudmVyc2lvbiI6InY0LjIuMTIifQ== --num-raster-threads=2 --enable-main-frame-before-activation --service-request-channel-token=15065448036180024072 --renderer-client-id=9 --shared-files=v8_context_snapshot_data:100,v8_natives_data:101 --msteams-process-type=mainWindow
matoken 2995068 0.2 0.6 3034988 109684 ? Sl 19:29 0:03 /usr/share/teams/teams --type=renderer --autoplay-policy=no-user-gesture-required --enable-features=SharedArrayBuffer --disable-features=SpareRendererForSitePerProcess --service-pipe-token=5738606405228482904 --lang=ja --app-path=/usr/share/teams/resources/app.asar --user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) MicrosoftTeams-Preview/1.2.00.32451 Chrome/69.0.3497.128 Electron/4.2.12 Safari/537.36 --node-integration=false --webview-tag=false --no-sandbox --preload=/usr/share/teams/resources/app.asar/lib/pluginhost/preload.js --disable-remote-module --background-color=#fff --electron-shared-settings=eyJjci5jb21wYW55IjoiRWxlY3Ryb24iLCJjci5kdW1wcyI6IiIsImNyLmVuYWJsZWQiOmZhbHNlLCJjci5wcm9kdWN0IjoiRWxlY3Ryb24iLCJjci5zZXNzaW9uIjoiIiwiY3IudXJsIjoiIiwiY3IudmVyc2lvbiI6InY0LjIuMTIifQ== --num-raster-threads=2 --enable-main-frame-before-activation --service-request-channel-token=5738606405228482904 --renderer-client-id=14 --shared-files=v8_context_snapshot_data:100,v8_natives_data:101 --msteams-process-type=pluginHost

一人だけの新規作成したばかりのMicrosoft Teams for freeでのRAM使用量はこんな感じ.800MB以上食ってるみたいですね.

$ ps alx | grep teams | grep -v grep | awk '{printf ("%d\t%s\n", $8,$13)}'
145004  /usr/share/teams/teams
19160   /usr/share/teams/teams
67576   /usr/share/teams/teams
56808   /usr/share/teams/teams
487572  /usr/share/teams/teams
62344   /usr/share/teams/teams
$ ps alx | grep teams | grep -v grep | awk '{sum+=$8}END{print sum}'
834392

てことでElectronだと結構リソース食うしブラウザ版とそう変わらないのでブラウザ版でいいかな?

パッケージ削除

$ sudo apt purge teams
環境
$ dpkg-query -W teams
teams   1.2.00.32451
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ uname -m
x86_64

Nextcloudのデータディレクトリを移動するメモ

Nextcloudのデータディレクトリは既定値ではNextcloudのすぐ下の data ディレクトリになります.しかしここはウェブサーバのドキュメントルート以下になってしまい設定をミスするとデータディレクトリが一般公開されてしまう可能性があり少し怖いです.
そこでNextcloud導入時に設定ファイルの config/config.phpdatadirectory にウェブサーバドキュメントルートの外にNextcloudデータを設定します.

今回デフォルトのウェブサーバドキュメントルート内のまま運用されているNextcloudがあったのでそれをウェブサーバドキュメントルート外に移動してみました.
ディスクを増設してそちらにデータを移すなどの際にも同じ手順でデータ移行できると思います.

今回の例でのパスはこんな感じです.

  • Nextcloud導入ディレクトリ : /var/www/nextcloud
  • 旧Nextcloud データディレクトリ : /var/www/nextcloud/data
  • 新Nextcloud データディレクトリ : /var/data/nextcloud/data
Important
インストール後のデータディレクトリの移動は公式ではサポートされていません.

ファイルのコピー

同一のファイルシステム間であれば mv commandで一瞬ですが,今回はファイルシステムを跨いでいるので時間がかかります.
ダウンタイムを短くしたいのでNextcloud動作状態で一度データをコピーしてその後rsyncで差分のみコピーすることにします.

1度目のコピー

$ sudo cp -a /var/www/nextcloud/data /var/www/nextcloud/

rsyncでデータ同期

1度目のデータコピーに時間がかかったのでrsyncで同期

$ sudo rsync -avc /var/www/nextcloud/data /var/www/nextcloud/

バックグラウンドジョブを停止(恐らくこの手順は不要)

次の手順でメンテナンスモードに移行するので不要だと思うけど念の為バックグラウンドジョブをcrontabで設定しているのを停止(コメントアウト)しておく.(Webcronの場合も止めたほうがいいかも.AJAXの場合は恐らく不要)

$ sudo -u www-data crontab -e

メンテナンスモードに移行

ここからNextcloudは利用できなくなります.

$ sudo -u www-data php ./occ maintenance:mode --on

データ同期

-c オプションも付けたほうがいいけどデータが大きいと時間がかかるので今回はなしであとでチェックすることにする.

$ sudo rsync -av /var/www/nextcloud/data /var/www/nextcloud/

データベース書き換え

Nextcludのデータベース内のファイルディレクトリ情報を書き換えます.書き換え前に念の為データベースのバックアップも取っておきます.

バックアップ
$ sh -c "umask 266 ; mysqldump -uroot -p --opt --all-databases --events | xz > mysqlbackup-`date +\%F_\%T_\%s_$`.sql.xz"
db書き換え
$ mysql -unextcloud -p
mysql> use nextcloud;
mysql> update oc_storages set id='local::/var/data/nextcloud/data/' where id='local::/var/www/nextcloud/data/';
mysql> quit;

設定ファイル書き換え

Nextcloudの設定ファイルの config/config.php の中の datadirectory を新しいパスに書き換えます.

  'datadirectory' => '/var/data/nextcloud/data',

メンテナンスモードをoffにする

$ sudo -u www-data php ./occ maintenance:mode --off

動作確認

Nextcloudにログインしてファイルディレクトリが閲覧できることを確認する.

バックグラウンドジョブを設定

バックグラウンドジョブをcrontabで再設定

$ sudo -u www-data crontab -e

旧データの削除

しばらく運用して問題ないようなら旧データを削除する.

$ sudo rm -rf /var/www/nextcloud/data

生ディスクなんかだと secure-delete とか使うと少し安心.でも確実じゃないし時間かかるので暗号化fsを推奨.

$ sudo nice -20 ionice -c1 -n0 srm -r /var/www/nextcloud/data

環境

$ sudo -u www-data php ./occ -V
Nextcloud 17.0.1
$ dpkg-query -W php7.2-common mysql-server
mysql-server    5.7.28-0ubuntu0.18.04.4
php7.2-common   7.2.24-0ubuntu0.18.04.1
$ lsb_release -dr
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
$ uname -m
x86_64

Nextcloud upgrade時に`Check for expected files The following extra files have been found: .rnd` と言われて失敗する(15.0.7→16.0.6)

Nextcloud 15.0.7からNextcloud 16.0.6へのアップグレードを行おうとしたところ,アップグレード画面で以下のようなメッセージが表示されて先に勧めません.

Nextcloud upgrade failed 20191125 13:11:17 12878

Check for expected files
The following extra files have been found:
.rnd

Nextcloud 以下を確認すると3つの .rnd ファイルが見つかりました.

$ cd /export/data/var/nextcloud-data
$ find ./ -name .rnd -ls
13495506336      0 drwxr-xr-x   3 www-data www-data       38 Jan 31  2018 ./data/matoken/files_encryption/keys/files/tmp/pizero/home/pi/.rnd
15757999341     12 -rw-r--r--   1 www-data www-data     9656 Jan 31  2018 ./data/matoken/files/tmp/pizero/home/pi/.rnd
11866753713      4 -rw-------   1 www-data www-data     1024 Nov 25 13:19 ./.rnd

以下のページを見ると,Nextcloud 直下の .rnd ファイルが悪さをしているようなのでこれを退避します.

$ sudo mv ./.rnd ~/tmp

この後もう一度アップグレードを試みるとうまく行きました.

This behavior continues up to version 15.0.7.

とのことでぎりぎり引っかかったようです😣

環境
$ sudo -u www-data php ./occ -V
Nextcloud 16.0.6
$ dpkg-query -W php7.2-common mysql-server
mysql-server    5.7.28-0ubuntu0.18.04.4
php7.2-common   7.2.24-0ubuntu0.18.04.1
$ lsb_release -dr
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
$ uname -m
x86_64

速度や容量の偽装されたフラッシュストレージの確認ができるf3(Fight Flash Fraud)を少し試す

近年はフラッシュストレージの偽物が多く出回っています。速度を偽るものや容量を偽るものなどがあり、速度はともかく容量を偽られるとデータが壊れてしまい困ります。
このようなストレージのテストにWindowsでは H2testw というツールが定番のようですが、Linuxでは無いだろうかと探すとそのままH2testw代替というf3(Fight Flash Fraud)を見つけたので少し試してみました。

Debian sid amd64環境では f3 というパッケージでした。

$ apt show f3
Package: f3
Version: 7.2-1
Priority: optional
Section: utils
Maintainer: Antoine Beaupré <anarcat@debian.org>
Installed-Size: 183 kB
Depends: libc6 (>= 2.28), libparted2 (>= 3.1), libudev1 (>= 183)
Homepage: http://oss.digirati.com.br/f3
Download-Size: 47.3 kB
APT-Manual-Installed: yes
APT-Sources: http://ftp.jp.debian.org/debian sid/main amd64 Packages
Description: test real flash memory capacity
F3 (Fight Flash Fraud or Fight Fake Flash) tests the full capacity of a
flash card (flash drive, flash disk, pendrive).
.
F3 writes to the card and then checks if can read it. It will assure you
have not been bought a card with a smaller capacity than stated. Note that
the main goal of F3 is not to fix your removable media. However, there
are resources to mark the invalid areas.
.
This package provides these executables: f3write, f3read, f3brew, f3fix
and f3probe.
$ sudo apt install f3
$ dpkg -L f3| grep \/bin\/
/usr/bin/f3brew
/usr/bin/f3fix
/usr/bin/f3probe
/usr/bin/f3read
/usr/bin/f3write

先ずは書き込みテストコマンドの f3write を試します。これは該当ストレージをマウントした状態で、マウントポイントを指定します。

$ time f3write /media/matoken/A2BA-98E0
F3 write 7.2
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
Free space: 29.80 GB
Creating file 1.h2w ... OK!
Creating file 2.h2w ... OK!
Creating file 3.h2w ... OK!
Creating file 4.h2w ... OK!
Creating file 5.h2w ... OK!
Creating file 6.h2w ... OK!
Creating file 7.h2w ... OK!
Creating file 8.h2w ... OK!
Creating file 9.h2w ... OK!
Creating file 10.h2w ... OK!
Creating file 11.h2w ... OK!
Creating file 12.h2w ... OK!
Creating file 13.h2w ... OK!
Creating file 14.h2w ... OK!
Creating file 15.h2w ... OK!
Creating file 16.h2w ... OK!
Creating file 17.h2w ... OK!
Creating file 18.h2w ... OK!
Creating file 19.h2w ... OK!
Creating file 20.h2w ... OK!
Creating file 21.h2w ... OK!
Creating file 22.h2w ... OK!
Creating file 23.h2w ... OK!
Creating file 24.h2w ... OK!
Creating file 25.h2w ... OK!
Creating file 26.h2w ... OK!
Creating file 27.h2w ... OK!
Creating file 28.h2w ... OK!
Creating file 29.h2w ... OK!
Creating file 30.h2w ... OK!
Free space: 0.00 Byte
Average writing speed: 7.43 MB/s
real    68m29.007s
user    0m7.454s
sys     0m51.266s

次に読み込みテストコマンドの f3read を試します。

$ time f3read /media/matoken/A2BA-98E0
F3 read 7.2
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
SECTORS      ok/corrupted/changed/overwritten
Validating file 1.h2w ... 2097152/        0/      0/      0
Validating file 2.h2w ... 2097152/        0/      0/      0
Validating file 3.h2w ... 2097152/        0/      0/      0
Validating file 4.h2w ... 2097152/        0/      0/      0
Validating file 5.h2w ... 2097152/        0/      0/      0
Validating file 6.h2w ... 2097152/        0/      0/      0
Validating file 7.h2w ... 2097152/        0/      0/      0
Validating file 8.h2w ... 2097152/        0/      0/      0
Validating file 9.h2w ... 2097152/        0/      0/      0
Validating file 10.h2w ... 2097152/        0/      0/      0
Validating file 11.h2w ... 2097152/        0/      0/      0
Validating file 12.h2w ... 2097152/        0/      0/      0
Validating file 13.h2w ... 2097152/        0/      0/      0
Validating file 14.h2w ... 2097152/        0/      0/      0
Validating file 15.h2w ... 2097152/        0/      0/      0
Validating file 16.h2w ... 2097152/        0/      0/      0
Validating file 17.h2w ... 2097152/        0/      0/      0
Validating file 18.h2w ... 2097152/        0/      0/      0
Validating file 19.h2w ... 2097152/        0/      0/      0
Validating file 20.h2w ... 2097152/        0/      0/      0
Validating file 21.h2w ... 2097152/        0/      0/      0
Validating file 22.h2w ... 2097152/        0/      0/      0
Validating file 23.h2w ... 2097152/        0/      0/      0
Validating file 24.h2w ... 2097152/        0/      0/      0
Validating file 25.h2w ... 2097152/        0/      0/      0
Validating file 26.h2w ... 2097152/        0/      0/      0
Validating file 27.h2w ... 2097152/        0/      0/      0
Validating file 28.h2w ... 2097152/        0/      0/      0
Validating file 29.h2w ... 2097152/        0/      0/      0
Validating file 30.h2w ... 1671296/        0/      0/      0
Data OK: 29.80 GB (62488704 sectors)
Data LOST: 0.00 Byte (0 sectors)
Corrupted: 0.00 Byte (0 sectors)
Slightly changed: 0.00 Byte (0 sectors)
Overwritten: 0.00 Byte (0 sectors)
Average reading speed: 19.53 MB/s
real    26m7.658s
user    0m15.443s
sys     0m16.790s

そして本命の f3probe で全領域にデータを書き込んでベリファイして実際に表示される容量が利用できるかを確認します。実行にはroot権限が必要でアンマウントした状態で該当デバイスを指定します。 ※ストレージ内のデータは破壊されます。

$ time sudo f3probe /dev/mmcblk0
F3 probe 7.2
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
WARNING: Probing normally takes from a few seconds to 15 minutes, but
it can take longer. Please be patient.
Probe finished, recovering blocks... Done
Good news: The device `/dev/mmcblk0' is the real thing
Device geometry:
*Usable* size: 29.81 GB (62521344 blocks)
Announced size: 29.81 GB (62521344 blocks)
Module: 32.00 GB (2^35 Bytes)
Approximate cache size: 0.00 Byte (0 blocks), need-reset=no
Physical block size: 512.00 Byte (2^9 Bytes)
Probe time: 4'01"
real    9m4.350s
user    0m0.887s
sys     0m1.602s

こちらはクイックテスト。通常テストが9分ちょっと掛かったのに対しこちらは2分ちょっとで終わっています。

$ time sudo f3probe --destructive --time-ops /dev/mmcblk0
F3 probe 7.2
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
WARNING: Probing normally takes from a few seconds to 15 minutes, but
it can take longer. Please be patient.
Good news: The device `/dev/mmcblk0' is the real thing
Device geometry:
*Usable* size: 29.81 GB (62521344 blocks)
Announced size: 29.81 GB (62521344 blocks)
Module: 32.00 GB (2^35 Bytes)
Approximate cache size: 0.00 Byte (0 blocks), need-reset=no
Physical block size: 512.00 Byte (2^9 Bytes)
Probe time: 2'16"
Operation: total time / count = avg time
Read: 393.4ms / 4815 = 81us
Write: 2'15" / 4192321 = 32us
Reset: 0us / 1 = 0us
real    2m16.479s
user    0m0.612s
sys     0m0.320s

もし、容量を偽ったストレージを利用したい場合、f3probe コマンドの結果から f3fix コマンドで実際の容量までしか利用しないよう設定することが可能らしいです。(未確認)

$ sudo f3fix --last-sec=16477878 /dev/mmcblk0

add)
その後優先度を上げてみるとどうだろうと sudo nice -20 ionice -c1 -n0 を付けて試してみましたがほとんど速度は変わらず誤差レベルな感じでした。

て事で今回のカードはSamsung の高耐久モデルのMB-MJ32GA/EC だったのですが,容量は問題なし.ただ速度が読み込み最大100MB/sに対して20.03MB/s,書き込み30MB/sに対して10.11MB/sとかなり遅そうです.更にRaspberry Pi との相性が悪いらしく,Raspberry Pi Zero/ZeroW/A+ で起動に失敗します.Amazonで買ったので返品しようかと…….

おまけ。

f3-qt というGUIの皮もあるようです。これも少し試してみました。

パッケージが見当たらないのでbuildしました。

$ sudo apt install libudev1 libudev-dev libparted-dev
$ git clone https://github.com/zwpwjwtz/f3-qt
$ cd f3-qt
$ qmake
$ make
マウントポイントを指定して速度テスト。

f3 qt 20191118 07:11:24 1566360

歯車アイコンを押してadvanceテスト。

f3 qt 20191118 09:11:29 1693359

環境
$ dpkg-query -W f3 libudev1 libudev-dev libparted-dev
f3      7.2-1
libparted-dev:amd64     3.3-1
libudev-dev:amd64       243-7
libudev1:amd64  243-7
libudev1:i386   243-7
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ uname -m
x86_64

Ubuntu 19.10 amd64からCANON LBP9100Cで印刷🖨️

タイトルの通りで内容は以下のページそのままです.ただ,systemd環境なのでそのへんだけが違います.

パッケージの入手.

以下のページからパッケージ等を入手します.

今回は「CAPT Printer Driver for Linux Ver.2.71(32bit&64bit)」を使いました.

結構古いですね.

本バージョンの動作確認済 OS
Fedora 24 (32bit/ 64bit)
Fedora 25 (32bit/ 64bit)
Ubuntu 16.04 Desktop (32bit/ 64bit)
Ubuntu 16.10 Desktop (32bit/ 64bit)

ファウンロードしたファイルの内容はこんな感じ.

$ ls -s ./linux-capt-drv-v271-jp.tar.gz
124484 ./linux-capt-drv-v271-jp.tar.gz
$ sha512sum ./linux-capt-drv-v271-jp.tar.gz
f6b354dd29393322f0ae4bcea5568650ce286358e42505b6c33f2c7ebb9ff8c813ca52bfd9d56d0cf87db678e56af5559b6300720d50ea29834c1d319c1eb75c  ./linux-cap
t-drv-v271-jp.tar.gz
$ tar tvf ./linux-capt-drv-v271-jp.tar.gz
-rw-rw-r-- canon/canon 9879361 2017-04-18 00:00 linux-capt-drv-v271-jp/32-bit_Driver/RPM/cndrvcups-capt-2.71-1.i386.rpm
-rw-rw-r-- canon/canon 15356845 2017-04-18 00:00 linux-capt-drv-v271-jp/32-bit_Driver/RPM/cndrvcups-common-3.21-1.i386.rpm
-rw-rw-r-- canon/canon 15382368 2017-04-18 00:00 linux-capt-drv-v271-jp/32-bit_Driver/Debian/cndrvcups-common_3.21-1_i386.deb
-rw-rw-r-- canon/canon  9716256 2017-04-18 00:00 linux-capt-drv-v271-jp/32-bit_Driver/Debian/cndrvcups-capt_2.71-1_i386.deb
-rw-rw-r-- canon/canon  9905144 2017-04-18 00:00 linux-capt-drv-v271-jp/64-bit_Driver/RPM/cndrvcups-capt-2.71-1.x86_64.rpm
-rw-rw-r-- canon/canon 15365135 2017-04-18 00:00 linux-capt-drv-v271-jp/64-bit_Driver/RPM/cndrvcups-common-3.21-1.x86_64.rpm
-rw-rw-r-- canon/canon  9733334 2017-04-18 00:00 linux-capt-drv-v271-jp/64-bit_Driver/Debian/cndrvcups-capt_2.71-1_amd64.deb
-rw-rw-r-- canon/canon 15389756 2017-04-18 00:00 linux-capt-drv-v271-jp/64-bit_Driver/Debian/cndrvcups-common_3.21-1_amd64.deb
-rw-rw-r-- canon/canon   573192 2017-04-18 00:00 linux-capt-drv-v271-jp/Doc/guide-capt-2.7xJ.tar.gz
-rw-rw-r-- canon/canon    27592 2017-04-18 00:00 linux-capt-drv-v271-jp/Doc/LICENSE-JP.txt
-rw-rw-r-- canon/canon    46924 2017-04-18 00:00 linux-capt-drv-v271-jp/Doc/README-capt-2.71J.txt
-rw-rw-r-- canon/canon 10031685 2017-04-18 00:00 linux-capt-drv-v271-jp/Src/cndrvcups-capt-2.71-1.tar.gz
-rw-rw-r-- canon/canon 17277148 2017-04-18 00:00 linux-capt-drv-v271-jp/Src/cndrvcups-common-3.21-1.tar.gz
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/32-bit_Driver/RPM/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/32-bit_Driver/Debian/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/64-bit_Driver/RPM/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/64-bit_Driver/Debian/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/Doc/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/Src/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/32-bit_Driver/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/64-bit_Driver/
drwxrwxr-x canon/canon        0 2017-04-18 00:00 linux-capt-drv-v271-jp/

展開して必要なパッケージを導入します.

$ tar xf ./linux-capt-drv-v271-jp.tar.gz
$ sudo dpkg -i ./linux-capt-drv-v271-jp/64-bit_Driver/Debian/cndrvcups-capt_2.71-1_amd64.deb ./linux-capt-drv-v271-jp/64-bit_Driver/Debian/cndrvcups-common_3.21-1_amd64.deb
以前に未選択のパッケージ cndrvcups-capt を選択しています。
(データベースを読み込んでいます ... 現在 690646 個のファイルとディレクトリがインストールされています。)
.../cndrvcups-capt_2.71-1_amd64.deb を展開する準備をしています ...
cndrvcups-capt (2.71-1) を展開しています...
以前に未選択のパッケージ cndrvcups-common を選択しています。
.../cndrvcups-common_3.21-1_amd64.deb を展開する準備をしています ...
cndrvcups-common (3.21-1) を展開しています...
cndrvcups-common (3.21-1) を設定しています ...
cndrvcups-capt (2.71-1) を設定しています ...
systemd (242-7ubuntu3) のトリガを処理しています ...

cups再起動.

$ sudo service cups restart

プリントスプーラにプリンタを登録.

$ sudo lpadmin -p LBP9100C -P /usr/share/cups/model/CNCUPSLBP9100CCAPTJ.ppd -v ccp://localhost:59687 -E

ccpdにdaemonにプリンタを登録.
192.168.1.14 部分は該当プリンタのIPアドレスに変更する.

$ sudo ccpdadmin -p LBP9100C -o net:192.168.1.14
CUPS_ConfigPath = /etc/cups/
LOG Path        = None
UI Port         = 59787
Entry Num  : Spooler   : Backend       : FIFO path             : Device Path   : Status
----------------------------------------------------------------------------
[0]    : LBP9100C  : ccp           : //localhost:59687     : net:192.168.1.14      : New!!

cupsにアクセスできるよう設定しておく.ここでは自分(127.0.0.1)だけ.

$ sudo vi /etc/cups/cupsd.conf
$ sudo git -C /etc diff HEAD^ -- /etc/cups/cupsd.conf
diff --git a/cups/cupsd.conf b/cups/cupsd.conf
index 0f233ad..1c51867 100644
--- a/cups/cupsd.conf
+++ b/cups/cupsd.conf
@@ -29,11 +29,13 @@ WebInterface Yes
# Restrict access to the server...
<Location />
Order allow,deny
+  Allow From 127.0.0.1
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
+  Allow From 127.0.0.1
</Location>
# Restrict access to configuration files...

ccpdを起動して,テスト印刷してみる.

$ sudo service ccpd start

ccpdがシステム起動時に起動するか確認すると起動しないようになっている

$ sudo systemctl is-enabled ccpd
ccpd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled ccpd
disabled

ccpdを自動起動するようにしようとすると怒られる.

$ sudo systemctl enable ccpd
ccpd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ccpd
update-rc.d: error: ccpd Default-Start contains no runlevels, aborting.

/etc/init.d/ccpd を少し修正して怒られないようにして再度登録.

$ sudo vi /etc/init.d/ccpd
$ sudo git -C /etc diff -- /etc/init.d/ccpd
diff --git a/init.d/ccpd b/init.d/ccpd
index f14cb8c..bdac57e 100755
--- a/init.d/ccpd
+++ b/init.d/ccpd
@@ -1,5 +1,13 @@
#!/bin/sh
# startup script for Canon Printer Daemon for CUPS (ccpd)
+### BEGIN INIT INFO
+# Provides:          my-service-name
+# Required-Start:    $all
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+# Short-Description: your description here
+### END INIT INFO
if [ `ps awx | grep cupsd | grep -v grep | wc -l` -eq 0 ]; then
while [ `ps awx | grep cupsd | grep -v grep | wc -l` -eq 0 ]
$ sudo systemctl enable ccpd
ccpd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ccpd
$ sudo systemctl is-enabled ccpd
ccpd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled ccpd
enabled
環境
$ w3m -dump http://192.168.1.14/cab/dev_info.shtml | grep 製品
│     製品名 :     │ LBP9100C                       │
│ 製品バージョン : │ 1.16                           │
$ dpkg-query -W cups* cndrvcups*
cndrvcups-capt  2.71-1
cndrvcups-common        3.21-1
cndrvcups-lipslx
cndrvcups-ufr2-uk
cndrvcups-ufr2-us
cups    2.2.12-2ubuntu1
cups-browsed    1.25.11-0ubuntu1
cups-bsd        2.2.12-2ubuntu1
cups-client     2.2.12-2ubuntu1
cups-common     2.2.12-2ubuntu1
cups-core-drivers       2.2.12-2ubuntu1
cups-daemon     2.2.12-2ubuntu1
cups-filters    1.25.11-0ubuntu1
cups-filters-core-drivers       1.25.11-0ubuntu1
cups-filters-ippusbxd
cups-ipp-utils  2.2.12-2ubuntu1
cups-pdf
cups-pk-helper  0.2.6-1ubuntu3
cups-ppdc       2.2.12-2ubuntu1
cups-server-common      2.2.12-2ubuntu1
cupsys
$ lsb_release -dr
Description:    Ubuntu 19.10
Release:        19.10
$ uname -m
x86_64