Skip to content

Commit

Permalink
Remove execute bit on all files in git repo (Submitty#2182)
Browse files Browse the repository at this point in the history
* commit changes

* remove execute permission bits from some files

* remove execute bit on all files in git

* Use bash/python3 for calling things directly in git

* Fix broken path

* revert change of git permissions

* permissions
  • Loading branch information
MasterOdin authored and bmcutler committed Jun 17, 2018
1 parent 85ebac2 commit 5fe692a
Show file tree
Hide file tree
Showing 58 changed files with 28 additions and 65 deletions.
Empty file modified .setup/CONFIGURE_SUBMITTY.py
100755 → 100644
Empty file.
8 changes: 1 addition & 7 deletions .setup/INSTALL_SUBMITTY_HELPER.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ if [ "${WORKER}" == 0 ]; then
# pop the first argument from the list of command args
shift
# pass any additional command line arguments to the run test suite
${SUBMITTY_INSTALL_DIR}/test_suite/integrationTests/run.py "$@"
python3 ${SUBMITTY_INSTALL_DIR}/test_suite/integrationTests/run.py "$@"

echo -e "\nCompleted Autograding Test Suite\n"
fi
Expand Down Expand Up @@ -806,9 +806,3 @@ else
sudo -H -u ${HWCRON_USER} ${SUBMITTY_INSTALL_DIR}/sbin/shipper_utils/update_and_install_workers.py
fi
fi

# set filemode to false, so that changes to file permissions in the
# git repository will be ignored for future diffs/commits
pushd ${SUBMITTY_REPOSITORY}
git config --local core.filemode false
popd > /dev/null
Empty file modified .setup/bin/MatlabInstall.sh
100755 → 100644
Empty file.
Empty file modified .setup/bin/code_watcher.py
100755 → 100644
Empty file.
Empty file modified .setup/bin/create_untrusted_users.py
100755 → 100644
Empty file.
3 changes: 1 addition & 2 deletions .setup/bin/partial_reset.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def main():
os.system("mkdir -p {}/courses".format(SUBMITTY_DATA_DIR))
os.system("mkdir -p {}/instructors".format(SUBMITTY_DATA_DIR))
os.system("ls /home | sort > {}/instructors/valid".format(SUBMITTY_DATA_DIR))
os.system("{}/.setup/INSTALL_SUBMITTY.sh".format(SUBMITTY_INSTALL_DIR))
os.system("bash {}/.setup/INSTALL_SUBMITTY.sh".format(SUBMITTY_INSTALL_DIR))
distro = platform.linux_distribution()[0].lower()
if os.path.isdir(os.path.join(CURRENT_PATH, "..", "..", ".vagrant")):
os.system("rm -rf {}/logs".format(SUBMITTY_DATA_DIR))
Expand All @@ -100,7 +100,6 @@ def main():
os.system('mkdir {}/.vagrant/{}/logs'.format(SUBMITTY_REPOSITORY, distro))
os.system('ln -s {}/.vagrant/{}/logs {}'.format(SUBMITTY_REPOSITORY, distro, SUBMITTY_DATA_DIR))


os.system('mkdir {}/.vagrant/{}/logs/autograding'.format(SUBMITTY_REPOSITORY, distro))
os.system('mkdir {}/.vagrant/{}/logs/access'.format(SUBMITTY_REPOSITORY, distro))
os.system('mkdir {}/.vagrant/{}/logs/site_errors'.format(SUBMITTY_REPOSITORY, distro))
Expand Down
Empty file modified .setup/bin/reset_system.py
100755 → 100644
Empty file.
Empty file modified .setup/bin/setup_sample_courses.py
100755 → 100644
Empty file.
Empty file modified .setup/common/common_env.sh
100755 → 100644
Empty file.
Empty file modified .setup/data/courses.yml
100755 → 100644
Empty file.
Empty file modified .setup/data/courses/development.yml
100755 → 100644
Empty file.
Empty file modified .setup/data/courses/sample.yml
100755 → 100644
Empty file.
Empty file modified .setup/data/courses/tutorial.yml
100755 → 100644
Empty file.
Empty file modified .setup/distro_setup/setup_distro.sh
100755 → 100644
Empty file.
12 changes: 6 additions & 6 deletions .setup/install_system.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fi
# USERS SETUP
#################

${SUBMITTY_REPOSITORY}/.setup/bin/create_untrusted_users.py
python3 ${SUBMITTY_REPOSITORY}/.setup/bin/create_untrusted_users.py

# Special users and groups needed to run Submitty
#
Expand Down Expand Up @@ -467,7 +467,7 @@ echo Beginning Submitty Setup
#If in worker mode, run configure with --worker option.
if [ ${WORKER} == 1 ]; then
echo Running configure submitty in worker mode
${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py --worker
python3 ${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py --worker
else
if [ ${VAGRANT} == 1 ]; then
# This should be set by setup_distro.sh for whatever distro we have, but
Expand All @@ -482,10 +482,10 @@ else
${SUBMISSION_URL}
${GIT_URL}/git
1" | ${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py --debug
1" | python3 ${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py --debug

else
${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py
python3 ${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py
fi
fi

Expand All @@ -509,7 +509,7 @@ if [ ${WORKER} == 0 ]; then
fi

echo Beginning Install Submitty Script
source ${SUBMITTY_INSTALL_DIR}/.setup/INSTALL_SUBMITTY.sh clean
bash ${SUBMITTY_INSTALL_DIR}/.setup/INSTALL_SUBMITTY.sh clean


# (re)start the submitty grading scheduler daemon
Expand Down Expand Up @@ -570,7 +570,7 @@ if [ ${WORKER} == 0 ]; then
chmod -R 770 ${SUBMITTY_DATA_DIR}/logs/site_errors

# Call helper script that makes the courses and refreshes the database
${SUBMITTY_REPOSITORY}/.setup/bin/setup_sample_courses.py --submission_url ${SUBMISSION_URL}
python3 ${SUBMITTY_REPOSITORY}/.setup/bin/setup_sample_courses.py --submission_url ${SUBMISSION_URL}

#################################################################
# SET CSV FIELDS (for classlist upload data)
Expand Down
32 changes: 0 additions & 32 deletions .setup/local.sh

This file was deleted.

Empty file modified .setup/travis/autograder.sh
100755 → 100644
Empty file.
Empty file modified .setup/travis/print_debug.sh
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions .setup/travis/setup.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sudo mkdir -p ${SUBMITTY_INSTALL_DIR}
sudo mkdir -p ${SUBMITTY_DATA_DIR}
sudo cp -R ${TRAVIS_BUILD_DIR} ${SUBMITTY_REPOSITORY}

sudo ${DIR}/../bin/create_untrusted_users.py
sudo python3 ${DIR}/../bin/create_untrusted_users.py

sudo addgroup hwcronphp
sudo addgroup course_builders
Expand All @@ -59,7 +59,7 @@ America/New_York
http://localhost
http://localhost/git
${AUTH_METHOD}" | sudo ${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py --debug
${AUTH_METHOD}" | sudo python3 ${SUBMITTY_REPOSITORY}/.setup/CONFIGURE_SUBMITTY.py --debug


mkdir -p ${SUBMITTY_DATA_DIR}/instructors
Expand All @@ -79,4 +79,4 @@ sudo usermod -a -G travis hwphp
# necessary to pass config path as submitty_repository is a symlink
sudo python3 ${SUBMITTY_REPOSITORY}/migration/migrator.py -e master -e system migrate --initial

sudo /usr/local/submitty/.setup/INSTALL_SUBMITTY.sh clean
sudo bash /usr/local/submitty/.setup/INSTALL_SUBMITTY.sh clean
Empty file modified .setup/travis/setup_test_suite.sh
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion .setup/vagrant/setup_vagrant.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ if [ -x "$(command -v pip3)" ]; then
python3 ${SUBMITTY_REPOSITORY}/.setup/bin/reset_system.py
fi

sudo ${SUBMITTY_REPOSITORY}/.setup/install_system.sh --vagrant ${@}
sudo bash ${SUBMITTY_REPOSITORY}/.setup/install_system.sh --vagrant ${@}

16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ jobs:
- export DBUS_SESSION_BUS_ADDRESS=/dev/null
- psql -U postgres -c "CREATE ROLE hsdbu WITH SUPERUSER CREATEDB CREATEROLE LOGIN PASSWORD 'hsdbu'"
- PGPASSWORD=hsdbu psql -d postgres -h localhost -U hsdbu -c "CREATE DATABASE submitty"
- sudo ./.setup/travis/autograder.sh
- ./.setup/travis/setup.sh
- sudo /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/bin/setup_sample_courses.py sample
- sudo ./.setup/travis/setup_test_suite.sh
- sudo bash .setup/travis/autograder.sh
- bash .setup/travis/setup.sh
- sudo python3 /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/bin/setup_sample_courses.py sample
- sudo bash .setup/travis/setup_test_suite.sh
- sudo sed -e "s?www-data?hwphp?g" --in-place /etc/apache2/envvars
- sudo a2enmod include rewrite actions cgi alias headers
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
Expand Down Expand Up @@ -245,11 +245,11 @@ jobs:
- popd
- sudo chmod -R 555 /usr/local/lib/python*/
- sudo chmod -R 555 /opt/python/${PY_VERSION_3}/lib/python${PY_VERSION_3:0:3}/*
- sudo ./.setup/travis/autograder.sh
- ./.setup/travis/setup.sh
- sudo ./.setup/travis/setup_test_suite.sh
- sudo bash ./.setup/travis/autograder.sh
- bash ./.setup/travis/setup.sh
- sudo bash ./.setup/travis/setup_test_suite.sh
script:
- sudo /usr/local/submitty/test_suite/integrationTests/run.py
- sudo python3 /usr/local/submitty/test_suite/integrationTests/run.py
- <<: *04-integration
env: CLANG_VER="6.0.0"
if: branch = master OR type = pull_request
Expand Down
Empty file modified Docs/sample_bin/admin_scripts_setup
100755 → 100644
Empty file.
Empty file modified Docs/sample_bin/authonly.pl
100755 → 100644
Empty file.
Empty file modified Docs/sample_bin/gen.middle
100755 → 100644
Empty file.
Empty file modified Docs/sample_bin/new.svnuser.pl
100755 → 100644
Empty file.
Empty file modified Docs/sample_bin/regen.apache
100755 → 100644
Empty file.
Empty file modified Docs/sample_bin/validate.auth.pl
100755 → 100644
Empty file.
Empty file modified Docs/sample_bin/validate.svn.pl
100755 → 100644
Empty file.
Empty file modified ParseLogFiles/parseLogFolder.py
100755 → 100644
Empty file.
14 changes: 8 additions & 6 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GIT_PATH=/usr/local/submitty/GIT_CHECKOUT/Submitty
DISTRO=$(lsb_release -si | tr '[:upper:]' '[:lower:]')
VERSION=$(lsb_release -sc | tr '[:upper:]' '[:lower:]')
mkdir -p ${GIT_PATH}/.vagrant/${DISTRO}/${VERSION}/logs
${GIT_PATH}/.setup/vagrant/setup_vagrant.sh #{ENV['EXTRA']} 2>&1 | tee ${GIT_PATH}/.vagrant/${DISTRO}/${VERSION}/logs/vagrant.log
bash ${GIT_PATH}/.setup/vagrant/setup_vagrant.sh #{ENV['EXTRA']} 2>&1 | tee ${GIT_PATH}/.vagrant/${DISTRO}/${VERSION}/logs/vagrant.log
SCRIPT

unless Vagrant.has_plugin?('vagrant-vbguest')
Expand Down Expand Up @@ -56,13 +56,15 @@ Vagrant.configure(2) do |config|

config.vm.provision :shell, :inline => " sudo timedatectl set-timezone America/New_York", run: "once"

config.vm.synced_folder '.', '/usr/local/submitty/GIT_CHECKOUT/Submitty', create: true, mount_options: ["dmode=775", "fmode=774"]

optional_repos = ["AnalysisTools","Lichen","RainbowGrades","Tutorial"]
owner = 'root'
group = 'root'
config.vm.synced_folder '.', '/usr/local/submitty/GIT_CHECKOUT/Submitty', create: true, owner: owner, group: group

optional_repos = %w(AnalysisTools Lichen RainbowGrades Tutorial)
for repo in optional_repos do
if File.directory?(File.expand_path("../"+repo))
config.vm.synced_folder "../"+repo,"/usr/local/submitty/GIT_CHECKOUT/"+repo, mount_options: ["dmode=775", "fmode=774"]
repo_path = File.expand_path("../" + repo)
if File.directory?(repo_path)
config.vm.synced_folder repo_path,"/usr/local/submitty/GIT_CHECKOUT/" + repo, owner: owner, group: group
end
end

Expand Down
Empty file modified bin/generate_repos.py
100755 → 100644
Empty file.
Empty file modified bin/grading_done.py
100755 → 100644
Empty file.
Empty file modified bin/left_right_parse.py
100755 → 100644
Empty file.
Empty file modified bin/make_assignments_txt_file.py
100755 → 100644
Empty file.
Empty file modified bin/read_iclicker_ids.py
100755 → 100644
Empty file.
Empty file modified bin/regrade.py
100755 → 100644
Empty file.
Empty file.
Empty file modified site/public/css/server.css
100755 → 100644
Empty file.
Empty file modified site/public/fonts/grand-hotel/GrandHotel-Regular.otf
100755 → 100644
Empty file.
Empty file modified site/public/fonts/grand-hotel/SIL Open Font License.txt
100755 → 100644
Empty file.
Empty file modified site/public/js/jquery.min.js
100755 → 100644
Empty file.
Empty file modified sysadmin_tools/student_auto_feed/accounts.php
100755 → 100644
Empty file.
Empty file modified sysadmin_tools/student_auto_feed/submitty_student_auto_feed.php
100755 → 100644
Empty file.
Empty file modified tests/integrationTests/run.py
100755 → 100644
Empty file.
Empty file modified tests/integrationTests/tests/json/validation/results.json
100755 → 100644
Empty file.
Empty file modified tests/integrationTests/tests/json/validation/test02_0_diff.json
100755 → 100644
Empty file.
Empty file modified tests/integrationTests/tests/tutorial_06_loop_types/__init__.py
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified tests/integrationTests/tests/tutorial_07_loop_depth/__init__.py
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified tests/rainbowGrades/test_sample.py
100755 → 100644
Empty file.

0 comments on commit 5fe692a

Please sign in to comment.