From ef6fe370e53a2a145006975e236044d79c43cc4a Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Tue, 28 Feb 2023 18:32:29 +0500 Subject: [PATCH] repare for build --- podman-build.sh | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/podman-build.sh b/podman-build.sh index 77a7fad..1f7f2d6 100644 --- a/podman-build.sh +++ b/podman-build.sh @@ -61,6 +61,89 @@ cd ~ +## prepare for packging +mkdir -p podman-deb + +## remove v in version name +PODMAN_NOV_VERSION=$(echo $PODMAN_VERSION | sed s/v//) +# +mkdir -p podman-deb/DEBIAN +cat < podman-deb/DEBIAN/control +Package: podman +Version: $PODMAN_NOV_VERSION +Depends: libgpgme11 +Section: base +Priority: optional +Architecture: amd64 +Maintainer: Shiham Abdul Rahman +Description: Podman container engine + Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. + +EOF + +# +## CNI plugins +mkdir -p podman-deb/etc/containers/ +curl -L -o podman-deb/etc/containers/registries.conf https://src.fedoraproject.org/rpms/containers-common/raw/main/f/registries.conf +curl -L -o podman-deb/etc/containers/policy.json https://src.fedoraproject.org/rpms/containers-common/raw/main/f/default-policy.json +# +# +## Systemd service and socket files +mkdir -p podman-deb/usr/lib/systemd/system/ +# +cat < podman-deb/usr/lib/systemd/system/podman.service +[Unit] +Description=Podman API Service +Requires=podman.socket +After=podman.socket +Documentation=man:podman-system-service(1) +StartLimitIntervalSec=0 + +[Service] +Delegate=true +Type=exec +KillMode=process +Environment=LOGGING="--log-level=info" +ExecStart=/usr/bin/podman $LOGGING system service + +[Install] +WantedBy=default.target + +EOF + +cat < podman-deb/usr/lib/systemd/system/podman.socket +[Unit] +Description=Podman API Socket +Documentation=man:podman-system-service(1) + +[Socket] +ListenStream=%t/podman/podman.sock +SocketMode=0660 + +[Install] +WantedBy=sockets.target + +EOF +# +## Copy the binaries +mkdir -p podman-deb/usr/local/bin +cp -v build/bin/podman podman-deb/usr/local/bin/ +cp -v build/bin/podman-remote podman-deb/usr/local/bin/ +cp -v build/bin/quadlet podman-deb/usr/local/bin/ +cp -v build/bin/rootlessport podman-deb/usr/local/bin/ + +## runc +mkdir -p podman-deb/usr/bin +cp -v build/runc podman-deb/usr/bin + +## conmon +mkdir -p podman-deb/usr/bin +cp -v build/bin/conmon podman-deb/usr/bin/ + +## ofc the permission +#chmod 755 podman-deb/usr/local/bin/* + + #GO_VERSION=1.16.1