Package linstor: 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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | %define GRADLE_TASKS installdist %define GRADLE_FLAGS --offline --gradle-user-home /tmp --no-daemon -Pjava11=true --exclude-task generateJava %define LS_PREFIX %_datadir/linstor-server %define FIREWALLD_SERVICES %_usr/lib/firewalld/services %define NAME_VERS %name-server-%version # Prevent brp-java-repack-jars from being run. %define __jar_repack %nil Name: linstor Version: 1.26.1 Release: alt1 Summary: DRBD replicated volume manager Group: System/Servers License: GPLv2+ Url: https://github.com/LINBIT/linstor-server Source0: http://www.linbit.com/downloads/linstor/linstor-server-%version.tar.gz Source1: gradle-8.2.1-bin.zip # Source1: gradle-6.7-bin.zip BuildArch: noarch BuildRequires(pre): /proc rpm-build-java jpackage-utils BuildRequires: java-11-openjdk-devel BuildRequires: python3 BuildRequires: unzip #BuildRequires: gradle %description LINSTOR developed by LINBIT, is a software that manages replicated volumes across a group of machines. With native integration to Kubernetes, LINSTOR makes building, running, and controlling block storage simple. LINSTOR is open-source software designed to manage block storage devices for large Linux server clusters. It's used to provide persistent Linux block storage for cloudnative and hypervisor environments. %prep %setup -n %NAME_VERS -a1 %build # export PATH=$PWD/gradle-6.7/bin:$PATH export PATH=$PWD/gradle-8.2.1/bin:$PATH gradle %GRADLE_TASKS %GRADLE_FLAGS #for p in server satellite controller; do echo "%%LS_PREFIX/.$p" >> "%%_builddir/%%NAME_VERS/$p/jar.deps"; done %install mkdir -p %buildroot%LS_PREFIX cp -r %_builddir/%NAME_VERS/build/install/linstor-server/lib %buildroot%LS_PREFIX rm %buildroot/%LS_PREFIX/lib/%NAME_VERS.jar chmod a-x %buildroot/%LS_PREFIX/lib/*.jar mkdir -p %buildroot/%LS_PREFIX/lib/conf cp %_builddir/%NAME_VERS/server/logback.xml %buildroot/%LS_PREFIX/lib/conf mkdir -p %buildroot%LS_PREFIX/bin cp -r %_builddir/%NAME_VERS/build/install/linstor-server/bin/Controller %buildroot%LS_PREFIX/bin cp -r %_builddir/%NAME_VERS/build/install/linstor-server/bin/Satellite %buildroot%LS_PREFIX/bin cp -r %_builddir/%NAME_VERS/build/install/linstor-server/bin/linstor-config %buildroot%LS_PREFIX/bin cp -r %_builddir/%NAME_VERS/build/install/linstor-server/bin/linstor-database %buildroot/%LS_PREFIX/bin cp -r %_builddir/%NAME_VERS/scripts/postinstall.sh %buildroot%LS_PREFIX/bin/controller.postinst.sh mkdir -p %buildroot%_unitdir sed -i '/\[Service\]/a Environment="JAVA_HOME=/usr/lib/jvm/jre-11-openjdk"' %_builddir/%NAME_VERS/scripts/linstor-*.service cp -r %_builddir/%NAME_VERS/scripts/linstor-controller.service %buildroot%_unitdir cp -r %_builddir/%NAME_VERS/scripts/linstor-satellite.service %buildroot%_unitdir mkdir -p %buildroot%FIREWALLD_SERVICES cp %_builddir/%NAME_VERS/scripts/firewalld/drbd.xml %buildroot%FIREWALLD_SERVICES cp %_builddir/%NAME_VERS/scripts/firewalld/linstor-controller.xml %buildroot%FIREWALLD_SERVICES cp %_builddir/%NAME_VERS/scripts/firewalld/linstor-satellite.xml %buildroot%FIREWALLD_SERVICES mkdir -p %buildroot%_sysconfdir/drbd.d/ cp %_builddir/%NAME_VERS/scripts/linstor-resources.res %buildroot%_sysconfdir/drbd.d/ #touch %%buildroot%%LS_PREFIX/{.server,.satellite,.controller} mkdir -p %buildroot%_sysconfdir/linstor cp %_builddir/%NAME_VERS/docs/linstor.toml-example %buildroot%_sysconfdir/linstor/ touch %buildroot%_sysconfdir/linstor/linstor.toml mkdir -p %buildroot/var/lib/linstor ### common %package common Summary: Common files shared between controller and satellite Group: System/Servers Requires: java-11-openjdk-headless %description common Linstor shared components between linstor-controller and linstor-satellite %files common -f server/jar.deps %dir %LS_PREFIX %dir %LS_PREFIX/lib %LS_PREFIX/lib/server-%version.jar %LS_PREFIX/lib/jclcrypto-%version.jar %dir %LS_PREFIX/lib/conf %LS_PREFIX/lib/conf/logback.xml %dir /var/lib/linstor %dir %_sysconfdir/linstor ### controller %package controller Summary: Linstor controller specific files Group: System/Servers Requires: linstor-common = %EVR %description controller Linstor controller manages linstor satellites and persistant data storage. %files controller -f controller/jar.deps %dir %LS_PREFIX %dir %LS_PREFIX/lib %LS_PREFIX/lib/controller-%version.jar %dir %LS_PREFIX/bin %LS_PREFIX/bin/Controller %LS_PREFIX/bin/linstor-config %LS_PREFIX/bin/linstor-database %LS_PREFIX/bin/controller.postinst.sh %_unitdir/linstor-controller.service %FIREWALLD_SERVICES/linstor-controller.xml %_sysconfdir/linstor/linstor.toml-example %ghost %config(noreplace) %_sysconfdir/linstor/linstor.toml %post controller %LS_PREFIX/bin/controller.postinst.sh %post_service linstor-controller #test -f %%_bindir/firewall-cmd && firewall-cmd --reload --quiet || : %preun controller %preun_service linstor-controller ### satellite %package satellite Summary: Linstor satellite specific files Group: System/Servers Requires: linstor-common = %EVR Requires: lvm2 thin-provisioning-tools Requires: drbd-utils >= 9.7.0 %description satellite Linstor satellite, communicates with linstor-controller and creates drbd resource files. %files satellite -f satellite/jar.deps %dir %LS_PREFIX %dir %LS_PREFIX/lib %LS_PREFIX/lib/satellite-%version.jar %dir %LS_PREFIX/bin %LS_PREFIX/bin/Satellite %_unitdir/linstor-satellite.service %FIREWALLD_SERVICES/linstor-satellite.xml %FIREWALLD_SERVICES/drbd.xml %config(noreplace) %_sysconfdir/drbd.d/linstor-resources.res %post satellite %post_service linstor-satellite #test -f %%_bindir/firewall-cmd && firewall-cmd --reload --quiet || : %preun satellite %preun_service linstor-satellite %changelog * Thu Feb 22 2024 Andrew A. Vasilyev <andy@altlinux.org> 1.26.1-alt1 - 1.26.1 * Mon Jan 29 2024 Andrew A. Vasilyev <andy@altlinux.org> 1.26.0-alt1 - 1.26.0 * Fri Dec 01 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.25.1-alt1 - 1.25.1 * Wed Oct 25 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.25.0-alt1 - 1.25.0 * Thu Aug 31 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.24.2-alt1 - 1.24.2 * Mon Aug 14 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.24.1-alt1 - 1.24.1 - use gradle 8.2.1 * Tue May 23 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.23.0-alt1 - 1.23.0 - add JAVA_HOME for Java 11 * Wed May 10 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.22.1-alt1 - 1.22.1 - add Java 11 dependency, doesn't work with Java 17 * Wed Apr 19 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.22.0-alt1 - 1.22.0 * Tue Mar 14 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.21.0-alt1 - 1.21.0 * Thu Jan 26 2023 Andrew A. Vasilyev <andy@altlinux.org> 1.20.3-alt1 - 1.20.3 * Thu Dec 15 2022 Andrew A. Vasilyev <andy@altlinux.org> 1.20.2-alt1 - 1.20.2 * Tue Dec 13 2022 Andrew A. Vasilyev <andy@altlinux.org> 1.20.1-alt1 - 1.20.1 * Mon Oct 31 2022 Andrew A. Vasilyev <andy@altlinux.org> 1.20.0-alt1 - 1.20.0 * Thu Nov 11 2021 Alexey Shabalin <shaba@altlinux.org> 1.16.0-alt1 - 1.16.0 * Sun Nov 15 2020 Alexey Shabalin <shaba@altlinux.org> 1.10.0-alt2 - build as noarch again * Sun Nov 15 2020 Alexey Shabalin <shaba@altlinux.org> 1.10.0-alt1 - 1.10.0 * Tue Jun 23 2020 Alexey Shabalin <shaba@altlinux.org> 1.7.1-alt1 - 1.7.1 * Thu Mar 05 2020 Alexey Shabalin <shaba@altlinux.org> 1.4.3-alt1 - Initial build |