freeswitch icon indicating copy to clipboard operation
freeswitch copied to clipboard

DEB build for Debain 11 and Debian 10 failed

Open kvishnivetsky opened this issue 2 years ago • 4 comments

Describe the bug Build DEBS for Debain 11 and Debian 10 from git v1.10 branch failed on Debian 11 host

To Reproduce Steps to reproduce the behavior:

  1. Do all, like describe in Confluence Debain page

Expected behavior DEB packages being built.

Package version or git hash

  • Version 1.10.7

Trace logs

Hit:1 http://mirror.yandex.ru/debian buster InRelease
Ign:2 http://security.debian.org/debian-security buster InRelease
Err:3 http://security.debian.org/debian-security buster Release
  404  Not Found [IP: 151.101.2.132 80]
Ign:4 https://freeswitch.signalwire.com/repo/deb/debian-release buster InRelease
Err:5 https://freeswitch.signalwire.com/repo/deb/debian-release buster Release
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 190.102.98.174 443]
Reading package lists...
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: The repository 'http://security.debian.org/debian-security buster Release' does not have a Release file.
W: https://freeswitch.signalwire.com/repo/deb/debian-release/dists/buster/InRelease: No system certificates available. Try installing ca-certificates.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:3
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:5
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:5
W: https://freeswitch.signalwire.com/repo/deb/debian-release/dists/buster/Release: No system certificates available. Try installing ca-certificates.
E: The repository 'https://freeswitch.signalwire.com/repo/deb/debian-release buster Release' does not have a Release file.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:3
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:5
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:5
.[0mI: unmounting dev/ptmx filesystem.[0m
.[0mI: unmounting dev/pts filesystem.[0m
.[0mI: unmounting dev/shm filesystem.[0m
.[0mI: unmounting proc filesystem.[0m
.[0mI: unmounting sys filesystem.[0m
E: pbuilder create failed
I: forking: rm -rf /var/cache/pbuilder/base-buster-amd64.cow

kvishnivetsky avatar Jun 09 '22 22:06 kvishnivetsky

Workaround to fight SSL Cert problem on Debain 10 Buster: Patch file /usr/lib/pbuilder/pbuilder-createbuildenv at line 110 add: $CHROOTEXEC apt-get -q -y install ca-certificates

Also you need to inject SIGNALWIRE TOKEN to make FreeSWITCH repor to work properly (authorize you by token)

Also you need to replace all files.freeswitch.org wth freeswitch.signalwire.com in debian/util.sh

It worked for me on Debain 10 Buster

kvishnivetsky avatar Jun 10 '22 01:06 kvishnivetsky

Will be happy to review a PR for that.

andywolk avatar Jun 10 '22 13:06 andywolk

@kvishnivetsky

Also you need to inject SIGNALWIRE TOKEN to make FreeSWITCH repor to work properly (authorize you by token)

Can you explain how to do that? I don't know where to add that. I have the token in /etc/apt/auth.conf and can run apt commands against the repo from my shell, but pbuilder doesn't see those creds.

yois615 avatar Jul 27 '22 18:07 yois615

What I did to workaround this:

  1. Follow @kvishnivetsky 's first step: Patch file /usr/lib/pbuilder/pbuilder-createbuildenv at line 110 add: $CHROOTEXEC apt-get -q -y install ca-certificates
  2. Fix wrong URL in util.sh: sed -i 's/files.freeswitch.org/freeswitch.signalwire.com/g' ./debian/util.sh Note that the script expects git to be clean, so you will need to git add and git commit after making this change.
  3. Create your own sources.list file with all of your system sources: cat /etc/apt/sources.list > /tmp/sources.list
  4. add these 2 lines to the end of /tmp/sources.list (replace $TOKEN with your Signalwire PAT)
deb [trusted=yes] https://signalwire:[email protected]/repo/deb/debian-release/ buster main
deb-src [trusted=yes] https://signalwire:[email protected]/repo/deb/debian-release/ buster main
  1. Execute with the switch to use a custom sources.list ./debian/util.sh build-all -aamd64 -cbuster -T/tmp/sources.list

yois615 avatar Jul 28 '22 11:07 yois615

I also wanted to install freeswitch, I ran into the same stupidity. Instead of simplifying the installation, they came up with some kind of madness. There is no normal description of the installation, nothing is said where to insert this unfortunate token. Looks like things are going really bad for this company.

evshokin avatar Jan 20 '23 06:01 evshokin

I also wanted to install freeswitch, I ran into the same stupidity. Instead of simplifying the installation, they came up with some kind of madness. There is no normal description of the installation, nothing is said where to insert this unfortunate token. Looks like things are going really bad for this company.

Did you manage to figure out how to use the access token?

PushkaZA avatar Feb 07 '23 10:02 PushkaZA

@PushkaZA I have exact instructions step by step just above in my post from July 28 2022

yois615 avatar Feb 07 '23 12:02 yois615

@PushkaZA I have exact instructions step by step just above in my post from July 28 2022

Thanks for responding, I have done the change to the pbuilder file, and have added the sources.list file with my token.

Any idea how to get the following to use the token: apt-get -y install libfreeswitch-dev

PushkaZA avatar Feb 07 '23 13:02 PushkaZA

@PushkaZA For building DEB packages let util.sh handle that. Following my instructions you don't need to do anything else.

If you're looking to use prebuilt binary packages, refer to standard SignalWire documentation on where to put your token within Apt config, or follow my example in the sources.list file created in tmp

yois615 avatar Feb 07 '23 13:02 yois615

If these kind of bugs frustrate you, bring it up at today's Office Hours: https://mailchi.mp/freeswitch.org/office-hours

yois615 avatar Feb 07 '23 13:02 yois615

Kudos to @yois615 for the explanation ! We had a specific need to compile with the stirshaken extensions. In addition to the previous edit in /usr/lib/pbuilder/pbuilder-createbuildenv we add

109 $TRAP umountproc_cleanbuildplace_trap exit sighup
110 $CHROOTEXEC apt-get -q -y install ca-certificates
111 $CHROOTEXEC apt-get -q "${APTGETOPT[@]}" update
112 $CHROOTEXEC apt-get -q -y install libstirshaken-dev libstirshaken1
113
114 install_packages_for_optional_features

It's quick and dirty, but does the job :)

checking for stirshaken... yes
checking STIRSHAKEN_LIBS... -lstirshaken

Thank you @yois615 !

martintamare avatar Jul 07 '23 10:07 martintamare