From 60c5824ff991be64664b504adc38b8ac17aa9313 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 15 Jan 2015 11:09:51 +0900 Subject: [PATCH] apt: Drop cowbuilder support Because pbuilder + tmpfs is faster than cowbuilder. --- package/apt/build-in-clean-room.sh | 114 ----------------------------- 1 file changed, 114 deletions(-) diff --git a/package/apt/build-in-clean-room.sh b/package/apt/build-in-clean-room.sh index 622d9c84b..46f40c8ac 100755 --- a/package/apt/build-in-clean-room.sh +++ b/package/apt/build-in-clean-room.sh @@ -151,120 +151,6 @@ build_by_pbuilder() run_sudo rm -fr $builddir } -build_by_cowbuilder() -{ - architecture=$1 - code_name=$2 - source_dir=${script_base_dir}/../.. - case ${code_name} in - wheezy|jessie|unstable) - distribution=debian - component=main - ;; - *) - distribution=ubuntu - component=universe - ;; - esac - status=stable - package_initial=$(echo ${PACKAGE} | sed -e 's/\(.\).*/\1/') - pool_dir=${script_base_dir}/${distribution}/${status}/pool - pool_dir=${pool_dir}/${code_name}/${component}/${package_initial}/${PACKAGE} - basecow=$CHROOT_BASE/$code_name-$architecture-base.cow - builddir=${script_base_dir}/$code_name-$architecture - aptcache_dir=$CHROOT_BASE/aptcache/$code_name-$architecture - - run_sudo mkdir -p $aptcache_dir - - OPTS=( ) - OPTS+=( --distribution "$code_name" ) - OPTS+=( --architecture "$architecture" ) - OPTS+=( --basepath "$basecow" ) - OPTS+=( --aptcache "$aptcache_dir" ) - case $code_name in - lucid) - OPTS+=( --components 'main universe' ) - MIRROR=http://old-release.archive.ubuntu.com/ubuntu - OPTS+=( --mirror "$MIRROR" ) - OPTS+=( --othermirror "deb $MIRROR $code_name-security main universe") - OPTS+=( --debootstrapopts --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg ) - ;; - precise|trusty) - OPTS+=( --components 'main universe' ) - MIRROR=http://jp.archive.ubuntu.com/ubuntu - OPTS+=( --mirror "$MIRROR" ) - OPTS+=( --othermirror "deb $MIRROR $code_name-security main universe") - OPTS+=( --debootstrapopts --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg ) - ;; - wheezy|jessie) - MIRROR=http://ftp.jp.debian.org/debian - OPTS+=( --mirror "$MIRROR" ) - OPTS+=( --othermirror "deb http://security.debian.org $code_name/updates main") - ;; - unstable|*) - MIRROR=http://ftp.jp.debian.org/debian - OPTS+=( --mirror "$MIRROR" ) - esac - if [ ! -d $basecow ] ; then - run_sudo cowbuilder --create "${OPTS[@]}" - fi - run_sudo cowbuilder --update "${OPTS[@]}" - - mkdir -p $builddir - run mkdir -p $pool_dir - run echo 'Options +Indexes' > ${script_base_dir}/${distribution}/.htaccess - run tar xf $source_dir/${PACKAGE}-${VERSION}.tar.gz -C $builddir - ( cd $builddir && \ - run ln -sf ../../../${PACKAGE}-${VERSION}.tar.gz \ - ${PACKAGE}_${VERSION}.orig.tar.gz - ) - run cp -rp ${source_dir}/package/debian $builddir/${PACKAGE}-${VERSION}/ - - case $code_name in - lucid) - sed -i \ - -e 's/ruby (>= 1:1.9.3)/ruby1.9.1 (>= 1.9.1)/g' \ - -e 's/ruby-dev (>= 1:1.9.3)/ruby1.9.1-dev (>= 1.9.1)/g' \ - -e 's/debhelper (>= 9)/debhelper (>= 7)/' \ - -e '/libev-dev/d' \ - -e '/ruby-gnome2-dev/d' \ - -e '/ruby-glib2/d' \ - $builddir/${PACKAGE}-${VERSION}/debian/control - sed -i \ - -e '/--enable-ruby-milter/i \\t\t--with-ruby=/usr/bin/ruby1.9.1 \\' \ - -e 's/ruby -rrbconfig/ruby1.9.1 -rrbconfig/g' \ - -e 's,=/run/,=/var/run/,' \ - -e 's,=unix:/run/,=unix:/var/run/,' \ - $builddir/${PACKAGE}-${VERSION}/debian/rules - sed -i -e 's/9/7/' $builddir/${PACKAGE}-${VERSION}/debian/compat - sed -i -e 's,usr/lib/\*,usr/lib,' $builddir/${PACKAGE}-${VERSION}/debian/*.install - sed -i -e 's,^# ,,' $builddir/${PACKAGE}-${VERSION}/debian/ruby-milter-core.install - ;; - precise) - sed -i \ - -e 's/ruby (>= 1:1.9.3)/ruby1.9.1 (>= 1.9.1)/g' \ - -e 's/ruby-dev (>= 1:1.9.3)/ruby1.9.1-dev (>= 1.9.1)/g' \ - -e '/ruby-gnome2-dev/d' \ - -e '/ruby-glib2/d' \ - $builddir/${PACKAGE}-${VERSION}/debian/control - sed -i \ - -e '/--enable-ruby-milter/i \\t\t--with-ruby=/usr/bin/ruby1.9.1 \\' \ - -e 's/ruby -rrbconfig/ruby1.9.1 -rrbconfig/g' \ - $builddir/${PACKAGE}-${VERSION}/debian/rules - sed -i -e 's,^# ,,' $builddir/${PACKAGE}-${VERSION}/debian/ruby-milter-core.install - ;; - *) - ;; - esac - ( cd $builddir/${PACKAGE}-${VERSION} && \ - run_sudo pdebuild \ - --pbuilder cowbuilder --buildresult ../../${pool_dir}/ \ - -- "${OPTS[@]}" - ) - run_sudo chown `id -u`:`id -g` -R $pool_dir/ - run_sudo rm -fr $builddir -} - for architecture in $ARCHITECTURES; do for code_name in $CODES; do if test "$parallel" = "yes"; then