Toybox

Implementación de utilidades de Unix bajo licencia BSD BB

Toybox es una implementación de software libre y de código abierto de algunas utilidades de línea de comandos de Unix para dispositivos integrados. Estos incluyen ls, cp, mv y unos 150 más. El proyecto Toybox se inició en 2006,[1]​ y se convirtió en una alternativa de BusyBox con licencia BSD.[2][3]​ Toybox se incluye con Android 6.0 "Marshmallow"[4]​ y todas las versiones posteriores de Android (es decir, en todas las versiones de Android compatibles actualmente), y también está disponible para la instalación en otros sistemas operativos.

Toybox
Información general
Tipo de programa utilidad
Desarrollador Robert Landley
Licencia Licencia BSD de dominio público
Información técnica
Programado en C
Versiones
Última versión estable 0.8.119 de abril de 2024
Enlaces

Funcionalidad y objetivos editar

Toybox tiene como objetivo proporcionar un reemplazo con licencia BSD para la BusyBox con licencia GPL.[5]​ Los principales objetivos técnicos de diseño de Toybox son la simplicidad, la pequeñez, la velocidad y el cumplimiento de los estándares.[6]​ Toybox es compatible con POSIX-2008 y LSB 4.1,[1]​ y no se enfoca en tener todas las opciones encontradas en las contrapartes de GNU.

Toybox se publica bajo la licencia BSD permisiva, mientras que BusyBox usa la licencia pública general GNU, que conduce a diferentes dominios de uso. Busybox se usa principalmente en el dominio FOSS con copyleft, mientras que Toybox se usa principalmente con proyectos con licencia permisiva y por compañías comerciales, por ejemplo Android de Google,[7]​ que es un objetivo explícito de Toybox.[8]​ En cuanto a las características, Toybox no ha alcanzado la paridad con Busybox. A partir de la versión 0.7.7, Toybox ofrece sólo un subconjunto de la funcionalidad de Busybox.[9]

Historia editar

A principios de 2006, el proyecto Toybox fue iniciado por Rob Landley[1][3]​ después de que terminó su mantenimiento de BusyBox debido a una disputa con Bruce Perens, el creador original de BusyBox.[10]​ En 2008 el proyecto quedó inactivo.[2]​ A fines de 2011, Tim Bird, un empleado de Sony, sugirió crear una alternativa a BusyBox que no estaría bajo la Licencia Pública General de GNU.[5]​ Rob Landley siguió la solicitud y sugirió, en cambio, basar esta biblioteca en el Toybox inactivo. El código del proyecto Toybox fue relicenciado desde la Licencia Pública General de GNU a la Licencia BSD de 2 cláusulas,[11][12]​ y retomó el desarrollo de Toybox. En marzo de 2013, el proyecto recibió una licencia BSD con una cláusula 0 aún más permisiva, una variante de licencia equivalente de dominio público.[13]

A fines de 2014, Toybox se integró en las ramas de desarrollo "Marshmallow" de Android 6.0.x.[4][7][14]

Controversia editar

En enero de 2012, la propuesta de crear una alternativa al proyecto BusyBox con licencia BSD provocó duras críticas de Matthew Garrett por quitar la única herramienta relevante para hacer cumplir los derechos de autor del grupo Software Freedom Conservancy.[15]​ Rob Landley, quien había iniciado las demandas basadas en BusyBox, respondió que esto era intencional, explicando que las demandas no habían beneficiado al proyecto, pero que habían llevado a la evasión corporativa, expresando el deseo de detener las demandas "en la forma que considere más adecuada".[16][17][18]

Progreso del proyecto editar

La documentación oficial de Toybox muestra una descripción general de los comandos disponibles, parcialmente disponibles y faltantes. Según la hoja de ruta a la versión 1.0, aprox. El 50% de los objetivos de implementación del proyecto se lograron en 2015.[19][20][21]

Lista de comandos de Toybox
  • acpi — shows battery status and other ACPI information
  • ascii — report character aliases
  • base64 — encoder and decoder for base64
  • basename — return non-directory portion of a pathname
  • bunzip2 — block-sorting file compressor
  • blkid — command-line utility to locate/print block device attributes
  • blockdev — call block device ioctls from the command line
  • bzcat — decompresses files to stdout
  • cal — prints a calendar of the given month or year
  • cat — Copy file content to stdout
  • chgrp — Change group
  • chmod — Change file modes
  • chown — Change owner
  • chroot — Changes the apparent root directory
  • chrt — manipulate the real-time attributes of a process
  • cksum — Write file checksums and sizes
  • clear
  • cmp — Compare two files
  • comm — Select or reject lines common to two files
  • count — Count the number of elements of an array
  • cp — Copy
  • cpio — Copy files to and from archives
  • cut — Cut out selected fields of each line of a file
  • date — Display system date/time
  • df — Report free disk space
  • dirname — Return the directory portion of a pathname
  • dmesg — Display message or driver message
  • du — Estimate file space usage
  • echo
  • eject
  • env
  • expand — Convert tabs to spaces
  • factor
  • fallocate
  • false — Return false value
  • fgrep — Search a file with a fixed pattern
  • find — Command-line utility that searches through one or more directory trees
  • ftpget — Use File Transfer Protocol (FTP) to get a file from an FTP server
  • ftpput — Use File Transfer Protocol (FTP) to put a file from an FTP server
  • egrep
  • grep — Search for PATTERN in each FILE or standard input
  • groups — Display a group
  • gzip — File compression
  • head — Copy the first part of files
  • help — Command help lists all commands
  • hostname — Show or set the system's host name
  • id — Prints the user or group identifier
  • install
  • ifconfig — System administration utility for network interface configuration.
  • ln — Create a link named LINK_NAME or DIRECTORY to the specified TARGET.
  • kill — Send signals to running processes in order to request the termination of the process
  • killall — kill processes by name
  • link — call link function
  • login
  • logname — Return the user's login name
  • losetup
  • lspci — Prints detailed information about all PCI buses and devices
  • md5sum — Generate or check MD5 message digests
  • ls — List of files or folders
  • mkdir — Create a folder
  • mkfifo — Make FIFO special files
  • mknod — Make special files
  • microcom — A minimalistic terminal program
  • mount — Mount a file system
  • mountpoint
  • mv — move file
  • nbd-client
  • nc — Arbitrary TCP and UDP connections and listens
  • netcat
  • nice — Invoke a utility with an altered nice value
  • nl — line numbering filter
  • nohup — Invoke a utility immune to hangups
  • od — dump files in various formats
  • oneit
  • partprobe
  • passwd — Change user password
  • paste — Merge corresponding or subsequent lines of files
  • patch — Apply changes to files
  • pidof — Find the process ID of a running program
  • pmap — Report memory map of a process
  • pwd — Print working directory name
  • pwdx — Report current working directory of a process
  • readahead
  • readlink
  • realpath
  • renice — set nice values of running processes
  • rev — reverse lines of a file or files
  • rfkill
  • rm — Remove directory entries
  • rmdir — Remove directories
  • seq — Generate a sequence of numbers
  • setsid — Run a program in a new session
  • sha1sum — Compute and check SHA1 message digest
  • sleep — Suspend execution for an interval
  • sort — Sort, merge, or sequence check text files
  • split — Split files into pieces
  • stat — Display file or file system status
  • strings — Print the strings of printable characters in files.
  • stty — Print or change terminal characteristics.
  • su — Change user ID
  • swapon
  • swapoff
  • switch root
  • sync — Flush file system buffers
  • tac — Concatenate and print files in reverse
  • tail — Copy the last part of a file
  • taskset — Retrieve or set a process's CPU affinity
  • tee — Duplicate standard input
  • time — time a simple command
  • timeout — Run a command with a time limit
  • touch — change file access and modification times
  • true — Return true value
  • truncate — shrink or extend the size of a file to the specified size
  • tty — Return user's terminal name
  • umount
  • uname
  • uniq — report or filter out repeated lines in a file
  • unix2dosUNIX to DOS text file format converter
  • unlink
  • unshare
  • usleep — sleep some number of microseconds
  • uuencode — Encode a binary file
  • uudecode — Decode a binary file
  • vconfig
  • w — Shows who is logged on and what they are doing.
  • wc — Word, line, and byte or character count
  • which — Shows the full path of (shell) commands
  • who — Display who is on the system
  • whoami — Print effective userid
  • xargs — Construct argument lists and invoke utility
  • yes — to print a string repetitively

Véase también editar

Referencias editar

  1. a b c Landley, Robert. «What is ToyBox?». Toybox project website. Consultado el 13 de julio de 2012. 
  2. a b Dj Walker-Morgan. «Inside the ToyBox: An interview with Rob Landley». Consultado el 13 de julio de 2012. 
  3. a b Varghese, Sam (1 de febrero de 2012). «BusyBox replacement project fuels animated verbal spat». IT Wire. Archivado desde el original el 28 de septiembre de 2019. Consultado el 12 de mayo de 2013. 
  4. a b Android gets a toybox on lwn.net by Jake Edge (January 14, 2015)
  5. a b «Busybox replacement project». 11 de enero de 2012. Consultado el 4 de marzo de 2014. 
  6. Landley, Robert. «Design Docs». Toybox project website. Consultado el 18 de febrero de 2015. «Toybox combines the most common Linux command line utilities together into a single BSD-licensed executable. It's simple, small, fast, and reasonably standards-compliant (POSIX-2008 and LSB 4.1).». 
  7. a b toybox on android.googlesource.com (2014-12-28)
  8. celf-2015.txt by Rob Landley (2015)
  9. Landley, Robert. «Status of toybox 0.7.7». Toybox project website. Consultado el 13 de octubre de 2018. 
  10. . 
  11. Toybox relaunch on toybox.landley.narkive.com (2011-11-20)
  12. Switch to 2-clause BSD license (with caveat about scripts directory). 0.2.0 by landley on 15 Nov 2011
  13. Simplify license text, as mentioned on the mailing list. by Landley (14 Mar 2013)
  14. Issue 76861: Importing parts of Toybox into Android, including dos2unix, unix2dos, sort, uniq, and usleep
  15. «Garrett: The ongoing fight against GPL enforcement». LWN.net. 31 de enero de 2012. Consultado el 4 de marzo de 2014. «The real problem here is that the [Software Freedom Conservancy's] reliance on Busybox means that they're only able to target infringers who use that Busybox code. No significant kernel copyright holders have so far offered to allow the SFC to enforce their copyrights, with the result that enforcement action will grind to a halt as vendors move over to this Busybox replacement.». 
  16. «Garrett: The ongoing fight against GPL enforcement». LWN.net. 31 de enero de 2012. Consultado el 4 de marzo de 2014. «>As the ex-maintainer of busybox who STARTED those lawsuits in the first place and now HUGELY REGRETS ever having done so, I think I'm entitled to stop the lawsuits in whatever way I see fit. They never resulted in a single line of code added to the busybox repository. They HAVE resulted in more than one company exiting Linux development entirely and switching to non-Linux operating systems for their embedded products, and they're a big part of the reason behind Android's "No GPL in userspace" policy.». 
  17. Proffitt, Brian (2 de febrero de 2012). «GPL enforcement sparks community flames - Throwing the GPL baby out with the enforcement bath water?». ITworld. Consultado el 4 de marzo de 2015. 
  18. Landley, Rob. «Embedded Linux Conference 2013 - Toybox: Writing a New Command Line» (video). The Linux Foundation. Consultado el 24 de junio de 2016. 
  19. Toybox Help
  20. «How are we doing on implementing stuff so far?». Consultado el 17 de marzo de 2015. 
  21. Toybox Todo List

Enlaces externos editar