Bug 13377 - automatic_renewals.pl not marked executable
Summary: automatic_renewals.pl not marked executable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.18
Hardware: All All
: P4 major (vote)
Assignee: Robin Sheat
QA Contact: Testopia
URL:
Keywords:
Depends on: 11577
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-03 03:20 UTC by Stephen Warren
Modified: 2016-06-21 21:37 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13377: mark automatic_renewals.pl as executable (778 bytes, patch)
2014-12-03 03:30 UTC, Robin Sheat
Details | Diff | Splinter Review
Bug 13377: mark automatic_renewals.pl as executable (869 bytes, patch)
2014-12-03 04:37 UTC, Robin Sheat
Details | Diff | Splinter Review
Bug 13377: mark automatic_renewals.pl as executable (1.07 KB, patch)
2014-12-03 04:43 UTC, Robin Sheat
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Warren 2014-12-03 03:20:02 UTC
root@leibniz:/etc/cron.daily# ./koha-common 
library: env: /usr/share/koha/bin/cronjobs/automatic_renewals.pl: Permission denied

root@leibniz:/etc/cron.daily# ls -l /usr/share/koha/bin/cronjobs/automatic_renewals.pl
-rw-r--r-- 1 root root 1747 Nov 30 15:54 /usr/share/koha/bin/cronjobs/automatic_renewals.pl

The file is 644 but should presumably be 755 since /etc/cron.daily/koha-common attempts to execute it.
Comment 1 Robin Sheat 2014-12-03 03:30:46 UTC Comment hidden (obsolete)
Comment 2 Robin Sheat 2014-12-03 04:04:25 UTC
This is important enough for the packages to work correctly that I'm going to push it through QA. I've build squeeze-dev packages with it in, and it looks like it did the trick. It should be in the next 3.18 release.
Comment 3 Robin Sheat 2014-12-03 04:07:38 UTC
Workaround until the next version is released (so I can point people here if it comes up on lists etc):

sudo chmod +x /usr/share/koha/bin/cronjobs/automatic_renewals.pl
Comment 4 Stephen Warren 2014-12-03 04:27:46 UTC
One the script is marked executable, it still has problems; there's no #! line at the top. Once that's added, the script seems to run without obvious problems.
Comment 5 Robin Sheat 2014-12-03 04:37:58 UTC Comment hidden (obsolete)
Comment 6 Robin Sheat 2014-12-03 04:43:44 UTC
Created attachment 34083 [details] [review]
Bug 13377: mark automatic_renewals.pl as executable

This script is called by a cron job, but was never marked as executable,
so will error every time it's called, which is no good. This also adds
an appropriate #! line to the top of the file.

To test:
* apply the patch
* make a package
* ensure that the installed
  /usr/share/koha/bin/cronjobs/automatic_renewals.pl
  is mode 755 and does something when run.
Comment 7 Robin Sheat 2014-12-03 04:44:52 UTC
Third time lucky, can you have a look and double check that this patch is sensible to you (it's still pretty simple, so I can't imagine much would go wrong.)
Comment 8 Stephen Warren 2014-12-03 04:56:20 UTC
The patch in comment 6 looks reasonable; my sysadmin tested out the same changes and saw no obvious issues after making those same changes manually.
Comment 9 Tomás Cohen Arazi 2014-12-03 13:02:59 UTC
Patch pushed to master.

Thanks Robin!
Comment 10 Chris Cormack 2014-12-03 19:50:13 UTC
Pushed to 3.18.x will be in 3.18.01, Robin do you think it's worth rolling a new 3.18.0 with just this patch added to it? (It's only 18 days to 3.18.01 )