adblock-fast: Writes config file regularly
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Package Name
adblock-fast
Maintainer
Stan Grishin stangri@melmac.ca
OpenWrt Version
24.10.2
OpenWrt Target/Subtarget
ramips/mt7621
Steps to Reproduce
- Install adblock-fast.
- Enable some blocklists.
- Observe /etc/config/adblock-fast over time.
- Notice that it is written regularly.
Actual Behaviour
I'm noticing that the config file at /etc/config/adblock-fast is written regularly. Certainly on every boot for me, perhaps more often. It seems the service is updating the size option for each file URL.
I wonder if this is intentional, and if so whether it makes sense to provide an option not to do this to save on flash wear?
If this is transient information (as it would be for me, I don't persistently store the blocklists), it would be better to store this in /var/run (aka /tmp) somewhere?
This is from my config backup git repo, just showing how two random versions of the file differ.
$ git diff HEAD^ adblock-fast
diff --git a/router/etc/config/adblock-fast b/router/etc/config/adblock-fast
index 5fdbdb1..f33765b 100644
--- a/router/etc/config/adblock-fast
+++ b/router/etc/config/adblock-fast
@@ -35,22 +35,22 @@ config adblock-fast 'config'
config file_url
option url 'https://cdn.jsdelivr.net/gh/StevenBlack/hosts/hosts'
- option size '5268235'
+ option size '6594233'
option action 'block'
config file_url
option url 'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers_justdomains.txt'
- option size '3902071'
+ option size '3988053'
option action 'block'
...
Confirmation Checklist
- The package is maintained in this repository.
- I understand that issues related to the base OpenWrt repository or LuCI repository will be closed.
- I am reporting an issue for OpenWrt, not an unsupported fork.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the adblock-fast package's handling of /etc/config/adblock-fast and reproduce the regular updates to the file_url size options. Determine whether those values are persistent configuration or transient state, then confirm the intended storage behavior and add coverage if the package has relevant tests. Done means the regular flash writes are avoided or the behavior is explicitly justified and documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100