source:
branches/fc15-dev/server/fedora/specs/openafs-systemd.spec.patch
@
2479
Last change on this file since 2479 was 2011, checked in by ezyang, 13 years ago | |
---|---|
File size: 6.2 KB |
-
rpmbuild/SPECS/openafs.spec
old new 224 224 BuildRoot: %{_tmppath}/%{name}-%{version}-root 225 225 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org> 226 226 Group: Networking/Filesystems 227 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison 227 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison, systemd-units 228 228 %if 0%{?fedora} 229 229 BuildRequires: perl-devel perl-ExtUtils-Embed 230 230 %endif … … 323 323 %package client 324 324 Provides: scripts-openafs-client 325 325 Requires: binutils, openafs = %{version} 326 %if 0%{?fedora} >= 15 327 Requires: systemd-units 328 Requires(post): systemd-units, systemd-sysv 329 Requires(preun): systemd-units 330 Requires(postun): systemd-units 331 %endif 326 332 327 333 %if %{fedorakmod} 328 334 Requires: %{name}-kmod >= %{version} … … 347 353 Requires: openafs = %{version} 348 354 Summary: OpenAFS Filesystem Server 349 355 Group: Networking/Filesystems 356 %if 0%{?fedora} >= 15 357 Requires: systemd-units 358 Requires(post): systemd-units, systemd-sysv 359 Requires(preun): systemd-units 360 Requires(postun): systemd-units 361 %endif 350 362 351 363 %description server 352 364 The AFS distributed filesystem. AFS is a distributed filesystem … … 999 1011 mkdir -p $RPM_BUILD_ROOT%{_sbindir} 1000 1012 mkdir -p $RPM_BUILD_ROOT%{_libdir} 1001 1013 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig 1014 %if 0%{?fedora} < 15 1002 1015 mkdir -p $RPM_BUILD_ROOT%{initdir} 1016 %else 1017 mkdir -p $RPM_BUILD_ROOT%{_unitdir} 1018 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules 1019 %endif 1003 1020 mkdir -p $RPM_BUILD_ROOT/etc/openafs 1004 1021 mkdir -p $RPM_BUILD_ROOT%{pamdir} 1005 1022 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc … … 1029 1046 1030 1047 # Copy root.client config files 1031 1048 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs 1049 %if 0%{?fedora} < 15 1032 1050 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client 1033 1051 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server 1052 %else 1053 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service 1054 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules 1055 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service 1056 %endif 1034 1057 1035 1058 # Copy PAM modules 1036 1059 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir} … … 1310 1333 fi 1311 1334 1312 1335 %post client 1336 %if 0%{?fedora} < 15 1313 1337 chkconfig --add openafs-client 1338 %else 1339 if [ $1 -eq 1 ] ; then 1340 # Initial installation 1341 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1342 fi 1343 %endif 1314 1344 if [ ! -d /afs ]; then 1315 1345 mkdir /afs 1316 1346 chown root.root /afs … … 1327 1357 1328 1358 %post server 1329 1359 #on an upgrade, don't enable if we were disabled 1360 %if 0%{?fedora} < 15 1330 1361 if [ $1 = 1 ] ; then 1331 1362 chkconfig --add openafs-server 1332 1363 fi 1333 1364 %{initdir}/openafs-server condrestart 1365 %else 1366 if [ $1 -eq 1 ] ; then 1367 # Initial installation 1368 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1369 fi 1370 %endif 1334 1371 1335 1372 %if %{build_authlibs} 1336 1373 %post authlibs … … 1346 1383 fi 1347 1384 1348 1385 %preun client 1386 %if 0%{?fedora} < 15 1349 1387 if [ $1 = 0 ] ; then 1350 1388 %{initdir}/openafs-client stop 1351 1389 chkconfig --del openafs-client 1352 1390 fi 1391 %else 1392 if [ $1 -eq 0 ] ; then 1393 # Package removal, not upgrade 1394 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || : 1395 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || : 1396 fi 1397 %endif 1353 1398 1354 1399 %preun server 1400 %if 0%{?fedora} < 15 1355 1401 if [ $1 = 0 ] ; then 1356 1402 %{initdir}/openafs-server stop 1357 1403 chkconfig --del openafs-server 1358 1404 fi 1405 %else 1406 if [ $1 -eq 0 ] ; then 1407 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || : 1408 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || : 1409 fi 1410 %endif 1411 1412 %postun client 1413 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1414 if [ $1 -ge 1 ] ; then 1415 # Package upgrade, not uninstall 1416 /bin/systemctl try-restart openafs-client.service >/dev/null 2>&1 || : 1417 fi 1418 1419 %postun server 1420 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1421 if [ $1 -ge 1 ] ; then 1422 # Package upgrade, not uninstall 1423 /bin/systemctl try-restart openafs-server.service >/dev/null 2>&1 || : 1424 fi 1359 1425 1360 1426 %if %{build_dkmspkg} 1361 1427 %post -n dkms-%{name} … … 1413 1479 %endif 1414 1480 %endif 1415 1481 1482 %triggerun -- openafs-client < 1.6.0-1 1483 # Save the current service runlevel info 1484 # User must manually run systemd-sysv-convert --apply httpd 1485 # to migrate them to systemd targets 1486 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||: 1487 1488 # If the package is allowed to autostart: 1489 /bin/systemctl --no-reload enable openafs-client.service >/dev/null 2>&1 ||: 1490 1491 # Run these because the SysV package being removed won't do them 1492 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || : 1493 /bin/systemctl try-restart openafs-client.service >/dev/null 2>&1 || : 1494 1495 %triggerun -- openafs-server < 1.6.0-1 1496 # Save the current service runlevel info 1497 # User must manually run systemd-sysv-convert --apply httpd 1498 # to migrate them to systemd targets 1499 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||: 1500 1501 # If the package is allowed to autostart: 1502 /bin/systemctl --no-reload enable openafs-server.service >/dev/null 2>&1 ||: 1503 1504 # Run these because the SysV package being removed won't do them 1505 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || : 1506 /bin/systemctl try-restart openafs-server.service >/dev/null 2>&1 || : 1507 1416 1508 ############################################################################## 1417 1509 ### 1418 1510 ### file lists … … 1450 1542 %{pamdir}/pam_afs.krb.so 1451 1543 %{pamdir}/pam_afs.so.1 1452 1544 %{pamdir}/pam_afs.so 1545 %if 0%{?fedora} < 15 1453 1546 %{initdir}/openafs-client 1547 %else 1548 %{_unitdir}/openafs-client.service 1549 %{_sysconfdir}/sysconfig/modules/openafs-client.modules 1550 %endif 1454 1551 %{_mandir}/man1/cmdebug.* 1455 1552 %{_mandir}/man1/copyauth.* 1456 1553 %{_mandir}/man1/up.* … … 1498 1595 %{_sbindir}/vldb_check 1499 1596 %{_sbindir}/vldb_convert 1500 1597 %{_sbindir}/voldump 1598 %if 0%{?fedora} < 15 1501 1599 %{initdir}/openafs-server 1600 %else 1601 %{_unitdir}/openafs-server.service 1602 %endif 1502 1603 %{_mandir}/man5/AuthLog.* 1503 1604 %{_mandir}/man5/BackupLog.* 1504 1605 %{_mandir}/man5/BosConfig.*
Note: See TracBrowser
for help on using the repository browser.