From f5663f08d44091ca16c7f53c492c2594202ba7e5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Jan 2014 16:52:57 -0500 Subject: update to the new devtools --- src/chroot-tools/makechrootpkg.sh.patch | 95 ++++++++++++++++----------------- 1 file changed, 45 insertions(+), 50 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index 4dd1146..672da83 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,5 +1,5 @@ ---- makechrootpkg.sh.in 2013-10-26 14:53:57.000000000 -0400 -+++ makechrootpkg.sh.ugly 2013-11-16 15:14:04.000000000 -0500 +--- makechrootpkg.sh.in 2014-01-05 00:02:08.650446097 -0500 ++++ makechrootpkg.sh.ugly 2014-01-05 00:20:01.914448010 -0500 @@ -12,6 +12,7 @@ shopt -s nullglob @@ -38,9 +38,9 @@ if [[ ${copy:0:1} = / ]]; then copydir=$copy else -@@ -110,30 +110,47 @@ - repack=true - fi +@@ -115,30 +115,48 @@ + esac + done -if [[ -n $SUDO_USER ]]; then +if [[ -n ${SUDO_USER:-} ]]; then @@ -54,8 +54,9 @@ +# Usage: load_vars $makepkg_conf +# Globals: +# - SRCDEST -+# - LOGDEST ++# - SRCPKGDEST +# - PKGDEST ++# - LOGDEST +# - MAKEFLAGS +# - PACKAGER load_vars() { @@ -63,7 +64,7 @@ [[ -f $makepkg_conf ]] || return 1 - for var in {SRC,PKG,LOG}DEST MAKEFLAGS PACKAGER; do + for var in {SRC,SRCPKG,PKG,LOG}DEST MAKEFLAGS PACKAGER; do - [[ -z ${!var} ]] && eval $(grep "^${var}=" "$makepkg_conf") + [[ -z ${!var:-} ]] && eval $(grep "^${var}=" "$makepkg_conf") done @@ -92,7 +93,7 @@ # Get a read lock on the root chroot to make # sure we don't clone a half-updated chroot slock 8 "$chrootdir/root.lock" "Locking clean chroot" -@@ -154,11 +171,16 @@ +@@ -159,11 +177,16 @@ # Drop the read lock again lock_close 8 @@ -112,7 +113,7 @@ if [[ "$chroottype" == btrfs ]]; then btrfs subvolume delete "$copydir" >/dev/null || die "Unable to delete subvolume %s" "$copydir" -@@ -173,9 +195,14 @@ +@@ -178,9 +201,14 @@ stat_done } @@ -127,7 +128,7 @@ for install_pkg in "${install_pkgs[@]}"; do pkgname="${install_pkg##*/}" cp "$install_pkg" "$copydir/$pkgname" -@@ -188,11 +215,19 @@ +@@ -193,11 +221,19 @@ rm "$copydir/$pkgname" done @@ -149,9 +150,9 @@ $repack || rm -rf "$copydir/build" mkdir -p "$copydir/build" -@@ -226,12 +261,12 @@ +@@ -236,12 +272,12 @@ - chown -R nobody "$copydir"/{build,pkgdest,logdest,srcdest,startdir} + chown -R nobody "$copydir"/{build,pkgdest,srcpkgdest,logdest,srcdest,startdir} - if [[ -n $MAKEFLAGS ]]; then + if [[ -n ${MAKEFLAGS:-} ]]; then @@ -164,7 +165,7 @@ sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf" echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf" fi -@@ -244,20 +279,38 @@ +@@ -254,20 +290,38 @@ chmod 440 "$copydir/etc/sudoers.d/nobody-pacman" fi @@ -179,11 +180,10 @@ + # This is a little gross, but this way the script is recreated every time in the # working copy -- printf $'#!/bin/bash\n%s\n_chrootbuild %q "$@"' "$(declare -f _chrootbuild)" \ -+ printf '#!/bin/bash\n%s\n_chrootprepare "$@"' "$(declare -f _chrootprepare)" \ ++ printf $'#!/bin/bash\n%s\n_chrootprepare "$@"' "$(declare -f _chrootprepare)" \ + > "$copydir/chrootprepare" + chmod +x "$copydir/chrootprepare" -+ printf '#!/bin/bash\n%s\n_chrootbuild %q "$@"' "$(declare -f _chrootbuild)" \ + printf $'#!/bin/bash\n%s\n_chrootbuild %q "$@"' "$(declare -f _chrootbuild)" \ "$run_namcap" >"$copydir/chrootbuild" chmod +x "$copydir/chrootbuild" } @@ -206,7 +206,7 @@ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o else ( export SRCDEST BUILDDIR="$builddir" -@@ -267,20 +320,15 @@ +@@ -277,20 +331,18 @@ (( $? != 0 )) && die "Could not download sources." # Clean up garbage from verifysource @@ -221,28 +221,19 @@ - local run_namcap="$1"; shift - local makepkg_args=("$@") - -- . /etc/profile -- export HOME=/build -- shopt -s nullglob + . /etc/profile + export HOME=/build + shopt -s nullglob # XXX: Workaround makepkg disliking read-only dirs + rm -rf -- /srcdest/* /startdir/* ln -sft /srcdest /srcdest_host/* ln -sft /startdir /startdir_host/* -@@ -295,15 +343,27 @@ - done - done - -- cd /startdir -- - # XXX: Keep PKGBUILD writable for pkgver() -- rm PKGBUILD* -- cp /startdir_host/PKGBUILD* . -- chown nobody PKGBUILD* -+ rm /startdir/PKGBUILD* -+ cp /startdir_host/PKGBUILD* /startdir -+ chown nobody /startdir/PKGBUILD* +@@ -313,9 +365,23 @@ + rm PKGBUILD* + cp /startdir_host/PKGBUILD* . + chown nobody PKGBUILD* +} + +_chrootbuild() { @@ -263,7 +254,7 @@ echo "Can't write to PKGBUILD!" exit 1 fi -@@ -321,12 +381,24 @@ +@@ -333,12 +399,24 @@ exit 0 } @@ -286,9 +277,9 @@ + local l for l in "$copydir"/logdest/*; do + [[ $l == */logpipe.* ]] && continue chown "$src_owner" "$l" - mv "$l" "$LOGDEST" -@@ -334,6 +406,10 @@ +@@ -352,6 +430,10 @@ } # }}} @@ -299,25 +290,23 @@ umask 0022 load_vars /etc/makepkg.conf -@@ -344,17 +420,25 @@ - [[ -d $SRCDEST ]] || SRCDEST=$PWD - [[ -d $LOGDEST ]] || LOGDEST=$PWD +@@ -363,30 +445,45 @@ + [[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD + [[ -d $LOGDEST ]] || LOGDEST=$PWD -create_chroot +# Lock the chroot we want to use. We'll keep this lock until we exit. +lock 9 "$copydir.lock" "Locking chroot copy [%s]" "$copy" - --$update_first && arch-nspawn "$copydir" \ -- "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ -- pacman -Syu --noconfirm ++ +if [[ ! -d $copydir ]] || $clean_first; then + sync_chroot "$chrootdir" "$copy" +fi --[[ -n ${install_pkgs[*]} ]] && install_packages -+$update_first && arch-nspawn "$copydir" pacman -Syu --noconfirm + $update_first && arch-nspawn "$copydir" \ + "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ + pacman -Syu --noconfirm --prepare_chroot +-[[ -n ${install_pkgs[*]} ]] && install_packages +if [[ -n ${install_pkgs[*]:-} ]]; then + install_packages "$copydir" "${install_pkgs[@]}" + ret=$? @@ -325,15 +314,21 @@ + [[ -f PKGBUILD ]] || exit $ret +fi --download_sources +-prepare_chroot +prepare_chroot "$copydir" "$USER_HOME" "$repack" -+ + +-download_sources +download_sources "$copydir" "$src_owner" if arch-nspawn "$copydir" \ --bind-ro="$PWD:/startdir_host" \ -@@ -362,12 +446,12 @@ + --bind-ro="$SRCDEST:/srcdest_host" \ "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ ++ /chrootprepare && ++ arch-nspawn "$copydir" \ ++ --bind-ro="$PWD:/startdir_host" \ ++ --bind-ro="$SRCDEST:/srcdest_host" \ ++ "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ /chrootbuild "${makepkg_args[@]}" then - move_products @@ -347,7 +342,7 @@ if (( ret != 0 )); then if $temp_chroot; then -@@ -378,3 +462,4 @@ +@@ -397,3 +494,4 @@ else true fi -- cgit v1.2.3-54-g00ecf From 257a3fbfc839be9d056b38b6a1110a1550253d79 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Jan 2014 18:53:16 -0500 Subject: chroot-tools: make patch not reject new bugfix in devtools-par --- src/chroot-tools/makechrootpkg.sh.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index 672da83..d6c96f9 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,5 +1,5 @@ ---- makechrootpkg.sh.in 2014-01-05 00:02:08.650446097 -0500 -+++ makechrootpkg.sh.ugly 2014-01-05 00:20:01.914448010 -0500 +--- makechrootpkg.sh.in 2014-01-05 18:51:41.463720929 -0500 ++++ makechrootpkg.sh.ugly 2014-01-05 18:52:41.624501065 -0500 @@ -12,6 +12,7 @@ shopt -s nullglob @@ -110,7 +110,7 @@ + local chroottype=$(stat -f -c %T "$copydir") + + stat_busy "Removing chroot copy [%s]" "$copy" - if [[ "$chroottype" == btrfs ]]; then + if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then btrfs subvolume delete "$copydir" >/dev/null || die "Unable to delete subvolume %s" "$copydir" @@ -178,9 +201,14 @@ -- cgit v1.2.3-54-g00ecf From f9da2708dc3611473f2ffd17b525dc282726b75a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 18 Jan 2014 12:46:26 -0500 Subject: I went comma-happy when writing librechroot:usage() --- src/chroot-tools/librechroot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 5e16587..1c8ec4c 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -96,9 +96,9 @@ usage() { printf ' rootdir : %s\n' "${rootdir:-$(_ 'ERROR')}" printf ' copydir : %s\n' "${copydir:-$(_ 'ERROR')}" echo - prose 'If the chroot, or copy does not exist, it will be created + prose '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. + group "base-devel" and any packages named in $CHROOTEXTRAPKG. Unless the `-C` or `-M` flags are used, the configuration files that this program installs are the stock versions supplied in the packages, not the versions from your host system. Other tools -- cgit v1.2.3-54-g00ecf From 27274846fa112b3309a5cebe6afa2753d641a992 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 18 Jan 2014 12:47:18 -0500 Subject: librechroot: fix comment --- src/chroot-tools/librechroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 1c8ec4c..64c3a46 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -151,7 +151,7 @@ readonly commands=( run enter clean-repo help ) -# set $rootdir and $copydir; blank them on error +# Print code to set $rootdir and $copydir; blank them on error calculate_directories() { # Don't assume that CHROOTDIR or CHROOT are set, # but assume that COPY is set. -- cgit v1.2.3-54-g00ecf From 0fd1e7b1333b8793c1cc448c2a00cb085544cc8c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 18 Jan 2014 20:30:08 -0500 Subject: libremakepkg: support -r and -w flags, same as librechroot Feature request: https://labs.parabola.nu/issues/458 --- src/chroot-tools/libremakepkg | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index fc6418c..dbeeb81 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -148,8 +148,12 @@ usage() { the documentation there.' echo print 'Options:' + print ' %s options:' librechroot flag "-n <$(_ CHROOT)>" 'Name of the chroot to use' flag "-l <$(_ COPY)>" 'Name of, or absolute path to, the chroot copy to use' + flag "-w <$(_ 'PATH[:PATH]')>" 'Bind mount a file or directory, read/write' + flag "-r <$(_ 'PATH[:PATH]')>" 'Bind mount a file or directory, read-only' + print ' %s options:' libremakepkg flag '-N' "Don't disable networking during build() and package(). PLEASE don't use this unless you have a special reason, its use is a violation @@ -173,10 +177,14 @@ main() { local chroot='' # Parse command line options ########################################### - while getopts 'n:l:NRh' flag ; do + while getopts 'n:l:wrNRh' flag ; do case "${flag}" in - n) if $INCHROOT; then err_chflag "$flag"; else chroot=$OPTARG; fi;; - l) if $INCHROOT; then err_chflag "$flag"; else copy=$OPTARG; fi;; + n) if $INCHROOT; then err_chflag "$flag"; else + chroot=$OPTARG; fi;; + l) if $INCHROOT; then err_chflag "$flag"; else + copy=$OPTARG; fi;; + w|r) if $INCHROOT; then err_chflag "$flag"; else + librechroot_flags+=(-$flag "$OPTARG"); fi;; N) NONET=false;; R) repack=true; makepkg_args+=(-R);; h) usage; return 0;; @@ -226,7 +234,7 @@ main() { MAKEFLAGS="$(get_var makepkg MAKEFLAGS '')" PACKAGER="$(get_var makepkg PACKAGER '')" - librechroot_flags=( + librechroot_flags+=( -r "$PWD:/startdir_host" -r "$SRCDEST:/srcdest_host" -n "$CHROOT" -- cgit v1.2.3-54-g00ecf From 83a55baf27a6e6f3fa3e6772a6f1b63f4c5138d7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jan 2014 10:00:18 -0500 Subject: libremakepkg: actually support SRCPKGDEST, document LOGDEST support --- src/chroot-tools/libremakepkg | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index dbeeb81..dcc495c 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -33,7 +33,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 -# {SRC,LOG,PKG}DEST set at runtime by makepkg.conf +# {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 librechroot_flags=() @@ -132,7 +132,7 @@ usage() { prose 'If run from outside of a chroot, command will make the following configuration changes in the chroot:' bullet 'whatever changes `librechroot` makes.' - bullet 'set `PKGDEST` and `SRCDEST` in `/etc/makepkg.conf`' + bullet 'set `{PKG,SRC,SRCPKG,LOG}DEST` in `/etc/makepkg.conf`' bullet 'set `PACKAGER` in `/etc/makepkg.conf` to reflect the value outside of the chroot.' bullet '(maybe) delete `/build/.makepkg.conf`' @@ -227,10 +227,11 @@ main() { # Load makepkg configuration ########################################### # Note that all of these are globals - SRCDEST="$(get_var makepkg SRCDEST "$PWD")" PKGDEST="$(get_var makepkg PKGDEST "$PWD")" + SRCDEST="$(get_var makepkg SRCDEST "$PWD")" + SRCPKGDEST="$(get_var makepkg SRCPKGDEST "$PWD")" LOGDEST="$(get_var makepkg LOGDEST "$PWD")" - mkdir -p "$SRCDEST" "$PKGDEST" "$LOGDEST" + mkdir -p -- "$PKGDEST" "$SRCDEST" "$SRCPKGDEST" "$LOGDEST" MAKEFLAGS="$(get_var makepkg MAKEFLAGS '')" PACKAGER="$(get_var makepkg PACKAGER '')" -- cgit v1.2.3-54-g00ecf From 897a0084bdd96b06198e699f9851ce0b89de409d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jan 2014 10:45:19 -0500 Subject: libremakepkg: fix getopts string (I'm a dummy) --- src/chroot-tools/libremakepkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index dcc495c..f2dc537 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -177,7 +177,7 @@ main() { local chroot='' # Parse command line options ########################################### - while getopts 'n:l:wrNRh' flag ; do + while getopts 'n:l:w:r:NRh' flag ; do case "${flag}" in n) if $INCHROOT; then err_chflag "$flag"; else chroot=$OPTARG; fi;; -- cgit v1.2.3-54-g00ecf From 0315f5fce3353ffb86009578f58e21583a37a826 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jan 2014 10:58:42 -0500 Subject: distcc-tool: get rid of string interpolation in usage() --- src/chroot-tools/distcc-tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index 7633029..7524e15 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -50,7 +50,7 @@ print() { } usage() { - print "Usage: $0 COMMAND [COMMAND-ARGS]" + print "Usage: %s COMMAND [COMMAND-ARGS]" "$0" print "Tool for using distcc within a networkless chroot" echo print "Commands:" -- cgit v1.2.3-54-g00ecf From ec4ae3a3f632979f446366067ba5a9738644bdc0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jan 2014 11:00:09 -0500 Subject: distcc-tool: Fix quoting when embeddint a value in a string --- src/chroot-tools/distcc-tool | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index 7524e15..5d21a0a 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -32,6 +32,8 @@ if ! type gettext &>/dev/null; then gettext() { echo "$@"; } fi +q0="$(printf '%q' "$0")" # quoted $0 + panic() { echo "$(gettext 'panic: malformed call to internal function')" >&2 exit 1 @@ -50,7 +52,7 @@ print() { } usage() { - print "Usage: %s COMMAND [COMMAND-ARGS]" "$0" + print "Usage: %s COMMAND [COMMAND-ARGS]" "$q0" print "Tool for using distcc within a networkless chroot" echo print "Commands:" @@ -135,7 +137,7 @@ parse_DISTCC_HOSTS() { ;; # ZEROCONF +zeroconf) - error "%s does not support the +zeroconf option" "$0" + error "%s does not support the +zeroconf option" "$q0" exit 1 ;; # TCP_HOST or OLDSTYLE_TCP_HOST @@ -159,7 +161,7 @@ parse_DISTCC_HOSTS() { # set up port forwaring if $forward_ports; then - socat TCP-LISTEN:${newport},fork SYSTEM:"$0 client $HOSTID ${PORT:-3632}" & + socat TCP-LISTEN:${newport},fork SYSTEM:"$q0 client $HOSTID ${PORT:-3632}" & pids+=($!) fi @@ -222,8 +224,8 @@ odaemon() { local chrootpath=$1 umask 111 - socat UNIX-LISTEN:"$chrootpath/socket",fork SYSTEM:"$0 server" & - trap "kill -- $!; rm -f '$chrootpath/socket'" EXIT + socat UNIX-LISTEN:"$chrootpath/socket",fork SYSTEM:"$q0 server" & + trap "kill -- $!; rm -f -- $(printf '%q' "$chrootpath/socket")" EXIT wait } -- cgit v1.2.3-54-g00ecf From 25f149bfbf340c63bdae2a3156214be67814ec7a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jan 2014 14:53:29 -0500 Subject: distcc-tool: fix a typo in a comment --- src/chroot-tools/distcc-tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index 5d21a0a..29f0128 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -127,7 +127,7 @@ parse_DISTCC_HOSTS() { *@*) # SSH_HOST doesn't allow custom port numbers, and even if it # did, ssh would complain about MITM. Instead, we'll count on - # ssh ProxyCommand being configured to used `client`. + # ssh ProxyCommand being configured to use `client`. newhosts+=("$HOSTSPEC") ;; # GLOBAL_OPTION -- cgit v1.2.3-54-g00ecf From 8692458d65fc9ce559ad7cd254d7ed3b606da76e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jan 2014 14:13:40 -0500 Subject: libremakepkg: (minor) refactor things to places that make a bit more sense --- src/chroot-tools/libremakepkg | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index f2dc537..1db9f08 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -212,6 +212,15 @@ main() { fi unset chroot + # Load makepkg configuration ########################################### + # Note that all of these are globals + PKGDEST="$(get_var makepkg PKGDEST "$PWD")" + SRCDEST="$(get_var makepkg SRCDEST "$PWD")" + SRCPKGDEST="$(get_var makepkg SRCPKGDEST "$PWD")" + LOGDEST="$(get_var makepkg LOGDEST "$PWD")" + MAKEFLAGS="$(get_var makepkg MAKEFLAGS '')" + PACKAGER="$(get_var makepkg PACKAGER '')" + # Quick sanity check ################################################### if (( EUID )); then @@ -225,22 +234,8 @@ main() { exit 1 fi - # Load makepkg configuration ########################################### - # Note that all of these are globals - PKGDEST="$(get_var makepkg PKGDEST "$PWD")" - SRCDEST="$(get_var makepkg SRCDEST "$PWD")" - SRCPKGDEST="$(get_var makepkg SRCPKGDEST "$PWD")" - LOGDEST="$(get_var makepkg LOGDEST "$PWD")" + # Make sure that the various *DEST directories exist mkdir -p -- "$PKGDEST" "$SRCDEST" "$SRCPKGDEST" "$LOGDEST" - MAKEFLAGS="$(get_var makepkg MAKEFLAGS '')" - PACKAGER="$(get_var makepkg PACKAGER '')" - - librechroot_flags+=( - -r "$PWD:/startdir_host" - -r "$SRCDEST:/srcdest_host" - -n "$CHROOT" - -l "$copy" - ) # OK, we are starting now ############################################## @@ -248,6 +243,13 @@ main() { lock 9 "/build/.lock" \ "Waiting for existing lock on build directory to be released" else + librechroot_flags+=( + -r "$PWD:/startdir_host" + -r "$SRCDEST:/srcdest_host" + -n "$CHROOT" + -l "$copy" + ) + # Obtain a lock on the chroot lock 9 "$copydir.lock" \ "Waiting for existing lock on chroot copy to be released: [%s]" "$copy" -- cgit v1.2.3-54-g00ecf From b6e66bce4dadd1a5b9f74a456de3ef5575e648fa Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jan 2014 17:19:04 -0500 Subject: libremakepkg: Check the permissions of the bind-mounted directories --- src/chroot-tools/libremakepkg | 24 ++++++++++++++++++++++++ test/test-common.sh | 1 + 2 files changed, 25 insertions(+) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 1db9f08..96f86ab 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -54,6 +54,21 @@ indent() { "$_indent" ' | ' } +# Usage: _check_perms_dir $directory +# Make sure that $directory is readable and executable (searchable) by 'nobody' +check_directory_permissions() ( + local dir=$1 + # `cd` to the directory, then test `.`; that way if parent + # directories aren't readable, we aren't testing for that. We + # only need the last element in `$dir`. + cd "$dir" + if ! sudo -u nobody test -r . -a -x .; then + error "Directory '%s' must be readable by user 'nobody'" "$dir" + return 1 + fi + return 0 +) + # Usage: exit_copy $copydir $src_owner # End immediately, but copy log files out exit_copy() { @@ -236,6 +251,15 @@ main() { # Make sure that the various *DEST directories exist mkdir -p -- "$PKGDEST" "$SRCDEST" "$SRCPKGDEST" "$LOGDEST" + # Check the permissions for $startdir and $SRCDEST + ( + declare -i ret=0 + check_directory_permissions "$PWD" || ret=1 + if ! [[ "$PWD" -ef "$SRCDEST" ]]; then + check_directory_permissions "$SRCDEST" || ret=1 + fi + exit $ret + ) # OK, we are starting now ############################################## diff --git a/test/test-common.sh b/test/test-common.sh index 46e584d..3df7107 100644 --- a/test/test-common.sh +++ b/test/test-common.sh @@ -11,6 +11,7 @@ _before() { unset PKGEXT SRCEXT unset GPGKEY PACKAGER tmpdir="$(mktemp -d --tmpdir "test-${roundup_desc//\//-}.XXXXXXXXXXXX")" + chmod 755 "$tmpdir" stat=0 } -- cgit v1.2.3-54-g00ecf From b129824bfc9c5c85cadf98dfb724405d63dfc6c3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 20 Jan 2014 00:59:48 -0500 Subject: normalize to use >&2 instead of /dev/stderr --- src/abslibre-tools/librerelease | 4 ++-- src/abslibre-tools/librestage | 4 ++-- src/chroot-tools/librechroot | 14 +++++++------- src/lib/libreblacklist | 2 +- src/lib/librelib | 2 +- src/librefetch/librefetch | 12 ++++++------ 6 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index aca8fef..23a1c2d 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -149,12 +149,12 @@ main() { u) upload_only=true ;; n) dryrun="--dry-run" ;; h) mode=usage ;; - *) usage >/dev/stderr; return 1 ;; + *) usage >&2; return 1 ;; esac done shift $(($OPTIND - 1)) if [[ $# != 0 ]]; then - usage >/dev/stderr + usage >&2 return 1 fi diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 96fee8b..4ea6edc 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -42,12 +42,12 @@ main() { while getopts 'h' arg; do case $arg in h) usage; return 0;; - *) usage >/dev/stderr; return 1;; + *) usage >&2; return 1;; esac done repos=("$@") if [[ ${#repos[@]} -eq 0 ]]; then - usage >>/dev/stderr + usage >&2 return 1; fi diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 64c3a46..0f0ed10 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -223,19 +223,19 @@ main() { C|M) arch_nspawn_flags+=(-$opt "$OPTARG");; w) sysd_nspawn_flags+=("--bind=$OPTARG");; r) sysd_nspawn_flags+=("--bind-ro=$OPTARG");; - *) usage >/dev/stderr; return 1;; + *) usage >&2; return 1;; esac done shift $(($OPTIND - 1)) if [[ $# -lt 1 ]]; then error "Must specify a command" - usage >/dev/stderr + usage >&2 return 1 fi mode=$1 if ! in_array "$mode" "${commands[@]}"; then error "Unrecognized command: %s" "$mode" - usage >/dev/stderr + usage >&2 return 1 fi shift @@ -243,14 +243,14 @@ main() { noop|make|sync|delete|update|enter|clean-pkgs|clean-repo) if [[ $# -gt 0 ]]; then error 'Command `%s` does not take any arguments: %s' "$mode" "$*" - usage >/dev/stderr + usage >&2 return 1 fi :;; install-file) if [[ $# -lt 1 ]]; then error 'Command `%s` requires at least one file' "$mode" - usage >/dev/stderr + usage >&2 return 1 else local missing=() @@ -269,14 +269,14 @@ main() { install-name) if [[ $# -lt 1 ]]; then error 'Command `%s` requires at least one package name' "$mode" - usage >/dev/stderr + usage >&2 return 1 fi :;; run) if [[ $# -lt 1 ]]; then error 'Command `%s` requires at least one argument' "$mode" - usage >/dev/stderr + usage >&2 return 1 fi :;; diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index 267d32d..7858611 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -137,7 +137,7 @@ if [[ "${0##*/}" == libreblacklist ]]; then } if [[ $# -eq 0 ]]; then - usage >/dev/stderr + usage >&2 exit 1 fi _blacklist_cmd=$1 diff --git a/src/lib/librelib b/src/lib/librelib index 3b05e37..c21532b 100755 --- a/src/lib/librelib +++ b/src/lib/librelib @@ -89,7 +89,7 @@ main() { return 0; fi done - _l print '%s: could not find library: %s' "$cmd" "$lib" >> /dev/stderr + _l print '%s: could not find library: %s' "$cmd" "$lib" >&2 return 1 } diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 87a55cd..5556ddd 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -161,7 +161,7 @@ main() { dlcmd="${dlcmd//\%o/$(printf '%q' "$dst")}" dlcmd="${dlcmd//\%u/$(printf '%q' "$src")}" - { eval "$dlcmd"; } >> /dev/stderr && return 0 + { eval "$dlcmd"; } >&2 && return 0 fi # Mode: create ######################################################### @@ -173,7 +173,7 @@ main() { export pkg_file=$dst cd "$BUILDFILEDIR" - "$makepkg" "${makepkg_opts[@]}" -p "$srcbuild" >> /dev/stderr || return $? + "$makepkg" "${makepkg_opts[@]}" -p "$srcbuild" >&2 || return $? fi } @@ -235,15 +235,15 @@ parse_options() { :;; checksums|print) # don't take any extra arguments if [[ ${#extra_opts[@]} != 0 ]]; then - print "%s: found extra non-flag arguments: %s" "$cmd" "${extra_opts[*]}" >> /dev/stderr - usage >> /dev/stderr + print "%s: found extra non-flag arguments: %s" "$cmd" "${extra_opts[*]}" >&2 + usage >&2 return 1 fi ;; *download*|*create*) # take 1 or 2 extra arguments if [[ ${#extra_opts[@]} != 1 ]] && [[ ${#extra_opts[@]} != 2 ]]; then - print "%s: %d non-flag arguments found, expected 1 or 2: %s" "$cmd" ${#extra_opts[@]} >> /dev/stderr - usage >> /dev/stderr + print "%s: %d non-flag arguments found, expected 1 or 2: %s" "$cmd" ${#extra_opts[@]} >&2 + usage >&2 return 1 fi ;; -- cgit v1.2.3-54-g00ecf From ea11eca851e1b54e36d310f4d69e099f169191e8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 00:05:22 -0500 Subject: I forgot to bump the copyright year on all the files I've touched this year --- src/abslibre-tools/librerelease | 2 +- src/abslibre-tools/librestage | 2 +- src/aur | 2 +- src/chroot-tools/distcc-tool | 2 +- src/chroot-tools/librechroot | 2 +- src/chroot-tools/libremakepkg | 2 +- src/fullpkg/fullpkg-find | 2 +- src/lib/conf.sh | 2 +- src/lib/libreblacklist | 2 +- src/lib/librelib | 2 +- src/lib/libremessages | 2 +- src/librefetch/librefetch | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index 23a1c2d..558ec37 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -3,7 +3,7 @@ # Uploads packages into [staging] # Copyright 2010 Nicolás Reynolds -# Copyright 2013 Luke Shumaker +# Copyright 2013-2014 Luke Shumaker # For just the create_signature() function: # Copyright (c) 2006-2013 Pacman Development Team # Copyright (c) 2002-2006 by Judd Vinet diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 4ea6edc..4a21133 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -3,7 +3,7 @@ # Prepares packages for upload # Copyright 2010-2011 Nicolás Reynolds -# Copyright 2013 Luke Shumaker +# Copyright 2013-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/aur b/src/aur index 2d1efbb..a335b04 100755 --- a/src/aur +++ b/src/aur @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Copyright 2010 Joshua Ismael # Copyright 2010 Nicolás Reynolds -# Copyright 2013 Luke Shumaker +# Copyright 2013-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index 29f0128..e114d11 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -2,7 +2,7 @@ # -*- tab-width: 4; sh-basic-offset: 4 -*- # distcc-tool -# Copyright 2013 Luke Shumaker +# Copyright 2013-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 0f0ed10..73fb6b7 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -4,7 +4,7 @@ set -euE # Copyright 2010 Nicolás Reynolds # Copyright 2011 Joshua Haase -# Copyright 2012-2013 Luke Shumaker +# Copyright 2012-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 96f86ab..c838288 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -4,7 +4,7 @@ set -euE # Copyright 2010-2011 Nicolás Reynolds # Copyright 2011 Joshua Ismael Haase Hernández -# Copyright 2012-2013 Luke Shumaker +# Copyright 2012-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index f1b9573..a47717b 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -4,7 +4,7 @@ # Copyright (c) 2011-2012 Joshua I. Haase H. (xihh) # Copyright (c) 2011-2012 Nicolás Reynolds # Copyright (c) 2012 Michał Masłowski -# Copyright (c) 2012-2013 Luke Shumaker +# Copyright (c) 2012-2014 Luke Shumaker # # The copy_files() function is taken from makechrootpkg: # Copyright (c) 2007 Armin Luntzer diff --git a/src/lib/conf.sh b/src/lib/conf.sh index 6b1ab49..cdba893 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -1,7 +1,7 @@ #!/bin/bash # non-executable, but put this there as a hint to text editors # This may be included with or without `set -euE` -# Copyright (c) 2012-2013 by Luke Shumaker +# Copyright (c) 2012-2014 by Luke Shumaker # # 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 diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index 7858611..5305896 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -2,7 +2,7 @@ # This may be included with or without `set -euE` # When run directly, it does `set -euE` -# Copyright (c) 2013 by Luke Shumaker +# Copyright (c) 2013-2014 by Luke Shumaker # # 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 diff --git a/src/lib/librelib b/src/lib/librelib index c21532b..e9c8c8b 100755 --- a/src/lib/librelib +++ b/src/lib/librelib @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2013 by Luke Shumaker +# Copyright (c) 2013-2014 by Luke Shumaker # # 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 diff --git a/src/lib/libremessages b/src/lib/libremessages index df0a98a..3ce0243 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -10,7 +10,7 @@ # Copyright (c) 2006 by Andras Voroskoi # Copyright (c) 2006 by Miklos Vajna # Copyright (c) 2011 by Joshua Haase -# Copyright (c) 2012-2013 by Luke Shumaker +# Copyright (c) 2012-2014 by Luke Shumaker # # 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 diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 443b4f6..90c40db 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -1,7 +1,7 @@ #!/usr/bin/env bash # librefetch # -# Copyright 2013 Luke Shumaker +# Copyright 2013-2014 Luke Shumaker # # This file is part of Parabola. # -- cgit v1.2.3-54-g00ecf From c43f0808583070a22e904cd650e8ed17fe781806 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 00:20:19 -0500 Subject: Normalize to use the string "Copyright (C)" --- src/abslibre-tools/createworkdir | 4 ++-- src/abslibre-tools/diff-unfree | 2 +- src/abslibre-tools/librerelease | 32 ++++++++++++------------- src/abslibre-tools/librestage | 4 ++-- src/aur | 6 ++--- src/chroot-tools/chcleanup | 2 +- src/chroot-tools/distcc-tool | 2 +- src/chroot-tools/librechroot | 6 ++--- src/chroot-tools/libremakepkg | 6 ++--- src/fullpkg/fullpkg-find | 52 ++++++++++++++++++++-------------------- src/gitget/gitget | 4 ++-- src/gitget/libregit | 2 +- src/lib/conf.sh | 2 +- src/lib/libreblacklist | 2 +- src/lib/librelib | 2 +- src/lib/libremessages | 18 +++++++------- src/librefetch/librefetch | 2 +- src/pkgbuild-check-nonfree | 10 ++++---- src/treepkg | 2 +- 19 files changed, 80 insertions(+), 80 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/abslibre-tools/createworkdir b/src/abslibre-tools/createworkdir index 4421ae2..27b285c 100755 --- a/src/abslibre-tools/createworkdir +++ b/src/abslibre-tools/createworkdir @@ -3,8 +3,8 @@ set -euE # CreateWorkDir # Creates a dir structure for working with Parabola packages -# Copyright 2010 Nicolás Reynolds -# Copyright 2013 Luke Shumaker +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2013 Luke Shumaker # ---------- GNU General Public License 3 ---------- diff --git a/src/abslibre-tools/diff-unfree b/src/abslibre-tools/diff-unfree index 1ef0649..af5bbe5 100755 --- a/src/abslibre-tools/diff-unfree +++ b/src/abslibre-tools/diff-unfree @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This script will help you diff a *-libre PKGBUILD against the unfree one # to check for updates. -# Copyright 2010 Nicolás Reynolds +# Copyright (C) 2010 Nicolás Reynolds # ---------- GNU General Public License 3 ---------- diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index 558ec37..8b1e05f 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -2,23 +2,23 @@ # Librerelease # Uploads packages into [staging] -# Copyright 2010 Nicolás Reynolds -# Copyright 2013-2014 Luke Shumaker +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker # For just the create_signature() function: -# Copyright (c) 2006-2013 Pacman Development Team -# Copyright (c) 2002-2006 by Judd Vinet -# Copyright (c) 2005 by Aurelien Foret -# Copyright (c) 2006 by Miklos Vajna -# Copyright (c) 2005 by Christian Hamar -# Copyright (c) 2006 by Alex Smith -# Copyright (c) 2006 by Andras Voroskoi -# Copyright (c) 2006-2013 Pacman Development Team -# Copyright (c) 2002-2006 by Judd Vinet -# Copyright (c) 2005 by Aurelien Foret -# Copyright (c) 2006 by Miklos Vajna -# Copyright (c) 2005 by Christian Hamar -# Copyright (c) 2006 by Alex Smith -# Copyright (c) 2006 by Andras Voroskoi +# Copyright (C) 2006-2013 Pacman Development Team +# Copyright (C) 2002-2006 by Judd Vinet +# Copyright (C) 2005 by Aurelien Foret +# Copyright (C) 2006 by Miklos Vajna +# Copyright (C) 2005 by Christian Hamar +# Copyright (C) 2006 by Alex Smith +# Copyright (C) 2006 by Andras Voroskoi +# Copyright (C) 2006-2013 Pacman Development Team +# Copyright (C) 2002-2006 by Judd Vinet +# Copyright (C) 2005 by Aurelien Foret +# Copyright (C) 2006 by Miklos Vajna +# Copyright (C) 2005 by Christian Hamar +# Copyright (C) 2006 by Alex Smith +# Copyright (C) 2006 by Andras Voroskoi # # This file is part of Parabola. # diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 4a21133..610de50 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -2,8 +2,8 @@ # LibreStage # Prepares packages for upload -# Copyright 2010-2011 Nicolás Reynolds -# Copyright 2013-2014 Luke Shumaker +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/aur b/src/aur index a335b04..988d33f 100755 --- a/src/aur +++ b/src/aur @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Copyright 2010 Joshua Ismael -# Copyright 2010 Nicolás Reynolds -# Copyright 2013-2014 Luke Shumaker +# Copyright (C) 2010 Joshua Ismael +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index 2ff45f9..9ad121e 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eE -# (c) Nicolás Reynolds +# Copyright (C) Nicolás Reynolds # Released under GPLv3 # # Performs chroot cleanup smartly, it only removes the unneeded packages or diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index e114d11..9f78ead 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -2,7 +2,7 @@ # -*- tab-width: 4; sh-basic-offset: 4 -*- # distcc-tool -# Copyright 2013-2014 Luke Shumaker +# Copyright (C) 2013-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 73fb6b7..7b1e4a9 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -2,9 +2,9 @@ set -euE # librechroot -# Copyright 2010 Nicolás Reynolds -# Copyright 2011 Joshua Haase -# Copyright 2012-2014 Luke Shumaker +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2011 Joshua Haase +# Copyright (C) 2012-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index c838288..d6db0fd 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -2,9 +2,9 @@ set -euE # libremakepkg -# Copyright 2010-2011 Nicolás Reynolds -# Copyright 2011 Joshua Ismael Haase Hernández -# Copyright 2012-2014 Luke Shumaker +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández +# Copyright (C) 2012-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index a47717b..8bd630c 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -1,34 +1,34 @@ #!/usr/bin/env bash # set -x # uncomment for debug -# Copyright (c) 2011-2012 Joshua I. Haase H. (xihh) -# Copyright (c) 2011-2012 Nicolás Reynolds -# Copyright (c) 2012 Michał Masłowski -# Copyright (c) 2012-2014 Luke Shumaker +# Copyright (C) 2011-2012 Joshua I. Haase H. (xihh) +# Copyright (C) 2011-2012 Nicolás Reynolds +# Copyright (C) 2012 Michał Masłowski +# Copyright (C) 2012-2014 Luke Shumaker # # The copy_files() function is taken from makechrootpkg: -# Copyright (c) 2007 Armin Luntzer -# Copyright (c) 2007 Jason Chu -# Copyright (c) 2007, 2011 Dan McGee -# Copyright (c) 2007-2008 Travis Willard -# Copyright (c) 2007-2009 Aaron Griffin -# Copyright (c) 2008 Simo Leone -# Copyright (c) 2009 Biru Ionut -# Copyright (c) 2009 Biru Ionut -# Copyright (c) 2009 Evangelos Foutras -# Copyright (c) 2009 Francois Charette -# Copyright (c) 2009 Nezmer -# Copyright (c) 2009 Ronald van Haren -# Copyright (c) 2009-2011 Andrea Scarpino -# Copyright (c) 2009-2012 Allan McRae -# Copyright (c) 2009-2012 Eric Bélanger -# Copyright (c) 2009-2012 Pierre Schmitz -# Copyright (c) 2010 Byron Clark -# Copyright (c) 2011 Ionut Biru -# Copyright (c) 2011 Lukas Fleischer -# Copyright (c) 2011-2012 Florian Pritz -# Copyright (c) 2011-2013 Jan Alexander Steffens (heftig) -# Copyright (c) 2013 Sébastien Luttringer +# Copyright (C) 2007 Armin Luntzer +# Copyright (C) 2007 Jason Chu +# Copyright (C) 2007, 2011 Dan McGee +# Copyright (C) 2007-2008 Travis Willard +# Copyright (C) 2007-2009 Aaron Griffin +# Copyright (C) 2008 Simo Leone +# Copyright (C) 2009 Biru Ionut +# Copyright (C) 2009 Biru Ionut +# Copyright (C) 2009 Evangelos Foutras +# Copyright (C) 2009 Francois Charette +# Copyright (C) 2009 Nezmer +# Copyright (C) 2009 Ronald van Haren +# Copyright (C) 2009-2011 Andrea Scarpino +# Copyright (C) 2009-2012 Allan McRae +# Copyright (C) 2009-2012 Eric Bélanger +# Copyright (C) 2009-2012 Pierre Schmitz +# Copyright (C) 2010 Byron Clark +# Copyright (C) 2011 Ionut Biru +# Copyright (C) 2011 Lukas Fleischer +# Copyright (C) 2011-2012 Florian Pritz +# Copyright (C) 2011-2013 Jan Alexander Steffens (heftig) +# Copyright (C) 2013 Sébastien Luttringer # # Because of the code from makechrootpkg, this file is GPLv2, instead of GPLv3 # like most of libretools. diff --git a/src/gitget/gitget b/src/gitget/gitget index 194ec05..3e35cec 100755 --- a/src/gitget/gitget +++ b/src/gitget/gitget @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Copyright (c) 2012-2013 Pacman Development Team -# Copyright (c) 2012-2013 Luke Shumaker +# Copyright (C) 2012-2013 Pacman Development Team +# Copyright (C) 2012-2013 Luke Shumaker # # 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 diff --git a/src/gitget/libregit b/src/gitget/libregit index f89a402..95b59ff 100755 --- a/src/gitget/libregit +++ b/src/gitget/libregit @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2012-2013 Luke Shumaker +# Copyright (C) 2012-2013 Luke Shumaker # # 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 diff --git a/src/lib/conf.sh b/src/lib/conf.sh index cdba893..ee52f6f 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -1,7 +1,7 @@ #!/bin/bash # non-executable, but put this there as a hint to text editors # This may be included with or without `set -euE` -# Copyright (c) 2012-2014 by Luke Shumaker +# Copyright (C) 2012-2014 by Luke Shumaker # # 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 diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index 5305896..5525098 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -2,7 +2,7 @@ # This may be included with or without `set -euE` # When run directly, it does `set -euE` -# Copyright (c) 2013-2014 by Luke Shumaker +# Copyright (C) 2013-2014 by Luke Shumaker # # 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 diff --git a/src/lib/librelib b/src/lib/librelib index e9c8c8b..d0a06e5 100755 --- a/src/lib/librelib +++ b/src/lib/librelib @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2013-2014 by Luke Shumaker +# Copyright (C) 2013-2014 by Luke Shumaker # # 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 diff --git a/src/lib/libremessages b/src/lib/libremessages index 3ce0243..e5b7157 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -2,15 +2,15 @@ # This may be included with or without `set -euE` # When run directly, it does `set -euE` -# Copyright (c) 2002-2006 by Judd Vinet -# Copyright (c) 2006-2010 Pacman Development Team -# Copyright (c) 2005 by Aurelien Foret -# Copyright (c) 2005 by Christian Hamar -# Copyright (c) 2006 by Alex Smith -# Copyright (c) 2006 by Andras Voroskoi -# Copyright (c) 2006 by Miklos Vajna -# Copyright (c) 2011 by Joshua Haase -# Copyright (c) 2012-2014 by Luke Shumaker +# Copyright (C) 2002-2006 by Judd Vinet +# Copyright (C) 2006-2010 Pacman Development Team +# Copyright (C) 2005 by Aurelien Foret +# Copyright (C) 2005 by Christian Hamar +# Copyright (C) 2006 by Alex Smith +# Copyright (C) 2006 by Andras Voroskoi +# Copyright (C) 2006 by Miklos Vajna +# Copyright (C) 2011 by Joshua Haase +# Copyright (C) 2012-2014 by Luke Shumaker # # 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 diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 90c40db..4ecc8fe 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -1,7 +1,7 @@ #!/usr/bin/env bash # librefetch # -# Copyright 2013-2014 Luke Shumaker +# Copyright (C) 2013-2014 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree index 18fac91..7b73745 100755 --- a/src/pkgbuild-check-nonfree +++ b/src/pkgbuild-check-nonfree @@ -2,11 +2,11 @@ # -*- tab-width: 4 ; sh-basic-offset: 4 -*- # pkgbuild-check-nonfree -# Copyright 2010 Haase Hernández -# Copyright 2010 Joseph Graham -# Copyright 2010 Joshua Ismael -# Copyright 2010 Nicolás Reynolds -# Copyright 2012-2013 Luke Shumaker +# Copyright (C) 2010 Haase Hernández +# Copyright (C) 2010 Joseph Graham +# Copyright (C) 2010 Joshua Ismael +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2012-2013 Luke Shumaker # # This file is part of Parabola. # diff --git a/src/treepkg b/src/treepkg index 8879e54..1826c8f 100755 --- a/src/treepkg +++ b/src/treepkg @@ -1,6 +1,6 @@ #!/usr/bin/env bash #set -x -# (c) 2012 Nicolás Reynolds +# Copyright (C) 2012 Nicolás Reynolds # # 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 -- cgit v1.2.3-54-g00ecf From 3f0dede97ee6c75c32cefd283eb65be782e4b84b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 01:48:25 -0500 Subject: librechroot: fix setting CHROOTEXTRAPKG --- src/chroot-tools/librechroot | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 7b1e4a9..fcabcff 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -342,10 +342,12 @@ main() { mkdir -p "$copydir/etc/libretools.d" { - if [[ -n ${CHROOTEXTRAPKG[*]:-} ]]; then - declare -p CHROOTEXTRAPKG | sed -r 's/declare( -.)* //' + if [[ ${#CHROOTEXTRAPKG[*]} -eq 0 ]]; then + echo 'CHROOTEXTRAPKG=()' else - printf 'CHROOTEXTRAPKG=()\n' + printf 'CHROOTEXTRAPKG=(' + printf '%q ' "${CHROOTEXTRAPKG[@]}" + printf ')\n' fi } > "$copydir"/etc/libretools.d/chroot.conf -- cgit v1.2.3-54-g00ecf From d7dcce53396d32c090e1e175c9c606a78f5cb3d6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 20:18:20 -0500 Subject: mkarchroot: don't let the environment affect pacstrap --- src/chroot-tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index d08775e..4ecff51 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -34,7 +34,7 @@ makechrootpkg.sh: %: %.ugly Makefile mkarchroot: mkarchroot.in Makefile @echo '< $< M4_EDIT | SED > $@' - @<'$<' $(edit) | sed 's|arch-nspawn|$$(librelib chroot/&)|' >'$@' || { rm -f -- '$@'; false; } + @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' || { rm -f -- '$@'; false; } @echo 'CHMOD $<'; chmod 755 "$@" || { rm -f -- '$@'; false; } archroot: %: %.in Makefile -- cgit v1.2.3-54-g00ecf From 804e5e1093c3aa8258bf9f8c97ff661cdf8407f1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 20:22:24 -0500 Subject: Makefiles: use .DELETE_ON_ERROR: --- common.mk | 6 ++++-- src/chroot-tools/Makefile | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/chroot-tools') diff --git a/common.mk b/common.mk index ea89de1..deb64c7 100644 --- a/common.mk +++ b/common.mk @@ -81,8 +81,8 @@ build: PHONY $(build_files) ronn --html $(RONNFLAGS) < '$<' > '$@' %: %.in @echo "GEN $@" - @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; } - @chmod 755 "$@" || { rm -f -- '$@'; false; } + @$(edit) <"$<" >"$@" + @chmod 755 "$@" # Build ######################################################################## @@ -146,3 +146,5 @@ clean-hook: PHONY FORCE: PHONY PHONY: .PHONY: FORCE PHONY + +.DELETE_ON_ERROR: diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index 4ecff51..97ca688 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -27,19 +27,19 @@ makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in cp $< $@ makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile cp $*.in $@ - @echo 'PATCH $@ $*.patch'; patch $@ $*.patch || { rm -f -- '$@'; false; } + @echo 'PATCH $@ $*.patch'; patch $@ $*.patch makechrootpkg.sh: %: %.ugly Makefile - @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@' || { rm -f -- '$@'; false; } - @echo 'INDENT $@'; $(call indent,$@) || { rm -f -- '$@'; false; } + @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@' + @echo 'INDENT $@'; $(call indent,$@) mkarchroot: mkarchroot.in Makefile @echo '< $< M4_EDIT | SED > $@' - @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' || { rm -f -- '$@'; false; } - @echo 'CHMOD $<'; chmod 755 "$@" || { rm -f -- '$@'; false; } + @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' + @echo 'CHMOD $<'; chmod 755 "$@" archroot: %: %.in Makefile @echo "GEN $@" - @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; } - @chmod 755 "$@" || { rm -f -- '$@'; false; } + @$(edit) <"$<" >"$@" + @chmod 755 "$@" distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage -- cgit v1.2.3-54-g00ecf From 9f28b8f1d7ecc211e4df9f4a16a04960ed1bd582 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 22:34:00 -0500 Subject: libremakepkg: fix network handling --- src/chroot-tools/libremakepkg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index d6db0fd..a459009 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -121,14 +121,14 @@ build() ( local copydir=$1; shift local repack=$1; shift - local netflag='' local run=() if $INCHROOT; then - ! $NONET || netflag='-N' run=(unshare) + if $NONET; then run+=('-n'); fi else - ! $NONET || netflag='-n' - run=(librechroot "${librechroot_flags[@]}" run) + run=(librechroot "${librechroot_flags[@]}") + if $NONET; then run+=('-N'); fi + run+=(run) fi prepare_chroot "$copydir" "$LIBREHOME" "$repack" false -- cgit v1.2.3-54-g00ecf From 965371ef3f70120555d957a0d0703016f8df8307 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 5 Feb 2014 16:01:51 -0500 Subject: librechroot update: correctly handle 'filesystem' upgrades --- src/chroot-tools/librechroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index fcabcff..dcf8488 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -381,7 +381,7 @@ main() { arch-nspawn "$copydir" pacman -Sy "$@" ;; update) - arch-nspawn "$copydir" pacman -Syu --noconfirm + arch-nspawn "$copydir" bash -c 'pacman -Syw --noconfirm && umount /etc/resolv.conf && pacman -Su --noconfirm' ;; clean-pkgs) trap "rm -f '$copydir'/bin/chcleanup '$copydir'/chrootexec" EXIT -- cgit v1.2.3-54-g00ecf From c55053b00f34a90e27dff3d92ae6bbcdac0edaf4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 5 Feb 2014 19:38:24 -0500 Subject: libremakepkg: fix installing dependencies that aren't in the paccache I can't figure out a reliable way to test this, as it depends on the host pacman cache. --- src/chroot-tools/libremakepkg | 17 +++++++++-------- src/chroot-tools/makechrootpkg.sh.patch | 27 +++++++++++++-------------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index a459009..26080bc 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -121,21 +121,22 @@ build() ( local copydir=$1; shift local repack=$1; shift - local run=() + local run_ynet=() + local run_nnet=() if $INCHROOT; then - run=(unshare) - if $NONET; then run+=('-n'); fi + run_ynet=(unshare) + run_nnet=(unshare -n) else - run=(librechroot "${librechroot_flags[@]}") - if $NONET; then run+=('-N'); fi - run+=(run) + run_ynet=(librechroot "${librechroot_flags[@]}" run) + run_nnet=(librechroot "${librechroot_flags[@]}" -N run) fi + $NONET || run_nnet=("${run_ynet[@]}") prepare_chroot "$copydir" "$LIBREHOME" "$repack" false - "${run[@]}" /chrootprepare "$@" |& indent + "${run_ynet[@]}" /chrootprepare false "$@" |& indent run_hook pre_build "$copydir" trap "run_hook post_build '$copydir'" EXIT - "${run[@]}" /chrootbuild "$@" |& indent + "${run_nnet[@]}" /chrootbuild false "$@" |& indent ) # The main program ############################################################# diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index d6c96f9..817eaa5 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,5 +1,5 @@ --- makechrootpkg.sh.in 2014-01-05 18:51:41.463720929 -0500 -+++ makechrootpkg.sh.ugly 2014-01-05 18:52:41.624501065 -0500 ++++ makechrootpkg.sh.ugly 2014-02-05 19:01:17.583560384 -0500 @@ -12,6 +12,7 @@ shopt -s nullglob @@ -206,7 +206,7 @@ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o else ( export SRCDEST BUILDDIR="$builddir" -@@ -277,20 +331,18 @@ +@@ -277,10 +331,10 @@ (( $? != 0 )) && die "Could not download sources." # Clean up garbage from verifysource @@ -218,11 +218,8 @@ +_chrootprepare() { # This function isn't run in makechrootpkg, # so no global variables -- local run_namcap="$1"; shift -- local makepkg_args=("$@") -- - . /etc/profile - export HOME=/build + local run_namcap="$1"; shift +@@ -291,6 +345,7 @@ shopt -s nullglob # XXX: Workaround makepkg disliking read-only dirs @@ -230,10 +227,12 @@ ln -sft /srcdest /srcdest_host/* ln -sft /startdir /startdir_host/* -@@ -313,9 +365,23 @@ - rm PKGBUILD* +@@ -314,8 +369,25 @@ cp /startdir_host/PKGBUILD* . chown nobody PKGBUILD* + ++ # Sync deps now, as networking may be disabled during _chrootbuild ++ sudo -u nobody makepkg "${makepkg_args[@]}" -eo +} + +_chrootbuild() { @@ -247,14 +246,14 @@ + shopt -s nullglob + + cd /startdir - ++ # Safety check if [[ ! -w PKGBUILD ]]; then + # XXX: internationalize this message echo "Can't write to PKGBUILD!" exit 1 fi -@@ -333,12 +399,24 @@ +@@ -333,12 +405,24 @@ exit 0 } @@ -279,7 +278,7 @@ for l in "$copydir"/logdest/*; do [[ $l == */logpipe.* ]] && continue chown "$src_owner" "$l" -@@ -352,6 +430,10 @@ +@@ -352,6 +436,10 @@ } # }}} @@ -290,7 +289,7 @@ umask 0022 load_vars /etc/makepkg.conf -@@ -363,30 +445,45 @@ +@@ -363,30 +451,45 @@ [[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD [[ -d $LOGDEST ]] || LOGDEST=$PWD @@ -342,7 +341,7 @@ if (( ret != 0 )); then if $temp_chroot; then -@@ -397,3 +494,4 @@ +@@ -397,3 +500,4 @@ else true fi -- cgit v1.2.3-54-g00ecf From 93276b1059c6bce3aa6e400f70160b8b89cab007 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 5 Feb 2014 20:05:13 -0500 Subject: libremakepkg: make sure the local repository exists before syncing pkgs --- src/chroot-tools/makechrootpkg.sh.patch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index 817eaa5..8c42089 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,5 +1,5 @@ --- makechrootpkg.sh.in 2014-01-05 18:51:41.463720929 -0500 -+++ makechrootpkg.sh.ugly 2014-02-05 19:01:17.583560384 -0500 ++++ makechrootpkg.sh.ugly 2014-02-05 19:59:10.991879605 -0500 @@ -12,6 +12,7 @@ shopt -s nullglob @@ -227,11 +227,12 @@ ln -sft /srcdest /srcdest_host/* ln -sft /startdir /startdir_host/* -@@ -314,8 +369,25 @@ +@@ -314,8 +369,26 @@ cp /startdir_host/PKGBUILD* . chown nobody PKGBUILD* + # Sync deps now, as networking may be disabled during _chrootbuild ++ cp /repo/repo.db /var/lib/pacman/sync/repo.db + sudo -u nobody makepkg "${makepkg_args[@]}" -eo +} + @@ -253,7 +254,7 @@ echo "Can't write to PKGBUILD!" exit 1 fi -@@ -333,12 +405,24 @@ +@@ -333,12 +406,24 @@ exit 0 } @@ -278,7 +279,7 @@ for l in "$copydir"/logdest/*; do [[ $l == */logpipe.* ]] && continue chown "$src_owner" "$l" -@@ -352,6 +436,10 @@ +@@ -352,6 +437,10 @@ } # }}} @@ -289,7 +290,7 @@ umask 0022 load_vars /etc/makepkg.conf -@@ -363,30 +451,45 @@ +@@ -363,30 +452,45 @@ [[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD [[ -d $LOGDEST ]] || LOGDEST=$PWD @@ -341,7 +342,7 @@ if (( ret != 0 )); then if $temp_chroot; then -@@ -397,3 +500,4 @@ +@@ -397,3 +501,4 @@ else true fi -- cgit v1.2.3-54-g00ecf From dd8c9b738c811a03c5e9ccd57ec73beccc5c1eeb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 9 Feb 2014 20:10:01 -0500 Subject: fix `librechroot update` --- src/chroot-tools/librechroot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index dcf8488..051148d 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -381,7 +381,9 @@ main() { arch-nspawn "$copydir" pacman -Sy "$@" ;; update) - arch-nspawn "$copydir" bash -c 'pacman -Syw --noconfirm && umount /etc/resolv.conf && pacman -Su --noconfirm' + # umount resolv.conf so that it can be upgraded, if nescessary + # this disables DNS, so fetch everything first + arch-nspawn "$copydir" bash -c 'pacman -Syuw --noconfirm && umount /etc/resolv.conf && pacman -Su --noconfirm' ;; clean-pkgs) trap "rm -f '$copydir'/bin/chcleanup '$copydir'/chrootexec" EXIT -- cgit v1.2.3-54-g00ecf From 5065c3b8cda743decc6d1c8bf963640a7ed49018 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 9 Feb 2014 20:22:38 -0500 Subject: libremakepkg: extract the source (prepare()) while the network is still on --- src/chroot-tools/makechrootpkg.sh.patch | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index 8c42089..540e6ba 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,5 +1,5 @@ --- makechrootpkg.sh.in 2014-01-05 18:51:41.463720929 -0500 -+++ makechrootpkg.sh.ugly 2014-02-05 19:59:10.991879605 -0500 ++++ makechrootpkg.sh.ugly 2014-02-09 20:20:25.021630727 -0500 @@ -12,6 +12,7 @@ shopt -s nullglob @@ -227,13 +227,19 @@ ln -sft /srcdest /srcdest_host/* ln -sft /startdir /startdir_host/* -@@ -314,8 +369,26 @@ - cp /startdir_host/PKGBUILD* . - chown nobody PKGBUILD* +@@ -316,11 +371,29 @@ + # Safety check + if [[ ! -w PKGBUILD ]]; then ++ # XXX: internationalize this message + echo "Can't write to PKGBUILD!" + exit 1 + fi + +- sudo -u nobody makepkg "${makepkg_args[@]}" || exit 1 + # Sync deps now, as networking may be disabled during _chrootbuild + cp /repo/repo.db /var/lib/pacman/sync/repo.db -+ sudo -u nobody makepkg "${makepkg_args[@]}" -eo ++ sudo -u nobody makepkg "${makepkg_args[@]}" -o +} + +_chrootbuild() { @@ -248,12 +254,10 @@ + + cd /startdir + - # Safety check - if [[ ! -w PKGBUILD ]]; then -+ # XXX: internationalize this message - echo "Can't write to PKGBUILD!" - exit 1 - fi ++ sudo -u nobody makepkg "${makepkg_args[@]}" -e || exit 1 + + if $run_namcap; then + pacman -S --needed --noconfirm namcap @@ -333,12 +406,24 @@ exit 0 } -- cgit v1.2.3-54-g00ecf From 8cbd5fc2e616785d97e84f7e17b845b74a6ccfd1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 6 Mar 2014 12:16:33 -0500 Subject: Update for the new version of systemd --- src/chroot-tools/indent | 4 +--- src/chroot-tools/librechroot | 22 ++-------------------- 2 files changed, 3 insertions(+), 23 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/indent b/src/chroot-tools/indent index 0e2d0e0..5a7f654 100755 --- a/src/chroot-tools/indent +++ b/src/chroot-tools/indent @@ -19,9 +19,7 @@ while (1) { $c = substr($buffer, $_, 1); if ($c eq "\n") { syswrite(STDOUT, $indent) if ($print_indent); - # XXX: SYSTEMD-STDOUT HACK - #syswrite(STDOUT, $c, 1); - syswrite(STDOUT, "\r\n", 2); + syswrite(STDOUT, $c, 1); $print_indent = 1; } elsif ($c eq "\r") { syswrite(STDOUT, $c, 1); diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 051148d..f449f0d 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -186,23 +186,7 @@ arch_nspawn_flags=() sysd_nspawn_flags=() arch-nspawn() { local copydir=$1; shift - # XXX: SYSTEMD-STDOUT HACK - if [[ -t 1 ]]; then - cmd=("$@") - else - # This perl script is similar to `sed 's|\n|\r\n|g'`, (or, more - # correctly, `sed 's|$|\r|'`) but it does't line-buffer. - local perlcmd=' -my $size; -my $buffer; -while(1) { - $size=sysread(STDIN, $buffer, 40); - last if ($size < 1); - $buffer =~ s/\n/\r\n/g; - syswrite(STDOUT, $buffer); -}' - cmd=(bash --noprofile --norc -c "set -o pipefail; $(printf '%q ' "$@") |& perl -e $(printf '%q' "$perlcmd")") - fi + local cmd=("$@") set +u # if an array is empty, it counts as unbound "$_arch_nspawn" "${arch_nspawn_flags[@]}" "$copydir" "${sysd_nspawn_flags[@]}" -- "${cmd[@]}" @@ -381,9 +365,7 @@ main() { arch-nspawn "$copydir" pacman -Sy "$@" ;; update) - # umount resolv.conf so that it can be upgraded, if nescessary - # this disables DNS, so fetch everything first - arch-nspawn "$copydir" bash -c 'pacman -Syuw --noconfirm && umount /etc/resolv.conf && pacman -Su --noconfirm' + arch-nspawn "$copydir" bash -c 'pacman -Syu --noconfirm' ;; clean-pkgs) trap "rm -f '$copydir'/bin/chcleanup '$copydir'/chrootexec" EXIT -- cgit v1.2.3-54-g00ecf From 089c60a05e95bee1ab3c506069f8e0e75eb43657 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 20 Mar 2014 16:27:41 -0400 Subject: Generalize the patching mechanism in the build system. --- common.mk | 28 ++++++++++++++++++++++++---- src/chroot-tools/.gitignore | 3 +-- src/chroot-tools/Makefile | 24 +----------------------- src/devtools/.gitignore | 1 + 4 files changed, 27 insertions(+), 29 deletions(-) (limited to 'src/chroot-tools') diff --git a/common.mk b/common.mk index deb64c7..ea0c588 100644 --- a/common.mk +++ b/common.mk @@ -10,6 +10,13 @@ pkglibexecdir ?= $(libexecdir)/libretools # This is used when using sources grabbed from devtools edit = sed -e 's|m4_include(lib/\(.*\))|. $$(librelib \1)|' +# Usage: $(call indent,FILENAME) +# Command to auto-indent a file. +indent = emacs --batch $1 \ + --eval '(setq sh-basic-offset 8)' \ + --eval '(indent-region (point-min) (point-max) nil)' \ + -f save-buffer &>/dev/null + # Usage OUTPUT # Normalize a .po(t) file pofmt = msguniq -Fi @@ -53,7 +60,7 @@ install_files += $(addprefix $(DESTDIR)$(bindir)/,$(progs)) \ $(addprefix $(DESTDIR)$(mandir)/man6/,$(filter %.6,$(mans))) \ $(addprefix $(DESTDIR)$(mandir)/man7/,$(filter %.7,$(mans))) \ $(addprefix $(DESTDIR)$(mandir)/man8/,$(filter %.8,$(mans))) -clean_files += $(patsubst %.in,%,$(copy_files)) $(copy_files) $(mans) $(wildcard *.pot) +clean_files += $(patsubst %.in,%,$(copy_files)) $(copy_files) $(mans) $(wildcard *.pot *.ugly* *~) pots += $(filter-out $(no-pots) ,$(progs)) pot_files += $(addsuffix .pot,$(pots)) @@ -79,10 +86,23 @@ build: PHONY $(build_files) ronn --roff $(RONNFLAGS) < '$<' > '$@' %.html: %.ronn ronn --html $(RONNFLAGS) < '$<' > '$@' + + +# If we have a .patch file, the flow is: +# $(devtoolsdir)/%.in -> %.in + %.patch -> %.ugly -> % +_do_patch = $(filter $(patsubst %.patch,%,$(wildcard *.patch)),$(patsubst %.in,%,$(copy_files))) +%.ugly: %.in %.patch Makefile + cp $*.in $@ + @echo 'PATCH $@ $*.patch'; patch $@ $*.patch +$(_do_patch): %: %.ugly Makefile + @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@' + @echo 'INDENT $@'; $(call indent,$@) + $(if $(filter-out %.sh,$@),chmod 755 "$@") +# Otherwise, the flow is just +# $(devtoolsdir)/%.in -> %.in -> % %: %.in - @echo "GEN $@" - @$(edit) <"$<" >"$@" - @chmod 755 "$@" + @echo 'EDIT < $< > $@'; $(edit) <"$<" >"$@" + $(if $(filter-out %.sh,$@),chmod 755 "$@") # Build ######################################################################## diff --git a/src/chroot-tools/.gitignore b/src/chroot-tools/.gitignore index 80e1000..3f46ed2 100644 --- a/src/chroot-tools/.gitignore +++ b/src/chroot-tools/.gitignore @@ -1,5 +1,4 @@ makechrootpkg.sh* -!makechrootpkg.sh.patch - arch-nspawn* mkarchroot* +!*.patch diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index 97ca688..c49c4ac 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -9,37 +9,15 @@ libs = makechrootpkg.sh $(wildcard hooks-*.sh) pots = $(libexecs) $(libs) pkglibexecdir = $(libexecdir)/libretools/chroot -clean_files = makechrootpkg.sh.ugly* *~ include ../../common.mk -# Usage: $(call indent,FILENAME) -# Command to auto-indent a file. -indent = emacs --batch $1 \ - --eval '(setq sh-basic-offset 8)' \ - --eval '(indent-region (point-min) (point-max) nil)' \ - -f save-buffer &>/dev/null - -# makechrootpkg.sh is special, we patch it and do fancy stuff -# The flow is: -# $(devtoolsdir)/*.in -> *.sh.in + *.sh.patch -> *.sh.ugly -> *.sh - +# makechrootpkg.sh is created from a command, not a library makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in cp $< $@ -makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile - cp $*.in $@ - @echo 'PATCH $@ $*.patch'; patch $@ $*.patch -makechrootpkg.sh: %: %.ugly Makefile - @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@' - @echo 'INDENT $@'; $(call indent,$@) mkarchroot: mkarchroot.in Makefile @echo '< $< M4_EDIT | SED > $@' @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' @echo 'CHMOD $<'; chmod 755 "$@" -archroot: %: %.in Makefile - @echo "GEN $@" - @$(edit) <"$<" >"$@" - @chmod 755 "$@" - distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage diff --git a/src/devtools/.gitignore b/src/devtools/.gitignore index 097fcde..d669bbd 100644 --- a/src/devtools/.gitignore +++ b/src/devtools/.gitignore @@ -1,3 +1,4 @@ * !Makefile !.gitignore +!*.patch -- cgit v1.2.3-54-g00ecf From d17d1d82349f7f4cb60574f7d9c2f786eec3cc93 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 20 Mar 2014 17:16:36 -0400 Subject: Fix issue #487; obey proxy settings when creating a chroot. https://labs.parabola.nu/issues/487 --- src/chroot-tools/Makefile | 5 ----- src/chroot-tools/mkarchroot.patch | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 src/chroot-tools/mkarchroot.patch (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index c49c4ac..e44ad5f 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -15,9 +15,4 @@ include ../../common.mk makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in cp $< $@ -mkarchroot: mkarchroot.in Makefile - @echo '< $< M4_EDIT | SED > $@' - @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' - @echo 'CHMOD $<'; chmod 755 "$@" - distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage diff --git a/src/chroot-tools/mkarchroot.patch b/src/chroot-tools/mkarchroot.patch new file mode 100644 index 0000000..a0ea0f0 --- /dev/null +++ b/src/chroot-tools/mkarchroot.patch @@ -0,0 +1,23 @@ +--- mkarchroot.in 2014-01-05 18:51:15.231500986 -0500 ++++ mkarchroot 2014-03-20 15:05:06.885086610 -0400 +@@ -65,6 +65,11 @@ + chmod 0755 "$working_dir" + fi + ++_env=() ++while read -r varname; do ++ _env+=("$varname=${!varname}") ++done < { declare -x | sed -r 's/^declare -x ([^=]*)=.*/\1/' | grep -i '_proxy$'; } ++env -i "${_env[@]}" \ + pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \ + "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' + +@@ -72,7 +77,7 @@ + echo 'LANG=C' > "$working_dir/etc/locale.conf" + echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot" + +-exec arch-nspawn \ ++exec $(librelib chroot/arch-nspawn) \ + ${pac_conf:+-C "$pac_conf"} \ + ${makepkg_conf:+-M "$makepkg_conf"} \ + ${cache_dir:+-c "$cache_dir"} \ -- cgit v1.2.3-54-g00ecf From d25f30f25ce61367c81133c9cd01fe3169d8f6c0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 21 Mar 2014 14:39:06 -0400 Subject: Do an audit of copyright and license claims --- src/abslibre-tools/createworkdir | 19 +++++++------- src/abslibre-tools/diff-unfree | 13 +++++----- src/abslibre-tools/libreaddiff | 8 ++++-- src/abslibre-tools/librerelease | 29 ++++++++++----------- src/abslibre-tools/librestage | 6 +++-- src/aur | 10 +++++--- src/chroot-tools/arch-nspawn.patch | 9 +++++++ src/chroot-tools/chcleanup | 18 +++++++++++-- src/chroot-tools/distcc-tool | 4 ++- src/chroot-tools/hooks-distcc.sh | 19 ++++++++++++++ src/chroot-tools/indent | 19 ++++++++++++++ src/chroot-tools/librechroot | 8 +++--- src/chroot-tools/libremakepkg | 8 +++--- src/chroot-tools/makechrootpkg.sh.patch | 45 +++++++++++++++++++-------------- src/chroot-tools/mkarchroot.patch | 15 ++++++++--- src/dagpkg | 4 ++- src/devtools/checkpkg.patch | 10 +++++--- src/devtools/find-libdeps.patch | 9 ++++--- src/devtools/finddeps.patch | 8 +++--- src/devtools/lddd.patch | 8 +++--- src/fullpkg/fullpkg | 6 ++++- src/fullpkg/fullpkg-build | 5 ++++ src/fullpkg/fullpkg-find | 11 ++++---- src/gitget/gitget | 2 ++ src/gitget/libregit | 2 ++ src/is_built | 20 +++++++++++++++ src/lib/common.sh.top | 9 +------ src/lib/conf.sh | 4 ++- src/lib/libreblacklist | 4 ++- src/lib/librelib | 4 ++- src/lib/libremessages | 43 ++++++++++++++++++------------- src/librefetch/librefetch | 2 ++ src/mips64el-tools/librebasebuilder | 5 +++- src/mips64el-tools/mipsrelease | 21 +++++++++++++-- src/pkgbuild-check-nonfree | 11 ++++---- src/pkgbuild-summarize-nonfree | 18 +++++++++++++ src/repo-diff | 4 +++ src/toru/toru | 20 ++++++++++++++- src/toru/toru-info | 5 ++++ src/toru/toru-path | 4 +++ src/toru/toru-utils | 5 ++++ src/toru/toru-where | 5 ++++ src/treepkg | 6 +++-- 43 files changed, 354 insertions(+), 131 deletions(-) create mode 100644 src/chroot-tools/arch-nspawn.patch (limited to 'src/chroot-tools') diff --git a/src/abslibre-tools/createworkdir b/src/abslibre-tools/createworkdir index 27b285c..51863e3 100755 --- a/src/abslibre-tools/createworkdir +++ b/src/abslibre-tools/createworkdir @@ -1,28 +1,29 @@ #!/usr/bin/env bash -set -euE # CreateWorkDir # Creates a dir structure for working with Parabola packages -# Copyright (C) 2010 Nicolás Reynolds -# Copyright (C) 2013 Luke Shumaker - -# ---------- GNU General Public License 3 ---------- - +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv3+ +# # This file is part of Parabola. - +# # Parabola is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. - +# # Parabola is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. - +# # You should have received a copy of the GNU General Public License # along with Parabola. If not, see . +set -euE + . libremessages . $(librelib conf.sh) load_files libretools diff --git a/src/abslibre-tools/diff-unfree b/src/abslibre-tools/diff-unfree index af5bbe5..e8c18e6 100755 --- a/src/abslibre-tools/diff-unfree +++ b/src/abslibre-tools/diff-unfree @@ -1,22 +1,23 @@ #!/usr/bin/env bash # This script will help you diff a *-libre PKGBUILD against the unfree one # to check for updates. -# Copyright (C) 2010 Nicolás Reynolds - -# ---------- GNU General Public License 3 ---------- +# Copyright (C) 2010 Nicolás Reynolds +# +# License: GNU GPLv3+ +# # This file is part of Parabola. - +# # Parabola is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. - +# # Parabola is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. - +# # You should have received a copy of the GNU General Public License # along with Parabola. If not, see . diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff index ebd749d..641f552 100755 --- a/src/abslibre-tools/libreaddiff +++ b/src/abslibre-tools/libreaddiff @@ -1,7 +1,9 @@ #!/usr/bin/env bash -set -e # -*- coding: utf-8 -*- -# Copyright (C) 2011, 2012 Michał Masłowski + +# Copyright (C) 2011-2012 Michał Masłowski +# +# License: GNU GPLv3+ # # 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 @@ -16,6 +18,8 @@ set -e # You should have received a copy of the GNU General Public License # along with this program. If not, see . +set -e + . $(librelib conf.sh) load_files libretools check_vars libretools WORKDIR diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index 8b1e05f..eec62d7 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -2,23 +2,19 @@ # Librerelease # Uploads packages into [staging] -# Copyright (C) 2010 Nicolás Reynolds -# Copyright (C) 2013-2014 Luke Shumaker +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker +# # For just the create_signature() function: # Copyright (C) 2006-2013 Pacman Development Team -# Copyright (C) 2002-2006 by Judd Vinet -# Copyright (C) 2005 by Aurelien Foret -# Copyright (C) 2006 by Miklos Vajna -# Copyright (C) 2005 by Christian Hamar -# Copyright (C) 2006 by Alex Smith -# Copyright (C) 2006 by Andras Voroskoi -# Copyright (C) 2006-2013 Pacman Development Team -# Copyright (C) 2002-2006 by Judd Vinet -# Copyright (C) 2005 by Aurelien Foret -# Copyright (C) 2006 by Miklos Vajna -# Copyright (C) 2005 by Christian Hamar -# Copyright (C) 2006 by Alex Smith -# Copyright (C) 2006 by Andras Voroskoi +# Copyright (C) 2002-2006 Judd Vinet +# Copyright (C) 2005 Aurelien Foret +# Copyright (C) 2006 Miklos Vajna +# Copyright (C) 2005 Christian Hamar +# Copyright (C) 2006 Alex Smith +# Copyright (C) 2006 Andras Voroskoi +# +# License: GNU GPLv3+ # # This file is part of Parabola. # @@ -35,6 +31,9 @@ # You should have received a copy of the GNU General Public License # along with Parabola. If not, see . +# create_signature() is taken from pacman:makepkg, which is GPLv2+, +# so we take the '+' to combine it with our GPLv3+. + . libremessages . $(librelib conf.sh) diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 610de50..6ae0af0 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -2,8 +2,10 @@ # LibreStage # Prepares packages for upload -# Copyright (C) 2010-2011 Nicolás Reynolds -# Copyright (C) 2013-2014 Luke Shumaker +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # This file is part of Parabola. # diff --git a/src/aur b/src/aur index 988d33f..72857ed 100755 --- a/src/aur +++ b/src/aur @@ -1,7 +1,9 @@ #!/usr/bin/env bash -# Copyright (C) 2010 Joshua Ismael -# Copyright (C) 2010 Nicolás Reynolds -# Copyright (C) 2013-2014 Luke Shumaker +# Copyright (C) 2010 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # This file is part of Parabola. # @@ -9,7 +11,7 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. - +# # Parabola is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the diff --git a/src/chroot-tools/arch-nspawn.patch b/src/chroot-tools/arch-nspawn.patch new file mode 100644 index 0000000..afdf51a --- /dev/null +++ b/src/chroot-tools/arch-nspawn.patch @@ -0,0 +1,9 @@ +--- arch-nspawn.in 2014-03-21 13:59:31.812992892 -0400 ++++ arch-nspawn 2014-03-21 14:24:23.520619552 -0400 +@@ -1,4 +1,6 @@ + #!/bin/bash ++# License: GNU GPLv2 ++# + # 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 + # the Free Software Foundation; version 2 of the License. diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index 9ad121e..e766117 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -1,13 +1,27 @@ #!/usr/bin/env bash -set -eE # Copyright (C) Nicolás Reynolds -# Released under GPLv3 # +# License: GNU GPLv3 +# +# 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 +# the Free Software Foundation; version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + # Performs chroot cleanup smartly, it only removes the unneeded packages or # leaves you with a cleansystem # # See: HOOKPREBUILD +set -eE + DRYRUN=${DRYRUN:-false} ################################################################################ diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index 9f78ead..f2e43dd 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -2,7 +2,9 @@ # -*- tab-width: 4; sh-basic-offset: 4 -*- # distcc-tool -# Copyright (C) 2013-2014 Luke Shumaker +# Copyright (C) 2013-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # This file is part of Parabola. # diff --git a/src/chroot-tools/hooks-distcc.sh b/src/chroot-tools/hooks-distcc.sh index d8d708a..445810b 100644 --- a/src/chroot-tools/hooks-distcc.sh +++ b/src/chroot-tools/hooks-distcc.sh @@ -1,4 +1,23 @@ #!/usr/bin/env bash +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv3+ +# +# This file is part of Parabola. +# +# Parabola is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Parabola is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Parabola. If not, see . + set -euE hook_pre_build+=("distcc_start") diff --git a/src/chroot-tools/indent b/src/chroot-tools/indent index 5a7f654..ffec4d5 100755 --- a/src/chroot-tools/indent +++ b/src/chroot-tools/indent @@ -1,4 +1,23 @@ #!/usr/bin/env perl +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv3+ +# +# This file is part of Parabola. +# +# Parabola is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Parabola is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Parabola. If not, see . + use warnings; use strict; use constant BUFFER_SIZE => 40; diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index f449f0d..ca29cbb 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -2,9 +2,11 @@ set -euE # librechroot -# Copyright (C) 2010 Nicolás Reynolds -# Copyright (C) 2011 Joshua Haase -# Copyright (C) 2012-2014 Luke Shumaker +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # This file is part of Parabola. # diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 26080bc..6050174 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -2,9 +2,11 @@ set -euE # libremakepkg -# Copyright (C) 2010-2011 Nicolás Reynolds -# Copyright (C) 2011 Joshua Ismael Haase Hernández -# Copyright (C) 2012-2014 Luke Shumaker +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # This file is part of Parabola. # diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index 540e6ba..de57aeb 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,6 +1,13 @@ ---- makechrootpkg.sh.in 2014-01-05 18:51:41.463720929 -0500 -+++ makechrootpkg.sh.ugly 2014-02-09 20:20:25.021630727 -0500 -@@ -12,6 +12,7 @@ +--- makechrootpkg.sh.in 2014-03-21 13:59:31.239683366 -0400 ++++ makechrootpkg.sh.ugly 2014-03-21 14:19:20.747789508 -0400 +@@ -1,4 +1,6 @@ + #!/bin/bash ++# License: GNU GPLv2 ++# + # 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 + # the Free Software Foundation; version 2 of the License. +@@ -12,6 +14,7 @@ shopt -s nullglob @@ -8,7 +15,7 @@ _makepkg_args=(-s --noconfirm -L --holdver) makepkg_args=("${_makepkg_args[@]}") repack=false -@@ -29,9 +30,10 @@ +@@ -29,9 +32,10 @@ bindmounts_rw=() copy=$USER @@ -20,7 +27,7 @@ usage() { echo "Usage: ${0##*/} [options] -r [--] [makepkg args]" -@@ -67,6 +69,7 @@ +@@ -67,6 +71,7 @@ exit 1 } @@ -28,7 +35,7 @@ while getopts 'hcur:I:l:nTD:d:' arg; do case "$arg" in h) usage ;; -@@ -93,9 +96,6 @@ +@@ -93,9 +98,6 @@ [[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir" [[ ! -d $chrootdir/root ]] && die "Missing chroot dir root directory. Try using: mkarchroot %s/root base-devel" "$chrootdir" @@ -38,7 +45,7 @@ if [[ ${copy:0:1} = / ]]; then copydir=$copy else -@@ -115,30 +115,48 @@ +@@ -115,30 +117,48 @@ esac done @@ -93,7 +100,7 @@ # Get a read lock on the root chroot to make # sure we don't clone a half-updated chroot slock 8 "$chrootdir/root.lock" "Locking clean chroot" -@@ -159,11 +177,16 @@ +@@ -159,11 +179,16 @@ # Drop the read lock again lock_close 8 @@ -113,7 +120,7 @@ if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then btrfs subvolume delete "$copydir" >/dev/null || die "Unable to delete subvolume %s" "$copydir" -@@ -178,9 +201,14 @@ +@@ -178,9 +203,14 @@ stat_done } @@ -128,7 +135,7 @@ for install_pkg in "${install_pkgs[@]}"; do pkgname="${install_pkg##*/}" cp "$install_pkg" "$copydir/$pkgname" -@@ -193,11 +221,19 @@ +@@ -193,11 +223,19 @@ rm "$copydir/$pkgname" done @@ -150,7 +157,7 @@ $repack || rm -rf "$copydir/build" mkdir -p "$copydir/build" -@@ -236,12 +272,12 @@ +@@ -236,12 +274,12 @@ chown -R nobody "$copydir"/{build,pkgdest,srcpkgdest,logdest,srcdest,startdir} @@ -165,7 +172,7 @@ sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf" echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf" fi -@@ -254,20 +290,38 @@ +@@ -254,20 +292,38 @@ chmod 440 "$copydir/etc/sudoers.d/nobody-pacman" fi @@ -206,7 +213,7 @@ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o else ( export SRCDEST BUILDDIR="$builddir" -@@ -277,10 +331,10 @@ +@@ -277,10 +333,10 @@ (( $? != 0 )) && die "Could not download sources." # Clean up garbage from verifysource @@ -219,7 +226,7 @@ # This function isn't run in makechrootpkg, # so no global variables local run_namcap="$1"; shift -@@ -291,6 +345,7 @@ +@@ -291,6 +347,7 @@ shopt -s nullglob # XXX: Workaround makepkg disliking read-only dirs @@ -227,7 +234,7 @@ ln -sft /srcdest /srcdest_host/* ln -sft /startdir /startdir_host/* -@@ -316,11 +371,29 @@ +@@ -316,11 +373,29 @@ # Safety check if [[ ! -w PKGBUILD ]]; then @@ -258,7 +265,7 @@ if $run_namcap; then pacman -S --needed --noconfirm namcap -@@ -333,12 +406,24 @@ +@@ -333,12 +408,24 @@ exit 0 } @@ -283,7 +290,7 @@ for l in "$copydir"/logdest/*; do [[ $l == */logpipe.* ]] && continue chown "$src_owner" "$l" -@@ -352,6 +437,10 @@ +@@ -352,6 +439,10 @@ } # }}} @@ -294,7 +301,7 @@ umask 0022 load_vars /etc/makepkg.conf -@@ -363,30 +452,45 @@ +@@ -363,30 +454,45 @@ [[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD [[ -d $LOGDEST ]] || LOGDEST=$PWD @@ -346,7 +353,7 @@ if (( ret != 0 )); then if $temp_chroot; then -@@ -397,3 +501,4 @@ +@@ -397,3 +503,4 @@ else true fi diff --git a/src/chroot-tools/mkarchroot.patch b/src/chroot-tools/mkarchroot.patch index a0ea0f0..171b38a 100644 --- a/src/chroot-tools/mkarchroot.patch +++ b/src/chroot-tools/mkarchroot.patch @@ -1,6 +1,13 @@ ---- mkarchroot.in 2014-01-05 18:51:15.231500986 -0500 -+++ mkarchroot 2014-03-20 15:05:06.885086610 -0400 -@@ -65,6 +65,11 @@ +--- mkarchroot.in 2014-03-21 13:59:31.593002027 -0400 ++++ mkarchroot.ugly 2014-03-21 14:23:12.027238102 -0400 +@@ -1,4 +1,6 @@ + #!/bin/bash ++# License: GNU GPLv2 ++# + # 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 + # the Free Software Foundation; version 2 of the License. +@@ -65,6 +67,11 @@ chmod 0755 "$working_dir" fi @@ -12,7 +19,7 @@ pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \ "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' -@@ -72,7 +77,7 @@ +@@ -72,7 +79,7 @@ echo 'LANG=C' > "$working_dir/etc/locale.conf" echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot" diff --git a/src/dagpkg b/src/dagpkg index 8e997a6..e1487d5 100755 --- a/src/dagpkg +++ b/src/dagpkg @@ -2,10 +2,12 @@ # # dagpkg - create a directed graph of package dependencies and build # them in topological order -# + # Copyright (C) 2014 Nicolás Reynolds # Copyright (C) 2014 Michał Masłowski # +# License: GNU GPLv3+ +# # 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 # the Free Software Foundation, either version 3 of the License, or diff --git a/src/devtools/checkpkg.patch b/src/devtools/checkpkg.patch index fe9568e..2e3bb63 100644 --- a/src/devtools/checkpkg.patch +++ b/src/devtools/checkpkg.patch @@ -1,6 +1,8 @@ ---- checkpkg.in 2014-03-20 15:55:50.091249246 -0400 -+++ checkpkg 2014-03-21 00:27:07.318339210 -0400 -@@ -2,7 +2,28 @@ +--- checkpkg.in 2014-03-21 13:59:31.849658036 -0400 ++++ checkpkg.ugly 2014-03-21 14:20:52.340291982 -0400 +@@ -1,8 +1,30 @@ + #!/bin/bash ++# License: Unspecified shopt -s extglob @@ -30,7 +32,7 @@ # Source makepkg.conf; fail if it is not found if [[ -r '/etc/makepkg.conf' ]]; then -@@ -17,7 +38,9 @@ +@@ -17,7 +39,9 @@ fi if [[ ! -f PKGBUILD ]]; then diff --git a/src/devtools/find-libdeps.patch b/src/devtools/find-libdeps.patch index 2b2ce2a..fe8e2fe 100644 --- a/src/devtools/find-libdeps.patch +++ b/src/devtools/find-libdeps.patch @@ -1,14 +1,15 @@ ---- find-libdeps.in 2014-03-20 15:55:50.107915156 -0400 -+++ find-libdeps 2014-03-21 00:09:03.855031377 -0400 -@@ -1,6 +1,6 @@ +--- find-libdeps.in 2014-03-21 13:59:32.059649315 -0400 ++++ find-libdeps.ugly 2014-03-21 14:21:18.955744982 -0400 +@@ -1,6 +1,7 @@ #!/bin/bash ++# License: Unspecified -m4_include(lib/common.sh) +. $(librelib messages) set -e shopt -s extglob -@@ -19,12 +19,32 @@ +@@ -19,12 +20,32 @@ *) die "Unknown mode %s" "$script_mode" ;; esac diff --git a/src/devtools/finddeps.patch b/src/devtools/finddeps.patch index a960ac1..feae920 100644 --- a/src/devtools/finddeps.patch +++ b/src/devtools/finddeps.patch @@ -1,8 +1,10 @@ ---- finddeps.in 2014-03-20 15:55:50.121247884 -0400 -+++ finddeps 2014-03-21 00:11:02.573978735 -0400 -@@ -3,18 +3,24 @@ +--- finddeps.in 2014-03-21 13:59:32.249641424 -0400 ++++ finddeps.ugly 2014-03-21 14:21:09.949489174 -0400 +@@ -2,19 +2,26 @@ + # # finddeps - find packages that depend on a given depname # ++# License: Unspecified -m4_include(lib/common.sh) +. $(librelib messages) diff --git a/src/devtools/lddd.patch b/src/devtools/lddd.patch index 7ae1679..415b178 100644 --- a/src/devtools/lddd.patch +++ b/src/devtools/lddd.patch @@ -1,8 +1,10 @@ ---- lddd.in 2014-03-20 15:55:50.154579704 -0400 -+++ lddd 2014-03-21 00:35:07.167279204 -0400 -@@ -3,7 +3,23 @@ +--- lddd.in 2014-03-21 13:59:32.419634364 -0400 ++++ lddd.ugly 2014-03-21 14:21:31.538503947 -0400 +@@ -2,8 +2,25 @@ + # # lddd - find broken library links on your machine # ++# License: Unspecified -m4_include(lib/common.sh) +. $(librelib messages) diff --git a/src/fullpkg/fullpkg b/src/fullpkg/fullpkg index 978cf7b..0572ddb 100755 --- a/src/fullpkg/fullpkg +++ b/src/fullpkg/fullpkg @@ -1,8 +1,12 @@ #!/usr/bin/env bash -# set -x # uncomment for debug # Builds packages from ABS recursively. It tries to find dependencies that # aren't built or need update and then makepkg them in order. +# Copyright (C) 2011 Nicolás Reynolds +# Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) +# +# License: Unspecified + usage() { print "Usage: %s [OPTIONS] [BUILD_DIR]" "${0##*/}" print "A (libre)makepkg wrapper that will also build dependencies" diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build index e824c2e..0ffd42a 100755 --- a/src/fullpkg/fullpkg-build +++ b/src/fullpkg/fullpkg-build @@ -3,6 +3,11 @@ # Builds packages from ABS recursively. It tries to find dependencies that # aren't built or need update and then makepkg them in order. +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2013 Luke Shumaker +# +# License: Unspecified + # TODO move __build to chroot . libremessages diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index 8bd630c..009bb86 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -1,10 +1,10 @@ #!/usr/bin/env bash # set -x # uncomment for debug -# Copyright (C) 2011-2012 Joshua I. Haase H. (xihh) -# Copyright (C) 2011-2012 Nicolás Reynolds +# Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2012 Michał Masłowski -# Copyright (C) 2012-2014 Luke Shumaker +# Copyright (C) 2012-2014 Luke Shumaker # # The copy_files() function is taken from makechrootpkg: # Copyright (C) 2007 Armin Luntzer @@ -13,8 +13,7 @@ # Copyright (C) 2007-2008 Travis Willard # Copyright (C) 2007-2009 Aaron Griffin # Copyright (C) 2008 Simo Leone -# Copyright (C) 2009 Biru Ionut -# Copyright (C) 2009 Biru Ionut +# Copyright (C) 2009 Biru Ionut # Copyright (C) 2009 Evangelos Foutras # Copyright (C) 2009 Francois Charette # Copyright (C) 2009 Nezmer @@ -33,6 +32,8 @@ # Because of the code from makechrootpkg, this file is GPLv2, instead of GPLv3 # like most of libretools. # +# License: GNU GPLv2 +# # 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 # the Free Software Foundation; version 2 of the License. diff --git a/src/gitget/gitget b/src/gitget/gitget index 3e35cec..bcc528c 100755 --- a/src/gitget/gitget +++ b/src/gitget/gitget @@ -3,6 +3,8 @@ # Copyright (C) 2012-2013 Pacman Development Team # Copyright (C) 2012-2013 Luke Shumaker # +# License: GNU GPLv2+ +# # 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 # the Free Software Foundation; either version 2 of the License, or diff --git a/src/gitget/libregit b/src/gitget/libregit index 95b59ff..25550e5 100755 --- a/src/gitget/libregit +++ b/src/gitget/libregit @@ -2,6 +2,8 @@ # Copyright (C) 2012-2013 Luke Shumaker # +# License: GNU GPLv2+ +# # 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 # the Free Software Foundation; either version 2 of the License, or diff --git a/src/is_built b/src/is_built index ba5f061..21b17d3 100755 --- a/src/is_built +++ b/src/is_built @@ -1,4 +1,24 @@ #!/usr/bin/env bash +# Copyright (C) 2011-2012 Nicolás Reynolds +# Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012-2013 Luke Shumaker +# +# License: GNU GPLv3+ +# +# This file is part of Parabola. +# +# Parabola is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Parabola is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Parabola. If not, see . . libremessages diff --git a/src/lib/common.sh.top b/src/lib/common.sh.top index 9c4ba2e..d45a7dd 100644 --- a/src/lib/common.sh.top +++ b/src/lib/common.sh.top @@ -4,14 +4,7 @@ # This file is included by libremessages. # You should probably use libremessages instead of this. -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# License: Unspecified shopt -s extglob diff --git a/src/lib/conf.sh b/src/lib/conf.sh index ee52f6f..3e07c11 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -1,7 +1,9 @@ #!/bin/bash # non-executable, but put this there as a hint to text editors # This may be included with or without `set -euE` -# Copyright (C) 2012-2014 by Luke Shumaker +# Copyright (C) 2012-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # 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 diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index 5525098..fdd27f9 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -2,7 +2,9 @@ # This may be included with or without `set -euE` # When run directly, it does `set -euE` -# Copyright (C) 2013-2014 by Luke Shumaker +# Copyright (C) 2013-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # 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 diff --git a/src/lib/librelib b/src/lib/librelib index d0a06e5..63d9a26 100755 --- a/src/lib/librelib +++ b/src/lib/librelib @@ -1,5 +1,7 @@ #!/usr/bin/env bash -# Copyright (C) 2013-2014 by Luke Shumaker +# Copyright (C) 2013-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # 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 diff --git a/src/lib/libremessages b/src/lib/libremessages index 162c8fb..71f1636 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -2,28 +2,35 @@ # This may be included with or without `set -euE` # When run directly, it does `set -euE` -# Copyright (C) 2002-2006 by Judd Vinet +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012-2014 Luke Shumaker + +# For just the setup_traps() function: +# Copyright (C) 2002-2006 Judd Vinet # Copyright (C) 2006-2010 Pacman Development Team -# Copyright (C) 2005 by Aurelien Foret -# Copyright (C) 2005 by Christian Hamar -# Copyright (C) 2006 by Alex Smith -# Copyright (C) 2006 by Andras Voroskoi -# Copyright (C) 2006 by Miklos Vajna -# Copyright (C) 2011 by Joshua Haase -# Copyright (C) 2012-2014 by Luke Shumaker +# Copyright (C) 2005 Aurelien Foret +# Copyright (C) 2005 Christian Hamar +# Copyright (C) 2006 Alex Smith +# Copyright (C) 2006 Andras Voroskoi +# Copyright (C) 2006 Miklos Vajna +# +# License: GNU GPLv3+ # -# 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 -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. +# 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# setup_traps() is based on pacman:makepkg, which is GPLv2+, +# so we take the '+' to combine it with our GPLv3+. ################################################################################ # Inherit most functions from devtools # diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 82c8703..4f2d788 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -3,6 +3,8 @@ # # Copyright (C) 2013-2014 Luke Shumaker # +# License: GNU GPLv3+ +# # This file is part of Parabola. # # Parabola is free software: you can redistribute it and/or modify diff --git a/src/mips64el-tools/librebasebuilder b/src/mips64el-tools/librebasebuilder index 6b8c8bb..34c1027 100755 --- a/src/mips64el-tools/librebasebuilder +++ b/src/mips64el-tools/librebasebuilder @@ -1,6 +1,9 @@ #!/usr/bin/env bash # -*- coding: utf-8 -*- -# Copyright (C) 2012 Michał Masłowski + +# Copyright (C) 2012 Michał Masłowski +# +# License: GNU GPLv3+ # # 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 diff --git a/src/mips64el-tools/mipsrelease b/src/mips64el-tools/mipsrelease index ea15f85..f8b77a8 100755 --- a/src/mips64el-tools/mipsrelease +++ b/src/mips64el-tools/mipsrelease @@ -1,9 +1,26 @@ #!/usr/bin/env bash -# Lic: GPLv3+ -# Author: Nicolas Reynolds # Local release of mips64el packages + clean ABS sync # Called by HOOKLOCALRELEASE +# Copyright (C) 2011 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + # $1 repo # $2+ packages diff --git a/src/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree index 7b73745..aa56d71 100755 --- a/src/pkgbuild-check-nonfree +++ b/src/pkgbuild-check-nonfree @@ -2,11 +2,12 @@ # -*- tab-width: 4 ; sh-basic-offset: 4 -*- # pkgbuild-check-nonfree -# Copyright (C) 2010 Haase Hernández -# Copyright (C) 2010 Joseph Graham -# Copyright (C) 2010 Joshua Ismael -# Copyright (C) 2010 Nicolás Reynolds -# Copyright (C) 2012-2013 Luke Shumaker +# Copyright (C) 2010 Joseph Graham (Xylon) +# Copyright (C) 2010 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2012-2013 Luke Shumaker +# +# License: GNU GPLv3+ # # This file is part of Parabola. # diff --git a/src/pkgbuild-summarize-nonfree b/src/pkgbuild-summarize-nonfree index 7b005d5..cf3be28 100755 --- a/src/pkgbuild-summarize-nonfree +++ b/src/pkgbuild-summarize-nonfree @@ -1,4 +1,22 @@ #!/bin/bash +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv3+ +# +# This file is part of Parabola. +# +# Parabola is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Parabola is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Parabola. If not, see . . $(librelib messages) diff --git a/src/repo-diff b/src/repo-diff index e15080a..d25983a 100755 --- a/src/repo-diff +++ b/src/repo-diff @@ -1,6 +1,10 @@ #!/usr/bin/env bash # Shows a diff between repo databases +# Copyright (C) 2013 Nicolás Reynolds +# +# License: Unspecified + . libremessages usage() { diff --git a/src/toru/toru b/src/toru/toru index 3c45efd..16ec4af 100755 --- a/src/toru/toru +++ b/src/toru/toru @@ -1,6 +1,24 @@ #!/usr/bin/env bash # Queries the ABS -# License: GPL3 + +# Copyright (C) 2011-2012 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012-2013 Michał Masłowski +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv3 +# +# 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 +# the Free Software Foundation; version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . ## TODO # * Add license text diff --git a/src/toru/toru-info b/src/toru/toru-info index d73d2ad..aa84fcf 100755 --- a/src/toru/toru-info +++ b/src/toru/toru-info @@ -1,5 +1,10 @@ #!/usr/bin/env bash # Prints info about a given pkgname + +# Copyright (C) 2012 Nicolás Reynolds +# +# License: Unspecified + . libremessages . $(librelib conf) diff --git a/src/toru/toru-path b/src/toru/toru-path index 6c86e88..407059b 100755 --- a/src/toru/toru-path +++ b/src/toru/toru-path @@ -1,5 +1,9 @@ #!/usr/bin/env bash +# Copyright (C) 2011-2012 Nicolás Reynolds +# +# License: Unspecified + source toru-utils TORUPATH=${T:-${TORUPATH}} diff --git a/src/toru/toru-utils b/src/toru/toru-utils index 96aa35e..2fecfc2 100755 --- a/src/toru/toru-utils +++ b/src/toru/toru-utils @@ -1,5 +1,10 @@ #!/usr/bin/env bash +# Copyright (C) 2011-2012 Nicolás Reynolds +# Copyright (C) 2012 Joshua Ismael Haase Hernández (xihh) +# +# License: Unspecified + . libremessages . $(librelib conf.sh) load_files libretools diff --git a/src/toru/toru-where b/src/toru/toru-where index 4b3ff1b..9d90972 100755 --- a/src/toru/toru-where +++ b/src/toru/toru-where @@ -1,5 +1,10 @@ #!/usr/bin/env bash # Locates a PKGBUILD dir on toru's path cache + +# Copyright (C) 2012 Nicolás Reynolds +# +# License: Unspecified + . $(librelib conf.sh) load_files libretools check_vars libretools TORUPATH || exit 1 diff --git a/src/treepkg b/src/treepkg index 4dc29dc..a23edbf 100755 --- a/src/treepkg +++ b/src/treepkg @@ -1,6 +1,8 @@ #!/usr/bin/env bash -#set -x -# Copyright (C) 2012 Nicolás Reynolds + +# Copyright (C) 2012 Nicolás Reynolds +# +# License: GNU GPLv3+ # # 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 -- cgit v1.2.3-54-g00ecf From 4c08929538733d5a76a663f2d48a980103b2223c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 22 Mar 2014 18:14:25 -0400 Subject: Update libremakepkg to work with Bash 4.3 (and still work with 4.2) --- src/chroot-tools/makechrootpkg.sh.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index de57aeb..5cea39a 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -182,7 +182,7 @@ +SigLevel = Optional TrustAll +Server = file:///repo +' -+ sed -i "${line}i${ins//$'\n'/\n}" "$copydir/etc/pacman.conf" ++ sed -i "${line}i${ins//$'\n'/\\n}" "$copydir/etc/pacman.conf" + fi + # This is a little gross, but this way the script is recreated every time in the -- cgit v1.2.3-54-g00ecf From c48ac8c89e596e160505bd5678db2b193607493f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 22 Mar 2014 22:00:44 -0400 Subject: Audit the authors and copyright years of files against git logs --- AUTHORS | 12 +++++++++--- src/abslibre-tools/createworkdir | 3 ++- src/abslibre-tools/diff-unfree | 3 ++- src/abslibre-tools/libreaddiff | 1 + src/abslibre-tools/librerelease | 4 +++- src/abslibre-tools/librestage | 3 ++- src/aur | 6 +++--- src/chroot-tools/chcleanup | 3 ++- src/chroot-tools/hooks-chcleanup.sh | 17 +++++++++++++++++ src/chroot-tools/hooks-check.sh | 17 +++++++++++++++++ src/chroot-tools/librechroot | 5 +++-- src/chroot-tools/libremakepkg | 5 +++-- src/fullpkg/fullpkg-build | 1 + src/fullpkg/fullpkg-find | 2 +- src/is_built | 2 +- src/lib/libremessages | 1 + src/mips64el-tools/add-mips64el | 4 ++++ src/mips64el-tools/mips-add | 4 ++++ src/mips64el-tools/mipsrelease | 2 +- src/pkgbuild-check-nonfree | 6 +++--- src/toru/toru-path | 1 + src/treepkg | 3 ++- 22 files changed, 83 insertions(+), 22 deletions(-) (limited to 'src/chroot-tools') diff --git a/AUTHORS b/AUTHORS index 747e012..335eb9c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,9 @@ -Joshua Haase -Nicolás Reynolds -Luke Shumaker +Daniel Molina (lluvia) +Joseph Graham (Xylon) +Joshua Ismael Haase Hernández (xihh) +Luke Shumaker +Michał Masłowski +Nicolás Reynolds + +As well as authors of code taken from Arch Linux's "devtools" and +Pacman's "makepkg". diff --git a/src/abslibre-tools/createworkdir b/src/abslibre-tools/createworkdir index 51863e3..8e5ebcd 100755 --- a/src/abslibre-tools/createworkdir +++ b/src/abslibre-tools/createworkdir @@ -2,7 +2,8 @@ # CreateWorkDir # Creates a dir structure for working with Parabola packages -# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) # Copyright (C) 2013 Luke Shumaker # # License: GNU GPLv3+ diff --git a/src/abslibre-tools/diff-unfree b/src/abslibre-tools/diff-unfree index e8c18e6..fc32e77 100755 --- a/src/abslibre-tools/diff-unfree +++ b/src/abslibre-tools/diff-unfree @@ -2,7 +2,8 @@ # This script will help you diff a *-libre PKGBUILD against the unfree one # to check for updates. -# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) # # License: GNU GPLv3+ # diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff index 641f552..16a77b5 100755 --- a/src/abslibre-tools/libreaddiff +++ b/src/abslibre-tools/libreaddiff @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2011-2012 Michał Masłowski +# Copyright (C) 2012 Daniel Molina (lluvia) # # License: GNU GPLv3+ # diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index eec62d7..03a57e0 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -2,7 +2,9 @@ # Librerelease # Uploads packages into [staging] -# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2010-2012 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2010-2013 Nicolás Reynolds +# Copyright (C) 2013 Michał Masłowski # Copyright (C) 2013-2014 Luke Shumaker # # For just the create_signature() function: diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 6ae0af0..1e208c9 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -2,7 +2,8 @@ # LibreStage # Prepares packages for upload -# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2010-2012 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) # Copyright (C) 2013-2014 Luke Shumaker # # License: GNU GPLv3+ diff --git a/src/aur b/src/aur index 72857ed..4057b6e 100755 --- a/src/aur +++ b/src/aur @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Copyright (C) 2010 Joshua Ismael Haase Hernández (xihh) -# Copyright (C) 2010 Nicolás Reynolds -# Copyright (C) 2013-2014 Luke Shumaker +# Copyright (C) 2010-2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2010-2012 Nicolás Reynolds +# Copyright (C) 2012-2014 Luke Shumaker # # License: GNU GPLv3+ # diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index e766117..60a4e22 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# Copyright (C) Nicolás Reynolds +# Copyright (C) 2011-2012 Nicolás Reynolds +# Copyright (C) 2012-2013 Luke Shumaker # # License: GNU GPLv3 # diff --git a/src/chroot-tools/hooks-chcleanup.sh b/src/chroot-tools/hooks-chcleanup.sh index 86c872c..0fd0f72 100644 --- a/src/chroot-tools/hooks-chcleanup.sh +++ b/src/chroot-tools/hooks-chcleanup.sh @@ -1,4 +1,21 @@ #!/usr/bin/env bash +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv2+ +# +# 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 +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + set -euE hook_pre_build+=("clean_chroot") diff --git a/src/chroot-tools/hooks-check.sh b/src/chroot-tools/hooks-check.sh index 2702f95..850516b 100644 --- a/src/chroot-tools/hooks-check.sh +++ b/src/chroot-tools/hooks-check.sh @@ -1,4 +1,21 @@ #!/usr/bin/env bash +# Copyright (C) 2013 Luke Shumaker +# +# License: GNU GPLv2+ +# +# 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 +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + set -euE hook_check_pkgbuild+=("check_pkgbuild_nonfree") diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index ca29cbb..bb82bd2 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -2,8 +2,9 @@ set -euE # librechroot -# Copyright (C) 2010 Nicolás Reynolds -# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2010-2012 Nicolás Reynolds +# Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012 Michał Masłowski # Copyright (C) 2012-2014 Luke Shumaker # # License: GNU GPLv3+ diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 6050174..1ed4eaf 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -2,8 +2,9 @@ set -euE # libremakepkg -# Copyright (C) 2010-2011 Nicolás Reynolds -# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2010-2012 Nicolás Reynolds +# Copyright (C) 2010-2012 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012 Michał Masłowski # Copyright (C) 2012-2014 Luke Shumaker # # License: GNU GPLv3+ diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build index 0ffd42a..715f505 100755 --- a/src/fullpkg/fullpkg-build +++ b/src/fullpkg/fullpkg-build @@ -4,6 +4,7 @@ # aren't built or need update and then makepkg them in order. # Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2011 Nicolás Reynolds # Copyright (C) 2013 Luke Shumaker # # License: Unspecified diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index 009bb86..c12888a 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -4,7 +4,7 @@ # Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) # Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2012 Michał Masłowski -# Copyright (C) 2012-2014 Luke Shumaker +# Copyright (C) 2013-2014 Luke Shumaker # # The copy_files() function is taken from makechrootpkg: # Copyright (C) 2007 Armin Luntzer diff --git a/src/is_built b/src/is_built index 21b17d3..67c0d8d 100755 --- a/src/is_built +++ b/src/is_built @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) -# Copyright (C) 2012-2013 Luke Shumaker +# Copyright (C) 2013 Luke Shumaker # # License: GNU GPLv3+ # diff --git a/src/lib/libremessages b/src/lib/libremessages index 71f1636..cb3d883 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -3,6 +3,7 @@ # When run directly, it does `set -euE` # Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2012 Nicolás Reynolds # Copyright (C) 2012-2014 Luke Shumaker # For just the setup_traps() function: diff --git a/src/mips64el-tools/add-mips64el b/src/mips64el-tools/add-mips64el index 17b167b..bf04663 100755 --- a/src/mips64el-tools/add-mips64el +++ b/src/mips64el-tools/add-mips64el @@ -1,6 +1,10 @@ #!/usr/bin/env bash # Change all arch array that aren't any or mips64el already +# Copyright (C) 2011 Nicolás Reynolds +# +# License: Unspecified + find -name 'PKGBUILD' -exec sed -i "s/^\(arch=([^)anym]\+\))/\1 'mips64el')/" '{}' \; exit $? diff --git a/src/mips64el-tools/mips-add b/src/mips64el-tools/mips-add index 402036e..11f6a74 100755 --- a/src/mips64el-tools/mips-add +++ b/src/mips64el-tools/mips-add @@ -1,4 +1,8 @@ #!/usr/bin/env bash +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# +# License: Unspecified + . libremessages if ! grep mips64el PKGBUILD >/dev/null; then # Add mips64el in ${arch} array if it isn't 'any' warning "Adding mips64el arch" diff --git a/src/mips64el-tools/mipsrelease b/src/mips64el-tools/mipsrelease index f8b77a8..fec2a1b 100755 --- a/src/mips64el-tools/mipsrelease +++ b/src/mips64el-tools/mipsrelease @@ -2,8 +2,8 @@ # Local release of mips64el packages + clean ABS sync # Called by HOOKLOCALRELEASE -# Copyright (C) 2011 Nicolás Reynolds # Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2013 Luke Shumaker # # License: GNU GPLv3+ diff --git a/src/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree index aa56d71..11eaf42 100755 --- a/src/pkgbuild-check-nonfree +++ b/src/pkgbuild-check-nonfree @@ -2,9 +2,9 @@ # -*- tab-width: 4 ; sh-basic-offset: 4 -*- # pkgbuild-check-nonfree -# Copyright (C) 2010 Joseph Graham (Xylon) -# Copyright (C) 2010 Joshua Ismael Haase Hernández (xihh) -# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2011 Joseph Graham (Xylon) +# Copyright (C) 2010-2011 Joshua Ismael Haase Hernández (xihh) +# Copyright (C) 2010-2012 Nicolás Reynolds # Copyright (C) 2012-2013 Luke Shumaker # # License: GNU GPLv3+ diff --git a/src/toru/toru-path b/src/toru/toru-path index 407059b..8674d53 100755 --- a/src/toru/toru-path +++ b/src/toru/toru-path @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Copyright (C) 2011-2012 Nicolás Reynolds +# Copyright (C) 2012 Michał Masłowski # # License: Unspecified diff --git a/src/treepkg b/src/treepkg index a23edbf..9d3c0c3 100755 --- a/src/treepkg +++ b/src/treepkg @@ -1,6 +1,7 @@ #!/usr/bin/env bash -# Copyright (C) 2012 Nicolás Reynolds +# Copyright (C) 2012-2013 Nicolás Reynolds +# Copyright (C) 2013 Luke Shumaker # # License: GNU GPLv3+ # -- cgit v1.2.3-54-g00ecf From cb2a663ff60eacf14f38fa4a67aabe35600c0ecb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 22 Mar 2014 22:13:04 -0400 Subject: Relicense some files from GPLv3+ GPLv2+ (that I'm the sole copyright holder of) --- src/chroot-tools/hooks-distcc.sh | 4 ++-- src/lib/conf.sh | 4 ++-- src/lib/libreblacklist | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/hooks-distcc.sh b/src/chroot-tools/hooks-distcc.sh index 445810b..37c82dc 100644 --- a/src/chroot-tools/hooks-distcc.sh +++ b/src/chroot-tools/hooks-distcc.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash # Copyright (C) 2013 Luke Shumaker # -# License: GNU GPLv3+ +# License: GNU GPLv2+ # # This file is part of Parabola. # # Parabola is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Parabola is distributed in the hope that it will be useful, diff --git a/src/lib/conf.sh b/src/lib/conf.sh index 3e07c11..2730b57 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -3,11 +3,11 @@ # Copyright (C) 2012-2014 Luke Shumaker # -# License: GNU GPLv3+ +# License: GNU GPLv2+ # # 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 -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index fdd27f9..8aa33cc 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -4,11 +4,11 @@ # Copyright (C) 2013-2014 Luke Shumaker # -# License: GNU GPLv3+ +# License: GNU GPLv2+ # # 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 -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, -- cgit v1.2.3-54-g00ecf From 222856031fbbf314e8e47db414225756a9c6fba2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 23 Mar 2014 18:09:13 -0400 Subject: Most of my desired re-licensings were authorized on the dev list --- src/chroot-tools/chcleanup | 5 +++-- src/chroot-tools/librechroot | 4 ++-- src/chroot-tools/libremakepkg | 4 ++-- src/fullpkg/fullpkg | 15 ++++++++++++++- src/fullpkg/fullpkg-build | 15 ++++++++++++++- src/lib/libremessages | 7 ++----- src/mips64el-tools/add-mips64el | 15 ++++++++++++++- src/mips64el-tools/mips-add | 15 ++++++++++++++- src/repo-diff | 15 ++++++++++++++- src/toru/toru | 5 +++-- src/toru/toru-info | 15 ++++++++++++++- src/toru/toru-path | 15 ++++++++++++++- src/toru/toru-utils | 15 ++++++++++++++- src/toru/toru-where | 15 ++++++++++++++- 14 files changed, 138 insertions(+), 22 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index 60a4e22..a72f951 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -2,11 +2,12 @@ # Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2012-2013 Luke Shumaker # -# License: GNU GPLv3 +# License: GNU GPLv3+ # # 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 -# the Free Software Foundation; version 3 of the License. +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index bb82bd2..d8e76ac 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -7,13 +7,13 @@ set -euE # Copyright (C) 2012 Michał Masłowski # Copyright (C) 2012-2014 Luke Shumaker # -# License: GNU GPLv3+ +# License: GNU GPLv2+ # # This file is part of Parabola. # # Parabola is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Parabola is distributed in the hope that it will be useful, diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 1ed4eaf..aad4217 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -7,13 +7,13 @@ set -euE # Copyright (C) 2012 Michał Masłowski # Copyright (C) 2012-2014 Luke Shumaker # -# License: GNU GPLv3+ +# License: GNU GPLv2+ # # This file is part of Parabola. # # Parabola is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Parabola is distributed in the hope that it will be useful, diff --git a/src/fullpkg/fullpkg b/src/fullpkg/fullpkg index 0572ddb..8e87e46 100755 --- a/src/fullpkg/fullpkg +++ b/src/fullpkg/fullpkg @@ -5,7 +5,20 @@ # Copyright (C) 2011 Nicolás Reynolds # Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . usage() { print "Usage: %s [OPTIONS] [BUILD_DIR]" "${0##*/}" diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build index 715f505..06d0d50 100755 --- a/src/fullpkg/fullpkg-build +++ b/src/fullpkg/fullpkg-build @@ -7,7 +7,20 @@ # Copyright (C) 2011 Nicolás Reynolds # Copyright (C) 2013 Luke Shumaker # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # TODO move __build to chroot diff --git a/src/lib/libremessages b/src/lib/libremessages index cb3d883..b89e2bc 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -15,11 +15,11 @@ # Copyright (C) 2006 Andras Voroskoi # Copyright (C) 2006 Miklos Vajna # -# License: GNU GPLv3+ +# License: GNU GPLv2+ # # 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 -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, @@ -30,9 +30,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# setup_traps() is based on pacman:makepkg, which is GPLv2+, -# so we take the '+' to combine it with our GPLv3+. - ################################################################################ # Inherit most functions from devtools # ################################################################################ diff --git a/src/mips64el-tools/add-mips64el b/src/mips64el-tools/add-mips64el index bf04663..bb1bb69 100755 --- a/src/mips64el-tools/add-mips64el +++ b/src/mips64el-tools/add-mips64el @@ -3,7 +3,20 @@ # Copyright (C) 2011 Nicolás Reynolds # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . find -name 'PKGBUILD' -exec sed -i "s/^\(arch=([^)anym]\+\))/\1 'mips64el')/" '{}' \; diff --git a/src/mips64el-tools/mips-add b/src/mips64el-tools/mips-add index 11f6a74..ef708ec 100755 --- a/src/mips64el-tools/mips-add +++ b/src/mips64el-tools/mips-add @@ -1,7 +1,20 @@ #!/usr/bin/env bash # Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . . libremessages if ! grep mips64el PKGBUILD >/dev/null; then # Add mips64el in ${arch} array if it isn't 'any' diff --git a/src/repo-diff b/src/repo-diff index d25983a..e36edad 100755 --- a/src/repo-diff +++ b/src/repo-diff @@ -3,7 +3,20 @@ # Copyright (C) 2013 Nicolás Reynolds # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . . libremessages diff --git a/src/toru/toru b/src/toru/toru index 16ec4af..142e9e4 100755 --- a/src/toru/toru +++ b/src/toru/toru @@ -6,11 +6,12 @@ # Copyright (C) 2012-2013 Michał Masłowski # Copyright (C) 2013 Luke Shumaker # -# License: GNU GPLv3 +# License: GNU GPLv3+ # # 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 -# the Free Software Foundation; version 3 of the License. +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/toru/toru-info b/src/toru/toru-info index aa84fcf..a427050 100755 --- a/src/toru/toru-info +++ b/src/toru/toru-info @@ -3,7 +3,20 @@ # Copyright (C) 2012 Nicolás Reynolds # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . . libremessages . $(librelib conf) diff --git a/src/toru/toru-path b/src/toru/toru-path index 8674d53..32ddc24 100755 --- a/src/toru/toru-path +++ b/src/toru/toru-path @@ -3,7 +3,20 @@ # Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2012 Michał Masłowski # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . source toru-utils diff --git a/src/toru/toru-utils b/src/toru/toru-utils index 2fecfc2..164f418 100755 --- a/src/toru/toru-utils +++ b/src/toru/toru-utils @@ -3,7 +3,20 @@ # Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2012 Joshua Ismael Haase Hernández (xihh) # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . . libremessages . $(librelib conf.sh) diff --git a/src/toru/toru-where b/src/toru/toru-where index 9d90972..e70d135 100755 --- a/src/toru/toru-where +++ b/src/toru/toru-where @@ -3,7 +3,20 @@ # Copyright (C) 2012 Nicolás Reynolds # -# License: Unspecified +# License: GNU GPLv3+ +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . . $(librelib conf.sh) load_files libretools -- cgit v1.2.3-54-g00ecf From cffbaf45b0882a5c6d63d2b798e848d5b21e800b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 25 Mar 2014 21:39:59 -0400 Subject: chcleanup: remove the no-longer-used warning() function --- src/chroot-tools/chcleanup | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index a72f951..9084736 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 -- cgit v1.2.3-54-g00ecf From ae871fca2853bc3e5bf14587caecfa0436ba03a3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 25 Mar 2014 21:40:39 -0400 Subject: chcleanup: used ##*/ instead of basename --- src/chroot-tools/chcleanup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index 9084736..6432d5b 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -78,7 +78,7 @@ msg "Cleaning chroot..." cp /repo/repo.db /var/lib/pacman/sync/repo.db # Setup the temporary directory -TEMPDIR="$(mktemp --tmpdir -d $(basename $0).XXXXX)" +TEMPDIR="$(mktemp --tmpdir -d ${0##*/}.XXXXXXXXXX)" trap "rm -rf '$TEMPDIR'" EXIT cp -a /var/lib/pacman/sync "${TEMPDIR}/" -- cgit v1.2.3-54-g00ecf From 8831cc585ae8e9071f8c022bdfaf75e42029d7e4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 25 Mar 2014 21:44:14 -0400 Subject: Fix quoting/escaping with 'rm' in traps. --- src/chroot-tools/chcleanup | 2 +- src/chroot-tools/librechroot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index 6432d5b..bfb65ce 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -79,7 +79,7 @@ cp /repo/repo.db /var/lib/pacman/sync/repo.db # Setup the temporary directory TEMPDIR="$(mktemp --tmpdir -d ${0##*/}.XXXXXXXXXX)" -trap "rm -rf '$TEMPDIR'" EXIT +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 d8e76ac..6be9f09 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -371,7 +371,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' \ -- cgit v1.2.3-54-g00ecf From 7233318d44860fb3e2e4596a3352b4c9d783a1da Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 10 May 2014 22:13:03 -0400 Subject: Update to new devtools. --- src/chroot-tools/makechrootpkg.sh.patch | 41 ++++++++++++++++++--------------- src/chroot-tools/mkarchroot.patch | 8 +++---- 2 files changed, 26 insertions(+), 23 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index 5cea39a..8180d89 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,5 +1,5 @@ ---- makechrootpkg.sh.in 2014-03-21 13:59:31.239683366 -0400 -+++ makechrootpkg.sh.ugly 2014-03-21 14:19:20.747789508 -0400 +--- makechrootpkg.sh.in 2014-05-10 22:03:27.956692573 -0400 ++++ makechrootpkg.sh.ugly 2014-05-10 22:09:15.376594518 -0400 @@ -1,4 +1,6 @@ #!/bin/bash +# License: GNU GPLv2 @@ -12,8 +12,8 @@ shopt -s nullglob +init_variables() { - _makepkg_args=(-s --noconfirm -L --holdver) - makepkg_args=("${_makepkg_args[@]}") + default_makepkg_args=(-s --noconfirm -L --holdver) + makepkg_args=("${default_makepkg_args[@]}") repack=false @@ -29,9 +32,10 @@ bindmounts_rw=() @@ -35,7 +35,7 @@ while getopts 'hcur:I:l:nTD:d:' arg; do case "$arg" in h) usage ;; -@@ -93,9 +98,6 @@ +@@ -91,9 +96,6 @@ [[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir" [[ ! -d $chrootdir/root ]] && die "Missing chroot dir root directory. Try using: mkarchroot %s/root base-devel" "$chrootdir" @@ -45,7 +45,7 @@ if [[ ${copy:0:1} = / ]]; then copydir=$copy else -@@ -115,30 +117,48 @@ +@@ -113,30 +115,48 @@ esac done @@ -100,11 +100,14 @@ # Get a read lock on the root chroot to make # sure we don't clone a half-updated chroot slock 8 "$chrootdir/root.lock" "Locking clean chroot" -@@ -159,11 +179,16 @@ +@@ -157,14 +177,19 @@ # Drop the read lock again lock_close 8 - fi + + # Update mtime + touch "$copydir" } -clean_temporary() { @@ -120,7 +123,7 @@ if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then btrfs subvolume delete "$copydir" >/dev/null || die "Unable to delete subvolume %s" "$copydir" -@@ -178,9 +203,14 @@ +@@ -179,9 +204,14 @@ stat_done } @@ -135,7 +138,7 @@ for install_pkg in "${install_pkgs[@]}"; do pkgname="${install_pkg##*/}" cp "$install_pkg" "$copydir/$pkgname" -@@ -193,11 +223,19 @@ +@@ -194,11 +224,19 @@ rm "$copydir/$pkgname" done @@ -157,7 +160,7 @@ $repack || rm -rf "$copydir/build" mkdir -p "$copydir/build" -@@ -236,12 +274,12 @@ +@@ -237,12 +275,12 @@ chown -R nobody "$copydir"/{build,pkgdest,srcpkgdest,logdest,srcdest,startdir} @@ -172,7 +175,7 @@ sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf" echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf" fi -@@ -254,20 +292,38 @@ +@@ -255,20 +293,38 @@ chmod 440 "$copydir/etc/sudoers.d/nobody-pacman" fi @@ -213,7 +216,7 @@ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o else ( export SRCDEST BUILDDIR="$builddir" -@@ -277,10 +333,10 @@ +@@ -278,10 +334,10 @@ (( $? != 0 )) && die "Could not download sources." # Clean up garbage from verifysource @@ -226,7 +229,7 @@ # This function isn't run in makechrootpkg, # so no global variables local run_namcap="$1"; shift -@@ -291,6 +347,7 @@ +@@ -292,6 +348,7 @@ shopt -s nullglob # XXX: Workaround makepkg disliking read-only dirs @@ -234,7 +237,7 @@ ln -sft /srcdest /srcdest_host/* ln -sft /startdir /startdir_host/* -@@ -316,11 +373,29 @@ +@@ -317,11 +374,29 @@ # Safety check if [[ ! -w PKGBUILD ]]; then @@ -265,7 +268,7 @@ if $run_namcap; then pacman -S --needed --noconfirm namcap -@@ -333,12 +408,24 @@ +@@ -334,12 +409,24 @@ exit 0 } @@ -290,7 +293,7 @@ for l in "$copydir"/logdest/*; do [[ $l == */logpipe.* ]] && continue chown "$src_owner" "$l" -@@ -352,6 +439,10 @@ +@@ -353,6 +440,10 @@ } # }}} @@ -300,8 +303,8 @@ + umask 0022 - load_vars /etc/makepkg.conf -@@ -363,30 +454,45 @@ + load_vars "$USER_HOME/.makepkg.conf" +@@ -364,30 +455,45 @@ [[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD [[ -d $LOGDEST ]] || LOGDEST=$PWD @@ -353,7 +356,7 @@ if (( ret != 0 )); then if $temp_chroot; then -@@ -397,3 +503,4 @@ +@@ -398,3 +504,4 @@ else true fi diff --git a/src/chroot-tools/mkarchroot.patch b/src/chroot-tools/mkarchroot.patch index 171b38a..d6f83f1 100644 --- a/src/chroot-tools/mkarchroot.patch +++ b/src/chroot-tools/mkarchroot.patch @@ -1,5 +1,5 @@ ---- mkarchroot.in 2014-03-21 13:59:31.593002027 -0400 -+++ mkarchroot.ugly 2014-03-21 14:23:12.027238102 -0400 +--- mkarchroot.in 2014-05-10 22:10:54.871326879 -0400 ++++ mkarchroot.ugly 2014-05-10 22:10:54.887993222 -0400 @@ -1,4 +1,6 @@ #!/bin/bash +# License: GNU GPLv2 @@ -7,7 +7,7 @@ # 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 # the Free Software Foundation; version 2 of the License. -@@ -65,6 +67,11 @@ +@@ -66,6 +68,11 @@ chmod 0755 "$working_dir" fi @@ -19,7 +19,7 @@ pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \ "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' -@@ -72,7 +79,7 @@ +@@ -73,7 +80,7 @@ echo 'LANG=C' > "$working_dir/etc/locale.conf" echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot" -- cgit v1.2.3-54-g00ecf From 7d74f7ccef61ccb120e920287f6929c12c48d895 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 10 May 2014 22:40:16 -0400 Subject: mkarchroot: creating chroots wasn't working. I later noticed that alfplayer filed a bug report about it: https://labs.parabola.nu/issues/518 --- src/chroot-tools/mkarchroot.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/mkarchroot.patch b/src/chroot-tools/mkarchroot.patch index d6f83f1..9366d92 100644 --- a/src/chroot-tools/mkarchroot.patch +++ b/src/chroot-tools/mkarchroot.patch @@ -14,7 +14,7 @@ +_env=() +while read -r varname; do + _env+=("$varname=${!varname}") -+done < { declare -x | sed -r 's/^declare -x ([^=]*)=.*/\1/' | grep -i '_proxy$'; } ++done < <(declare -x | sed -r 's/^declare -x ([^=]*)=.*/\1/' | grep -i '_proxy$') +env -i "${_env[@]}" \ pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \ "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' -- cgit v1.2.3-54-g00ecf From b31425edf4c1b292280e5d14016611f238372a18 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 11 May 2014 22:45:42 -0400 Subject: Create CHROOTARCH in chroot.conf for when $CARCH != $(uname -m) This is the case on mips, where CARCH is misp64el, but uname -m is mips64. --- src/chroot-tools/arch-nspawn.patch | 14 ++++++++++++-- src/chroot-tools/librechroot | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/arch-nspawn.patch b/src/chroot-tools/arch-nspawn.patch index afdf51a..5e0f10b 100644 --- a/src/chroot-tools/arch-nspawn.patch +++ b/src/chroot-tools/arch-nspawn.patch @@ -1,5 +1,5 @@ ---- arch-nspawn.in 2014-03-21 13:59:31.812992892 -0400 -+++ arch-nspawn 2014-03-21 14:24:23.520619552 -0400 +--- arch-nspawn.in 2014-05-11 00:58:42.030932904 -0400 ++++ arch-nspawn.ugly 2014-05-11 22:33:47.186717386 -0400 @@ -1,4 +1,6 @@ #!/bin/bash +# License: GNU GPLv2 @@ -7,3 +7,13 @@ # 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 # the Free Software Foundation; version 2 of the License. +@@ -103,7 +105,8 @@ + machine_name="${machine_name#-}" + fi + +-exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \ ++CHROOTARCH="$(. $(librelib conf); get_var chroot CHROOTARCH "$CARCH")" ++exec ${CHROOTARCH:+setarch "$CHROOTARCH"} systemd-nspawn -q \ + -D "$working_dir" \ + --machine "$machine_name" \ + "${mount_args[@]}" \ diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index d8e76ac..9e74a62 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -336,6 +336,8 @@ main() { printf '%q ' "${CHROOTEXTRAPKG[@]}" printf ')\n' fi + # TODO: only set CHROOTARCH if $CARCH != $(uname -m) + printf 'CHROOTARCH=%q\n' "$(uname -m)" } > "$copydir"/etc/libretools.d/chroot.conf if [[ $mode != delete ]]; then -- cgit v1.2.3-54-g00ecf