diff --git a/dist/debian/build_deb.sh b/dist/debian/build_deb.sh index 46b3902..26e5f25 100755 --- a/dist/debian/build_deb.sh +++ b/dist/debian/build_deb.sh @@ -28,16 +28,6 @@ is_redhat_variant() { is_debian_variant() { [ -f /etc/debian_version ] } -pkg_install() { - if is_redhat_variant; then - sudo yum install -y $1 - elif is_debian_variant; then - sudo apt-get install -y $1 - else - echo "Requires to install following command: $1" - exit 1 - fi -} if [ ! -e scylla-jmx/SCYLLA-RELOCATABLE-FILE ]; then echo "do not directly execute build_rpm.sh, use reloc/build_rpm.sh instead." @@ -53,37 +43,6 @@ if [ ! -f "$RELOC_PKG" ]; then exit 1 fi -if is_debian_variant; then - sudo apt-get -y update -fi -# this hack is needed since some environment installs 'git-core' package, it's -# subset of the git command and doesn't works for our git-archive-all script. -if is_redhat_variant && [ ! -f /usr/libexec/git-core/git-submodule ]; then - sudo yum install -y git -fi -if [ ! -f /usr/bin/git ]; then - pkg_install git -fi -if [ ! -f /usr/bin/python ]; then - pkg_install python -fi -if [ ! -f /usr/sbin/debuild ]; then - pkg_install devscripts -fi -if [ ! -f /usr/bin/dh_testdir ]; then - pkg_install debhelper -fi -if [ ! -f /usr/bin/fakeroot ]; then - pkg_install fakeroot -fi - -if [ "$ID" = "ubuntu" ] && [ ! -f /usr/share/keyrings/debian-archive-keyring.gpg ]; then - sudo apt-get install -y debian-archive-keyring -fi -if [ "$ID" = "debian" ] && [ ! -f /usr/share/keyrings/ubuntu-archive-keyring.gpg ]; then - sudo apt-get install -y ubuntu-archive-keyring -fi - RELOC_PKG=$(readlink -f $RELOC_PKG) mv scylla-jmx/debian debian diff --git a/dist/redhat/build_rpm.sh b/dist/redhat/build_rpm.sh index 7564649..4e7e8cf 100755 --- a/dist/redhat/build_rpm.sh +++ b/dist/redhat/build_rpm.sh @@ -24,14 +24,6 @@ done is_redhat_variant() { [ -f /etc/redhat-release ] } -pkg_install() { - if is_redhat_variant; then - sudo yum install -y $1 - else - echo "Requires to install following command: $1" - exit 1 - fi -} if [ ! -e SCYLLA-RELOCATABLE-FILE ]; then echo "do not directly execute build_rpm.sh, use reloc/build_rpm.sh instead." @@ -47,13 +39,6 @@ if [ ! -f "$RELOC_PKG" ]; then exit 1 fi -if [ ! -f /usr/bin/rpmbuild ]; then - pkg_install rpm-build -fi -if [ ! -f /usr/bin/git ]; then - pkg_install git -fi - SCYLLA_VERSION=$(cat SCYLLA-VERSION-FILE) SCYLLA_RELEASE=$(cat SCYLLA-RELEASE-FILE) VERSION=$SCYLLA_VERSION-$SCYLLA_RELEASE