Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddns-scripts: fix regression added by version 2.8.0 #13509

Merged
merged 16 commits into from
Oct 1, 2020

Conversation

feckert
Copy link
Member

@feckert feckert commented Sep 28, 2020

Maintainer: me / @Ansuel
Compile tested: not needed only script changes
Run tested: x86_64, APU3, openwrt master

Description:

The following issues should get resolved with this P/R.
#13495
https://lists.openwrt.org/pipermail/openwrt-devel/2020-September/031507.html

@Ansuel I have not add the dependency ddns-scripts-services to ddns-scripts for now. When I do that the menuconfig does not look clean! Could you verify this.

…vices

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
…vies package

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This is not needed. The file get installed on demand with the new ddns
script.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
@Ansuel
Copy link
Member

Ansuel commented Sep 28, 2020

What problem do you have with the deps?

define Package/ddns-scripts
  $(call Package/ddns-scripts/Default)
  TITLE:=Dynamic DNS Client scripts (with IPv6 support)
  DEPENDS:=+ddns-scripts-services
endef

define Package/ddns-scripts/description
  Dynamic DNS Client scripts (with IPv6 support)
  A highly configurable set of scripts for doing dynamic dns updates.
  - IPv6 support
  - DNS server support
  - Glue Record support (require BIND host or KNOT host)
  - DNS requests via TCP
  - Proxy server support
  - log file support
  - support to run once
  Version: $(PKG_VERSION)-$(PKG_RELEASE)
  Info   : https://openwrt.org/docs/guide-user/services/ddns/client
endef

define Package/ddns-scripts/conffiles
/etc/config/ddns
endef


define Package/ddns-scripts-services
  $(call Package/ddns-scripts/Default)
  TITLE:=Common ddns providers
#   DEPENDS:=ddns-scripts
endef

Immagine 2020-09-28 122803

@Ansuel
Copy link
Member

Ansuel commented Sep 28, 2020

I was thinking of renaming the 'services' dir to 'default'. This would make it more clear that in that dir there are json installed by the opkg and should not be touched...
Aside from this. Can we keep the list file on the repo but not install it?

@feckert
Copy link
Member Author

feckert commented Sep 28, 2020

I was thinking of renaming the 'services' dir to 'default'. This would make it more clear that in that dir there are json installed by the opkg and should not be touched...

Sounds good 👍. I will change that.

Aside from this. Can we keep the list file on the repo but not install it?

This should fit. I have only removed the installation call and the file is still in the repo

I have not add the dependency ddns-scripts-services to ddns-scripts for now. When I do that the menuconfig does not look clean! Could you verify this.

forget it. That has been cleared up I have rebuilt and then it worked. But thanks

@Ansuel
Copy link
Member

Ansuel commented Sep 28, 2020

This should fit. I have only removed the installation call and the file is still in the repo

Didn't notice... Will update the luci app pr with the default dir so we can merge both... What do you think?

If we install ddns-scripts we also install the default
ddns-scripts-services package. So the behabviour for the user does not
change.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Since we can also install custom ddns services, the name for the default
services is not optimally chosen. To emphasize this the folder with the
standard services for the package feed will be renamed to default.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
@feckert
Copy link
Member Author

feckert commented Sep 28, 2020

@Ansuel I have to update this P/R with another commit to read also the custom json values.
For now the read function does only read the files from the services directory (In the future this directory is changed in this P/R to default, as you suggested).

But we could not read the custom directory if we have installed a provider in this directory for now.
Any solution to fix this?

My suggestions are:

  • Read also in another call the values from the custom directory if we do not find the json file in the default directory
  • Check first the custom directory and then the default directory

An if we find no json then we gave up?

I would use the second suggest. So we have always use the newest json information if we try to read first the custom directory.

@Ansuel
Copy link
Member

Ansuel commented Sep 28, 2020

I would use the second suggest.

Yes the default json should be the fallback if custom is not provided. Maybe add a comment somewhere to make this clear (that any custom json have priority than default?)

The provider could also be read from the custom directory. To get always
the latest version of the provider config json file, we read first the custom
directory and after that we also check the default directory, if we could not
find the provider file

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
@snakwu
Copy link

snakwu commented Sep 29, 2020

@feckert @Ansuel
什么时候可以合并?

@feckert feckert changed the title [WIP] ddns-scripts: fix regression added by version 2.8.0 ddns-scripts: fix regression added by version 2.8.0 Sep 30, 2020
@neheb
Copy link
Contributor

neheb commented Sep 30, 2020

 In net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh line 48:
	printf %s\n "$MYPROG: $@" >&2
                               ^-- SC2145: Argument mixes string and array. Use * or separate argument.

@feckert
Copy link
Member Author

feckert commented Sep 30, 2020

 In net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh line 48:
	printf %s\n "$MYPROG: $@" >&2
                               ^-- SC2145: Argument mixes string and array. Use * or separate argument.

@neheb Thanks for your advice. But I don't want to deal with the shellcheck things in this PR. Now I have to make sure that the JSONs work properly. I want to update some other things in the package. The restructuring of the package is not yet complete. There is still a lot to be done.

@feckert
Copy link
Member Author

feckert commented Oct 1, 2020

@Ansuel I would merge the changes now. If it works for you, too.

@Ansuel
Copy link
Member

Ansuel commented Oct 1, 2020

Sorry for the delay... I tested now and it seems to work all correctly. Did you test the luci app?

@feckert feckert merged commit a333d71 into openwrt:master Oct 1, 2020
@ivanich
Copy link

ivanich commented Oct 1, 2020

Not sure how but this bricks my edgerouterx, had to recovery via tftp. When I remove this commit from packages repo it works fine

@feckert
Copy link
Member Author

feckert commented Oct 1, 2020

@ivanich That are only script changes. So what did you exactly do. This changes were recently committed so i do not think this has already picked up by the buildbot and that this package are available in the snapshot for installation.

@ivanich
Copy link

ivanich commented Oct 1, 2020

@feckert I make my own builds from master for 3 routers including edgerouter for a quite long time. As I said before build with this commit reverted works fine. I even tried to disable all ddns staff in the config but it still wont boot.

@feckert
Copy link
Member Author

feckert commented Oct 1, 2020

@ivanich sorry i can not help you. I need more information what did you exactly do.

@feckert feckert deleted the pr/20200928-ddns-scripts branch November 4, 2020 15:28
paper42 added a commit to paper42/packages that referenced this pull request Oct 12, 2022
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

openwrt#13509 renamed manu ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.
paper42 added a commit to paper42/packages that referenced this pull request Oct 12, 2022
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

openwrt#13509 renamed many ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.
paper42 added a commit to paper42/packages that referenced this pull request Oct 12, 2022
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

openwrt#13509 renamed many ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
feckert pushed a commit that referenced this pull request Oct 18, 2022
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

#13509 renamed many ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
(cherry picked from commit dbe79e4)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Remove PKG_RELEASE version bump
feckert pushed a commit that referenced this pull request Oct 18, 2022
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

#13509 renamed many ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
(cherry picked from commit dbe79e4)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Remove PKG_RELEASE version bump
stokito pushed a commit to stokito/packages that referenced this pull request Dec 6, 2022
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

openwrt#13509 renamed many ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
SibrenVasse pushed a commit to SibrenVasse/packages that referenced this pull request Feb 26, 2023
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

openwrt#13509 renamed many ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
(cherry picked from commit dbe79e4)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Remove PKG_RELEASE version bump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants