From 646ac0258c3295943778142468aadfe5b04ad6d1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 3 Aug 2018 00:25:24 -0400 Subject: libremakepkg,chcleanup: Be stricter about network access Objectives: - Once the source package has been created, never run makepkg with networking enabled again, so that we can be 100% sure that the source package has all of the sources that we need. - Don't let makepkg edit the PKGBUILD (eg. by evaluating pkgver()) User-facing changes: - libremakepkg now disables networking during prepare() - libremakepkg no longer runs pkgver() - chcleanup (and thus `librechroot clean-pkgs`) now also installs packages Technical description of changes: - In devtools (and not really in this commit): * No longer split /chrootprepare off of /chrootbuild. The point of splitting it was that we'd have prepare() run from /chrootprepare and the rest later run from /chrootbuild, so that we could leave networking enabled during prepare() but not the rest. Now that we're disabling networking during prepare(), that's pointless. * Have download_sources create a source package (rather than having /chrootbuild create the source package at the same time that we create the binary package). We adjust the caller to temporarily set SRCPKGDEST to a temporary directory, so that we can get the file and control the filename when we move it in to the real SRCPKGDEST. - Have chcleanup install the dependencies. If we used the traditional `makepkg --sync` to install the dependencies, then we'd be breaking the "no networking for makepkg after source package creation" objective. chcleanup already has all of the logic necessary to accomplish this. If there's a discrepancy in chcleanup behavior and makepkg behavior, and makepkg thinks it needs to install something, then that just means we'll have to fix the bug in chcleanup, instead of letting it go for more than a year (*cough* https://labs.parabola.nu/issues/1311 *cough*). - Use files extracted from the source package (rather than files found in the current directory) to build the package. - We mount the temporary directory containing the extracted source package files read-only, to be sure that makepkg doesn't modify the PKGBUILD. This is necessary because --holdver only disables pkgver() if it's a VCS package. --- po/es/librelib.po | 2 +- po/es/libretools.po | 181 +++++++++++++++++++++++++++++----------------------- 2 files changed, 102 insertions(+), 81 deletions(-) (limited to 'po') diff --git a/po/es/librelib.po b/po/es/librelib.po index 5c937a4..168d432 100644 --- a/po/es/librelib.po +++ b/po/es/librelib.po @@ -144,7 +144,7 @@ msgstr "hecho" msgid "Aborting..." msgstr "Abortando..." -#: src/lib/common.sh:222 src/lib/common.sh:279 +#: src/lib/common.sh:222 src/lib/common.sh:282 msgid "Multiple packages found:" msgstr "Múltiples paquetes encontrados:" diff --git a/po/es/libretools.po b/po/es/libretools.po index 50a9aa3..728c674 100644 --- a/po/es/libretools.po +++ b/po/es/libretools.po @@ -149,7 +149,7 @@ msgstr "En el modo de comparación (si se da el indicador `-n`), de forma " "imprimirá la línea `[REPO]`." #: src/abslibre-tools/libredbdiff:157 src/abslibre-tools/librerelease:128 -#: src/chroot-tools/librechroot:253 src/chroot-tools/libremakepkg:162 +#: src/chroot-tools/librechroot:253 src/chroot-tools/libremakepkg:170 #: src/devtools/find-libdeps:36 src/librefetch/librefetch:80 #: src/pkgbuild-check-nonfree:51 src/pkgbuild-summarize-nonfree:39 #: src/toru/toru-path:46 @@ -161,7 +161,7 @@ msgid "Don't update anything, just compare already downloaded files." msgstr "No actualice nada, simplemente compare archivos ya descargados." #: src/abslibre-tools/libredbdiff:159 src/abslibre-tools/librerelease:134 -#: src/chroot-tools/librechroot:282 src/chroot-tools/libremakepkg:174 +#: src/chroot-tools/librechroot:283 src/chroot-tools/libremakepkg:182 #: src/devtools/find-libdeps:39 src/librefetch/librefetch:92 #: src/pkgbuild-check-nonfree:58 src/pkgbuild-summarize-nonfree:41 #: src/toru/toru-path:51 @@ -520,14 +520,22 @@ msgstr "Creando una lista completa de paquetes..." msgid "Could not create a full list of packages, exiting." msgstr "No se pudo crear una lista completa de paquetes, saliendo." -#: src/chroot-tools/chcleanup:118 +#: src/chroot-tools/chcleanup:117 msgid "No packages to remove" msgstr "No hay paquetes para remover" -#: src/chroot-tools/chcleanup:120 +#: src/chroot-tools/chcleanup:119 msgid "Removing %d packages" msgstr "Removiendo %d paquetes" +#: src/chroot-tools/chcleanup:132 +msgid "No packages to add" +msgstr "" + +#: src/chroot-tools/chcleanup:134 +msgid "Adding %d packages" +msgstr "" + #: src/chroot-tools/distcc-tool:38 msgid "panic: malformed call to internal function" msgstr "pánico: llamada malformada a la función interna" @@ -731,15 +739,15 @@ msgstr "Crear una copia, eliminar una copia o sincronizar una copia puede " "ser bastante lento; pero son muy rápidos si $CHROOTDIR está en una " "partición btrfs." -#: src/chroot-tools/librechroot:254 src/chroot-tools/libremakepkg:164 +#: src/chroot-tools/librechroot:254 src/chroot-tools/libremakepkg:172 msgid "CHROOT" msgstr "CHROOT" -#: src/chroot-tools/librechroot:254 src/chroot-tools/libremakepkg:164 +#: src/chroot-tools/librechroot:254 src/chroot-tools/libremakepkg:172 msgid "Name of the chroot to use" msgstr "Nombre del chroot a usar" -#: src/chroot-tools/librechroot:255 src/chroot-tools/libremakepkg:165 +#: src/chroot-tools/librechroot:255 src/chroot-tools/libremakepkg:173 msgid "COPY" msgstr "COPIA" @@ -774,16 +782,16 @@ msgid "Set the architecture of the copy; simply an alias for the `-C` and `-" msgstr "Establecer la arquitectura de la copia; simplemente un alias para " "las opciones `-C` y` -M`, vea arriba." -#: src/chroot-tools/librechroot:261 src/chroot-tools/libremakepkg:166 +#: src/chroot-tools/librechroot:261 src/chroot-tools/libremakepkg:174 msgid "Bind mount a file or directory, read/write" msgstr "Enlazar un archivo o directorio, lectura/escritura" #: src/chroot-tools/librechroot:261 src/chroot-tools/librechroot:262 -#: src/chroot-tools/libremakepkg:166 src/chroot-tools/libremakepkg:167 +#: src/chroot-tools/libremakepkg:174 src/chroot-tools/libremakepkg:175 msgid "PATH[:PATH]" msgstr "RUTA[:RUTA]" -#: src/chroot-tools/librechroot:262 src/chroot-tools/libremakepkg:167 +#: src/chroot-tools/librechroot:262 src/chroot-tools/libremakepkg:175 msgid "Bind mount a file or directory, read-only" msgstr "Enlazar-montar un archivo o directorio, de solo lectura" @@ -829,92 +837,97 @@ msgid "Like `pacman -Syu`" msgstr "Como `pacman -Syu`" #: src/chroot-tools/librechroot:274 -msgid "Remove all packages from the chroot copy that are not in base-devel, " - "$CHROOTEXTRAPKG, or named as a dependency in the file `/startdir/" - "PKGBUILD` in the chroot copy" -msgstr "Eliminar todos los paquetes de la copia chroot que no están en base-" - "devel, $CHROOTEXTRAPKG, o nombrado como una dependencia en el " - "archivo`/startdir/PKGBUILD` en la copia chroot" - -#: src/chroot-tools/librechroot:278 +#, fuzzy +#| msgid "Remove all packages from the chroot copy that are not in " +#| "base-devel, $CHROOTEXTRAPKG, or named as a dependency in the file `/" +#| "startdir/PKGBUILD` in the chroot copy" +msgid "Remove all packages from the chroot copy that are not in " + "base-devel, $CHROOTEXTRAPKG, or named as a dependency in the file `/" + "startdir/PKGBUILD` in the chroot copy; and install all packages that " + "are." +msgstr "Eliminar todos los paquetes de la copia chroot que no están " + "en base-devel, $CHROOTEXTRAPKG, o nombrado como una dependencia en " + "el archivo`/startdir/PKGBUILD` en la copia chroot" + +#: src/chroot-tools/librechroot:279 msgid " Other:" msgstr " Otro:" -#: src/chroot-tools/librechroot:279 +#: src/chroot-tools/librechroot:280 msgid "CMD..." msgstr "CMD..." -#: src/chroot-tools/librechroot:279 +#: src/chroot-tools/librechroot:280 msgid "Run CMD in the chroot copy" msgstr "Ejecuta CMD en la copia de chroot" -#: src/chroot-tools/librechroot:280 +#: src/chroot-tools/librechroot:281 msgid "Enter an interactive shell in the chroot copy" msgstr "Entrar a un shell interactivo en la copia de chroot" -#: src/chroot-tools/librechroot:281 +#: src/chroot-tools/librechroot:282 msgid "Clean /repo in the chroot copy" msgstr "Limpiar /repo en la copia del chroot" -#: src/chroot-tools/librechroot:307 +#: src/chroot-tools/librechroot:308 msgid "Unsupported architecture: %s" msgstr "Arquitectura no admitida: %s" -#: src/chroot-tools/librechroot:325 +#: src/chroot-tools/librechroot:326 msgid "Must specify a command" msgstr "Debe especificar un comando" -#: src/chroot-tools/librechroot:331 +#: src/chroot-tools/librechroot:332 msgid "Unrecognized command: %s" msgstr "Comando no reconocido: %s" -#: src/chroot-tools/librechroot:339 +#: src/chroot-tools/librechroot:340 msgid "Command `%s` does not take any arguments: %s" msgstr "El comando `%s` no toma ningún argumento: %s" -#: src/chroot-tools/librechroot:346 +#: src/chroot-tools/librechroot:347 msgid "Command `%s` requires at least one file" msgstr "El comando `%s` requiere al menos un archivo" -#: src/chroot-tools/librechroot:358 +#: src/chroot-tools/librechroot:359 msgid "%s: file(s) not found: %s" msgstr "%s: archivo(s) no encontrado(s): %s" -#: src/chroot-tools/librechroot:365 +#: src/chroot-tools/librechroot:366 msgid "Command `%s` requires at least one package name" msgstr "El comando `%s` requiere al menos un nombre de un paquete" -#: src/chroot-tools/librechroot:372 +#: src/chroot-tools/librechroot:373 msgid "Command `%s` requires at least one argument" msgstr "El comando `%s` requiere al menos un argumento" -#: src/chroot-tools/librechroot:395 +#: src/chroot-tools/librechroot:396 msgid "This program must be run as root." msgstr "Este programa debe ser ejecutado como root." -#: src/chroot-tools/librechroot:403 +#: src/chroot-tools/librechroot:404 msgid "Input is not a TTY" msgstr "La entrada no es un TTY" -#: src/chroot-tools/librechroot:406 +#: src/chroot-tools/librechroot:407 msgid "Due to a bug in systemd-nspawn, redirecting stdin is not supported." msgstr "Debido a un error en systemd-nspawn, el redireccionamiento de stdin " "no está soportado." -#: src/chroot-tools/librechroot:414 src/chroot-tools/libremakepkg:268 +#: src/chroot-tools/librechroot:415 src/chroot-tools/libremakepkg:274 msgid "Waiting for existing lock on chroot copy to be released: [%s]" msgstr "Esperando que el bloqueo existente en la copia de chroot sea " "liberado: [%s]" -#: src/chroot-tools/librechroot:418 +#: src/chroot-tools/librechroot:419 msgid "Chroot copy is mounted with nosuid or noexec options: [%s]" msgstr "La copia del chroot se monta con opciones nosuid o noexec: [%s]" -#: src/chroot-tools/librechroot:423 +#: src/chroot-tools/librechroot:424 msgid "Creating 'root' copy for chroot [%s]" msgstr "Creando copia 'root' para el chroot [%s]" -#: src/chroot-tools/librechroot:429 +#: src/chroot-tools/librechroot:430 msgid "Syncing copy [%s] with root copy" msgstr "Sincronizando copia [%s] con la copia root" @@ -926,58 +939,58 @@ msgstr "Copiando archivos de registro y del paquete fuera del chroot..." msgid "Failure(s) in %s: %s" msgstr "Falla(s) en %s: %s" -#: src/chroot-tools/libremakepkg:137 +#: src/chroot-tools/libremakepkg:145 msgid "Usage: %s [options]" msgstr "Uso: %s [opciones]" -#: src/chroot-tools/libremakepkg:138 +#: src/chroot-tools/libremakepkg:146 msgid "This program will build your package." msgstr "Este programa compilará su paquete." -#: src/chroot-tools/libremakepkg:140 +#: src/chroot-tools/libremakepkg:148 msgid "If run from outside of a chroot, this command will make the " "following configuration changes in the chroot:" msgstr "Si se ejecuta desde fuera de un chroot, este comando hará los " "siguientes cambios de configuración en el chroot:" -#: src/chroot-tools/libremakepkg:142 +#: src/chroot-tools/libremakepkg:150 msgid "whatever changes `librechroot` makes." msgstr "cualquier cambio que `librechroot` haga." -#: src/chroot-tools/libremakepkg:143 +#: src/chroot-tools/libremakepkg:151 msgid "set `{PKG,SRC,SRCPKG,LOG}DEST` in `/etc/makepkg.conf`" msgstr "establece `{PKG,SRC,SRCPKG,LOG}DEST` en `/etc/makepkg.conf`" -#: src/chroot-tools/libremakepkg:144 +#: src/chroot-tools/libremakepkg:152 msgid "set `MAKEFLAGS` and `PACKAGER` in `/etc/makepkg.conf` to reflect the " "value outside of the chroot." msgstr "establece `MAKEFLAGS` y `PACKAGER` en `/etc/makepkg.conf` para " "reflejar el valor fuera del chroot." -#: src/chroot-tools/libremakepkg:146 +#: src/chroot-tools/libremakepkg:154 msgid "create a `builduser` with the same numeric UID as the invoking " "$SUDO_USER." msgstr "crear un `builduser` con el mismo UID numérico que el invocado " "$SUDO_USER." -#: src/chroot-tools/libremakepkg:148 +#: src/chroot-tools/libremakepkg:156 msgid "let this `builduser` call `sudo pacman` without a password." msgstr "dejar que este `builduser` llame a `sudo pacman` sin una contraseña." -#: src/chroot-tools/libremakepkg:149 +#: src/chroot-tools/libremakepkg:157 msgid "set `keyserver-options` in `~builduser/.gnupg/gpg.conf`" msgstr "establecer `keyserver-options` en `~builduser/.gnupg/gpg.conf`" -#: src/chroot-tools/libremakepkg:150 +#: src/chroot-tools/libremakepkg:158 msgid "copy the user's GnuPG pubring to be the `builduser`'s pubring" msgstr "copiar el pubring de GnuPG del usuario para que sea el pubring de " "`builduser`" -#: src/chroot-tools/libremakepkg:151 +#: src/chroot-tools/libremakepkg:159 msgid "add a pacman repositoriy of locally built packages" msgstr "agrega un repositorio pacman de los paquetes compilados localmente" -#: src/chroot-tools/libremakepkg:153 +#: src/chroot-tools/libremakepkg:161 msgid "This command is configured both with `chroot.conf` (either in `/etc/" "libretools.d/` or `$XDG_CONFIG_HOME/libretools/`), and with makepkg." "conf(5). However, similarly to makepkg(8), it lets environment " @@ -989,70 +1002,78 @@ msgstr "Este comando está configurado con `chroot.conf` (ya sea en `/etc/" "variables de entorno para {SRC,SRCPKG,PKG,LOG}DEST, MAKEFLAGS y " "PACKAGER sobreescriban la configuración en makepkg.conf(5)." -#: src/chroot-tools/libremakepkg:159 +#: src/chroot-tools/libremakepkg:167 msgid "The `-n` and `-l` options behave identically to librechroot, see the " "documentation there." msgstr "Las opciones `-n` y `-l` se comportan idénticamente a librechroot, " "vea la documentación allí." -#: src/chroot-tools/libremakepkg:163 src/chroot-tools/libremakepkg:168 +#: src/chroot-tools/libremakepkg:171 src/chroot-tools/libremakepkg:176 msgid " %s options:" msgstr "Opciones de %s:" -#: src/chroot-tools/libremakepkg:165 +#: src/chroot-tools/libremakepkg:173 msgid "Name of, or absolute path to, the chroot copy to use" msgstr "Nombre del, o ruta absoluta, de la copia del chroot a usar" -#: src/chroot-tools/libremakepkg:169 -msgid "Don't disable networking during build() and package(). PLEASE don't " - "use this unless you have a special reason, its use is a violation of " - "Parabola policy." -msgstr "No deshabilita la conexión a internet durante build() y package(). " - "POR FAVOR no use esta opción al menos que tenga una razón en " - "especial, su uso es una violación a la política de Parabola." - -#: src/chroot-tools/libremakepkg:173 +#: src/chroot-tools/libremakepkg:177 +#, fuzzy +#| msgid "Don't disable networking during build() and package(). " +#| "PLEASE don't use this unless you have a special reason, its use is a " +#| "violation of Parabola policy." +msgid "Don't disable networking during prepare(), build(), and " + "package(). PLEASE don't use this unless you have a special reason, " + "its use is a violation of Parabola policy." +msgstr "No deshabilita la conexión a internet durante build() y " + "package(). POR FAVOR no use esta opción al menos que tenga una razón " + "en especial, su uso es una violación a la política de Parabola." + +#: src/chroot-tools/libremakepkg:181 msgid "Repackage contents of the package without rebuilding" msgstr "Reempaqueta los contenidos del paquete sin recompilar" -#: src/chroot-tools/libremakepkg:180 +#: src/chroot-tools/libremakepkg:188 msgid "The -%s flag does not make sense inside of a chroot" msgstr "La opción -%s no tiene sentido dentro de un chroot" -#: src/chroot-tools/libremakepkg:208 +#: src/chroot-tools/libremakepkg:216 msgid "Extra arguments: %s" msgstr "Argumentos extras: %s" -#: src/chroot-tools/libremakepkg:240 +#: src/chroot-tools/libremakepkg:248 msgid "This program must be run as root" msgstr "Este programa debe ejecutarse como root" -#: src/chroot-tools/libremakepkg:246 +#: src/chroot-tools/libremakepkg:254 msgid "PKGBUILD does not exist." msgstr "El PKGBUILD no existe." -#: src/chroot-tools/libremakepkg:257 +#: src/chroot-tools/libremakepkg:265 msgid "Waiting for existing lock on build directory to be released" msgstr "Esperando a que se libere el bloqueo existente en el directorio de " "compilación" -#: src/chroot-tools/libremakepkg:270 +#: src/chroot-tools/libremakepkg:276 msgid "Initializing the chroot..." msgstr "Iniciando el chroot..." -#: src/chroot-tools/libremakepkg:280 +#: src/chroot-tools/libremakepkg:286 msgid "Starting pre-build activities..." msgstr "Iniciando actividades previas a la compilación..." -#: src/chroot-tools/libremakepkg:282 +#: src/chroot-tools/libremakepkg:289 msgid "Downloading sources..." msgstr "Descargando las fuentes..." -#: src/chroot-tools/libremakepkg:286 +#: src/chroot-tools/libremakepkg:297 +msgid "Something went funny with makepkg --allsource" +msgstr "" + +#: src/chroot-tools/libremakepkg:316 msgid "Starting to build the package..." msgstr "Comenzando a compilar el paquete..." -#: src/chroot-tools/libremakepkg:291 +#: src/chroot-tools/libremakepkg:321 msgid "Starting post-build activities..." msgstr "Iniciando actividades posteriores a la compilación..." @@ -1084,41 +1105,41 @@ msgstr "No se puede crear el subvolumen %s" msgid "Removing chroot copy [%s]" msgstr "Eliminando copia del chroot [%s]" -#: src/chroot-tools/makechrootpkg.sh:302 +#: src/chroot-tools/makechrootpkg.sh:276 msgid "Could not download sources." msgstr "No se pudo descargar las fuentes." -#: src/chroot-tools/makechrootpkg.sh:385 +#: src/chroot-tools/makechrootpkg.sh:359 msgid "This must be run in a directory containing a PKGBUILD." msgstr "Esto debe ser ejecutado en un directorio con un PKGBUILD." -#: src/chroot-tools/makechrootpkg.sh:386 +#: src/chroot-tools/makechrootpkg.sh:360 msgid "Invalid makepkg user." msgstr "Usuario makepkg inválido." -#: src/chroot-tools/makechrootpkg.sh:393 +#: src/chroot-tools/makechrootpkg.sh:367 msgid "No chroot dir defined, or invalid path '%s'" msgstr "Directorio del chroot no definido, o ruta inválida '%s'" -#: src/chroot-tools/makechrootpkg.sh:394 +#: src/chroot-tools/makechrootpkg.sh:368 msgid "Missing chroot dir root directory. Try using: mkarchroot %s/root " "base-devel" msgstr "Directorio del choot de root no encontrado. Intente usando: " "mkarchroot %s/root base-devel" -#: src/chroot-tools/makechrootpkg.sh:433 +#: src/chroot-tools/makechrootpkg.sh:407 msgid "Locking chroot copy [%s]" msgstr "Bloqueando copia del chroot [%s]" -#: src/chroot-tools/makechrootpkg.sh:451 +#: src/chroot-tools/makechrootpkg.sh:425 msgid "Running makepkg as root is not allowed." msgstr "Ejecutar makepkg como root no está permitido." -#: src/chroot-tools/makechrootpkg.sh:479 +#: src/chroot-tools/makechrootpkg.sh:448 msgid "Build failed" msgstr "Compilación fallida" -#: src/chroot-tools/makechrootpkg.sh:481 +#: src/chroot-tools/makechrootpkg.sh:450 msgid "Build failed, check %s/build" msgstr "Compilación fallida, revise %s/build" -- cgit v1.2.2