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

Mysql and logging fix #476

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions bootstrap/selfconfig-root
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,29 @@ run_cmd(qw(apt-get -o DPkg::Lock::Timeout=60 install -y),
default-libmysqlclient-dev
));

# Configure Mariadb a bit
Path::Tiny::path("/etc/mysql/conf.d/mysql.cnf")->append(<<~EOF);

# PAUSE specific config
[client]
# Compat with old pause setup for command line client. Previous
# mysql version had latin1 by default so insert utf8 data into latin1
# column and pulling them back out just ... worked. Weird right? Without
# this, we cannot insert utf8 data to fullname column, and existing
# utf8 data in that column comes out mojibaked in the mysql command line
default-character-set = latin1

[mysqld]
# Compat with old pause setup for DBI connections, etc...
# This lets pause-web and others work correctly with utf8 data in the
# fullname column. Otherwise fullnames would be mojibaked and updating/
# inserting utf8 data was not possible.
init_connect='set NAMES latin1'

EOF

run_cmd(qw(/etc/init.d/mariadb restart));

{
my $user = $opt->repo_user;

Expand Down Expand Up @@ -405,6 +428,8 @@ for my $service (qw( rsync )) {
run_cmd(qw( systemctl status ), $service );
}

run_cmd(qw( systemctl restart systemd-journald.service ));

## SUBROUTINES GO DOWN BELOW
## THAT'S WHY THEY'RE CALLED SUBROUTINES

Expand Down
Loading