From 7ce7ee03ad70cc246c5ccba549d8edfdc69c0ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 19 Oct 2011 15:18:07 -0300 Subject: Added clarification for makepkg flags use --- librerepkg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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} -- cgit v1.2.2 From d899caa8de20db4b4fca9d74b5f1c077d8008ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Mon, 28 Nov 2011 02:48:23 -0600 Subject: fullpkg noupdate --- fullpkg | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fullpkg b/fullpkg index cf98331..eddf3d5 100755 --- a/fullpkg +++ b/fullpkg @@ -348,11 +348,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 -- cgit v1.2.2 From 1b374dbd360ad90ec5455dbd22f3a9b339dd9c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Thu, 8 Dec 2011 23:09:47 -0600 Subject: cleansystem is base, base-devel and sudo --- cleansystem | 102 ++++++++++++++---------------------------------------------- 1 file changed, 24 insertions(+), 78 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 -- cgit v1.2.2 From b7350ea957eda0f738bdbe7e74586c0c21fc3334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 14 Dec 2011 13:58:35 -0300 Subject: Make libremakepkg bind local makepkg dirs to chroot's --- libremakepkg | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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 } -- cgit v1.2.2 From 54ba056b200a5ef141f8d589a2f45478c6bd8a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 14 Dec 2011 14:45:11 -0300 Subject: Do batch signing * Removed signing code from librestage * Make package signatures mandatory * Make librerelease sign all packages at once * Verify existing signatures before releasing --- librerelease | 31 +++++++++++++++++++++++++++++++ librestage | 29 +---------------------------- 2 files changed, 32 insertions(+), 28 deletions(-) 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/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 -- cgit v1.2.2