From 7f8f3ae52dce2e88550bbcd268d4e176185826856c40746e61f56f8d21c964f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 27 Nov 2016 16:23:01 +0000 Subject: [PATCH 1/3] - Generate basic SSL pem certificate on the quasselcore install time * I suppose it is better than having the first setup run without SSL OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/quassel?expand=0&rev=50 --- quassel.changes | 6 ++++++ quassel.spec | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/quassel.changes b/quassel.changes index 78de74f..a1a26ee 100644 --- a/quassel.changes +++ b/quassel.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Nov 27 16:21:15 UTC 2016 - tchvatal@suse.com + +- Generate basic SSL pem certificate on the quasselcore install time + * I suppose it is better than having the first setup run without SSL + ------------------------------------------------------------------- Thu Aug 25 19:00:04 UTC 2016 - tchvatal@suse.com diff --git a/quassel.spec b/quassel.spec index ae926ef..3c0982d 100644 --- a/quassel.spec +++ b/quassel.spec @@ -136,6 +136,7 @@ Requires: libqt5_sql_backend Requires: logrotate Requires(pre): %fillup_prereq Requires(pre): pwdutils +Requires(post): openssl Recommends: libqt5-sql-sqlite %description core @@ -215,6 +216,12 @@ install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2. %post core %{fillup_only -n quasselcore} %service_add_post quasselcore.service +# generate the ssl certificate if not present +ssl_cert="%{_localstatedir}/lib/%{name}core/quasselCert.pem" +if [ ! -f "$ssl_cert" ]; then + openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout \ + $ssl_cert -out $ssl_cert +fi %preun core %service_del_preun quasselcore.service From 7a87d4093f2c66c7a4525ae027300cfcaf62f2a92f72dd28b0a06f6b49a39c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 27 Nov 2016 16:26:30 +0000 Subject: [PATCH 2/3] This was dumb idea, one must fill content for the key to be generated, not good in post phase... OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/quassel?expand=0&rev=51 --- quassel.changes | 6 ------ quassel.spec | 7 ------- 2 files changed, 13 deletions(-) diff --git a/quassel.changes b/quassel.changes index a1a26ee..78de74f 100644 --- a/quassel.changes +++ b/quassel.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Sun Nov 27 16:21:15 UTC 2016 - tchvatal@suse.com - -- Generate basic SSL pem certificate on the quasselcore install time - * I suppose it is better than having the first setup run without SSL - ------------------------------------------------------------------- Thu Aug 25 19:00:04 UTC 2016 - tchvatal@suse.com diff --git a/quassel.spec b/quassel.spec index 3c0982d..ae926ef 100644 --- a/quassel.spec +++ b/quassel.spec @@ -136,7 +136,6 @@ Requires: libqt5_sql_backend Requires: logrotate Requires(pre): %fillup_prereq Requires(pre): pwdutils -Requires(post): openssl Recommends: libqt5-sql-sqlite %description core @@ -216,12 +215,6 @@ install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2. %post core %{fillup_only -n quasselcore} %service_add_post quasselcore.service -# generate the ssl certificate if not present -ssl_cert="%{_localstatedir}/lib/%{name}core/quasselCert.pem" -if [ ! -f "$ssl_cert" ]; then - openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout \ - $ssl_cert -out $ssl_cert -fi %preun core %service_del_preun quasselcore.service From 3567dea242d203ad45e0fd565d53b52642a394e2f5b1c661cbb715ed61420945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 24 Nov 2017 07:06:14 +0000 Subject: [PATCH 3/3] Accepting request 544830 from home:RBrownSUSE:branches:KDE:Extra Replace references to /var/adm/fillup-templates with new %_fillupdir macro (boo#1069468) OBS-URL: https://build.opensuse.org/request/show/544830 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/quassel?expand=0&rev=52 --- quassel.changes | 6 ++++++ quassel.spec | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/quassel.changes b/quassel.changes index 78de74f..dd83b34 100644 --- a/quassel.changes +++ b/quassel.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 23 13:53:34 UTC 2017 - rbrown@suse.com + +- Replace references to /var/adm/fillup-templates with new + %_fillupdir macro (boo#1069468) + ------------------------------------------------------------------- Thu Aug 25 19:00:04 UTC 2016 - tchvatal@suse.com diff --git a/quassel.spec b/quassel.spec index ae926ef..26a7f69 100644 --- a/quassel.spec +++ b/quassel.spec @@ -1,7 +1,7 @@ # # spec file for package quassel # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,11 @@ # +#Compat macro for new _fillupdir macro introduced in Nov 2017 +%if ! %{defined _fillupdir} + %define _fillupdir /var/adm/fillup-templates +%endif + Name: quassel Version: 0.12.4 Release: 0 @@ -201,7 +206,7 @@ mkdir -p %{buildroot}%{_unitdir} install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/quasselcore.service # Provide SUSE policy symlink /usr/sbin/rcFOO -> service ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcquasselcore -install -D -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.quasselcore +install -D -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.quasselcore install -d -m 751 %{buildroot}%{_localstatedir}/log/%{name} install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}core install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} @@ -274,7 +279,7 @@ fi %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} %attr(-,%{name}core,%{name}core) %dir %{_localstatedir}/lib/%{name}core %attr(-,%{name}core,%{name}core) %dir %{_localstatedir}/log/%{name} -%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}core +%{_fillupdir}/sysconfig.%{name}core %files base %defattr(-,root,root)