File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ RUN apt install -y build-essential pbuilder fakeroot fakechroot
25
25
RUN echo 'MIRRORSITE=http://deb.debian.org/debian' > /etc/pbuilderrc
26
26
RUN echo 'AUTO_DEBSIGN=${AUTO_DEBSIGN:-no}' > /root/.pbuilderrc
27
27
RUN echo 'HOOKDIR=/var/cache/pbuilder/hooks' >> /root/.pbuilderrc
28
- RUN --security=insecure pbuilder create # --components "main contrib-non-free"
28
+ RUN --security=insecure pbuilder create
29
29
30
30
COPY pbuilder_install_script.sh /root/pbuilder_install_script.sh
31
31
RUN --security=insecure pbuilder execute --save-after-exec /root/pbuilder_install_script.sh
Original file line number Diff line number Diff line change @@ -74,6 +74,19 @@ def run_build
74
74
exit ( 1 ) if $?. to_i > 0
75
75
76
76
cmds = [ ]
77
+
78
+ # This line prevents clean-up after pbuilder finishes. There's no option
79
+ # in pbuilder to do it, so we have to patch it manually. The issue is
80
+ # with pbuilder not being able to delete some directories (presumably,
81
+ # due to directory names starting with ".") and returning error.
82
+ #
83
+ # This little patch avoids the error by returning from the python cleanup
84
+ # function early -- because the package itself is built successfully and
85
+ # we don't actually care that pbuilder is unable to clean something up.
86
+ # The container is going to be removed anyway, so it's even less work as
87
+ # a result.
88
+ cmds << "sed -E -i \" s/(^function clean_subdirectories.*$)/\\ 1\\ n return/g\" /usr/lib/pbuilderp/builder-modules"
89
+
77
90
cmds << "dpkg-buildpackage --build=source -d" # -d flag helps with dependencies error
78
91
cmds << "fakeroot pbuilder build ../#{ dsc_fn } "
79
92
cmds << "mv /var/cache/pbuilder/result/#{ deb_fn } /root/pgpm/out/"
You can’t perform that action at this time.
0 commit comments