summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile14
-rw-r--r--HACKING/chroot-tools.md3
-rw-r--r--HACKING/librefetch.md25
-rw-r--r--HACKING/libs.md15
-rw-r--r--HACKING/licensing.md8
-rw-r--r--HACKING/mksource.md92
-rw-r--r--HACKING/testing.md23
-rw-r--r--HACKING/translations.md108
-rw-r--r--INSTALL119
-rw-r--r--INSTALL-VCS71
-rw-r--r--Makefile4
-rw-r--r--build-aux/Makefile.each.head/20-libretools.mk2
-rw-r--r--build-aux/Makefile.each.tail/20-libretools.mk17
-rw-r--r--config.mk4
-rw-r--r--po/HACKING50
l---------po/HACKING.md1
-rw-r--r--po/es/gitget.po30
-rw-r--r--po/es/librelib.po68
-rw-r--r--po/es/libretools.po571
-rwxr-xr-xsrc/abslibre-tools/libredbdiff1
-rw-r--r--src/abslibre-tools/libredbdiff.conf2
-rwxr-xr-xsrc/abslibre-tools/librerelease383
-rwxr-xr-xsrc/abslibre-tools/librestage18
l---------[-rw-r--r--]src/chroot-tools/HACKING.md4
-rw-r--r--src/chroot-tools/hooks-distcc.sh10
-rwxr-xr-xsrc/chroot-tools/librechroot11
-rwxr-xr-xsrc/chroot-tools/libremakepkg23
l---------[-rw-r--r--]src/lib/HACKING.md16
-rwxr-xr-xsrc/lib/blacklist.sh33
-rw-r--r--src/lib/conf.sh.in65
-rwxr-xr-xsrc/lib/librelib25
-rw-r--r--src/lib/librelib.1.ronn6
-rw-r--r--src/lib/messages.sh50
-rw-r--r--src/lib/notifications.sh25
l---------[-rw-r--r--]src/librefetch/HACKING.md26
-rwxr-xr-xsrc/librefetch/librefetch28
-rw-r--r--src/librefetch/librefetch.8.ronn4
-rw-r--r--src/librefetch/librefetchdir/Makefile7
-rwxr-xr-xsrc/librefetch/librefetchdir/makepkg.gen14
-rw-r--r--src/libretools.conf65
-rwxr-xr-xsrc/pkgbuild-check-nonfree40
-rw-r--r--test/cases/lib-blacklist.bats12
-rw-r--r--test/cases/lib-conf.bats4
-rw-r--r--test/cases/lib-notifications.bats39
-rw-r--r--test/cases/librechroot.bats74
-rw-r--r--test/cases/librefetch.bats29
-rw-r--r--test/cases/libremakepkg.bats105
-rw-r--r--test/cases/librerelease.bats191
-rw-r--r--test/cases/librestage.bats25
-rw-r--r--test/cases/pkgbuild-check-nonfree.bats145
-rw-r--r--test/fixtures/lib-notifications/librerelease-complete-log.log6
-rw-r--r--test/fixtures/lib-notifications/librerelease-debug-pkg.log3
-rw-r--r--test/fixtures/lib-notifications/librerelease-multipkg-any.log10
-rw-r--r--test/fixtures/lib-notifications/librerelease-multipkg-multirepo-any.log11
-rw-r--r--test/fixtures/lib-notifications/librerelease-multipkg-multirepo-multiarch.log4
-rw-r--r--test/fixtures/lib-notifications/librerelease-multirepo-multiarch.log4
-rw-r--r--test/fixtures/librefetch/PKGBUILD-bz219
-rw-r--r--test/fixtures/librefetch/PKGBUILD-mksource1
-rw-r--r--test/fixtures/librefetch/PKGBUILD-split24
-rw-r--r--test/fixtures/librefetch/testpkg.install5
-rw-r--r--test/fixtures/libremakepkg/PKGBUILD-rwstartdir15
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree (renamed from test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree)0
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree-replacement (renamed from test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree-replacement)0
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-repackaged18
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nogpl18
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nonfree18
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-unknown18
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree18
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree-replacement18
-rw-r--r--test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-repackaged18
-rw-r--r--test/lib/common.bash32
-rwxr-xr-xtest/testenv32
72 files changed, 1743 insertions, 1254 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 0cdb67d..0bb8100 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -4,10 +4,22 @@
# Most of the complexity is dancing around to avoid having any
# possibly conflicting identifiers.
+# The flags that we actually want to pass to Make.
+desired_MAKEFLAGS = --no-builtin-rules
+desired_MAKEFLAGS += --no-builtin-variables
+desired_MAKEFLAGS += --warn-undefined-variables
+# Setting GNUMAKEFLAGS is important so that --no-builtin-variables
+# with --warn-undefined-variables doesn't cause Make (as of 4.4.1) to
+# print spurious warnings about it being undefined for internal use.
+desired_MAKEFLAGS += GNUMAKEFLAGS=''
+
+# Quiet this parent Make a bit.
MAKEFLAGS += --no-print-directory
+
+# Main.
rest = $(wordlist 2,$(words $1),$1)
target = $(or $(firstword $(MAKECMDGOALS)),default)
$(or $(call rest,$(MAKECMDGOALS)),_$(target)): $(target)
@:
$(target):
- @+$(MAKE) -f Makefile --no-builtin-rules --no-builtin-variables --warn-undefined-variables $(MAKECMDGOALS)
+ @$(MAKE) -f Makefile $(desired_MAKEFLAGS) $(MAKECMDGOALS)
diff --git a/HACKING/chroot-tools.md b/HACKING/chroot-tools.md
new file mode 100644
index 0000000..e50aa11
--- /dev/null
+++ b/HACKING/chroot-tools.md
@@ -0,0 +1,3 @@
+Unfortunately, `makechrootpkg.sh` is GPLv2 ONLY. This means that
+everything that uses it must be held to GPLv2+ instead of GPLv3+. I'm
+calling this anything that gets loaded into the same process as it.
diff --git a/HACKING/librefetch.md b/HACKING/librefetch.md
new file mode 100644
index 0000000..f4ac4f1
--- /dev/null
+++ b/HACKING/librefetch.md
@@ -0,0 +1,25 @@
+`librefetch` respects `SOURCE_DATE_EPOCH`[1] for reproducible builds,
+and has had this behavior from the start (though the variable name
+wasn't there from the start, that came later). But how can this be!?
+If you asked h01ger (the guy heading up reproducible builds in Debian
+and Fedora), tar needs to support `--clamp-mtime` to do this, and that
+flag wasn't in any tar implementation when librefetch came into
+existence. The flag not yet being in upstream GNU tar was for a long
+time the biggest blocker to most of upstream Debian being
+reproducible!
+
+While it is a nice flag that I'm surprised wasn't added years ago,
+it's trivial to just adjust the input files first:
+
+ find . -exec touch --no-dereference --date=DATE -- {} +`
+
+Of course, `--clamp-mtime`/`--mtime` is now in upstream GNU tar. So
+librefetch supporting this is no longer impressive. But, librefetch
+still isn't using `--mtime`. Why? Well, because it uses libarchive
+`bsdtar`, not GNU tar, and bsdtar still doesn't have the flag.
+
+I wrote this document mostly because I expect that sometime in the
+future I'll think to myself "I should simplify the code and just use
+`--mtime`", not remembering the differences between tars.
+
+[1]: https://reproducible-builds.org/specs/source-date-epoch/
diff --git a/HACKING/libs.md b/HACKING/libs.md
new file mode 100644
index 0000000..8bebaf6
--- /dev/null
+++ b/HACKING/libs.md
@@ -0,0 +1,15 @@
+Special stuff about hacking ih the /src/lib directory:
+
+ - Everything should be GPLv2 AND GPLv3 compatible. No GPLv3 only.
+ - Name a file `libre${NAME}` if it should be executable directly, or
+ `${name}.sh` if it should only be available to be sourced.
+ - When printing a message that is internal to /src/lib, and not part
+ of the programm calling the library; prefix the print command with
+ `_l`. `_l()` is defined in `common.sh` (and `librelib`, since it
+ cannot use any libraries itself).
+ - When changing the message functions, be aware that some are
+ duplicated in:
+ * /src/chroot-tools/chcleanup
+ * /src/chroot-tools/distcc-tool
+ * /src/lib/librelib
+ And that they probably need to be updated as well.
diff --git a/HACKING/licensing.md b/HACKING/licensing.md
index 6d17e31..ec83689 100644
--- a/HACKING/licensing.md
+++ b/HACKING/licensing.md
@@ -6,14 +6,12 @@ New code should (please) be licensed GPLv2+. I say v2 instead of v3
because some code from Arch is GPLv2 (no "or any later version"), and
having to worry about which programs can be combined is a huge pain.
-Copyright statements should look like
+Copyright statements for most code, should be of the form:
# Copyright (C) YEARS NAME <EMAIL>
-for most code, for 3rd-party code that has been imported, indent it a
-bit:
+For 3rd-party code, which has been imported, indent it a bit:
# Copyright (C) YEARS NAME <EMAIL>
-Always put a line with `# License:` specifying the license of that
-file.
+Always put a `# License:` line specifying the license of that file.
diff --git a/HACKING/mksource.md b/HACKING/mksource.md
new file mode 100644
index 0000000..01d759d
--- /dev/null
+++ b/HACKING/mksource.md
@@ -0,0 +1,92 @@
+This is the internal libremakepkg program flow for a PKGBUILD with mksource().
+
+<pre>
+Given:
+ * a PKGBUILD with a mksource() function and a repo.parabola.nu URL in source()
+ * /etc/makepkg.d/librefetch.conf is sourced by makepkg.conf
+ * the checksum has be generated with: `librefetch -g`, and added to mksha256sums()
+ * mk*sums() is populated with a checksum for each mksource() (use: `librefetch -g`)
+ * *sums() is populated with 'SKIP' for each source() (add it before publishing the PKGBUILD)
+
+/usr/bin/libremakepkg
+ -> msg 'Starting pre-build activities...'
+ -> msg 'Downloading sources...'
+ -> /usr/lib/libretools/chroot/makechrootpkg.sh::download_sources()
+
+/usr/lib/libretools/chroot/makechrootpkg.sh::download_sources()
+ -> /usr/bin/makepkg --allsource (w/ special ENV and in-chroot makepkg.conf)
+
+/usr/bin/makepkg --allsource ($SOURCEONLY == 2):
+ -> msg "Making package:"
+ -> /usr/share/makepkg/source.sh::download_sources('allarch')
+
+/usr/share/makepkg/source.sh::download_sources():
+ -> msg "Retrieving sources..."
+ -> (/usr/bin/librefetch is download agent)
+
+/usr/bin/librefetch::doit()
+ -> 'download' mode ($src == PKGBUILD::source() , $inmirror == true)
+ -> if found
+ -> return to /usr/bin/makepkg
+ -> if not found
+ -> 'create' mode
+ -> /tmp/<SPECIAL>/makepkg -p /tmp/<SPECIAL>/PKGBUILD
+
+/tmp/<SPECIAL>/makepkg (SOURCEONLY == 0):
+ -> msg "Making source:"
+ -> msg "Checking source dependencies..."
+ -> /tmp/<SPECIAL>/source.sh::download_sources('allarch')
+
+/tmp/<SPECIAL>/source.sh::download_sources():
+ -> msg "Retrieving sources..."
+ -> (/usr/bin/librefetch is download agent)
+
+/usr/bin/librefetch::doit()
+ -> 'download' mode ($src == PKGBUILD::mksource() , $inmirror == false)
+ -> return to /tmp/<SPECIAL>/makepkg
+
+/tmp/<SPECIAL>/makepkg (post-return from /usr/bin/librefetch):
+ -> NOTE: all standard PKGBUILD functions are stubbed out,
+ with the only purpose to run the real PKGBUILD::mksource()
+ the standard functions in the real PKGBUILD will run later in the chroot
+ -> msg "Validating source files"
+ -> msg "Extracting sources..."
+ -> msg "Starting prepare()"
+ -> msg "Starting build()"
+ -> msg "Starting mksource()"
+ -> PKGBUILD::mksource()
+ -> msg "Starting check()"
+ -> msg "Starting package()"
+ -> msg "Creating package"
+ -> msg "Finished making:"
+
+NOTE: here we rewind back to /usr/lib/libretools/chroot/makechrootpkg.sh::download_sources()
+ to get/create the source-ball signature
+
+/usr/bin/librefetch::doit()
+ -> 'download' mode
+ -> if not found
+ -> 'create' mode ($src == PKGBUILD::source() , $inmirror == true)
+ -> /usr/bin/librefetch::create_signature()
+
+/usr/bin/librefetch::create_signature()
+ -> msg "Signing package..."
+ -> /usr/share/makepkg/integrity.sh::check_source_integrity()
+ -> /usr/share/makepkg/integrity/verify_checksum.sh
+ -> msg "Validating source files"
+ -> /usr/share/makepkg/integrity/verify_signature.sh
+ -> msg "Verifying source file signatures with gpg"
+
+NOTE: here we rewind back to /tmp/<SPECIAL>/makepkg
+
+/tmp/<SPECIAL>/makepkg:
+ -> msg "Source package created:"
+ -> exit
+
+NOTE: then we rewind back to /usr/lib/libretools/chroot/makechrootpkg.sh::download_sources()
+ which returns to /usr/bin/libremakepkg
+
+/usr/bin/libremakepkg:
+ -> msg "Starting to build the package"
+ -> NOTE: build package in the normal way
+</pre>
diff --git a/HACKING/testing.md b/HACKING/testing.md
index 8dee485..3b38d40 100644
--- a/HACKING/testing.md
+++ b/HACKING/testing.md
@@ -1,18 +1,13 @@
Testing
=======
-Please write unit tests for new things. Tests can be run with `make
-check`, which just runs `./testenv roundup` in the `test/` directory.
-Relatedly, you need the `roundup` (the `sh-roundup` package on
-Parabola) tool to run the tests. `./testenv` can be given
-`--no-network` and/or `--no-sudo` to dissable tests that require those
-things. Make can be made to pass those things in by setting
-`TESTENVFLAGS`. If you don't dissable either, I *strongly* recommend
-setting TMPDIR to somewhere on a btrfs partition before running the
-tests; otherwise the chroot tests will take forever. I mean, they
+Please write unit tests for new things. Tests can be run with `make check`,
+which just runs `./testenv bats cases` in the `test/` directory. You will need
+the `bats` tool (the `bats` Parabola package) in order to run the tests. `bats`
+can be given `--filter-tags !network,!sudo,!btrfs` to disable tests which
+require those things. `make check` can be made to pass those flags in by
+setting `BATS_FLAGS`. If `!btrfs` is not given, then TMPDIR *must* be on btrfs
+partition (or else the tests that need btrfs will fail). If neither `!network`
+nor `!sudo` is given, then I *strongly* recommend setting TMPDIR to somewhere on
+a btrfs partition; otherwise the chroot tests will take forever. I mean, they
already take long on btrfs, but without it... _dang_.
-
-I also recommend having the `haveged` daemon running. That's good
-general advice, but also: some of the tests make GPG keys, this
-"should" take on the order of 1 second, but can take several minutes
-if you don't have `haveged` running.
diff --git a/HACKING/translations.md b/HACKING/translations.md
new file mode 100644
index 0000000..085a18c
--- /dev/null
+++ b/HACKING/translations.md
@@ -0,0 +1,108 @@
+Translations for programs are provided in files with the `.po` suffix. These are
+created by copying PO-template (`.pot`) files, and filling in the missing
+"msgstr" values.
+
+To add a translation, you'll first (1) need to create the `.pot` files if you
+don't already have them, and then (2) copy them and (3) fill them in.
+
+
+## 1. Create the `.pot` files
+
+If you are working from a release source tarball, you can skip this step (the
+`.pot` files are included in the tarball); if you are working from git, read on.
+
+libretools' .pot files are not tracked in git; they are created by running
+`make`. You'll need a checkout of both 'devtools-par' and 'libretools' to run
+`make` if building from git. The 'devtools-par' and 'libretools' source root
+directories should have the same parent directory.
+
+ $ git clone https://git.parabola.nu/packages/libretools.git/
+ $ git clone https://git.parabola.nu/packages/devtools-par.git/
+ $ cd libretools
+ $ make po/files.generate
+ $ cd po/
+ $ ls
+ gitget.pot
+ librelib.pot
+ libretools.pot
+
+NOTE: If you have modified the libretools source code, that may cause errors
+during translation; especially if you have modified any of the translatable
+strings. The failure will be evident by the error message:
+
+ msgcmp: found N fatal errors
+
+If you see this error, refer to the "Updating translations" section below.
+
+
+## 2. Create the `.po` Files
+
+Create a folder under `po/` with the two-letter language code[^1] you want to
+add. Then, copy the `.pot` files to that folder, changing the file extension to
+`.po`. Finally, link the `subdir.mk` file as the Makefile for that directory.
+For example:
+
+ $ mkdir es
+ $ for file in *.pot; do cp $file es/${file%t}; done
+ $ ln -s ../subdir.mk es/Makefile
+
+[^1]: See the langauge code table: <http://www.lingoes.net/en/translator/langcode.htm>
+
+
+## 3. Fill the `.po` Files
+
+From there you can open each .po file in your favorite text editor, and fill in
+the `msgstr` values with translations of the associated `msgid` keys.
+
+
+## 4. Synchronizing/Updating Translations
+
+Normally, the translations are prepared as part of the dist make target
+(the same command used to generate the release source-ball). Eg:
+
+ $ make dist
+
+However, if you have modified the libretools source code significantly or
+modified any translatable strings, it is likely that the `make` command will
+fail, due to the translation files being mis-aligned with the latest changes.
+You will need to run `msgmerge` to merge the newly generated .pot templates
+into the existing .po files, as indicated by the `msgcmp` command traces in
+the build log.
+
+Eg: If the following error message appeers after this log trace:
+
+ msgcmp --use-untranslated --use-fuzzy po/es/libretools.po po/libretools.pot
+ ....
+ msgcmp: found 42 fatal errors
+
+then run:
+
+ $ msgmerge po/es/libretools.po po/libretools.pot
+
+Notice any red (fuzzy) lines. Those are relatively minor mis-matches, which the
+tool was able to reconcile, but may need correction. Also notice any green,
+commented-out, 'msgid'/'msgstr' line pairs. Those are unresolved mis-matches,
+which definitely need correction. They may correspond to a new 'msgid'/'msgstr'
+line pair in the `msgmerge` output, with the new text as 'msgid', and an empty
+'msgstr'; but the changes were too significant for the tool to determine the
+correlation. The standard output of `msgmerge` is the raw text for a new
+replacemnt .po file. Next, direct the output to a file, make the corrections
+to the replacemnt .po file, using the `msgmerge` output as a guide; then replace
+the failed .po file with the new corrected file.
+
+ $ msgmerge po/es/libretools.po po/libretools.pot > po/es/libretools.po-merged
+ $ mv po/es/libretools.po{-merged,}
+
+Alternatively, a merge tool such as `meld`, is especially helpful for this task.
+A merge tool should highlight the same merge conflicts, shown in the the
+`msgmerge` output, as a side-by-side comparison, allowing you to merge the
+changes from the generated '-merged' file, into the tracked .po file, in-place.
+In order to minimize the possible merge conflict next time, it is best to merge
+all of the changes, especially the comments with line numbers.
+
+ $ meld po/es/libretools.po{-merged,}
+
+Once `make clean && make` is able to complete successfully, commit the new .po
+file to the VCS.
+
+ $ git commit -m 'sync translations' po/es/libretools.po
diff --git a/INSTALL b/INSTALL
index a74a376..5b70654 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,13 +1,14 @@
Installation of libretools is pretty straight-forward:
- $ make
- # make install
+ $ make
+ # make install
As a caveat, by default, if the directory `devtools-par` exists in the
same directory as the `libretools-${version}` directory, and contains
newer files than the libretools directory, they will be copied into
the libretools directory. See INSTALL-VCS for more details.
+
Dependencies
------------
@@ -23,13 +24,18 @@ to cause issues.
The "unusual" build-time dependencies are:
- - GNU Make -- other `make`s will not work.
- - GNU sed -- must support `-r` for ERE; BSD sed uses `-E` for this
- purpose.
- - ronn -- A markdown-to-manpage converter
+-------------------------------------------------------------------------------------------
+| build dependency | parabola package | notes |
+|------------------|------------------|---------------------------------------------------|
+| devtools-par | n/a | https://git.parabola.nu/packages/devtools-par.git |
+| GNU Make | 'make' | strict requirement of the AutoThing build system |
+| sed | 'sed' | must support Extended Regular Expressions |
+| ronn | 'ruby-ronn' | a markdown-to-manpage converter |
+-------------------------------------------------------------------------------------------
-At this time, the build system does not support not building the
-documentation; ronn is required.
+Whether or not to build the manpages is controlled by whether
+config.mk:enable_manpages is empty (disable) or non-empty (enable).
+If it is disabled, then `ronn` is not needed.
Additionally, other usual "core utilities" are required:
@@ -45,34 +51,54 @@ be a bigger issue.
## Test suite dependencies
-If you wish to run the test suite, you will need the "roundup" shell
-unit testing program. On Parabola GNU/Linux-libre it is called
-"sh-roundup". If your operating system doesn't have it, it is
-available at <http://bmizerany.github.io/roundup/>.
+If you wish to run the test suite, you will need the "BATS" shell unit
+testing program. On Parabola GNU/Linux-libre it is called "bats". If
+your operating system doesn't have it, it is available at
+<https://github.com/bats-core/bats-core>.
## Run-time dependencies
-Being mostly shell scripts, many external program are used. Anything
-that is included when installing the `base` package group on Parabola
-GNU/Linux, I consider an implicit dependency. If something isn't used
-now, that doesn't mean it won't be in the future.
-
-On top of that, the following dependencies are also needed:
-
-librelib subpackage:
- - wget
-gitget subpackage:
- - librelib (provided)
- - git
-main libretools subpackage:
- - librelib (provided)
- - pacman 5.0
- - arch-install-scripts
- - GNU Make (only needed for `librefetch`)
- - ssh client (OpenSSH, only needed for `librerelease`)
- - rsync
- - systemd-nspawn (for the chroot tools)
- - tokyocabinet
+Being mostly shell scripts, many external program are used. The
+dependencies of the Parabola GNU/Linux 'parabola-base' meta-package,
+are assumed to be implicit dependencies of this script. If something
+isn't used now, that doesn't mean it won't be in the future.
+
+Additionally, the following per-subpackage dependencies are needed:
+
+----------------------------------------------------------------------------------------------
+| librelib dependency | parabola package | usage |
+|-----------------------|-------------------|------------------------------------------------|
+| wget | 'wget' | (optional) used by `blacklist.sh` |
+----------------------------------------------------------------------------------------------
+
+----------------------------------------------------------------------------------------------
+| gitget dependency | parabola package | usage |
+|-----------------------|-------------------|------------------------------------------------|
+| git | 'git' | core functionality |
+| librelib | provided | ubiquitous use of `librelib` confs and helpers |
+----------------------------------------------------------------------------------------------
+
+----------------------------------------------------------------------------------------------
+| libretools dependency | parabola package | usage |
+|-----------------------|-------------------|------------------------------------------------|
+| arch-install-scripts | 'base' | used by `mkarchroot`->`pacstrap` |
+| binutils | 'binutils' | used by `libremakepkg`->`makepkg`->`strip` |
+| expac | 'expac' | used by `libredbdiff` |
+| fakeroot | 'fakeroot' | used by `libremakepkg`->`makepkg`->`fakeroot` |
+| gitget | provided | used by `createworkdir` |
+| librelib | provided | ubiquitous use of `librelib` confs and helpers |
+| GNU Make | 'make' | used by `librefetch` |
+| pacman >= v5.0 | 'base' | used by `libremakepkg`->`makepkg` |
+| pacman-contrib | 'pacman-contrib' | used by `librefetch`->`updpkgsums` |
+| namcap | 'namcap' | used by `libremakepkg` (currently disabled) |
+| rsync | 'rsync' | used by `librerelease`,`makechrootpkg.sh` |
+| ssh client | 'openssh' | used by `librerelease` |
+| subversion | 'subversion' | used by `diff-unfree` |
+| systemd | 'libre/base' | used by arch-nspawn->systemd-nspawn |
+| chroot-nspawn | 'nonsystemd/base' | used by arch-nspawn->systemd-nspawn |
+| tokyocabinet | 'tokyocabinet' | used by `toru` |
+----------------------------------------------------------------------------------------------
+
Configuration
-------------
@@ -87,25 +113,24 @@ The configuration variables mostly match GNU packages, but default
values differ; libretools installs to `prefix=/usr` by default instead
of GNU's `prefix=/usr/local`.
+
Building and installing subpackages
-----------------------------------
-There are several subpackages you can build and install. This is done
-by running:
+There are several sub-packages you can build and install.
- $ make build-${package}
- # make install-${package}
+ - gitget -- A git downloader
+ - librelib -- Generic libraries included
+ - libretools -- The main libretools package
-respectively. In addition to `build` and `install`, the activities
-you can do are:
+This is done by running:
- - `copy` -- copy necessary files from the devtools-par source code
- - `build` -- build all programs and files
- - `install` -- install everything
- - `clean` -- remove generated files
+ $ make build-<SUBPACKAGE>
+ # make install-<SUBPACKAGE>
-The subpackages you can run these on are:
+In addition to `build-*` and `install-*`, there are these general activities:
- - libretools -- The main libretools package
- - librelib -- Generic libraries included
- - gitget -- A git downloader
+ - `copy` -- copy necessary files from the devtools-par source code
+ - `build` -- build all programs and files
+ - `clean` -- remove generated files
+ - `install` -- install everything
diff --git a/INSTALL-VCS b/INSTALL-VCS
index be80d41..e56071c 100644
--- a/INSTALL-VCS
+++ b/INSTALL-VCS
@@ -1,17 +1,70 @@
-The only tricky thing when building from Git is the weird dependence
-on the devtools-par source code.
+The 'auto-thing' build-system is quite magical. Gererally, it is not
+necessary to modify any of the Makefiles. New files are detected and handled
+automagically, based on the VCS. The only caveat of building from VCS
+is the weird dependence on the 'devtools-par' source code.
-The build system will by default look at `$(topdir)/../devtools-par`
-for the devtools-par source code, and copy the relevant files into the
+The build system will look for 'devtools-par' in a sibling directory
+($(topdir)/../devtools-par) and copy the relevant files into the
libretools directory. This can be changed by adjusting the
`devtoolsdir` configuration variable, see "Configuration" in the main
INSTALL file. If the `$(devtoolsdir)` directory does not exist, but
all of the copied files exist in the libretools directory, they will
-simply be used.
-
-In the distribution tarball includes the copies of the devtools files,
-so it is not necessary to download the devtools source separately
-when using the tarball.
+simply be used. The distribution tarball includes the copies of the
+devtools files, so it is not necessary to download the devtools source
+separately when using the tarball.
Once you have the devtools source taken care of, you can build and
install like normal.
+
+ $ make clean
+ $ make
+
+Both `make clean` and `make ` are important if the sources have been modified
+significantly, in order to pick-up new scripts, documentation changes, and new
+translation strings. if you get errors, read HACKING/HACKING_translations.md.
+
+To generate the libretools source-ball expected by the libretools PKGBUILD,
+ensure that a versioned git tag exists of the form: vYYYYMMDD (e.g. v20190907)
+on the currently checked-out branch of the libretools git repo. If the
+'devtools-par' code has also changed, ensure that a versioned git tag exists of
+the form: libretools-YYYYMMDD on the currently checked-out branch of
+'devtools-par'. Then build the source tarball with a command of this form:
+
+ $ make clean
+ $ make
+ $ make dist
+
+Again, run `make clean` and `make` if you have made significant code changes,
+including to 'devtools-par', to ensure that everything is in-sync.
+
+This will produce two archives named as one of the following forms:
+ libretools-YYYYMMDD.tar{,.gz}
+ libretools-YYYYMMDD-N-XXXXXXXX.tar{,.gz}
+
+where: 'YYYYMMDD' is taken from the git tag
+ 'N' is the number of commits on above the tag
+ 'XXXXXXXX' is the git hash of the branch tip
+
+Two stamps will also be created:
+
+ $ cat ./.srcversion-*
+ DEVTOOLS_VERSION = YYYYMMDD
+ DEVTOOLS_COMMIT = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ LIBRETOOLS_VERSION = YYYYMMDD
+ LIBRETOOLS_COMMIT = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+Normally, we want a source-ball named of the first form uploaded
+to the repo server. That is what the PKGBUILD source expects; so
+the ideal situation is when the version tag is on the tip of the
+branch. In that case, the 'N' and the git hash are not appended
+to the filename. If necessary, you can specify a name of the
+outputs explicitly:
+
+ $ make clean
+ $ make
+ $ make dist LIBRETOOLS_VERSION=YYYYMMDD
+
+But that would probably imply replacing the existing source-ball
+with the same name on the server (the initial release); so it
+would be better to adjust the PKGBUILD, for minor revisions, to
+expect the new revision filename instead.
diff --git a/Makefile b/Makefile
index 4c56af1..87bb868 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ files.src.gen += .srcversion-libretools.mk .srcversion-devtools.mk
nested.subdirs = src po
$(outdir)/check:
- cd $(@D)/test && ./testenv $(TESTENVFLAGS) bats cases
+ cd $(@D)/test && ./testenv bats $(BATS_FLAGS) cases
$(outdir)/shellcheck: private shellcheck.flags = --exclude=1090,1091,2016,2059,2064,2164,2191
$(outdir)/shellcheck: private shellcheck.prune = -false
@@ -23,6 +23,6 @@ $(outdir)/shellcheck: private shellcheck.prune += -o -type f -name Makefile
$(outdir)/shellcheck: private shellcheck.prune += -o -type f -name makepkg.gen
$(outdir)/shellcheck: private shellcheck.prune += -o -type f -name source.sh.gen
$(outdir)/shellcheck:
- cd $(@D)/test && ./testenv $(TESTENVFLAGS) 'cd "$$TMPDIR/destdir" && find \( $(shellcheck.prune) \) -prune -o -not -type d -exec shellcheck $(shellcheck.flags) {} +'
+ cd $(@D)/test && ./testenv 'cd "$$TMPDIR/destdir" && find \( $(shellcheck.prune) \) -prune -o -not -type d -exec shellcheck $(shellcheck.flags) {} +'
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/build-aux/Makefile.each.head/20-libretools.mk b/build-aux/Makefile.each.head/20-libretools.mk
index 22f59ba..7a5e754 100644
--- a/build-aux/Makefile.each.head/20-libretools.mk
+++ b/build-aux/Makefile.each.head/20-libretools.mk
@@ -30,7 +30,7 @@ libretools.out.libs = $(libretools.src.sh)
libretools.out.docs = $(libretools.src.md)
libretools.out.confs = $(libretools.src.conf)
-libretools.out = $(libretools.out.mans)
+libretools.out = $(if $(enable_manpages),$(libretools.out.mans))
libretools.out += $(libretools.out.bins)
libretools.out += $(libretools.out.libexecs)
libretools.out += $(libretools.out.libs)
diff --git a/build-aux/Makefile.each.tail/20-libretools.mk b/build-aux/Makefile.each.tail/20-libretools.mk
index 3e54614..5000114 100644
--- a/build-aux/Makefile.each.tail/20-libretools.mk
+++ b/build-aux/Makefile.each.tail/20-libretools.mk
@@ -30,14 +30,15 @@ files.sys.$(libretools.pkg) += \
$(addprefix $(pkglibdir)/,$(libretools.out.libs)) \
$(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs)) \
$(addprefix $(docdir)/,$(libretools.out.docs)) \
- $(addprefix $(mandir)/man1/,$(filter %.1,$(libretools.out.mans))) \
- $(addprefix $(mandir)/man2/,$(filter %.2,$(libretools.out.mans))) \
- $(addprefix $(mandir)/man3/,$(filter %.3,$(libretools.out.mans))) \
- $(addprefix $(mandir)/man4/,$(filter %.4,$(libretools.out.mans))) \
- $(addprefix $(mandir)/man5/,$(filter %.5,$(libretools.out.mans))) \
- $(addprefix $(mandir)/man6/,$(filter %.6,$(libretools.out.mans))) \
- $(addprefix $(mandir)/man7/,$(filter %.7,$(libretools.out.mans))) \
- $(addprefix $(mandir)/man8/,$(filter %.8,$(libretools.out.mans)))
+ $(if $(enable_manpages), \
+ $(addprefix $(mandir)/man1/,$(filter %.1,$(libretools.out.mans))) \
+ $(addprefix $(mandir)/man2/,$(filter %.2,$(libretools.out.mans))) \
+ $(addprefix $(mandir)/man3/,$(filter %.3,$(libretools.out.mans))) \
+ $(addprefix $(mandir)/man4/,$(filter %.4,$(libretools.out.mans))) \
+ $(addprefix $(mandir)/man5/,$(filter %.5,$(libretools.out.mans))) \
+ $(addprefix $(mandir)/man6/,$(filter %.6,$(libretools.out.mans))) \
+ $(addprefix $(mandir)/man7/,$(filter %.7,$(libretools.out.mans))) \
+ $(addprefix $(mandir)/man8/,$(filter %.8,$(libretools.out.mans))))
files.out.int += *.pot *.ugly *.rej *.orig
files.out.all += $(foreach pkg,$(filter-out all,$(files.groups)),$(files.out.$(pkg)))
diff --git a/config.mk b/config.mk
index 882e2e9..92c3039 100644
--- a/config.mk
+++ b/config.mk
@@ -29,9 +29,11 @@ sysconfdir = /etc
mandir = $(datarootdir)/man
devtoolsdir = $(call abspath,$(topsrcdir)/../devtools-par)
+
+enable_manpages = t
RONNFLAGS = --manual='libretools Manual' --organization='Parabola'
-TESTENVFLAGS ?=
+BATS_FLAGS ?=
.LIBPATTERNS ?=
diff --git a/po/HACKING b/po/HACKING
deleted file mode 100644
index 074e8bb..0000000
--- a/po/HACKING
+++ /dev/null
@@ -1,50 +0,0 @@
-Translations for programs are provided in files with the `.po` suffix.
-These are created by copying PO-template (`.pot`) files, and filling
-in the missing "msgstr" values.
-
-To add a translation, you'll first (1) need to create the `.pot` files
-if you don't already have them, and then (2) copy them and (3) fill
-them in.
-
-# 1. Create `.pot` files
-
- If you are working from a release source tarball, you can skip this
- step (the `.pot` files are included in the tarball); if you are
- working from git, read on.
-
- libretools' .pot files are not tracked in git; they are created by
- running `make`. You'll need a checkout of both "devtools-par" and
- "libretools" to run `make` if building from git.
-
- $ git clone https://git.parabola.nu/packages/devtools-par.git/
- $ git clone https://git.parabola.nu/packages/libretools.git/
- $ cd libretools
- $ make po/files.generate
- ...
- $ cd po/
- $ ls
- HACKING
- gitget.pot
- librelib.pot
- libretools.pot
- ...
-
-# 2. Create `.po` files from them
-
- Create a folder under `po/` with the two-letter language code[^1]
- you want to add. Then, copy the `.pot` files to that folder,
- changing the file extension to `.po`. Finally, link the `subdir.mk`
- file to be the Makefile for that directory. For example:
-
- $ mkdir es
- $ for file in *.pot; do cp $file es/${file%t}; done
- $ ln -s ../subdir.mk es/Makefile
-
- [^1]: See the langauge code table
- here: <http://www.lingoes.net/en/translator/langcode.htm>
-
-# 3. Fill the `.po` files in with translations
-
- From there you can open each .po file in your favorite text editor,
- and fill in the `msgstr` values with translations of the associated
- `msgid` keys.
diff --git a/po/HACKING.md b/po/HACKING.md
new file mode 120000
index 0000000..269d290
--- /dev/null
+++ b/po/HACKING.md
@@ -0,0 +1 @@
+../HACKING/translations.md \ No newline at end of file
diff --git a/po/es/gitget.po b/po/es/gitget.po
index 5b06575..8308f90 100644
--- a/po/es/gitget.po
+++ b/po/es/gitget.po
@@ -3,7 +3,7 @@
#
# Megver83 <megver83@parabola.nu>, 2018.
msgid ""
-msgstr "Project-Id-Version: libretools 20170705\n"
+msgstr "Project-Id-Version: libretools 20240327\n"
"Report-Msgid-Bugs-To: Parabola Hackers <dev@lists.parabola.nu>\n"
"PO-Revision-Date: 2018-03-29 14:11-0400\n"
"Last-Translator: Megver83 <megver83@parabola.nu>\n"
@@ -15,53 +15,39 @@ msgstr "Project-Id-Version: libretools 20170705\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 2.0\n"
-#: src/gitget/gitget:35
msgid "Failed to change to directory %s"
msgstr "Falló al cambiar el directorio %s"
-#: src/gitget/gitget:36 src/gitget/gitget:53 src/gitget/gitget:69
-#: src/gitget/gitget:80 src/gitget/gitget:84 src/gitget/gitget:108
-#: src/gitget/gitget:123 src/gitget/gitget:134 src/gitget/gitget:138
msgid "Aborting..."
msgstr ""
-#: src/gitget/gitget:50 src/gitget/gitget:105
msgid "Cloning %s %s repo..."
msgstr "Clonando repo %s %s ..."
-#: src/gitget/gitget:52 src/gitget/gitget:107
msgid "Failure while downloading %s %s repo"
msgstr "Error mientras se descargaba el repo %s %s"
-#: src/gitget/gitget:68 src/gitget/gitget:122
msgid "%s is not a clone of %s"
msgstr "%s no es un clon de %s"
-#: src/gitget/gitget:79 src/gitget/gitget:133
msgid "%s does not have a %s configured"
msgstr "%s no tiene un % configurado"
-#: src/gitget/gitget:83 src/gitget/gitget:137
msgid "%s has %s configured, but it doesn't match %s"
msgstr "%s tiene %s configurado, pero no coincide con %s"
-#: src/gitget/gitget:89 src/gitget/gitget:143
msgid "Updating %s %s repo..."
msgstr "Actualizando repo %s %s ... "
-#: src/gitget/gitget:92 src/gitget/gitget:146
msgid "Failure while updating %s %s repo"
msgstr "Error al actualizar repo %s %s"
-#: src/gitget/gitget:152
msgid "Usage: %s [OPTIONS] [bare|checkout] URL DIRECTORY"
msgstr "Uso: %s [OPCIONES] [bare|checkout] DIRECTORIO DEL URL"
-#: src/gitget/gitget:153
msgid "A URL-handler for git urls. Capable of updating or cloning."
msgstr "Un controlador de URL para urls de git. Capaz de actualizar o clonar"
-#: src/gitget/gitget:155
msgid "Clones or pulls from the git URL, to a local DIRECTORY. If `bare` "
"is specified, it will create a bare repository; if `checkout` is "
"specified, it will create or update a working tree."
@@ -69,7 +55,6 @@ msgstr "Clona o extrae del URL de git, a un DIRECTORIO local. Si `bare` se "
"especifica, creará un repositorio pelado, si `checkout` es "
"especificado, creará o actualizará un árbol de trabajo."
-#: src/gitget/gitget:159
msgid "For a checkout, the tree to checkout is specified by appending "
"`#ANYTHING=TREE-ISH` to the URL. For example, `#branch=stable`, or "
"`#tag=v12.3`. Whatever is on the left side of the equal sign is "
@@ -80,13 +65,11 @@ msgstr "Para una comprobación (checkout), el árbol a la comprobación se "
"signo igual es ignorado, esto es para la compatibilidad con fuentes "
"URL de `makepkg`. "
-#: src/gitget/gitget:165
msgid "The URL may be prefixed with `git+`. This is also for compatibility "
"with `makepkg` source URLs."
msgstr "La URL debiera ser prefijada con `git+`. Esto también es para la "
"compatibilidad con las URLs fuente de `makepkg`."
-#: src/gitget/gitget:168
msgid "It does safety checks, figures out whether to clone or pull, and "
"other helpful things. This exists because the same `download_git` "
"function from makepkg was being copied and pasted again and again."
@@ -94,49 +77,39 @@ msgstr "Hace controles de seguridad, calcula si clonar o actualizar, y otras "
"cosas útiles. Esto existe porque la misma función `download_git` de "
"makepkg estaba siendo copiada y pegada una y otra vez."
-#: src/gitget/gitget:173
msgid "Options:"
msgstr "Opciones:"
-#: src/gitget/gitget:175
msgid "Instead of checking to make sure configured URLs match, force the "
"update, and set the URLs."
msgstr "En lugar de comprobar que las URL configuradas coinciden, forzar la "
"actualización, y establecer las URLs."
-#: src/gitget/gitget:177
msgid "URL"
msgstr "URL"
-#: src/gitget/gitget:178
msgid "In addition to setting or checking `remotes.origin.url`, also set or "
"check `remotes.origin.pushUrl`"
msgstr "Además de configurar o verificar `remotes.origin.url`, también "
"establecer o comprobar `remotes.origin.pushUrl`"
-#: src/gitget/gitget:180
msgid "NAME"
msgstr "NOMBRE"
-#: src/gitget/gitget:181
msgid "In messages, instead of using the basename of DIRECTORY as the "
"repository name, use NAME"
msgstr "En mensajes, en lugar de utilizar el nombre base de DIRECTORIO como "
"el nombre del repositorio, use NOMBRE"
-#: src/gitget/gitget:183
msgid "Show this message"
msgstr "Mostrar este mensaje"
-#: src/gitget/libregit:23
msgid "Usage: %s REPO REF DIR"
msgstr "Uso: %s REPO REF DIR"
-#: src/gitget/libregit:24
msgid "A compatibility wrapper around `gitget checkout`"
msgstr "Un contenedor de compatibilidad de `gitget checkout`"
-#: src/gitget/libregit:26
msgid "This exists because gitget used to be called libregit, and took the "
"arguments in this format, and I'm sure there are a few scripts "
"floating around that use it."
@@ -144,7 +117,6 @@ msgstr "Esto existe porque gitget solía llamarse libregit, y tomó los "
"argumentos en este formato, y estoy seguro de que hay unos cuantos "
"scripts flotando alrededor que lo usan."
-#: src/gitget/libregit:30
msgid "Clones or pulls from the git URL '<REPO>', and checks out the git "
"ref '<REF>' to the directory '<DIR>'."
msgstr "Clona o extrae de la URL de git '<REPO>', y comprueba el git ref "
diff --git a/po/es/librelib.po b/po/es/librelib.po
index 7d289c5..573c627 100644
--- a/po/es/librelib.po
+++ b/po/es/librelib.po
@@ -4,7 +4,7 @@
#
# Megver83 <megver83@parabola.nu>, 2018.
msgid ""
-msgstr "Project-Id-Version: libretools 20170913\n"
+msgstr "Project-Id-Version: libretools 20240327\n"
"Report-Msgid-Bugs-To: Parabola Hackers <dev@lists.parabola.nu>\n"
"PO-Revision-Date: 2018-03-29 14:14-0400\n"
"Last-Translator: Megver83 <megver83@parabola.nu>\n"
@@ -16,171 +16,136 @@ msgstr "Project-Id-Version: libretools 20170913\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 2.0\n"
-#: src/lib/archroot.sh:64
msgid "Unable to delete subvolume %s"
msgstr "No se puede de eliminar subvolumen %s"
#. embedded usage text
-#: src/lib/blacklist.sh:25
msgid "Usage: blacklist-normalize <$file"
msgstr "Uso: blacklist-normalize <$file"
#. embedded usage text
-#: src/lib/blacklist.sh:26
msgid "Normalizes the syntax of the blacklist on stdin."
msgstr "Normaliza la sintaxis de la lista negra en stdin."
#. embedded usage text
-#: src/lib/blacklist.sh:38
msgid "Usage: blacklist-cat"
msgstr "Uso: blacklist-cat"
#. embedded usage text
-#: src/lib/blacklist.sh:39
msgid "Prints the blacklist."
msgstr "Imprime la lista negra"
#. embedded usage text
-#: src/lib/blacklist.sh:40
msgid "Uses the cache, but downloads it if it doesn't exist. Also "
"normalizes the blacklist for easier parsing."
msgstr "Utiliza el caché, pero la descarga si no existe. También normaliza "
"la lista negra para facilitar el análisis sintáctico."
#. embedded usage text
-#: src/lib/blacklist.sh:50
msgid "Usage: blacklist-update"
msgstr "Uso: blacklist-update"
#. embedded usage text
-#: src/lib/blacklist.sh:51
msgid "Updates (or creates) the cached copy of the blacklist."
msgstr "Actualiza (o crea) la copia de la lista negra en caché."
-#: src/lib/blacklist.sh:59
msgid "Downloading blacklist of proprietary software packages"
msgstr "Descargando la lista negra de paquetes de software privativo"
-#: src/lib/blacklist.sh:76
msgid "Using old local cache of blacklist"
msgstr "Usando antigua caché local de la lista negra"
-#: src/lib/blacklist.sh:78
msgid "Download failed, exiting"
msgstr "Descarga fallida, saliendo"
#. embedded usage text
-#: src/lib/blacklist.sh:84
msgid "Usage: blacklist-cat | blacklist-lookup $pkgname"
msgstr "Uso: blacklist-cat | blacklist-lookup $pkgname"
#. embedded usage text
-#: src/lib/blacklist.sh:85
msgid "Filters to obtain the line for $pkgname from the blacklist on stdin."
msgstr "Filtra para obtener la línea de $pkgname desde la lista negra en "
"stdin."
#. embedded usage text
-#: src/lib/blacklist.sh:86
msgid "Exits successfully whether a line is found or not."
msgstr "Sale con éxito si una línea se encuentra o no."
#. embedded usage text
-#: src/lib/blacklist.sh:93
msgid "Usage: blacklist-cat | blacklist-get-pkg"
msgstr "Uso: blacklist-cat | blacklist-get-pkg"
#. embedded usage text
-#: src/lib/blacklist.sh:94
msgid "Prints only the package name field of the blacklist line(s) on stdin."
msgstr "Imprime sólo el campo del nombre del paquete de la(s) línea(s) de la "
"lista negra en stdin."
#. embedded usage text
-#: src/lib/blacklist.sh:99
msgid "Usage: blacklist-cat | blacklist-get-rep"
msgstr "Uso: blacklist-cat | blacklist-get-rep"
#. embedded usage text
-#: src/lib/blacklist.sh:100
msgid "Prints only the replacement package field of the blacklist line(s) "
"on stdin."
msgstr "Imprime sólo el campo del paquete de reemplazo de la(s) línea(s) de "
"la lista negra en stdin."
#. embedded usage text
-#: src/lib/blacklist.sh:122
msgid "Usage: blacklist-cat | blacklist-get-url"
msgstr "Uso: blacklist-cat | blacklist-get-url"
#. embedded usage text
-#: src/lib/blacklist.sh:123
msgid "Prints URLs formed from the reference-id fields of the blacklist "
"line(s) on stdin."
msgstr "Imprime sólo URLs a partir de los campos referencia-id de la(s) "
"línea(s) de la lista negra en stdin."
#. embedded usage text
-#: src/lib/blacklist.sh:124
msgid "Prints an empty line in the absence of reference."
msgstr "Imprime una línea vacía en ausencia de referencia."
#. embedded usage text
-#: src/lib/blacklist.sh:137
msgid "Usage: blacklist-cat | blacklist-get-reason"
msgstr "Uso: blacklist-cat | blacklist-get-reason"
#. embedded usage text
-#: src/lib/blacklist.sh:138
msgid "Prints only the reason field of the blacklist line(s) on stdin."
msgstr "Imprime sólo el campo de razón de la(s) línea(s) de la lista negra "
"en stdin."
-#: src/lib/common.sh:73
msgid "done"
msgstr "hecho"
-#: src/lib/common.sh:92
msgid "Aborting..."
msgstr "Abortando..."
-#: src/lib/common.sh:222 src/lib/common.sh:282
msgid "Multiple packages found:"
msgstr "Múltiples paquetes encontrados:"
-#: src/lib/conf.sh:144
msgid "Configure '%s' in one of:"
msgstr "Configura '%s' en uno de:"
-#: src/lib/conf.sh:147
msgid "Configure '%s' in '%s'"
msgstr "Configura '%s' en '%s'"
-#: src/lib/libreblacklist:45
msgid "Usage: %s [-h] COMMAND [ARGUMENTS]"
msgstr "Uso: %s [-h] COMANDO [ARGUMENTOS]"
-#: src/lib/libreblacklist:46
msgid "Tool for working with the nonfree software blacklist"
msgstr "Herramienta para trabajar con la lista negra de software no libre"
-#: src/lib/libreblacklist:48
msgid "Commands:"
msgstr "Comandos:"
-#: src/lib/librelib:39
msgid "Usage: . $(%s LIBRARY)"
msgstr "Uso: . $(%s LIBRERÍA)"
-#: src/lib/librelib:40
msgid "Usage: %s -h"
msgstr "Uso: %s -h"
-#: src/lib/librelib:41
msgid "Finds a Bash library file"
msgstr "Encuentra una archivo librería de Bash"
-#: src/lib/librelib:43
msgid "While some libraries can be sourced just by their name because they "
"are installed in PATH (like libremessages), some are not installed "
"there (like conf.sh), so a path must be given. Hardcoding that path "
@@ -190,99 +155,76 @@ msgstr "Mientras que algunas librerías se pueden obtener sólo por su nombre "
"están instaladas allí (como conf.sh), por lo que una ruta debe ser "
"dada. Hacer 'hardcode' esa ruta es el camino del lado oscuro."
-#: src/lib/librelib:48
msgid "By default, it looks for the files in `%s`, but this can be changed "
- "with the environmental variable LIBRETOOLS_LIBDIR."
+ "with the environmental variable LIBRETOOLS_LIBRARY_PATH."
msgstr "De forma predeterminada, busca los archivos en `%s`, pero esto puede "
- "cambiarse con la variable ambiental LIBRETOOLS_LIBDIR."
+ "cambiarse con la variable ambiental LIBRETOOLS_LIBRARY_PATH."
-#: src/lib/librelib:51
msgid "Example usage:"
msgstr "Ejemplo de uso:"
-#: src/lib/librelib:54 src/lib/librexgettext:72
msgid "Options:"
msgstr "Opciones:"
-#: src/lib/librelib:55
msgid "Show this message"
msgstr "Mostrar este mensaje"
-#: src/lib/librelib:82
msgid "%s: could not find library: %s"
msgstr "%s: no se pudo encontrar la librería: %s"
-#: src/lib/librexgettext:56
msgid "Usage: %s [OPTIONS] FILES..."
msgstr "Uso: %s [OPCIONES] ARCHIVOS..."
-#: src/lib/librexgettext:57
msgid "Generates .pot files for programs using libremessages"
msgstr "Genera archivos .pot para programas usando libremessages"
-#: src/lib/librexgettext:59
msgid "In librexgettext, there are 2 types of keywords:"
msgstr "En librexgettext, hay 2 tipos de palabras clave:"
-#: src/lib/librexgettext:60
msgid "simple: Simple keywords are just like normal xgettext"
msgstr "simple: Las palabras clave simples son como xgettext normal"
-#: src/lib/librexgettext:61
msgid "prose: Prose keywords are similar, but the text is word-wrapped"
msgstr "prose: Las palabras clave Prose son similares, pero el texto está "
"envuelto en palabras"
-#: src/lib/librexgettext:63
msgid "The keyword format is the same as in GNU xgettext."
msgstr "El formato de la palabra clave es el mismo que en GNU xgettext."
-#: src/lib/librexgettext:65
msgid "The libremessages `flag` command is also handled specially, and is "
"not configurable as a keyword."
msgstr "El comando libremessages `flag` también se maneja especialmente, y "
"no es configurable como una palabra clave."
-#: src/lib/librexgettext:68
msgid "The default simple keywords are: %s"
msgstr "Las palabras clave por defecto son: %s"
-#: src/lib/librexgettext:70
msgid "The default prose keywords are: %s"
msgstr "Las palabras clave prose son:"
-#: src/lib/librexgettext:74
msgid "Look for KEYWORD as an additional simple keyword"
msgstr "Busca KEYWORD como una palabra clave simple adicional"
-#: src/lib/librexgettext:75
msgid "Look for KEYWORD as an additional prose keyword"
msgstr "Busque KEYWORD como una palabra clave prosa adicional"
-#: src/lib/librexgettext:76
msgid "Disable using the default keywords"
msgstr "Deshabilita el uso de las palabras clave predeterminadas"
-#: src/lib/librexgettext:77
msgid "Show this text"
msgstr "Muestra este texto"
-#: src/lib/librexgettext:183 src/lib/librexgettext:230
msgid "flag error: Missing expected flag meaning at argument %d"
msgstr "error de `flag`: Se esperaba significado de `flag` en argumento %d"
-#: src/lib/librexgettext:202
msgid "flag error: Jumped from argument %d to %d"
msgstr "error de `flag`: Saltó del argumento %d al %d"
-#: src/lib/librexgettext:261
msgid "unrecognized option: %s"
msgstr "opción no reconocida: %s"
-#: src/lib/librexgettext:267
msgid "no input file given"
msgstr "no se ha dado ningún archivo"
-#: src/lib/messages.sh:60
-msgid "panic: malformed call to internal function"
-msgstr "pánico: llamada malformada a la función interna"
+msgid "General error. This is a bug. Please report it to Parabola."
+msgstr "Error general. Esto es un bug . Complacer informarlo a Parabola."
diff --git a/po/es/libretools.po b/po/es/libretools.po
index 3d1dc27..1869c92 100644
--- a/po/es/libretools.po
+++ b/po/es/libretools.po
@@ -3,7 +3,7 @@
#
# Megver83 <megver83@parabola.nu>, 2018.
msgid ""
-msgstr "Project-Id-Version: libretools 20170705\n"
+msgstr "Project-Id-Version: libretools 20240327\n"
"Report-Msgid-Bugs-To: Parabola Hackers <dev@lists.parabola.nu>\n"
"PO-Revision-Date: 2018-03-31 15:12-0400\n"
"Last-Translator: Megver83 <megver83@parabola.nu>\n"
@@ -15,109 +15,83 @@ msgstr "Project-Id-Version: libretools 20170705\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 2.0\n"
-#: src/abslibre-tools/createworkdir:36
msgid "Creating WORKDIR at %s..."
msgstr "Creando WORKDIR en %s..."
-#: src/abslibre-tools/createworkdir:39
msgid "Creating staging directory in WORKDIR..."
msgstr "Creando directorio staging en WORKDIR..."
-#: src/abslibre-tools/createworkdir:44
msgid "Could not clone ABSLibre"
msgstr "No se pudo cloanr ABSLibre"
-#: src/abslibre-tools/createworkdir:45
msgid "Try running this command:"
msgstr ""
-#: src/abslibre-tools/createworkdir:52
msgid "Finished, your packaging directory tree looks like this now:"
msgstr "Terminado, su árbol de directorio de empaquetado es así ahora:"
-#: src/abslibre-tools/diff-unfree:30
msgid "Usage: %s [community|packages] [unfree-package] [repo]"
msgstr "Uso: %s [community|packages] [paquete-no-libre] [repo]"
-#: src/abslibre-tools/diff-unfree:31
msgid "Usage: %s --help"
msgstr "Uso: %s --help"
-#: src/abslibre-tools/diff-unfree:32
msgid "Helps you diff build scripts from ABSLibre against (Unfree) ABS."
msgstr "Le ayuda a hacer diff en scripts de compilación de ABSLibre contra "
"(No-libre) ABS."
-#: src/abslibre-tools/diff-unfree:34
msgid "Package name and repo will we guessed if you don't specify them."
msgstr "El nombre del paquete y el repo lo adivinaremos si no los "
"especificas."
-#: src/abslibre-tools/diff-unfree:58
msgid "This is not a build dir."
msgstr "Este no es un directorio de compilación"
-#: src/abslibre-tools/diff-unfree:65
msgid "Can't create temp dir"
msgstr "No se puede crear directorio temporal"
-#: src/abslibre-tools/diff-unfree:72
msgid "Getting diff from %s..."
msgstr "Obteniendo diff desde %s..."
-#: src/abslibre-tools/diff-unfree:82 src/aur:83
msgid "Diffing files"
msgstr "'Diffeando' archivos"
-#: src/abslibre-tools/diff-unfree:85 src/toru/toru-info:39
-#: src/toru/toru-info:40
msgid "%s"
msgstr "%s"
-#: src/abslibre-tools/libreaddiff:29
msgid "Usage: %s repo [arch]"
msgstr "Uso: %s repo [arquitectura]"
-#: src/abslibre-tools/libreaddiff:31
msgid "This script outputs a diff of package names and versions in repo "
"between pacman's sync db and abslibre checkout."
msgstr "Este script muestra un diff de nombres de paquetes y versiones en "
"repo entre la sincronización db de pacman y la comprobación abslibre."
-#: src/abslibre-tools/libredbdiff:52
msgid "Enabling repo %q in %q"
msgstr "Habilitando repo %q in %q"
-#: src/abslibre-tools/libredbdiff:61
msgid "Creating directory %q"
msgstr "Creando directorio %q"
-#: src/abslibre-tools/libredbdiff:62
msgid "Failed to create directory %q. Exiting."
msgstr "Falló al crear directorio %q. Saliendo."
-#: src/abslibre-tools/libredbdiff:75
msgid "vercmp failed"
msgstr "vercmp falló"
-#: src/abslibre-tools/libredbdiff:135
msgid "Usage: sudo %q"
msgstr "Uso: sudo %q"
-#: src/abslibre-tools/libredbdiff:136
msgid " or: %q -n [REPO]"
msgstr " o: %q -n [REPO]"
-#: src/abslibre-tools/libredbdiff:137
msgid " or: %q -h"
msgstr " o: %q -h"
-#: src/abslibre-tools/libredbdiff:138
msgid "Show packages that need to be updated from Arch repositories."
msgstr "Mostrar los paquetes que se deben actualizar desde los repositorios "
"de Arch."
-#: src/abslibre-tools/libredbdiff:140
msgid "Compares packages in Parabola repositories. Packages from all "
"configured Parabola repositories are compared. A Parabola "
"repository name can be specified as argument to compare only "
@@ -127,7 +101,6 @@ msgstr "Compara los paquetes en los repositorios Parabola. Se comparan los "
"nombre del repositorio de Parabola se puede especificar como "
"argumento para comparar sólo paquetes en ese repositorio."
-#: src/abslibre-tools/libredbdiff:145
msgid "The default mode of operation requires root, and downloads or "
"updates all necessary files for comparison, but does not compare "
"them. After that mode has been run, run the tool again without root "
@@ -139,7 +112,6 @@ msgstr "El modo predeterminado de operación requiere root, y las descarga o "
"herramienta de nuevo sin ser root con la opción `-n` para no "
"descargar nada, pero para comparar los archivos ya descargados."
-#: src/abslibre-tools/libredbdiff:151
msgid "In the compare mode (if the `-n` flag is given), by default it will "
"iterate over each of the configured repositories, prefixing each "
"section with a line in the format `[REPO]`. However, if a REPO is "
@@ -152,44 +124,27 @@ msgstr "En el modo de comparación (si se da el indicador `-n`), de forma "
"comandos, escanea paquetes sólo en ese repositorio, y no se "
"imprimirá la línea `[REPO]`."
-#: src/abslibre-tools/libredbdiff:157 src/abslibre-tools/librerelease:128
-#: src/chroot-tools/librechroot:265 src/chroot-tools/libremakepkg:171
-#: src/devtools/find-libdeps:36 src/librefetch/librefetch:80
-#: src/pkgbuild-check-nonfree:51 src/pkgbuild-summarize-nonfree:39
-#: src/toru/toru-path:46
msgid "Options:"
msgstr "Opciones:"
-#: src/abslibre-tools/libredbdiff:158
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:295 src/chroot-tools/libremakepkg:187
-#: src/devtools/find-libdeps:39 src/librefetch/librefetch:92
-#: src/pkgbuild-check-nonfree:58 src/pkgbuild-summarize-nonfree:41
-#: src/toru/toru-path:51
msgid "Show this message"
msgstr "Muestra este mensaje"
-#: src/abslibre-tools/libredbdiff:161
msgid "In the compare mode the output is in the format:"
msgstr "En el modo de comparación la salida está en el formato:"
-#: src/abslibre-tools/libredbdiff:163 src/abslibre-tools/libredbdiff:167
msgid "\\t[repo]"
msgstr "\\t[repo]"
-#: src/abslibre-tools/libredbdiff:164 src/abslibre-tools/libredbdiff:165
-#: src/abslibre-tools/libredbdiff:168 src/abslibre-tools/libredbdiff:169
msgid "\\tpkgline"
msgstr "\\tpkgline"
-#: src/abslibre-tools/libredbdiff:166 src/abslibre-tools/libredbdiff:170
msgid "\\t..."
msgstr "\\t..."
-#: src/abslibre-tools/libredbdiff:172
msgid "That is, the output is organized by Parabola repository, and within "
"each repository section, there is one line for each package in that "
"Parabola repo that seems to be behind the equivalent package in Arch."
@@ -198,15 +153,12 @@ msgstr "Es decir, la salida está organizada por el repositorio de Parabola, "
"paquete en ese repo de Parabola que parece estar detrás del paquete "
"equivalente en Arch."
-#: src/abslibre-tools/libredbdiff:177
msgid "The line-format for packages is:"
msgstr "El formato de línea para paquetes es:"
-#: src/abslibre-tools/libredbdiff:181
msgid "Where 'status' is one of the characters:"
msgstr "Donde 'status' es uno de los caracteres:"
-#: src/abslibre-tools/libredbdiff:182
msgid "An Arch package with the same pkgname as a Parabola package was "
"found, and Arch has a higher pkgver than Parabola. In this case, "
"arch_pkgname is not present (as it is the same as the "
@@ -216,7 +168,6 @@ msgstr "Un paquete de Arch con el mismo pkgname que un paquete de Parabola "
"este caso, arch_pkgname no está presente (ya que es el mismo que el "
"parabola_pkgname)."
-#: src/abslibre-tools/libredbdiff:186
msgid "An Arch package with a pkgname that is provide'd by a Parabola "
"package was found, and the pkgver of the Arch package is higher than "
"the pkgver of the parabola package."
@@ -224,234 +175,215 @@ msgstr "Un paquete de Arch con un pkgname que es proveído por un paquete de "
"Parabola fue encontrado, y el pkgver del paquete de Arch es mayor "
"que el pkgver del paquete de Parabola."
-#: src/abslibre-tools/libredbdiff:189
msgid "It appears that this Parabola package is not a replacement for an "
"Arch package."
msgstr "Parece que este paquete de Parabola no es un reemplazo para un "
"paquete de Arch."
-#: src/abslibre-tools/libredbdiff:221
msgid "%s: found non-flag arguments; a repo list may only be specified with "
"the -n flag: %s"
msgstr "%s: encontró argumentos sin opciones; una lista de repo sólo se "
"puede especificar con la opción -n: %s"
-#: src/abslibre-tools/libredbdiff:228
msgid "Must run as root to initialize or update %s databases."
msgstr "Debe ser ejecutado como root para inicializar o actualizar las bases "
"de datos de %s."
-#: src/abslibre-tools/libredbdiff:240
msgid "%s: found too many non-flag arguments; only one repo may be "
"specified: %s"
msgstr "%s: encontró demasiados argumentos sin opciones; sólo un repo puede "
"ser especificado: %s"
-#: src/abslibre-tools/libredbdiff:250
msgid "The specified Parabola repo \"%s\" cannot be compared. It's not in "
"the list of repos in the configuration variable \"repos\"."
msgstr "No se puede comparar el repo \"%s\" de Parabola especificado. No "
"está en la lista de repos en la variable de configuración \"repos\"."
-#: src/abslibre-tools/libredbdiff:262 src/abslibre-tools/libredbdiff:274
msgid "Generating %s %q"
msgstr "Generando %s %q"
-#: src/abslibre-tools/libredbdiff:278
msgid "Failed to download %q. Exiting."
msgstr "Falló al descargar %q. Saliendo."
-#: src/abslibre-tools/libredbdiff:293 src/abslibre-tools/libredbdiff:300
msgid "Synchronizing %s pacman databases for %s"
msgstr "Sincronizando las bases de datos de %s para %s"
-#: src/abslibre-tools/libredbdiff:295 src/abslibre-tools/libredbdiff:302
msgid "Failed to synchronize pacman database for %s. Exiting."
msgstr "Falló al sincronizar la base de datos para %s. Saliendo."
-#: src/abslibre-tools/libredbdiff:305
msgid "%s pacman databases are updated. %s is ready. Run %q -n to print "
"results."
msgstr "Las bases de datos de %s están actualizadas. Ejecuta %q -n para "
"imprimir resultados."
-#: src/abslibre-tools/libredbdiff:315
msgid "You must run %q with out arguments as root to initialize."
msgstr "Debes ejecutar %q sin argumentos como root para inicializar."
-#: src/abslibre-tools/libredbdiff:321
msgid "Could not create temporary working directory"
msgstr "No se pudo crear directorio de trabajo temporal"
-#: src/abslibre-tools/libredbdiff:331 src/abslibre-tools/libredbdiff:340
msgid "expac command to get %s package data has failed. Exiting."
msgstr "El comando expac para obtener los datos del paquete %s ha fallado. "
"Saliendo."
-#: src/abslibre-tools/librerelease:67 src/librefetch/librefetch:390
+msgid "Waiting for an exclusive lock on the staging directory ...."
+msgstr "Esperando un bloqueo exclusivo en el directorio staging ...."
+
msgid "Signing package..."
msgstr "Firmando paquete..."
-#: src/abslibre-tools/librerelease:78 src/librefetch/librefetch:401
msgid "Created signature file %s."
msgstr "Se creó el archivo de firma %s."
-#: src/abslibre-tools/librerelease:80 src/librefetch/librefetch:403
msgid "Failed to sign package file."
msgstr "Falló al firmar el paquete."
-#: src/abslibre-tools/librerelease:91
msgid "File signature found, verifying..."
msgstr "Archivo de firma encontrado, verificando..."
-#: src/abslibre-tools/librerelease:95
msgid "Failed! Re-signing..."
msgstr "¡Falló! Re-firmando..."
-#: src/abslibre-tools/librerelease:112
msgid "removed '%s' (dry-run)"
msgstr "removido '%s' (dry-run)"
-#: src/abslibre-tools/librerelease:115
msgid "Removing files from local staging directory"
msgstr "Removiendo archivos del directorio staging local"
-#: src/abslibre-tools/librerelease:125
msgid "Usage: %s [OPTIONS]"
msgstr "Uso: %s [OPCIONES]"
-#: src/abslibre-tools/librerelease:126
-msgid "Upload packages in $WORKDIR/staging to the Parabola server"
-msgstr "Sube paquetes en $WORKDIR/staging al servidor de Parabola"
-
-#: src/abslibre-tools/librerelease:129
-msgid "Clean; delete packages in $WORKDIR/staging"
-msgstr "Limpia; elimina paquetes en $WORKDIR/staging"
+msgid "Upload packages staged in %s (per `librestage`) to the configured "
+ "server, and publish them to their respective repositories."
+msgstr ""
-#: src/abslibre-tools/librerelease:130
-msgid "List; list packages but not upload them"
-msgstr "Lista; lista paquetes pero no los sube"
+msgid "This requires the `gpg` program, configured with your GPG key, and a "
+ "staging directory (%s), writable by %s."
+msgstr ""
-#: src/abslibre-tools/librerelease:131
-msgid "Upload-only; do not run db-update on the server"
-msgstr "Solo subir; no ejecutar db-update en el servidor"
+msgid "%s is determined at runtime, by %s. %s is normally the local login "
+ "of the invoking user, but may be over-ridden by setting %s in the "
+ "environment."
+msgstr ""
-#: src/abslibre-tools/librerelease:133
-msgid "Dry-run; don't actually do anything"
-msgstr "Dry-run; no hace nada en realidad"
+msgid "By default, %s is assumed to match the hackers.git login for which "
+ "%s has login credentials for the repo server. If %s does not match "
+ "the hackers.git login, you must specify %s as the remote login, (eg: "
+ "in %s)"
+msgstr ""
-#: src/abslibre-tools/librerelease:139
-msgid "This program should be run as regular user"
-msgstr "Este programa debiera ser ejecutado como usuario normal"
+msgid "Clean Local: delete packages in local staging directory"
+msgstr "Limpia Local: remover archivos del directorio staging local"
-#: src/abslibre-tools/librerelease:201
-msgid "The format of libretools.conf:REPODEST has changed."
-msgstr "El formato de libretools.conf:REPODEST ha cambiado."
+msgid "Clean Remote: delete packages in remote staging directory"
+msgstr "Limpia Remoto: remover archivos del directorio staging remoto"
-#: src/abslibre-tools/librerelease:202
-msgid "Merge the /etc/libretools.conf.pacnew file!"
+msgid "Help: Show this message"
msgstr ""
-#: src/abslibre-tools/librerelease:209
-msgid "Unfortunately, `~user` home-directory expansion is not (yet?) "
- "supported in libretools.conf:REPODEST"
-msgstr "Desafortunadamente, la expansión del directorio principal del "
- "`~user` no es (todavía?) soportado en libretools.conf:REPODEST"
+msgid "List: list packages but not upload them"
+msgstr "Lista: lista paquetes pero no los sube"
+
+msgid "Dry-run: don't actually do anything"
+msgstr "Dry-run: no hace nada en realidad"
+
+msgid "Upload-only: do not run db-update on the server"
+msgstr "Solo subir: no ejecutar db-update en el servidor"
-#: src/abslibre-tools/librerelease:231 src/abslibre-tools/librerelease:253
-msgid "Waiting for an exclusive lock on the staging directory"
-msgstr "Esperando un bloqueo exclusivo en el directorio staging"
+msgid "Removing files from remote staging directory"
+msgstr "Removiendo archivos del directorio staging remoto"
+
+msgid "Connection or login failed."
+msgstr ""
-#: src/abslibre-tools/librerelease:245
msgid "Running HOOKPRERELEASE..."
msgstr "Ejecutando HOOKPRERELEASE..."
-#: src/abslibre-tools/librerelease:269
msgid "%s to upload"
msgstr "%s para actualizar"
-#: src/abslibre-tools/librerelease:270
msgid "Uploading packages..."
msgstr "Subiendo paquetes..."
-#: src/abslibre-tools/librerelease:278
msgid "Sync failed, try again"
msgstr "Sincronización fallida, intente nuevamente"
-#: src/abslibre-tools/librerelease:288
msgid "Running db-update on repos"
msgstr "Ejecutando db-update en los repos"
-#: src/abslibre-tools/librerelease:292
msgid "Running HOOKPOSTRELEASE..."
msgstr "Ejecutando HOOKPRERELEASE..."
-#: src/abslibre-tools/librestage:30
-msgid "Usage: %s [REPO]"
-msgstr "Uso: %s [REPO]"
+msgid "Notifying pbot:"
+msgstr "Notificando pbot:"
+
+msgid "Nothing was published"
+msgstr "Nada estuvo publicado"
+
+msgid "This program should be run as unprivileged user"
+msgstr "Este programa debiera ser ejecutado como usuario normal"
+
+msgid "The %s config variable is misconfigured."
+msgstr ""
+
+msgid "The format of %s variables may have changed. Merge the %s file, if "
+ "one is present; and adapt any custom %s to it."
+msgstr "El formato de %s variables puede haber cambiado. Fusionar el %s "
+ "lima, si uno es presente; y adaptar cualquier costumbre %s A él."
+
+msgid "Unfortunately, tilde expansion ('~' home directory) is not supported "
+ "in libretools.conf::TIER0_STAGING"
+msgstr "Desafortunadamente, la expansión del directorio principal del "
+ "`~user` no es (todavía?) soportado en libretools.conf:TIER0_STAGING"
+
+msgid "Usage: %s [-A <arch>] [REPO]"
+msgstr "Uso: %s [-A <arquitectura>] [REPO]"
-#: src/abslibre-tools/librestage:31
msgid "Stages the package(s) build by ./PKGBUILD for upload."
msgstr "Prepara el/los paquete(s) compilado por ./PKGBUILD para subir."
-#: src/abslibre-tools/librestage:33
msgid "The package(s) are staged for the named repository, or the name of "
"the parent directory if a repository is not named."
msgstr "El paquete(s) se preparan para el repositorio nombrado, o el nombre "
"del directorio padre si no se nombra un repositorio."
-#: src/abslibre-tools/librestage:39
msgid "This program should be run as a regular user"
msgstr "Este programa debiera ser ejecutado como usuario normal"
-#: src/abslibre-tools/librestage:58
msgid "PKGBUILD not found"
msgstr "PKGBUILD no encontrado"
-#: src/abslibre-tools/librestage:77
msgid "Waiting for a shared lock on the staging directory"
msgstr "Esperando un bloqueo compartido en el directorio staging"
-#: src/abslibre-tools/librestage:91
msgid "Found package: %s"
msgstr "Encontrado paquete: %s"
-#: src/abslibre-tools/librestage:95
msgid "PACKAGER was not set when building package"
msgstr "PACKAGER no fue configurado cuando se compiló el paquete"
-#: src/abslibre-tools/librestage:100 src/abslibre-tools/librestage:112
-#: src/abslibre-tools/librestage:146
msgid "%s staged on [%s]"
msgstr "%s preparado en [%s]"
-#: src/abslibre-tools/librestage:103 src/abslibre-tools/librestage:115
-#: src/abslibre-tools/librestage:149
msgid "Can't put %s on [%s]"
msgstr "No se puede poner %s en [%s]"
-#: src/abslibre-tools/librestage:108
msgid "Found source package: %s"
msgstr "Encontrado paquete fuente: %s"
-#: src/abslibre-tools/librestage:142
msgid "Found generated source file: %s"
msgstr "Encontrado paquete fuente generado: %s"
-#: src/abslibre-tools/librestage:161
msgid "Nothing was staged"
msgstr "Nada fue preparado para ser subido"
-#: src/aur:26
msgid "Usage: %s [-h] PKGNAME [PKGNAME2 PKGNAME3...]"
msgstr "Uso: %s [-h] PKGNAME [PKGNAME2 PKGNAME3...]"
-#: src/aur:27
msgid "Downloads packages from the AUR, and does basic freedom checks."
msgstr "Descarga paquetes desde el AUR, y hace un chequeo básico de que tan "
"libre es."
-#: src/aur:29
msgid "This script will download packages from AUR to the current directory "
"and check their license for nonfree issues. This does not mean that "
"they are free; they may be incorrectly labeled, or have other "
@@ -464,209 +396,159 @@ msgstr "Este script descargará paquetes desde AUR al directorio actual y "
"los empaquetadores de Parabola, no para ayudar los usuarios a "
"instalar las cosas directamente desde AUR."
-#: src/aur:59
msgid "Processing package: %s"
msgstr "Procesando paquete: %s"
-#: src/aur:64
msgid "%s already exists, will compare with new version."
msgstr "%s ya existe, se comparará con la nueva versión."
-#: src/aur:72
msgid "Downloading"
msgstr "Descargando"
-#: src/aur:77
msgid "Couldn't get %s"
msgstr "No se pudo obtener %s"
-#: src/aur:90
msgid "%s != %s"
msgstr "%s != %s"
-#: src/aur:122
msgid "Checking dependencies"
msgstr "Revisando dependencias"
-#: src/aur:127
msgid "%s: will be downloaded from AUR"
msgstr ""
-#: src/aur:131
msgid "%s: is on repos"
msgstr ""
-#: src/aur:138
msgid "Retrieving missing deps: %s"
msgstr "Recibiendo dependencias faltantes: %s"
-#: src/chroot-tools/arch-nspawn:42 src/chroot-tools/mkarchroot:40
msgid "invalid argument '%s'"
msgstr "argumento inválido '%s'"
-#: src/chroot-tools/arch-nspawn:47
msgid "You must specify a directory."
msgstr "Debe especificar un directorio."
-#: src/chroot-tools/arch-nspawn:53 src/chroot-tools/mkarchroot:52
msgid "Please specify a working directory."
msgstr "Por favor especifique un directorio de trabajo."
-#: src/chroot-tools/arch-nspawn:103
msgid "'%s' does not appear to be an Arch chroot."
msgstr "'%s' no parece ser un chroot de Arch."
-#: src/chroot-tools/arch-nspawn:105
msgid "chroot '%s' is not at version %s. Please rebuild."
msgstr "chroot '%s' no está a la versión %s. Por favor reconstruir."
-#: src/chroot-tools/chcleanup:74
msgid "(chcleanup): Must be run inside of a chroot"
msgstr "(chcleanup): Debe ser ejecutado dentro de un chroot"
-#: src/chroot-tools/chcleanup:96
msgid "Cleaning chroot..."
msgstr "Limpiando un chroot..."
-#: src/chroot-tools/chcleanup:128
msgid "Creating a full list of packages..."
msgstr "Creando una lista completa de paquetes..."
-#: src/chroot-tools/chcleanup:141
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:142
msgid "This is likely caused by a dependency that could not be found."
msgstr ""
-#: src/chroot-tools/chcleanup:153
msgid "No packages to remove"
msgstr "No hay paquetes para remover"
-#: src/chroot-tools/chcleanup:155
msgid "Removing %d packages"
msgstr "Removiendo %d paquetes"
-#: src/chroot-tools/chcleanup:168
msgid "No packages to add"
msgstr ""
-#: src/chroot-tools/chcleanup:170
msgid "Adding %d packages"
msgstr ""
-#: src/chroot-tools/distcc-tool:39
msgid "panic: malformed call to internal function"
msgstr "pánico: llamada malformada a la función interna"
-#: src/chroot-tools/distcc-tool:45 src/chroot-tools/distcc-tool:71
msgid "ERROR:"
msgstr "ERROR:"
-#: src/chroot-tools/distcc-tool:55
msgid "Usage: %q COMMAND [COMMAND-ARGS]"
msgstr "Uso: %q COMANDO [ARGUMENTOS]"
-#: src/chroot-tools/distcc-tool:56
msgid "Tool for using distcc within a networkless chroot"
msgstr "Herramienta para usar distcc dentro de un chroot sin red"
-#: src/chroot-tools/distcc-tool:58 src/chroot-tools/librechroot:276
msgid "Commands:"
msgstr "Comandos:"
-#: src/chroot-tools/distcc-tool:59
msgid " help print this message"
msgstr " ayuda muestra este mensaje"
-#: src/chroot-tools/distcc-tool:60
msgid " odaemon CHROOTPATH daemon to run outside of the chroot"
msgstr " odaemon RUTACHROOT demonio para ejecutar fuera del chroot"
-#: src/chroot-tools/distcc-tool:61
msgid " idaemon DISTCC_HOSTS daemon to run inside of the chroot"
msgstr " ideamon DISTCC_HOSTS demonio para ejecutar dentro del chroot"
-#: src/chroot-tools/distcc-tool:62
msgid " rewrite DISTCC_HOSTS prints a rewritten version of DISTCC_HOSTS"
msgstr " rewrite DISTCC_HOSTS muestra una version reescrita de DISTCC_HOSTS"
-#: src/chroot-tools/distcc-tool:63
msgid " client HOST PORT connects stdio to TCP:$HOST:$PORT"
msgstr " client HOST PORT conecta stdio a TCP:$HOST:$PORT"
-#: src/chroot-tools/distcc-tool:64
msgid "Commands: for internal use"
msgstr "Comandos: para uso interno"
-#: src/chroot-tools/distcc-tool:65
msgid " server counterpart to client; spawned by odaemon"
msgstr " servidor contraparte al cliente; engendrado por "
"odaemon"
-#: src/chroot-tools/distcc-tool:82 src/chroot-tools/distcc-tool:85
-#: src/chroot-tools/distcc-tool:88 src/chroot-tools/distcc-tool:91
msgid "%s: invalid number of arguments"
msgstr "%s: número de argumentos inválido"
-#: src/chroot-tools/distcc-tool:93
msgid "unknown subcommand: %s"
msgstr "subcomando desconocido: %s"
-#: src/chroot-tools/distcc-tool:139
msgid "%q does not support the +zeroconf option"
msgstr "%q no soporta la opción +zeroconf"
-#: src/chroot-tools/distcc-tool:158
msgid "Could not parse HOSTSPEC: %s"
msgstr "No se pudo analizar HOSTSPEC: %s"
-#: src/chroot-tools/hooks-distcc.sh:45
msgid "Auto-generated file already exists, remove it: %s"
msgstr "El archivo generado automáticamente ya existe, quítelo: %s"
-#: src/chroot-tools/librechroot:87
msgid "Cannot cross-compile for %s on %s"
msgstr "No se puede compilar para %s en %s"
-#: src/chroot-tools/librechroot:88
msgid "This requires a binfmt_misc entry for %s."
msgstr ""
-#: src/chroot-tools/librechroot:89
msgid "Such a binfmt_misc entry is provided by the %s package. If you have "
"it installed, but still see this message, you may need to restart %s."
msgstr "Esta entrada binfmt_misc es proporcionada por el paquete %s. Si lo "
"tiene instalado, pero todavía ve este mensaje, puede que tenga que "
"reiniciar %s."
-#: src/chroot-tools/librechroot:205
msgid "Usage: %s [OPTIONS] COMMAND [ARGS...]"
msgstr "Uso: %s [OPCIONES] COMANDO [ARGS...]"
-#: src/chroot-tools/librechroot:206
msgid "Interacts with an archroot (arch chroot)."
msgstr "Interactúa con un archroot (arch chroot)."
-#: src/chroot-tools/librechroot:208
msgid "This is configured with `chroot.conf`, either in `/etc/libretools.d/"
"`, or `$XDG_CONFIG_HOME/libretools/`. The variables you may set are "
"$CHROOTDIR, $CHROOT, and $CHROOTEXTRAPKG."
-msgstr "Esto se configura con `chroot.conf`, en `/etc/libretools.d/`, o `"
- "$XDG_CONFIG_HOME/libretools/`. Las variables que puede establecer "
+msgstr "Esto se configura con `chroot.conf`, en `/etc/libretools.d/`, o "
+ "`$XDG_CONFIG_HOME/libretools/`. Las variables que puede establecer "
"son $CHROOTDIR, $CHROOT, y $CHROOTEXTRAPKG."
-#: src/chroot-tools/librechroot:213
msgid "There may be multiple chroots; they are stored in $CHROOTDIR."
msgstr "Hay múltiples chroots; ellos están guardados en $CHROOTDIR."
-#: src/chroot-tools/librechroot:215
msgid "Each chroot is named; the default is configured with $CHROOT."
msgstr "Cada chroot es nombrado; el predeterminado está configurado con "
"$CHROOT."
-#: src/chroot-tools/librechroot:217
msgid "Each named chroot has a master clean copy (named `root`), and any "
"number of other named copies; the copy used by default is the "
"current username (or $SUDO_USER, or `copy` if root)."
@@ -675,27 +557,22 @@ msgstr "Cada chroot nombrado tiene una copia limpia maestra (llamada "
"utilizada por defecto es el nombre de usuario actual (o $SUDO_USER, "
"o `copy` si es root). "
-#: src/chroot-tools/librechroot:221
msgid "The full path to the chroot copy is \"$CHROOTDIR/$CHROOT/$COPY\", "
"unless the copy name is manually specified as an absolute path, in "
"which case, that path is used."
-msgstr "La ruta completa a la copia de chroot es \"$CHROOTDIR/$CHROOT/$COPY"
- "\", a menos que el nombre de copia se especifique manualmente como "
- "una ruta absoluta, en cuyo caso, esa ruta se utiliza."
+msgstr "La ruta completa a la copia de chroot es \"$CHROOTDIR/$CHROOT/"
+ "$COPY\", a menos que el nombre de copia se especifique manualmente "
+ "como una ruta absoluta, en cuyo caso, esa ruta se utiliza."
-#: src/chroot-tools/librechroot:225
msgid "The current settings for the above variables are:"
msgstr "Los ajustes actuales para las variables anteriores son:"
-#: src/chroot-tools/librechroot:226 src/chroot-tools/librechroot:227
msgid "ERROR: NO SETTING"
msgstr "ERROR: SIN AJUSTES"
-#: src/chroot-tools/librechroot:229 src/chroot-tools/librechroot:230
msgid "ERROR"
msgstr "ERROR "
-#: src/chroot-tools/librechroot:232
msgid "If the chroot or copy does not exist, it will be created "
"automatically. A chroot by default contains the packages in the "
"group \"base-devel\" and any packages named in $CHROOTEXTRAPKG. "
@@ -711,25 +588,20 @@ msgstr "Si el chroot o copia no existe, se creará automáticamente. Un chroot
"en los paquetes, no las versiones de su sistema. Otras herramientas "
"(tales como como libremakepkg) pueden alterar la configuración."
-#: src/chroot-tools/librechroot:240
msgid "This command will make the following configuration changes in the "
"chroot:"
msgstr "Este comando realizará los siguientes cambios de configuración en el "
"chroot:"
-#: src/chroot-tools/librechroot:242
msgid "overwrite `/etc/libretools.d/chroot.conf`"
msgstr "sobreescribir `/etc/libretools.d/chroot.conf`"
-#: src/chroot-tools/librechroot:243
msgid "overwrite `/etc/pacman.d/mirrorlist`"
msgstr "sobreescribir `/etc/pacman.d/mirrorlist`"
-#: src/chroot-tools/librechroot:244
msgid "set `CacheDir` in `/etc/pacman.conf`"
msgstr "establezca `CacheDir` en `/etc/pacman.conf`"
-#: src/chroot-tools/librechroot:245
msgid "If a new `pacman.conf` is inserted with the `-C` flag, the change is "
"made after the file is copied in; the `-C` flag doesn't stop the "
"change from being effective."
@@ -737,300 +609,222 @@ msgstr "Si se inserta un nuevo `pacman.conf` con el indicador `-C`, el "
"cambio es hecho después de que el archivo se copia; el parámetro `-"
"C` no detiene el el cambio de ser eficaz."
-#: src/chroot-tools/librechroot:249
msgid "The processor architecture of the chroot is determined by the by "
"`CARCH` variable in the `/etc/makepkg.conf` file inside of the "
"chroot."
msgstr "La arquitectura del procesador del chroot es determinada por la "
"variable `CATCH` en el archivo `/etc/makepkg.conf` dentro del chroot."
-#: src/chroot-tools/librechroot:253
msgid "The `-A CARCH` flag is *almost* simply an alias for"
msgstr "El indicador `-A CATCH` es *casi* simplemente un alias para"
-#: src/chroot-tools/librechroot:257
-#, fuzzy
-#| msgid "However, before doing that, it actually makes a temporary "
-#| "copy of `pacman.conf`, and sets the `Architecture` line to match the "
-#| "`CARCH` line in `makepkg.conf`."
-msgid "However, before doing that, it actually makes a temporary "
- "copy of `pacman.conf`, and modifies it to:"
-msgstr "Sin embargo, antes de hacer eso, en realidad hace una copia "
- "temporal de `pacman.conf`, y establece la línea `Architecture` para "
- "que coincida con la línea `CARCH` en `makepkg.conf`. "
-
-#: src/chroot-tools/librechroot:259
+msgid "However, before doing that, it actually makes a temporary copy of "
+ "`pacman.conf`, and modifies it to:"
+msgstr "Sin embargo, antes de hacer eso, en realidad hace una copia temporal "
+ "de `pacman.conf`, y establece la línea `Architecture` para que "
+ "coincida con la línea `CARCH` en `makepkg.conf`. "
+
msgid "set `Architecture` to match the `CARCH` line in `makepkg.conf`"
msgstr ""
-#: src/chroot-tools/librechroot:260
msgid "comment out any `Include = /etc/pacman.d/*.conf` lines"
msgstr ""
-#: src/chroot-tools/librechroot:262
msgid "Creating a copy, deleting a copy, or syncing a copy can be fairly "
"slow; but are very fast if $CHROOTDIR is on a btrfs partition."
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:266 src/chroot-tools/libremakepkg:174
msgid "CHROOT"
msgstr "CHROOT"
-#: src/chroot-tools/librechroot:266 src/chroot-tools/libremakepkg:174
msgid "Name of the chroot to use"
msgstr "Nombre del chroot a usar"
-#: src/chroot-tools/librechroot:267 src/chroot-tools/libremakepkg:175
msgid "COPY"
msgstr "COPIA"
-#: src/chroot-tools/librechroot:267
msgid "Name of, or absolute path to, the copy to use"
msgstr "Nombre, o ruta absoluta, de la copia a utilizar"
-#: src/chroot-tools/librechroot:268
msgid "Disable networking in the chroot"
msgstr "Deshabilitar la conexión de redes en el chroot"
-#: src/chroot-tools/librechroot:269
msgid "Copy this file to `$copydir/etc/pacman.conf`"
msgstr "Copiar este archivo a `$copydir/etc/pacman.conf`"
-#: src/chroot-tools/librechroot:269 src/chroot-tools/librechroot:270
-#: src/librefetch/librefetch:84
msgid "FILE"
msgstr "ARCHIVO"
-#: src/chroot-tools/librechroot:270
msgid "Copy this file to `$copydir/etc/makepkg.conf`"
msgstr "Copia este archivo a `$copydir/etc/makepkg.conf`"
-#: src/chroot-tools/librechroot:271
msgid "CARCH"
msgstr "CARCH"
-#: src/chroot-tools/librechroot:271
msgid "Set the architecture of the copy; simply an alias for the `-C` and `-"
"M` flags, see above."
msgstr "Establecer la arquitectura de la copia; simplemente un alias para "
"las opciones `-C` y` -M`, vea arriba."
-#: src/chroot-tools/librechroot:273 src/chroot-tools/libremakepkg:176
msgid "Bind mount a file or directory, read/write"
msgstr "Enlazar un archivo o directorio, lectura/escritura"
-#: src/chroot-tools/librechroot:273 src/chroot-tools/librechroot:274
-#: src/chroot-tools/libremakepkg:176 src/chroot-tools/libremakepkg:177
-#, fuzzy
-#| msgid "PATH[:PATH]"
-msgid "PATH[:INSIDE_PATH[:OPTIONS]]"
-msgstr "RUTA[:RUTA]"
+msgid "PATH[:INSIDE_PATH[:OPTIONS]]"
+msgstr "RUTA[:RUTA_INTERIOR[:OPCIONES]]"
-#: src/chroot-tools/librechroot:274 src/chroot-tools/libremakepkg:177
msgid "Bind mount a file or directory, read-only"
msgstr "Enlazar-montar un archivo o directorio, de solo lectura"
-#: src/chroot-tools/librechroot:277
msgid " Create/copy/delete:"
msgstr " Crear/copiar/eliminar"
-#: src/chroot-tools/librechroot:278
msgid "Do not do anything, but still creates the chroot copy if it does not "
"exist"
msgstr "No hacer nada, pero todavía crea la copia del chroot si no existe"
-#: src/chroot-tools/librechroot:280
msgid "Sync the copy with the clean (`root`) copy"
msgstr "Sincroniza la copia con la copia limpia (`root`)"
-#: src/chroot-tools/librechroot:281
msgid "Delete the chroot copy"
msgstr "Elimina la copia del chroot"
-#: src/chroot-tools/librechroot:282
msgid " Dealing with packages:"
msgstr " Lidiando con paquetes:"
-#: src/chroot-tools/librechroot:283
msgid "FILES..."
msgstr "ARCHIVOS..."
-#: src/chroot-tools/librechroot:283
msgid "Like `pacman -U FILES...`"
msgstr "Como `pacman -U FILES...`"
-#: src/chroot-tools/librechroot:284
msgid "Like `pacman -S NAMES...`"
msgstr "Como `pacman -S NOMBRES...`"
-#: src/chroot-tools/librechroot:284
msgid "NAMES..."
msgstr "NOMBRES..."
-#: src/chroot-tools/librechroot:285
msgid "Like `pacman -Syu`"
msgstr "Como `pacman -Syu`"
-#: src/chroot-tools/librechroot:286
-#, 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:291
+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"
+
msgid " Other:"
msgstr " Otro:"
-#: src/chroot-tools/librechroot:292
msgid "CMD..."
msgstr "CMD..."
-#: src/chroot-tools/librechroot:292
msgid "Run CMD in the chroot copy"
msgstr "Ejecuta CMD en la copia de chroot"
-#: src/chroot-tools/librechroot:293
msgid "Enter an interactive shell in the chroot copy"
msgstr "Entrar a un shell interactivo en la copia de chroot"
-#: src/chroot-tools/librechroot:294
msgid "Clean /repo in the chroot copy"
msgstr "Limpiar /repo en la copia del chroot"
-#: src/chroot-tools/librechroot:321
msgid "Unsupported architecture: %s"
msgstr "Arquitectura no admitida: %s"
-#: src/chroot-tools/librechroot:322
msgid "See the files in %q for valid architectures."
msgstr ""
-#: src/chroot-tools/librechroot:344
msgid "Option -%s may only be given once"
msgstr ""
-#: src/chroot-tools/librechroot:350
msgid "Option -A may not be used together with -C or -M"
msgstr ""
-#: src/chroot-tools/librechroot:356
msgid "Must specify a command"
msgstr "Debe especificar un comando"
-#: src/chroot-tools/librechroot:362
msgid "Unrecognized command: %s"
msgstr "Comando no reconocido: %s"
-#: src/chroot-tools/librechroot:370
msgid "Command `%s` does not take any arguments: %s"
msgstr "El comando `%s` no toma ningún argumento: %s"
-#: src/chroot-tools/librechroot:377
msgid "Command `%s` requires at least one file"
msgstr "El comando `%s` requiere al menos un archivo"
-#: src/chroot-tools/librechroot:389
msgid "%s: file(s) not found: %s"
msgstr "%s: archivo(s) no encontrado(s): %s"
-#: src/chroot-tools/librechroot:396
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:403
msgid "Command `%s` requires at least one argument"
msgstr "El comando `%s` requiere al menos un argumento"
-#: src/chroot-tools/librechroot:426
msgid "This program must be run as root."
msgstr "Este programa debe ser ejecutado como root."
-#: src/chroot-tools/librechroot:435 src/chroot-tools/libremakepkg:288
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:439
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:444
msgid "Creating 'root' copy for chroot [%s]"
msgstr "Creando copia 'root' para el chroot [%s]"
-#: src/chroot-tools/librechroot:450
msgid "Syncing copy [%s] with root copy"
msgstr "Sincronizando copia [%s] con la copia root"
-#: src/chroot-tools/libremakepkg:66
msgid "Copying log and package files out of the chroot..."
msgstr "Copiando archivos de registro y del paquete fuera del chroot..."
-#: src/chroot-tools/libremakepkg:86
msgid "Failure(s) in %s: %s"
msgstr "Falla(s) en %s: %s"
-#: src/chroot-tools/libremakepkg:146
msgid "Usage: %s [options]"
msgstr "Uso: %s [opciones]"
-#: src/chroot-tools/libremakepkg:147
msgid "This program will build your package."
msgstr "Este programa compilará su paquete."
-#: src/chroot-tools/libremakepkg:149
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:151
msgid "whatever changes `librechroot` makes."
msgstr "cualquier cambio que `librechroot` haga."
-#: src/chroot-tools/libremakepkg:152
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:153
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:155
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:157
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:158
msgid "set `keyserver-options` in `~builduser/.gnupg/gpg.conf`"
msgstr "establecer `keyserver-options` en `~builduser/.gnupg/gpg.conf`"
-#: src/chroot-tools/libremakepkg:159
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:160
msgid "add a pacman repositoriy of locally built packages"
msgstr "agrega un repositorio pacman de los paquetes compilados localmente"
-#: src/chroot-tools/libremakepkg:162
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 "
@@ -1042,244 +836,187 @@ 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:168
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:173
msgid "librechroot options:"
msgstr ""
-#: src/chroot-tools/libremakepkg:175
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:179
msgid "libremakepkg options:"
msgstr ""
-#: src/chroot-tools/libremakepkg:180
-#, 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:184
+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."
+
+msgid "Don't make the startdir read-only. PLEASE don't use this unless you "
+ "have a special reason, its use is a violation of Parabola policy."
+msgstr ""
+
msgid "Repackage contents of the package without rebuilding"
msgstr "Reempaqueta los contenidos del paquete sin recompilar"
-#: src/chroot-tools/libremakepkg:186
msgid "SRCPKGFILE"
msgstr ""
-#: src/chroot-tools/libremakepkg:186
msgid "Use an existing --allsource source-package"
msgstr ""
-#: src/chroot-tools/libremakepkg:193
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:223
msgid "Extra arguments: %s"
msgstr "Argumentos extras: %s"
-#: src/chroot-tools/libremakepkg:255
msgid "This program must be run as root"
msgstr "Este programa debe ejecutarse como root"
-#: src/chroot-tools/libremakepkg:261
msgid "Source package does not exist: %s"
msgstr ""
-#: src/chroot-tools/libremakepkg:267
msgid "PKGBUILD does not exist."
msgstr "El PKGBUILD no existe."
-#: src/chroot-tools/libremakepkg:279
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:290
msgid "Initializing the chroot..."
msgstr "Iniciando el chroot..."
-#: src/chroot-tools/libremakepkg:300
msgid "Starting pre-build activities..."
msgstr "Iniciando actividades previas a la compilación..."
-#: src/chroot-tools/libremakepkg:304
msgid "Using existing source package %s"
msgstr ""
-#: src/chroot-tools/libremakepkg:307
msgid "Downloading sources..."
msgstr "Descargando las fuentes..."
-#: src/chroot-tools/libremakepkg:315
msgid "Something went funny with makepkg --allsource"
msgstr ""
-#: src/chroot-tools/libremakepkg:335
msgid "Starting to build the package..."
msgstr "Comenzando a compilar el paquete..."
-#: src/chroot-tools/libremakepkg:340
msgid "Starting post-build activities..."
msgstr "Iniciando actividades posteriores a la compilación..."
-#: src/chroot-tools/makechrootpkg.sh:85
msgid "Cannot sync copy with itself: %s"
msgstr "No se puede sincronizar la copia consigo mismo: %s"
-#: src/chroot-tools/makechrootpkg.sh:92
msgid "Locking clean chroot [%s]"
msgstr "Bloqueando el chroot limpio [%s]"
-#: src/chroot-tools/makechrootpkg.sh:94
msgid "Synchronizing chroot copy [%s] -> [%s]"
msgstr "Sincronizando copia del chroot [%s] -> [%s]"
-#: src/chroot-tools/makechrootpkg.sh:98 src/chroot-tools/makechrootpkg.sh:127
msgid "Unable to delete subvolume %s"
msgstr "No se puede eliminar el subvolumen %s"
-#: src/chroot-tools/makechrootpkg.sh:102 src/chroot-tools/makechrootpkg.sh:131
msgid "Unable to delete %s"
msgstr "No se puede eliminar %s"
-#: src/chroot-tools/makechrootpkg.sh:105
msgid "Unable to create subvolume %s"
msgstr "No se puede crear el subvolumen %s"
-#: src/chroot-tools/makechrootpkg.sh:124
msgid "Removing chroot copy [%s]"
msgstr "Eliminando copia del chroot [%s]"
-#: src/chroot-tools/makechrootpkg.sh:276
msgid "Could not download sources."
msgstr "No se pudo descargar las fuentes."
-#: 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:360
msgid "Invalid makepkg user."
msgstr "Usuario makepkg inválido."
-#: 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: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:407
msgid "Locking chroot copy [%s]"
msgstr "Bloqueando copia del chroot [%s]"
-#: 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:448
msgid "Build failed"
msgstr "Compilación fallida"
-#: src/chroot-tools/makechrootpkg.sh:450
msgid "Build failed, check %s/build"
msgstr "Compilación fallida, revise %s/build"
-#: src/chroot-tools/mkarchroot:45
msgid "You must specify a directory and one or more packages."
msgstr "Debe especificar un directorio y uno o más paquetes."
-#: src/chroot-tools/mkarchroot:62
msgid "Working directory '%s' already exists"
msgstr "El directorio de trabajo '%s' ya existe"
-#: src/chroot-tools/mkarchroot:66
msgid "Locking chroot"
msgstr "Bloqueando chroot"
-#: src/chroot-tools/mkarchroot:71
msgid "Couldn't create subvolume for '%s'"
msgstr "No se pudo crear el subvolumen para '%s'"
-#: src/chroot-tools/mkarchroot:87
msgid "Failed to install all packages"
msgstr "Fallo al instalar todos los paquetes"
-#: src/dagpkg:45
msgid "error!"
msgstr "error!"
-#: src/dagpkg:47
msgid "(%s) %s (leftovers on %s)"
msgstr "(%s) %s (restos en %s)"
-#: src/dagpkg:56
msgid "No PKGBUILD in %s"
msgstr "No hay PKGBUILD in %s"
-#: src/dagpkg:93
msgid "cycle found with %s depending on %s"
msgstr "ciclo encontrado con %s dependiendo de %s"
-#: src/dagpkg:101
msgid "%s (%s)"
msgstr "%s (%s)"
-#: src/dagpkg:104
msgid "%s isn't ported to %s yet"
msgstr "%s no a sido portado a %s aún"
-#: src/dagpkg:109
msgid "%s ignored"
msgstr "%s ignorado"
-#: src/dagpkg:169
msgid "Resuming build..."
msgstr "Reanudando compilación..."
-#: src/dagpkg:178
msgid "tried to build %s twice"
msgstr "se intentó compilar %s dos veces"
-#: src/dagpkg:193
msgid "%s(%s)"
msgstr "%s(%s)"
-#: src/dagpkg:195
msgid "Building %s"
msgstr "Compilando %s"
-#: src/dagpkg:225
msgid "done"
msgstr "hecho"
-#: src/devtools/checkpkg:9 src/devtools/lddd:10
msgid "Usage: %s [-h]"
msgstr "Uso: %s [-h]"
-#: src/devtools/checkpkg:10
msgid "Compare a locally built a package with the one in the repositories."
msgstr "Compara un paquete compilado localmente con uno en los repositorios."
-#: src/devtools/checkpkg:12
msgid "This should be run from a directory containing a PKGBUILD. It "
"searches for a locally built package corresponding to the PKGBUILD, "
"and downloads the last version of that package from the pacman "
@@ -1293,58 +1030,45 @@ msgstr "Esto debería ejecutarse desde un directorio con un PKGBUILD. Busca "
"versión del paquete. Lo hace para cada parte de un paquete separado "
"(split package)."
-#: src/devtools/checkpkg:34
msgid "/etc/makepkg.conf not found!"
msgstr "/etc/makepkg.conf no encontrado!"
-#: src/devtools/checkpkg:47
msgid "This must be run in the directory of a built package."
msgstr "Esto debe ser ejecutado en el directorio de un paquete compilado."
-#: src/devtools/checkpkg:64
msgid "tarball not found for package: %s"
msgstr "tarball para el paquete no encontrado: %s"
-#: src/devtools/checkpkg:70
msgid "Couldn't download previous package for %s."
msgstr "No se pudo descargar el paquete previo para %s."
-#: src/devtools/checkpkg:75
msgid "The built package (%s) is the one in the repo right now!"
msgstr "El paquete compilado (%s) es el que está en los repositorios justo "
"ahora!"
-#: src/devtools/checkpkg:99
msgid "No soname differences for %s."
msgstr "No hay diferencias de soname para %s"
-#: src/devtools/checkpkg:103 src/devtools/lddd:65
msgid "Files saved to %s"
msgstr "Archivos guardados en %s"
-#: src/devtools/find-libdeps:20
msgid "Unknown mode %s"
msgstr "Modo %s desconocido"
-#: src/devtools/find-libdeps:24
msgid "Usage: find-lib(deps|provides) [options] <package file|extracted "
"package dir>"
msgstr "Uso: encontrar-lib(deps|provee) [opciones] <archivo del paquete|"
"directorio del paquete extraído>"
-#: src/devtools/find-libdeps:25
msgid "Find library dependencies or provides of a package."
msgstr "Encontrar dependencias de librería o provee de un paquete."
-#: src/devtools/find-libdeps:27
msgid "Prints a list of library dependencies in the format:"
msgstr "Muestra una lista de dependencias de librería en el formato:"
-#: src/devtools/find-libdeps:29
msgid " <soname>=<soversion>-<soarch>"
msgstr ""
-#: src/devtools/find-libdeps:31
msgid "Where <soversion> is the shared library version, or <soname> "
"repeated if there is no version attached; and <soarch> is the "
"architecture of the library (either `32` or `64`, based on the ELF "
@@ -1354,106 +1078,83 @@ msgstr "Donde <soversion> es la versión de la librería compartida, o "
"arquitectura de la librería (ya sea `32` o`64`, basada en la Clase "
"ELF)"
-#: src/devtools/find-libdeps:37
msgid "Ignore internal libraries; libraries without a version attached"
msgstr "Ignorar librerías internas; librerías sin una versión adjunta"
-#: src/devtools/finddeps:12
msgid "Usage: %s <depname>"
msgstr "Uso: %s <depname>"
-#: src/devtools/finddeps:13
msgid "Find packages that depend on a given depname."
msgstr "Encontrar paquetes dependientes en un depname dado."
-#: src/devtools/finddeps:15
msgid "Run this script from the top-level directory of your ABS tree."
msgstr "Ejecutar este script desde el directorio de nivel superior de tu "
"árbol ABS."
-#: src/devtools/lddd:11
msgid "Find broken library links on your machine."
msgstr "Encuentra una librería rota en tu máquina."
-#: src/devtools/lddd:13
msgid "Scans $PATH and library directories for ELF files with references to "
"missing shared libraries."
msgstr "Escanea $PATH y directorios de librería para archivos ELF con "
"referencias a librerías compartidas faltantes"
-#: src/devtools/lddd:33
msgid "Go out and drink some tea, this will take a while :) ..."
msgstr "Sal y toma un poco de té, esto llevará un tiempo :) ..."
-#: src/devtools/lddd:36
msgid "DIR %s"
msgstr "DIRECTORIO %s"
-#: src/is_built:26
msgid "Usage: %s [-h] PKGNAME [PKGVER]"
msgstr "Uso: %s [-h] PKGNAME [PKGVER]"
-#: src/is_built:27
msgid "Detect if a given package (version) is already in the repos"
msgstr "Detectar si un paquete dado (versión) ya está en los repositorios"
-#: src/is_built:29
msgid "If a version is specified, it assumed that you want a greater or "
"equal version."
msgstr "Si una versión se especifica, se asume que usted quiere una versión "
"mayor o igual."
-#: src/is_built:32 src/librefetch/librefetch:77
msgid "Example usage:"
msgstr "Ejemplo de uso:"
-#: src/is_built:35
msgid "Exit status:"
msgstr ""
-#: src/is_built:36
msgid " 0: The package is built"
msgstr "0: El paquete está compilado"
-#: src/is_built:37
msgid " 1: The package has not built"
msgstr "1: El paquete no se ha compilado"
-#: src/is_built:38
msgid " >1: There was an error"
msgstr ">1: Ocurrió un error"
-#: src/librefetch/librefetch:45
msgid "Usage: %s [OPTIONS] SOURCE_URL [OUTPUT_FILE]"
msgstr "Uso: %s [OPCIONES] URL_FUENTE [ARCHIVO_RESULTANTE]"
-#: src/librefetch/librefetch:46
msgid "Usage: %s -[g|S|M|h]"
msgstr "Uso: %s -[g|S|M|h]"
-#: src/librefetch/librefetch:47
msgid "Downloads or creates a liberated source tarball."
msgstr "Descarga o crea un tarball fuente liberado."
-#: src/librefetch/librefetch:49
msgid "The default mode is to create OUTPUT_FILE, first by trying download "
"mode, then create mode."
msgstr "El modo predeterminado es crear ARCHIVO_RESULTANTE, primero "
"intentando el modo descarga, luego el modo crear."
-#: src/librefetch/librefetch:52
msgid "If OUTPUT_FILE isn't specified, it defaults to the non-directory "
"part of SOURCE_URL, in the current directory."
msgstr "Si ARCHIVO_RESULTANTE no es especificado, se predetermina al la "
"parte no-directorio de URL_FUENTE, en el directorio actual."
-#: src/librefetch/librefetch:55
msgid "Unless '-C' is specified, if SOURCE_URL does not begin with a "
"configured mirror, create mode is inhibited."
msgstr "A menos que se especifique '-C', si URL_FUENTE no comienza con un "
"espejo (mirror) configurado, el modo de creación está inhibido."
-#: src/librefetch/librefetch:58
msgid "In download mode, it simply tries to download SOURCE_URL. At the "
"beginning of a URL, 'libre://' expands to the first configured "
"mirror."
@@ -1461,7 +1162,6 @@ msgstr "En el modo de descarga, simplemente intenta descargar URL_FUENTE. En "
"el principio de una URL, 'libre://' se expande al primer espejo "
"configurado."
-#: src/librefetch/librefetch:62
msgid "In create mode, it either looks at a build script and uses that to "
"create the source tarball, or it uses GPG to create a signature (if "
"OUTPUT_FILE ends with `.sig` or `.sig.part`). If it is using GPG to "
@@ -1478,206 +1178,157 @@ msgstr "En el modo de creación, mira un script de compilación y lo usa para "
"valor predeterminado de ARCHIVO_RESULTANTE, y que puede usarse "
"cuando se repiten."
-#: src/librefetch/librefetch:71
msgid "The default build script is 'PKGBUILD', or 'SRCBUILD' if it exists."
msgstr "El script de compilación es 'PKGBUILD', o 'SRCBUILD' si existe."
-#: src/librefetch/librefetch:74
msgid "Other options, if they are valid `makepkg` options, are passed "
"straight to makepkg."
msgstr "Otras opciones, si son opciones `makepkg` válidas, se pasan directo "
"a makepkg."
-#: src/librefetch/librefetch:78
msgid " $ %s https://repo.parabola.nu/other/mypackage/mypackage-1.0.tar.gz"
msgstr " $ %s https://repo.parabola.nu/other/mipaquete/mipaquete-1.0.tar.gz"
-#: src/librefetch/librefetch:81
msgid "Settings:"
msgstr "Configuraciones:"
-#: src/librefetch/librefetch:82
msgid "Force create mode (don't download)"
msgstr "Forzar el modo crear (no descargar)"
-#: src/librefetch/librefetch:83
msgid "Force download mode (don't create)"
msgstr "Forzar el modo descarga (no crear)"
-#: src/librefetch/librefetch:84
msgid "Use an alternate build script (instead of 'PKGBUILD'). If an "
"SRCBUILD exists in the same directory, it is used instead"
msgstr "Usa un script de compilación alternativo (en vez de 'PKGBUILD'). Si "
"un SRCBUILD existe en el mismo directorio, es usado en su lugar"
-#: src/librefetch/librefetch:87
msgid "Alternate modes:"
msgstr "Modos alternos:"
-#: src/librefetch/librefetch:88
msgid "Generate integrity checks for source files"
msgstr "Genera verificaciones de integridad para los archivos fuente"
-#: src/librefetch/librefetch:89
msgid "Print the effective build script (SRCBUILD)"
msgstr "Imprime el script de compilación efectivo (SRCBUILD)"
-#: src/librefetch/librefetch:90
msgid "Generate and print the location of the effective makepkg script"
msgstr "Genera e imprime la localización del script de makepkg efectivo"
-#: src/librefetch/librefetch:136
msgid "%s does not exist."
msgstr "%s no existe."
-#: src/librefetch/librefetch:297
msgid "%s: found extra non-flag arguments: %s"
msgstr "%: se encontraron argumentos no-opciones extras: %s"
-#: src/librefetch/librefetch:303
msgid "%s: %d non-flag arguments found, expected 1 or 2: %s"
msgstr "%s: %d argumentos no-opciones encontrados, esperado 1 o 2: %s"
-#: src/librefetch/librefetch-install:49
msgid ":: %s: removing librefetch from %q"
msgstr ":: %s: quitando librefetch de %q"
-#: src/librefetch/librefetch-install:59
msgid "Usage: %s remove MAKEPKG_CONF_FILE"
msgstr "Uso: %s remove ARCHIVO_CONF_DE_MAKEPKG"
-#: src/librefetch/librefetch-install:60
msgid "Removes librefetch to/from makepkg.conf:DLAGENTS"
msgstr "Quita librefetch a/de makepkg.conf:DLAGENTS"
-#: src/librefetch/librefetch-install:70
msgid "%s: does not exist: %q"
msgstr "%s: no existe: %q"
-#: src/librefetch/librefetch-install:73
msgid "%s: cannot write to file: %q"
msgstr "%s: no se puede escribir al archivo: %q"
-#: src/pkgbuild-check-nonfree:35
msgid "Usage: %s [OPTIONS] [PKGBUILD1 PKGBUILD2 ...]"
msgstr "Uso: %s [OPCIONES] [PKGBUILD1 PKGBUILD2 ...]"
-#: src/pkgbuild-check-nonfree:36
msgid "Analyzes a PKGBUILD for freedom issues"
msgstr "Analiza un PKGBUILD para problemas de libertad"
-#: src/pkgbuild-check-nonfree:38
msgid "If no PKGBUILD is specified, `./PKGBUILD` is implied."
msgstr "Si ningún PKGBUILD es especificado, `./PKGBUILD` es implicado."
-#: src/pkgbuild-check-nonfree:40
msgid "Exit status (add them for combinations):"
msgstr "Exit status (agréguelos para las combinaciones):"
-#: src/pkgbuild-check-nonfree:41
msgid " 0: Everything OK, no freedom issues"
msgstr " 0: Todo OK, sin problemas de libertad"
-#: src/pkgbuild-check-nonfree:42
msgid " 1: Ran with error"
msgstr " 1: Se ejecutó con errores"
-#: src/pkgbuild-check-nonfree:43
msgid "Warning-level freedom issues:"
msgstr "Problemas de libertad de nivel de advertencia:"
-#: src/pkgbuild-check-nonfree:44
msgid " 2: Uses unrecognized licenses, check them"
msgstr " 2: Usa licencias no reconocidas, revíselas"
-#: src/pkgbuild-check-nonfree:45
msgid " 4: Uses GPL-incompatible licenses"
msgstr " 4: Usa licencias incompatibles con la GPL"
-#: src/pkgbuild-check-nonfree:46
msgid "Error-level freedom issues:"
msgstr "Problemas de libertad de nivel de error:"
-#: src/pkgbuild-check-nonfree:47
msgid " 8: Uses known unacceptable licenses"
msgstr " 8: Usa licencias inaceptables conocidas"
-#: src/pkgbuild-check-nonfree:48
msgid " 16: Has nonfree dependencies"
msgstr " 16: Tiene dependencias no-libres"
-#: src/pkgbuild-check-nonfree:49
msgid " 32: Is a known nonfree package"
msgstr " 32: Es un paquete no-libre conocido"
-#: src/pkgbuild-check-nonfree:52
msgid "Use the cached blacklist, do not try downloading"
msgstr "Usa el blacklist de la caché, no intenta descargarlo"
-#: src/pkgbuild-check-nonfree:53
msgid "Allow running as root user"
msgstr "Permitir ejecutar como usuario root"
-#: src/pkgbuild-check-nonfree:55 src/pkgbuild-summarize-nonfree:40
msgid "Be quiet"
msgstr "Ser silencioso"
-#: src/pkgbuild-check-nonfree:56 src/toru/toru-path:49
msgid "Be verbose"
msgstr "Ser verboso"
-#: src/pkgbuild-check-nonfree:93
msgid "Run as normal user, or use the -f option to run as root."
msgstr "Ejecutar como usuario normal, o usar la opción -f para ejecutar como "
"root"
-#: src/pkgbuild-check-nonfree:171
msgid "The 4-clause BSD license is free but has practical problems."
msgstr "La licencia BSD 4-clause es libre pero tiene problemas prácticos."
-#: src/pkgbuild-check-nonfree:174
msgid "License 'BSD' is ambiguous, use 'BSD{1..4}' to specify the number of "
"clauses."
msgstr "La licencia 'BSD' es ambigua, utilice 'BSD{1..4}' para especificar "
"el número de cláusulas"
-#: src/pkgbuild-check-nonfree:177
msgid "License '%s' is a known non-free license."
msgstr "La licencia '%s' es una licencia no-libre conocida."
-#: src/pkgbuild-check-nonfree:180
msgid "License '%s' is not a common (recognized) license."
msgstr "La licencia '%s' no es una licencia (reconocida) común."
-#: src/pkgbuild-check-nonfree:202
msgid "%s: blacklisted"
msgstr ""
-#: src/pkgbuild-check-nonfree:248
msgid "Inspecting package pkgname=%q (%s)"
msgstr "Inspeccionando paquete pkgname=%q (%s)"
-#: src/pkgbuild-check-nonfree:250
msgid "Inspecting split package pkgbase=%q (%s)"
msgstr "Inspeccionando el paquete separado pkgbase=%q (%s)"
-#: src/pkgbuild-check-nonfree:272 src/pkgbuild-check-nonfree:301
msgid "The license array is empty"
msgstr "El array de la licencia está vacío"
-#: src/pkgbuild-check-nonfree:280
msgid "Inspecting split package pkgname=%q (%s)"
msgstr "Inspeccionando paquete divido pkgname=%q (%s)"
-#: src/pkgbuild-summarize-nonfree:32
msgid "Usage: %s [OPTIONS] STATUS"
msgstr "Uso: %s [OPCIONES] STATUS"
-#: src/pkgbuild-summarize-nonfree:33
msgid "Summarizes a status code from pkgbuild-check-nonfree"
msgstr "Resume un código de status desde pkgbuild-check-nonfree"
-#: src/pkgbuild-summarize-nonfree:35
msgid "It thresholds the issues it finds, only failing for error-level "
"issues, and ignoring warnings. Unless `-q` is specified, it also "
"prints a summary of the issues it found."
@@ -1686,147 +1337,113 @@ msgstr "Limita los problemas que encuentra, solo fallando con poblemas de "
"especifique `-q`, también imprime un resumen de los problemas que "
"encontraron."
-#: src/pkgbuild-summarize-nonfree:59
msgid "STATUS must be an integer"
msgstr "STATUS debe ser un entero"
-#: src/pkgbuild-summarize-nonfree:83
msgid "There was an error processing the PKGBUILD"
msgstr "Ocurrió un error al procesar el PKGBUILD"
-#: src/pkgbuild-summarize-nonfree:86
msgid "This PKGBUILD has an unknown license"
msgstr "Este PKGBUILD tiene una licencia desconocida"
-#: src/pkgbuild-summarize-nonfree:88
msgid "This PKGBUILD has a GPL-incompatible license"
msgstr "Este PKGBUILD tiene una licencia incompatible con la GPL"
-#: src/pkgbuild-summarize-nonfree:90
msgid "This PKGBUILD has a known nonfree license"
msgstr "Este PKGBUILD tiene una licencia no-libre conocida"
-#: src/pkgbuild-summarize-nonfree:93
msgid "This PKGBUILD depends on known nonfree packages"
msgstr "Este PKGBUILD depende en paquetes no-libres conocidos"
-#: src/pkgbuild-summarize-nonfree:96
msgid "This PKGBUILD is for a known nonfree package"
msgstr "Este PKGBUILD es para un paquete no-libre conocido"
-#: src/repo-diff:25
msgid "Usage: %s arch/core/i686 parabola/core/i686"
msgstr "Uso: %s arch/core/i686 parabola/core/i686"
-#: src/repo-diff:26
msgid "Compares two repo databases using distro/repo/architecture format."
msgstr "Compara dos bases de datos de repositorios usando el formato distro/"
"repo/arquitectura."
-#: src/repo-diff:28
msgid "Shortcuts:"
msgstr "Atajos:"
-#: src/repo-diff:29
msgid "expands to Arch Linux repo url"
msgstr "se expande a la URL del repositorio de Arch Linux"
-#: src/repo-diff:30
msgid "expands to Parabola GNU/Linux-libre repo url"
msgstr "se expande a la URL del repositorio de Parabola GNU/Linux-libre"
-#: src/repo-diff:73
msgid "Difference between %s and %s"
msgstr "Diferencia entre %s y %s"
-#: src/repo-diff:84
msgid "Difference save on %s"
msgstr "Diferencia guardada en %s"
-#: src/toru/toru-info:31
msgid "Errors on %s"
msgstr "Errores en %s"
-#: src/toru/toru-info:38
msgid "%s/%s %s-%s"
msgstr "%s/%s %s-%s"
-#: src/toru/toru-info:41
msgid "Depends: %s"
msgstr "Depende: %s"
-#: src/toru/toru-info:43
msgid "%s doesn't exist"
msgstr "%s no existe"
-#: src/toru/toru-path:27
msgid "Usage: [T=$TORUPATH] [V=true] [F=true] %q [-h]"
msgstr "Uso: [T=$TORUPATH] [V=verdadero] [F=verdadero] %q [-h]"
-#: src/toru/toru-path:28
msgid "Create/update the `$TORUPATH/paths.tch` database."
msgstr "Crea/actualiza la base de datos `$TORUPATH/paths.tch`."
-#: src/toru/toru-path:30
msgid "The file `%s` is a Tokyo Cabinet database a mapping between paths to "
"PKGBUILD files and `pkgname`s and `pkgbase`s. PKGBUILD files are "
"scanned for in `$ABSROOT` in each of `$REPOS`."
msgstr "El archivo `%s` es una base de datos del Gabinete de Tokio asignando "
"entre las rutas a archivos PKGBUILD y `pkgname`s y `pkgbase`s. Los "
- "archivos PKGBUILD son escaneados en `$ ABSROOT` en cada uno de los `"
- "$REPOS`."
+ "archivos PKGBUILD son escaneados en `$ ABSROOT` en cada uno de los "
+ "`$REPOS`."
-#: src/toru/toru-path:35
msgid "Additionally, it creates a timestamp file at `%s`, so that skip "
"PKGBUILD files that have not changed since the previous invocation."
msgstr "Además, crea un archivo de marca de tiempo en `%s`, por lo que omite "
"archivos PKGBUILD que no han cambiado desde la invocación anterior."
-#: src/toru/toru-path:40
msgid "Configuration:"
msgstr "Configuración:"
-#: src/toru/toru-path:42
msgid "Where to store `paths.tch`"
msgstr "Donde guardar `paths.tch`"
-#: src/toru/toru-path:43
msgid "Which repositories to consider from `$ABSROOT`"
msgstr "Que repositorios considerar desde `$ABSROOT`"
-#: src/toru/toru-path:44
msgid "Where to find PKGBUILD files"
msgstr "Donde encontrar los archivos PKGBUILD "
-#: src/toru/toru-path:48
msgid "Override libretools.conf:TORUPATH"
msgstr "Anular libretools.conf:TORUPATH"
-#: src/toru/toru-path:50
msgid "Ignore timestamps; force re-scan all PKGBUILDs"
msgstr "Ignorar las marcas de tiempo; volver a escanear todos los PKGBUILDs"
-#: src/toru/toru-path:81
msgid "Toru's path isn't writable. Please check your TORUPATH: %q"
msgstr "La ruta de Toru no se puede escribir. Por favor, compruebe su "
"TORUPATH: %q"
-#: src/toru/toru-path:97
msgid "Processing [%s]"
msgstr "Procesando [%s]"
-#: src/toru/toru-path:115
msgid "Updating path cache"
msgstr "Actualizando la ruta del caché"
-#: src/toru/toru-path:116
msgid "%d PKGBUILDs to update"
msgstr "%d PKGBUILDs para actualizar"
-#: src/toru/toru-path:121
msgid "%q contains errors, skipping"
msgstr "%q contiene errores, omitiendo"
-#: src/toru/toru-path:128
msgid "%s -> %s"
msgstr "%s -> %s"
diff --git a/src/abslibre-tools/libredbdiff b/src/abslibre-tools/libredbdiff
index 28031a2..b5e6331 100755
--- a/src/abslibre-tools/libredbdiff
+++ b/src/abslibre-tools/libredbdiff
@@ -3,6 +3,7 @@
#
# Copyright (C) 2014 Esteban Carnevale <alfplayer@mailoo.org>
# Copyright (C) 2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2018 Omar Vega Ramos <ovruni@gnu.org.pe>
#
# License: GNU GPLv3+
#
diff --git a/src/abslibre-tools/libredbdiff.conf b/src/abslibre-tools/libredbdiff.conf
index d92a832..23c8c2d 100644
--- a/src/abslibre-tools/libredbdiff.conf
+++ b/src/abslibre-tools/libredbdiff.conf
@@ -3,7 +3,7 @@
statedir='/var/lib/libredbdiff'
-mirror_prbl='https://repomirror.parabola.nu/$repo/os/$arch'
+mirror_prbl='https://repo.parabola.nu/$repo/os/$arch'
mirror_arch='https://mirrors.kernel.org/archlinux/$repo/os/$arch'
repos=(libre{,-multilib} pcr{,-multilib} nonprism{,-multilib})
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index 8ebdc54..cb07229 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -1,24 +1,25 @@
#!/usr/bin/env bash
-# Librerelease
-# Uploads packages and releases them
-# Copyright (C) 2010-2012 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
-# Copyright (C) 2010-2013 Nicolás Reynolds <fauno@parabola.nu>
-# Copyright (C) 2013 Michał Masłowski <mtjm@mtjm.eu>
-# Copyright (C) 2013-2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
+# librerelease - uploads packages to the repo server and publishes them
+#
+# Copyright (C) 2010-2012 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
+# Copyright (C) 2010-2013 Nicolás Reynolds <fauno@parabola.nu>
+# Copyright (C) 2013 Michał Masłowski <mtjm@mtjm.eu>
+# Copyright (C) 2013-2014,2017-2018,2024 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2019-2020,2022-2024 Bill Auger <mr.j.spam.me@gmail.com>
#
# For just the create_signature() function:
# Copyright (C) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org>
# Copyright (C) 2002-2006 Judd Vinet <jvinet@zeroflux.org>
-# Copyright (C) 2005 Aurelien Foret <orelien@chez.com>
-# Copyright (C) 2006 Miklos Vajna <vmiklos@frugalware.org>
-# Copyright (C) 2005 Christian Hamar <krics@linuxforum.hu>
-# Copyright (C) 2006 Alex Smith <alex@alex-smith.me.uk>
-# Copyright (C) 2006 Andras Voroskoi <voroskoi@frugalware.org>
+# Copyright (C) 2005 Aurelien Foret <orelien@chez.com>
+# Copyright (C) 2006 Miklos Vajna <vmiklos@frugalware.org>
+# Copyright (C) 2005 Christian Hamar <krics@linuxforum.hu>
+# Copyright (C) 2006 Alex Smith <alex@alex-smith.me.uk>
+# Copyright (C) 2006 Andras Voroskoi <voroskoi@frugalware.org>
#
-# License: GNU GPLv3+
+# SPDX-License-Identifier: GPL-3.0-or-later
#
-# This file is part of Parabola.
+# This file is part of Parabola Libretools.
#
# Parabola is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -36,14 +37,16 @@
# create_signature() is taken from pacman:makepkg, which is GPLv2+,
# so we take the '+' to combine it with our GPLv3+.
+
set -euE
-. "$(librelib messages)"
-. "$(librelib conf)"
-setup_traps
-dryrun=""
-upload_only=false
-readonly rsync_flags=(
+source "$(librelib conf )" # LIBREUSER, load_conf()
+source "$(librelib messages )" # setup_traps(), msg(), msg2() error(), print(), prose(), flag()
+source "$(librelib notifications)" # notify_release()
+
+
+declare -ri STAGING_LOCK=8
+declare -ra RSYNC_FLAGS=(
--no-group
--no-perms
--copy-links
@@ -52,17 +55,34 @@ readonly rsync_flags=(
--human-readable
--progress
)
+DRY_RUN='' # main()
+UPLOAD_ONLY='' # main()
+TIER0_HOST='' # main()
+TIER0_STAGING='' # main()
+TIER0_LOGIN='' # main()
+TIER0_PORT='' # main()
+SSH_CMD='' # main()
+RSYNC_DEST='' # main()
+
-# Functions ####################################################################
+## helpers ##
+
+lock_staging() {
+ lock $STAGING_LOCK "${WORKDIR}/staging.lock" \
+ "Waiting for an exclusive lock on the staging directory ...."
+}
+
+unlock_staging() {
+ lock_close $STAGING_LOCK
+}
list0_files() {
find -L "${WORKDIR}/staging" -type f -not -name '*.lock' \
- -exec realpath -z --relative-to="${WORKDIR}/staging" {} +
+ -exec realpath -z --relative-to="${WORKDIR}/staging" {} + | sort -z
}
# This function is taken almost verbatim from makepkg
create_signature() {
- local ret=$EXIT_SUCCESS
local filename="$1"
msg "Signing package..."
@@ -71,14 +91,13 @@ create_signature() {
SIGNWITHKEY=(-u "${GPGKEY}")
fi
- gpg --detach-sign --use-agent "${SIGNWITHKEY[@]}" --no-armor "$filename" &>/dev/null || ret=$EXIT_FAILURE
-
-
- if (( ! ret )); then
+ if gpg --detach-sign --use-agent "${SIGNWITHKEY[@]}" \
+ --no-armor "$filename" &>/dev/null ; then
msg2 "Created signature file %s." "$filename.sig"
+ return $EXIT_SUCCESS
else
error "Failed to sign package file."
- return $ret
+ return $EXIT_FAILURE
fi
}
@@ -106,118 +125,52 @@ sign_packages() {
# Clean everything if not in dry-run mode
clean_files() (
local file_list=$1
+ local rmcmd
- local rmcmd=(rm -fv)
- if [[ -n "${dryrun}" ]]; then
- rmcmd=(printf "$(_ "removed '%s' (dry-run)")\n")
+ if [[ -z "$DRY_RUN" ]]; then
+ rmcmd=( rm -fv )
+ else
+ rmcmd=( printf "$(_ "removed '%s' (dry-run)")\n" )
fi
msg "Removing files from local staging directory"
cd "${WORKDIR}/staging"
xargs -0r -a "$file_list" "${rmcmd[@]}"
find . -depth -mindepth 1 -type d \
- -exec rmdir --ignore-fail-on-non-empty -- '{}' +
+ -exec rmdir --ignore-fail-on-non-empty -- '{}' +
)
-################################################################################
+
+## The different modes ##
usage() {
print "Usage: %s [OPTIONS]" "${0##*/}"
- print 'Upload packages in $WORKDIR/staging to the Parabola server'
+ prose 'Upload packages staged in %s (per `librestage`) to the configured server,
+ and publish them to their respective repositories.' \$WORKDIR/staging
+ echo
+ prose 'This requires the `gpg` program, configured with your GPG key,
+ and a staging directory (%s), writable by %s.' \$WORKDIR/staging '$LIBREUSER'
+ prose '%s is determined at runtime, by %s.
+ %s is normally the local login of the invoking user,
+ but may be over-ridden by setting %s in the environment.' \
+ '$LIBREUSER' /usr/lib/libretools/conf.sh '$LIBREUSER' '$SUDO_USER'
+ prose 'By default, %s is assumed to match the hackers.git login
+ for which %s has login credentials for the repo server.
+ If %s does not match the hackers.git login,
+ you must specify %s as the remote login, (eg: in %s)' \
+ '$LIBREUSER' '$LIBREUSER' '$LIBREUSER' '$TIER0_LOGIN' \
+ \$XDG_CONFIG_HOME/libretools/libretools.conf
echo
print "Options:"
- flag '-c' 'Clean; delete packages in $WORKDIR/staging'
- flag '-l' "List; list packages but not upload them"
- flag '-u' "Upload-only; do not run db-update on the server"
-
- flag '-n' "Dry-run; don't actually do anything"
- flag '-h' "Show this message"
-}
-
-main() {
- if [[ -w / ]]; then
- error "This program should be run as regular user"
- return $EXIT_NOPERMISSION
- fi
-
- # Parse options
- local mode="release_packages"
- while getopts 'clunh' arg; do
- case $arg in
- c) mode=clean ;;
- l) mode=pretty_print_packages ;;
- u) upload_only=true ;;
- n) dryrun="--dry-run" ;;
- h) mode=usage ;;
- *) usage >&2; return $EXIT_INVALIDARGUMENT ;;
- esac
- done
- shift $((OPTIND - 1))
- if [[ $# != 0 ]]; then
- usage >&2
- return $EXIT_INVALIDARGUMENT
- fi
-
- if [[ $mode == usage ]]; then
- usage
- return $EXIT_SUCCESS
- fi
-
- declare -i ret=0
- load_conf makepkg.conf GPGKEY || ret=$?
- load_conf libretools.conf WORKDIR REPODEST DBSCRIPTS_CONFIG || ret=$? # and HOOK{PRE,POST}RELEASE, which are optional
- [[ $ret = 0 ]] || exit $ret
-
- local re_url='^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$'
- local re_authority='^(([^@]*)@)?([^][@:]*|\[[^]]*\])(:([0-9]*))?$'
- local REPODEST_ok=false
- if [[ "$REPODEST" =~ $re_url ]]; then
- REPODEST_ok=true
-
- REPODEST_scheme=${BASH_REMATCH[2]}
- REPODEST_authority=${BASH_REMATCH[4]}
- REPODEST_path=${BASH_REMATCH[5]}
- REPODEST_query=${BASH_REMATCH[7]}
- REPODEST_fragment=${BASH_REMATCH[9]}
-
- if [[ "$REPODEST_authority" =~ $re_authority ]]; then
- REPODEST_userinfo=${BASH_REMATCH[2]}
- REPODEST_host=${BASH_REMATCH[3]}
- REPODEST_port=${BASH_REMATCH[5]}
-
- if [[ "$REPODEST_host" = '['*']' ]]; then
- REPODEST_host=${REPODEST_HOST#'['}
- REPODEST_host=${REPODEST_HOST#']'}
- fi
- else
- REPODEST_ok=false
- fi
-
- [[ $REPODEST_scheme == ssh ]] || REPODEST_ok=false
- [[ -n $REPODEST_host ]] || REPODEST_ok=false
- [[ -n $REPODEST_path ]] || REPODEST_ok=false
- fi
- if ! $REPODEST_ok; then
- error 'The format of libretools.conf:REPODEST has changed.'
- plain 'Merge the /etc/libretools.conf.pacnew file!'
- return $EXIT_NOTCONFIGURED
- fi
- if [[ "$REPODEST_path" = '/~'* ]]; then
- if [[ "$REPODEST_path" = '/~/'* ]]; then
- REPODEST_path=${REPODEST_path#'/~/'}
- else
- error 'Unfortunately, `~user` home-directory expansion is not (yet?) supported in libretools.conf:REPODEST'
- return $EXIT_NOTCONFIGURED
- fi
- fi
- REPODEST_userhost="${REPODEST_userinfo:+${REPODEST_userinfo%%:*}@}${REPODEST_host}"
-
- "$mode"
+ flag '-c' "Clean Local: delete packages in local staging directory"
+ flag '-C' "Clean Remote: delete packages in remote staging directory"
+ flag '-h' "Help: Show this message"
+ flag '-l' "List: list packages but not upload them"
+ flag '-n' "Dry-run: don't actually do anything"
+ flag '-u' "Upload-only: do not run db-update on the server"
}
-# The different modes (sans 'usage') ###########################################
-
-pretty_print_packages() {
+list() {
find "$WORKDIR/staging/" -mindepth 1 -maxdepth 1 -type d -not -empty | sort |
while read -r path; do
msg2 "${path##*/}"
@@ -226,21 +179,44 @@ pretty_print_packages() {
done
}
-clean() {
- lock 8 "${WORKDIR}/staging.lock" \
- 'Waiting for an exclusive lock on the staging directory'
+clean_local() {
+ lock_staging
local file_list
file_list="$(mktemp -t "${0##*/}.XXXXXXXXXX")"
trap "rm -f -- ${file_list@Q}" EXIT
list0_files > "$file_list"
- lock_close 8
+ unlock_staging
clean_files "$file_list"
}
-release_packages() {
+clean_remote() {
+ msg "Removing files from remote staging directory"
+ ${SSH_CMD[*]} "rm -rfv ${TIER0_STAGING@Q}/*"
+}
+
+release() {
+ local file_list="$( mktemp -t ${0##*/}_lst.XXXXXXXXXX)"
+ local dbupdate_log="$(mktemp -t ${0##*/}_log.XXXXXXXXXX)"
+ local mkdir_cmd="mkdir -p -- ${TIER0_STAGING@Q} && cd ${TIER0_STAGING@Q} && xargs -0r mkdir -pv --"
+ local dbupdate_cmd="STAGING=${TIER0_STAGING@Q} DBSCRIPTS_CONFIG=${DBSCRIPTS_CONFIG@Q} db-update"
+ local upload_size pbotsay_msg pbotsay_cmd
+
+ trap "rm -f -- ${file_list@Q} ${dbupdate_log@Q}" INT RETURN TERM
+
+ lock_staging
+
+ # verify connection and login
+ if ! ${SSH_CMD[0]} -fN ${SSH_CMD[*]:1}; then
+ error "Connection or login failed."
+ return $EXIT_FAILURE
+ fi
+
+
+ ## prepare ##
+
if [[ -n $HOOKPRERELEASE ]]; then
msg "Running HOOKPRERELEASE..."
(
@@ -249,31 +225,29 @@ release_packages() {
)
fi
- lock 8 "${WORKDIR}/staging.lock" \
- 'Waiting for an exclusive lock on the staging directory'
-
- sign_packages || return
+ sign_packages || return $EXIT_FAILURE
- # Make the permissions of the packages 644 otherwise the user will get access
- # denied error when they try to download (rsync --no-perms doesn't seem to
- # work).
+ # collect staged files and set permissions for repository-bound files
+ list0_files > "$file_list"
+ upload_size="$(cd "${WORKDIR}/staging" && du -hc --files0-from="$file_list" | sed -n '$s/\t.*//p')"
find "${WORKDIR}/staging" -type f -exec chmod 644 {} +
find "${WORKDIR}/staging" -type d -exec chmod 755 {} +
- local file_list="$(mktemp -t ${0##*/}.XXXXXXXXXX)"
- trap "rm -f -- ${file_list@Q}" EXIT
- list0_files > "$file_list"
+ unlock_staging
+
+ # prepare remote staging directory tree
+ msg "%s to upload" "$upload_size"
+ xargs -0r -a "$file_list" dirname -z | ${SSH_CMD[*]} "$mkdir_cmd"
- lock_close 8
- msg "%s to upload" "$(cd "${WORKDIR}/staging" && du -hc --files0-from="$file_list" | sed -n '$s/\t.*//p')"
+ ## upload ##
+
msg "Uploading packages..."
- xargs -0r -a "$file_list" dirname -z | ssh ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}" "mkdir -p -- ${REPODEST_path@Q} && cd ${REPODEST_path@Q} && xargs -0r mkdir -pv --"
- if ! rsync ${dryrun} "${rsync_flags[@]}" \
- -e "ssh ${REPODEST_port:+-p $REPODEST_port}" \
- -0 --files-from="$file_list" \
- "${WORKDIR}/staging" \
- "$REPODEST_userhost:$REPODEST_path/"
+ if ! rsync ${DRY_RUN} "${RSYNC_FLAGS[@]}" \
+ -e "ssh $SSH_PORT" \
+ -0 --files-from="$file_list" \
+ "${WORKDIR}/staging" \
+ "$RSYNC_DEST"
then
error "Sync failed, try again"
return $EXIT_FAILURE
@@ -281,28 +255,117 @@ release_packages() {
clean_files "$file_list"
- if $upload_only; then
+ if $UPLOAD_ONLY; then
return $EXIT_SUCCESS
fi
+
+ ## publish ##
+
msg "Running db-update on repos"
- ssh ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}" "STAGING=${REPODEST_path@Q} DBSCRIPTS_CONFIG=${DBSCRIPTS_CONFIG@Q} db-update"
+ (
+ # this contraption allows detecting `db-update` exit failure,
+ # while logging output both to file and to the local shell in real-time,
+ # while preserving (restoring) colors lost in the pipeline
+ set -o pipefail ; ${SSH_CMD[*]} "$dbupdate_cmd" | tee "$dbupdate_log" |
+ while read line ; do ( [[ "$line" =~ ^==\> ]] && msg "${line#==\> }" ) ||
+ ( [[ "$line" =~ ^\ *-\> ]] && msg2 "${line#*\> }" ) ||
+ echo "$line" ; done
+ )
+
+ if grep -Eq "^==> Updating \[" "$dbupdate_log"; then
+ pbotsay_msg=$(release_notification "${TIER0_LOGIN:-${LIBREUSER}}" < "$dbupdate_log")
+ pbotsay_cmd="if type pbot-say &>/dev/null ; then pbot-say ${pbotsay_msg@Q} ; fi"
+
+ if [[ -n $HOOKPOSTRELEASE ]]; then
+ msg "Running HOOKPOSTRELEASE..."
+ (
+ PS4=" \\[$BOLD\\]\$\\[$ALL_OFF\\] "
+ eval -- "set -x; $HOOKPOSTRELEASE"
+ )
+ fi
- if [[ -n $HOOKPOSTRELEASE ]]; then
- msg "Running HOOKPOSTRELEASE..."
- (
- PS4=" \\[$BOLD\\]\$\\[$ALL_OFF\\] "
- eval -- "set -x; $HOOKPOSTRELEASE"
- )
+ # notify pbot of the excellent work that we have done today
+ msg2 "Notifying pbot:" ; print " $pbotsay_msg" ;
+ ${SSH_CMD[*]} "$pbotsay_cmd" &> /dev/null || :
+ else
+ msg2 "Nothing was published"
fi
+}
+
- # notify pbot of the excellent work we have done
- local packages=${file_list} # TODO: parse package names? - this is gonna be messy
- local login=${REPODEST_userinfo:-somebody} ; login=${login%%:*} ;
- ssh ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}" \
- "which pbot-say && pbot-say ${login} just published: ${packages}"
+## main entry ##
- return $EXIT_SUCCESS
+main() {
+ # Parse CLI options
+ local mode=release # publish packages to public repo (default)
+ UPLOAD_ONLY=false # upload and publish
+ while getopts 'cChlnu' arg; do
+ case $arg in
+ c) mode=clean_local ;; # empties local staging area
+ C) mode=clean_remote ;; # empties remote staging area
+ h) mode=usage ;; # print 'Usage' message
+ l) mode=list ;; # pretty-print locally-staged packages
+ n) DRY_RUN='--dry-run' ;; # only show what would be done
+ u) UPLOAD_ONLY=true ;; # upload, but do not publish
+ *) usage >&2 ; return $EXIT_INVALIDARGUMENT ;;
+ esac
+ done
+ shift $(( OPTIND - 1 ))
+ if [[ -w / ]]; then
+ error "This program should be run as unprivileged user"
+ return $EXIT_NOPERMISSION
+ elif (( $# )); then
+ usage >&2
+ return $EXIT_INVALIDARGUMENT
+ elif [[ $mode == usage ]]; then
+ usage
+ return $EXIT_SUCCESS
+ fi
+
+ # source makepkg and libretools configuration files
+ # the specified config vars will be used in this script, and so are mandatory
+ # optional config vars used in this script, if specified in libretools.conf:
+ # TIER0_LOGIN, TIER0_PORT, TIER0_STAGING, HOOKPRERELEASE, HOOKPOSTRELEASE
+ if ! load_conf makepkg.conf GPGKEY; then
+ error "The %s config variable is misconfigured." \$GPGKEY
+ return $EXIT_NOTCONFIGURED
+ elif ! load_conf libretools.conf WORKDIR TIER0_HOST DBSCRIPTS_CONFIG; then
+ for var in WORKDIR TIER0_HOST DBSCRIPTS_CONFIG; do
+ [[ -n ${!var} ]] || error "The $%s config variable is misconfigured." \$$var
+ done
+ prose "The format of %s variables may have changed.
+ Merge the %s file, if one is present; and adapt any custom %s to it." \
+ libretools.conf /etc/libretools.conf.pacnew ~/.config/libretools/libretools.conf
+ return $EXIT_NOTCONFIGURED
+ fi
+
+ # validate/sanitize tier-0 repo URL components
+ if [[ "$TIER0_STAGING" == '/~/'* ]]; then
+ TIER0_STAGING=${TIER0_STAGING#'/~/'}
+ elif [[ "$TIER0_STAGING" == '/~'* ]]; then
+ error "Unfortunately, tilde expansion ('~' home directory) is not supported in libretools.conf::TIER0_STAGING"
+ return $EXIT_NOTCONFIGURED
+ fi
+
+ # finalize state
+ readonly DRY_RUN
+ readonly UPLOAD_ONLY
+
+ # construct the SSH and rsync destination parameters
+ readonly TIER0_LOGIN
+ readonly TIER0_HOST
+ readonly TIER0_PORT
+ readonly TIER0_STAGING=${TIER0_STAGING:-/home/${TIER0_LOGIN:-$LIBREUSER}/staging}
+ readonly SSH_URL=${TIER0_LOGIN:+${TIER0_LOGIN}@}${TIER0_HOST}
+ readonly SSH_PORT=${TIER0_PORT:+-p $TIER0_PORT}
+ readonly SSH_CMD=( ssh ${SSH_PORT} ${SSH_URL} )
+ readonly RSYNC_DEST=${SSH_URL}:${TIER0_STAGING%/}/
+
+ # do the requested business
+ $mode
}
+
+setup_traps
main "$@"
diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage
index bec536c..7098aac 100755
--- a/src/abslibre-tools/librestage
+++ b/src/abslibre-tools/librestage
@@ -5,6 +5,7 @@
# Copyright (C) 2010-2012 Nicolás Reynolds <fauno@parabola.nu>
# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
# Copyright (C) 2013-2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2020 Andreas Grapentin <andreas@grapentin.org>
#
# License: GNU GPLv3+
#
@@ -26,12 +27,19 @@
. "$(librelib messages)"
. "$(librelib conf)"
+LimitArch="*"
+
usage() {
- print "Usage: %s [REPO]" "${0##*/}"
+ print "Usage: %s [-A <arch>] [REPO]" "${0##*/}"
print "Stages the package(s) build by ./PKGBUILD for upload."
echo
prose "The package(s) are staged for the named repository, or the name
of the parent directory if a repository is not named."
+ echo
+ echo "Supported options:"
+ echo " -h Display this help and exit"
+ echo " -A <arch> Stage only packages built for arches matching the given"
+ echo " wildcard string. Default: *"
}
main() {
@@ -41,12 +49,16 @@ main() {
fi
# Parse options, set up
- while getopts 'h' arg; do
+ while getopts 'hA:' arg; do
case $arg in
h) usage; return $EXIT_SUCCESS;;
+ A) LimitArch="$OPTARG";;
*) usage >&2; return $EXIT_INVALIDARGUMENT;;
esac
done
+ local shiftlen=$(( OPTIND - 1 ))
+ shift $shiftlen
+
local repo=
case $# in
0) repo="$(basename "$(dirname "$PWD")")";;
@@ -79,6 +91,8 @@ main() {
# Look for (libre)makepkg output
local CARCH _pkgname pkgnames pkgfile
for CARCH in "${arch[@]}"; do
+ # Skip this arch if necessary
+ [[ "$CARCH" == $LimitArch ]] || continue
# This supports both pacman < 5.1 pkgname-debug
# packages and pacman >= 5.1 pkgbase-debug packages.
pkgnames=("${pkgname[@]}" "${pkgname[@]/%/-debug}")
diff --git a/src/chroot-tools/HACKING.md b/src/chroot-tools/HACKING.md
index e50aa11..a26bdeb 100644..120000
--- a/src/chroot-tools/HACKING.md
+++ b/src/chroot-tools/HACKING.md
@@ -1,3 +1 @@
-Unfortunately, `makechrootpkg.sh` is GPLv2 ONLY. This means that
-everything that uses it must be held to GPLv2+ instead of GPLv3+. I'm
-calling this anything that gets loaded into the same process as it.
+../../HACKING/chroot-tools.md \ No newline at end of file
diff --git a/src/chroot-tools/hooks-distcc.sh b/src/chroot-tools/hooks-distcc.sh
index b19c223..414696e 100644
--- a/src/chroot-tools/hooks-distcc.sh
+++ b/src/chroot-tools/hooks-distcc.sh
@@ -1,5 +1,5 @@
#!/hint/bash -euE -o pipefail
-# Copyright (C) 2013, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2013, 2017-2018, 2024 Luke Shumaker <lukeshu@parabola.nu>
#
# License: GNU GPLv2+
#
@@ -75,9 +75,11 @@ distcc_start_odaemon() {
rewritten_DISTCC_HOSTS=$("$_distcc_tool" rewrite "${DISTCC_HOSTS:-}")
install -Dm644 /dev/stdin "$home/.config/pacman/makepkg.conf" <<-eot
- trap 'jobs -p | xargs -r kill --' EXIT
- /bin/distcc-tool idaemon ${DISTCC_HOSTS@Q} </dev/null &>/dev/null &
- DISTCC_HOSTS=${rewritten_DISTCC_HOSTS@Q}
+ if [[ \${INFAKEROOT:-} == 0 ]]; then
+ trap 'jobs -p | xargs -r kill --' EXIT
+ /bin/distcc-tool idaemon ${DISTCC_HOSTS@Q} </dev/null &>/dev/null &
+ DISTCC_HOSTS=${rewritten_DISTCC_HOSTS@Q}
+ fi
eot
install -Dm644 /dev/stdin "$home/.ssh/config" <<-'eot'
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 1c76661..bef2208 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -7,6 +7,7 @@ set -euE
# Copyright (C) 2012 Michał Masłowski <mtjm@mtjm.eu>
# Copyright (C) 2012-2018 Luke Shumaker <lukeshu@parabola.nu>
# Copyright (C) 2018 Andreas Grapentin <andreas@grapentin.org>
+# Copyright (C) 2019 Bill Auger <mr.j.spam.me@gmail.com>
#
# License: GNU GPLv2+
#
@@ -72,8 +73,8 @@ hack_arch_nspawn_flags() {
local setarch interpreter
case $CARCH in
- armv7h) setarch=armv7l; interpreter=/usr/bin/qemu-arm-static ;;
- *) setarch=$CARCH; interpreter=/usr/bin/qemu-$CARCH-static ;;
+ armv7h|armv7l) setarch=armv7l; interpreter=/usr/bin/qemu-arm-static ;;
+ *) setarch=$CARCH; interpreter=/usr/bin/qemu-$CARCH-static ;;
esac
if ! setarch $setarch /bin/true 2>/dev/null; then
# We're running a cross-arch chroot
@@ -240,8 +241,8 @@ usage() {
prose 'This command will make the following configuration changes in the
chroot:'
bullet 'overwrite `/etc/libretools.d/chroot.conf`' # libretools/librechroot
- bullet 'overwrite `/etc/pacman.d/mirrorlist`' # devtools/arch-nspawn
- bullet 'set `CacheDir` in `/etc/pacman.conf`' # devtools/arch-nspawn
+ bullet 'overwrite `/etc/pacman.d/mirrorlist`' # devtools/arch-nspawn
+ bullet 'set `CacheDir` in `/etc/pacman.conf`' # devtools/arch-nspawn
prose 'If a new `pacman.conf` is inserted with the `-C` flag, the change
is made after the file is copied in; the `-C` flag doesn'"'"'t
stop the change from being effective.'
@@ -325,7 +326,7 @@ main() {
trap 'rm -f -- "$tmppacmanconf"' EXIT
tmppacmanconf="$(mktemp --tmpdir librechroot-pacman.conf.XXXXXXXXXX)"
sed -r \
- -e "s|^#?\\s*Architecture.+|Architecture = ${OPTARG}|g" \
+ -e "s|^#?\\s*Architecture.+|Architecture = $OPTARG|g" \
-e "s|^.*Include\s*=\s*/etc/pacman.d/.*\.conf|#&|" \
< "/usr/share/pacman/defaults/pacman.conf.$OPTARG" \
> "$tmppacmanconf"
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index b427fd0..d3dd160 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -5,7 +5,8 @@ set -euE
# Copyright (C) 2010-2012 Nicolás Reynolds <fauno@parabola.nu>
# Copyright (C) 2010-2012 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
# Copyright (C) 2012 Michał Masłowski <mtjm@mtjm.eu>
-# Copyright (C) 2012-2015, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2012-2015, 2017-2018, 2024 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2019, 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
#
# License: GNU GPLv2+
#
@@ -36,6 +37,7 @@ umask 0022
readonly _indent="$(librelib chroot/indent)"
readonly INCHROOT=$([[ -f /.arch-chroot ]] && echo true || echo false)
NONET=true # can be changed with the -N flag
+ROSTARTDIR=true # can be changed with the -W flag
# {PKG,SRC,SRCPKG,LOG}DEST set at runtime by makepkg.conf
# MAKEFLAGS, PACKAGER set at runtime by makepkg.conf
# LIBREUSER, LIBREHOME are set by conf.sh
@@ -124,11 +126,19 @@ build() (
local run_ynet=()
local run_nnet=()
if $INCHROOT; then
- local _run=(sh -c "mount --bind -o ro -- ${startdir@Q} ${startdir@Q} && cd ${startdir@Q} && \$@" --)
+ if $ROSTARTDIR; then
+ local _run=(sh -c "mount --bind -o ro -- ${startdir@Q} ${startdir@Q} && cd ${startdir@Q} && \$@" --)
+ else
+ local _run=(sh -c "cd ${startdir@Q} && \$@" --)
+ fi
run_ynet=(unshare --mount -- "${_run[@]}")
run_nnet=(unshare --mount --net -- "${_run[@]}")
else
- librechroot_flags+=(-r "$startdir:/startdir")
+ if $ROSTARTDIR; then
+ librechroot_flags+=(-r "$startdir:/startdir")
+ else
+ librechroot_flags+=(-w "$startdir:/startdir")
+ fi
run_ynet=(librechroot "${librechroot_flags[@]}" run)
run_nnet=(librechroot "${librechroot_flags[@]}" -N run)
fi
@@ -181,6 +191,10 @@ usage() {
build(), and package(). PLEASE don't use
this unless you have a special reason, its
use is a violation of Parabola policy." \
+ '-W' "Don't make the startdir read-only. PLEASE
+ don't use this unless you have a special
+ reason, its use is a violation of Parabola
+ policy." \
'-R' 'Repackage contents of the package without
rebuilding' \
"-S <$(_ SRCPKGFILE)>" 'Use an existing --allsource source-package' \
@@ -203,7 +217,7 @@ main() {
local srcpkg=''
# Parse command line options ###########################################
- while getopts 'n:l:w:r:NRS:h' flag ; do
+ while getopts 'n:l:w:r:NWRS:h' flag ; do
case "${flag}" in
n) if $INCHROOT; then err_chflag "$flag"; else
chroot=$OPTARG; fi;;
@@ -212,6 +226,7 @@ main() {
w|r) if $INCHROOT; then err_chflag "$flag"; else
librechroot_flags+=(-$flag "$OPTARG"); fi;;
N) NONET=false;;
+ W) ROSTARTDIR=false;;
R) repack=true; makepkg_args+=(-R);;
S) srcpkg=$OPTARG;;
h) usage; exit $EXIT_SUCCESS;;
diff --git a/src/lib/HACKING.md b/src/lib/HACKING.md
index 8bebaf6..f85f626 100644..120000
--- a/src/lib/HACKING.md
+++ b/src/lib/HACKING.md
@@ -1,15 +1 @@
-Special stuff about hacking ih the /src/lib directory:
-
- - Everything should be GPLv2 AND GPLv3 compatible. No GPLv3 only.
- - Name a file `libre${NAME}` if it should be executable directly, or
- `${name}.sh` if it should only be available to be sourced.
- - When printing a message that is internal to /src/lib, and not part
- of the programm calling the library; prefix the print command with
- `_l`. `_l()` is defined in `common.sh` (and `librelib`, since it
- cannot use any libraries itself).
- - When changing the message functions, be aware that some are
- duplicated in:
- * /src/chroot-tools/chcleanup
- * /src/chroot-tools/distcc-tool
- * /src/lib/librelib
- And that they probably need to be updated as well.
+../../HACKING/libs.md \ No newline at end of file
diff --git a/src/lib/blacklist.sh b/src/lib/blacklist.sh
index 84333e8..d36502e 100755
--- a/src/lib/blacklist.sh
+++ b/src/lib/blacklist.sh
@@ -99,24 +99,21 @@ blacklist-get-pkg() {
# Usage: blacklist-cat | blacklist-get-rep
# Prints only the replacement package field of the blacklist line(s) on stdin.
blacklist-get-rep() {
- local -a targets=($(blacklist-get-pkg))
- expac -Ss '%r/%n %n %P %R' | awk -v arr="${targets[*]}" '
- {
- gsub("[=<>]+[^[:blank:]]*", "", $0) # discard versioning
- # build pkg -> providers table from pkg -> provides
- for (provided = 2; provided <= NF; ++provided) {
- if (! seen[$1 " " $provided]++) {
- providers[$provided] = providers[$provided] $1 " "
- }
- }
- }
- END {
- split(arr, targets, " ")
- for (pkg in targets) {
- sub("[ \t]+$", "", providers[targets[pkg]])
- print providers[targets[pkg]]
- }
- }'
+ # TODO(lukeshu): I am confident that this could be done more
+ # efficiently with Python+pyalpm than with awk+expac.
+ blacklist-normalize | awk -F: '
+ # trust blacklist.txt for packages re-packaged with the same name
+ # (otherwise there would be a bootstrapping problem).
+ $2 == $1 {
+ print $2
+ }
+ # but otherwise, do not trust blacklist.txt to have an accurate
+ # state of the repos and what replacements exist.
+ $2 != $1 {
+ cmd="expac -S '\''%r/%n %P : %R '\'' | sed -E '\''s/[=<>]+\\S*//g'\'' | grep '\'' " $1 " .*:.* " $1 " '\'' | awk '\''{print $1}'\''"
+ cmd | getline rep
+ print rep
+ }'
}
# Usage: blacklist-cat | blacklist-get-url
diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in
index 0cd0a03..e370e73 100644
--- a/src/lib/conf.sh.in
+++ b/src/lib/conf.sh.in
@@ -1,9 +1,24 @@
#!/hint/bash
-# This may be included with or without `set -euE`
-# Copyright (C) 2012-2015, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
+# conf.sh - implicit libretools configuration
#
-# License: GNU GPLv2+
+# This may be included with or without `set -euE`.
+# In order to be used inside librechroots, this script assumes nothing
+# of the environment, other than the optional $SUDO_USER (invalid in-chroot).
+# Its main purpose it to canonicalize the in-chroot environment and paths,
+# so that libretools needs not be installed in every librechroot,
+# unlike the host environment, where libretools can re-configure itself.
+# However, some functions expect `librelib messages` to be pre-sourced,
+# namely, the getters and setters (load_conf(), set_var(), set_var()),
+# which are useful and meaningful only for the host environment.
+# This is also where $LIBREUSER is defined, which most other scripts depend on.
+# $LIBREUSER is $SUDO_USER unless UID->0, or $USER otherwise.
+#
+# Copyright (C) 2012-2015,2017-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2020,2023 bill-auger <bill-auger@programmer.net>
+# Copyright (C) 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,15 +33,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if [[ "$(id -u "${SUDO_USER:-root}")" == 0 ]]; then
+
+# include guard
+[[ ! -v _INCLUDE_CONF_SH ]] && readonly _INCLUDE_CONF_SH='' || return 0
+
+
+## prepare environment ##
+
+# define $LIBREUSER
+if [[ "$(id -u "${SUDO_USER:-root}" 2> /dev/null)" == 0 ]]; then
unset SUDO_USER
fi
LIBREUSER="${SUDO_USER:-$USER}"
+
+# define $LIBREHOME
+# $LIBREHOME is the default parent directory of $WORKDIR (per /etc/libretools.conf)
+# default: ~$LIBREUSER/ unless SUDO_USER != $USER, $HOME/$LIBREUSER/ otherwise
+# NOTE: $WORKDIR and $LIBREHOME/.cache must be writable by $LIBREUSER
if [[ $LIBREUSER == "$USER" ]]; then
LIBREHOME=$HOME
else
eval "LIBREHOME=~$LIBREUSER"
fi
+
+# define $XDG_CONFIG_HOME and $XDG_CACHE_HOME, if not set already
if [[ -z ${XDG_CONFIG_HOME:-} ]]; then
export XDG_CONFIG_HOME="${LIBREHOME}/.config"
fi
@@ -34,7 +64,8 @@ if [[ -z ${XDG_CACHE_HOME:-} ]]; then
export XDG_CACHE_HOME="${LIBREHOME}/.cache"
fi
-# Low-level generic functions ##################################################
+
+## Low-level generic functions ##
# Usage: list_files $slug
# Lists the configuration files to be considered for $slug.
@@ -78,8 +109,7 @@ list_files() {
}
# Usage: list_envvars $slug
-# Lists the environmental variables that take precedence over the configuration
-# files for $slug.
+# Lists which env-vars shall over-ride the config files for $slug.
list_envvars() {
local slug=$1
case $slug in
@@ -98,12 +128,13 @@ list_envvars() {
esac
}
-# High-level generic functions #################################################
+
+## High-level generic functions ##
# Usage: load_conf {$slug.conf|$abspath} [VAR1 VAR2...]
#
-# Loads the configuration files for $slug in the proper order, and
-# optionally verify that certain variables are set.
+# Loads the configuration files for $slug in the proper order;
+# and optionally, verify that specified variables are set.
load_conf() {
[[ $1 = /* || $1 = *.conf ]] || libremessages panic || exit 1 # $EXIT_FAILURE
local files envvars
@@ -152,7 +183,7 @@ load_conf() {
return $ret
}
-# Usage: get_var <slug> <var_name> <default_value>
+# Usage: get_var <slug> <var_name> [ <default_value> ]
# Does not work with arrays
get_var() (
set +euE
@@ -180,7 +211,8 @@ set_var() {
return 1 # $EXIT_FAILURE
}
-# PKGBUILD (not configuration, per se) #########################################
+
+## PKGBUILD loading (not configuration, per se) ##
unset_PKGBUILD() {
# This routine is based primarily off of the PKGBUILD(5) man-page,
@@ -200,9 +232,6 @@ unset_PKGBUILD() {
done
}
- # This line is taken from the makepkg source
- local known_hash_algos=('md5' 'sha1' 'sha224' 'sha256' 'sha384' 'sha512')
-
# From the "OPTIONS AND DIRECTIVES" section (in order of mention)
unset -v pkgname pkgver
unset -f pkgver
@@ -225,7 +254,11 @@ unset_PKGBUILD() {
unset -f $(declare -f|sed -n 's/^\(package_\S*\) ()\s*$/\1/p')
unset -v pkgbase
- # These are used by the `librefetch` program
+ # Parabola makepkg extensions (aka: mksource)
+ # These are used by `librefetch` to generate an FSDG-fit source-ball,
+ # before the prepare() funtion runs,
+ # instead of the standard --allsource source-ball,
+ # which is rolled before the prepare() funtions runs.
unset -v mksource mknoextract "${sums[@]/#/mk}"
unset -v mkdepends
unset -f mksource
diff --git a/src/lib/librelib b/src/lib/librelib
index 004c8b1..27649f8 100755
--- a/src/lib/librelib
+++ b/src/lib/librelib
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Copyright (C) 2013-2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
-#
+# Copyright (C) 2020 Andreas Grapentin <andreas@grapentin.org>
+
# License: GNU GPLv2+
#
# This program is free software; you can redistribute it and/or modify
@@ -46,7 +47,7 @@ usage() {
Hardcoding that path is the way of the dark side."
echo
prose 'By default, it looks for the files in `%s`, but this can be
- changed with the environmental variable LIBRETOOLS_LIBDIR.' "$default_libdir"
+ changed with the environmental variable LIBRETOOLS_LIBRARY_PATH.' "$default_libdir"
echo
print "Example usage:"
printf ' . $(%s conf)\n' "$cmd"
@@ -65,19 +66,25 @@ main() {
return 0 # $EXIT_SUCCESS
fi
- if [[ -z $LIBRETOOLS_LIBDIR ]]; then
- export LIBRETOOLS_LIBDIR=$default_libdir
+ if [[ -z $LIBRETOOLS_LIBRARY_PATH ]]; then
+ export LIBRETOOLS_LIBRARY_PATH=$default_libdir
fi
lib=$1
lib=${lib#libre}
lib=${lib%.sh}
- for file in ${lib} libre${lib} ${lib}.sh libre${lib}.sh; do
- if [[ -f "$LIBRETOOLS_LIBDIR/$file" ]]; then
- printf '%s\n' "$LIBRETOOLS_LIBDIR/$file"
- return 0 # $EXIT_SUCCESS
- fi
+ local libdir_array
+ IFS=: read -r -a libdir_array <<<"$LIBRETOOLS_LIBRARY_PATH"
+
+ local libdir
+ for libdir in "${libdir_array[@]}"; do
+ for file in ${lib} libre${lib} ${lib}.sh libre${lib}.sh; do
+ if [[ -f "$libdir/$file" ]]; then
+ printf '%s\n' "$libdir/$file"
+ return 0 # $EXIT_SUCCESS
+ fi
+ done
done
_l print '%s: could not find library: %s' "$cmd" "$lib" >&2
return 1 # $EXIT_FAILURE
diff --git a/src/lib/librelib.1.ronn b/src/lib/librelib.1.ronn
index fe64e92..9d1fbc4 100644
--- a/src/lib/librelib.1.ronn
+++ b/src/lib/librelib.1.ronn
@@ -19,13 +19,13 @@ path:
* The install path can change in the future without having to change
programs that use them.
* The install directory can be configured at runtime, by setting
- `LIBRETOOLS_LIBDIR`, similar to `LD_PRELOAD` (this is used when
- running the test suite).
+ `LIBRETOOLS_LIBRARY_PATH`, similar to `LD_PRELOAD` (this is used
+ when running the test suite).
* The naming scheme of a library can change (such as between
`libreNAME` and `NAME.sh` without changing programs that use it.
By default, `librelib` looks in `/usr/lib/libretools`, but that can be
-changed by setting the `LIBRETOOLS_LIBDIR` environmental variable to
+changed by setting the `LIBRETOOLS_LIBRARY_PATH` environmental variable to
the directory it should look in.
When searching for a library, `librelib` first strips `libre` from the
diff --git a/src/lib/messages.sh b/src/lib/messages.sh
index 67cdab5..d833c9d 100644
--- a/src/lib/messages.sh
+++ b/src/lib/messages.sh
@@ -1,20 +1,25 @@
#!/usr/bin/env bash
-# This may be included with or without `set -euE`
-# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
-# Copyright (C) 2012 Nicolás Reynolds <fauno@parabola.nu>
-# Copyright (C) 2012-2014, 2016-2018 Luke Shumaker <lukeshu@parabola.nu>
+# message.sh - library for log messages and --help/USAGE reports
+# - extends pacman's makepkg::util/message.sh
+#
+# This may be included with or without `set -euE`
+#
+# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
+# Copyright (C) 2012 Nicolás Reynolds <fauno@parabola.nu>
+# Copyright (C) 2012-2014,2016-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2020,2023 bill-auger <bill-auger@programmer.net>
#
# For just the setup_traps() function:
# Copyright (C) 2002-2006 Judd Vinet <jvinet@zeroflux.org>
# Copyright (C) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
-# Copyright (C) 2005 Aurelien Foret <orelien@chez.com>
-# Copyright (C) 2005 Christian Hamar <krics@linuxforum.hu>
-# Copyright (C) 2006 Alex Smith <alex@alex-smith.me.uk>
-# Copyright (C) 2006 Andras Voroskoi <voroskoi@frugalware.org>
-# Copyright (C) 2006 Miklos Vajna <vmiklos@frugalware.org>
+# Copyright (C) 2005 Aurelien Foret <orelien@chez.com>
+# Copyright (C) 2005 Christian Hamar <krics@linuxforum.hu>
+# Copyright (C) 2006 Alex Smith <alex@alex-smith.me.uk>
+# Copyright (C) 2006 Andras Voroskoi <voroskoi@frugalware.org>
+# Copyright (C) 2006 Miklos Vajna <vmiklos@frugalware.org>
#
-# License: GNU GPLv2+
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,17 +34,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-[[ -z ${_INCLUDE_MESSAGES_SH:-} ]] || return 0
-_INCLUDE_MESSAGES_SH=true
-################################################################################
-# Inherit most functions from devtools #
-################################################################################
+# include guard
+[[ ! -v _INCLUDE_MESSAGES_SH ]] && readonly _INCLUDE_MESSAGES_SH='' || return 0
-. "$(librelib common)"
################################################################################
-# Own functions #
+# Libretools constants #
################################################################################
declare -rgi EXIT_TRUE=0
@@ -53,11 +54,23 @@ declare -rgi EXIT_NOPERMISSION=4
declare -rgi EXIT_NOTINSTALLED=5
declare -rgi EXIT_NOTCONFIGURED=6
+
+################################################################################
+# Inherit most message functions from devtools #
+################################################################################
+
+. "$(librelib common)"
+
+
+################################################################################
+# Libretools message functions #
+################################################################################
+
# Usage: panic
#
# For programming errors, bails immediately with little fanfare.
panic() {
- _l _ 'panic: malformed call to internal function' >&2
+ _l _ "General error. This is a bug. Please report it to Parabola." >&2
exit $EXIT_FAILURE
}
@@ -84,7 +97,6 @@ whitespace_collapse() {
-e 's/\s+$//'
}
-
# Usage: prose MESG [ARGS...]
#
# Do HTML-style whitespace collapsing on the first argument, translate
diff --git a/src/lib/notifications.sh b/src/lib/notifications.sh
new file mode 100644
index 0000000..0c3b947
--- /dev/null
+++ b/src/lib/notifications.sh
@@ -0,0 +1,25 @@
+# parse `librerelease` `db-update` log via STDIN,
+# and emit formatted notification message
+release_notification() # ( hacker ) dbupdate_log->STDIN
+{
+ local hacker=${1:-somebody}
+ # (pkgname )- : (pkgver )- -(arch )
+ local filename_rx="^([0-9A-Za-z\._@\+\-]+)-([0-9]+:)?([0-9A-Za-z\._]+)-[^/-]+-([0-9a-z_]+)\.pkg\.tar\.[^\.]+$"
+ local repo pkg arch pkgname pkgver
+
+ printf "${hacker} just published: "
+ grep -E "^==> Updating |^ -> [^ ]+ \([^ )]+\)" |
+ while read line
+ do if [[ "${line}" =~ ^==\>\ Updating\ \[([^\]]+)\]...$ ]]
+ then repo=${BASH_REMATCH[1]}
+ elif [[ "${line}" =~ ^\ *-\>\ ([^\ ]+)\ \(([^\ ]+)\)$ ]]
+ then pkg=${BASH_REMATCH[1]} arch=${BASH_REMATCH[2]}
+ if [[ "${pkg}" =~ ${filename_rx} ]]
+ then pkgname=${BASH_REMATCH[1]} pkgver=${BASH_REMATCH[3]}
+ if [[ ! "${pkg}" =~ '-debug-' ]]
+ then echo "(${pkgname} ${pkgver})->${repo}/${arch}"
+ fi
+ fi
+ fi
+ done | LANG=C sort -u | xargs
+}
diff --git a/src/librefetch/HACKING.md b/src/librefetch/HACKING.md
index f4ac4f1..d8aff04 100644..120000
--- a/src/librefetch/HACKING.md
+++ b/src/librefetch/HACKING.md
@@ -1,25 +1 @@
-`librefetch` respects `SOURCE_DATE_EPOCH`[1] for reproducible builds,
-and has had this behavior from the start (though the variable name
-wasn't there from the start, that came later). But how can this be!?
-If you asked h01ger (the guy heading up reproducible builds in Debian
-and Fedora), tar needs to support `--clamp-mtime` to do this, and that
-flag wasn't in any tar implementation when librefetch came into
-existence. The flag not yet being in upstream GNU tar was for a long
-time the biggest blocker to most of upstream Debian being
-reproducible!
-
-While it is a nice flag that I'm surprised wasn't added years ago,
-it's trivial to just adjust the input files first:
-
- find . -exec touch --no-dereference --date=DATE -- {} +`
-
-Of course, `--clamp-mtime`/`--mtime` is now in upstream GNU tar. So
-librefetch supporting this is no longer impressive. But, librefetch
-still isn't using `--mtime`. Why? Well, because it uses libarchive
-`bsdtar`, not GNU tar, and bsdtar still doesn't have the flag.
-
-I wrote this document mostly because I expect that sometime in the
-future I'll think to myself "I should simplify the code and just use
-`--mtime`", not remembering the differences between tars.
-
-[1]: https://reproducible-builds.org/specs/source-date-epoch/
+../../HACKING/librefetch.md \ No newline at end of file
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index 93537cd..0a1bb70 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
# librefetch
#
-# Copyright (C) 2013-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2013-2018, 2024 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2020 Bill Auger <mr.j.spam.me@gmail.com>
#
# For just the create_signature() function:
# Copyright (C) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org>
@@ -221,7 +222,7 @@ doit() {
mv -f "$base_dst" "$dst"
fi
else
- export PKGEXT=${base_dst##*/}
+ export PKGEXT=${base_dst##*/} # so the file uses the correct compression
export PKGDEST=${dst%/*}
export pkg_file=$dst
@@ -322,23 +323,23 @@ modified_makepkg() {
# a string to be appended
pkgbuild_append='
+declare _librefetch_i
+
# do not do split packages
-if [[ ${#pkgname[@]} -gt 1 ]]; then
- if [[ -n $pkgbase ]]; then
- pkgname=("$pkgbase")
- else
- pkgname=("$pkgname")
- fi
-fi
+declare _librefetch_pkgname="${pkgbase:-$pkgname}"
+for _librefetch_i in "${pkgname[@]}"; do
+ unset -f "package_${_librefetch_i}"
+done
+unset pkgname
+pkgname=$_librefetch_pkgname
# copy source variables
source=("${mksource[@]}") ; unset "source_${CARCH}"
noextract=("${mknoextract[@]}")
-declare algo
-for algo in "${known_hash_algos[@]}"; do
- eval "${algo}sums=(\"\${mk${algo}sums[@]}\")"
- unset "${algo}sums_${CARCH}"
+for _librefetch_i in "${known_hash_algos[@]}"; do
+ eval "${_librefetch_i}sums=(\"\${mk${_librefetch_i}sums[@]}\")"
+ unset "${_librefetch_i}sums_${CARCH}"
done
depends=() ; unset "depends_${CARCH}"
@@ -346,6 +347,7 @@ checkdepends=() ; unset "checkdepends_${CARCH}"
makedepends=("${mkdepends[@]}") ; unset "makedepends_${CARCH}"
backup=()
+unset install
####
# See packaging_options in the makepkg source
diff --git a/src/librefetch/librefetch.8.ronn b/src/librefetch/librefetch.8.ronn
index 27dfac0..b73db3b 100644
--- a/src/librefetch/librefetch.8.ronn
+++ b/src/librefetch/librefetch.8.ronn
@@ -143,6 +143,7 @@ Following is a table of the translations.
makedepends = mkdepends
*_$CARCH = <unset>
backup = <empty>
+ install = <unset>
Functions
prepare() { :; }
build() { mksource; }
@@ -179,7 +180,8 @@ Other changes:
The following modifications are made to makepkg:
* Allow us to manipulate the output file (<$pkg_file>)
- * Do not include metadata in the output file (<${comp_files[@]}>)
+ * Do not include metadata in the output file (`.PKGINFO`,
+ `.BUILDINFO`, and `.MTREE`)
* Force 'ustar' tar format, don't allow it to upgrade to 'pax' to
store extended file attributes.
* Don't symlink the resulting file into the current directory.
diff --git a/src/librefetch/librefetchdir/Makefile b/src/librefetch/librefetchdir/Makefile
index 4391efb..6646b22 100644
--- a/src/librefetch/librefetchdir/Makefile
+++ b/src/librefetch/librefetchdir/Makefile
@@ -2,7 +2,7 @@
# note: This file is part of LibreFetch itself, not part of the
# build-system.
#
-# Copyright (C) 2016 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2016, 2024 Luke Shumaker <lukeshu@parabola.nu>
#
# License: GNU GPLv3+
#
@@ -21,17 +21,16 @@
# You should have received a copy of the GNU General Public License
# along with LibreFetch. If not, see <http://www.gnu.org/licenses/>.
-# new =
librefetchdir := $(dir $(lastword $(MAKEFILE_LIST)))
old_makepkg := $(shell which makepkg)
-old_library := $(shell $(shell grep LIBRARY= $(old_makepkg)); echo $$LIBRARY)
+old_library := $(shell $(shell grep MAKEPKG_LIBRARY= $(old_makepkg)); echo $$MAKEPKG_LIBRARY)
new_makepkg = $(new)/makepkg
new_library = $(new)/libmakepkg
targets += $(new_makepkg)
-targets += $(patsubst $(old_library)/%,$(new_library)/%,$(shell find $(old_library) -type f))
+targets += $(patsubst $(old_library)/%,$(new_library)/%,$(shell find $(old_library) -type f -not -name ext.sh))
targets += $(new_library)/tidy/~source_date_epoch.sh
all: $(targets)
diff --git a/src/librefetch/librefetchdir/makepkg.gen b/src/librefetch/librefetchdir/makepkg.gen
index dfe68f5..f1958f8 100755
--- a/src/librefetch/librefetchdir/makepkg.gen
+++ b/src/librefetch/librefetchdir/makepkg.gen
@@ -1,7 +1,7 @@
#!/usr/bin/sed -rf
# librefetchdir/makepkg.gen
#
-# Copyright (C) 2013-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2013-2018, 2024 Luke Shumaker <lukeshu@parabola.nu>
#
# License: GNU GPLv3+
#
@@ -20,14 +20,14 @@
# You should have received a copy of the GNU General Public License
# along with LibreFetch. If not, see <http://www.gnu.org/licenses/>.
-/LIBRARY=/iexport LIBRARY="${0%/*}/libmakepkg"
-
-/list_package_files\(\) \{/,/^\}$/ {
- # Don't include dotfiles
- s,\(.*; (.* \| LC_ALL=C sort)\),\1,
-}
+/MAKEPKG_LIBRARY=/iexport MAKEPKG_LIBRARY="${0%/*}/libmakepkg"
/create_package\(\) \{/,/^\}$/ {
+ # Don't generate metadata files
+ /PKGINFO/d
+ /BUILDINFO/d
+ /msg2.*MTREE/,/touch.*MTREE/d
+
# allow us to set pkg_file
/pkg_file=/d
}
diff --git a/src/libretools.conf b/src/libretools.conf
index cacd0c9..3ed6fa6 100644
--- a/src/libretools.conf
+++ b/src/libretools.conf
@@ -1,39 +1,74 @@
#!/hint/bash
# shellcheck disable=2034
+# System-wide Libretools configuration
+#
+# Users may over-ride this file in ~$LIBREUSER/.config/libretools/libretools.conf.
+# This file may be copied verbatim and adapted, or the user config may simply
+# redefine only the variables desired to over-ride.
+#
+# NOTE: * $LIBREHOME and $LIBREUSER are set in /usr/lib/libretools/conf.sh,
+# implicitly, before /etc/libretools.conf and overrides are loaded
+# * $DISPLAY is set implicitly by the X-server
+
+
################################################################################
-# misc #
+# general #
################################################################################
-# The dir where you work on
-WORKDIR="$LIBREHOME/packages"
+## The directory where you work on packages (large storage)
+# This will be the parent directory of abslibre/ and staging/.
+# You can keep your VCS work area tidy by assigning SRCDEST and LOGDEST
+# in makepkg.conf to a subdirectory of this $$WORKDIR.
+# If you do that, use absolute paths.
+# $WORKDIR and $LIBREHOME are not valid in makepkg.conf when running `makepkg`.
+# SRCDEST=/path/to/WORKDIR/sources
+# LOGDEST=/path/to/WORKDIR/logs
+WORKDIR="${LIBREHOME:-}"/packages
+
+## ABSLibre
+## Used by: `createworkdir`
+ABSLIBRERECV=git://git.parabola.nu/abslibre/abslibre.git
+ABSLIBRESEND=ssh://git@git.parabola.nu:1863/~git/abslibre/abslibre.git
## Blacklist URL
+## Used by: `blacklist.sh`
BLACKLIST=https://git.parabola.nu/blacklist.git/plain/blacklist.txt
-## Diff tool (vimdiff, gvimdiff, meld, etc)
+## Diff tool
## Used by `aur`, `diff-unfree`
# shellcheck disable=2046
DIFFPROG=$(which $([ -z "${DISPLAY:-}" ]||echo kdiff3 meld gvimdiff) vimdiff colordiff diff 2>/dev/null|sed 's/\s.*//;1q')
-## ABSLibre
-## Used by: `createworkdir`
-ABSLIBRERECV=git://git.parabola.nu/abslibre/abslibre.git
-ABSLIBRESEND=ssh://git@git.parabola.nu:1863/~git/abslibre/abslibre.git
################################################################################
# librerelease #
################################################################################
-## Where to upload packages to
-REPODEST=ssh://$LIBREUSER@repo.parabola.nu:1863/~/staging/
-## Which config file to use with db-update (on the $REPODEST server)
+## Login on the $TIER0_HOST server (normally, your hackers.git login)
+# Un-comment this and set it to your $TIER0_HOST login, if your $LIBREUSER differs.
+# $TIER0_LOGIN may also be set in the environment.
+# TIER0_LOGIN=
+
+## The host, port, and remote staging directory for uploading packages via SSH
+# `librerelease` will fail if $TIER0_HOST is unset or if any of these are invalid.
+# $TIER0_PORT and $TIER0_STAGING are optional. If not configured,
+# the SSH port ($TIER0_PORT) will be the SSH system default;
+# and the remote staging location ($TIER0_STAGING) will be ~$TIER0_LOGIN/staging/.
+# Mind $TIER0_STAGING especially. `librerelease -C` deletes this entire directory.
+# Do not use tilde ('~') in $TIER0_STAGING. Specify an absolute path instead.
+TIER0_HOST=repo.parabola.nu
+TIER0_PORT=1863
+TIER0_STAGING=
+
+## Config file on the $REPOHOST server for `db-update`
DBSCRIPTS_CONFIG=/etc/dbscripts/config.local.parabola
-## These are run before and after uploading packages
-HOOKPRERELEASE='ssh -fN ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}"'
+## Pre- and Post- hooks (BASH commands to run before or after uploading packages)
+HOOKPRERELEASE=
HOOKPOSTRELEASE="sudo librechroot clean-repo"
+
################################################################################
# dagpkg #
################################################################################
@@ -55,6 +90,7 @@ FULLBUILDCMD="sudo libremakepkg"
# successfully. When run, it is given a repository name as a single argument.
HOOKLOCALRELEASE="librestage"
+
################################################################################
# toru #
################################################################################
@@ -67,4 +103,5 @@ TORUPATH=/var/lib/libretools/toru
# inverted order of precedence. Put testing repos first so dagpkg will find new
# PKGBUILDs first, for instance. `toru-path` uses reverse order to enforce repo
# precedence on the path cache (the last path added replaces the rest)
-REPOS=('core' 'libre' 'extra' 'community' 'libre-testing' 'social' 'sugar' 'pcr' 'java')
+REPOS=( pcr{,-testing} extra core libre{,-testing} nonsystemd{,-testing} nonprism{,-testing} )
+
diff --git a/src/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree
index ccc846b..6bec280 100755
--- a/src/pkgbuild-check-nonfree
+++ b/src/pkgbuild-check-nonfree
@@ -5,7 +5,7 @@
# Copyright (C) 2011 Joseph Graham (Xylon) <joe@t67.eu>
# Copyright (C) 2010-2011 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
# Copyright (C) 2010-2012 Nicolás Reynolds <fauno@parabola.nu>
-# Copyright (C) 2012-2013, 2017 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2012-2013, 2017, 2024 Luke Shumaker <lukeshu@parabola.nu>
#
# License: GNU GPLv3+
#
@@ -57,7 +57,11 @@ usage() {
echo
flag '-h' 'Show this message'
}
-# Make sure these match pkgbuild-summarize-nonfree
+
+# Make sure these match:
+# - the usage() text above
+# - pkgbuild-summarize-nonfree
+# - pkgbuild-check-nonfree.bats
declare -ri _E_OK=0
declare -ri _E_ERROR=1
declare -ri _E_LIC_UNKNOWN=2
@@ -217,15 +221,29 @@ check_dep() {
# Checks for ${pkgname} in the blacklist
check_pkg() {
[[ $# == 1 ]] || panic 'malformed call to check_pkg'
- check_dep "$@"
- case $? in
- $_E_OK)
- return $_E_OK;;
- $_E_DEP_NONFREE)
- return $_E_PKG_NONFREE;;
- *)
- panic 'unexpected return code from check_dep';;
- esac
+ local pkg=$1
+
+ local line rep
+ line="$(blacklist-cat|blacklist-lookup "$pkg")"
+ rep="$(blacklist-get-rep <<<"$line")"
+ if [[ -z $line ]]; then
+ # not mentioned in blacklist; free
+ info '%s: not blacklisted' "$pkg"
+ return $_E_OK
+ elif [[ -z $rep ]]; then
+ # non-free with no replacement
+ plain '%s: blacklisted' "$pkg"
+ return $_E_PKG_NONFREE
+ else
+ # non-free with free replacement
+ if [[ "$rep" == "$pkg" ]]; then
+ info '%s: repackaged with the same name' "$pkg"
+ return $_E_OK
+ else
+ info '%s: replaced by %s (update blacklist.txt first if you would like to repackage it with the same name)' "$pkg" "$rep"
+ return $_E_PKG_NONFREE
+ fi
+ fi
panic 'code should never be reached'
}
diff --git a/test/cases/lib-blacklist.bats b/test/cases/lib-blacklist.bats
index 2388b15..4dc30c9 100644
--- a/test/cases/lib-blacklist.bats
+++ b/test/cases/lib-blacklist.bats
@@ -94,17 +94,15 @@ load ../lib/common
not empty $tmpdir/stderr
}
+# bats test_tags=network
@test "libreblacklist downloads the blacklist as needed" {
- require network || skip
-
libreblacklist cat >$tmpdir/stdout 2>$tmpdir/stderr
not empty $tmpdir/stdout
}
+# bats test_tags=network
@test "libreblacklist downloads the blacklist repeatedly" {
- require network || skip
-
libreblacklist update
libreblacklist update
}
@@ -130,3 +128,9 @@ load ../lib/common
[[ "$(sed 1q $tmpdir/stdout)" == 'Usage: libreblacklist cat' ]]
empty $tmpdir/stderr
}
+
+@test "libreblacklist checks for replacements from the repos" {
+ libreblacklist get-rep <<<'linux' >$tmpdir/stdout 2>$tmpdir/stderr
+ [[ "$(cat $tmpdir/stdout)" == 'libre/linux-libre' ]]
+ empty $tmpdir/stderr
+}
diff --git a/test/cases/lib-conf.bats b/test/cases/lib-conf.bats
index 0925640..6a8fee7 100644
--- a/test/cases/lib-conf.bats
+++ b/test/cases/lib-conf.bats
@@ -8,8 +8,8 @@ load ../lib/common
[[ $PKGDEST == /pkgdest ]]
}
+# bats test_tags=sudo
@test "lib/conf.sh figures out HOME when root" {
- require sudo || skip
# This one is tricky, because it does the job too well, it will find
# the actual HOME, instead of the test environment HOME. Therefore, we
# will just check that [[ $HOME != /root ]]
@@ -19,8 +19,8 @@ load ../lib/common
[[ $LIBREHOME != /root ]]
}
+# bats test_tags=sudo
@test "lib/conf.sh nests LIBREUSER" {
- require sudo || skip
[[ $USER != root ]]
cd "$tmpdir"
echo '. $(librelib conf.sh); echo "$LIBREUSER"' > test.sh
diff --git a/test/cases/lib-notifications.bats b/test/cases/lib-notifications.bats
new file mode 100644
index 0000000..b45c3ff
--- /dev/null
+++ b/test/cases/lib-notifications.bats
@@ -0,0 +1,39 @@
+readonly FIXURES_DIR=./fixtures//lib-notifications
+readonly TEST_SCRIPT="source ../src/lib/notifications.sh ; release_notification tester < "
+
+
+@test "lib/notifications.sh parses db-update log" {
+ run bash -c "${TEST_SCRIPT} $FIXURES_DIR/librerelease-complete-log.log"
+# echo "librerelease-complete-log.log=${output}" >&3
+ [[ "${output}" =~ "tester just published: (foo 1.2.3)->libre-testing/i686" ]]
+}
+
+@test "lib/notifications.sh parses db-update log - debug-pkg" {
+ run bash -c "${TEST_SCRIPT} $FIXURES_DIR/librerelease-debug-pkg.log"
+# echo "librerelease-debug-pkg.log=${output}" >&3
+ [[ "${output}" =~ "tester just published: (foo 1.2.3)->libre/i686" ]]
+}
+
+@test "lib/notifications.sh parses db-update log - multipkg-any" {
+ run bash -c "${TEST_SCRIPT} $FIXURES_DIR/librerelease-multipkg-any.log"
+# echo "librerelease-multipkg-any.log=${output}" >&3
+ [[ "${output}" =~ "tester just published: (gitget 20240221.1)->libre/armv7h (gitget 20240221.1)->libre/i686 (gitget 20240221.1)->libre/x86_64 (librelib 20240221.1)->libre/armv7h (librelib 20240221.1)->libre/i686 (librelib 20240221.1)->libre/x86_64 (libretools 20240221.1)->libre/armv7h (libretools 20240221.1)->libre/i686 (libretools 20240221.1)->libre/x86_64" ]]
+}
+
+@test "lib/notifications.sh parses db-update log - multipkg-multirepo-any" {
+ run bash -c "${TEST_SCRIPT} $FIXURES_DIR/librerelease-multipkg-multirepo-any.log"
+# echo "librerelease-multipkg-multirepo-any.log=${output}" >&3
+ [[ "${output}" =~ "tester just published: (gitget 20240221.1)->libre-testing/i686 (gitget 20240221.1)->libre-testing/x86_64 (gitget 20240221.1)->libre/armv7h (librelib 20240221.1)->libre-testing/i686 (librelib 20240221.1)->libre-testing/x86_64 (librelib 20240221.1)->libre/armv7h (libretools 20240221.1)->libre-testing/i686 (libretools 20240221.1)->libre-testing/x86_64 (libretools 20240221.1)->libre/armv7h" ]]
+}
+
+@test "lib/notifications.sh parses db-update log - multipkg-multirepo-multiarch" {
+ run bash -c "${TEST_SCRIPT} $FIXURES_DIR/librerelease-multipkg-multirepo-multiarch.log"
+# echo "librerelease-multipkg-multirepo-multiarch.log=${output}" >&3
+ [[ "${output}" =~ "tester just published: (bar 1.2.3)->libre/i686 (foo 1.2.3)->libre-testing/x86_64" ]]
+}
+
+@test "lib/notifications.sh parses db-update log - multirepo-multiarch" {
+ run bash -c "${TEST_SCRIPT} $FIXURES_DIR/librerelease-multirepo-multiarch.log"
+# echo "librerelease-multirepo-multiarch.log=${output}" >&3
+ [[ "${output}" =~ "tester just published: (foo 1.2.3)->libre-testing/x86_64 (foo 1.2.3)->libre/i686" ]]
+}
diff --git a/test/cases/librechroot.bats b/test/cases/librechroot.bats
index 7d05ebc..5073972 100644
--- a/test/cases/librechroot.bats
+++ b/test/cases/librechroot.bats
@@ -1,41 +1,39 @@
load ../lib/common
+# bats test_tags=network,sudo
@test "librechroot creates repo for new chroots" {
- require network sudo || skip
testsudo librechroot -l "$BATS_TEST_NAME" run test -r /repo/repo.db
}
+# bats test_tags=network,sudo
@test "librechroot cleans the local repo correctly" {
- require network sudo || skip
testsudo librechroot -l "$BATS_TEST_NAME" make
testsudo librechroot -l "$BATS_TEST_NAME" clean-repo
testsudo librechroot -l "$BATS_TEST_NAME" run test -r /repo/repo.db
# TODO: inspect /repo/* more
}
+# bats test_tags=network,sudo
@test "librechroot respects exit status if out isnt a tty" {
- require network sudo || skip
set -o pipefail
{ testsudo librechroot -l "$BATS_TEST_NAME" run bash -c 'exit 3' | cat; } || status=$?
[[ $status == 3 ]]
}
+# bats test_tags=network,sudo
@test "librechroot creates ca certificates" {
- require network sudo || skip
testsudo librechroot -l "$BATS_TEST_NAME" run test -r /etc/ssl/certs/ca-certificates.crt
}
+# bats test_tags=network,sudo
@test "librechroot disables networking when requested" {
- require network sudo || skip
-
testsudo librechroot -l "$BATS_TEST_NAME" run curl https://repo.parabola.nu/ >/dev/null
not testsudo librechroot -l "$BATS_TEST_NAME" -N run curl https://repo.parabola.nu/ >/dev/null
}
+# bats test_tags=network,sudo
@test "librechroot handles CHROOTEXTRAPKG correctly" {
- require network sudo || skip
-
not testsudo librechroot -l "$BATS_TEST_NAME" run lsof
echo "CHROOTEXTRAPKG=(lsof)" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
testsudo librechroot -l "$BATS_TEST_NAME" install-name lsof
@@ -46,35 +44,54 @@ load ../lib/common
not testsudo librechroot -l "$BATS_TEST_NAME" run lsof
}
+# bats test_tags=network,sudo
@test "librechroot obeys depends in PKGBUILD" {
- require network sudo || skip
-
- # Make sure it's not in the base install
+ # NB: We chown `/startdir` because chcleanup runs `makepkg
+ # --printsrcinfo > .SRCINFO` as the user that owns
+ # `/startdir/PKGBUILD`, and `makepkg` doesn't like to be run
+ # as root. Unfortunately, this test runs with a chroot that
+ # doesn't have the `builduser` set up, and it'd be a pain to
+ # set it up. So choose an arbitrary user from
+ # `/usr/lib/sysusers.d/arch.conf`.
+ local builduser_uid="${SUDO_UID:-$UID}"
+ local builduser_gid="$(id -g "$builduser_uid")"
+ testsudo librechroot -l "$BATS_TEST_NAME" run sh -c "
+ echo 'builduser:x:${builduser_gid}:' >>/etc/group
+ echo 'builduser:x:${builduser_uid}:${builduser_gid}:builduser:/build:/bin/bash' >>/etc/passwd
+ echo 'builduser:!!:$(( $(date -u +%s) / 86400 ))::::::' >>/etc/shadow"
+
+ # Pre-flight: Make sure `lsof` isn't in the base install
not testsudo librechroot -l "$BATS_TEST_NAME" run lsof
- # Make sure it removes it without the PKGBUILD
+ # Make sure librechroot removes `lsof` when the PKGBUILD is not present.
testsudo librechroot -l "$BATS_TEST_NAME" install-name lsof
testsudo librechroot -l "$BATS_TEST_NAME" run lsof
testsudo librechroot -l "$BATS_TEST_NAME" clean-pkgs
not testsudo librechroot -l "$BATS_TEST_NAME" run lsof
- # Make sure it leaves it with the PKGBUILD
+ # Make sure librechroot keeps `lsof` when the PKGBUILD is present.
testsudo librechroot -l "$BATS_TEST_NAME" install-name lsof
testsudo librechroot -l "$BATS_TEST_NAME" run sh -c 'printf "%s\n" "$1" > /startdir/PKGBUILD' -- "$(cat fixtures/librechroot/PKGBUILD-arches)"
- # uid=99 is 'nobody', but we say '99' because sometimes 'nobody' is uid=65534.
- # https://bugs.archlinux.org/task/56828
- testsudo librechroot -l "$BATS_TEST_NAME" run chown -R 99:99 /startdir
+ testsudo librechroot -l "$BATS_TEST_NAME" run chown -R builduser: /startdir
testsudo librechroot -l "$BATS_TEST_NAME" clean-pkgs
testsudo librechroot -l "$BATS_TEST_NAME" run lsof
}
+# bats test_tags=network,sudo
@test "librechroot can install libretools with chcleanup" {
- require network sudo || skip
+ # NB: We chown `/startdir` because chcleanup runs `makepkg
+ # --printsrcinfo > .SRCINFO` as the user that owns
+ # `/startdir/PKGBUILD`, and `makepkg` doesn't like to be run
+ # as root.
+ local builduser_uid="${SUDO_UID:-$UID}"
+ local builduser_gid="$(id -g "$builduser_uid")"
+ testsudo librechroot -l "$BATS_TEST_NAME" run sh -c "
+ echo 'builduser:x:${builduser_gid}:' >>/etc/group
+ echo 'builduser:x:${builduser_uid}:${builduser_gid}:builduser:/build:/bin/bash' >>/etc/passwd
+ echo 'builduser:!!:$(( $(date -u +%s) / 86400 ))::::::' >>/etc/shadow"
not testsudo librechroot -l "$BATS_TEST_NAME" run test -f /usr/bin/chcleanup
testsudo librechroot -l "$BATS_TEST_NAME" run mkdir /startdir
testsudo librechroot -l "$BATS_TEST_NAME" run sh -c 'printf "%s\n" "$1" > /startdir/PKGBUILD' -- "$(cat fixtures/librechroot/PKGBUILD-libretools)"
- # uid=99 is 'nobody', but we say '99' because sometimes 'nobody' is uid=65534.
- # https://bugs.archlinux.org/task/56828
- testsudo librechroot -l "$BATS_TEST_NAME" run chown -R 99:99 /startdir
+ testsudo librechroot -l "$BATS_TEST_NAME" run chown -R builduser: /startdir
testsudo librechroot -l "$BATS_TEST_NAME" clean-pkgs
testsudo librechroot -l "$BATS_TEST_NAME" run test -f /usr/bin/chcleanup
}
@@ -103,9 +120,8 @@ load ../lib/common
[[ "$(sed -n 2p $tmpdir/stderr)" =~ Usage:.* ]]
}
+# bats test_tags=network,sudo
@test "librechroot obeys the n flag" {
- require network sudo || skip
-
not test -f "$chrootdir/$BATS_TEST_NAME/$BATS_TEST_NAME/$BATS_TEST_NAME.stamp"
testsudo librechroot -n "$BATS_TEST_NAME" -l "$BATS_TEST_NAME" run touch /"$BATS_TEST_NAME.stamp"
@@ -114,8 +130,8 @@ load ../lib/common
}
# requires sudo so we know it's not failing because it needs root
+# bats test_tags=sudo
@test "librechroot fails for unknown commands" {
- require sudo || skip
testsudo librechroot phony >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
[[ $status != 0 ]]
@@ -124,8 +140,8 @@ load ../lib/common
}
# requires sudo so we know it's not failing because it needs root
+# bats test_tags=sudo
@test "librechroot fails for unknown flags" {
- require sudo || skip
testsudo librechroot -q >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
[[ $status != 0 ]]
@@ -133,8 +149,8 @@ load ../lib/common
not empty $tmpdir/stderr
}
+# bats test_tags=sudo
@test "librechroot fails when syncing a copy with itself" {
- require sudo || skip
testsudo timeout 5 librechroot -l root sync || status=$?
case $status in
0|124|137) # success|timeout+TERM|timeout+KILL
@@ -144,16 +160,17 @@ load ../lib/common
esac
}
+# bats test_tags=network,sudo
@test "librechroot deletes copies" {
- require network sudo || skip
testsudo librechroot -l "$BATS_TEST_NAME" make
test -d "$chrootdir/default/$BATS_TEST_NAME"
testsudo librechroot -l "$BATS_TEST_NAME" delete
not test -e "$chrootdir/default/$BATS_TEST_NAME"
}
+# bats test_tags=network,sudo,btrfs
@test "librechroot deletes subvolumes recursively" {
- require network sudo btrfs || skip
+ [[ "$(stat -f -c %T "$chrootdir" 2>/dev/null || true)" == 'btrfs' ]]
testsudo librechroot -l "$BATS_TEST_NAME" make
testsudo librechroot -l "$BATS_TEST_NAME" install-name btrfs-progs
test -d "$chrootdir/default/$BATS_TEST_NAME"
@@ -164,9 +181,8 @@ load ../lib/common
not test -e "$chrootdir/default/$BATS_TEST_NAME"
}
+# bats test_tags=network,sudo
@test "librechroot cleans up TMPDIR" {
- require network sudo || skip
-
local dir="$tmpdir/tmp"
mkdir -- "$dir"
diff --git a/test/cases/librefetch.bats b/test/cases/librefetch.bats
index 8f03494..21150bb 100644
--- a/test/cases/librefetch.bats
+++ b/test/cases/librefetch.bats
@@ -12,7 +12,6 @@ setup() {
BUILDDIR=""
source ${_librelib_conf_sh_sysconfdir@Q}/makepkg.d/librefetch.conf
eot
- export MAKEPKG_CONF="$XDG_CONFIG_HOME/pacman/makepkg.conf"
install -Dm644 /dev/stdin "$XDG_CONFIG_HOME/libretools/librefetch.conf" <<-eot
MIRRORS=("phony://example.com/dir/")
@@ -130,3 +129,31 @@ setup() {
empty "$tmpdir/workdir/srcdest/$srcball"
gpg --quiet --verify "$tmpdir/workdir/srcdest/$srcball"{.sig,} 2>/dev/null
}
+
+@test "librefetch handles split packages" {
+ cp fixtures/librefetch/* "$tmpdir/"
+ cd "$tmpdir"
+ mv PKGBUILD{-split,}
+
+ makepkg -g
+}
+
+@test "librefetch uses the specified compression" {
+ cp fixtures/librefetch/* "$tmpdir/"
+ cd "$tmpdir"
+ local srcball
+
+ # Both gzip and bzip2 are in 'base', so this choice of
+ # compression methods doesn't add anything to our list of
+ # dependencies.
+
+ srcball=testpkg-1.0.tar.gz
+ mv PKGBUILD{-mksource,}
+ makepkg -g
+ gzip -d <"$tmpdir/workdir/srcdest/$srcball" >/dev/null
+
+ srcball=testpkg-bz2-1.0.tar.bz2
+ mv PKGBUILD{-bz2,}
+ makepkg -g
+ bzip2 -d <"$tmpdir/workdir/srcdest/$srcball" >/dev/null
+}
diff --git a/test/cases/libremakepkg.bats b/test/cases/libremakepkg.bats
index 2184de2..985d6f6 100644
--- a/test/cases/libremakepkg.bats
+++ b/test/cases/libremakepkg.bats
@@ -1,5 +1,7 @@
load ../lib/common
+shopt -s extglob
+
setup() {
common_setup
@@ -18,51 +20,51 @@ teardown() {
common_teardown
}
+# bats test_tags=network,sudo
@test "libremakepkg builds a trivial package" {
- require network sudo || skip
cp fixtures/libremakepkg/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
testsudo libremakepkg -l "$BATS_TEST_NAME"
- globfile libretools-hello-1.0-1-any.pkg.tar.?z
+ globfile libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "libremakepkg disables networking during prepare" {
- require network sudo || skip
cp fixtures/libremakepkg/PKGBUILD-netprepare "$tmpdir/PKGBUILD"
cd "$tmpdir"
not testsudo libremakepkg -l "$BATS_TEST_NAME"
- not globfile libretools-netprepare-1.0-1-any.pkg.tar.?z
+ not globfile libretools-netprepare-1.0-1-any.pkg.tar?(.!(sig|*.*))
testsudo libremakepkg -l "$BATS_TEST_NAME" -N
- globfile libretools-netprepare-1.0-1-any.pkg.tar.?z
+ globfile libretools-netprepare-1.0-1-any.pkg.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "libremakepkg disables networking during build" {
- require network sudo || skip
cp fixtures/libremakepkg/PKGBUILD-netbuild "$tmpdir/PKGBUILD"
cd "$tmpdir"
not testsudo libremakepkg -l "$BATS_TEST_NAME"
- not globfile libretools-netbuild-1.0-1-any.pkg.tar.?z
+ not globfile libretools-netbuild-1.0-1-any.pkg.tar?(.!(sig|*.*))
testsudo libremakepkg -l "$BATS_TEST_NAME" -N
- globfile libretools-netbuild-1.0-1-any.pkg.tar.?z
+ globfile libretools-netbuild-1.0-1-any.pkg.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "libremakepkg disables networking during package" {
- require network sudo || skip
cp fixtures/libremakepkg/PKGBUILD-netpackage "$tmpdir/PKGBUILD"
cd "$tmpdir"
not testsudo libremakepkg -l "$BATS_TEST_NAME"
- not globfile libretools-netpackage-1.0-1-any.pkg.tar.?z
+ not globfile libretools-netpackage-1.0-1-any.pkg.tar?(.!(sig|*.*))
testsudo libremakepkg -l "$BATS_TEST_NAME" -N
- globfile libretools-netpackage-1.0-1-any.pkg.tar.?z
+ globfile libretools-netpackage-1.0-1-any.pkg.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "libremakepkg cleans the chroot before building" {
- require network sudo || skip
# 1. First, we build testpkg1
# 2. Then, we build testpkg2, which depends on testpkg1
# Therefore, testpkg1 will be installed after testpkg2 is built, we
@@ -88,21 +90,21 @@ teardown() {
# This next line is actually a separate test, but it fits in well with this test, and chroot tests are slow.
# @test "libremakepkg doesnt cache local packages" {
- not testsudo librechroot -l "$BATS_TEST_NAME" run test -e /var/cache/pacman/pkg/libretools-testpkg1-1.0-1-any.pkg.tar.?z
+ not testsudo librechroot -l "$BATS_TEST_NAME" run bash -O extglob -c 'test -e /var/cache/pacman/pkg/libretools-testpkg1-1.0-1-any.pkg.tar?(.!(sig|*.*))'
cd "$tmpdir/3"
testsudo libremakepkg -l "$BATS_TEST_NAME" &> "$tmpdir/out" || { status=$?; tail "$tmpdir/out"|cat -v; return $status; }
not testsudo librechroot -l "$BATS_TEST_NAME" run libretools-testpkg1 'second time, fail'
}
+# bats test_tags=network,sudo
@test "libremakepkg handles PKGDEST not existing" {
- require network sudo || skip
cp fixtures/libremakepkg/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
testsudo env PKGDEST="$tmpdir/dest/pkgdest" libremakepkg -l "$BATS_TEST_NAME"
- globfile dest/pkgdest/libretools-hello-1.0-1-any.pkg.tar.?z
+ globfile dest/pkgdest/libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
}
@test "libremakepkg displays help as normal user" {
@@ -125,8 +127,8 @@ teardown() {
not empty $tmpdir/stderr
}
+# bats test_tags=network,sudo
@test "libremakepkg fails if a hook fails" {
- require network sudo || skip
cp fixtures/libremakepkg/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
@@ -140,8 +142,8 @@ teardown() {
tail -n1 $tmpdir/stderr | grep -qF '==> ERROR: Failure(s) in check_pkgbuild: check_pkgbuild_nonfree'
}
+# bats test_tags=network,sudo
@test "libremakepkg detects distcc files" {
- require network sudo || skip
cp fixtures/libremakepkg/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
@@ -152,19 +154,18 @@ teardown() {
# first make sure that the engine works
testsudo libremakepkg -l "$BATS_TEST_NAME"
- globfile libretools-hello-1.0-1-any.pkg.tar.?z
- rm -f -- libretools-hello-1.0-1-any.pkg.tar.?z
+ globfile libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ rm -f -- libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
# now throw a wrench in it
testsudo librechroot -l "$BATS_TEST_NAME" run touch /bin/distcc-tool
# and make sure that the engine broke
testsudo libremakepkg -l "$BATS_TEST_NAME" || status=$?
[[ $status != 0 ]]
- not globfile libretools-hello-1.0-1-any.pkg.tar.?z
+ not globfile libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "libremakepkg forwards distcc ports" {
- require network sudo || skip
-
# The maximum AF_UNIX socket path is 108 bytes; so let's have
# a chroot name that's guaranteed to be >110 characters, to
# make sure we handle that.
@@ -185,12 +186,11 @@ teardown() {
cd "$tmpdir"
testsudo librechroot -l "$chrootname" install-name distcc-nozeroconf socat
testsudo libremakepkg -l "$chrootname"
- globfile libretools-distcc-1.0-1-any.pkg.tar.?z
+ globfile libretools-distcc-1.0-1-any.pkg.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "libremakepkg doesnt symlink outputs" {
- require network sudo || skip
-
sed -i /^unset/d "$XDG_CONFIG_HOME/pacman/makepkg.conf"
cp fixtures/libremakepkg/PKGBUILD-hello "$tmpdir/PKGBUILD"
@@ -198,15 +198,14 @@ teardown() {
testsudo libremakepkg -l "$BATS_TEST_NAME"
- not stat libretools-hello-1.0-1-any.pkg.tar.?z
- not stat libretools-hello-1.0-1-any.src.tar.?z
- globfile "$tmpdir/workdir/pkgdest"/libretools-hello-1.0-1-any.pkg.tar.?z
- globfile "$tmpdir/workdir/srcpkgdest"/libretools-hello-1.0-1-any.src.tar.?z
+ not stat libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ not stat libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*))
+ globfile "$tmpdir/workdir/pkgdest"/libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ globfile "$tmpdir/workdir/srcpkgdest"/libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "libremakepkg succeeds with good signatures" {
- require network sudo || skip
-
cp fixtures/libremakepkg/PKGBUILD-signed "$tmpdir/PKGBUILD"
cp fixtures/libremakepkg/hello.sh "$tmpdir/hello.sh"
cd "$tmpdir"
@@ -215,9 +214,8 @@ teardown() {
testsudo libremakepkg -l "$BATS_TEST_NAME"
}
+# bats test_tags=network,sudo
@test "libremakepkg fails with bad signatures" {
- require network sudo || skip
-
cp fixtures/libremakepkg/PKGBUILD-signed "$tmpdir/PKGBUILD"
cp fixtures/libremakepkg/hello.sh "$tmpdir/hello.sh"
cd "$tmpdir"
@@ -228,23 +226,32 @@ teardown() {
not testsudo libremakepkg -l "$BATS_TEST_NAME"
}
+# bats test_tags=network,sudo
@test "libremakepkg does not run pkgver" {
- require network sudo || skip
-
cp fixtures/libremakepkg/PKGBUILD-pkgver "$tmpdir/PKGBUILD"
pushd "$tmpdir"
testsudo libremakepkg -l "$BATS_TEST_NAME"
- globfile libretools-pkgver-1-1-any.pkg.tar.?z
- not globfile libretools-pkgver-2-1-any.pkg.tar.?z
+ globfile libretools-pkgver-1-1-any.pkg.tar?(.!(sig|*.*))
+ not globfile libretools-pkgver-2-1-any.pkg.tar?(.!(sig|*.*))
popd
diff -u fixtures/libremakepkg/PKGBUILD-pkgver "$tmpdir/PKGBUILD"
}
-@test "libremakepkg can re-use source-packages" {
- require network sudo || skip
+# bats test_tags=network,sudo
+@test "libremakepkg has a flag to make startdir rw" {
+ cp fixtures/libremakepkg/PKGBUILD-rwstartdir "$tmpdir/PKGBUILD"
+ cd "$tmpdir"
+
+ not testsudo libremakepkg -l "$BATS_TEST_NAME"
+ not globfile libretools-rwstartdir-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ testsudo libremakepkg -l "$BATS_TEST_NAME" -W
+ globfile libretools-rwstartdir-1.0-1-any.pkg.tar?(.!(sig|*.*))
+}
+# bats test_tags=network,sudo
+@test "libremakepkg can re-use source-packages" {
cp fixtures/libremakepkg/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
@@ -253,16 +260,16 @@ teardown() {
# timestamps.
testsudo libremakepkg -l "$BATS_TEST_NAME"
- globfile libretools-hello-1.0-1-any.src.tar.?z
- globfile libretools-hello-1.0-1-any.pkg.tar.?z
- a_stime=$(stat -c %Y -- libretools-hello-1.0-1-any.src.tar.?z)
- a_ptime=$(stat -c %Y -- libretools-hello-1.0-1-any.pkg.tar.?z)
-
- testsudo libremakepkg -l "$BATS_TEST_NAME" -S libretools-hello-1.0-1-any.src.tar.?z
- globfile libretools-hello-1.0-1-any.src.tar.?z
- globfile libretools-hello-1.0-1-any.pkg.tar.?z
- b_stime=$(stat -c %Y -- libretools-hello-1.0-1-any.src.tar.?z)
- b_ptime=$(stat -c %Y -- libretools-hello-1.0-1-any.pkg.tar.?z)
+ globfile libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*))
+ globfile libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ a_stime=$(stat -c %Y -- libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*)))
+ a_ptime=$(stat -c %Y -- libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*)))
+
+ testsudo libremakepkg -l "$BATS_TEST_NAME" -S libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*))
+ globfile libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*))
+ globfile libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ b_stime=$(stat -c %Y -- libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*)))
+ b_ptime=$(stat -c %Y -- libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*)))
(( a_stime == b_stime ))
(( a_ptime < b_ptime ))
diff --git a/test/cases/librerelease.bats b/test/cases/librerelease.bats
index 93a04e3..e936ea8 100644
--- a/test/cases/librerelease.bats
+++ b/test/cases/librerelease.bats
@@ -1,5 +1,44 @@
load ../lib/common
+## helpers ##
+
+# Stub server-side `db-update` for SSH localhost to run
+StubDbupdate()
+{
+ cat <<-eot
+#!/bin/bash
+echo "==> Updating [fake-repo]"
+{
+ printf '%s\n' "\$DBSCRIPTS_CONFIG"
+ readlink -f -- "\$STAGING"
+ find "\$STAGING" -printf '%P\n' | LC_COLLATE=C sort
+} > ${tmpdir@Q}/log.txt
+eot
+}
+
+# Stub server-side `pbot-say` for SSH localhost to run
+StubPbotsay()
+{
+ cat <<-eot
+#!/bin/bash
+echo "\$*" >${tmpdir@Q}/pbot.txt
+eot
+}
+
+StageFiles()
+{
+ local staging_dir="$1"
+
+ mkdir -p "$staging_dir"/repo1 "$staging_dir"/repo2/sub
+ touch "$staging_dir"/repo1/file1 \
+ "$staging_dir"/repo1/file2 \
+ "$staging_dir/repo2/file with spaces" \
+ "$staging_dir"/repo2/sub/subfolder
+}
+
+
+## setup/teardown ##
+
setup() {
common_setup
@@ -12,7 +51,7 @@ setup() {
PasswordAuthentication no
AcceptEnv TMPDIR
AcceptEnv _HOME GNUPGHOME XDG_CACHE_HOME XDG_CONFIG_HOME
- AcceptEnv _PATH LIBRETOOLS_LIBDIR _librelib_conf_sh_sysconfdir _librelib_conf_sh_pkgconfdir
+ AcceptEnv _PATH LIBRETOOLS_LIBRARY_PATH _librelib_conf_sh_sysconfdir _librelib_conf_sh_pkgconfdir
AcceptEnv GPGKEY
ForceCommand HOME=\$_HOME; PATH=\$_PATH; eval "\$SSH_ORIGINAL_COMMAND"
eot
@@ -30,7 +69,9 @@ setup() {
# Configure libretools
cat >> "$XDG_CONFIG_HOME/libretools/libretools.conf" <<-eot
- REPODEST=ssh://${USER@Q}@127.0.0.1:${ssh_port@Q}/${tmpdir@Q}/srv-staging/
+ TIER0_HOST=127.0.0.1
+ TIER0_PORT=$ssh_port
+ TIER0_STAGING=${tmpdir@Q}/srv-staging/
DBSCRIPTS_CONFIG=/etc/dbscripts/config.local.phony
HOOKPRERELEASE=:
HOOKPOSTRELEASE=:
@@ -43,24 +84,21 @@ teardown() {
common_teardown
}
+
+## tests ##
+
@test "librerelease displays usage text" {
rm -rf "$XDG_CONFIG_HOME"
- LC_ALL=C librerelease -h >"$tmpdir/stdout" 2>"$tmpdir/stderr"
+ LC_ALL=C librerelease -h > "$tmpdir/stdout" 2> "$tmpdir/stderr"
[[ "$(sed 1q "$tmpdir/stdout")" =~ Usage:.* ]]
empty "$tmpdir/stderr"
}
@test "librerelease lists all files" {
- local workdir="$tmpdir/workdir"
- mkdir -p "$workdir/staging/repo1" "$workdir/staging/repo2/sub"
- touch \
- "$workdir/staging/repo1/file1" \
- "$workdir/staging/repo1/file2" \
- "$workdir/staging/repo2/file with spaces" \
- "$workdir/staging/repo2/sub/subfolder"
+ StageFiles "$tmpdir"/workdir/staging
- LC_ALL=C librerelease -l &>"$tmpdir/list" || { status=$?; cat "$tmpdir/list"; return $status; }
+ LC_ALL=C librerelease -l &> "$tmpdir/list" || { status=$?; cat "$tmpdir/list"; return $status; }
cat > "$tmpdir/list-correct" <<-eot
-> repo1
@@ -71,58 +109,94 @@ teardown() {
sub/subfolder
eot
- diff "$tmpdir/list-correct" "$tmpdir/list"
+ diff -u "$tmpdir/list-correct" "$tmpdir/list"
}
-@test "librerelease fails if gpgkey not set" {
+@test "librerelease fails if GPGKEY not set" {
unset GPGKEY
- local workdir="$tmpdir/workdir"
- mkdir -p "$workdir/staging/repo1" "$workdir/staging/repo2/sub"
- touch \
- "$workdir/staging/repo1/file1" \
- "$workdir/staging/repo1/file2" \
- "$workdir/staging/repo2/file with spaces" \
- "$workdir/staging/repo2/sub/subfolder"
+ StageFiles "$tmpdir"/workdir/staging
- LC_ALL=C librerelease -l >"$tmpdir/stdout" 2>"$tmpdir/stderr" || status=$?
+ LC_ALL=C librerelease -l > "$tmpdir/stdout" 2> "$tmpdir/stderr" || status=$?
[[ $status != 0 ]]
empty "$tmpdir/stdout"
grep GPGKEY "$tmpdir/stderr"
}
+@test "librerelease fails if TIER0_HOST not set" {
+ unset TIER0_HOST
+ sed -i 's|TIER0_HOST=.*|TIER0_HOST=|' "$XDG_CONFIG_HOME/libretools/libretools.conf"
+
+ StageFiles "$tmpdir"/workdir/staging
+
+ LC_ALL=C librerelease -l > "$tmpdir"/stdout 2> "$tmpdir"/stderr || status=$?
+
+ [[ $status != 0 ]]
+ grep "libretools.conf variables may have changed" "$tmpdir"/stdout
+ grep TIER0_HOST "$tmpdir"/stderr
+}
+
@test "librerelease fails if DBSCRIPTS_CONFIG is not set" {
cat >> "$XDG_CONFIG_HOME/libretools/libretools.conf" <<-eot
DBSCRIPTS_CONFIG=''
eot
- local workdir="$tmpdir/workdir"
- mkdir -p "$workdir/staging/repo1" "$workdir/staging/repo2/sub"
- touch \
- "$workdir/staging/repo1/file1" \
- "$workdir/staging/repo1/file2" \
- "$workdir/staging/repo2/file with spaces" \
- "$workdir/staging/repo2/sub/subfolder"
+ StageFiles "$tmpdir"/workdir/staging
- LC_ALL=C librerelease -l >"$tmpdir/stdout" 2>"$tmpdir/stderr" || status=$?
+ LC_ALL=C librerelease -l > "$tmpdir/stdout" 2> "$tmpdir/stderr" || status=$?
[[ $status != 0 ]]
- empty "$tmpdir/stdout"
+ grep "libretools.conf variables may have changed" "$tmpdir/stdout"
grep DBSCRIPTS_CONFIG "$tmpdir/stderr"
}
-@test "librerelease runs" {
- # Add a stub db-update so that when we ssh to localhost it has
- # something to run.
- install -Dm755 /dev/stdin "$tmpdir/bin/db-update" <<-eot
- #!/bin/bash
- {
- printf '%s\n' "\$DBSCRIPTS_CONFIG"
- readlink -f -- "\$STAGING"
- find "\$STAGING" -printf '%P\n' | LC_COLLATE=C sort
- } > ${tmpdir@Q}/log.txt
- eot
+@test "librerelease cleans local staging" {
+ local staging_dir="$tmpdir"/workdir/staging ; StageFiles "$staging_dir" ;
+
+ cat > "$tmpdir"/expected-stdout <<-eot
+removed 'repo1/file1'
+removed 'repo1/file2'
+removed 'repo2/file with spaces'
+removed 'repo2/sub/subfolder'
+eot
+
+ LC_ALL=C librerelease -c > "$tmpdir"/stdout 2> "$tmpdir"/stderr || status=$?
+
+ [[ $status == 0 ]]
+ grep "==> Removing files from local staging directory" "$tmpdir"/stderr
+ diff -u "$tmpdir"/expected-stdout "$tmpdir"/stdout
+ (( ! $(command ls -A1 "$staging_dir" | wc -l) ))
+}
+
+@test "librerelease cleans remote staging" {
+ local staging_dir="$tmpdir"/srv-staging ; StageFiles "$staging_dir" ;
+
+ cat > "$tmpdir"/expected-stdout <<-eot
+removed '$staging_dir//repo1/file1'
+removed '$staging_dir//repo1/file2'
+removed directory '$staging_dir//repo1'
+removed '$staging_dir//repo2/file with spaces'
+removed '$staging_dir//repo2/sub/subfolder'
+removed directory '$staging_dir//repo2/sub'
+removed directory '$staging_dir//repo2'
+eot
+
+ LC_ALL=C librerelease -C > "$tmpdir"/stdout 2> "$tmpdir"/stderr || status=$?
+
+ [[ $status == 0 ]]
+ grep "==> Removing files from remote staging directory" "$tmpdir"/stderr
+ # `rm -rfv` order depends on the underlying filesystem and so
+ # we need to sort this for it to be reproducible.
+ LC_ALL=C sort <"$tmpdir"/expected-stdout >"$tmpdir"/expected-stdout.sorted
+ LC_ALL=C sort <"$tmpdir"/stdout >"$tmpdir"/stdout.sorted
+ diff -u "$tmpdir"/expected-stdout.sorted "$tmpdir"/stdout.sorted
+ (( ! $(command ls -A1 "$staging_dir" | wc -l) ))
+}
+
+@test "librerelease publishes packages successfully" {
+ # Add server-side stub
+ install -Dm755 /dev/stdin "$tmpdir/bin/db-update" < <(StubDbupdate) # writes log.txt
PATH=$tmpdir/bin:$PATH
# Log which directories the hooks are run in.
@@ -131,14 +205,7 @@ teardown() {
HOOKPOSTRELEASE='pwd > ${tmpdir@Q}/postrelease.txt'
eot
- # Make some files to stage
- local workdir="$tmpdir/workdir"
- mkdir -p "$workdir/staging/repo1" "$workdir/staging/repo2/sub"
- touch \
- "$workdir/staging/repo1/file1" \
- "$workdir/staging/repo1/file2" \
- "$workdir/staging/repo2/file with spaces" \
- "$workdir/staging/repo2/sub/subfolder"
+ StageFiles "$tmpdir"/workdir/staging
# Run
librerelease
@@ -165,3 +232,29 @@ teardown() {
diff -u "$tmpdir/pwd.txt" "$tmpdir/prerelease.txt"
diff -u "$tmpdir/pwd.txt" "$tmpdir/postrelease.txt"
}
+
+@test "librerelease notifies pbot" {
+ # Add server-side stubs
+ install -Dm755 /dev/stdin "$tmpdir"/bin/db-update < <(StubDbupdate) # writes log.txt
+ install -Dm755 /dev/stdin "$tmpdir"/bin/pbot-say < <(StubPbotsay ) # writes pbot.txt
+ PATH=$tmpdir/bin:$PATH
+
+ StageFiles "$tmpdir"/workdir/staging
+
+ LC_ALL=C librerelease 2> "$tmpdir"/stderr
+
+ grep -E " -> Notifying pbot:" "$tmpdir"/stderr
+ #grep " $USER just published:" "$tmpdir"/pbot.txt
+ grep "$USER just published:" "$tmpdir"/pbot.txt
+}
+
+@test "librerelease logs-in as TIER0_LOGIN" {
+ PATH=$tmpdir/bin:$PATH
+
+ echo "TIER0_LOGIN=tier0-user" >> "$XDG_CONFIG_HOME"/libretools/libretools.conf
+ LC_ALL=C librerelease -C > "$tmpdir"/stdout 2> "$tmpdir"/stderr || status=$?
+
+ [[ $status != 0 ]]
+ empty "$tmpdir"/stdout
+ grep "tier0-user@127.0.0.1: Permission denied" "$tmpdir"/stderr
+}
diff --git a/test/cases/librestage.bats b/test/cases/librestage.bats
index 1bc5c25..000ea3e 100644
--- a/test/cases/librestage.bats
+++ b/test/cases/librestage.bats
@@ -1,5 +1,7 @@
load ../lib/common
+shopt -s extglob
+
@test "librestage displays usage text" {
rm -rf "$XDG_CONFIG_HOME"
LC_ALL=C librestage -h >$tmpdir/stdout 2>$tmpdir/stderr
@@ -24,27 +26,22 @@ load ../lib/common
not empty "$tmpdir/stderr"
}
+# bats test_tags=network,sudo
@test "librestage guesses the repo" {
- nochroot=false; require network sudo || nochroot=true
mkdir -p -- "$tmpdir/reponame/libretools-hello"
cp fixtures/librestage/PKGBUILD-hello "$tmpdir/reponame/libretools-hello/PKGBUILD"
cd "$tmpdir/reponame/libretools-hello"
- if $nochroot; then
- makepkg
- else
- testsudo libremakepkg -l "$BATS_TEST_NAME"
- fi
+ testsudo libremakepkg -l "$BATS_TEST_NAME"
librestage
find "$tmpdir" -not -type d -exec ls -ld -- {} +
- globfile $tmpdir/workdir/staging/reponame/libretools-hello-1.0-1-any.pkg.tar.?z
- $nochroot || globfile $tmpdir/workdir/staging/sources/parabola/libretools-hello-1.0-1-any.src.tar.?z
+ globfile $tmpdir/workdir/staging/reponame/libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ globfile $tmpdir/workdir/staging/sources/parabola/libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*))
}
+# bats test_tags=network,sudo
@test "librestage stages packages without PKGDEST" {
- nochroot=false; require network sudo || nochroot=true
-
cat >> "$XDG_CONFIG_HOME/pacman/makepkg.conf" <<-eot
PKGDEST=''
SRCPKGDEST=''
@@ -53,14 +50,10 @@ load ../lib/common
cp fixtures/librestage/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
- if $nochroot; then
- makepkg
- else
testsudo libremakepkg -l "$BATS_TEST_NAME"
- fi
librestage repo1
find "$tmpdir" -not -type d -exec ls -ld -- {} +
- globfile $tmpdir/workdir/staging/repo1/libretools-hello-1.0-1-any.pkg.tar.?z
- $nochroot || globfile $tmpdir/workdir/staging/sources/parabola/libretools-hello-1.0-1-any.src.tar.?z
+ globfile $tmpdir/workdir/staging/repo1/libretools-hello-1.0-1-any.pkg.tar?(.!(sig|*.*))
+ globfile $tmpdir/workdir/staging/sources/parabola/libretools-hello-1.0-1-any.src.tar?(.!(sig|*.*))
}
diff --git a/test/cases/pkgbuild-check-nonfree.bats b/test/cases/pkgbuild-check-nonfree.bats
index 36f6619..ffd8de8 100644
--- a/test/cases/pkgbuild-check-nonfree.bats
+++ b/test/cases/pkgbuild-check-nonfree.bats
@@ -9,57 +9,170 @@ setup() {
eot
install -Dm644 /dev/stdin "$XDG_CACHE_HOME/libretools/blacklist.txt" <<-eot
linux:linux-libre:nonfree blobs and firmwares
+ rubygemsx:rubygemsx:repackaged
skype
eot
}
+# Make sure these match pkgbuild-check-nonfree
+declare -rig _E_OK=0
+declare -rig _E_ERROR=1
+declare -rig _E_LIC_UNKNOWN=2
+declare -rig _E_LIC_NOGPL=4
+declare -rig _E_LIC_NONFREE=8
+declare -rig _E_DEP_NONFREE=16
+declare -rig _E_PKG_NONFREE=32
+
+# Make sure these match pkgbuild-summarize-nonfree (libremessages)
+declare -rig EXIT_SUCCESS=0
+declare -rig EXIT_FAILURE=1
+
+# basic operation ##############################################################
+
@test "pkgbuild-check-nonfree displays usage text" {
# This test seems silly, but it makes sure that it is executable,
- # syntactically correct, and loading libraries works.
- LC_ALL=C pkgbuild-check-nonfree -h >$tmpdir/stdout 2>$tmpdir/stderr
- status=$?
-
+ # syntactically correct, and loading libraries works.
+ LC_ALL=C pkgbuild-check-nonfree -h >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
[[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]]
empty $tmpdir/stderr
- [[ $status == 0 ]]
+ [[ $status == $_E_OK ]]
}
+@test "pkgbuild-check-nonfree errors on invalid flags" {
+ pkgbuild-check-nonfree -x >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_ERROR ]]
+}
+
+@test "pkgbuild-check-nonfree fails when there is no blacklist" {
+ rm $XDG_CACHE_HOME/libretools/blacklist.txt
+
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.free >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_ERROR ]]
+}
+
+# PKGBUILD codes ###############################################################
+
+# basic _E_OK
@test "pkgbuild-check-nonfree succeeds for free depends" {
pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.free >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_OK ]]
+}
+# _E_DEP_LIC_UNKNOWN
+@test "pkgbuild-check-nonfree warns about unknown licenses" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-unknown >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_LIC_UNKNOWN ]]
+
+ local pcn_stat=$status
+ status=0
+
+ pkgbuild-summarize-nonfree $pcn_stat >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
empty $tmpdir/stdout
not empty $tmpdir/stderr
- [[ $status == 0 ]]
+ [[ $status == $EXIT_SUCCESS ]]
}
-@test "pkgbuild-check-nonfree succeeds for nonfree depend with replacement" {
- pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree-replacement >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+# _E_DEP_LIC_NOGPL
+@test "pkgbuild-check-nonfree warns about GPL-incompatible licenses" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nogpl >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_LIC_NOGPL ]]
+
+ local pcn_stat=$status
+ status=0
+
+ pkgbuild-summarize-nonfree $pcn_stat >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $EXIT_SUCCESS ]]
+}
+# _E_DEP_LIC_NONFREE
+@test "pkgbuild-check-nonfree fails on nonfree licenses" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nonfree >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
empty $tmpdir/stdout
not empty $tmpdir/stderr
- [[ $status == 0 ]]
+ [[ $status == $_E_LIC_NONFREE ]]
+
+ local pcn_stat=$status
+ status=0
+
+ pkgbuild-summarize-nonfree $pcn_stat >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $EXIT_FAILURE ]]
}
+# _E_DEP_NONFREE
+@test "pkgbuild-check-nonfree succeeds for repackaged depend" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-repackaged >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_OK ]]
+}
+@test "pkgbuild-check-nonfree succeeds for nonfree depend with replacement" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree-replacement >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_OK ]]
+}
@test "pkgbuild-check-nonfree fails for nonfree depend" {
- pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
- [[ $status != 0 ]]
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
empty $tmpdir/stdout
not empty $tmpdir/stderr
+ [[ $status == $_E_DEP_NONFREE ]]
local pcn_stat=$status
+ status=0
pkgbuild-summarize-nonfree $pcn_stat >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
- [[ $status != 0 ]]
empty $tmpdir/stdout
not empty $tmpdir/stderr
+ [[ $status == $EXIT_FAILURE ]]
}
-@test "pkgbuild-check-nonfree fails when there is no blacklist" {
- rm $XDG_CACHE_HOME/libretools/blacklist.txt
+# _E_PKG_NONFREE
+@test "pkgbuild-check-nonfree succeeds for repackaged package" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-repackaged >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_OK ]]
+}
+@test "pkgbuild-check-nonfree fails for package with replacement" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree-replacement >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ echo [[ $status == $_E_PKG_NONFREE ]]
+ [[ $status == $_E_PKG_NONFREE ]]
- pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.free >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ local pcn_stat=$status
+ status=0
+ pkgbuild-summarize-nonfree $pcn_stat >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $EXIT_FAILURE ]]
+}
+@test "pkgbuild-check-nonfree fails for nonfree package" {
+ pkgbuild-check-nonfree fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ [[ $status == $_E_PKG_NONFREE ]]
+
+ local pcn_stat=$status
+ status=0
+
+ pkgbuild-summarize-nonfree $pcn_stat >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
empty $tmpdir/stdout
not empty $tmpdir/stderr
- [[ $status != 0 ]] && [[ $status != 15 ]]
+ [[ $status == $EXIT_FAILURE ]]
}
diff --git a/test/fixtures/lib-notifications/librerelease-complete-log.log b/test/fixtures/lib-notifications/librerelease-complete-log.log
new file mode 100644
index 0000000..ec4c8d8
--- /dev/null
+++ b/test/fixtures/lib-notifications/librerelease-complete-log.log
@@ -0,0 +1,6 @@
+copied 'sources/parabola/foo-1.2.3-4-i686.src.tar.gz' -> '/srv/repo/main/sources/parabola/foo-1.2.3-4-i686.src.tar.gz'
+removed 'sources/parabola/foo-1.2.3-4-i686.src.tar.gz'
+copied 'sources/parabola/foo-1.2.3-4-i686.src.tar.gz.sig' -> '/srv/repo/main/sources/parabola/foo-1.2.3-4-i686.src.tar.gz.sig'
+removed 'sources/parabola/foo-1.2.3-4-i686.src.tar.gz.sig'
+==> Updating [libre-testing]...
+ -> foo-1.2.3-4-i686.pkg.tar.zst (i686)
diff --git a/test/fixtures/lib-notifications/librerelease-debug-pkg.log b/test/fixtures/lib-notifications/librerelease-debug-pkg.log
new file mode 100644
index 0000000..ac90d2f
--- /dev/null
+++ b/test/fixtures/lib-notifications/librerelease-debug-pkg.log
@@ -0,0 +1,3 @@
+==> Updating [libre]...
+ -> foo-1.2.3-4-i686.pkg.tar.zst (i686)
+ -> foo-debug-1.2.3-4-i686.pkg.tar.zst (i686)
diff --git a/test/fixtures/lib-notifications/librerelease-multipkg-any.log b/test/fixtures/lib-notifications/librerelease-multipkg-any.log
new file mode 100644
index 0000000..4ccf129
--- /dev/null
+++ b/test/fixtures/lib-notifications/librerelease-multipkg-any.log
@@ -0,0 +1,10 @@
+==> Updating [libre]...
+ -> gitget-20240221.1-3-any.pkg.tar.zst (x86_64)
+ -> librelib-20240221.1-3-any.pkg.tar.zst (x86_64)
+ -> libretools-20240221.1-3-any.pkg.tar.zst (x86_64)
+ -> gitget-20240221.1-3-any.pkg.tar.zst (i686)
+ -> librelib-20240221.1-3-any.pkg.tar.zst (i686)
+ -> libretools-20240221.1-3-any.pkg.tar.zst (i686)
+ -> gitget-20240221.1-3-any.pkg.tar.zst (armv7h)
+ -> librelib-20240221.1-3-any.pkg.tar.zst (armv7h)
+ -> libretools-20240221.1-3-any.pkg.tar.zst (armv7h)
diff --git a/test/fixtures/lib-notifications/librerelease-multipkg-multirepo-any.log b/test/fixtures/lib-notifications/librerelease-multipkg-multirepo-any.log
new file mode 100644
index 0000000..35a76ad
--- /dev/null
+++ b/test/fixtures/lib-notifications/librerelease-multipkg-multirepo-any.log
@@ -0,0 +1,11 @@
+==> Updating [libre-testing]...
+ -> gitget-20240221.1-3-any.pkg.tar.zst (x86_64)
+ -> librelib-20240221.1-3-any.pkg.tar.zst (x86_64)
+ -> libretools-20240221.1-3-any.pkg.tar.zst (x86_64)
+ -> gitget-20240221.1-3-any.pkg.tar.zst (i686)
+ -> librelib-20240221.1-3-any.pkg.tar.zst (i686)
+ -> libretools-20240221.1-3-any.pkg.tar.zst (i686)
+==> Updating [libre]...
+ -> gitget-20240221.1-3-any.pkg.tar.zst (armv7h)
+ -> librelib-20240221.1-3-any.pkg.tar.zst (armv7h)
+ -> libretools-20240221.1-3-any.pkg.tar.zst (armv7h)
diff --git a/test/fixtures/lib-notifications/librerelease-multipkg-multirepo-multiarch.log b/test/fixtures/lib-notifications/librerelease-multipkg-multirepo-multiarch.log
new file mode 100644
index 0000000..7dade39
--- /dev/null
+++ b/test/fixtures/lib-notifications/librerelease-multipkg-multirepo-multiarch.log
@@ -0,0 +1,4 @@
+==> Updating [libre-testing]...
+ -> foo-1.2.3-4-x86_64.pkg.tar.zst (x86_64)
+==> Updating [libre]...
+ -> bar-1.2.3-4-i686.pkg.tar.zst (i686)
diff --git a/test/fixtures/lib-notifications/librerelease-multirepo-multiarch.log b/test/fixtures/lib-notifications/librerelease-multirepo-multiarch.log
new file mode 100644
index 0000000..17810e4
--- /dev/null
+++ b/test/fixtures/lib-notifications/librerelease-multirepo-multiarch.log
@@ -0,0 +1,4 @@
+==> Updating [libre-testing]...
+ -> foo-1.2.3-4-x86_64.pkg.tar.zst (x86_64)
+==> Updating [libre]...
+ -> foo-1.2.3-4-i686.pkg.tar.zst (i686)
diff --git a/test/fixtures/librefetch/PKGBUILD-bz2 b/test/fixtures/librefetch/PKGBUILD-bz2
new file mode 100644
index 0000000..0d688b8
--- /dev/null
+++ b/test/fixtures/librefetch/PKGBUILD-bz2
@@ -0,0 +1,19 @@
+pkgname=testpkg-bz2
+pkgver=1.0
+pkgrel=1
+pkgdesc=foo
+arch=(any)
+source=("libre://$pkgname-$pkgver.tar.bz2"{,.sig})
+backup=(etc/testpkg.conf)
+
+mksource() {
+ mkdir "$srcdir/bar"
+ local file
+ for file in '~foo' '~a' a A; do
+ touch "$srcdir/bar/$file"
+ done
+}
+
+package() {
+ :;
+}
diff --git a/test/fixtures/librefetch/PKGBUILD-mksource b/test/fixtures/librefetch/PKGBUILD-mksource
index 74489de..67f6bc3 100644
--- a/test/fixtures/librefetch/PKGBUILD-mksource
+++ b/test/fixtures/librefetch/PKGBUILD-mksource
@@ -5,6 +5,7 @@ pkgdesc=foo
arch=(any)
source=("libre://$pkgname-$pkgver.tar.gz"{,.sig})
backup=(etc/testpkg.conf)
+install=testpkg.install
mksource() {
mkdir "$srcdir/bar"
diff --git a/test/fixtures/librefetch/PKGBUILD-split b/test/fixtures/librefetch/PKGBUILD-split
new file mode 100644
index 0000000..a979f08
--- /dev/null
+++ b/test/fixtures/librefetch/PKGBUILD-split
@@ -0,0 +1,24 @@
+pkgbase=testpkg-split
+pkgname=(testpkg-split testpkg-split-secondary)
+pkgver=1.0
+pkgrel=1
+pkgdesc=foo
+arch=(any)
+source=("libre://$pkgname-$pkgver.tar.gz"{,.sig})
+backup=(etc/testpkg.conf)
+
+mksource() {
+ mkdir "$srcdir/bar"
+ local file
+ for file in '~foo' '~a' a A; do
+ touch "$srcdir/bar/$file"
+ done
+}
+
+package_testpkg-split() {
+ :;
+}
+
+package_testpkg-split-secondary() {
+ :;
+}
diff --git a/test/fixtures/librefetch/testpkg.install b/test/fixtures/librefetch/testpkg.install
new file mode 100644
index 0000000..8ff0e47
--- /dev/null
+++ b/test/fixtures/librefetch/testpkg.install
@@ -0,0 +1,5 @@
+#!/hint/bash
+
+post_instal() {
+ true
+}
diff --git a/test/fixtures/libremakepkg/PKGBUILD-rwstartdir b/test/fixtures/libremakepkg/PKGBUILD-rwstartdir
new file mode 100644
index 0000000..feadfa0
--- /dev/null
+++ b/test/fixtures/libremakepkg/PKGBUILD-rwstartdir
@@ -0,0 +1,15 @@
+pkgname='libretools-rwstartdir'
+pkgver=1.0
+license=('GPL')
+url='https://parabola.nu'
+
+pkgrel=1
+arch=(any)
+
+build() {
+ echo foo >"$startdir/file"
+}
+
+package() {
+ install -Dm644 "$startdir/file" "$pkgdir/etc/file"
+}
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree
index 3a7afa4..3a7afa4 100644
--- a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree-replacement b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree-replacement
index 7855bdc..7855bdc 100644
--- a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree-replacement
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-nonfree-replacement
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-repackaged b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-repackaged
new file mode 100644
index 0000000..2d98f1e
--- /dev/null
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.dep-repackaged
@@ -0,0 +1,18 @@
+pkgname=wmii
+pkgver=3.9.2
+pkgrel=3
+pkgdesc="A small, dynamic window manager for X11"
+arch=('i686' 'x86_64')
+license=('MIT')
+url="http://wmii.suckless.org/"
+depends=('rubygemsx') # random package that is repackaged with the same name
+source=()
+md5sums=()
+
+build() {
+ :
+}
+
+package() {
+ :
+}
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nogpl b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nogpl
new file mode 100644
index 0000000..f351864
--- /dev/null
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nogpl
@@ -0,0 +1,18 @@
+pkgname=wmii
+pkgver=3.9.2
+pkgrel=3
+pkgdesc="A small, dynamic window manager for X11"
+arch=('i686' 'x86_64')
+license=('custom:BSD4')
+url="http://wmii.suckless.org/"
+depends=('libxft' 'libxrandr' 'libxinerama' 'dash')
+source=()
+md5sums=()
+
+build() {
+ :
+}
+
+package() {
+ :
+}
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nonfree b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nonfree
new file mode 100644
index 0000000..0fc3b0b
--- /dev/null
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-nonfree
@@ -0,0 +1,18 @@
+pkgname=wmii
+pkgver=3.9.2
+pkgrel=3
+pkgdesc="A small, dynamic window manager for X11"
+arch=('i686' 'x86_64')
+license=('JSON')
+url="http://wmii.suckless.org/"
+depends=('libxft' 'libxrandr' 'libxinerama' 'dash')
+source=()
+md5sums=()
+
+build() {
+ :
+}
+
+package() {
+ :
+}
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-unknown b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-unknown
new file mode 100644
index 0000000..f4b136b
--- /dev/null
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.lic-unknown
@@ -0,0 +1,18 @@
+pkgname=wmii
+pkgver=3.9.2
+pkgrel=3
+pkgdesc="A small, dynamic window manager for X11"
+arch=('i686' 'x86_64')
+license=('custom:my-very-special-license')
+url="http://wmii.suckless.org/"
+depends=('libxft' 'libxrandr' 'libxinerama' 'dash')
+source=()
+md5sums=()
+
+build() {
+ :
+}
+
+package() {
+ :
+}
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree
new file mode 100644
index 0000000..da3f416
--- /dev/null
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree
@@ -0,0 +1,18 @@
+pkgname=skype
+pkgver=3.9.2
+pkgrel=3
+pkgdesc="A small, dynamic window manager for X11"
+arch=('i686' 'x86_64')
+license=('MIT')
+url="http://wmii.suckless.org/"
+depends=('libxft' 'libxrandr' 'libxinerama' 'dash')
+source=()
+md5sums=()
+
+build() {
+ :
+}
+
+package() {
+ :
+}
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree-replacement b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree-replacement
new file mode 100644
index 0000000..5242121
--- /dev/null
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-nonfree-replacement
@@ -0,0 +1,18 @@
+pkgname=linux
+pkgver=3.9.2
+pkgrel=3
+pkgdesc="A small, dynamic window manager for X11"
+arch=('i686' 'x86_64')
+license=('MIT')
+url="http://wmii.suckless.org/"
+depends=('libxft' 'libxrandr' 'libxinerama' 'dash')
+source=()
+md5sums=()
+
+build() {
+ :
+}
+
+package() {
+ :
+}
diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-repackaged b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-repackaged
new file mode 100644
index 0000000..5a101b3
--- /dev/null
+++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.pkg-repackaged
@@ -0,0 +1,18 @@
+pkgname=rubygemsx
+pkgver=3.9.2
+pkgrel=3
+pkgdesc="A small, dynamic window manager for X11"
+arch=('i686' 'x86_64')
+license=('MIT')
+url="http://wmii.suckless.org/"
+depends=('libxft' 'libxrandr' 'libxinerama' 'dash')
+source=()
+md5sums=()
+
+build() {
+ :
+}
+
+package() {
+ :
+}
diff --git a/test/lib/common.bash b/test/lib/common.bash
index 1a16ae0..db6b33e 100644
--- a/test/lib/common.bash
+++ b/test/lib/common.bash
@@ -1,6 +1,6 @@
#!/hint/bash
-if [[ -z $LIBRETOOLS_LIBDIR || -z $_librelib_conf_sh_sysconfdir || -z $_librelib_conf_sh_pkgconfdir ]]; then
+if [[ -z $LIBRETOOLS_LIBRARY_PATH || -z $_librelib_conf_sh_sysconfdir || -z $_librelib_conf_sh_pkgconfdir ]]; then
libremessages error 'Must be run with ./testenv'
exit 1
fi
@@ -26,10 +26,15 @@ common_setup() {
mkdir -p -- "$GNUPGHOME"
chmod 700 -- "$GNUPGHOME"
gpg --quiet --no-tty --batch --gen-key <<-eot
- Key-Type: default
+ Key-Type: DSA
+ Key-Length: 1024
+ Subkey-Type: ECDSA
+ Subkey-Curve: nistp256
+
Key-Usage: sign
Name-Real: Bob Tester
Name-Email: tester@localhost
+
Expire-Date: 0
%no-protection
%commit
@@ -61,7 +66,7 @@ common_setup() {
common_teardown() {
gpg-connect-agent KILLAGENT /bye || true
if [[ -n ${tmpdir:-} ]]; then
- if [[ -f "$tmpdir/.used-sudo" ]]; then
+ if libremessages in_array 'sudo' "${BATS_TEST_TAGS[@]}"; then
sudo rm -rf -- "$tmpdir"
else
rm -rf -- "$tmpdir"
@@ -95,27 +100,6 @@ teardown() {
# Utility functions for use in test definitions ######################
-require() (
- set +x
- local missing=()
- if libremessages in_array "network" "$@" && ! [[ $NETWORK ]]; then
- missing+=('networking')
- fi
- if libremessages in_array "sudo" "$@" && ! [[ $SUDO ]]; then
- missing+=('sudo')
- fi
- if libremessages in_array "btrfs" "$@" && ! [[ "$(stat -f -c %T "$chrootdir" 2>/dev/null || true)" == 'btrfs' ]]; then
- missing+=('btrfs')
- fi
- if (( ${#missing[@]} )); then
- return 1
- fi
- if libremessages in_array "sudo" "$@"; then
- touch "$tmpdir/.used-sudo"
- fi
- return 0
-)
-
empty() {
diff -u /dev/null "$1"
}
diff --git a/test/testenv b/test/testenv
index 11a46ee..eb34dda 100755
--- a/test/testenv
+++ b/test/testenv
@@ -2,21 +2,6 @@
{
set -e
- # Parse the arguments
- NETWORK=true
- SUDO=true
- while [[ $# -gt 0 ]]; do
- case "$1" in
- --no-network) shift; unset NETWORK;;
- --network) shift; NETWORK=true;;
- --no-sudo) shift; unset SUDO;;
- --sudo) shift; SUDO=true;;
- --) shift; break;;
- *) break;;
- esac
- done
- export NETWORK SUDO
-
if [[ $# == 0 ]]; then
echo 'You need to run testenv with arguments!' >&2
exit 1
@@ -27,7 +12,7 @@
cleanup() {
set +e
# coordinate this with ./lib/common.bash
- if [[ $SUDO ]] && [[ -d "$TMPDIR/chroots" ]]; then
+ if [[ -f "$TMPDIR/.used-sudo" ]] && [[ -d "$TMPDIR/chroots" ]]; then
if [[ "$(stat -f -c %T "$TMPDIR/chroots")" == btrfs ]]; then
sudo find "$TMPDIR/chroots" -depth -inum 256 -exec \
btrfs subvolume delete {} \; &>/dev/null
@@ -54,26 +39,27 @@
# Set up the environment
export PATH="$destdir/usr/bin:$PATH"
- export LIBRETOOLS_LIBDIR="$destdir/usr/lib/libretools"
+ export LIBRETOOLS_LIBRARY_PATH="$destdir/usr/lib/libretools"
export _librelib_conf_sh_sysconfdir="$destdir/etc"
export _librelib_conf_sh_pkgconfdir="$destdir/etc/libretools.d"
sed -i 's,/usr/bin/librefetch,$(which librefetch),' \
"${_librelib_conf_sh_sysconfdir}/makepkg.d/librefetch.conf"
# Hack to respect our variables in sudo
- install -Dm755 /dev/stdin "$destdir/usr/bin/testsudo" <<-'eot'
+ install -Dm755 /dev/stdin "$destdir/usr/bin/testsudo" <<-eot
#!/bin/bash
+ touch ${TMPDIR@Q}/.used-sudo
vars=(
TMPDIR
GNUPGHOME XDG_CACHE_HOME XDG_CONFIG_HOME
- PATH LIBRETOOLS_LIBDIR _librelib_conf_sh_sysconfdir _librelib_conf_sh_pkgconfdir
+ PATH LIBRETOOLS_LIBRARY_PATH _librelib_conf_sh_sysconfdir _librelib_conf_sh_pkgconfdir
GPGKEY
)
env=()
- for var in "${vars[@]}"; do
- env+=("$var=${!var}")
+ for var in "\${vars[@]}"; do
+ env+=("\$var=\${!var}")
done
- sudo "${env[@]}" "$@"
+ sudo "\${env[@]}" "\$@"
eot
# Hack to work around GnuPG being stupid with locating gpg-agent's socket
install -Dm755 /dev/stdin "$destdir/usr/bin/gpg" <<-'eot'
@@ -98,7 +84,7 @@
vars=(
TMPDIR
_HOME GNUPGHOME XDG_CACHE_HOME XDG_CONFIG_HOME
- _PATH LIBRETOOLS_LIBDIR _librelib_conf_sh_sysconfdir _librelib_conf_sh_pkgconfdir
+ _PATH LIBRETOOLS_LIBRARY_PATH _librelib_conf_sh_sysconfdir _librelib_conf_sh_pkgconfdir
GPGKEY
)
export _HOME="$HOME"