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

Freetzng-fix #433

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions installer/IP12_avm_freetz_ng_extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ IP12_avm_freetz_ng_extract() {
if ! grep -q freetzuser /etc/passwd; then
useradd -m freetzuser
usermod -a -G "${ORIG_GROUP}" freetzuser
passwd -d freetzuser
fi
download_file "execstack" "http://ftp.br.debian.org/debian/pool/main/p/prelink/execstack_0.0.20131005-1+b10_amd64.deb" "external/execstack_0.0.20131005-1+b10_amd64.deb"
dpkg -i external/execstack_0.0.20131005-1+b10_amd64.deb
Expand All @@ -81,17 +82,16 @@ IP12_avm_freetz_ng_extract() {
if ! [[ -d external/freetz-ng ]]; then
mkdir external/freetz-ng

chown -R freetzuser:freetzuser external/freetz-ng
chmod 777 -R external/freetz-ng
su freetzuser -c "git clone https://github.com/Freetz-NG/freetz-ng.git external/freetz-ng"
su - freetzuser -c "git clone https://github.com/Freetz-NG/freetz-ng.git /tmp/freetz-ng"
Copy link
Member

Choose a reason for hiding this comment

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

as we are using "$EXT_DIR"/freetz-ng/fwmod in the extractor this will not work.

Copy link
Member

Choose a reason for hiding this comment

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

"$EXT_DIR"/freetz-ng/fwmod -u -i "$TMP_DIR"/.config -d "$EXTRACTION_DIR_" "$AVM_FW_PATH_" | tee -a "$LOG_FILE" || true


cd external/freetz-ng || ( echo "Could not install EMBA component Freetz-NG" && exit 1 )
cd /tmp/freetz-ng || ( echo "Could not install EMBA component Freetz-NG" && exit 1 )

sudo -u freetzuser make allnoconfig
su - freetzuser -c "make allnoconfig"
# we currently running into an error that does not hinder us in using Freetz-NG
# sudo -u freetzuser make || true
sudo -u freetzuser make tools
su - freetzuser -c "make tools"
cd "$HOME_PATH" || ( echo "Could not install EMBA component Freetz-NG" && exit 1 )
mv -r /tmp/freetz-ng/* external/freetz-ng/
Copy link
Member Author

Choose a reason for hiding this comment

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

The end-result should be the same no?

Copy link
Member

Choose a reason for hiding this comment

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

sorry but I have not seen this. Do we really need to build it in tmp?

Copy link
Member Author

Choose a reason for hiding this comment

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

my understanding of different filesystems is limited, but this circumvents all permission problems with one user building in another ones home-directory

Copy link
Member

Choose a reason for hiding this comment

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

probably the best way ...

chown -R root:root external/freetz-ng
if [[ "$IN_DOCKER" -eq 1 ]]; then
# do some cleanup of the docker image
Expand Down