Skip to content

Commit

Permalink
Merge 007dc13 into f2718fe
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergeykot committed Aug 20, 2018
2 parents f2718fe + 007dc13 commit d5f3293
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion MANUAL.md
Expand Up @@ -125,7 +125,7 @@ As described in the [PREREQUISITE][] section, the recommended way to perform ini
The YaST RMT module will take care of configuring SCC credentials, setting up the database and creating SSL certificates.
However, if you want to reconfigure specific settings manually, this section tells you how.

All available configuration options can be found in the `/etc/rmt/rmt.conf` file.
All available configuration options can be found in the `/etc/rmt.conf` file.

**SSL certificates & HTTPS**

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -42,7 +42,7 @@ After installation configure your RMT instance:
FLUSH PRIVILEGES;
EOFF
```
* See the "Configuration" section for how to configure the options in `/etc/rmt/rmt.conf`.
* See the "Configuration" section for how to configure the options in `/etc/rmt.conf`.
* Start RMT by running `systemctl start rmt-server`. This will start the RMT server at http://localhost:4224.
* By default, mirrored repositories are saved under `/usr/share/rmt/public`, which is a symlink that points to
`/var/lib/rmt/public`. In order to change destination directory, recreate `/usr/share/rmt/public` symlink to point to the
Expand Down
6 changes: 3 additions & 3 deletions lib/rmt/cli/base.rb
Expand Up @@ -45,12 +45,12 @@ def handle_exceptions
rescue Mysql2::Error => e
if e.message =~ /^Access denied/
raise RMT::CLI::Error.new(
"Cannot connect to database server. Make sure its credentials are configured in '/etc/rmt/rmt.conf'.",
"Cannot connect to database server. Make sure its credentials are configured in '/etc/rmt.conf'.",
RMT::CLI::Error::ERROR_DB
)
elsif e.message =~ /^Can't connect/
raise RMT::CLI::Error.new(
"Cannot connect to database server. Make sure it is running and its credentials are configured in '/etc/rmt/rmt.conf'.",
"Cannot connect to database server. Make sure it is running and its credentials are configured in '/etc/rmt.conf'.",
RMT::CLI::Error::ERROR_DB
)
else
Expand All @@ -64,7 +64,7 @@ def handle_exceptions
)
rescue RMT::SCC::CredentialsError, ::SUSE::Connect::Api::InvalidCredentialsError
raise RMT::CLI::Error.new(
"The SCC credentials are not configured correctly in '/etc/rmt/rmt.conf'. You can obtain them from https://scc.suse.com/organization",
"The SCC credentials are not configured correctly in '/etc/rmt.conf'. You can obtain them from https://scc.suse.com/organization",
RMT::CLI::Error::ERROR_SCC
)
rescue RMT::Lockfile::ExecutionLockedError => e
Expand Down
2 changes: 1 addition & 1 deletion lib/rmt/config.rb
Expand Up @@ -6,7 +6,7 @@
end

Config.load_and_set_settings(
'/etc/rmt/rmt.conf',
'/etc/rmt.conf',
File.join(__dir__, '../../config/rmt.yml'),
File.join(__dir__, '../../config/rmt.local.yml')
)
Expand Down
1 change: 1 addition & 0 deletions package/rmt-server.changes
Expand Up @@ -4,6 +4,7 @@ Thu Aug 2 16:19:35 UTC 2018 - fschnizlein@suse.com
- Version 1.0.6
- Change file paths to new locations to make RMT work with
read-only rootfs (bsc#1102198)
- Change file permissions for rmt.conf (bsc#1104232)

-------------------------------------------------------------------
Thu Jul 19 12:27:23 UTC 2018 - wstephenson@suse.com
Expand Down
8 changes: 2 additions & 6 deletions package/rmt-server.spec
Expand Up @@ -141,7 +141,7 @@ ln -fs %{_sbindir}/service %{buildroot}%{_sbindir}/rcrmt-server-mirror
ln -fs %{_sbindir}/service %{buildroot}%{_sbindir}/rcrmt-server-sync

mkdir -p %{buildroot}%{_sysconfdir}
mv %{_builddir}/rmt.conf %{buildroot}%{conf_dir}/rmt.conf
mv %{_builddir}/rmt.conf %{buildroot}%{_sysconfdir}/rmt.conf

# nginx
install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/nginx/vhosts.d/rmt-server-http.conf
Expand Down Expand Up @@ -193,7 +193,7 @@ find %{buildroot}%{lib_dir}/vendor/bundle/ruby/*/gems/yard*/ -type f -exec chmod
%dir %{_sysconfdir}/nginx
%dir %{_sysconfdir}/nginx/vhosts.d
%dir %{_sharedstatedir}/rmt
%config(noreplace) %{conf_dir}/rmt.conf
%config(noreplace) %attr(0640, %{rmt_user},root) %{_sysconfdir}/rmt.conf
%config(noreplace) %{_sysconfdir}/nginx/vhosts.d/rmt-server-http.conf
%config(noreplace) %{_sysconfdir}/nginx/vhosts.d/rmt-server-https.conf
%{_mandir}/man8/rmt-cli.8%{?ext_man}
Expand Down Expand Up @@ -237,10 +237,6 @@ if [ $1 -eq 2 ]; then
mv %{app_dir}/ssl/* %{conf_dir}/ssl
echo "RMT ssl configuration has been moved to a new place. New place is: %{conf_dir}/ssl"
fi
if [ -f %{_sysconfdir}/rmt.conf ]; then
mv %{_sysconfdir}/rmt.conf %{conf_dir}/rmt.conf
echo "RMT configuration has been moved to a new place. New place is: %{conf_dir}/rmt.conf"
fi

if [ -f %{app_dir}/config/system_uuid ]; then
mv %{app_dir}/config/system_uuid %{_sharedstatedir}/rmt/system_uuid
Expand Down
8 changes: 4 additions & 4 deletions spec/lib/rmt/cli/main_spec.rb
Expand Up @@ -116,7 +116,7 @@

it 'outputs custom error message' do
expect { command }.to output(
"Cannot connect to database server. Make sure its credentials are configured in '/etc/rmt/rmt.conf'.\n"
"Cannot connect to database server. Make sure its credentials are configured in '/etc/rmt.conf'.\n"
).to_stderr
end
end
Expand All @@ -127,7 +127,7 @@

it 'outputs custom error message' do
expect { command }.to output(
"Cannot connect to database server. Make sure it is running and its credentials are configured in '/etc/rmt/rmt.conf'.\n"
"Cannot connect to database server. Make sure it is running and its credentials are configured in '/etc/rmt.conf'.\n"
).to_stderr
end
end
Expand All @@ -147,7 +147,7 @@

it 'outputs custom error message' do
expect { command }.to output(
"The SCC credentials are not configured correctly in '/etc/rmt/rmt.conf'. You can obtain them from https://scc.suse.com/organization\n"
"The SCC credentials are not configured correctly in '/etc/rmt.conf'. You can obtain them from https://scc.suse.com/organization\n"
).to_stderr
end
end
Expand All @@ -157,7 +157,7 @@

it 'outputs custom error message' do
expect { command }.to output(
"The SCC credentials are not configured correctly in '/etc/rmt/rmt.conf'. You can obtain them from https://scc.suse.com/organization\n"
"The SCC credentials are not configured correctly in '/etc/rmt.conf'. You can obtain them from https://scc.suse.com/organization\n"
).to_stderr
end
end
Expand Down

0 comments on commit d5f3293

Please sign in to comment.