openwrt / openwrt/packages

adblock-fast: Writes config file regularly

Open
#26,840 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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
  1. Install adblock-fast.
  2. Enable some blocklists.
  3. Observe /etc/config/adblock-fast over time.
  4. 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.