Bug 268808 - finance/sql-ledger: changes for Apache 2.4
Summary: finance/sql-ledger: changes for Apache 2.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-07 10:57 UTC by Brian Roper
Modified: 2024-01-11 10:53 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Roper 2023-01-07 10:57:24 UTC
Hello Muhammad
I've been using SQL-Ledger for very many years, mostly on CentOS.
Thanks for maintaining the sql-ledger package for FreeBSD.

Relevant packages we're using with FreeBSD 13.1-RELEASE include :
- Apache 2.4
- Postgresql 13
- SQL-Ledger 3.2.11
After installing SQL-Ledger using the package command
# pkg install sql-ledger
The supplied file /usr/local/etc/sql-ledger-httpd.conf contains the old Apache directives
Order Allow,Deny
Allow from all
and
Order Deny,Allow
Deny from all

I needed to change these manually to adopt the Apache 2.4 style :
Require all granted, and
Require all denied

After these minor adjustments it all seems to work as expected.
As SQL-Ledger upstream has been updated in recent days to 3.2.12, perhaps you might consider these wrinkles when you next update the package for FreeBSD.
Thanks again for your maintaining.
Comment 1 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-01-11 01:44:51 UTC
I am working on updating this to 3.2.12.

However it has been years I have used httpd so can you help me pointing out the changes that are required? Here is the file that gets installed. If you can just share me a diff that would be great.

https://cgit.freebsd.org/ports/tree/finance/sql-ledger/files/sql-ledger-httpd.conf.in
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-01-11 09:01:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b4696b8444ef78c29982d9ddb54bb37423b42b79

commit b4696b8444ef78c29982d9ddb54bb37423b42b79
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-01-11 08:56:14 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-01-11 09:00:17 +0000

    finance/sql-ledger: Update version 3.2.11=>3.2.12

    - Update apache config file for apache 2.4 only as apache22 is defunct
      now [1]

    PR:             268808 [1]
    Reported by:    bgroper@aussiebb.com.au [1]
    Relnotes:
    https://www.sql-ledger.com/cgi-bin/nav.pl?page=misc/whatsnew.html&title=What%27s%20New

 finance/sql-ledger/Makefile                       | 10 ++--------
 finance/sql-ledger/distinfo                       |  6 +++---
 finance/sql-ledger/files/sql-ledger-httpd.conf.in |  6 ++----
 3 files changed, 7 insertions(+), 15 deletions(-)
Comment 3 Brian Roper 2023-01-11 10:18:25 UTC
Here's the diff requested.
HTH


# diff sql-ledger-httpd.conf.original sql-ledger-httpd.conf
6,7c6
<   Order Allow,Deny
<   Allow from All
---
>   Require all granted
11,12c10
<   Order Deny,Allow
<   Deny from All
---
>   Require all denied
Comment 4 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-01-11 10:20:11 UTC
(In reply to bgroper from comment #3)
I think I have already figured it out. It was already in the Makefile but not sure why the patch didn't work. :D

And also have updated to the new version. Enjoy.
Comment 5 Brian Roper 2023-01-11 10:32:09 UTC
Can I also suggest to add a comment to warn users NEVER to run the script supplied by sql-ledger :
/usr/local/www/sql-ledger/setup.pl
This script updates all the perl scripts by incorrectly pointing to /usr/bin/perl.
This is wrong, makes a mess, and breaks the otherwise perfectly good installation.