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

openwisp-config: fix Makefile for 1.1.0 #25186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pandafy
Copy link
Contributor

@pandafy pandafy commented Oct 22, 2024

Update configuration in Makefile to fix #25168

Maintainer: @nemesifier
Compile tested: ramips
Run tested: ramips

Copy link
Contributor

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✔️

Copy link
Contributor

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feckert we fixed some issues and updated some outdated code here.

@nemesifier
Copy link
Contributor

Any maintainer could merge this please? @BKPepe

Comment on lines 52 to +58
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
$(1)/usr/sbin/openwisp_config
$(1)/usr/sbin/openwisp-config

$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
$(1)/etc/init.d/openwisp_config
$(1)/etc/init.d/openwisp-config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While checking the commit description, this one is only valid, isnt it? :)

$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-get-random-number.lua \
$(1)/usr/sbin/openwisp-get-random-number

$(CP) $(PKG_BUILD_DIR)/VERSION $(1)/usr/lib/openwisp-config/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this is necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's used by the program to read the version number

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not understand this commit.

Comment on lines 114 to 117
define Package/openwisp-config/postrm
#!/bin/sh
rm -f $${IPKG_INSTROOT}/usr/sbin/openwisp_config
endef
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be removed automatically. No needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The agent is now named /usr/sbin/openwisp-config, we create a symbolic link to /usr/sbin/openwisp_config for backward compatibility. This postrm hook removes the symbolic link. Was this clear?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know what you would like to achieve, but I am asking why do it in such complicated way.

Comment on lines 106 to 112
# for backward compatibility
define Package/openwisp-config/postinst
#!/bin/sh
if [ ! -L $${IPKG_INSTROOT}/usr/sbin/openwisp_config ]; then
ln -s /usr/sbin/openwisp-config $${IPKG_INSTROOT}/usr/sbin/openwisp_config
fi
endef
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this one, well, its breaking change introduced by previous version. Thus users will run this package by init script, right? I find this useless.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I guess we can remove it. Initially we copied the init script too but it caused to have multiple agents running.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BKPepe removed

Update configuration in Makefile to fix openwrt#25168

Signed-off-by: Gagan Deep <pandafy.dev@gmail.com>
Copy link
Contributor

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for review.

Copy link
Contributor

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any blocker here?

@feckert
Copy link
Member

feckert commented Nov 5, 2024

@BKPepe Do you have any comments or can I merge this?

@feckert feckert requested a review from BKPepe November 5, 2024 10:45
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.

openwisp-config: instance1 s in a crash loop x
4 participants