summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/chroot-tools/chcleanup9
-rwxr-xr-xsrc/chroot-tools/librechroot2
-rwxr-xr-xsrc/fullpkg/fullpkg2
-rw-r--r--src/librefetch/librefetch.8.ronn59
4 files changed, 35 insertions, 37 deletions
diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup
index a72f951..bfb65ce 100755
--- a/src/chroot-tools/chcleanup
+++ b/src/chroot-tools/chcleanup
@@ -50,11 +50,6 @@ msg2() {
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
-warning() {
- local mesg="$(_ "$1")"; shift
- printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
error() {
local mesg="$(_ "$1")"; shift
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
@@ -83,8 +78,8 @@ msg "Cleaning chroot..."
cp /repo/repo.db /var/lib/pacman/sync/repo.db
# Setup the temporary directory
-TEMPDIR="$(mktemp --tmpdir -d $(basename $0).XXXXX)"
-trap "rm -rf '$TEMPDIR'" EXIT
+TEMPDIR="$(mktemp --tmpdir -d ${0##*/}.XXXXXXXXXX)"
+trap "rm -rf -- $(printf '%q' "$TEMPDIR")" EXIT
cp -a /var/lib/pacman/sync "${TEMPDIR}/"
pkglist="${TEMPDIR}"/pkglist.txt
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 9e74a62..4edcb2f 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -373,7 +373,7 @@ main() {
arch-nspawn "$copydir" bash -c 'pacman -Syu --noconfirm'
;;
clean-pkgs)
- trap "rm -f '$copydir'/bin/chcleanup '$copydir'/chrootexec" EXIT
+ trap "rm -f -- $(printf '%q ' "$copydir"/{bin/chcleanup,chrootexec})" EXIT
install -m755 "$(librelib chroot/chcleanup)" "$copydir/bin/chcleanup"
printf '%s\n' \
'#!/bin/bash' \
diff --git a/src/fullpkg/fullpkg b/src/fullpkg/fullpkg
index 8e87e46..e053c6e 100755
--- a/src/fullpkg/fullpkg
+++ b/src/fullpkg/fullpkg
@@ -20,6 +20,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+. libremessages
+
usage() {
print "Usage: %s [OPTIONS] [BUILD_DIR]" "${0##*/}"
print "A (libre)makepkg wrapper that will also build dependencies"
diff --git a/src/librefetch/librefetch.8.ronn b/src/librefetch/librefetch.8.ronn
index bb2e561..6ee3ce8 100644
--- a/src/librefetch/librefetch.8.ronn
+++ b/src/librefetch/librefetch.8.ronn
@@ -11,7 +11,7 @@ librefetch(8) -- downloads or creates a liberated source tarball
`librefetch` is a program to streamline creation of custom source
tarballs for `PKGBUILD(5)` files.
-If a URL mentioned in the `source` array in a `PKGUILD` is in a
+If a URL mentioned in the <source> array in a `PKGUILD` is in a
location that Parabola uploads "custom" source tarballs to (or
configured locations), and no file is at that URL, librefetch will
automatically create it for you.
@@ -59,16 +59,16 @@ the modified copy of makepkg created during `create` mode.
## DOWNLOAD MODE
If <SOURCE-URL> begins with the string `libre://`, it is replaced with
-the first value in `MIRRORS`, as configured in `librefetch.conf(5)`;
+the first value in <MIRRORS>, as configured in `librefetch.conf(5)`;
this is for compatability with PKGBUILDs that used a previous version
of librefetch.
-It uses `DOWNLOADER`, as configured in `librefetch.conf` to attempt to
+It uses <DOWNLOADER>, as configured in `librefetch.conf` to attempt to
download the source tarball from that URL. If that fails, and
following conditions are met, it proceeds to `create` mode:
* The `-D` flag has not been specified to inhibit `create` mode.
- * The `<source-url>` begins with one of the values in `MIRRORS`.
+ * The <SOURCE-URL> begins with one of the values in <MIRRORS>.
The latter requirement allows librefetch to be used as a generic
HTTP(S) download agent, that can automatically create files from
@@ -77,13 +77,13 @@ whitelisted locations.
## CREATE MODE
The principle of `create` mode is that a special `PKGBUILD(5)`, called
-a `SRCBUILD(5)`, installs source files to `$pkgdir`, and the resulting
-"package" is then used as a source tarball. The `SRCBUILD` exists in
-the same directory as the `PKGBUILD`. It can be created manually, or
-generated on-the-fly from the `PKGBUILD`. Extra steps are taken to
-ensure that as long as the same directory contents go in, an identical
-tarball will come out--the checksum of the file should not change
-based on when it is built or who builds it.
+`SRCBUILD(5)`, that installs source files to <$pkgdir>, and the
+resulting "package" is then used as a source tarball. The `SRCBUILD`
+exists in the same directory as the `PKGBUILD`. It can be created
+manually, or generated on-the-fly from the `PKGBUILD`. Extra steps
+are taken to ensure that as long as the same directory contents go in,
+an identical tarball will come out--the checksum of the file should
+not change based on when it is built or who builds it.
The `SRCBUILD` is either created, or sanitized if it already exists,
then fed to a modified version of `makepkg(8)`.
@@ -105,14 +105,14 @@ file can be printed instead of executed with `srcbuild` mode.
### PRE-EXISTING SRCBUILD
The use of `SRCBUILD` files pre-dates `librefetch`. By convention,
-they set `PKGDEST` and `PKGEXT` in `package()` in order to modify the
+they set <PKGDEST> and <PKGEXT> in `package()` in order to modify the
behavior of `makepkg`. Because a modified version of `makepkg` is
used, this interferes with the correct behavior. To compensate for
this, lines containing "`PKGDEST=`" or "`PKGEXT=`" are deleted from
the `SRCBUILD`.
The general idea is that `build()` makes any modifications to the
-source, then `package()` copies it from `$srcdir` to `$pkgdir`.
+source, then `package()` copies it from <$srcdir> to <$pkgdir>.
### SRCBUILD FROM PKGBUILD
@@ -138,31 +138,32 @@ Following is a table of the translations.
makedepends = mkdepends
Functions
prepare() { :; }
- build() { mksource; }
- check() { :; }
+ build() { mksource; }
+ check() { :; }
package() { cp -a "$srcdir"/*/ "$pkgdir/"; }
The `mksource()` function does not need to be defined. If it isn't
defined, then no transformations will be made to the source between it
-being extracted to `$srcdir` and copied to `$pkgdir`.
+being extracted to <$srcdir> and copied to <$pkgdir>.
In summary:
- * Set `mksource=()` and `mkmd5sums=(`) to act as `source=(`) and
- `md5sums=()`
+ * Set <mksource=()> and <mkmd5sums=()> to act as <source=()> and
+ <md5sums=()>, respectively.
* Declare a `mksource()` function to make modifications to the
source, if nescessary.
Other changes:
- * `pkgname` is set to `pkgbase`, or the first element of the
- `pkgname` array.
- * `options=()` is set have `makepkg` avoid making changes to
- `$pkgdir`. The exact change is:
+ * <pkgname> is set to <pkgbase>, or the first element of the
+ <pkgname> array (the effect is that split packaging is turnes
+ off).
+ * <options=()> is set have `makepkg` avoid making changes to
+ <$pkgdir>. The exact change is:
options=(!strip docs libtool staticlibs emptydirs !zipman purge !upx)
- * `PURGE_TARGETS=()` has vcs directories added to it:
+ * <PURGE_TARGETS=()> has vcs directories added to it:
PURGE_TARGETS=(.bzr/ .cvs/ .git/ .hg/ .svn/ .makepkg/)
@@ -170,21 +171,21 @@ 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[@]}`)
+ * Allow us to manipulate the output file (<$pkg_file>)
+ * Do not include metadata in the output file (<${comp_files[@]}>)
* 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.
- * `PURGE_TARGETS` interprets an item as a directory if it ends with a
+ * <PURGE_TARGETS> interprets an item as a directory if it ends with a
slash ("/").
- * Timestamps in `$pkgdir` are reset to "1990-01-01 0:0:0 +0", so that
+ * Timestamps in <$pkgdir> are reset to "1990-01-01 0:0:0 +0", so that
the resulting tarball will be the same, regardless of when it was
created.
* Sort the files included in the tarball; normally the order of files
in a tarball is essentially random (even if it tends to be the same
when re-created on the same machine).
- * append `-libre` to `$srcdir`
- * append `-libre` to `$pkgbasedir` (which becomes `$pkgdir`)
+ * append `-libre` to <$srcdir>
+ * append `-libre` to <$pkgbasedir> (which becomes <$pkgdir>)
* Don't check if the package has already been built.
For debugging purposes, this modified makepkg can be printed instead