summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xaur36
-rw-r--r--cleansystem14
-rwxr-xr-xfullpkg3
-rwxr-xr-xis_built4
-rwxr-xr-xis_unfree11
-rwxr-xr-xlibremakepkg4
-rwxr-xr-xprtools/prfullpkg4
-rwxr-xr-xupdate-cleansystem24
8 files changed, 84 insertions, 16 deletions
diff --git a/aur b/aur
index 1b17358..b96cb20 100755
--- a/aur
+++ b/aur
@@ -42,28 +42,48 @@ for _pkg in ${@}; do
_pkg="${_pkg%%[<>=]*}"
if [ -f "${_pkg}/PKGBUILD" ]; then
- warning "${_pkg} already existed. skipping..."
- continue
+ warning "${_pkg} already existed."
+
+# Check if we want to diff
+ if [ -z "${DIFFTOOL}" ]; then
+ continue
+ else
+# Store our copy of the PKGBUILD dir
+ _diff="${PWD}/${_pkg}"
+ stdnull "pushd $(mktemp -d /tmp/${_pkg}.XXXX)"
+ msg2 "Downloading PKGBUILD into ${PWD} for diff"
+ fi
fi
msg "Downloading $_pkg..."
- wget -O - -q http://aur.archlinux.org/packages/$_pkg/$_pkg.tar.gz | \
+ wget -O - -q https://aur.archlinux.org/packages/$_pkg/$_pkg.tar.gz | \
tar xzf - >/dev/null 2>&1
- [[ $? -ne 0 ]] && {
+ if [ $? -ne 0 ]; then
error "Couldn't get $_pkg"
continue
- }
+ fi
stdnull "pushd $_pkg"
+ if [ ! -z "$_diff" ]; then
+ msg2 "Diffing files"
+# Diff all files with our difftool
+ for file in *; do
+ ${DIFFTOOL} ${_diff}/${file} ${file}
+ done
+
+# Go back to our copy to continue working
+ stdnull "pushd ${_diff}"
+ fi
+
source PKGBUILD
- pkgbuild-check-nonfree || {
+ if ! pkgbuild-check-nonfree; then
if [ $? -eq 15 ]; then
warning "This PKGBUILD links to known unfree packages"
fi
- }
+ fi
msg2 "Checking license..."
free=0
@@ -84,7 +104,7 @@ for _pkg in ${@}; do
if ! is_built $_dep; then
if ! find ${ABSROOT} -maxdepth 2 -type d -name "$_dep" | egrep "*" >/dev/null ; then
msg2 "$_dep will be get from AUR"
- missing_deps+=($_dep)
+ missing_deps+=($_dep)
fi
else
msg2 "$_dep is on repos"
diff --git a/cleansystem b/cleansystem
index b91bf86..f210416 100644
--- a/cleansystem
+++ b/cleansystem
@@ -6,16 +6,19 @@ bash
binutils
bison
bzip2
+ca-certificates
cloog
coreutils
cracklib
cronie
cryptsetup
+curl
db
dbus-core
device-mapper
dhcpcd
diffutils
+dirmngr
e2fsprogs
expat
fakeroot
@@ -31,8 +34,12 @@ gettext
glib2
glibc
gmp
+gnupg
+gnupg2
+gpgme
grep
groff
+grub
gzip
heirloom-mailx
iana-etc
@@ -44,15 +51,18 @@ isl
jfsutils
kbd
keyutils
+kmod
krb5
less
libarchive
+libassuan
libcap
libfetch
libffi
libgcrypt
libgpg-error
libgssglue
+libksba
libldap
libltdl
libmpc
@@ -60,6 +70,7 @@ libnl
libpcap
libpipeline
libsasl
+libssh2
libtirpc
libtool
libusb
@@ -76,7 +87,6 @@ man-pages
mdadm
mkinitcpio
mkinitcpio-busybox
-module-init-tools
mpfr
nano
ncurses
@@ -89,12 +99,14 @@ pciutils
pcmciautils
pcre
perl
+pinentry
pkg-config
popt
ppl
ppp
procps
psmisc
+pth
readline
reiserfsprogs
run-parts
diff --git a/fullpkg b/fullpkg
index fe74432..bccd816 100755
--- a/fullpkg
+++ b/fullpkg
@@ -27,6 +27,7 @@ done
shift $(( OPTIND - 1 ))
-fullpkg-find "$1" && fullpkg-build -N "$1"
+build_dir="${1:-$(mktemp -d /tmp/fullpkg.XXXXXX)}"
+fullpkg-find "$build_dir" && fullpkg-build -N "$build_dir"
exit 0
diff --git a/is_built b/is_built
index 99b871b..1fa79d2 100755
--- a/is_built
+++ b/is_built
@@ -17,7 +17,7 @@ done
ver=${2}
pkg=${1}
-pver=$(LC_ALL=C pacman -Spdd --print-format "%v" "${pkg}" 2>/dev/null)
+pver=$(LC_ALL=C pacman -Sddp --print-format "%v" "${pkg}" 2>/dev/null)
# if pacman fails or returns nothing
r=$?
@@ -25,7 +25,7 @@ r=$?
result=$(vercmp "${pver}" "${ver}")
-# if vercmp > 1 means our version is bigger
+# if vercmp > 1 means our version is bigger
if [ ${result} -ge 0 -a ${r} -eq 0 ]; then
exit 0
else
diff --git a/is_unfree b/is_unfree
new file mode 100755
index 0000000..f32c193
--- /dev/null
+++ b/is_unfree
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Checks if a package is on blacklist
+
+# fail immediately on error
+set -E
+
+blacklist="$XDG_CONFIG_HOME/libretools/blacklist.txt"
+
+egrep -q "^${1}:" "${blacklist}"
+
+exit $?
diff --git a/libremakepkg b/libremakepkg
index 99ab1a4..44c0d29 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -55,7 +55,7 @@ function usage {
echo ''
echo 'cd to a dir containing a PKGBUILD and run:'
- echo '$0 [options] [-- makechrootpkg args] [-- makepkg args]'
+ echo '$0 [options] [-- makechrootpkg args [-- makepkg args]]'
echo 'This script will build your package on a chroot.'
echo ''
echo 'OPTIONS:'
@@ -118,7 +118,7 @@ fi
unset CLEANFIRST UPDATEFIRST LIBRECHROOT_ARGS
-makechrootpkg -r "$CHROOTDIR" -l "$CHROOT" "$MAKEPKG_ARGS"
+makechrootpkg -d -r "$CHROOTDIR" -l "$CHROOT" $MAKEPKG_ARGS
ev="$?" # exit value
copy_log
diff --git a/prtools/prfullpkg b/prtools/prfullpkg
index dd2ba3a..bbb8d73 100755
--- a/prtools/prfullpkg
+++ b/prtools/prfullpkg
@@ -85,7 +85,7 @@ function find_deps { # Checks ABSROOT and look for target pkg deps. Adds them i
local epoch=${epoch:-0}
local fullver=$(get_fullver ${epoch} ${pkgver} ${pkgrel})
- if is_built "${pkgbase}>=${fullver}"; then
+ if is_built "${pkgbase}" "${fullver}"; then
exit 0 # pkg is built and updated
fi
@@ -316,7 +316,7 @@ fi
if [ $level -eq 0 ]; then
if [ ! -d ${build_dir} ]; then # in case of custom -d option
- mkdir -p ${build_dir}
+ mkdir -p ${build_dir}
else
cleanup # files already there can screw find_deps
fi
diff --git a/update-cleansystem b/update-cleansystem
new file mode 100755
index 0000000..d4ad943
--- /dev/null
+++ b/update-cleansystem
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Updates the cleansystem file
+# Creates a fake Parabola root and prints all packages installable from base
+# and base-devel plus extras
+
+set -E
+
+if [ ! -w / ]; then
+ echo "Run as root."
+ exit 1
+fi
+
+tmpdir=/tmp/cleansystem.${RANDOM}
+
+mkdir -p ${tmpdir}/var/lib/pacman
+
+# We sync first because updating info gets printed to stdout too
+pacman -r ${tmpdir} --config /etc/pacman.conf -Sy
+pacman -r ${tmpdir} \
+ --config /etc/pacman.conf \
+ -Sp --print-format "%n" \
+ base base-devel ${@} | sort > $(dirname $0)/cleansystem
+
+exit $?