Skip to content

incorrect executable bit on various files #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pabs3 opened this issue Jan 9, 2022 · 10 comments
Closed

incorrect executable bit on various files #418

pabs3 opened this issue Jan 9, 2022 · 10 comments
Labels
SDK Issue pertains to the SDK itself and not specific to any service

Comments

@pabs3
Copy link

pabs3 commented Jan 9, 2022

Many of the files (including PNG images) in the git repository incorrectly have the execute bit set even though they are clearly not scripts with a shebang or executables.

This command can be used to fix all of the files:

for f in `find * -executable -type f` ; do if ! head -n1 $f | grep -q '^#!' ; then chmod a-x $f ; fi; done ; git commit -a

This command can be used to print details of the files:

oci-python-sdk $ for f in `find * -executable -type f` ; do if ! head -n1 $f | grep -q '^#!' ; then head -vn1 $f ; fi; done
==> examples/add_soc_user.py <==
# coding: utf-8
==> examples/add_soc_group_policy.py <==
# coding: utf-8
==> examples/volume_attachment_pv_encryption_intransit_example.py <==
# coding: utf-8
==> examples/showoci/showoci_output.py <==
##########################################################################
==> examples/showoci/showoci_data.py <==
##########################################################################
==> examples/showoci/README.md <==
## showoci - Oracle Cloud Infrastructure Reporting Tool
==> examples/showoci/CHANGELOG.rst <==
Change Log
==> examples/showoci/step_by_step_installation.md <==
# showoci - Oracle Cloud Infrastructure Reporting Tool
==> examples/showoci/showoci_service.py <==
##########################################################################
==> examples/usage_reports_to_adw/readme.md <==
# Usage2ADW - Oracle Cloud Infrastructure Usage and Cost Reports to Autonomous Database Tool
==> examples/usage_reports_to_adw/img/Image_16.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_03.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_07.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_05.png <==
�PNG
==> examples/usage_reports_to_adw/img/stack_4.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_24.png <==
�PNG
==> examples/usage_reports_to_adw/img/report_04.png <==
�PNG
==> examples/usage_reports_to_adw/img/stack_5.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_08.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_23.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_26.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_01.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_21.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_30.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_15.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_11.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_22.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_13.png <==
�PNG
==> examples/usage_reports_to_adw/img/stack_2.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_7.png <==
�PNG
==> examples/usage_reports_to_adw/img/report_05.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_1.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_20.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_28.png <==
�PNG
==> examples/usage_reports_to_adw/img/report_02.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_06.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_32.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_04.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_12.png <==
�PNG
==> examples/usage_reports_to_adw/img/stack_1.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_2.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_3.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_5.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_19.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_25.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_4.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_09.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_8.png <==
�PNG
==> examples/usage_reports_to_adw/img/screen_6.png <==
�PNG
==> examples/usage_reports_to_adw/img/report_03.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_17.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_27.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_14.png <==
�PNG
==> examples/usage_reports_to_adw/img/stack_3.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_29.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_18.png <==
�PNG
==> examples/usage_reports_to_adw/img/stack_6.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_31.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_02.png <==
�PNG
==> examples/usage_reports_to_adw/img/report_01.png <==
�PNG
==> examples/usage_reports_to_adw/img/Image_10.png <==
�PNG
==> examples/usage_reports_to_adw/step_by_step_daily_report.md <==
# 1. Create approved sender
==> examples/usage_reports_to_adw/CHANGELOG.rst <==
Change Log
==> examples/usage_reports_to_adw/step_by_step_installation.md <==
# Usage2ADW - Oracle Cloud Infrastructure Usage and Cost Reports to Autonomous Database with APEX Reporting
==> examples/usage_reports_to_adw/setup/setup.crontab.txt <==
###############################################################################
==> examples/usage_reports_to_adw/setup/enable_apex.sql <==

==> examples/usage_reports_to_adw/setup/create_tables.sql <==

==> examples/list_resources_in_tenancy/list_all_virtual_circuits_in_tenancy.py <==
# coding: utf-8
==> examples/list_resources_in_tenancy/list_dbsystem_with_maintenance_in_tenancy.py <==
# coding: utf-8
==> examples/list_resources_in_tenancy/list_compute_tags_in_tenancy.py <==
# coding: utf-8
==> examples/list_resources_in_tenancy/list_all_ipsec_tunnels_in_tenancy.py <==
# coding: utf-8
==> examples/launch_instance_pv_encryption_intransit_example.py <==
# coding: utf-8
==> requirements.txt <==
autodocsumm==0.1.11
@adizohar
Copy link
Member

Hi Paul
I will fix the execution bit on release 1/18 for the files I pushed
Thank you for the comment

@jodoglevy jodoglevy added the SDK Issue pertains to the SDK itself and not specific to any service label Jan 12, 2022
@adizohar
Copy link
Member

I pushed the changes to the internal bit bucket,
for Mac below commands was used:

for f in `find . -type f -perm -a=x` ; do if ! head -n1 $f | grep -q '^#!' ; then chmod a-x $f ; fi; done ;
for f in `find . -type f -perm -a=x` ; do if ! head -n1 $f | grep -q '^#!' ; then echo $f ; fi; done ;

@adizohar
Copy link
Member

The changes should be deployed , can you please check and confirm ?
Thank you

@pabs3
Copy link
Author

pabs3 commented Jan 26, 2022 via email

@adizohar
Copy link
Member

I pushed this as well

Can you please let me know what is the issue if the executable is set for non executable files ?
Does it break your build ?
We have users working on Windows and you cannot control the executable when pushing to git.

For your info

@pabs3
Copy link
Author

pabs3 commented Jan 27, 2022 via email

@pabs3
Copy link
Author

pabs3 commented Mar 23, 2022

@adizohar looks like some more instances of this have been introduced in the examples directory. I think it would be a good idea for you to add a GitHub Actions check to give errors when more incorrect executable bits are added.

$ for f in `find * -executable -type f` ; do if ! head -n1 $f | grep -q '^#!' ; then head -vn1 $f ; fi; done
==> examples/tag_resources_in_tenancy/tag_resources_in_tenancy.py <==
# coding: utf-8
==> examples/tag_resources_in_tenancy/README.md <==
## Tag Resources in Tenancy
==> examples/showoci/showoci_output.py <==
##########################################################################
==> examples/showoci/showoci_data.py <==
##########################################################################
==> examples/showoci/README.md <==
## showoci - Oracle Cloud Infrastructure Reporting Tool
==> examples/showoci/CHANGELOG.rst <==
Change Log
==> examples/showoci/showoci_service.py <==
##########################################################################
==> examples/usage_reports_to_adw/readme.md <==
# Usage2ADW - Oracle Cloud Infrastructure Usage and Cost Reports to Autonomous Database Tool
==> examples/usage_reports_to_adw/CHANGELOG.rst <==
Change Log
==> examples/usage_reports_to_adw/apex_demo_app/usage.demo.apex.sql <==
prompt --application/set_environment
==> examples/list_resources_in_tenancy/list_limits_per_compartments.py <==
# coding: utf-8

@adizohar
Copy link
Member

Those will be fixed next week

@pabs3
Copy link
Author

pabs3 commented May 26, 2022

@adizohar some of the issues got fixed, thanks! there are now only five issues left!

$ for f in `find * -executable -type f` ; do if ! head -n1 $f | grep -q '^#!' ; then head -vn1 $f ; fi; done
==> examples/showoci/showoci_output.py <==
##########################################################################
==> examples/showoci/showoci_data.py <==
##########################################################################
==> examples/showoci/README.md <==
## showoci - Oracle Cloud Infrastructure Reporting Tool
==> examples/showoci/CHANGELOG.rst <==
Change Log
==> examples/showoci/showoci_service.py <==
##########################################################################

@pabs3
Copy link
Author

pabs3 commented Feb 5, 2023

@adizohar this issue got fully fixed, thanks!
You can close the issue now I think.

@pabs3 pabs3 closed this as completed Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDK Issue pertains to the SDK itself and not specific to any service
Projects
None yet
Development

No branches or pull requests

3 participants