termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.15k stars 3.02k forks source link

[Bug]: "col" was removed by "pkg upgrade" #21537

Closed hiroshimrt closed 3 weeks ago

hiroshimrt commented 3 weeks ago

Problem description

-- [Bug]: "col" was removed by "pkg upgrade"

Dear sir

$ col The program col is not installed. Install it by executing: pkg install util-linux

The latest version of util-linux does not contain col command

I have solved this problem by using my personal backup file of "col"

Thanks in advance

What steps will reproduce the bug?

pkg upgrade

will simply remove the existing file /data/data/com.termux/files/usr/bin/col

What is the expected behavior?

e.g. failure in shell-script (calling col command)

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=22579
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirror.vern.cc/termux/termux-main stable main
# root-repo (sources.list.d/root.list)
deb https://mirror.vern.cc/termux/termux-root root stable
# x11-repo (sources.list.d/x11.list)
deb https://mirror.vern.cc/termux/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.43.5
Android version:
13
Kernel build information:
Linux localhost 4.19.191+ #1 SMP PREEMPT Tue Jul 9 14:56:12 CST 2024 aarch64 Android
Device manufacturer:
ZTE
Device model:
A202ZT
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.window versionCode:15
com.termux.styling versionCode:1000
com.termux.api versionCode:51
com.termux.widget versionCode:13
com.termux.tasker versionCode:6
TomJo2000 commented 3 weeks ago

Can confirm, col is not in our util-linux package. Will look into why that is.

TomJo2000 commented 3 weeks ago

Yep, that would do it.

configure: WARNING: building for glibc not found; not building col

Gonna ping @fornwall as the last packager. Any ideas where to start looking?

Here's all the "not building xyz" warnings from the build. with comments as applicable ```styl //explicitly disabled configure: WARNING: liblastlog2 disabled; not building pam_lastlog2 // Probably not applicable on Termux configure: WARNING: shadow.h header not found; not building lslogins // should be getting built configure: WARNING: building for glibc not found; not building col // Probably not applicable on Termux configure: WARNING: GNU utmpx functions not found; not building utmpdump // We have our own chsh in termux-tools // chfn is for the finger protocol, so probably deprecated/not applicable for Termux configure: WARNING: shadow.h header not found; not building chfn_chsh // Not applicable on Termux configure: WARNING: PAM header file not found; not building login configure: WARNING: shadow.h header not found; not building sulogin configure: WARNING: PAM header file not found; not building su configure: WARNING: PAM header file not found; not building runuser
fornwall commented 3 weeks ago

This seems to be the commit removing col when not building for glibc: https://github.com/util-linux/util-linux/commit/8886d84e25a457702b45194d69a47313f76dc6bc

build-sys: only build col on glibc col expects an EILSEQ failure of getwchar() to leave the undecoded data in the buffer to be read by a subsequent getchar().

This is not guaranteed by the standard and for example musl libc does not conform to this expectation.

As col is deprecated anyways just disable it on non-glibc instead of fixing it.

This document contains the deprecation information: https://github.com/util-linux/util-linux/blob/master/Documentation/deprecated.txt, which in turn references this doc: https://pubs.opengroup.org/onlinepubs/7908799/xcu/intro.html#tag_001_003_003, where col is listed under the LEGACY section:

The utilities in the table below are marked LEGACY. Various factors may have contributed to the decision to class a utility LEGACY. Application writers should not use functionality marked LEGACY.

So I guess we either patch back building col at least for a while, or just accept that upstream wants col to be deprecated and disabled for non-glibc builds. What do you think? @hiroshimrt how useful / hard to replace is col?

TomJo2000 commented 3 weeks ago

Hmm, well it's breaking at least one user's workflow. So we should definitely provide a col utility. It is also a standard UNIX utility user the Single UNIX Specfication v2.

So either we reenable it in util-linux with a note about it being considered Legacy by upstream, or we package a standalone implementation of it.

ChiefMikeK commented 3 weeks ago

stand alone = less maintenace ๐Ÿ‘Œ

TomJo2000 commented 3 weeks ago

stand alone = less maintenace ๐Ÿ‘Œ

If you can find one that is. Repology doesn't list any standalone col packages asides from a single Nixpkgs package of util-linux's col, and at that point we may as well just reenable it in util-linux.

fornwall commented 3 weeks ago

Fixed in version 2.40.2-1 of util-linux - run pkg up to update.

hiroshimrt commented 3 weeks ago

--

thank you

i started to use col few years ago

i found it in the manpage of man on macOS terminal (man man)

see also termux man man SEE ALSO col(1)

2024ๅนด9ๆœˆ23ๆ—ฅ(ๆœˆ) 2:39 Fredrik Fornwall @.***>:

Fixed in version2.40.2-1 of util-linux - run pkg up to update.

โ€” Reply to this email directly, view it on GitHub https://github.com/termux/termux-packages/issues/21537#issuecomment-2366887006, or unsubscribe https://github.com/notifications/unsubscribe-auth/BLPPRFP26WABWKVNNZ55JMDZX36FNAVCNFSM6AAAAABOUDDBTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRWHA4DOMBQGY . You are receiving this because you were mentioned.Message ID: @.***>