From 33aa7db4665d3db2e29e76af5416aa421dbb800954d1ebf9b0c54ef3359ebd7d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 19 Nov 2012 19:42:31 +0000 Subject: [PATCH 1/5] Accepting request 141955 from home:dimstar:branches:server:irc - Fix useradd invocation: -o is useless without -u and newer versions of pwdutils/shadowutils fail on this now. This did not cause errors as it's masked away with || ;; OBS-URL: https://build.opensuse.org/request/show/141955 OBS-URL: https://build.opensuse.org/package/show/server:irc/atheme?expand=0&rev=43 --- atheme.changes | 6 ++++++ atheme.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/atheme.changes b/atheme.changes index eebbd00..a303eb2 100644 --- a/atheme.changes +++ b/atheme.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 19 17:12:57 UTC 2012 - dimstar@opensuse.org + +- Fix useradd invocation: -o is useless without -u and newer + versions of pwdutils/shadowutils fail on this now. + ------------------------------------------------------------------- Thu May 31 12:55:59 UTC 2012 - jengelh@inai.de diff --git a/atheme.spec b/atheme.spec index dd26829..307ca1b 100644 --- a/atheme.spec +++ b/atheme.spec @@ -120,7 +120,7 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} /usr/bin/getent group atheme >/dev/null 2>/dev/null || \ /usr/sbin/groupadd -r atheme >/dev/null || :; /usr/bin/getent passwd atheme >/dev/null 2>/dev/null || \ - /usr/sbin/useradd -r -o -g atheme -s /bin/false \ + /usr/sbin/useradd -r -g atheme -s /bin/false \ -c "%name daemon" -d "%atheme_home" atheme >/dev/null || :; %preun From db20ebca8a20fcbea05afc1aab1c68a259dc264a95484e68e17ac44a019bffec Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 21 Nov 2012 00:03:06 +0000 Subject: [PATCH 2/5] atheme-7.0.5 OBS-URL: https://build.opensuse.org/package/show/server:irc/atheme?expand=0&rev=44 --- atheme-config.diff | 36 +++++++++++------------ atheme-nodate.diff | 54 ++++++++++++++++++++++++++++++++++ atheme-pkgconfig.diff | 47 ------------------------------ atheme-pkgconfig2.diff | 32 -------------------- atheme-services-7.0.2.tar.xz | 3 -- atheme-services-7.0.5.tar.bz2 | 3 ++ atheme-tmpfiles.conf | 1 + atheme.changes | 18 ++++++++++++ atheme.service | 10 +++++++ atheme.spec | 55 +++++++++++++++++++++++++++-------- 10 files changed, 147 insertions(+), 112 deletions(-) create mode 100644 atheme-nodate.diff delete mode 100644 atheme-pkgconfig.diff delete mode 100644 atheme-pkgconfig2.diff delete mode 100644 atheme-services-7.0.2.tar.xz create mode 100644 atheme-services-7.0.5.tar.bz2 create mode 100644 atheme-tmpfiles.conf create mode 100644 atheme.service diff --git a/atheme-config.diff b/atheme-config.diff index 32e6949..445956c 100644 --- a/atheme-config.diff +++ b/atheme-config.diff @@ -7,10 +7,10 @@ Signed-off-by: Jan Engelhardt dist/atheme.conf.example | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) -Index: atheme-services-7.0.2/dist/atheme.conf.example +Index: atheme-services-7.0.5/dist/atheme.conf.example =================================================================== ---- atheme-services-7.0.2.orig/dist/atheme.conf.example -+++ atheme-services-7.0.2/dist/atheme.conf.example +--- atheme-services-7.0.5.orig/dist/atheme.conf.example ++++ atheme-services-7.0.5/dist/atheme.conf.example @@ -708,7 +708,7 @@ loadmodule "modules/groupserv/set_url"; * * HTTP Server modules/misc/httpd @@ -76,7 +76,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example // port // The port to connect to. -@@ -961,7 +961,7 @@ nickserv { +@@ -962,7 +962,7 @@ nickserv { /* (*)host * The hostname we want NickServ to have. */ @@ -85,7 +85,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The realname (gecos) information we want NickServ to have. -@@ -1052,7 +1052,7 @@ chanserv { +@@ -1053,7 +1053,7 @@ chanserv { /* (*)host * The hostname we want the client to have. */ @@ -94,7 +94,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The GECOS of the client. -@@ -1076,7 +1076,7 @@ chanserv { +@@ -1077,7 +1077,7 @@ chanserv { * use a lot of CPU up, and will only work if you have * join_chans (in general) enabled as well. */ @@ -103,7 +103,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*) hide_xop * Hide the XOP templates from sight. This is useful if you -@@ -1242,7 +1242,7 @@ global { +@@ -1243,7 +1243,7 @@ global { /* (*)host * The hostname used for this client. */ @@ -112,7 +112,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The GECOS (real name) of the client. -@@ -1271,7 +1271,7 @@ infoserv { +@@ -1272,7 +1272,7 @@ infoserv { /* (*)host * The hostname used for this client, */ @@ -121,7 +121,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The GECOS (real name) of the client. -@@ -1307,7 +1307,7 @@ operserv { +@@ -1308,7 +1308,7 @@ operserv { /* (*)host * The hostname used for this client. */ @@ -130,7 +130,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The GECOS (real name) of the client. -@@ -1348,7 +1348,7 @@ saslserv { +@@ -1349,7 +1349,7 @@ saslserv { /* (*)host * The hostname we want SaslServ to have. */ @@ -139,7 +139,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The realname (gecos) information we want SaslServ to have. -@@ -1377,7 +1377,7 @@ memoserv { +@@ -1378,7 +1378,7 @@ memoserv { /* (*)host * The hostname we want MemoServ to have. */ @@ -148,7 +148,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The realname (gecos) information we want MemoServ to have. -@@ -1417,7 +1417,7 @@ gameserv { +@@ -1418,7 +1418,7 @@ gameserv { /* (*)host * The hostname used for this client. */ @@ -157,7 +157,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The GECOS (real name) of the client. -@@ -1457,7 +1457,7 @@ rpgserv { +@@ -1458,7 +1458,7 @@ rpgserv { /* (*)host * The hostname used for this client. */ @@ -166,7 +166,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The GECOS (real name) of the client. -@@ -1532,7 +1532,7 @@ groupserv { +@@ -1533,7 +1533,7 @@ groupserv { /* (*)host * The hostname we want GroupServ to have. */ @@ -175,7 +175,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The realname (gecos) information we want GroupServ to have. -@@ -1597,7 +1597,7 @@ hostserv { +@@ -1598,7 +1598,7 @@ hostserv { /* (*)host * The hostname used for this client. */ @@ -184,7 +184,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The GECOS (real name) of the client. -@@ -1646,7 +1646,7 @@ helpserv { +@@ -1647,7 +1647,7 @@ helpserv { /* (*)host * The hostname we want HelpServ to have. */ @@ -193,7 +193,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The realname (gecos) information we want HelpServ to have. -@@ -1700,7 +1700,7 @@ alis { +@@ -1701,7 +1701,7 @@ alis { /* (*)host * The hostname we want ALIS to have. */ @@ -202,7 +202,7 @@ Index: atheme-services-7.0.2/dist/atheme.conf.example /* (*)real * The realname (gecos) information we want ALIS to have. -@@ -1868,7 +1868,7 @@ general { +@@ -1869,7 +1869,7 @@ general { * network channels by keeping them open, and to preserve the * topic and +beI lists. */ diff --git a/atheme-nodate.diff b/atheme-nodate.diff new file mode 100644 index 0000000..de67f55 --- /dev/null +++ b/atheme-nodate.diff @@ -0,0 +1,54 @@ +From: Jan Engelhardt +Date: 2012-10-28 01:35:57.295975255 +0200 + +__DATE__ is not desired; causes unnecessary rebuilds. + +--- + libathemecore/ctcp-common.c | 4 ++-- + libathemecore/ptasks.c | 4 ++-- + modules/operserv/uptime.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +Index: atheme-services-7.0.5/libathemecore/ctcp-common.c +=================================================================== +--- atheme-services-7.0.5.orig/libathemecore/ctcp-common.c ++++ atheme-services-7.0.5/libathemecore/ctcp-common.c +@@ -41,8 +41,8 @@ static void ctcp_ping_handler(sourceinfo + static void ctcp_version_handler(sourceinfo_t *si, char *cmd, char *args) + { + notice(si->service->nick, si->su->nick, +- "\001VERSION %s. %s %s %s [%s] Build Date: %s\001", +- PACKAGE_STRING, revision, me.name, get_conf_opts(), ircd->ircdname, __DATE__); ++ "\001VERSION %s. %s %s %s [%s] Build Date: irrelevant\001", ++ PACKAGE_STRING, revision, me.name, get_conf_opts(), ircd->ircdname); + } + + static void ctcp_clientinfo_handler(sourceinfo_t *si, char *cmd, char *args) +Index: atheme-services-7.0.5/libathemecore/ptasks.c +=================================================================== +--- atheme-services-7.0.5.orig/libathemecore/ptasks.c ++++ atheme-services-7.0.5/libathemecore/ptasks.c +@@ -49,8 +49,8 @@ void handle_version(user_t *u) + if (floodcheck(u, NULL)) + return; + +- numeric_sts(me.me, 351, u, "%s. %s %s :%s [%s] Build Date: %s", +- PACKAGE_STRING, me.name, revision, get_conf_opts(), ircd->ircdname, __DATE__); ++ numeric_sts(me.me, 351, u, "%s. %s %s :%s [%s] Build Date: irrelevant", ++ PACKAGE_STRING, me.name, revision, get_conf_opts(), ircd->ircdname); + } + + void handle_admin(user_t *u) +Index: atheme-services-7.0.5/modules/operserv/uptime.c +=================================================================== +--- atheme-services-7.0.5.orig/modules/operserv/uptime.c ++++ atheme-services-7.0.5/modules/operserv/uptime.c +@@ -33,7 +33,7 @@ static void os_cmd_uptime(sourceinfo_t * + { + logcommand(si, CMDLOG_GET, "UPTIME"); + +- command_success_nodata(si, "%s [%s] Build Date: %s", PACKAGE_STRING, revision, __DATE__); ++ command_success_nodata(si, "%s [%s] Build Date: irrelevant", PACKAGE_STRING, revision); + command_success_nodata(si, _("Services have been up for %s"), timediff(CURRTIME - me.start)); + command_success_nodata(si, _("Current PID: %d"), getpid()); + command_success_nodata(si, _("Registered accounts: %d"), cnt.myuser); diff --git a/atheme-pkgconfig.diff b/atheme-pkgconfig.diff deleted file mode 100644 index e77efe6..0000000 --- a/atheme-pkgconfig.diff +++ /dev/null @@ -1,47 +0,0 @@ -parent 418376c88519e3585e1b2c34fba133b7cc015985 (atheme-services-7.0.0-alpha7-627-g418376c) -commit 0c5c860727019adc6ddb2e8b6f29268e51377cb3 -Author: Jan Engelhardt -Date: Wed Jun 6 21:43:09 2012 +0200 - -build: avoid undefined variables in .pc file - -Here is an odd thing. If an undeclared variable is used, `pkg-config ---print-provides foo.pc` will not show anything. The default value -for MODDIR is "${libdir}/atheme/modules", but atheme-services.pc -uses the non-standard "lib_dir". - -So, just use the standard names (without underscore) like everybody -else, to make dependency discovery with pkgconfig working again. ---- - atheme-services.pc.in | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/atheme-services.pc.in b/atheme-services.pc.in -index 97b21ad..84e52c8 100644 ---- a/atheme-services.pc.in -+++ b/atheme-services.pc.in -@@ -1,16 +1,16 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - datarootdir=@datarootdir@ --data_dir=@datadir@/@PACKAGE_NAME@ -+datadir=@datadir@/@PACKAGE_NAME@ -+ - MODDIR=@MODDIR@/modules -- - version=@PACKAGE_VERSION@ --include_dir=@includedir@/@PACKAGE_NAME@ --lib_dir=@libdir@ -+includedir=@includedir@/@PACKAGE_NAME@ -+libdir=@libdir@ - - Name: atheme-services - Description: Atheme IRC services (for building modules) - Version: @PACKAGE_VERSION@ --Libs: -L${lib_dir} -lathemecore --Cflags: -I${include_dir} -+Libs: -L${libdir} -lathemecore -+Cflags: -I${includedir} - --- -# Created with git-export-patch diff --git a/atheme-pkgconfig2.diff b/atheme-pkgconfig2.diff deleted file mode 100644 index 4e534d5..0000000 --- a/atheme-pkgconfig2.diff +++ /dev/null @@ -1,32 +0,0 @@ -parent 0c5c860727019adc6ddb2e8b6f29268e51377cb3 (atheme-services-7.0.0-alpha7-628-g0c5c860) -commit abfcdb30b6f537ccf7f525797fb90e5957edd254 -Author: Jan Engelhardt -Date: Wed Jun 6 22:41:00 2012 +0200 - -build: respect evaluation order in .pc file - -Same as before with unresolved variable. - -Signed-off-by: Jan Engelhardt ---- - atheme-services.pc.in | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/atheme-services.pc.in b/atheme-services.pc.in -index 84e52c8..da8d294 100644 ---- a/atheme-services.pc.in -+++ b/atheme-services.pc.in -@@ -3,10 +3,10 @@ exec_prefix=@exec_prefix@ - datarootdir=@datarootdir@ - datadir=@datadir@/@PACKAGE_NAME@ - --MODDIR=@MODDIR@/modules - version=@PACKAGE_VERSION@ - includedir=@includedir@/@PACKAGE_NAME@ - libdir=@libdir@ -+MODDIR=@MODDIR@/modules - - Name: atheme-services - Description: Atheme IRC services (for building modules) --- -# Created with git-export-patch diff --git a/atheme-services-7.0.2.tar.xz b/atheme-services-7.0.2.tar.xz deleted file mode 100644 index 75d33aa..0000000 --- a/atheme-services-7.0.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65132175aa421a23ccba2a8e804d4490b4f32fc25e428fc633c6a2a5edcacb39 -size 870312 diff --git a/atheme-services-7.0.5.tar.bz2 b/atheme-services-7.0.5.tar.bz2 new file mode 100644 index 0000000..74714bd --- /dev/null +++ b/atheme-services-7.0.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25271eb1e9218ceeec87824dbe90a2bfc59f116e258b6ee803573dfa8c4fcc30 +size 1062605 diff --git a/atheme-tmpfiles.conf b/atheme-tmpfiles.conf new file mode 100644 index 0000000..2ce4711 --- /dev/null +++ b/atheme-tmpfiles.conf @@ -0,0 +1 @@ +d /run/atheme 0750 atheme atheme - diff --git a/atheme.changes b/atheme.changes index a303eb2..d99ce55 100644 --- a/atheme.changes +++ b/atheme.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Nov 21 00:00:07 UTC 2012 - jengelh@inai.de + +- Update to new upstream release 7.0.5 +* ircd/unreal: fix memory corruption caused by strlcpy() against + a strshare-managed string +* ircd/ircd-seven: support charybdis's extension channel modes +* chanserv/sync: sync a channel on account registration. This + allows exttargets like $registered to react to new account + registrations. +* chanserv/main: send MLOCK after a TS change, otherwise it + will be lost. +* chanserv/flags: allow users with +f and +o (+v) to set +/-O and + +/-V on themselves. +* chanserv/main: respect founder_flags config setting during + channel succession +- Add atheme-nodate.diff which removes __DATE__ from source + ------------------------------------------------------------------- Mon Nov 19 17:12:57 UTC 2012 - dimstar@opensuse.org diff --git a/atheme.service b/atheme.service new file mode 100644 index 0000000..688638a --- /dev/null +++ b/atheme.service @@ -0,0 +1,10 @@ +[Unit] +Description=Atheme IRC Services + +[Service] +ExecStart=/usr/sbin/atheme-services +User=atheme +Group=atheme + +[Install] +WantedBy=multi-user.target diff --git a/atheme.spec b/atheme.spec index 307ca1b..be6cd59 100644 --- a/atheme.spec +++ b/atheme.spec @@ -19,7 +19,7 @@ Name: atheme %define pkg_name atheme-services %define lname libathemecore1 -Version: 7.0.2 +Version: 7.0.5 Release: 0 Url: http://atheme.net/ Summary: A portable, secure set of open source, modular IRC services @@ -27,20 +27,20 @@ License: MIT Group: Productivity/Networking/IRC #Git-Clone: git://github.com/atheme/atheme -#DL-URL: http://atheme.net/downloads/atheme-services-6.0.10.tar.bz2 -Source: %name-services-%version.tar.xz +Source: http://www.atheme.net/downloads/atheme-services-%version.tar.bz2 Source1: atheme.init +Source2: atheme.service +Source3: atheme-tmpfiles.conf Patch1: atheme-lockmodes.diff Patch2: atheme-config.diff -Patch3: atheme-pkgconfig.diff -Patch4: atheme-pkgconfig2.diff +Patch3: atheme-nodate.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cracklib-devel BuildRequires: fdupes BuildRequires: libopenssl-devel BuildRequires: openldap2-devel BuildRequires: pkgconfig -BuildRequires: xz +BuildRequires: systemd BuildRequires: pkgconfig(libmowgli-2) >= 2.0.0 BuildRequires: pkgconfig(libpcre) %define atheme_home /var/lib/atheme @@ -70,17 +70,22 @@ Group: Development/Libraries/C and C++ Requires: %lname = %version %description devel +Atheme is a portable, secure set of open source, modular IRC services +released under the BSD license, designed to run on many IRCds. This package contains the development headers for the library found in %lname. %prep %setup -qn %name-services-%version -%patch -P 1 -P 2 -P 3 -P 4 -p1 +%patch -P 1 -P 2 -P 3 -p1 # use system libmowgli rm -Rf libmowgli*; %build +%if 0%{?suse_version} >= 1210 +export RUNDIR="/run"; +%endif %if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030 export CFLAGS="%optflags -fstack-protector" %endif @@ -97,8 +102,11 @@ export CFLAGS="%optflags -fstack-protector" make %{?_smp_mflags} %install +%if 0%{?suse_version} >= 1210 +export RUNDIR="/run"; +%endif b="%buildroot"; -%makeinstall DOCDIR="%_docdir/%name" +make install DESTDIR="%buildroot" DOCDIR="%_docdir/%name"; # additional documentation mkdir -p "$b/%_docdir/%name" @@ -109,6 +117,12 @@ install -m 0644 contrib/*.php contrib/*.pl TODO "$b/%_docdir/%name" install -Dm 0755 "%{S:1}" "$b/%_sysconfdir/init.d/%name"; ln -sf "%_sysconfdir/init.d/%name" "$b/%_sbindir/rc%name"; +%if %{?_unitdir:1} +mkdir -p "$b/%_unitdir" "$b/%_libexecdir/tmpfiles.d"; +install -pm0644 "%{S:2}" "$b/%_unitdir/"; +install -pm0644 "%{S:3}" "$b/%_libexecdir/tmpfiles.d/atheme.conf"; +%endif + # config files # TODO: check if we should change any defaults and patch it. cp -v "$b/%_sysconfdir/%name"/atheme.conf{.example,} @@ -122,16 +136,28 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} /usr/bin/getent passwd atheme >/dev/null 2>/dev/null || \ /usr/sbin/useradd -r -g atheme -s /bin/false \ -c "%name daemon" -d "%atheme_home" atheme >/dev/null || :; - -%preun -%stop_on_removal %name +%if %{?_unitdir:1} +%service_add_pre atheme.service +%endif %post %fillup_and_insserv %name +%if %{?_unitdir:1} +%service_add_post atheme.service +%endif + +%preun +%stop_on_removal %name +%if %{?_unitdir:1} +%service_del_preun atheme.service +%endif %postun %restart_on_update %name %insserv_cleanup +%if %{?_unitdir:1} +%service_del_postun atheme.service +%endif %post -n %lname -p /sbin/ldconfig @@ -151,8 +177,13 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} %_datadir/%name %doc %_docdir/%name %dir %attr(750,atheme,atheme) %atheme_home -%dir %attr(750,atheme,atheme) %atheme_run %dir %attr(750,atheme,atheme) %atheme_log +%if %{?_unitdir:1} +%_unitdir/*.service +%_libexecdir/tmpfiles.d +%else +%dir %attr(750,atheme,atheme) %atheme_run +%endif %files -n %lname %defattr(-,root,root) From 8f086df13de78d99b511aa950f4dc89fac7fcbd3c011309f5e02e93b18be84c9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 21 Nov 2012 00:36:06 +0000 Subject: [PATCH 3/5] Unbreak build on openSUSE 11.4 (systemd-less systems) OBS-URL: https://build.opensuse.org/package/show/server:irc/atheme?expand=0&rev=45 --- atheme.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/atheme.spec b/atheme.spec index be6cd59..a40e14f 100644 --- a/atheme.spec +++ b/atheme.spec @@ -40,7 +40,9 @@ BuildRequires: fdupes BuildRequires: libopenssl-devel BuildRequires: openldap2-devel BuildRequires: pkgconfig +%if 0%{?suse_version} >= 1210 BuildRequires: systemd +%endif BuildRequires: pkgconfig(libmowgli-2) >= 2.0.0 BuildRequires: pkgconfig(libpcre) %define atheme_home /var/lib/atheme @@ -117,7 +119,7 @@ install -m 0644 contrib/*.php contrib/*.pl TODO "$b/%_docdir/%name" install -Dm 0755 "%{S:1}" "$b/%_sysconfdir/init.d/%name"; ln -sf "%_sysconfdir/init.d/%name" "$b/%_sbindir/rc%name"; -%if %{?_unitdir:1} +%if 0%{?_unitdir:1} mkdir -p "$b/%_unitdir" "$b/%_libexecdir/tmpfiles.d"; install -pm0644 "%{S:2}" "$b/%_unitdir/"; install -pm0644 "%{S:3}" "$b/%_libexecdir/tmpfiles.d/atheme.conf"; @@ -136,26 +138,26 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} /usr/bin/getent passwd atheme >/dev/null 2>/dev/null || \ /usr/sbin/useradd -r -g atheme -s /bin/false \ -c "%name daemon" -d "%atheme_home" atheme >/dev/null || :; -%if %{?_unitdir:1} +%if 0%{?_unitdir:1} %service_add_pre atheme.service %endif %post %fillup_and_insserv %name -%if %{?_unitdir:1} +%if 0%{?_unitdir:1} %service_add_post atheme.service %endif %preun %stop_on_removal %name -%if %{?_unitdir:1} +%if 0%{?_unitdir:1} %service_del_preun atheme.service %endif %postun %restart_on_update %name %insserv_cleanup -%if %{?_unitdir:1} +%if 0%{?_unitdir:1} %service_del_postun atheme.service %endif @@ -178,7 +180,7 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} %doc %_docdir/%name %dir %attr(750,atheme,atheme) %atheme_home %dir %attr(750,atheme,atheme) %atheme_log -%if %{?_unitdir:1} +%if 0%{?_unitdir:1} %_unitdir/*.service %_libexecdir/tmpfiles.d %else From 99b9801a325995f217a4433f5f4dd65be09b7859ac5d961c2cf441e3fb08f9ed Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 23 Nov 2012 18:29:42 +0000 Subject: [PATCH 4/5] Better description for user account OBS-URL: https://build.opensuse.org/package/show/server:irc/atheme?expand=0&rev=46 --- atheme.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atheme.spec b/atheme.spec index a40e14f..3cee0f5 100644 --- a/atheme.spec +++ b/atheme.spec @@ -137,7 +137,8 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} /usr/sbin/groupadd -r atheme >/dev/null || :; /usr/bin/getent passwd atheme >/dev/null 2>/dev/null || \ /usr/sbin/useradd -r -g atheme -s /bin/false \ - -c "%name daemon" -d "%atheme_home" atheme >/dev/null || :; + -c "Atheme IRC Services daemon" -d "%atheme_home" \ + atheme >/dev/null || :; %if 0%{?_unitdir:1} %service_add_pre atheme.service %endif From 285f756fd6844aa1bebabdf93848d1b76fcbd616ad8fc67950ed70ed4d7f6f11 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 23 Nov 2012 18:51:34 +0000 Subject: [PATCH 5/5] Avoid %fdupes in /etc OBS-URL: https://build.opensuse.org/package/show/server:irc/atheme?expand=0&rev=47 --- atheme.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atheme.spec b/atheme.spec index 3cee0f5..5213778 100644 --- a/atheme.spec +++ b/atheme.spec @@ -130,7 +130,7 @@ install -pm0644 "%{S:3}" "$b/%_libexecdir/tmpfiles.d/atheme.conf"; cp -v "$b/%_sysconfdir/%name"/atheme.conf{.example,} cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} %find_lang %name -%fdupes %buildroot +%fdupes %buildroot/%_prefix %pre /usr/bin/getent group atheme >/dev/null 2>/dev/null || \