mirror of
				https://github.com/NVIDIA/nvidia-container-toolkit
				synced 2025-06-26 18:18:24 +00:00 
			
		
		
		
	Require at least a matching libnvidia-container-tools version
This change ensures that at least the same libnvidia-container-tools version is required when installing nvidia-container-toolkit. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
		
							parent
							
								
									2dc85de5d4
								
							
						
					
					
						commit
						fa7dc8cb31
					
				| @ -59,6 +59,7 @@ CMD arch=$(uname -m) && \ | ||||
|     rpmbuild --clean --target=$arch -bb \ | ||||
|              -D "_topdir $PWD" \ | ||||
|              -D "version $VERSION" \ | ||||
|              -D "libnvidia_container_version ${VERSION}-${RELEASE}" \ | ||||
|              -D "release $RELEASE" \ | ||||
|              SPECS/nvidia-container-toolkit.spec && \ | ||||
|     mv RPMS/$arch/*.rpm /dist | ||||
|  | ||||
| @ -57,6 +57,7 @@ CMD arch=$(uname -m) && \ | ||||
|     rpmbuild --clean --target=$arch -bb \ | ||||
|              -D "_topdir $PWD" \ | ||||
|              -D "version $VERSION" \ | ||||
|              -D "libnvidia_container_version ${VERSION}-${RELEASE}" \ | ||||
|              -D "release $RELEASE" \ | ||||
|              SPECS/nvidia-container-toolkit.spec && \ | ||||
|     mv RPMS/$arch/*.rpm /dist | ||||
|  | ||||
| @ -64,5 +64,6 @@ RUN sed -i "s;@VERSION@;${REVISION};" debian/changelog && \ | ||||
|     if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi | ||||
| 
 | ||||
| CMD export DISTRIB="$(lsb_release -cs)" && \ | ||||
|     debuild -eDISTRIB -eSECTION --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \ | ||||
|     debuild -eDISTRIB -eSECTION -eLIBNVIDIA_CONTAINER_VERSION="${REVISION}" \ | ||||
|     --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \ | ||||
|     mv /tmp/nvidia-container-toolkit_*.deb /dist | ||||
|  | ||||
| @ -56,6 +56,7 @@ CMD arch=$(uname -m) && \ | ||||
|     rpmbuild --clean --target=$arch -bb \ | ||||
|              -D "_topdir $PWD" \ | ||||
|              -D "version $VERSION" \ | ||||
|              -D "libnvidia_container_version ${VERSION}-${RELEASE}" \ | ||||
|              -D "release $RELEASE" \ | ||||
|              SPECS/nvidia-container-toolkit.spec && \ | ||||
|     mv RPMS/$arch/*.rpm /dist | ||||
|  | ||||
| @ -57,5 +57,6 @@ RUN sed -i "s;@VERSION@;${REVISION};" debian/changelog && \ | ||||
|     if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi | ||||
| 
 | ||||
| CMD export DISTRIB="$(lsb_release -cs)" && \ | ||||
|     debuild -eDISTRIB -eSECTION --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \ | ||||
|     debuild -eDISTRIB -eSECTION -eLIBNVIDIA_CONTAINER_VERSION="${REVISION}" \ | ||||
|     --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \ | ||||
|     mv /tmp/*.deb /dist | ||||
|  | ||||
| @ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9) | ||||
| 
 | ||||
| Package: nvidia-container-toolkit | ||||
| Architecture: any | ||||
| Depends: ${misc:Depends}, libnvidia-container-tools (>= 1.4.0), libnvidia-container-tools (<< 2.0.0), libseccomp2 | ||||
| Depends: ${misc:Depends}, libnvidia-container-tools (>= @LIBNVIDIA_CONTAINER_VERSION@), libnvidia-container-tools (<< 2.0.0), libseccomp2 | ||||
| Breaks: nvidia-container-runtime (<= 3.5.0-1), nvidia-container-runtime-hook | ||||
| Replaces: nvidia-container-runtime (<= 3.5.0-1), nvidia-container-runtime-hook | ||||
| Description: NVIDIA container runtime hook | ||||
|  | ||||
| @ -3,6 +3,7 @@ | ||||
| set -e | ||||
| 
 | ||||
| sed -i "s;@SECTION@;${SECTION:+$SECTION/};g" debian/control | ||||
| sed -i "s;@LIBNVIDIA_CONTAINER_VERSION@;${LIBNVIDIA_CONTAINER_VERSION:+$LIBNVIDIA_CONTAINER_VERSION};g" debian/control | ||||
| 
 | ||||
| if [ -n "$DISTRIB" ]; then | ||||
|     sed -i "s;UNRELEASED;$DISTRIB;" debian/changelog | ||||
|  | ||||
| @ -20,7 +20,7 @@ Source5: LICENSE | ||||
| Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook | ||||
| Provides: nvidia-container-runtime | ||||
| Provides: nvidia-container-runtime-hook | ||||
| Requires: libnvidia-container-tools >= 1.4.0, libnvidia-container-tools < 2.0.0 | ||||
| Requires: libnvidia-container-tools >= %{libnvidia_container_version}, libnvidia-container-tools < 2.0.0 | ||||
| 
 | ||||
| %if 0%{?suse_version} | ||||
| Requires: libseccomp2 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user