Skip to content

Commit cd9796b

Browse files
author
qount25
committed
Problem: pbuilder uses tar, which results in "Cannot readlink: Invalid argument"
Solution: use --no-targz when calling `pbuilder create` (in Dockerfile when building the base image), `pbuilder execute ...` when building base chroot locally and `pbuilder build` when building a package.
1 parent 0118b31 commit cd9796b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/pgpm/deb/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# { "builder": {"Entitlements": {"security-insecure": true }} }
88
# ```
99
# ```
10-
# DOCKER_BUILDKIT=1 docker build --allow security.insecure -t IMAGE_NAME /path/to/pgpm
10+
# DOCKER_BUILDKIT=1 docker build --allow security.insecure -t IMAGE_NAME .
1111
# ```
1212

1313
# This Dockerfile is used to build a Debian image, which includes pbuilder and
@@ -21,7 +21,7 @@ MAINTAINER PGPM Debian Maintainer [email protected]
2121
VOLUME /proc
2222
ARG DEBIAN_FRONTEND=noninteractive
2323
RUN apt update
24-
RUN apt install -y build-essential pbuilder fakeroot fakechroot
24+
RUN apt install -y build-essential pbuilder fakeroot fakechroot vim ripgrep
2525
RUN echo 'MIRRORSITE=http://deb.debian.org/debian' > /etc/pbuilderrc
2626
RUN echo 'AUTO_DEBSIGN=${AUTO_DEBSIGN:-no}' > /root/.pbuilderrc
2727
RUN echo 'HOOKDIR=/var/cache/pbuilder/hooks' >> /root/.pbuilderrc

lib/pgpm/deb/builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def build_local_image
140140
# base image inside the container (along with some other necessary
141141
# packages) and saves chroot base image with these changes.
142142
puts " Updating chroot image..."
143-
system("podman exec -w /root pgpm-deb-tmp /bin/bash -c 'fakeroot pbuilder execute --save-after-exec ./pbuilder_install_script.sh'")
143+
system("podman exec -w /root pgpm-deb-tmp /bin/bash -c 'fakeroot pbuilder execute --no-auto-update --save-after-exec ./pbuilder_install_script.sh'")
144144

145145
# Exiting -- most likely error occurred because we cannot find the same
146146
# postgresql version in the Debian repository. The bash script

0 commit comments

Comments
 (0)