source:
branches/fc17-dev/server/fedora/specs/openafs-systemd.spec.patch
@
2195
Last change on this file since 2195 was 2195, checked in by ezyang, 12 years ago | |
---|---|
File size: 5.4 KB |
-
openafs.spec
old new 225 225 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org> 226 226 Group: Networking/Filesystems 227 227 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison 228 %if 0%{?fedora} >= 15 229 BuildRequires: systemd-units 230 %endif 228 231 %if 0%{?fedora} 229 232 BuildRequires: perl-devel perl-ExtUtils-Embed 230 233 %endif … … 326 329 %package client 327 330 Provides: scripts-openafs-client 328 331 Requires: binutils, openafs = %{version} 332 %if 0%{?fedora} >= 15 333 Requires: systemd-units 334 Requires(post): systemd-units, systemd-sysv 335 Requires(preun): systemd-units 336 Requires(postun): systemd-units 337 %endif 329 338 330 339 %if %{fedorakmod} 331 340 Requires: %{name}-kmod >= %{version} … … 350 359 Requires: openafs = %{version} 351 360 Summary: OpenAFS Filesystem Server 352 361 Group: Networking/Filesystems 362 %if 0%{?fedora} >= 15 363 Requires: systemd-units 364 Requires(post): systemd-units, systemd-sysv 365 Requires(preun): systemd-units 366 Requires(postun): systemd-units 367 %endif 353 368 354 369 %description server 355 370 The AFS distributed filesystem. AFS is a distributed filesystem … … 1005 1020 mkdir -p $RPM_BUILD_ROOT%{_sbindir} 1006 1021 mkdir -p $RPM_BUILD_ROOT%{_libdir} 1007 1022 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig 1023 %if 0%{?fedora} < 15 1008 1024 mkdir -p $RPM_BUILD_ROOT%{initdir} 1025 %else 1026 mkdir -p $RPM_BUILD_ROOT%{_unitdir} 1027 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules 1028 %endif 1009 1029 mkdir -p $RPM_BUILD_ROOT/etc/openafs 1010 1030 mkdir -p $RPM_BUILD_ROOT%{pamdir} 1011 1031 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc … … 1035 1055 1036 1056 # Copy root.client config files 1037 1057 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs 1058 %if 0%{?fedora} < 15 1038 1059 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client 1039 1060 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server 1061 %else 1062 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service 1063 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules 1064 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service 1065 %endif 1040 1066 1041 1067 # Copy PAM modules 1042 1068 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir} … … 1318 1344 fi 1319 1345 1320 1346 %post client 1347 %if 0%{?fedora} < 15 1321 1348 chkconfig --add openafs-client 1349 %else 1350 if [ $1 -eq 1 ] ; then 1351 # Initial installation 1352 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1353 fi 1354 %endif 1322 1355 if [ ! -d /afs ]; then 1323 1356 mkdir /afs 1324 1357 chown root.root /afs … … 1335 1368 1336 1369 %post server 1337 1370 #on an upgrade, don't enable if we were disabled 1371 %if 0%{?fedora} < 15 1338 1372 if [ $1 = 1 ] ; then 1339 1373 chkconfig --add openafs-server 1340 1374 fi 1341 1375 %{initdir}/openafs-server condrestart 1376 %else 1377 if [ $1 -eq 1 ] ; then 1378 # Initial installation 1379 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1380 fi 1381 %endif 1342 1382 1343 1383 %if %{build_authlibs} 1344 1384 %post authlibs … … 1354 1394 fi 1355 1395 1356 1396 %preun client 1397 %if 0%{?fedora} < 15 1357 1398 if [ $1 = 0 ] ; then 1358 1399 %{initdir}/openafs-client stop 1359 1400 chkconfig --del openafs-client 1360 1401 fi 1402 %else 1403 if [ $1 -eq 0 ] ; then 1404 # Package removal, not upgrade 1405 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || : 1406 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || : 1407 fi 1408 %endif 1361 1409 1362 1410 %preun server 1411 %if 0%{?fedora} < 15 1363 1412 if [ $1 = 0 ] ; then 1364 1413 %{initdir}/openafs-server stop 1365 1414 chkconfig --del openafs-server 1366 1415 fi 1416 %else 1417 if [ $1 -eq 0 ] ; then 1418 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || : 1419 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || : 1420 fi 1421 %endif 1422 1423 %if 0%{?fedora} >= 15 1424 %postun client 1425 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1426 1427 %postun server 1428 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1429 %endif 1367 1430 1368 1431 %if %{build_dkmspkg} 1369 1432 %post -n dkms-%{name} … … 1421 1484 %endif 1422 1485 %endif 1423 1486 1487 %if 0%{?fedora} >= 15 1488 %triggerun -- openafs-client < 1.6.0-1 1489 # Save the current service runlevel info 1490 # User must manually run systemd-sysv-convert --apply httpd 1491 # to migrate them to systemd targets 1492 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||: 1493 1494 # Run this because the SysV package being removed won't do it 1495 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || : 1496 1497 %triggerun -- openafs-server < 1.6.0-1 1498 # Save the current service runlevel info 1499 # User must manually run systemd-sysv-convert --apply httpd 1500 # to migrate them to systemd targets 1501 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||: 1502 1503 # Run this because the SysV package being removed won't do it 1504 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || : 1505 %endif 1506 1424 1507 ############################################################################## 1425 1508 ### 1426 1509 ### file lists … … 1458 1541 %{pamdir}/pam_afs.krb.so 1459 1542 %{pamdir}/pam_afs.so.1 1460 1543 %{pamdir}/pam_afs.so 1544 %if 0%{?fedora} < 15 1461 1545 %{initdir}/openafs-client 1546 %else 1547 %{_unitdir}/openafs-client.service 1548 %{_sysconfdir}/sysconfig/modules/openafs-client.modules 1549 %endif 1462 1550 %{_mandir}/man1/cmdebug.* 1463 1551 %{_mandir}/man1/copyauth.* 1464 1552 %{_mandir}/man1/up.* … … 1506 1594 %{_sbindir}/vldb_check 1507 1595 %{_sbindir}/vldb_convert 1508 1596 %{_sbindir}/voldump 1597 %if 0%{?fedora} < 15 1509 1598 %{initdir}/openafs-server 1599 %else 1600 %{_unitdir}/openafs-server.service 1601 %endif 1510 1602 %{_mandir}/man5/AuthLog.* 1511 1603 %{_mandir}/man5/BackupLog.* 1512 1604 %{_mandir}/man5/BosConfig.*
Note: See TracBrowser
for help on using the repository browser.