1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

makepkg: add mtree file into package

Add an mtree file to the package with all file information. This
can be added to the local pacman database on install allowing full
package verification.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2012-04-30 16:15:47 +10:00
parent f5d904d97f
commit ad3a26c615

View File

@ -1810,8 +1810,6 @@ create_package() {
done done
# tar it up # tar it up
msg2 "$(gettext "Compressing package...")"
local fullver=$(get_full_version) local fullver=$(get_full_version)
local pkg_file="$PKGDEST/${pkgname}-${fullver}-${pkgarch}${PKGEXT}" local pkg_file="$PKGDEST/${pkgname}-${fullver}-${pkgarch}${PKGEXT}"
local ret=0 local ret=0
@ -1822,6 +1820,14 @@ create_package() {
# when fileglobbing, we want * in an empty directory to expand to # when fileglobbing, we want * in an empty directory to expand to
# the null string rather than itself # the null string rather than itself
shopt -s nullglob shopt -s nullglob
msg2 "$(gettext "Generating .MTREE file...")"
bsdtar -czf .MTREE --format=mtree \
--options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' \
"${comp_files[@]}" *
comp_files+=(".MTREE")
msg2 "$(gettext "Compressing package...")"
# TODO: Maybe this can be set globally for robustness # TODO: Maybe this can be set globally for robustness
shopt -s -o pipefail shopt -s -o pipefail
# bsdtar's gzip compression always saves the time stamp, making one # bsdtar's gzip compression always saves the time stamp, making one