summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@parabola.nu>2024-02-20 23:01:27 -0700
committerLuke T. Shumaker <lukeshu@parabola.nu>2024-02-21 10:17:32 -0700
commit9a0328490c2ea30d0eda470cb4da8da0030c96e9 (patch)
tree26078db787a67afc801af81551c8788ef019817f
parent87cb7598e0d0147c2befb4937423672d1b91fcce (diff)
fix: librefetch: Don't include metadata files
Obviously, this is to avoid being broken by changes in makepkg. I don't care to track down which version of makepkg made the change.
-rw-r--r--src/librefetch/librefetch.8.ronn3
-rwxr-xr-xsrc/librefetch/librefetchdir/makepkg.gen12
-rw-r--r--test/cases/librefetch.bats1
3 files changed, 8 insertions, 8 deletions
diff --git a/src/librefetch/librefetch.8.ronn b/src/librefetch/librefetch.8.ronn
index 27dfac0..63dfae9 100644
--- a/src/librefetch/librefetch.8.ronn
+++ b/src/librefetch/librefetch.8.ronn
@@ -179,7 +179,8 @@ Other changes:
The following modifications are made to makepkg:
* Allow us to manipulate the output file (<$pkg_file>)
- * Do not include metadata in the output file (<${comp_files[@]}>)
+ * Do not include metadata in the output file (`.PKGINFO`,
+ `.BUILDINFO`, and `.MTREE`)
* Force 'ustar' tar format, don't allow it to upgrade to 'pax' to
store extended file attributes.
* Don't symlink the resulting file into the current directory.
diff --git a/src/librefetch/librefetchdir/makepkg.gen b/src/librefetch/librefetchdir/makepkg.gen
index dfe68f5..31cdfe6 100755
--- a/src/librefetch/librefetchdir/makepkg.gen
+++ b/src/librefetch/librefetchdir/makepkg.gen
@@ -1,7 +1,7 @@
#!/usr/bin/sed -rf
# librefetchdir/makepkg.gen
#
-# Copyright (C) 2013-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2013-2018, 2024 Luke Shumaker <lukeshu@parabola.nu>
#
# License: GNU GPLv3+
#
@@ -22,12 +22,12 @@
/LIBRARY=/iexport LIBRARY="${0%/*}/libmakepkg"
-/list_package_files\(\) \{/,/^\}$/ {
- # Don't include dotfiles
- s,\(.*; (.* \| LC_ALL=C sort)\),\1,
-}
-
/create_package\(\) \{/,/^\}$/ {
+ # Don't generate metadata files
+ /PKGINFO/d
+ /BUILDINFO/d
+ /msg2.*MTREE/,/touch.*MTREE/d
+
# allow us to set pkg_file
/pkg_file=/d
}
diff --git a/test/cases/librefetch.bats b/test/cases/librefetch.bats
index 8f03494..439553f 100644
--- a/test/cases/librefetch.bats
+++ b/test/cases/librefetch.bats
@@ -12,7 +12,6 @@ setup() {
BUILDDIR=""
source ${_librelib_conf_sh_sysconfdir@Q}/makepkg.d/librefetch.conf
eot
- export MAKEPKG_CONF="$XDG_CONFIG_HOME/pacman/makepkg.conf"
install -Dm644 /dev/stdin "$XDG_CONFIG_HOME/libretools/librefetch.conf" <<-eot
MIRRORS=("phony://example.com/dir/")