From 8addb9ec51a7df7f35a0271ef0cc8b523d82213b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Fri, 12 Aug 2011 03:18:34 -0500 Subject: Added some base packages to cleansystem and fixed some comments --- cleansystem | 3 ++ fullpkg | 94 ++++++++++++++++---------------------------------- librerelease | 2 +- pkgbuild-check-nonfree | 11 +++--- 4 files changed, 39 insertions(+), 71 deletions(-) diff --git a/cleansystem b/cleansystem index 1cf9224..a27643b 100644 --- a/cleansystem +++ b/cleansystem @@ -122,3 +122,6 @@ wpa_supplicant xfsprogs xz zlib +libgssglue +libtirpc + diff --git a/fullpkg b/fullpkg index 6fb580c..6cdae31 100755 --- a/fullpkg +++ b/fullpkg @@ -86,69 +86,50 @@ find_deps() { local repo=${repo:-$(guess_repo)} local pkgbase=${pkgbase:-${pkgname[0]}} -# Provide a default 0 to epoch local epoch=${epoch:-0} local fullver=$(get_fullver ${epoch} ${pkgver} ${pkgrel}) - if is_built "${pkgbase}>=${fullver}"; then -# pkg is built and updated + if is_built "${pkgbase}>=${fullver}"; then # pkg is built and updated exit 0 fi -# greater levels are built first - echo "${level}:${pkgbase}" >> "${build_dir}/BUILDORDER" -# PKGBUILD is already there - if [ -d "${build_dir}/${pkgbase}" ]; then + echo "${level}:${pkgbase}" >> "${build_dir}/BUILDORDER" # greater levels are built first + if [ -d "${build_dir}/${pkgbase}" ]; then # PKGBUILD is already there exit 0 - -# Copy dir to build_dir - else - + else # Copy dir to build_dir cp -r ../${pkgbase}/ ${build_dir}/ - -# to identify repo later - echo "repo=$repo" > "${build_dir}/${pkgbase}/.INFO" + echo "repo=$repo" > "${build_dir}/${pkgbase}/.INFO" # to identify repo later fi -# current package plus a space for every level - msg2 "%${level}s${pkgbase}-${fullver}" + msg2 "%${level}s${pkgbase}-${fullver}" # current package plus a space for every level -## Check next levels - declare -i next_level=$level+1 + declare -i next_level=$level+1 ## Check next levels -# All deps in separate line, only once, without version. deps=$(echo "${depends[@]} ${makedepends[@]}" | \ sed "s/[=<>]\+[^ ]\+//g" | \ tr ' ' "\n" | \ - sort -u) + sort -u) # All deps in separate line, only once, without version. for _dep in ${deps[@]}; do local found=false -# TODO ask toru where the pkgbuild is - for _repo in ${REPOS[@]}; do + for _repo in ${REPOS[@]}; do # TODO ask toru where the pkgbuild is -# ABSROOT/repo/package - if [ -e "${ABSROOT}/${_repo}/${_dep}/PKGBUILD" ]; then + if [ -e "${ABSROOT}/${_repo}/${_dep}/PKGBUILD" ]; then # ABSROOT/repo/package pushd "${ABSROOT}/${_repo}/${_dep}" > /dev/null -# run this cmd on dep's PKGBUILD dir - $0 -c -d ${build_dir} -l ${next_level} -# probable circular deps - [ $? -eq 20 ] && return 20 + $0 -c -d ${build_dir} -l ${next_level} # run this cmd on dep's PKGBUILD dir + [ $? -eq 20 ] && return 20 # probable circular deps popd > /dev/null local found=true -# found, end cycle - break 1 + break 1 # found, end cycle fi done - - if ( ${found} ); then -# go to next dep + if ${found}; then # go to next dep continue 1 else echo "dep_not_found:$_dep" >> $build_dir/log @@ -168,8 +149,7 @@ find_deps() { __build() { pushd ${build_dir} > /dev/null -# greater levels must be built first - build_packages=($(sort -gr $buildorder | cut -d: -f2)) + build_packages=($(sort -gr $buildorder | cut -d: -f2)) # greater levels must be built first while [ ${#build_packages[@]} -ge 1 ]; do pushd $build_dir/${build_packages[0]} > /dev/null @@ -179,34 +159,27 @@ __build() { msg2 "Checking for non free deps" pkgbuild-check-nonfree || { -# this error means nonfree others means fail. - if [ $? -eq 15 ]; then + + if [ $? -eq 15 ]; then # this error means nonfree others means fail. echo "nonfree:$(basename $PWD)" >> $build_dir/log -# take out package from $buildorder - remove_buildorder "$(basename $PWD)" $buildorder + remove_buildorder "$(basename $PWD)" $buildorder # take out package from $buildorder -# build next package - continue + continue # build next package fi } msg2 "Building $(basename $PWD)" -# this buildcmd is on libretools.conf - $FULLBUILDCMD; r=$? - + $FULLBUILDCMD; r=$? # this buildcmd is on libretools.conf case $r in -## Succesfull build - 0) - + 0) ## Succesfull build plain "The build was succesful." if source .INFO && [ -n $repo ]; then -# Calls a local release script if it's used - if [ ! -z $HOOKLOCALRELEASE ]; then + if [ ! -z $HOOKLOCALRELEASE ]; then # Calls a local release script find -name "*.pkg.tar.?z" -print0 | xargs -0 $HOOKLOCALRELEASE $repo fi @@ -220,8 +193,7 @@ __build() { echo "built:$(basename $PWD)" >> $build_dir/log ;; -## Build failed - *) + *) ## Build failed error "There were errors while trying to build the package." echo "failed:$(basename $PWD)" >> $build_dir/log ;; @@ -229,8 +201,7 @@ __build() { remove_buildorder "${build_packages[0]}" $buildorder || true -# which is next package? - build_packages=($(sort -gr $buildorder | cut -d: -f2)) + build_packages=($(sort -gr $buildorder | cut -d: -f2)) # find out next package popd > /dev/null done @@ -306,10 +277,9 @@ while getopts 'ha:b:cCd:l:nm:r:' arg; do esac done -if [[ ! ${build_only} ]]; then +if ! (( ${build_only} )); then -# Check if we are actually on a build directory. Do this early. - if [ ! -r PKGBUILD ]; then + if [ ! -r PKGBUILD ]; then # Check if we are actually on a build directory. Do this early. error "This isn't a build directory" usage fi @@ -322,19 +292,15 @@ fi if [ $level -eq 0 ]; then -# use -d option or else mktemp - build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} + build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} # use -d option or else mktemp -# in case of custom -d option - if [ ! -d ${build_dir} ]; then + if [ ! -d ${build_dir} ]; then # in case of custom -d option mkdir -p ${build_dir} else -# files already there can screw find_deps - cleanup + cleanup # files already there can screw find_deps fi -# make files for log and buildorder - touch ${build_dir}/{log,BUILDORDER} ${ban_file} + touch ${build_dir}/{log,BUILDORDER} ${ban_file} # make files for log and buildorder buildorder=${build_dir}/BUILDORDER if ! (( noupdate )); then diff --git a/librerelease b/librerelease index 7df5184..5283114 100755 --- a/librerelease +++ b/librerelease @@ -61,7 +61,7 @@ while getopts 'hlc' arg; do case $arg in h) usage; exit 0 ;; l) list_packages; exit 0 ;; - c) clean_packages; exit $? ;; + c) clean; exit $? ;; esac done diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree index 55976a8..fd7b69e 100755 --- a/pkgbuild-check-nonfree +++ b/pkgbuild-check-nonfree @@ -19,6 +19,8 @@ # You should have received a copy of the GNU General Public License # along with Parabola. If not, see . +source /etc/libretools.conf + function in_array { # usage : in_array( $needle, $haystack ) [[ $2 ]] || return 1 # Not found @@ -30,10 +32,9 @@ function in_array { # usage : in_array( $needle, $haystack ) return 1 # Not Found } - function get_blacklist { # Download the blacklist. - pushd $XDG_CONFIG_HOME/libretools/ >/dev/null + pushd "$XDG_CONFIG_HOME/libretools" >/dev/null msg "Downloading the blacklist of proprietary software packages." wget -N -q -O blacklist.txt "${BLACKLIST}" 2>/dev/null || { [ -e $XDG_CONFIG_HOME/libretools/blacklist.txt ] || { @@ -47,7 +48,7 @@ function get_blacklist { # Download the blacklist. function check_deps { # Check wheter a package depends on non-free - pushd $XDG_CONFIG_HOME/libretools/ >/dev/null + pushd "$XDG_CONFIG_HOME/libretools/" >/dev/null local unfree=($(cut -d: -f1 blacklist.txt)) # pkgname:free-replacement:comments local freerep=($(cut -d: -f2 blacklist.txt)) # pkgname:free-replacement:comments popd >/dev/null @@ -72,8 +73,6 @@ function check_deps { # Check wheter a package depends on non-free done } -source /etc/libretools.conf - if [ -e $XDG_CONFIG_HOME/libretools/libretools.conf ]; then source $XDG_CONFIG_HOME/libretools/libretools.conf fi @@ -89,7 +88,7 @@ else fi if [ ! -d "$XDG_CONFIG_HOME/libretools" ]; then - mkdir -p $XDG_CONFIG_HOME/libretools + mkdir -p "$XDG_CONFIG_HOME/libretools" fi get_blacklist -- cgit v1.1-4-g5e80 From b569d33a5f6ecbd77d7a4129d4b69c26a7b0e7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Fri, 26 Aug 2011 15:59:50 -0300 Subject: Removed PATCHDIR --- libretools.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretools.conf b/libretools.conf index c6a8245..3010595 100644 --- a/libretools.conf +++ b/libretools.conf @@ -63,7 +63,7 @@ TORUPATH=/var/lib/libretools/toru # Checks if vars aren't empty for VAR in CHROOTDIR CHROOT CACHEDIR PARABOLAHOST LIBREDESTDIR \ - BLACKLIST WORKDIR PATCHDIR REPOS ARCHES ABSLIBREGIT \ + BLACKLIST WORKDIR REPOS ARCHES ABSLIBREGIT \ COMMITCMD DIFFTOOL FULLBUILDCMD; do ret=0 -- cgit v1.1-4-g5e80 From b8eaf0cced1693e51d89db691664e66509f7549b Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Wed, 7 Sep 2011 11:20:47 -0300 Subject: Added untested librerelease dry-run --- librerelease | 8 ++++++-- mips64el/mipsrelease | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/librerelease b/librerelease index 5283114..0bad896 100755 --- a/librerelease +++ b/librerelease @@ -34,6 +34,7 @@ function usage { echo "$(gettext " -h this message.")" echo "$(gettext " -l only list packages but not upload them.")" echo "$(gettext " -c clean packages on $WORKDIR/staging.")" + echo "$(gettext " -n dry-run")" } function list_packages { @@ -52,16 +53,18 @@ function clean_non_packages { -delete } -# Clean everything +# Clean everything if not on dry-run mode function clean { + [ -z ${dryrun} ] && \ find ${WORKDIR}/staging/ -type f -delete } -while getopts 'hlc' arg; do +while getopts 'hlcn' arg; do case $arg in h) usage; exit 0 ;; l) list_packages; exit 0 ;; c) clean; exit $? ;; + n) dryrun="--dry-run" ;; esac done @@ -72,6 +75,7 @@ done clean_non_packages msg "Uploading packages..." rsync --recursive \ + ${dryrun} \ --copy-links \ --hard-links \ --partial \ diff --git a/mips64el/mipsrelease b/mips64el/mipsrelease index b8ff01d..1a4aade 100755 --- a/mips64el/mipsrelease +++ b/mips64el/mipsrelease @@ -10,6 +10,8 @@ source /etc/makepkg.conf source /etc/libretools.conf +libretoolsdir="$(dirname $0)/../" + usage() { echo "$0 repo package1 [ package2 ... packageN ]" echo @@ -53,4 +55,6 @@ pushd ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null tar xvf $SRCPKGDEST/${pkgbase:-${pkgname[0]}}-${fullver}${SRCEXT} popd >/dev/null +$libretoolsdir/chcleanup || true + exit $? -- cgit v1.1-4-g5e80 From 32acbf2d80898a1139325f3d058753b125c0bd7e Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Wed, 7 Sep 2011 11:31:26 -0300 Subject: Added a little bit of documentation to fullpkg, please read. --- doc/fullpkg | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/fullpkg diff --git a/doc/fullpkg b/doc/fullpkg new file mode 100644 index 0000000..5645fae --- /dev/null +++ b/doc/fullpkg @@ -0,0 +1,7 @@ +# FullPKG +FullPKG is a tool to build a package from ABS, find all needed dependencies +along the way and build them too if necessary. + +## Before running fullpkg +Update PKGBUILD path cache by running `toru -u ` on your ABS root. Once +for each repo you'll be using. -- cgit v1.1-4-g5e80 From 154fc744d8c94c1c50bc57fa01e3ac16e939813b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Mon, 19 Sep 2011 11:00:22 -0300 Subject: *Do not* maintain user permissions It causes 403 errors when overzealous umasks are set --- librerelease | 2 ++ 1 file changed, 2 insertions(+) diff --git a/librerelease b/librerelease index 5283114..55a1270 100755 --- a/librerelease +++ b/librerelease @@ -72,6 +72,8 @@ done clean_non_packages msg "Uploading packages..." rsync --recursive \ + --no-group \ + --no-perms \ --copy-links \ --hard-links \ --partial \ -- cgit v1.1-4-g5e80 From 1cc99571dd8b5f250909025a1c4df73510087899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Mon, 19 Sep 2011 11:01:54 -0300 Subject: New upload dir --- libretools.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretools.conf b/libretools.conf index 3010595..05971d3 100644 --- a/libretools.conf +++ b/libretools.conf @@ -35,7 +35,7 @@ HOOKPRERELEASE="ssh -fN parabola" ## Server destination of libre packages # Don't change unless you know what you're doing and you won't screw # anything ;) -LIBREDESTDIR=/home/parabolavnx/parabolagnulinux.org/repo +LIBREDESTDIR=/srv/http/repo/public ## ABSLibre ABSLIBREGIT=http://projects.parabolagnulinux.org/abslibre.git -- cgit v1.1-4-g5e80