Bug 40055 - Обновление пользовательской команды tree v1.0.0 до версии 1.8
Summary: Обновление пользовательской команды tree v1.0.0 до версии 1.8
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: tree (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 enhancement
Assignee: Vitaly Chikunov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-14 15:52 MSK by rits
Modified: 2022-02-28 13:54 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rits 2021-05-14 15:52:46 MSK

    
Comment 1 rits 2021-05-14 15:56:42 MSK
https://forum.altlinux.org/index.php?topic=8027.msg359487#msg359487

"Debian GNU/Linux" OMV
tree --version
    > tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro

"ALT Starterkit (Hypericum)"
# tree -v
    
> tree version 1.0.0
    Written by Stanislav Ievlev
    Copyright (C) 2002-2004 ALT Linux Team

Возможно это разные программы, но было бы не плохо обновить утилитку tree до версии 1.8. На 1.8 параметров больше.
Comment 2 rits 2021-05-14 16:09:37 MSK
# tree --version
tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro 
root@ae-data3:~# tree --help
usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-H baseHREF] [-T title ]
	[-L level [-R]] [-P pattern] [-I pattern] [-o filename] [--version]
	[--help] [--inodes] [--device] [--noreport] [--nolinks] [--dirsfirst]
	[--charset charset] [--filelimit[=]#] [--si] [--timefmt[=]<f>]
	[--sort[=]<name>] [--matchdirs] [--ignore-case] [--fromfile] [--]
	[<directory list>]
  ------- Listing options -------
  -a            All files are listed.
  -d            List directories only.
  -l            Follow symbolic links like directories.
  -f            Print the full path prefix for each file.
  -x            Stay on current filesystem only.
  -L level      Descend only level directories deep.
  -R            Rerun tree when max dir level reached.
  -P pattern    List only those files that match the pattern given.
  -I pattern    Do not list files that match the given pattern.
  --ignore-case Ignore case when pattern matching.
  --matchdirs   Include directory names in -P pattern matching.
  --noreport    Turn off file/directory count at end of tree listing.
  --charset X   Use charset X for terminal/HTML and indentation line output.
  --filelimit # Do not descend dirs with more than # files in them.
  --timefmt <f> Print and format time according to the format <f>.
  -o filename   Output to file instead of stdout.
  ------- File options -------
  -q            Print non-printable characters as '?'.
  -N            Print non-printable characters as is.
  -Q            Quote filenames with double quotes.
  -p            Print the protections for each file.
  -u            Displays file owner or UID number.
  -g            Displays file group owner or GID number.
  -s            Print the size in bytes of each file.
  -h            Print the size in a more human readable way.
  --si          Like -h, but use in SI units (powers of 1000).
  -D            Print the date of last modification or (-c) status change.
  -F            Appends '/', '=', '*', '@', '|' or '>' as per ls -F.
  --inodes      Print inode number of each file.
  --device      Print device ID number to which each file belongs.
  ------- Sorting options -------
  -v            Sort files alphanumerically by version.
  -t            Sort files by last modification time.
  -c            Sort files by last status change time.
  -U            Leave files unsorted.
  -r            Reverse the order of the sort.
  --dirsfirst   List directories before files (-U disables).
  --sort X      Select sort: name,version,size,mtime,ctime.
  ------- Graphics options -------
  -i            Don't print indentation lines.
  -A            Print ANSI lines graphic indentation lines.
  -S            Print with CP437 (console) graphics indentation lines.
  -n            Turn colorization off always (-C overrides).
  -C            Turn colorization on always.
  ------- XML/HTML/JSON options -------
  -X            Prints out an XML representation of the tree.
  -J            Prints out an JSON representation of the tree.
  -H baseHREF   Prints out HTML format with baseHREF as top directory.
  -T string     Replace the default HTML title and H1 header with string.
  --nolinks     Turn off hyperlinks in HTML output.
  ------- Input options -------
  --fromfile    Reads paths from files (.=stdin)
  ------- Miscellaneous options -------
  --version     Print version and exit.
  --help        Print usage and this help message and exit.
  --            Options processing terminator.
Comment 3 Nikolay A. Fetisov 2021-05-18 12:33:58 MSK
Текущий вариант не совместим с 1.8 по ключам, и используется в системных скриптах.

В Sisyphus tree 1.8 уже есть - см. пакет dirtree.
Comment 4 rits 2021-05-19 09:17:47 MSK
Утилита tree в debian, в AltLinux именуется, как dirtree. А tree в AltLinux совсем другая утилита. Это просто нужно знать.
Единственное улучшение, которое целесообразно - это обновить утилиту dirtree с версии 1.7.0 до версии 1.8.0
Comment 5 Nikolay A. Fetisov 2021-05-19 10:14:22 MSK
(Ответ для rabochyITs на комментарий #4)
> Единственное улучшение, которое целесообразно - это обновить утилиту dirtree
> с версии 1.7.0 до версии 1.8.0

В Sisyphus - 1.8.0 с 27.06.2020 г.
1.7.0 - в p9, если нужно - можно собрать по тегу 1.8.0-alt1.
Comment 6 Vitaly Chikunov 2022-02-28 12:56:12 MSK
Предлагаю перейти на обновлённый пакет tree - аналогично другим дистрибутивам. Апстрим тот-же что у dirtree, версия 2.0.2, название бинарника tree (а не dirtree, так что тут возожна обратная несовместимость). @naf, если хотите я могу добавить вас в acl.
Comment 7 Nikolay A. Fetisov 2022-02-28 13:43:51 MSK
(Ответ для Vitaly Chikunov на комментарий #6)
> Предлагаю перейти на обновлённый пакет tree - ...

Имеющийся у нас tree - свой собственный, и к 
http://mama.indstate.edu/users/ice/tree/ отношения не имеет
(и - доступа из РФ к mama.indstate.edu нет, и раньше тоже не было).
Они не совместимы по ряду ключей, увы.


> ...  тут возожна обратная несовместимость.

Скорее, не просто возможна - а будет.
Надо проверять, где используется /usr/bin/tree - насколько помню, как 
миниимум он встречался в initscripts.
Comment 8 Vitaly Chikunov 2022-02-28 13:50:52 MSK
Зависимостей на tree у других пакетов нет. В initscripts-compat-fedora он не используется (не на-grep'ался). Старый (наш) tree был с major багами (tree -Td), так что я поменял апстрим и обновил. Как я понимаю, в Федоре давно сделали то же самое (судя по тексту в их spec).
Comment 9 Vitaly Chikunov 2022-02-28 13:54:08 MSK
Вот в Федоре
  https://src.fedoraproject.org/rpms/tree/blob/f35/f/tree.spec
в %description написано
  The tree utility recursively displays the contents of directories in a
  tree-like format.  Tree is basically a UNIX port of the DOS tree
  utility.
Это описание нашего старого tree. При э\том у них давно апстрим indstate.edu.