summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cleansystem102
-rwxr-xr-xfullpkg7
-rwxr-xr-xlibremakepkg19
-rwxr-xr-xlibrerelease31
-rwxr-xr-xlibrerepkg5
-rwxr-xr-xlibrestage29
6 files changed, 77 insertions, 116 deletions
diff --git a/cleansystem b/cleansystem
index 3f92b95..8da434b 100644
--- a/cleansystem
+++ b/cleansystem
@@ -1,119 +1,55 @@
-acl
-attr
-autoconf
-automake
+bzip2
+filesystem
+initscripts
+licenses-libre
+linux-libre
+pacman
+pacman-mirrorlist-libre
+your-freedom
bash
binutils
-bison
bzip2
-cloog
coreutils
-cracklib
+cronie
cryptsetup
-dash
-db
-dbus-core
-dcron
device-mapper
dhcpcd
diffutils
-distcc
e2fsprogs
-eventlog
-expat
-fakeroot
file
-filesystem
findutils
-flex
gawk
-gcc
-gcc-fortran
gcc-libs
-gcc-objc
-gdbm
-gen-init-cpio
gettext
-glib2
glibc
-gmp
grep
gzip
heirloom-mailx
-iana-etc
-initscripts
-iproute2
+inetutils
iputils
-isl
jfsutils
-kbd
-kernel26-libre
-keyutils
-krb5
less
-libarchive
-libcap
-libedit
-libfetch
-libgcrypt
-libgpg-error
-libgssglue
-libldap
-libmpc
-libnl
-libpcap
libpipeline
-libretools
-libretools
-libsasl
-libtirpc
-libtool
-libusb
-libusb-compat
-licenses-libre
-linux-api-headers
logrotate
lvm2
-m4
-make
+man-db
+man-pages
mdadm
-mkinitcpio
-mkinitcpio-busybox
-module-init-tools
-mpfr
nano
-ncurses
-net-tools
-openssh
-openssl
-pacman
-pacman-mirrorlist-libre
-pam
-patch
pciutils
pcmciautils
-pcre
perl
-pkg-config
-popt
-ppl
ppp
procps
psmisc
-readline
reiserfsprogs
-rp-pppoe
-rsync
sed
shadow
-sudo
sysfsutils
syslog-ng
sysvinit
tar
-tcp_wrappers
texinfo
-tzdata
udev
usbutils
util-linux
@@ -122,5 +58,15 @@ wget
which
wpa_supplicant
xfsprogs
-xz
-zlib
+autoconf
+automake
+bison
+fakeroot
+flex
+gcc
+libtool
+m4
+make
+patch
+pkg-config
+sudo
diff --git a/fullpkg b/fullpkg
index 775ae0c..7e75afc 100755
--- a/fullpkg
+++ b/fullpkg
@@ -340,11 +340,10 @@ if [ ${level} -eq 0 ]; then
touch "${build_dir}"/{log,BUILDORDER}
buildorder="${build_dir}/BUILDORDER"
- if ! (( noupdate )); then
+ if ! noupdate; then
-# Always return true
- msg "Updating pacman db and packages"
- sudo pacman -Syu --noconfirm || true
+ msg "Updating pacman db"
+ sudo pacman -Sy --noconfirm || true
fi
diff --git a/libremakepkg b/libremakepkg
index bac9e30..292e4b5 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -22,6 +22,13 @@
source /etc/libretools.conf
source /etc/makepkg.conf
+# Local vars may differ from chroot's
+LOCALPKGDEST=${PKGDEST}
+LOCALSRCDEST=${SRCDEST}
+LOCALSRCPKGDEST=${SRCPKGDEST}
+
+source ${CHROOTDIR}/${CHROOT}/etc/makepkg.conf
+
function usage { # Display message and exit
echo 'cd to a dir containing a PKGBUILD and run:'
@@ -42,10 +49,14 @@ function usage { # Display message and exit
function buildenv { # Mounts *DEST from makepkg.conf
msg "Building env"
- for mp in ${SRCDEST} ${PKGDEST} ${SRCPKGDEST}; do
- msg2 "binding ${mp} to ${CHROOTDIR}/${CHROOT}${mp}"
- mkdir -p "${CHROOTDIR}/${CHROOT}${mp}"
- mount -o bind ${mp} "${CHROOTDIR}/${CHROOT}${mp}" || exit 1
+ for mp in SRCDEST PKGDEST SRCPKGDEST; do
+# The host system directory
+ lmp=LOCAL${mp}
+
+ msg2 "Binding ${!lmp} to ${CHROOTDIR}/${CHROOT}${!mp}"
+
+ mkdir -p "${CHROOTDIR}/${CHROOT}${!mp}"
+ mount -o bind ${!lmp} "${CHROOTDIR}/${CHROOT}${!mp}" || exit 1
done
}
diff --git a/librerelease b/librerelease
index 56cf856..64f8887 100755
--- a/librerelease
+++ b/librerelease
@@ -46,6 +46,30 @@ function list_packages {
unset repos
}
+function sign_packages {
+ if [ -z "${GPG_AGENT_INFO}" ]; then
+ warning "It's better to use gpg-agent to sign packages in batches"
+ fi
+
+ packages=($(find "${WORKDIR}/staging/" -type f -iname '*.pkg.tar.?z'))
+ for package in ${packages[@]}; do
+ if [ -f "${package}${SIGEXT}" ]; then
+
+ warning "Package signature found, verifying..."
+
+# Verify that the signature is correct, else remove for re-signing
+ if ! gpg --quiet --verify "${package}${SIGEXT}" >/dev/null 2>&1; then
+ error "Failed! Resigning..."
+ rm -f "${package}${SIGEXT}"
+ else
+ continue
+ fi
+ fi
+
+ gpg --default-key "${SIGID}" --output "${package}${SIGEXT}" --detach-sig "${package}"
+ done
+}
+
# Remove everything that's not a package or a signature
function clean_non_packages {
find $WORKDIR/staging/ -type f \
@@ -73,6 +97,13 @@ done
[[ ! -z ${HOOKPRERELEASE} ]] && bash -c "${HOOKPRERELEASE}"
clean_non_packages
+if [ ! -z "${SIGID}" ]; then
+ sign_packages
+else
+ error "Package signing is *required*"
+ exit 1
+fi
+
msg "Uploading packages..."
rsync --recursive \
${dryrun} \
diff --git a/librerepkg b/librerepkg
index 647a7c0..706b603 100755
--- a/librerepkg
+++ b/librerepkg
@@ -36,7 +36,7 @@ source rePKGBUILD
usage() {
echo "cd to a dir with a rePKGBUILD and other file info and run"
- echo "$0 "
+ echo "$0 [makepkg flags]"
echo
echo "This script will repackage an arch package without compiling"
}
@@ -44,6 +44,7 @@ usage() {
while getopts 'h' arg; do
case $arg in
h) usage; exit 0 ;;
+ *) makepkgflags=$@ ;;
esac
done
@@ -58,6 +59,6 @@ msg2 "Updating md5sums"
makepkg -gp rePKGBUILD >> rePKGBUILD
msg "Repackaging using makepkg"
-makepkg -Lcdp rePKGBUILD $@
+makepkg -Lcdp rePKGBUILD ${makepkgflags}
stdnull popd ${tempdir}
diff --git a/librestage b/librestage
index e851dd4..65ee19b 100755
--- a/librestage
+++ b/librestage
@@ -85,17 +85,7 @@ for _arch in ${ARCHES[@]}; do
pkgfile=$(basename ${pkgpath})
- if [ ! -z "${SIGID}" ]; then
- sigpath=${pkgpath}${SIGEXT}
- sigfile=${pkgfile}${SIGEXT}
-
- msg "Signing package with ID ${SIGID}"
- gpg --default-key "${SIGID}" --output ${sigpath} --detach-sig ${pkgpath} || {
- error "Couldn't sign ${pkgfile}, aborting..."
- exit 1
- }
- fi
-
+# TODO refactor this
if [ -e "${pkgpath}" ]; then
msg "Found ${pkgfile}"
@@ -113,15 +103,6 @@ for _arch in ${ARCHES[@]}; do
staged=true
}
- if [ ! -z "${SIGID}" ]; then
- canonical_sig="${WORKDIR}/staging/${_repo}/${pkgfile}${SIGEXT}"
- cp "${sigpath}" "${WORKDIR}/staging/${_repo}/" || {
- error "Can't put ${sigfile} on [staging]"
- exit 1
- } && {
- msg2 "${pkg} signature on [${_repo}]"
- }
- fi
else
ln "${canonical}" "${WORKDIR}/staging/${_repo}/${pkgfile}" || {
error "Can't put ${pkgfile} on [staging]"
@@ -131,14 +112,6 @@ for _arch in ${ARCHES[@]}; do
staged=true
}
- if [ ! -z "${SIGID}" ]; then
- ln "${canonical_sig}" "${WORKDIR}/staging/${_repo}/${sigfile}" || {
- error "Can't put ${sigfile} on [staging]"
- exit 1
- } && {
- msg2 "${pkg} signature on [${_repo}]"
- }
- fi
fi
done
fi