source:
trunk/server/fedora/specs/openafs-systemd.spec.patch
@
2089
Last change on this file since 2089 was 2089, checked in by geofft, 13 years ago | |
---|---|
File size: 5.5 KB |
-
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 … … 326 326 %package client 327 327 Provides: scripts-openafs-client 328 328 Requires: binutils, openafs = %{version} 329 %if 0%{?fedora} >= 15 330 Requires: systemd-units 331 Requires(post): systemd-units, systemd-sysv 332 Requires(preun): systemd-units 333 Requires(postun): systemd-units 334 %endif 329 335 330 336 %if %{fedorakmod} 331 337 Requires: %{name}-kmod >= %{version} … … 350 356 Requires: openafs = %{version} 351 357 Summary: OpenAFS Filesystem Server 352 358 Group: Networking/Filesystems 359 %if 0%{?fedora} >= 15 360 Requires: systemd-units 361 Requires(post): systemd-units, systemd-sysv 362 Requires(preun): systemd-units 363 Requires(postun): systemd-units 364 %endif 353 365 354 366 %description server 355 367 The AFS distributed filesystem. AFS is a distributed filesystem … … 1005 1017 mkdir -p $RPM_BUILD_ROOT%{_sbindir} 1006 1018 mkdir -p $RPM_BUILD_ROOT%{_libdir} 1007 1019 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig 1020 %if 0%{?fedora} < 15 1008 1021 mkdir -p $RPM_BUILD_ROOT%{initdir} 1022 %else 1023 mkdir -p $RPM_BUILD_ROOT%{_unitdir} 1024 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules 1025 %endif 1009 1026 mkdir -p $RPM_BUILD_ROOT/etc/openafs 1010 1027 mkdir -p $RPM_BUILD_ROOT%{pamdir} 1011 1028 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc … … 1035 1052 1036 1053 # Copy root.client config files 1037 1054 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs 1055 %if 0%{?fedora} < 15 1038 1056 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client 1039 1057 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server 1058 %else 1059 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service 1060 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules 1061 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service 1062 %endif 1040 1063 1041 1064 # Copy PAM modules 1042 1065 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir} … … 1318 1341 fi 1319 1342 1320 1343 %post client 1344 %if 0%{?fedora} < 15 1321 1345 chkconfig --add openafs-client 1346 %else 1347 if [ $1 -eq 1 ] ; then 1348 # Initial installation 1349 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1350 fi 1351 %endif 1322 1352 if [ ! -d /afs ]; then 1323 1353 mkdir /afs 1324 1354 chown root.root /afs … … 1335 1365 1336 1366 %post server 1337 1367 #on an upgrade, don't enable if we were disabled 1368 %if 0%{?fedora} < 15 1338 1369 if [ $1 = 1 ] ; then 1339 1370 chkconfig --add openafs-server 1340 1371 fi 1341 1372 %{initdir}/openafs-server condrestart 1373 %else 1374 if [ $1 -eq 1 ] ; then 1375 # Initial installation 1376 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1377 fi 1378 %endif 1342 1379 1343 1380 %if %{build_authlibs} 1344 1381 %post authlibs … … 1354 1391 fi 1355 1392 1356 1393 %preun client 1394 %if 0%{?fedora} < 15 1357 1395 if [ $1 = 0 ] ; then 1358 1396 %{initdir}/openafs-client stop 1359 1397 chkconfig --del openafs-client 1360 1398 fi 1399 %else 1400 if [ $1 -eq 0 ] ; then 1401 # Package removal, not upgrade 1402 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || : 1403 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || : 1404 fi 1405 %endif 1361 1406 1362 1407 %preun server 1408 %if 0%{?fedora} < 15 1363 1409 if [ $1 = 0 ] ; then 1364 1410 %{initdir}/openafs-server stop 1365 1411 chkconfig --del openafs-server 1366 1412 fi 1413 %else 1414 if [ $1 -eq 0 ] ; then 1415 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || : 1416 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || : 1417 fi 1418 %endif 1419 1420 %postun client 1421 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1422 1423 %postun server 1424 /bin/systemctl daemon-reload >/dev/null 2>&1 || : 1367 1425 1368 1426 %if %{build_dkmspkg} 1369 1427 %post -n dkms-%{name} … … 1421 1479 %endif 1422 1480 %endif 1423 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 # Run this because the SysV package being removed won't do it 1489 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || : 1490 1491 %triggerun -- openafs-server < 1.6.0-1 1492 # Save the current service runlevel info 1493 # User must manually run systemd-sysv-convert --apply httpd 1494 # to migrate them to systemd targets 1495 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||: 1496 1497 # Run this because the SysV package being removed won't do it 1498 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || : 1499 1424 1500 ############################################################################## 1425 1501 ### 1426 1502 ### file lists … … 1458 1534 %{pamdir}/pam_afs.krb.so 1459 1535 %{pamdir}/pam_afs.so.1 1460 1536 %{pamdir}/pam_afs.so 1537 %if 0%{?fedora} < 15 1461 1538 %{initdir}/openafs-client 1539 %else 1540 %{_unitdir}/openafs-client.service 1541 %{_sysconfdir}/sysconfig/modules/openafs-client.modules 1542 %endif 1462 1543 %{_mandir}/man1/cmdebug.* 1463 1544 %{_mandir}/man1/copyauth.* 1464 1545 %{_mandir}/man1/up.* … … 1506 1587 %{_sbindir}/vldb_check 1507 1588 %{_sbindir}/vldb_convert 1508 1589 %{_sbindir}/voldump 1590 %if 0%{?fedora} < 15 1509 1591 %{initdir}/openafs-server 1592 %else 1593 %{_unitdir}/openafs-server.service 1594 %endif 1510 1595 %{_mandir}/man5/AuthLog.* 1511 1596 %{_mandir}/man5/BackupLog.* 1512 1597 %{_mandir}/man5/BosConfig.*
Note: See TracBrowser
for help on using the repository browser.