Bug 275300 - [PATCH] www/angie: Create/delete logs directory using hooks
Summary: [PATCH] www/angie: Create/delete logs directory using hooks
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-24 10:02 UTC by oleg
Modified: 2024-03-05 21:37 UTC (History)
1 user (show)

See Also:


Attachments
Create/delete logs directory using hooks (2.42 KB, patch)
2023-11-24 10:02 UTC, oleg
no flags Details | Diff
[PATCH] Create/delete directories using hooks (2.49 KB, patch)
2024-03-05 21:08 UTC, oleg
no flags Details | Diff
[PATCH] Create/delete directories using hooks (2.47 KB, patch)
2024-03-05 21:37 UTC, oleg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description oleg 2023-11-24 10:02:11 UTC
This allows end-user to change permissions on log directory based on their
preferences or security concerns and they won't be reset on upgrade.
Comment 1 oleg 2023-11-24 10:02:36 UTC
Created attachment 246535 [details]
Create/delete logs directory using hooks
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2024-02-20 13:35:10 UTC
This is probably better solved by creating the directory in the rc.d script and leaving it out of the package entirely.

That said, instead of adding installation and deinstallation scripts, you should at least do something like adding

    @preexec mkdir -p %%LOGDIR%%
    @postunexec rmdir %%LOGDIR%% 2>/dev/null || true

to pkg-plist.

I have asked on the ports IRC channel for the proper way to do this and will report back if there is a better solution.
Comment 3 oleg 2024-03-05 21:08:36 UTC
Created attachment 248955 [details]
[PATCH] Create/delete directories using hooks

Updated with given recommendations, thanks
Comment 4 oleg 2024-03-05 21:37:15 UTC
Created attachment 248956 [details]
[PATCH] Create/delete directories using hooks

Fixed wrong lines folding