[Dev] PKGBUILD updated for gmid
bill-auger
bill-auger at peers.community
Fri Jul 29 10:27:33 GMT 2022
there are errors in the last PKGBUILD - i fixed them; but i
should explain why
the source array has 8 items; but the sha256sums array has only
7 - makepkg would fail immediately for that reason
notice {,.sig} at the end of the libre source-ball entry
https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.pkg.tar.xz{,.sig}
that line actually resolves to two entries (2 files)
https://repo.parabola.nu/other/gmid-libre/gmid-libre-1.8.4.pkg.tar.xz
https://repo.parabola.nu/other/gmid-libre/gmid-libre-1.8.4.pkg.tar.xz.sig
the .sig file normally gets a checksum 'SKIP' - you can get the
correct checksums with `makepkg -g`, and copy/paste them into
the PKGBUILD - that would emit the following:
sha256sums=(
'abecdec3bfc2f2deac9d57b84e43334484fc537e5086a3c061f07f6311c89d2f'
'SKIP'
'946de0766343225068a0e3f38cb39a4a93ef312525dd775226b938cd08706b94'
'4d943727a57dbf5f246963c0f90ccc54919cc2296538457e6b16f29f7580d9d6'
'eddbe93741d01077426bc0239db42815c75a0da5191b4e6528df60ae3e0e5bb3'
'f396c7db961c45ddb8e48acf42708b3faf9df2a3eaa56f30d9e64d4de0971e88'
'7acf491fee5f2693b30666b1f2c6eb0a4db33e9ef3154e1cbfb62186c6fa7be6'
'361cd4ef2b47437b0f5729d56d0ef88851e56812ab88546c82cda0092fe86139'
)
the second problem is that same line - the example filenames
above are not correct - the source-ball that mksource() will
generate, and will be in the other/ directory on the server,
does not have .pkg. in the filename - .pkg. in the filename
would indicate a binary package, which is installable by pacman
that file is not intended to be installed by pacman though -
you can see the actual filename on the web:
https://repo.parabola.nu/other/gmid-libre/
that error was present already though - i must have overlooked
that last time
this last bit is not an error - i mentioned on IRC that the
mksource() commands could be simplified with -f, yet would
behave exactly the same as the verbose if/then form
rm -rf contrib
rm -rf site
either way, the build would not fail, if those directories were
missing - another approach is to allow it fail, and give a
warning instead, indicating that something has changed and needs
attention - it is somewhat more robust that way - if for example,
the upstream renames contrib/ to Contrib/, then the PKGBUILD
would need to change, or it would silently include the Contrib/
files - or if the contrib/ directory was removed upstream, then
the PKGBUILD would not need to check for it anymore
if [[ -d contrib ]]
then
rm -r contrib
else
echo "cannot delete contib/ - mksource() needs re-working"
return 1
fi
if [[ -d site ]]
then
rm -r site
echo "cannot delete site/ - mksource() needs re-working"
return 1
fi
then, that could be DRYed, like:
nonfree_files=( contrib site )
for nonfree_file in "${nonfree_files[@]}"
do if [[ -d ${nonfree_file} ]]
then
rm -r ${nonfree_file}
else
echo "cannot delete '${nonfree_file}' - mksource() needs re-working"
return 1
fi
done
i made that change to the PKGBUILD in absilibre - it is on the
'wip-gmid' branch now
finally, now this is another error - after putting that sanity
check in place, the build fails with:
cannot delete 'contib' - mksource() needs re-working
the upstream sourceball gmid-1.8.4.tar.gz has no 'contrib' or
'site' directories
i think we both knew that already - its why i recommended rm -rf on IRC
so this is where i should toss it back over the wall to the
maintainer
what that actually entails in this case, is probably only to
check the files, to verify that the non-free files are no longer
present (maybe they were moved/renamed) - if they are gone, then
mksource() can go away - if they were only moved, then
the 'nonfree_files' array would need to change
i forgot to suggest that - i dont remember if you verified that
the non-free files were really gone, or maybe they are just hiding
More information about the Dev
mailing list