Пакет bind-dyndb-ldap: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | %define _unpackaged_files_terminate_build 1 %define bind_version 9.16.34 %define restart_flag /run/named/named.restart Name: bind-dyndb-ldap Version: 11.10 Release: alt6 Summary: LDAP back-end plug-in for BIND License: %gpl2plus Group: System/Servers URL: https://pagure.io/bind-dyndb-ldap Source: %name-%version.tar Patch: %name-%version-alt.patch BuildRequires(pre): rpm-build-licenses BuildRequires: bind-devel >= %bind_version BuildRequires: libldap-devel BuildRequires: libkrb5-devel BuildRequires: libuuid-devel BuildRequires: libsasl2-devel BuildRequires: autoconf-archive Requires: bind >= %bind_version %description This package provides an LDAP back-end plug-in for BIND. It features support for dynamic updates and internal caching, to lift the load off of your LDAP server. %prep %setup %patch -p1 %build %autoreconf export BIND9_CFLAGS='-I/usr/include/bind9' %configure %make_build %install %makeinstall_std mkdir -p %buildroot%_localstatedir/bind/zone/dyndb-ldap/ %pre # upgrade # Previously, during an upgrade transaction named failed on restart # with binary incompatible dyndb plugin (not updated yet). So the # special file-flag is created if named was running before upgrade. # Later, named's filetrigger checks it for restart. if [ "$1" -gt 1 ] && [ ! -f '%restart_flag' ]; then SYSTEMCTL=systemctl if sd_booted && "$SYSTEMCTL" --version >/dev/null 2>&1; then "$SYSTEMCTL" is-active bind.service >/dev/null 2>&1 && "$SYSTEMCTL" stop bind.service 2>/dev/null && mkdir -p "$(dirname '%restart_flag')" && touch '%restart_flag' 2>/dev/null ||: else %_initdir/bind status >/dev/null 2>&1 && %_initdir/bind stop 2>/dev/null && mkdir -p "$(dirname '%restart_flag')" && touch '%restart_flag' 2>/dev/null ||: fi fi %post # The following sed script: # - scopes the named.conf changes to dynamic-db # - replaces arg "name value" syntax with name "value" # - changes dynamic-db header to dyndb # - uses the new way the define path to the library # - removes no longer supported arguments (library, cache_ttl, # psearch, serial_autoincrement, zone_refresh) while read -r PATTERN do SEDSCRIPT+="$PATTERN" done <<EOF /^\s*dynamic-db/,/};/ { s/\(\s*\)arg\s\+\(["']\)\([a-zA-Z_]\+\s\)/\1\3\2/g; s/^dynamic-db/dyndb/; s@\(dyndb "[^"]\+"\)@\1 "%_libdir/bind/ldap.so"@; s@\(dyndb '[^']\+'\)@\1 '%_libdir/bind/ldap.so'@; /\s*library[^;]\+;/d; /\s*cache_ttl[^;]\+;/d; /\s*psearch[^;]\+;/d; /\s*serial_autoincrement[^;]\+;/d; /\s*zone_refresh[^;]\+;/d; } EOF sed -i.bak --follow-symlinks -e "$SEDSCRIPT" /etc/named.conf %files %_defaultdocdir/%name %_libdir/bind/ldap.so %dir %attr(770, root, named) %_localstatedir/bind/zone/dyndb-ldap/ %exclude %_libdir/bind/*.la %changelog * Fri Mar 22 2024 Stanislav Levin <slev@altlinux.org> 11.10-alt6 - Fixed build with bind 9.18.25. * Wed Feb 14 2024 Stanislav Levin <slev@altlinux.org> 11.10-alt5 - Fixed build with bind 9.18.24. * Tue Oct 24 2023 Stanislav Levin <slev@altlinux.org> 11.10-alt4 - Fixed build with bind 9.18.19. * Mon Jan 16 2023 Stanislav Levin <slev@altlinux.org> 11.10-alt3 - Fixed build with Bind 9.16.36. * Fri Nov 04 2022 Stanislav Levin <slev@altlinux.org> 11.10-alt2 - Fixed build with Bind 9.16. * Wed Sep 14 2022 Stanislav Levin <slev@altlinux.org> 11.10-alt1 - 11.1 -> 11.10. * Thu Oct 10 2019 Stanislav Levin <slev@altlinux.org> 11.1-alt8 - Added workaround for LDAP socket error on BIND start. * Thu Aug 08 2019 Stanislav Levin <slev@altlinux.org> 11.1-alt7 - Fixed upgrade bind 9.9 -> 9.11. * Fri May 17 2019 Stanislav Levin <slev@altlinux.org> 11.1-alt6 - Applied upstream patch. * Mon Nov 26 2018 Stanislav Levin <slev@altlinux.org> 11.1-alt5 - Built with new bind 9.11.5. - Fixed bind-dyndb-ldap upgrade. * Thu Sep 20 2018 Stanislav Levin <slev@altlinux.org> 11.1-alt4 - Built with new bind 9.11.4.P2. * Tue Aug 14 2018 Stanislav Levin <slev@altlinux.org> 11.1-alt3 - Rebuild with new bind 9.11.4.P1 * Wed Apr 04 2018 Stanislav Levin <slev@altlinux.org> 11.1-alt2 - Rebuild with new bind 9.11.3 * Tue Nov 07 2017 Stanislav Levin <slev@altlinux.org> 11.1-alt1 - 10.1 -> 11.1 * Wed Aug 02 2017 Dmitry V. Levin <ldv@altlinux.org> 10.1-alt3 - Built with bind-devel-9.10.6. * Wed Dec 28 2016 Mikhail Efremov <sem@altlinux.org> 10.1-alt2 - Fix spec. - packaging typos fixed (by Sergey Bolshakov). * Mon Nov 14 2016 Mikhail Efremov <sem@altlinux.org> 10.1-alt1 - Initial build. |