Merge pull request #1368 from jberry-suse/announcer-packaging
announcer: provide proper packaging, generic templated service, and configs.
This commit is contained in:
commit
a5dbcd1976
1
config/announcer/openSUSE:Factory.yml
Normal file
1
config/announcer/openSUSE:Factory.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
sender: Dominique Leuenberger <dimstar@suse.de>
|
33
config/announcer/openSUSE:Leap:15.0.yml
Normal file
33
config/announcer/openSUSE:Leap:15.0.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
bodytemplate: '
|
||||||
|
|
||||||
|
Please note that this mail was generated by a script.
|
||||||
|
|
||||||
|
The described changes are computed based on the x86_64 DVD.
|
||||||
|
|
||||||
|
The full online repo contains too many changes to be listed here.
|
||||||
|
|
||||||
|
|
||||||
|
Please check the known defects of this snapshot before upgrading:
|
||||||
|
|
||||||
|
https://openqa.opensuse.org/tests/overview?distri=opensuse&version=15.0&build={version}&groupid=28
|
||||||
|
|
||||||
|
https://bugzilla.opensuse.org/buglist.cgi?product=openSUSE%20Distribution&query_format=advanced&resolution=---&version=Leap%2015.0
|
||||||
|
|
||||||
|
|
||||||
|
When you reply to discuss some issues, make sure to change the subject.
|
||||||
|
|
||||||
|
Please use the test plan at
|
||||||
|
|
||||||
|
https://docs.google.com/spreadsheets/d/1AGKijKpKiJCB616-bHVoNQuhWHpQLHPWCb3m1p6gXPc/edit#gid=298435253
|
||||||
|
|
||||||
|
to record your testing efforts and use bugzilla to report bugs.
|
||||||
|
|
||||||
|
|
||||||
|
{text}
|
||||||
|
|
||||||
|
'
|
||||||
|
iso: openSUSE-Leap-15.0-DVD-x86_64-Current.iso
|
||||||
|
name: openSUSE:Leap:15.0
|
||||||
|
subject: Leap 15.0 Build {version} released!
|
||||||
|
url: http://download.opensuse.org/distribution/leap/15.0/iso/
|
||||||
|
sender: Ludwig Nussel <ludwig.nussel@suse.de>
|
33
config/announcer/openSUSE:Leap:42.3.yml
Normal file
33
config/announcer/openSUSE:Leap:42.3.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
bodytemplate: '
|
||||||
|
|
||||||
|
Please note that this mail was generated by a script.
|
||||||
|
|
||||||
|
The described changes are computed based on the x86_64 DVD.
|
||||||
|
|
||||||
|
The full online repo contains too many changes to be listed here.
|
||||||
|
|
||||||
|
|
||||||
|
Please check the known defects of this snapshot before upgrading:
|
||||||
|
|
||||||
|
https://openqa.opensuse.org/tests/overview?distri=opensuse&version=42.3&build={version}&groupid=28
|
||||||
|
|
||||||
|
https://bugzilla.opensuse.org/buglist.cgi?product=openSUSE%20Distribution&query_format=advanced&resolution=---&version=Leap%2042.3
|
||||||
|
|
||||||
|
|
||||||
|
When you reply to discuss some issues, make sure to change the subject.
|
||||||
|
|
||||||
|
Please use the test plan at
|
||||||
|
|
||||||
|
https://docs.google.com/spreadsheets/d/1AGKijKpKiJCB616-bHVoNQuhWHpQLHPWCb3m1p6gXPc/edit#gid=298435253
|
||||||
|
|
||||||
|
to record your testing efforts and use bugzilla to report bugs.
|
||||||
|
|
||||||
|
|
||||||
|
{text}
|
||||||
|
|
||||||
|
'
|
||||||
|
iso: openSUSE-Leap-DVD-x86_64-Current.iso
|
||||||
|
name: leap-423-announcer
|
||||||
|
subject: Leap 42.3 Build {version} released!
|
||||||
|
url: http://download.opensuse.org/distribution/leap/42.3/iso/
|
||||||
|
sender: Ludwig Nussel <ludwig.nussel@suse.de>
|
14
dist/package/openSUSE-release-tools.spec
vendored
14
dist/package/openSUSE-release-tools.spec
vendored
@ -282,8 +282,10 @@ make %{?_smp_mflags}
|
|||||||
oscplugindir="%{osc_plugin_dir}" \
|
oscplugindir="%{osc_plugin_dir}" \
|
||||||
VERSION="%{version}"
|
VERSION="%{version}"
|
||||||
|
|
||||||
# TODO Correct makefile to actually install source.
|
%pre announcer
|
||||||
mkdir -p %{buildroot}%{_datadir}/%{source_dir}/%{announcer_filename}
|
getent passwd osrt-announcer > /dev/null || \
|
||||||
|
useradd -r -m -s /sbin/nologin -c "user for openSUSE-release-tools-leaper" osrt-announcer
|
||||||
|
exit 0
|
||||||
|
|
||||||
%postun announcer
|
%postun announcer
|
||||||
%systemd_postun
|
%systemd_postun
|
||||||
@ -399,11 +401,13 @@ fi
|
|||||||
%files announcer
|
%files announcer
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc %{announcer_filename}/README.asciidoc
|
%doc %{announcer_filename}/README.asciidoc
|
||||||
|
%{_bindir}/osrt-announcer
|
||||||
%{apache_sysconfdir}/conf.d/%{announcer_filename}.conf.in
|
%{apache_sysconfdir}/conf.d/%{announcer_filename}.conf.in
|
||||||
%{_datadir}/%{source_dir}/%{announcer_filename}
|
%{_datadir}/%{source_dir}/%{announcer_filename}
|
||||||
|
%config(noreplace) %{_sysconfdir}/openSUSE-release-tools/announcer
|
||||||
%config(noreplace) %{_sysconfdir}/rsyslog.d/%{announcer_filename}.conf
|
%config(noreplace) %{_sysconfdir}/rsyslog.d/%{announcer_filename}.conf
|
||||||
%{_unitdir}/%{announcer_filename}.service
|
%{_unitdir}/osrt-announcer@.service
|
||||||
%{_unitdir}/%{announcer_filename}.timer
|
%{_unitdir}/osrt-announcer@.timer
|
||||||
|
|
||||||
%files check-source
|
%files check-source
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -428,7 +432,7 @@ fi
|
|||||||
%{_unitdir}/osrt-leaper-manager@.timer
|
%{_unitdir}/osrt-leaper-manager@.timer
|
||||||
%{_unitdir}/osrt-leaper-review.service
|
%{_unitdir}/osrt-leaper-review.service
|
||||||
%{_unitdir}/osrt-leaper-review.timer
|
%{_unitdir}/osrt-leaper-review.timer
|
||||||
%{_sysconfdir}/openSUSE-release-tools/manager_42
|
%config(noreplace) %{_sysconfdir}/openSUSE-release-tools/manager_42
|
||||||
|
|
||||||
%files maintenance
|
%files maintenance
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
|
include ../Makefile.common
|
||||||
|
|
||||||
prefix=/usr
|
prefix=/usr
|
||||||
sysconfdir=/etc
|
sysconfdir=/etc
|
||||||
apachedir=$(sysconfdir)/apache2/conf.d
|
apachedir=$(sysconfdir)/apache2/conf.d
|
||||||
unitdir=$(prefix)/lib/systemd/system
|
unitdir=$(prefix)/lib/systemd/system
|
||||||
|
announcer_subpackage=factory-package-news
|
||||||
|
pkgdata_SCRIPTS=$(wildcard *.py *.pl *.sh)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -d -m 755 $(DESTDIR)$(apachedir) $(DESTDIR)$(unitdir) $(DESTDIR)$(sysconfdir)/rsyslog.d
|
install -d -m 755 $(DESTDIR)$(pkgdatadir)/$(announcer_subpackage) $(DESTDIR)$(apachedir) $(DESTDIR)$(unitdir) $(DESTDIR)$(sysconfdir)/rsyslog.d
|
||||||
|
for i in $(pkgdata_SCRIPTS); do install -m 755 $$i $(DESTDIR)$(pkgdatadir)/$(announcer_subpackage); done
|
||||||
install -m 644 systemd/* $(DESTDIR)$(unitdir)
|
install -m 644 systemd/* $(DESTDIR)$(unitdir)
|
||||||
install -m 644 rsyslog/* $(DESTDIR)$(sysconfdir)/rsyslog.d
|
install -m 644 rsyslog/* $(DESTDIR)$(sysconfdir)/rsyslog.d
|
||||||
install -m 644 apache/factory-package-news.conf $(DESTDIR)$(apachedir)/factory-package-news.conf.in
|
install -m 644 apache/factory-package-news.conf $(DESTDIR)$(apachedir)/factory-package-news.conf.in
|
||||||
install -d -m 755 $(DESTDIR)/var/lib/factory-package-news
|
ln -s $(pkgdatadir)/$(announcer_subpackage)/announcer.py $(DESTDIR)$(bindir)/osrt-announcer
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
|
@ -38,9 +38,9 @@ logger = logging.getLogger()
|
|||||||
|
|
||||||
# map of default config entries
|
# map of default config entries
|
||||||
config_defaults = {
|
config_defaults = {
|
||||||
'sender': None,
|
'sender': 'noreply@opensuse.org',
|
||||||
'to': None,
|
'to': 'opensuse-factory@opensuse.org',
|
||||||
'relay': None,
|
'relay': 'relay.suse.de',
|
||||||
'url' : "http://download.opensuse.org/tumbleweed/iso/",
|
'url' : "http://download.opensuse.org/tumbleweed/iso/",
|
||||||
'iso' : "openSUSE-Tumbleweed-DVD-x86_64-Current.iso",
|
'iso' : "openSUSE-Tumbleweed-DVD-x86_64-Current.iso",
|
||||||
'name' : 'factory-announcer',
|
'name' : 'factory-announcer',
|
||||||
@ -119,7 +119,7 @@ if not options.version:
|
|||||||
if loc is None:
|
if loc is None:
|
||||||
raise Exception("empty location!")
|
raise Exception("empty location!")
|
||||||
|
|
||||||
m = re.search('(?:Snapshot|Build)(\d+)-Media', loc)
|
m = re.search('(?:Snapshot|Build)([\d.]+)-Media', loc)
|
||||||
if m is None:
|
if m is None:
|
||||||
raise Exception("failed to parse %s"%loc)
|
raise Exception("failed to parse %s"%loc)
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Announce new Factory snapshots
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/share/osc-plugin-factory/factory-package-news/announcer.py --from "Ludwig Nussel <ludwig.nussel@suse.de>" --to opensuse-factory@opensuse.org --relay relay.suse.de
|
|
||||||
WorkingDirectory=/var/lib/factory-package-news
|
|
||||||
User=factoryauto
|
|
||||||
SyslogIdentifier=factory-package-news
|
|
@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Regular Factory snapshot announcer
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnCalendar=hourly
|
|
||||||
AccuracySec=30m
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
10
factory-package-news/systemd/osrt-announcer@.service
Normal file
10
factory-package-news/systemd/osrt-announcer@.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=openSUSE Release Tools: announce new %i build
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=osrt-announcer
|
||||||
|
SyslogIdentifier=osrt-announcer
|
||||||
|
ExecStart=/usr/bin/osrt-announcer --config "/etc/openSUSE-release-tools/announcer/%i.yml" --verbose
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
10
factory-package-news/systemd/osrt-announcer@.timer
Normal file
10
factory-package-news/systemd/osrt-announcer@.timer
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=openSUSE Release Tools: announce new %i build
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=120
|
||||||
|
OnCalendar=hourly
|
||||||
|
Unit=osrt-announcer@%i.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
x
Reference in New Issue
Block a user