Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
OBS:Server:Unstable
obs-source-service-podman
_image.spec.in
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _image.spec.in of Package obs-source-service-podman
# needsrootforbuild %define image_name __IMAGE_NAME__ %define containers_dir /srv/obs/service/containers %define containers_user obsservicerun Url: http://www.suse.com/ Name: __NAME__ Summary: Package with the OBS source service container image Version: __VERSION__ Release: __RELEASE__ Group: System/Management License: SUSE-EULA Source0: __SOURCE0__ Source1: __SOURCE1__ Source2: __SOURCE2__ BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: podman # Requires: user(obsservicerun) Requires: obs-server %description This package contains the unofficial container image of the OBS source services. %prep echo __RELEASE__ > BUILD_ID %build %install install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native install -p -D -m 644 %{SOURCE0} $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native/ install -p -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native/ install -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native/ ln -s ./$(basename %{SOURCE0}) $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native/__PKG_NAME__ ln -s ./$(basename %{SOURCE1}) $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native/__PKG_NAME__.%{_arch}-__VERSION__-Build__RELEASE__.metadata ln -s ./$(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native/__PKG_NAME__.%{_arch}-__VERSION__-Build__RELEASE__.tag mkdir -p %{buildroot}/usr/lib/obs/services/ cp BUILD_ID $RPM_BUILD_ROOT%{_datadir}/suse-container-images/native/ if [[ -d /usr/src/packages/KIWIROOT ]];then KIWIROOT="/usr/src/packages/KIWIROOT" elif [[ -d /usr/src/packages/KIWIROOT-docker ]];then KIWIROOT="/usr/src/packages/KIWIROOT-docker" fi if [[ -n $KIWIROOT ]];then [[ -d %{buildroot}/usr/lib/obs/service/ ]] || \ mkdir -p %{buildroot}/usr/lib/obs/service/ cp $KIWIROOT/usr/lib/obs/service/*.service \ %{buildroot}/usr/lib/obs/service/ || /bin/true fi %files %defattr(-, root, root) %{_datadir}/suse-container-images/native %dir /usr/lib/obs /usr/lib/obs/service/ %post if [ ! -d %{containers_dir} ];then mkdir -p %{containers_dir} fi chown -R %{containers_user} %{containers_dir} C_UID=`id -u %{containers_user}` chown -R %{containers_user} /run/user/${C_UID}/containers/ su -s /bin/sh -l -c "podman --root %{containers_dir} --storage-opt overlay.mount_program=/usr/bin/fuse-overlayfs load -qi %{_datadir}/suse-container-images/native/__PKG_NAME__.%{_arch}-__VERSION__-Build__RELEASE__.docker.tar.xz" %{containers_user} su -s /bin/sh -l -c "podman --root %{containers_dir} --storage-opt overlay.mount_program=/usr/bin/fuse-overlayfs tag docker.io/library/__PKG_NAME__:%{version} __PKG_NAME__:latest" %{containers_user} su -s /bin/sh -l -c "podman --root %{containers_dir} --storage-opt overlay.mount_program=/usr/bin/fuse-overlayfs image prune --force" %{containers_user} %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor