From 5fe233209d9db31cc176edbcc76f9fe801c5eba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Mon, 6 Feb 2012 09:46:21 -0600 Subject: librechroot: -r option creates empty repo librerelease: exit with error if signing fails --- fullpkg-find | 0 librechroot | 6 +++++- librerelease | 9 +++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) mode change 100644 => 100755 fullpkg-find diff --git a/fullpkg-find b/fullpkg-find old mode 100644 new mode 100755 diff --git a/librechroot b/librechroot index 31516ac..dfeabb0 100755 --- a/librechroot +++ b/librechroot @@ -83,8 +83,12 @@ EOF function clean_repo { msg "Cleaning repo for chroot: ${CHROOTDIR}/${CHROOTNAME}" if [ -d "${CHROOTDIR}/${CHROOTNAME}/repo" ]; then - rm -rf "${CHROOTDIR}/${CHROOTNAME}/repo" + find "${CHROOTDIR}/${CHROOTNAME}/repo/" -mindepth 1 -delete + else + mkdir -p "${CHROOTDIR}/${CHROOTNAME}/repo" fi + bsdtar -czf "${CHROOTDIR}/${CHROOTNAME}/repo/repo.db.tar.gz" -T /dev/null + ln -s "repo.db.tar.gz" "${CHROOTDIR}/${CHROOTNAME}/repo/repo.db" } source /etc/libretools.conf diff --git a/librerelease b/librerelease index f31bc3a..3021393 100755 --- a/librerelease +++ b/librerelease @@ -72,7 +72,12 @@ function sign_packages { fi msg2 "Signing ${package}..." - gpg --default-key "${SIGID}" --output "${package}${SIGEXT}" --detach-sig "${package}" + gpg --default-key "${SIGID}" --output "${package}${SIGEXT}" \ + --detach-sig "${package}" || { + error "Signing failed" + exit 2 + } + done } @@ -110,7 +115,7 @@ done clean_non_packages if [ ! -z "${SIGID}" ]; then sign_packages -else +else error "Package signing is *required*" exit 1 fi -- cgit v1.1-4-g5e80 From 8cb36c9e18a9a2d48c2151ccf30ac57df20ec38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Wed, 8 Feb 2012 10:34:04 -0600 Subject: librechroot: use update-cleansystem. update-cleansystem: writes to /etc/libretools.d/cleansystem. --- librechroot | 10 +++++----- update-cleansystem | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/librechroot b/librechroot index dfeabb0..0398a0f 100755 --- a/librechroot +++ b/librechroot @@ -24,14 +24,15 @@ function usage { + echo "" echo "Usage: $0 [options] [chrootname]" echo "Use it as root." - echo '' + echo "" echo "Default chroot name: $CHROOT" echo "Default chrootdir: $CHROOTDIR" - echo '' + echo "" echo "OPTIONS:" - echo '' + echo "" echo " -c : clean the chroot using pacman" echo " only 'base', 'base-devel' and 'sudo' on chroot" echo " -d : use instead of default" @@ -43,9 +44,8 @@ function usage { } function clean_chroot { # Clean packages with pacman - msg "Cleaning chroot: ${CHROOTDIR}/${CHROOTNAME}" - + update-cleansystem cp "/etc/libretools.d/cleansystem" "${CHROOTDIR}/${CHROOTNAME}/cleansystem" (cat < $(dirname $0)/cleansystem + base base-devel ${@} | sort > /etc/libretools.d/cleansystem exit $? -- cgit v1.1-4-g5e80 From 8aed527e5a5a4957adc79b5270cf46b20b66d92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Wed, 8 Feb 2012 10:35:47 -0600 Subject: cleansystem: file not needed anymore, use update-cleansystem. --- cleansystem | 131 ------------------------------------------------------------ 1 file changed, 131 deletions(-) delete mode 100644 cleansystem diff --git a/cleansystem b/cleansystem deleted file mode 100644 index f210416..0000000 --- a/cleansystem +++ /dev/null @@ -1,131 +0,0 @@ -acl -attr -autoconf -automake -bash -binutils -bison -bzip2 -ca-certificates -cloog -coreutils -cracklib -cronie -cryptsetup -curl -db -dbus-core -device-mapper -dhcpcd -diffutils -dirmngr -e2fsprogs -expat -fakeroot -file -filesystem -findutils -flex -gawk -gcc -gcc-libs -gdbm -gettext -glib2 -glibc -gmp -gnupg -gnupg2 -gpgme -grep -groff -grub -gzip -heirloom-mailx -iana-etc -inetutils -initscripts -iproute2 -iputils -isl -jfsutils -kbd -keyutils -kmod -krb5 -less -libarchive -libassuan -libcap -libfetch -libffi -libgcrypt -libgpg-error -libgssglue -libksba -libldap -libltdl -libmpc -libnl -libpcap -libpipeline -libsasl -libssh2 -libtirpc -libtool -libusb -libusb-compat -licenses-libre -linux-api-headers -linux-libre -logrotate -lvm2 -m4 -make -man-db -man-pages -mdadm -mkinitcpio -mkinitcpio-busybox -mpfr -nano -ncurses -openssl -pacman -pacman-mirrorlist-libre -pam -patch -pciutils -pcmciautils -pcre -perl -pinentry -pkg-config -popt -ppl -ppp -procps -psmisc -pth -readline -reiserfsprogs -run-parts -sed -shadow -sudo -sysfsutils -sysvinit -tar -texinfo -tzdata -udev -usbutils -util-linux -vi -wget -which -wpa_supplicant -xfsprogs -xz -your-freedom -zlib -- cgit v1.1-4-g5e80 From fd73476296f589bb5fbf52be54764e46553aa41c Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 10 Feb 2012 14:36:12 +0000 Subject: Fix the permissions so the user won't get access denied error when they try to install the package. --- librerelease | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/librerelease b/librerelease index 3021393..e1bf210 100755 --- a/librerelease +++ b/librerelease @@ -120,6 +120,14 @@ else exit 1 fi +# Make the permissions of the packages 644 otherwize the user will get access +# denied error when they try to download (rsync --no-perms doesn't seem to +# work). +for file in ${WORKDIR}/staging/* +do + chmod 644 "${file}" # Now you will never access deny me again! HAHAHAHAHAHA! +done + msg "Uploading packages..." rsync --recursive \ ${dryrun} \ -- cgit v1.1-4-g5e80 From bb7f637b5c5fe7df671d374d2b8547f2431bad82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Fri, 10 Feb 2012 11:57:22 -0300 Subject: ;) --- librerelease | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/librerelease b/librerelease index e1bf210..bac5b88 100755 --- a/librerelease +++ b/librerelease @@ -123,10 +123,8 @@ fi # Make the permissions of the packages 644 otherwize the user will get access # denied error when they try to download (rsync --no-perms doesn't seem to # work). -for file in ${WORKDIR}/staging/* -do - chmod 644 "${file}" # Now you will never access deny me again! HAHAHAHAHAHA! -done +find ${WORKDIR}/staging -type f -exec chmod 644 {} \; +find ${WORKDIR}/staging -type d -exec chmod 755 {} \; msg "Uploading packages..." rsync --recursive \ -- cgit v1.1-4-g5e80