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

Remove dependencies #1576

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Remove dependencies #1576

merged 1 commit into from
Aug 1, 2022

Conversation

giulio-coa
Copy link
Contributor

Removed the dependency from edge repository and downloaded the grepcidr source code into a temp directory

@giulio-coa giulio-coa changed the base branch from master to test July 27, 2022 15:54
@giulio-coa giulio-coa mentioned this pull request Jul 27, 2022
@giulio-coa
Copy link
Contributor Author

You've probably looked at an old commit
These are problems already fixed

@orazioedoardo
Copy link
Member

orazioedoardo commented Jul 28, 2022

You've probably looked at an old commit

If you go to the Files changed tab you can see that the script is still entering the relative directory.

@giulio-coa
Copy link
Contributor Author

You've probably looked at an old commit

If you go to the Files changed tab you can see that the script is still entering the relative directory.

Yep
The problems were the downloads of the file not the cd into the directories

@orazioedoardo
Copy link
Member

The problems were the downloads of the file not the cd into the directories

It is. Works for grepcidr because you are in the directory where the script is executed, most likely /home/pi (although I recommend using absolute paths there too in case someone changes the code above in the future), but it doesn't for apk-autoupdate because at that point you are in the /usr/local/src/pivpn directory.

./install.sh: line 2729: cd: apk-autoupdate-master: No such file or directory

@orazioedoardo
Copy link
Member

Actually cd "${down_dir}/apk-autoupdate-master" still won't work because unzip and tar will extract in the current directory so the script should cd "${down_dir}" before unzip/unzip untar first.

giulio-coa added a commit to giulio-coa/pivpn that referenced this pull request Jul 28, 2022
…o temp dir

Remove useless dependency from the edge repository and change where the download of grepcidr source code is stored

Closes pivpn#1576
giulio-coa added a commit to giulio-coa/pivpn that referenced this pull request Jul 28, 2022
…o temp dir

Remove useless dependency from the edge repository and change where the download of grepcidr source code is stored

Closes pivpn#1576
auto_install/install.sh Outdated Show resolved Hide resolved
@coolapso
Copy link
Member

coolapso commented Jul 28, 2022

Following the angular convention, I think with PiVPN the build does not apply even tho we're dealing with an "external dependency", we don't rly have a build system. Here I think should be either refactor(): or fix():

giulio-coa added a commit to giulio-coa/pivpn that referenced this pull request Jul 28, 2022
…code into temp dir

Remove useless dependency from the edge repository and change where the download of grepcidr source code is stored

Closes pivpn#1576
@orazioedoardo
Copy link
Member

orazioedoardo commented Jul 29, 2022

Seems to be working but what's up with that asciidoctor?

[...]
install -d /etc/apk/
install -m 640 etc/autoupdate.conf /etc/apk/
install -d /usr/share/apk-autoupdate
for file in functions.sh openrc.sh; do \
	install -m 644 src/$file /usr/share/apk-autoupdate/$file; \
done
sed -e 's|@VERSION@|0.0.0|g' \
       -e 's|@datadir@|/usr/share/apk-autoupdate|g' \
       -e 's|@sysconfdir@|/etc|g' \
       src/apk-autoupdate.in > build/apk-autoupdate
chmod +x build/apk-autoupdate
cc  -Os -DNDEBUG -std=c11 -DVERSION=0.0.0 -o build/procs-need-restart.o -c src/procs-need-restart.c
cc  -o build/procs-need-restart build/procs-need-restart.o
sed -e 's|@VERSION@|0.0.0|g' \
       -e 's|@datadir@|/usr/share/apk-autoupdate|g' \
       -e 's|@sysconfdir@|/etc|g' \
       src/rc-service-pid.in > build/rc-service-pid
chmod +x build/rc-service-pid
install -d /usr/sbin
for file in apk-autoupdate procs-need-restart rc-service-pid; do \
	install -m 755 build/$file /usr/sbin/$file; \
done
asciidoctor -b manpage -o build/apk-autoupdate.1 man/apk-autoupdate.1.adoc
make: asciidoctor: No such file or directory
make: *** [Makefile:104: build/apk-autoupdate.1] Error 127
rm build/procs-need-restart.o
apk-autoupdate: Checking available updates...
apk-autoupdate: Upgrading packages:  busybox ssl_client busybox-suid python3 openssh-keygen openssh-client-common openssh-client-default openssh-sftp-server openssh-server-common openssh-server openssh
[...]

@orazioedoardo
Copy link
Member

orazioedoardo commented Jul 29, 2022

I see that you are not removing anymore downloaded files and build artifacts after compile, intentional?

@giulio-coa
Copy link
Contributor Author

giulio-coa commented Jul 29, 2022

Seems to be working but what's up with that asciidoctor?

Probably, the dependency is missing
https://asciidoctor.org/

@giulio-coa
Copy link
Contributor Author

giulio-coa commented Jul 29, 2022

I see that you are not removing anymore downloaded files and build artifacts after compile, intentional?

Yep
We use a temp directory, so ...

@orazioedoardo
Copy link
Member

Probably, the dependency is missing
https://asciidoctor.org/

It’s used just for man pages, can you check whether sudo make install-conf install-data install-exec suppresses the error? See here.

@giulio-coa
Copy link
Contributor Author

giulio-coa commented Jul 29, 2022

It’s used just for man pages, can you check whether sudo make install-conf install-data install-exec suppresses the error? See here.

I do, but wouldn't it be better to install asciidoctor?
I think it is better to install the package's man pages

giulio-coa added a commit to giulio-coa/pivpn that referenced this pull request Jul 29, 2022
…code into temp dir

Remove useless dependency from the edge repository and change where the download of grepcidr source code is stored

Closes pivpn#1576
@giulio-coa
Copy link
Contributor Author

Probably, the dependency is missing
https://asciidoctor.org/

It’s used just for man pages, can you check whether sudo make install-conf install-data install-exec suppresses the error? See here.

It works

@orazioedoardo
Copy link
Member

orazioedoardo commented Jul 29, 2022

I do, but wouldn't it be better to install asciidoctor?
I think it is better to install the package's man pages

How much effort/code it is? I mean, it's not essential.

@giulio-coa
Copy link
Contributor Author

giulio-coa commented Jul 29, 2022

How much effort/code it is? I mean, it's not essential.

For Pi-VPN, yes
You should consider that we install on the user's OS a package that s?he does not know building the source code
It seems appropriate to install the man pages, since it will not be able to install them via apk

@giulio-coa
Copy link
Contributor Author

@orazioedoardo So, I can add asciidoctor as dependency or we merge the PR as is it ?

@orazioedoardo
Copy link
Member

I can add asciidoctor as dependency

Yes

…code into temp dir

Remove useless dependency from the edge repository and change where the download of grepcidr source code is stored

Closes pivpn#1576
@coolapso
Copy link
Member

🎉 This PR is included in version 4.1.0-test.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@coolapso
Copy link
Member

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants