[Tcsh] tcsh and Alpine Linux: progress, anyone?

Vlad Meșco vlad.mesco at gmail.com
Sat Nov 26 17:53:26 UTC 2022


Le 26 novembre 2022 15:52:08 GMT+02:00, "Nelson H. F. Beebe" <beebe at math.utah.edu> a écrit :
>Vlad points to a patch for tcsh on Alpine Linux:
>
>>> https://git.alpinelinux.org/aports/tree/community/tcsh/001-sysmalloc.patch
>
>Thanks!  
>
>It does not apply with "patch -p1 < 001-sysmalloc.patch" because the
>tcsh source code has since changed, but the essential thing is that
>for Alpine Linux, the symbolic SYSMALLOC must be defined.  The Alpine
>patch in the URL above is brutal: it removes the test for 9 other
>symbols, and thus cannot be part of the tcsh distribution.

I think the intention of config_f.h is you customize it on your platform when you build it (it kinda says so in the file). So I wouldn't call it "brutal", just unfortunate :-)

>
>On the '#if defined(__MACHTEN__) ...' statement at line 150 of
>config_f.h, I added to the end ' || defined(__ALPINE__)', then edited
>the Makefile to have
>
>	CFLAGS = -I/usr/uumath/include -D__ALPINE__

Yeah, it's unfortunate musl doesn't define anything to identify itself (intentional). Maybe there's something in autoconf that figures it out, but I don't speak autoconf.

>
>That is necessary because there is no symbol defined on Alpine Linux
>in /usr/bin/cc that uniquely identifies this system, as verified by
>the output of the script at
>
>	https://www.math.utah.edu/~beebe/cc-defs
>
>I ran "make clean; make; make check", and all but one of the tests
>pass!  Here is the single failure:
>
>	 30: @                                               FAILED (commands.at:18)
>
>The section of testsuite.log that records the failing test looks like
>this:
>
>	30. commands.at:14: testing @ ...
>	./commands.at:17: tcsh -f -c 'set' > out1 && tcsh -f -c '@' > out2
>	./commands.at:18: diff out1 out2 | tail -n +2
>	--- -
>	+++ /local/build/cc/tcsh-6.24.02/testsuite.dir/at-groups/30/stdout
>	@@ -1,4 +1,11 @@
>	-< command	set
>	----
>	-> command	@
>	++++ out2
>	+@@ -2,7 +2,7 @@
>	+ anyerror	
>	+ argv	()
>	+ cdtohome	
>	+-command	set
>	++command	@
>	+ csubstnonl	
>	+ cwd	/local/build/cc/tcsh-6.24.02/testsuite.dir/030
>	+ dirstack	/local/build/cc/tcsh-6.24.02/testsuite.dir/030
>
>	30. commands.at:14: 30. @ (commands.at:14): FAILED (commands.at:18)
>
>Without further study of that test, I cannot quickly identify the
>cause of the failure, but perhaps other list members can.

It looks like the only reason the test failed is because the autotests want old style diffs, but your system has diff configured to use unified diff? (diff -u). I don't remember this being the OOB behaviour on alpine, but I haven't upgraded in a while.

I'd wager your build is fine.

>
>In any event, I now have a usable tcsh on Alpine Linux, and that is a
>big step.  It also means that the Alpine packagers ought to be able to
>include tcsh in the package repository.

Um... it is included. You can enable the community repo [1] or read about abuild [2] to build from their aports tree [3]. The maintainer on the Alpine side keeps patches up to date (and seems to be doing a good job).

>
>-------------------------------------------------------------------------------
>- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
>- University of Utah                                                          -
>- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
>- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
>- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
>-------------------------------------------------------------------------------

[1] https://wiki.alpinelinux.org/wiki/Repositories#Enabling_the_community_repository

[2] https://wiki.alpinelinux.org/wiki/Abuild_and_Helpers

[3] https://gitlab.alpinelinux.org/alpine/aports

Cheers,
Vlad



More information about the Tcsh mailing list