opensuse_leap_15.sh 1.2 KB

1234567891011121314151617181920
  1. #!/bin/bash -xe
  2. PRETTY_NAME=$(${DOCKER_EXEC} cat /etc/os-release | awk -F[=\"] '/^PRETTY_NAME=/ {print $3}')
  3. PRETTY_NAME=${PRETTY_NAME# }
  4. PRETTY_NAME=${PRETTY_NAME% }
  5. ${DOCKER_EXEC} zypper -n ar -f -G http://download.opensuse.org/repositories/devel:/tools/${PRETTY_NAME// /_}/devel:tools.repo
  6. ${DOCKER_EXEC} zypper -n ar -f -G http://download.opensuse.org/repositories/devel:/libraries:/c_c++/${PRETTY_NAME// /_}/devel:libraries:c_c++.repo
  7. ${DOCKER_EXEC} zypper -n ref
  8. ${DOCKER_EXEC} zypper -n update
  9. ${DOCKER_EXEC} zypper -n install rpmdevtools
  10. ${DOCKER_EXEC} rpmdev-setuptree
  11. ${DOCKER_EXEC} /bin/bash -c "zypper -n install --force-resolution \$(rpmspec --buildrequires -q pbspro.spec)"
  12. ${DOCKER_EXEC} ./autogen.sh
  13. ${DOCKER_EXEC} ./configure
  14. ${DOCKER_EXEC} make dist
  15. ${DOCKER_EXEC} /bin/bash -c 'cp -fv pbspro-*.tar.gz /root/rpmbuild/SOURCES/'
  16. ${DOCKER_EXEC} /bin/bash -c 'CFLAGS="-g -O2 -Wall -Werror" rpmbuild -bb pbspro.spec'
  17. ${DOCKER_EXEC} /bin/bash -c 'zypper --no-gpg-checks -n install /root/rpmbuild/RPMS/x86_64/pbspro-server-??.*.x86_64.rpm'
  18. ${DOCKER_EXEC} /bin/bash -c 'sed -i "s@PBS_START_MOM=0@PBS_START_MOM=1@" /etc/pbs.conf'
  19. ${DOCKER_EXEC} /etc/init.d/pbs start
  20. ${DOCKER_EXEC} zypper -n install python-pip sudo which net-tools man time.x86_64