Bug 850016 - (systemd/Presets) Tracker bug for conversion to new systemd-rpm macros
Summary: (systemd/Presets) Tracker bug for conversion to new systemd-rpm macros
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: distribution
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Václav Pavlín
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 850017 850019 850020 850021 850022 850023 850024 850025 850026 850027 850028 850029 850030 850031 850032 850033 850035 850036 850037 850038 850039 850040 850041 850042 850043 850044 850045 850046 850047 850048 850049 850050 850051 850052 850053 850054 850055 850057 850058 850059 850060 850061 850062 850063 850064 850065 850067 850068 850069 850070 850071 850072 850073 850074 850075 850076 850079 850080 850081 850083 850084 850085 850086 850087 850088 850089 850090 850091 850092 850093 850094 850095 850096 850097 850098 850099 850100 850101 850102 850103 850104 850105 850107 850108 850109 850110 850112 850113 850114 850115 850116 850117 850118 850119 850120 850122 850123 850124 850125 850126 850127 850128 850129 850130 850131 850132 850133 850134 850135 850136 850137 850138 850139 850140 850141 850142 850143 850144 850145 850146 850147 850148 850149 850150 850151 850152 850153 850154 850155 850156 850157 850158 850159 850160 850161 850163 850165 850166 850167 850168 850169 850170 850171 850172 850173 850174 850175 850176 850177 850178 850179 850180 850181 850182 850183 850184 850185 850186 850187 850188 850189 850190 850191 850192 850193 850194 850195 850196 850197 850198 850199 850200 850201 850202 850203 850204 850206 850207 850208 850209 850210 850211 850212 850213 850214 850215 850216 850217 850218 850219 850220 850221 850222 850223 850224 850225 850226 850227 850228 850230 850231 850232 850234 850235 850236 850237 850238 850239 850240 850241 850242 850243 850244 850245 850246 850247 850248 850249 850250 850251 850252 850253 850254 850255 850256 850257 850258 850259 850260 850261 850262 850263 850264 850265 850266 850267 850268 850269 850270 850271 850272 850273 850274 850275 850276 850277 850278 850279 850280 850281 850282 850283 850284 850285 850287 850288 850289 850290 850292 850293 850294 850295 850296 850297 850298 850299 850300 850301 850302 850303 850304 850305 850306 850307 850308 850309 850310 850311 850312 850313 850314 850315 850316 850317 850318 850320 850321 850322 850323 850324 850325 850326 850327 850328 850329 850331 850332 850333 850334 850335 850337 850338 850339 850340 850341 850343 850344 850345 850346 850347 850348 850349 850351 850353 850354 850355 850356 850357 850358 850360 850361 850362 850363 850364 850365 850366 850367 850369 850370 850372 850373 850374 850375 850376 850377 850378 850379 850380 850381 850382 850383 850384 850385 850389 850390 850391 850393 850394 850396 850397 850399 850400 850401 850403 850405 850406 850407 850408 850409 850410 850411 850412 851227 851238 851441 851462 855372 856643 856644 856645 856649 856650 856654 856656 856658 856659 856662 856664 856666 856667 856668 856680 857361 857363 857364 857368 857372 857374 857375 857376 857382 857383 857384 857397 857398 857407 857409 857413 857414 857416 857418 977323 1087951 1149010 1396430
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-21 13:20 UTC by Václav Pavlín
Modified: 2019-05-31 21:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 12:05:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Václav Pavlín 2012-08-21 13:20:15 UTC
Fedora 18 changes the way how to work with services in spec files. It introduces new macros - %systemd_post, %systemd_preun and %systemd_postun; which replace scriptlets from Fedora 17 and older (see https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd). 

This change relates to new feature systemd/Presets (see http://fedoraproject.org/wiki/Features/PackagePresets) which removes the service policy from the packaging scripts and places it to "preset" files which can be different for the various spins and even for individual systems.

Comment 1 Petr Lautrbach 2012-08-21 14:11:48 UTC
https://fedoraproject.org/wiki/Starting_services_by_default :
    autofs
    avahi
    coda-client
    dbus
    firewalld
    ifplugd
    iscsi-initiator-utils
    isdn4k-utils
    nfs-utils
    NetworkManager
    ocfs2-tools
    openssh-server
    rpcbind
    rp-pppoe
    rsyslog
    sysklogd
    xinetd 


/usr/lib/systemd/system-preset/99-default.preset :
enable avahi-daemon.*
enable gdm.service
disable *

Comment 2 Petr Pisar 2012-08-21 15:47:30 UTC
I want dispute the 

> Fedora 18 changes the way how to work with services in spec files.

According my records, guidelines have been changed on August, 7th and F18 has been branched a day after. In my opinion, this change should apply to F19. I think changing script-lets in distribution frozen for stabilization is contradiction.

Comment 3 Jan ONDREJ 2012-08-21 17:37:00 UTC
Is there any chance to get these macros into F17 too? I don't want to add more conditional builds and want one spec file for all releases, if possible.

Otherwise can you reopen this bug in time when these macros will be available in all supported releases of Fedora?

Comment 4 Pavel Šimerda (pavlix) 2012-08-22 19:29:04 UTC
> Is there any chance to get these macros into F17 too? I don't want to add
> more conditional builds and want one spec file for all releases, if possible.

I'm confirming that this *requirement* brings little or no value while putting additional burden to the packagers until all living Fedora branches provide
these macros.

Comment 5 Honza Horak 2012-09-11 12:09:07 UTC
Whether that macros will be back-ported to F17- or not, the following piece of code should work well in all branches:

  %preun
  %if 0%{?systemd_preun:1}
    %systemd_preun rarpd.service
  %else
    if [ $1 = 0 ]; then
        /bin/systemctl --no-reload disable rarpd.service >/dev/null 2>&1 || :
        /bin/systemctl stop rarpd.service >/dev/null 2>&1 || :
    fi
  %endif

... and similar for %post and %postun. So packagers can have the same spec file in all branches.

Comment 6 Toshio Ernie Kuratomi 2012-11-20 21:02:12 UTC
I was asked to note that the %systemd_requires macro should not be used.  The FPC approved the new systemd macros with the specific exception of that one.  Working on having it removed from the package as well as it seems to have caused some confusion.

Comment 7 Fedora End Of Life 2013-12-21 08:41:56 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2014-02-05 12:05:28 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.