Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Gogs: Install latest pre-compiled binaries from GitHub for ARMv7 + x86_64 #3006

Merged
merged 7 commits into from
Jul 30, 2019

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Jul 25, 2019

Status: Testing

  • DietPi-Patch | Remove /etc/__MACOSX if present, coming from our archives
  • Changelog
  • Testing on non-RPi ARMv7 to be failsafe
  • Test reinstall from pre-v6.26 instance to assure InnoDB 4byte support does not break existing database
  • Compile and use ARMv6 binaries

Fixes #2999

Commit list/description:

  • DietPi-Software | Gogs: Install latest pre-compiled binaries from GitHub for ARMv7 + x86_64. For ARMv6 (RPi1/Zero) no binaries are available yet
  • DietPi-Software | Gogs: Download to /tmp first to avoid moving the "__MACOSX" dir to /etc that comes with our ARMv6 archive
  • DietPi-Software | Gogs: C_CHECK_URL receives 403 on GitHub download, thus skip it
  • DietPi-Software | Gogs: On reinstall, remove old install dir, but preserve existing configs
  • DietPi-Software | Gogs: Import pre-defined SQL file on fresh install to pre-create database. On current version otherwise an error occurs on access attempt
  • DietPi-Software | Gogs: InnoDB large table prefix with Barracuda file format is required
  • DietPi-Software | MariaDB: Assure/Enable 4-byte support (default since Stretch) and modern Barracuda file format + large table prefix (default since Buster) on all MariaDB installs. This has no effect on existing tables, setting this with ownCloud and Nextcloud installs never caused issues for other MariaDB databases and software using them, and, every Stretch to backports/Buster upgrade would break it the same way if so. However a special eye on this during Beta phase makes sense.

+ DietPi-Software | Gogs: Install latest pre-compiled binaries from GitHub for ARMv7 + x86_64. For ARMv6 (RPi1/Zero) no binaries are available yet
+ DietPi-Software | Gogs: Download to /tmp first to avoid moving the "__MACOSX" dir to /etc that comes with our ARMv6 archive
@MichaIng MichaIng added this to the v6.26 milestone Jul 25, 2019
@MichaIng MichaIng self-assigned this Jul 25, 2019
@MichaIng MichaIng changed the title v6.26 DietPi-Software | Gogs: Install latest pre-compiled binaries from GitHub for ARMv7 + x86_64 Jul 25, 2019
MichaIng added 2 commits July 26, 2019 14:30
+ DietPi-Software | Gogs: C_CHECK_URL receives 403 on GitHub download, thus skip it
+ DietPi-Software | Gogs: On reinstall, remove old install dir, but preserve existing configs
+ DietPi-Software | Gogs: Import pre-defined SQL file on fresh install to pre-create database. On current version otherwise an error occurs on access attempt
+ DietPi-Software | Gogs: MariaDB needs to run before client can access
@MichaIng
Copy link
Owner Author

MichaIng commented Jul 26, 2019

Strange, doing fresh install, entering credentials in web UI and attempt to go on results in:

Error 1071: Specified key was too long; max key length is 767 bytes

First I though this was due to our manual database creation, so I used /etc/gogs/scripts/mysql.sql instead, which then worked.

Now even exactly this is in installer, it fails with the same error. Manually dropping the database and re-importing with exactly the same commands again resolves it.

Pre-created database is empty, collation as it should be:

MariaDB [gogs]> show tables;
+----------------+
| Tables_in_gogs |
+----------------+
| user           |
+----------------+
1 row in set (0.00 sec)

MariaDB [gogs]> select * from user;
Empty set (0.00 sec)

MariaDB [gogs]> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| utf8mb4                  | utf8mb4_general_ci   |
+--------------------------+----------------------+
1 row in set (0.00 sec)

mysqlcheck -o gogs does not help as well, so there is no corruption or something.

Okay: https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes

  • Only strange why this is no issue when running the exact same commands manually from console...

Okay well InnoDB 4byte support (incl. Barracuda file + large prefix) solves the issue reliably. We should add this by default to MariaDB installs, after tested with all software titles.
🈯️ Added as we do for ownCloud and Nextcloud

MichaIng added 4 commits July 26, 2019 15:14
+ DietPi-Software | Gogs: InnoDB large table prefix with Barracuda file format is required
+ DietPi-Patch | Gogs: Remove /etc/__MACOSX if present, coming from our archive on ARMv6
+ CHANGELOG | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed
+ DietPi-Software | MariaDB: Assure/Enable 4-byte support (default since Stretch) and modern Barracuda file format + large table prefix (default since Buster) on all MariaDB installs. This has no effect on existing tables, setting this with ownCloud and Nextcloud installs never caused issues for other MariaDB databases and software using them, and, every Stretch to backports/Buster upgrade would break it the same way if so. However a special eye on this during Beta phase makes sense.
@MichaIng MichaIng merged commit d1f03f2 into dev Jul 30, 2019
@MichaIng MichaIng deleted the gogs branch July 30, 2019 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant