fix: allow using directories as contents in archlinux packager (#568)

* fix: Recursively add files if content is directory

* fix: Skip contents with wrong packager value

* test: Add acceptance tests for directories
This commit is contained in:
Arsen6331
2022-10-27 12:28:47 +00:00
committed by GitHub
parent f649caf8f2
commit b4bd7817cd
10 changed files with 79 additions and 0 deletions
+5
View File
@@ -48,6 +48,11 @@ RUN test -f /usr/share/whatever/folder/folder2/file2
RUN test -d /var/log/whatever
RUN test -d /usr/share/foo
RUN test -d /usr/foo/bar/something
RUN test -d /etc/something
RUN test -f /etc/something/a
RUN test -f /etc/something/b
RUN test -d /etc/something/c
RUN test -f /etc/something/c/d
RUN test $(stat -c %a /usr/sbin/fake) -eq 4755
RUN test -f /tmp/preinstall-proof
RUN test -f /tmp/postinstall-proof
+5
View File
@@ -51,6 +51,11 @@ RUN test -f /usr/share/whatever/folder/folder2/file2
RUN test -d /var/log/whatever
RUN test -d /usr/share/foo
RUN test -d /usr/foo/bar/something
RUN test -d /etc/something
RUN test -f /etc/something/a
RUN test -f /etc/something/b
RUN test -d /etc/something/c
RUN test -f /etc/something/c/d
RUN test $(stat -c %a /usr/bin/fake) -eq 4755
RUN test -f /tmp/preinstall-proof
RUN test -f /tmp/postinstall-proof
+2
View File
@@ -27,6 +27,8 @@ contents:
- src: ./testdata/whatever.conf
dst: /etc/foo/whatever.conf
type: config
- src: ./testdata/something
dst: /etc/something
- src: ./testdata/fake
dst: /usr/sbin/fake
packager: deb
+5
View File
@@ -51,6 +51,11 @@ RUN test -f /usr/share/whatever/folder/folder2/file2
RUN test -d /var/log/whatever
RUN test -d /usr/share/foo
RUN test -d /usr/foo/bar/something
RUN test -d /etc/something
RUN test -f /etc/something/a
RUN test -f /etc/something/b
RUN test -d /etc/something/c
RUN test -f /etc/something/c/d
RUN test $(stat -c %a /usr/sbin/fake) -eq 4755
RUN test -f /tmp/preinstall-proof
RUN test -f /tmp/postinstall-proof
+5
View File
@@ -50,6 +50,11 @@ RUN test -f /usr/share/whatever/folder/folder2/file2
RUN test -d /var/log/whatever
RUN test -d /usr/share/foo
RUN test -d /usr/foo/bar/something
RUN test -d /etc/something
RUN test -f /etc/something/a
RUN test -f /etc/something/b
RUN test -d /etc/something/c
RUN test -f /etc/something/c/d
RUN test $(stat -c %a /usr/sbin/fake) -eq 4755
RUN test -f /tmp/preinstall-proof
RUN test -f /tmp/postinstall-proof
+1
View File
@@ -0,0 +1 @@
a
+1
View File
@@ -0,0 +1 @@
b
+1
View File
@@ -0,0 +1 @@
d