-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New package: fatsort-1.6.2.605 #23485
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully upstream will consider shipping the manpage without require it be built, but using qemu gets us what we need.
As @sgn noticed, fighting for help2man is not worth it, all one get is already there with |
bump |
I may go with this, # Template file for 'fatsort'
pkgname=fatsort
version=1.6.2.605
revision=1
build_style=gnu-makefile
hostmakedepends="help2man"
checkdepends="xz dosfstools diffutils valgrind"
make_check_target=tests
make_install_args="MANDIR=/usr/share/man/man1 SBINDIR=/usr/bin"
short_desc="Utility that sorts FAT12, FAT16, FAT32 and exFAT partitions"
maintainer="tibequadorian <tibequadorian@posteo.de>"
license="GPL-2.0-or-later"
homepage="https://fatsort.sourceforge.io/"
distfiles="${SOURCEFORGE_SITE}/project/fatsort/fatsort-${version}.tar.xz"
checksum=08cafa36f86ab89e7a3241d437df9af8a008549d7d13416256b7aaa006d5ffb7
if [ "$XBPS_TARGET_LIBC" = musl ]; then
broken="most tests are failed"
fi
if [ "$CROSS_BUILD" ]; then
make_build_args="HELP2MAN=:"
post_build() {
: >man/fatsort.1
}
post_install() {
rm -rf $DESTDIR/usr/share/man
}
fi |
I like supporting the |
On 2020-07-23 19:15:17-0700, "Andrew J. Hesford" ***@***.***> wrote:
I like supporting the `check` mechanism in @sgn's template and,
given that tests failing, marking broken on musl seems appropriate.
Yes, considering this package touch filesystem level, I don't think
it's acceptable to ship a broken package.
If we're going to remove the (not very helpful) man page on
cross-built packages, we should remove it everywhere. Native-built
and cross-built packages for the same architecture should have the
same contents.
Don't know, there're packages that have different contents in
native-build and cross build. Removing manpages for this one looks
fine. help2man is useless anyway.
…--
Danh
|
What's the problem with simply using the qemu build helper for the man page? |
The qemu helper is a bit heavy handed just to dump the help output to a man page, but I don't have a real problem with it because it's "correct" in that it honors the upstream intentions. I do think you should complain upsream that they should ship a proper man page rather than relying on dynamic generation at build time. The real issue is that @sgn improved the template by supporting |
what about tcc instead of qemu? 😄 if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" tcc"
post_patch() {
cpp -dM src/fatsort.c | grep '#define INFO' > man/info.h
cat > man/fatsort.sh <<-EOF
#!/bin/sh
case \$1 in
"--help") arg="INFO_OPTION_HELP" ;;
"--version") arg="INFO_OPTION_VERSION" ;;
esac
echo "#include\"info.h\"int main(){printf(\$arg);}" | tcc -run -
EOF
chmod 755 man/fatsort.sh
vsed -i man/Makefile -e 's|../src/fatsort|./fatsort.sh|'
}
fi |
Looks fine to me. @sgn Any objections? This looks like exactly what you suggested. |
printf("%s", $arg);
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" tcc"
post_patch() {
cpp -dM src/fatsort.c | grep '#define INFO' > man/info.h
cat > man/fatsort.sh <<-'EOF'
#!/bin/sh
case $1 in
"--help") arg="INFO_OPTION_HELP" ;;
"--version") arg="INFO_OPTION_VERSION" ;;
esac
echo '#include "info.h"' "int main(){return printf(\"%s\", $arg) > 0;}" |
tcc -run -
EOF
chmod 755 man/fatsort.sh
vsed -i man/Makefile -e 's|../src/fatsort|./fatsort.sh|'
}
fi |
Is this seriously being considered? If you're going to go to this much trouble to wrap the help text in a man page, just use the |
On 2020-07-25 20:52:42-0700, "Andrew J. Hesford" ***@***.***> wrote:
Is this seriously being considered? If you're going to go to this
much trouble to wrap the help text in a man page, just use the
`qemu` helper. A custom executable is too fragile.
Yes, I think qemu is fine.
Just want to give more options :)
…--
Danh
|
thank you for correction @sgn :) |
No description provided.